re PR middle-end/63155 (memory hog)
[gcc.git] / gcc / ChangeLog
1 2018-10-08 Richard Biener <rguenther@suse.de>
2
3 PR tree-optimization/63155
4 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
5 (ssa_propagation_engine::ssa_propagate): Remove redundant
6 bitmap bit clearing.
7
8 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
9
10 PR rtl-optimization/86939
11 PR rtl-optimization/87479
12 * ira.h (non_conflicting_reg_copy_p): New prototype.
13 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
14 (make_hard_regno_dead): Don't add conflicts for register
15 ignore_reg_for_conflicts.
16 (make_object_dead): Likewise.
17 (non_conflicting_reg_copy_p): New function.
18 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
19 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
20 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
21 (make_hard_regno_dead): Don't add conflicts for register
22 ignore_reg_for_conflicts. Remove special conflict handling of
23 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
24 check_pic_pseudo_p and update callers.
25 (mark_pseudo_dead): Don't add conflicts for register
26 ignore_reg_for_conflicts.
27 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
28
29 2018-10-05 Andrew Waterman <andrew@sifive.com>
30 Jim Wilson <jimw@sifive.com>
31
32 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
33 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
34 new pattern using HONOR_SNANS that emits one extra instruction.
35
36 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
37
38 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
39 patterns): Merge SI and DI patterns to a GPR pattern.
40 (unnamed define_insn and define_split for record form of that): Merge
41 to a single define_insn_and_split pattern.
42
43 2018-10-05 David Malcolm <dmalcolm@redhat.com>
44
45 PR c++/56856
46 * input.c (expand_location_to_spelling_point): Add param "aspect"
47 and use rather than hardcoding LOCATION_ASPECT_CARET.
48 (get_substring_ranges_for_loc): Handle the case of a single token
49 within a macro expansion.
50 * input.h (expand_location_to_spelling_point): Add "aspect" param,
51 defaulting to LOCATION_ASPECT_CARET.
52
53 2018-10-05 Paul Koning <ni1d@arrl.net>
54
55 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
56 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
57 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
58 (pdp11_guard_type): New function.
59
60 2018-10-05 Paul Koning <ni1d@arrl.net>
61
62 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
63 * config/pdp11/pdp11.opt (mfloat32): Remove.
64 (mfloat64): Remove.
65 * doc/invoke.texi (pdp11 -mfloat32): Remove:
66 (pdp11 -mfloat64): Remove.
67
68 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
69
70 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
71 (*cmp<mode>_cc_i387): Ditto.
72 (*cmpu<mode>_cc_i387): Ditto.
73 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
74 * config/i386/i386.c (ix86_expand_fp_compare): Remove
75 "scratch" argument.
76 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
77 Emit x86_sahf_1 pattern.
78 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
79 (ix86_expand_carry_flag_compare): Ditto.
80
81 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
82
83 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
84 to reg_or_0_operand. Add "C" constraint.
85 (*cmpxf_cc_i387): Ditto.
86 (*cmp<mode>_i387): Change operand 2 predicate
87 to nonimm_or_0_operand. Add "C" constraint.
88 (*cmp<mode>_cc_i387): Ditto.
89 (*cmp<mode>_0_i387): Remove insn pattern.
90 (*cmp<mode>_0_cc_i387): Ditto.
91
92 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
93
94 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
95 * config/i386/predicates.md (nonimm_or_0_operand): Rename
96 from vector_move_operand. Update all uses.
97
98 2018-10-05 Martin Sebor <msebor@redhat.com>
99
100 PR tree-optimization/87490
101 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
102 consistently.
103
104 2018-10-05 Richard Biener <rguenther@suse.de>
105
106 PR tree-optimization/63155
107 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
108 vertical space in dumpfiles.
109 * tree-ssa-propagate.h
110 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
111 * tree-ssa-propagate.c (cfg_blocks_back): New global.
112 (ssa_edge_worklist_back): Likewise.
113 (curr_order): Likewise.
114 (cfg_blocks_get): Remove abstraction.
115 (cfg_blocks_add): Likewise.
116 (cfg_blocks_empty_p): Likewise.
117 (add_ssa_edge): Add to current or next worklist based on
118 RPO index.
119 (add_control_edge): Likewise.
120 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
121 into ...
122 (ssa_propagation_engine::ssa_propagate): ... here. Unify
123 iteration from CFG and SSA edge worklist so we process
124 everything in RPO order, prioritizing forward progress
125 over iteration.
126 (ssa_prop_init): Allocate new worklists, do not dump
127 immediate uses.
128 (ssa_prop_fini): Free new worklists.
129
130 2018-10-05 Richard Biener <rguenther@suse.de>
131
132 * tree-core.h (tree_block::abstract_flag): Remove.
133 (tree_block::block_num): Make full 32bits.
134 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
135 * tree.h (BLOCK_ABSTRACT): Remove.
136 * dwarf2out.c (gen_lexical_block_die): Remove dead code
137 resulting from BLOCK_ABSTRACT being always false.
138 (gen_inlined_subroutine_die): Likewise.
139 (gen_block_die): Likewise.
140 * tree.c (block_ultimate_origin): Likewise.
141 * tree-pretty-print.c (dump_block_node): Remove code dealing
142 with BLOCK_ABSTRACT.
143 * tree-ssa-live.c (dump_scope_block): Likewise.
144 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
145 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
146
147 2018-10-05 Richard Biener <rguenther@suse.de>
148
149 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
150 is asked for initialize mode to the component mode of the
151 vector type.
152
153 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
154
155 PR target/87522
156 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
157 assembler for -mavx.
158 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
159
160 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
161
162 PR target/87509
163 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
164 RS6000_BTM_DFP.
165 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
166 to be DImode. When using mffscrn, force the operand to a register.
167
168 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
169
170 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
171 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
172 X87MODEF mode iterator.
173 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
174 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
175 X87MODEF mode iterator.
176
177 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
178
179 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
180 -Wno-prio-ctor-dtor.
181
182 2018-10-04 David Malcolm <dmalcolm@redhat.com>
183
184 * Makefile.in (OBJS): Add opt-problem.o.
185 * dump-context.h: Include "selftest.h.
186 (selftest::temp_dump_context): New forward decl.
187 (class dump_context): Make friend of class
188 selftest::temp_dump_context.
189 (dump_context::dump_loc_immediate): New decl.
190 (class dump_pretty_printer): Move here from dumpfile.c.
191 (class temp_dump_context): Move to namespace selftest.
192 (temp_dump_context::temp_dump_context): Add param
193 "forcibly_enable_dumping".
194 (selftest::verify_dumped_text):
195 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
196 (selftest::verify_item):
197 (ASSERT_IS_TEXT): Move here from dumpfile.c.
198 (ASSERT_IS_TREE): Likewise.
199 (ASSERT_IS_GIMPLE): Likewise.
200 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
201 to...
202 (dump_context::dump_loc_immediate): ...this new function.
203 (class dump_pretty_printer): Move to dump-context.h.
204 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
205 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
206 (temp_dump_context::temp_dump_context): Move to "selftest"
207 namespace. Add param "forcibly_enable_dumping", and use it to
208 conditionalize the use of m_pp;
209 (selftest::verify_dumped_text): Make non-static.
210 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
211 (selftest::verify_item): Make non-static.
212 (ASSERT_IS_TEXT): Move to dump-context.h.
213 (ASSERT_IS_TREE): Likewise.
214 (ASSERT_IS_GIMPLE): Likewise.
215 (selftest::test_capture_of_dump_calls): Pass "true" for new
216 param of temp_dump_context.
217 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
218 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
219 TDF_COMPARE_DEBUG.
220 * opt-problem.cc: New file.
221 * opt-problem.h: New file.
222 * optinfo-emit-json.cc
223 (selftest::test_building_json_from_dump_calls): Pass "true" for
224 new param of temp_dump_context.
225 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
226 (optinfo::emit_for_opt_problem): New function.
227 (optinfo::emit): Clarity which emit_item is used.
228 * optinfo.h (optinfo::get_dump_location): New accessor.
229 (optinfo::emit_for_opt_problem): New decl.
230 (optinfo::emit): Make const.
231 * selftest-run-tests.c (selftest::run_tests): Call
232 selftest::opt_problem_cc_tests.
233 * selftest.h (selftest::opt_problem_cc_tests): New decl.
234 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
235 bool to opt_result, converting fprintf messages to
236 opt_result::failure_at calls. Add "stmt" param for use by the
237 failure_at calls.
238 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
239 (runtime_alias_check_p): Convert return type from bool to
240 opt_result, converting dump_printf calls to
241 opt_result::failure_at, using the statement DDR_A for their
242 location.
243 (find_data_references_in_stmt): Convert return type from bool to
244 opt_result, converting "return false" to opt_result::failure_at
245 with a new message.
246 * tree-data-ref.h: Include "opt-problem.h".
247 (dr_analyze_innermost): Convert return type from bool to opt_result,
248 and add a const gimple * param.
249 (find_data_references_in_stmt): Convert return type from bool to
250 opt_result.
251 (runtime_alias_check_p): Likewise.
252 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
253 dr_analyze_innermost.
254 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
255 Convert return type from bool to opt_result, adding a message for
256 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
257 (vect_analyze_data_ref_dependence): Convert return type from bool
258 to opt_result. Change sense of return type from "false"
259 effectively meaning "no problems" to "false" meaning a problem,
260 so that "return false" becomes "return opt_result::success".
261 Convert "return true" calls to opt_result::failure_at, using
262 the location of statement A rather than vect_location.
263 (vect_analyze_data_ref_dependences): Convert return type from bool
264 to opt_result.
265 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
266 calls to opt_result::failure_at, using the stmt location rather
267 than vect_location.
268 (vect_verify_datarefs_alignment): Convert return type from bool
269 to opt_result.
270 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
271 into multiple more-tightly-scoped copies.
272 (vect_analyze_data_refs_alignment): Convert return type from bool
273 to opt_result.
274 (vect_analyze_data_ref_accesses): Likewise, converting a
275 "return false" to a "return opt_result::failure_at", adding a
276 new message.
277 (vect_prune_runtime_alias_test_list): Convert return type from
278 bool to opt_result, converting dump_printf_loc to
279 opt_result::failure_at. Add a %G to show the pertinent statement,
280 and use the stmt's location rather than vect_location.
281 (vect_find_stmt_data_reference): Convert return type from
282 bool to opt_result, converting dump_printf_loc to
283 opt_result::failure_at, using stmt's location.
284 (vect_analyze_data_refs): Convert return type from bool to
285 opt_result. Convert "return false" to "return
286 opt_result::failure_at", adding messages as needed.
287 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
288 type from bool to opt_result.
289 (vect_determine_vf_for_stmt): Likewise.
290 (vect_determine_vectorization_factor): Likewise, converting
291 dump_printf_loc to opt_result::failure_at, using location of phi
292 rather than vect_location.
293 (vect_analyze_loop_form_1): Convert return type from bool to
294 opt_result, converting dump_printf_loc calls, retaining the use of
295 vect_location.
296 (vect_analyze_loop_form): Convert return type from loop_vec_info
297 to opt_loop_vec_info.
298 (vect_analyze_loop_operations): Convert return type from bool to
299 opt_result, converting dump_printf_loc calls, using the location
300 of phi/stmt rather than vect_location where available. Convert
301 various "return false" to "return opt_result::failure_at" with
302 "unsupported phi" messages.
303 (vect_get_datarefs_in_loop): Convert return type from bool to
304 opt_result. Add a message for the
305 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
306 (vect_analyze_loop_2): Convert return type from bool to
307 opt_result. Ensure "ok" is set to a opt_result::failure_at before
308 each "goto again;", adding new messages where needed.
309 Add "unsupported grouped {store|load}" messages.
310 (vect_analyze_loop): Convert return type from loop_vec_info to
311 opt_loop_vec_info.
312 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
313 bool to opt_result.
314 * tree-vect-stmts.c (process_use): Likewise, converting
315 dump_printf_loc call and using stmt location, rather than
316 vect_location.
317 (vect_mark_stmts_to_be_vectorized): Likeise.
318 (vect_analyze_stmt): Likewise, adding a %G.
319 (vect_get_vector_types_for_stmt): Convert return type from bool to
320 opt_result, converting dump_printf_loc calls and using stmt
321 location, rather than vect_location.
322 (vect_get_mask_type_for_stmt): Convert return type from tree to
323 opt_tree, converting dump_printf_loc calls and using stmt location.
324 * tree-vectorizer.c: Include "opt-problem.h.
325 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
326 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
327 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
328 enabled, use it to report at the top level "couldn't vectorize
329 loop" followed by the problem.
330 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
331 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
332 to opt_result.
333 (vect_analyze_stmt): Likewise.
334 (vect_get_vector_types_for_stmt): Likewise.
335 (tree vect_get_mask_type_for_stmt): Likewise.
336 (vect_analyze_data_ref_dependences): Likewise.
337 (vect_enhance_data_refs_alignment): Likewise.
338 (vect_analyze_data_refs_alignment): Likewise.
339 (vect_verify_datarefs_alignment): Likewise.
340 (vect_analyze_data_ref_accesses): Likewise.
341 (vect_prune_runtime_alias_test_list): Likewise.
342 (vect_find_stmt_data_reference): Likewise.
343 (vect_analyze_data_refs): Likewise.
344 (vect_analyze_loop): Convert return type from loop_vec_info to
345 opt_loop_vec_info.
346 (vect_analyze_loop_form): Likewise.
347 (vect_analyze_slp): Convert return type from bool to opt_result.
348
349 2018-10-04 David Malcolm <dmalcolm@redhat.com>
350
351 * doc/invoke.texi (-fopt-info): Document new "internals"
352 sub-option.
353 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
354 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
355 MSG_ALL_KINDS.
356 (optinfo_verbosity_options): Add "internals".
357 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
358 (dump_context::apply_dump_filter_p): New member function.
359 (dump_context::dump_loc): Use apply_dump_filter_p rather than
360 explicitly masking the dump_kind.
361 (dump_context::begin_scope): Increment the scope depth first. Use
362 apply_dump_filter_p rather than explicitly masking the dump_kind.
363 (dump_context::emit_item): Use apply_dump_filter_p rather than
364 explicitly masking the dump_kind.
365 (dump_dec): Likewise.
366 (dump_hex): Likewise.
367 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
368 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
369 (opt_info_switch_p): Update handling of default
370 MSG_OPTIMIZED_LOCATIONS to cope with default of
371 MSG_PRIORITY_USER_FACING.
372 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
373 masking the dump_kind.
374 (selftest::test_capture_of_dump_calls): Update test_dump_context
375 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
376 than MSG_ALL. Generalize scope test to be run at all four
377 combinations of with/without MSG_PRIORITY_USER_FACING and
378 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
379 for each of the two values.
380 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
381 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
382 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
383 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
384 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
385 with MSG_PRIORITY_*.
386 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
387 dump messages as MSG_PRIORITY_USER_FACING.
388 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
389 about the interaction with MSG_PRIORITY_*.
390
391 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
392
393 * varasm.c (output_constant): Add new parameter merge_strings.
394 Make strings properly zero terminated in merge string sections.
395 (mergeable_string_section): Don't fail if the last char is non-zero.
396 (assemble_variable_contents): Handle merge string sections.
397 (assemble_variable): Likewise.
398 (assemble_constant_contents): Likewise.
399 (output_constant_def_contents): Likewise.
400 (output_constructor_array_range,
401 output_constructor_regular_field): Adjust call to output_constant.
402 (output_object_block): Adjust call to assemble_constant_contents
403 and assemble_variable_contents.
404
405 2018-10-04 Martin Liska <mliska@suse.cz>
406
407 PR c/87483
408 * cgraphunit.c (process_function_and_variable_attributes):
409 Warn about a function with alias attribute and a body.
410
411 2018-10-04 Martin Liska <mliska@suse.cz>
412
413 PR ipa/82625
414 * multiple_target.c (redirect_to_specific_clone): New function.
415 (ipa_target_clone): Use it.
416 * tree-inline.c: Fix comment.
417
418 2018-10-04 David Malcolm <dmalcolm@redhat.com>
419
420 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
421 fields.
422 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
423 (gcc::dump_manager::register_pass): New member function, adapted
424 from loop body in gcc::pass_manager::register_pass, adding a
425 call to update_dfi_for_opt_info.
426 (gcc::dump_manager::opt_info_enable_passes): Store the
427 -fopt-info options into the new fields. Move the loop
428 bodies into...
429 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
430 function.
431 * dumpfile.h (struct opt_pass): New forward decl.
432 (gcc::dump_manager::register_pass): New decl.
433 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
434 (class gcc::dump_manager): Add fields "m_optgroup_flags",
435 "m_optinfo_flags", and "m_optinfo_filename".
436 * passes.c (gcc::pass_manager::register_pass): Move all of the
437 dump-handling code to gcc::dump_manager::register_pass.
438
439 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
440
441 PR rtl-optimization/87466
442 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
443 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
444 * doc/tm.texi: Regenerate.
445 * ira-lives.c (process_bb_node_lives): Use the new target hook.
446 * lra-lives.c (process_bb_lives): Likewise.
447 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
448 Define.
449
450 2018-10-04 Tamar Christina <tamar.christina@arm.com>
451
452 * params.c (add_params): Fix initialization.
453
454 2018-10-04 Martin Liska <mliska@suse.cz>
455
456 PR gcov-profile/84107
457 * tree-profile.c (init_ic_make_global_vars):
458 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
459 Come up with new ic_tuple* variables. Emit
460 __gcov_indirect_call{,_topn} variables.
461 (gimple_gen_ic_profiler): Access the variable
462 and emit gimple.
463 (gimple_gen_ic_func_profiler): Access
464 __gcov_indirect_call.callee field.
465 (gimple_init_gcov_profiler): Use ptr_type_node.
466 * value-prof.c (gimple_ic): Use ptr_type_node.
467
468 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
469
470 PR tree-optimization/85787
471 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
472 into this function and add support for detecting multiple phis.
473 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
474
475 2018-10-04 Martin Liska <mliska@suse.cz>
476
477 PR ipa/87491
478 * ipa-inline.c (inline_to_all_callers_1):
479 Call ultimate_alias_target for node being inlined.
480
481 2018-10-03 Jeff Law <law@redhat.com>
482
483 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
484 target's wchar_t.
485 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
486 * tree.h (get_typenode_from_name): Prototype.
487
488 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
489
490 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
491 Change operand 2 predicate to nonimmediate_operand.
492 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
493
494 2018-10-03 Martin Sebor <msebor@redhat.com>
495 Jeff Law <law@redhat.com>
496
497 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
498 initialize it.
499 (get_string_length): Detect unterminated arrays.
500 (format_string): Same.
501 (format_directive): Warn about unterminated arrays.
502 (handle_gimple_call): Mark statements with no_warning as needed.
503
504 2018-10-03 Jim Wilson <jimw@sifive.com>
505
506 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
507 also define __riscv_abi_rve. Delete trailing white space.
508
509 2018-10-03 Paul Koning <ni1d@arrl.net>
510
511 Enable LRA register allocator for PDP11.
512 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
513 (R): Likewise.
514 (D): Likewise.
515 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
516 * config/pdp11/pdp11.opt (-mlra): New option.
517 * doc/invoke.texi (PDP-11 Options): Document -mlra.
518
519 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
520
521 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
522 (*<absneg:code>extend<mode>xf2): Ditto.
523
524 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
525
526 PR tree-optimization/87415
527 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
528 precision fields.
529
530 2018-10-02 Jeff Law <law@redhat.com>
531
532 * gimple-fold.c (get_range_strlen): Only set *nonstr when
533 an unterminated string is discovered. Bubble up range
534 even for unterminated strings.
535 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
536 indicates the string was not terminated via NONSTR.
537
538 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
539
540 * tree-vrp.c (extract_range_from_unary_expr): Special case all
541 pointer conversions.
542 Do not do anything special for anti-ranges.
543
544 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
545
546 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
547 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
548
549 2018-10-03 Martin Liska <mliska@suse.cz>
550
551 PR gcov-profile/86109
552 * coverage.c (coverage_begin_function): Do not
553 mark lambdas as artificial.
554 * tree-core.h (struct GTY): Remove tm_clone_flag
555 and introduce new lambda_function.
556 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
557
558 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
559
560 PR target/87474
561 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
562 P8_VECTOR and VSX are enabled.
563
564 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
565
566 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
567 0x3907 as CPU model number.
568
569 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
570
571 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
572 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
573 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
574 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
575 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
576 * config/s390/s390.md: Likewise. Rename also the cpu attribute
577 value from arch12 to z14.
578
579 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
580
581 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
582 (isinfxf2): Ditto.
583 (isinf<mode>2): Ditto.
584
585 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
586
587 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
588 before emitting fxam. Perform calculations in XFmode.
589
590 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
591
592 * match.pd (((X /[ex] A) +- B) * A): New transformation.
593
594 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
595
596 PR middle-end/87319
597 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
598 * tree.c (signed_or_unsigned_type_for): Handle complex.
599
600 2018-10-02 Jeff Law <law@redhat.com>
601
602 * gimple-fold.c (get_range_strlen): Remove dead code.
603
604 2018-10-02 Martin Sebor <msebor@redhat.com>
605 Jeff Law <law@redhat.com>
606
607 * builtins.c (unterminated_array): Add new arguments.
608 If argument is not terminated, bubble up size and exact
609 state to callers.
610 (expand_builtin_strnlen): Detect, avoid expanding
611 and diagnose unterminated arrays.
612 (c_strlen): Fill in offset of start of unterminated strings.
613 * builtins.h (unterminated_array): Update prototype.
614
615 2018-10-02 Richard Biener <rguenther@suse.de>
616
617 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
618 of haddv4df, first reduce to SSE width and exploit the fact
619 that we only need element zero with the reduction result.
620 (reduc_plus_scal_v2df): Likewise.
621
622 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
623
624 * dojump.h (do_jump): Delete.
625 (do_jump_1): Likewise.
626 (split_comparison): Move around.
627 * dojump.c (do_jump): Make static.
628 (do_jump_1): Likewise.
629 (jumpifnot): Move around.
630 (jumpifnot_1): Likewise.
631 (jumpif): Likewise.
632 (jumpif_1): Likewise.
633 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
634
635 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
636
637 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
638 insns in the delay slot and add_insn_after for the jump insn.
639
640 2018-10-02 Richard Biener <rguenther@suse.de>
641
642 * tree-inline.c (expand_call_inline): Use the location of
643 the callee declaration for the inline-entry marker.
644 * final.c (notice_source_line): Remove special-casing of
645 NOTE_INSN_INLINE_ENTRY.
646
647 2018-10-01 Carl Love <cel@us.ibm.com>
648
649 PR 69431
650 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
651 (__builtin_mtfsb0): New.
652 (__builtin_mtfsb1): New.
653 ( __builtin_set_fpscr_rn): New.
654 (__builtin_set_fpscr_drn): New.
655 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
656 (rs6000_expand_set_fpscr_rn_builtin): Add.
657 (rs6000_expand_set_fpscr_drn_builtin): Add.
658 (rs6000_expand_builtin): Add case statement entries for
659 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
660 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
661 RS6000_BUILTIN_MFFSL.
662 (rs6000_init_builtins): Add ftype initialization and def_builtin
663 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
664 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
665 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
666 rs6000_mffscdrn): Add define_insn.
667 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
668 * doc/extend.texi: Add documentation for the builtins.
669
670 2018-10-01 Richard Biener <rguenther@suse.de>
671
672 PR tree-optimization/87465
673 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
674 causing branch miscounts.
675
676 2018-10-01 Tamar Christina <tamar.christina@arm.com>
677
678 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
679 aarch64_option_default_param): New.
680 (params.h): Include.
681 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
682 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
683 stack-clash protection validation code.
684
685 2018-10-01 Tamar Christina <tamar.christina@arm.com>
686
687 * params.c (validate_param): New.
688 (add_params): Use it.
689 (set_param_value): Refactor param validation into validate_param.
690 (diagnostic.h): Include.
691 * diagnostic.h (diagnostic_ready_p): New.
692
693 2018-10-01 Tamar Christina <tamar.christina@arm.com>
694
695 * params.c (set_param_value):
696 Add index of parameter being validated.
697 * common/common-target.def (option_validate_param): New.
698 * common/common-targhooks.h (default_option_validate_param): New.
699 * common/common-targhooks.c (default_option_validate_param): New.
700 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
701 * doc/tm.texi: Regenerate.
702
703 2018-10-01 Tamar Christina <tamar.christina@arm.com>
704
705 PR target/86486
706 * config/aarch64/aarch64.c (aarch64_override_options_internal):
707 Add validation for stack-clash parameters and set defaults.
708
709 2018-10-01 Tamar Christina <tamar.christina@arm.com>
710
711 PR target/86486
712 * configure.ac: Add stack-clash-protection-guard-size.
713 * doc/install.texi: Document it.
714 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
715 * params.def: Update comment for guard-size.
716 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
717 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
718 * configure: Regenerate.
719
720 2018-10-01 Tamar Christina <tamar.christina@arm.com>
721
722 PR target/86486
723 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
724 STACK_DYNAMIC_OFFSET): New.
725 * config/aarch64/aarch64.c (aarch64_layout_frame):
726 Update outgoing args size.
727 (aarch64_stack_clash_protection_alloca_probe_range,
728 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
729
730 2018-10-01 Tamar Christina <tamar.christina@arm.com>
731
732 PR target/86486
733 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
734 probe ranges.
735 * target.def (stack_clash_protection_alloca_probe_range): New.
736 (stack_clash_protection_final_dynamic_probe): Remove.
737 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
738 (default_stack_clash_protection_final_dynamic_probe): Remove.
739 * targhooks.c: Likewise.
740 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
741 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
742 * doc/tm.texi: Regenerate.
743
744 2018-10-01 Tamar Christina <tamar.christina@arm.com>
745
746 PR target/86486
747 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
748 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
749 aarch64_clamp_to_uimm12_shift): New.
750 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
751 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
752
753 2018-10-01 Tamar Christina <tamar.christina@arm.com>
754
755 PR target/86486
756 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
757
758 2018-10-01 Jeff Law <law@redhat.com>
759 Richard Sandiford <richard.sandiford@linaro.org>
760 Tamar Christina <tamar.christina@arm.com>
761
762 PR target/86486
763 * config/aarch64/aarch64.md
764 (probe_stack_range): Add k (SP) constraint.
765 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
766 STACK_CLASH_MAX_UNROLL_PAGES): New.
767 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
768 stack probes for stack clash.
769 (aarch64_allocate_and_probe_stack_space): New.
770 (aarch64_expand_prologue): Use it.
771 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
772 (aarch64_sub_sp): Add emit_move_imm optional param.
773
774 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
775
776 PR tree-optimization/87261
777 * match.pd: Remove trailing whitespace.
778 Add (x & y) | ~(x | y) -> ~(x ^ y),
779 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
780
781 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
782
783 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
784 constraints.
785 (ashlsi3_insn): Update instruction constraints.
786 (ashrsi3_insn): Likewise.
787 (rotrsi3): Likewise.
788 (add_shift): Likewise.
789 * config/arc/constraints.md (Csz): New 32 bit constraint. It
790 avoids placing in the limm field small constants which, otherwise,
791 could end into a small instruction.
792
793 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
794
795 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
796 destination register is not odd-even.
797 (umaddsidi4_split): Likewise.
798
799 2018-10-01 Richard Biener <rguenther@suse.de>
800
801 * tree-inline.c (expand_call_inline): Store origin of fn
802 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
803 * tree.c (block_ultimate_origin): Simplify and do some
804 checking.
805
806 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
807
808 * config/i386/mmx.md (EMMS): New int iterator.
809 (emms): New int attribute.
810 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
811 EMMS int iterator. Explicitly declare clobbers.
812 (mmx_emms): Remove expander.
813 (mmx_femms): Ditto.
814 * config/i386/predicates.md (emms_operation): Remove predicate.
815 (vzeroall_pattern): New predicate.
816 (vzeroupper_pattern): Rename from vzeroupper_operation.
817 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
818 vzeroupper_pattern and vzeroall_pattern predicates.
819
820 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
821
822 PR rtl-optimization/86939
823 * ira-lives.c (make_hard_regno_born): Rename from this...
824 (make_hard_regno_live): ... to this. Remove update to conflict
825 information. Update function comment.
826 (make_hard_regno_dead): Add conflict information update. Update
827 function comment.
828 (make_object_born): Rename from this...
829 (make_object_live): ... to this. Remove update to conflict information.
830 Update function comment.
831 (make_object_dead): Add conflict information update. Update function
832 comment.
833 (mark_pseudo_regno_live): Call make_object_live.
834 (mark_pseudo_regno_subword_live): Likewise.
835 (mark_hard_reg_dead): Update function comment.
836 (mark_hard_reg_live): Call make_hard_regno_live.
837 (process_bb_node_lives): Likewise.
838 * lra-lives.c (make_hard_regno_born): Rename from this...
839 (make_hard_regno_live): ... to this. Remove update to conflict
840 information. Remove now uneeded check_pic_pseudo_p argument.
841 Update function comment.
842 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
843 to conflict information. Update function comment.
844 (mark_pseudo_live): Remove update to conflict information. Update
845 function comment.
846 (mark_pseudo_dead): Add conflict information update.
847 (mark_regno_live): Call make_hard_regno_live.
848 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
849 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
850
851 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
852
853 PR target/87370
854 * config/i386/i386.c (construct_container): Use TImode for
855 BLKmode values in 2 integer registers.
856
857 2018-09-29 Jeff Law <law@redhat.com>
858
859 * builtins.c (unterminated_array): Pass in c_strlen_data * to
860 c_strlen rather than just a tree *.
861 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
862 Update recursive calls appropriately. If caller did not provide a
863 suitable data pointer, create a local one. When a non-terminated
864 string is discovered, bubble up information about the string via the
865 c_strlen_data object.
866 * builtins.h (c_strlen): Update prototype.
867 (c_strlen_data): New structure.
868 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
869 For a type 2 call, if c_strlen indicates a non-terminated string
870 use the length of the non-terminated string.
871 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
872
873 2018-09-29 Jakub Jelinek <jakub@redhat.com>
874
875 PR target/87467
876 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
877 __m512d type for __A argument rather than __m512.
878
879 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
880
881 * match.pd (simple_comparison): Don't optimize if either operand is
882 a function pointer when target needs function pointer canonicalization.
883
884 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
885
886 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
887 power5 .. power9 to remove indirection.
888 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
889 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
890 ASM_CPU_476_SPEC): Delete.
891 (ASM_CPU_SPEC): Adjust.
892 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
893 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
894
895 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
896
897 * config.in: Delete HAVE_AS_DCI.
898 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
899 * config/rs6000/rs6000.h: Ditto.
900 * configure.ac: Delete HAVE_AS_DCI.
901 * configure: Regenerate.
902
903 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
904
905 * config.in (HAVE_AS_LWSYNC): Delete.
906 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
907 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
908 do it as a .long .
909 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
910 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
911 as a .long .
912 * configure.ac: Delete HAVE_AS_LWSYNC.
913 * configure: Regenerate.
914
915 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
916 Pierre-Marie de Rodat <derodat@adacore.com>
917
918 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
919 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
920 (cgraph_node::create_thunk): Add indirect_offset parameter.
921 (thunk_adjust): Likewise.
922 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
923 and initialize the corresponding field with it.
924 (cgraph_node::dump): Dump indirect_offset field.
925 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
926 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
927 (thunk_adjust): Add indirect_offset parameter and deal with it.
928 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
929 pass it to thunk_adjust. Do not call the target hook if it's non-zero
930 or if the thunk is external or local. Fix formatting. Do not chain
931 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
932 if any, in the GIMPLE representation.
933 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
934 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
935 (input_node): Read indirect_offset field.
936 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
937 call to thunk_adjust.
938 * tree-nested.c (struct nesting_info): Add thunk_p field.
939 (create_nesting_tree): Set it.
940 (convert_all_function_calls): Copy static chain from targets to thunks.
941 (finalize_nesting_tree_1): Return early for thunks.
942 (unnest_nesting_tree_1): Do not finalize thunks.
943 (gimplify_all_functions): Do not gimplify thunks.
944
945 2018-09-28 David Malcolm <dmalcolm@redhat.com>
946
947 * opt-suggestions.c (option_proposer::build_option_suggestions):
948 Release "option_values".
949
950 2018-09-28 David Malcolm <dmalcolm@redhat.com>
951
952 * coverage.c (get_coverage_counts): Convert problem-reporting dump
953 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
954 * dumpfile.c (kind_as_string): New function.
955 (dump_loc): Rather than a hardcoded prefix of "note: ", use
956 kind_as_string to vary the prefix based on dump_kind.
957 (selftest::test_capture_of_dump_calls): Update for above.
958
959 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
960
961 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
962 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
963
964 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
965
966 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
967 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
968 INVALID_REGNUM instead of FPSR_REG.
969 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
970 * config/i386/i386.md: Update comment of FP compares.
971 (fldenv): Do not clobber FPSR_REG.
972
973 2018-09-28 Richard Biener <rguenther@suse.de>
974
975 * tree.h (BLOCK_ORIGIN): New.
976 * omp-expand.c (grid_expand_target_grid_body): Assign
977 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
978 * tree-inline.c (remap_block): Likewise.
979 * auto-profile.c (get_function_decl_from_block): Simplify
980 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
981 * langhooks.c (lhd_print_error_function): Likewise.
982 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
983 Likewise.
984 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
985 * tree.c (block_nonartificial_location): Likewise.
986 (block_ultimate_origin): Likewise.
987 * tree-pretty-print.c (percent_K_format): Likewise. Remove
988 no longer needed LTO case.
989
990 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
991 Jan Hubicka <jh@suse.cz>
992 Martin Jambor <mjambor@suse.cz>
993
994 * simplify-rtx.c (simplify_merge_mask): New function.
995 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
996 same masks are used in op1 or op2.
997 (test_vec_merge): New function.
998 (test_vector_ops): Call test_vec_merge.
999
1000 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1001
1002 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1003 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1004 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1005 (cypress_costs): Set it.
1006 (supersparc_costs): Likewise.
1007 (hypersparc_costs): Likewise.
1008 (leon_cost): Likewise.
1009 (leon3_costs): Likewise.
1010 (sparclet_costs): Likewise.
1011 (ultrasparc_costs): Likewise.
1012 (ultrasparc_costs): Likewise.
1013 (niagara_costs): Likewise.
1014 (niagara2_costs): Likewise.
1015 (niagara3_costs): Likewise.
1016 (niagara4_costs): Likewise.
1017 (niagara7_costs): Likewise.
1018 (m8_costs): Likewise.
1019 (TARGET_CAN_FOLLOW_JUMP): Define.
1020 (pass_work_around_errata::gate): Minor tweak.
1021 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1022 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1023 Automaitcally clear MASK_FSMULD mask for V7 processors.
1024 (sparc_can_follow_jump): New static function.
1025 (output_ubranch): Deal with CROSSING_JUMP_P.
1026 (sparc_use_sched_lookahead): Rewrite using switch statement.
1027 (sparc_issue_rate): Reorder.
1028 (sparc_branch_cost): New function.
1029
1030 2018-09-27 Martin Sebor <msebor@redhat.com>
1031
1032 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1033 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1034 (int_fits_type_p): Same.
1035
1036 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1037
1038 * config/i386/i386.md (FPCR_REG): Remove.
1039 (UNSPEC_FLDCW): Remove.
1040 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1041 (x86_fldcw_1): Remove insn pattern.
1042 (fnstenv): Do not clobber FPCR_REG.
1043 (fldenv): Ditto.
1044 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1045 (CALL_USED_REGISTERS): Ditto.
1046 (REG_ALLOC_ORDER): Ditto.
1047 (REG_CLASS_CONTENTS): Ditto.
1048 (HI_REGISTER_NAMES): Ditto.
1049 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1050 of numerical constants.
1051 * config/i386/i386.c (regclass_map): Remove fpsr register.
1052 (dbx_register_map): Ditto.
1053 (dbx64_register_map): Ditto.
1054 (svr4_dbx_register_map): Ditto.
1055 (print_reg): Do not handle FPCR_REG.
1056
1057 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1058
1059 PR target/87149
1060 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1061 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1062 Delete, always treat as true.
1063 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1064 Ditto. Simplify remaining code.
1065 * config/powerpcspe/powerpcspe.h: Ditto.
1066 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1067 Simplify remaining code.
1068 (rs6000_expand_builtin): Ditto.
1069 * config/rs6000/rs6000.h: Ditto.
1070 * configure.ac: Ditto.
1071 * configure: Regenerate.
1072
1073 2018-09-27 Martin Liska <mliska@suse.cz>
1074
1075 * coverage.c (get_coverage_counts): Revert the formatting
1076 of missing profile opt info.
1077
1078 2018-09-27 Richard Biener <rguenther@suse.de>
1079
1080 PR debug/37801
1081 PR debug/87440
1082 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1083 block as we do not output that.
1084 (gen_inlined_subroutine_die): Elide the originally outermost
1085 block, matching what we do for concrete instances.
1086 (decls_for_scope): Add parameter specifying whether to recurse
1087 to subblocks.
1088
1089 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1090 Tom de Vries <tom@codesourcery.com>
1091
1092 PR 82089
1093
1094 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1095 STORE_FLAG_VALUE == 1.
1096
1097 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1098
1099 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1100 constant definitions.
1101 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1102 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1103 ("speculation_barrier"): New expander definition.
1104
1105 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1106
1107 PR gcov-profile/86957
1108 * common.opt: New warning option -Wmissing-profile.
1109 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1110 * doc/invoke.texi: Document -Wmissing-profile.
1111
1112 2018-09-26 Jim Wilson <jimw@sifive.com>
1113
1114 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1115 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1116
1117 2018-09-26 Martin Sebor <msebor@redhat.com>
1118
1119 * tree.c (zerop): Change return type to bool.
1120 (integer_zerop, integer_onep, integer_each_onep): Same.
1121 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1122 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1123 (real_onep, real_minus_onep, chain_index): Same.
1124 (print_type_hash_statistics, type_list_equal): Same.
1125 * tree.h (zerop): Same.
1126 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1127 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1128 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1129 (real_onep, real_minus_onep, chain_index): Same.
1130 (print_type_hash_statistics, type_list_equal): Same.
1131
1132 2018-09-26 Jim Wilson <jimw@sifive.com>
1133
1134 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1135
1136 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR target/87414
1139 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1140 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1141 call.
1142
1143 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1144
1145 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1146
1147 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1148
1149 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1150 and FP_SECOND_SSE_REGS.
1151 (REG_CLASS_NAMES): Ditto.
1152 (REG_CLASS_CONTENTS): Ditto.
1153 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1154 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1155 (ix86_preferred_output_reload_class): Ditto.
1156 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1157 clobber constraint to "=&f".
1158 (fix_truncdi_i387): Ditto.
1159 (lrintxfdi2): Ditto.
1160 (fistdi2_<rounding>): Ditto.
1161 (fpremxf4_i387): Change "=u" constraint to "=f".
1162 (fprem1xf4_i387): Ditto.
1163 (sincosxf3): Ditto.
1164 (fptanxf4_i387): Ditto.
1165 (fxtractxf3_i387): Ditto.
1166 (fscalexf4_i387): Ditto.
1167 (atan2xf3): Change "u" constraint to "f".
1168 (fyl2xxf3_i387): Ditto.
1169 (fyl2xp1xf3_i387): Ditto.
1170
1171 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1172
1173 PR target/87439
1174 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1175 for removed I387_MASK_PM entity.
1176
1177
1178 2018-09-26 Jeff Law <law@redhat.com>
1179 Revert
1180 2018-09-26 Alexey Neyman <stilor@att.net>
1181
1182 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1183 headers are no longer pulled in by <isl/val.h>.
1184
1185 2018-09-26 Richard Biener <rguenther@suse.de>
1186
1187 PR debug/87443
1188 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1189 or concrete instance DIE to the tree. Create abstract origin
1190 attributes also for concrete instances.
1191
1192 2018-09-26 Alexey Neyman <stilor@att.net>
1193
1194 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1195 headers are no longer pulled in by <isl/val.h>.
1196
1197 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1198
1199 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1200 Use new helper functions.
1201 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1202 Use new helper functions.
1203 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1204 aarch_mm_needs_release): New declarations.
1205 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1206 aarch_mm_needs_release): New.
1207
1208 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1209
1210 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1211 (arm32_output_mi_thunk): Deal with long calls.
1212
1213 2018-09-26 Richard Biener <rguenther@suse.de>
1214
1215 PR debug/87428
1216 PR debug/87362
1217 * tree-inline.c (expand_call_inline): When the location
1218 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1219 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1220 the inserted BLOCK to make inlined_function_outer_scope_p
1221 recognize it.
1222 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1223 coords for reserved locations.
1224
1225 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1226
1227 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1228 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1229 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1230 (*sibcall_nonlocal_sysv<mode>): Ditto.
1231 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1232 (<bd>_<mode>): Ditto.
1233 (<bd>tf_<mode>): Ditto.
1234
1235 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1236
1237 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1238 control string as a list of templates instead of as C code.
1239 (*altivec_movti): Ditto.
1240 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1241
1242 2018-09-25 Jim Wilson <jimw@sifive.com>
1243
1244 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1245 when target symbol is weak.
1246
1247 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1248
1249 PR c/87387
1250 * builtins.c (unterminated_array): Simplify.
1251 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1252 where pointer arithmetic is safe.
1253
1254 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1255
1256 PR target/86987
1257 * config/rs6000/altivec.md (altivec_vspltb): Use
1258 const_0_to_15_operand instead of u5bit_cint_operand.
1259 (*altivec_vspltb_internal): Ditto.
1260 (altivec_vspltb_direct): Ditto.
1261 (altivec_vsplth): Use const_0_to_7_operand instead of
1262 u5bit_cint_operand.
1263 (*altivec_vsplth_internal): Ditto.
1264 (altivec_vsplth_direct): Ditto.
1265 (altivec_vspltw): Use const_0_to_3_operand instead of
1266 u5bit_cint_operand.
1267 (*altivec_vspltw_internal): Ditto.
1268 (altivec_vspltw_direct): Ditto.
1269 (altivec_vspltsf): Ditto.
1270 (*altivec_vspltsf_internal): Ditto.
1271 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1272 various splats with the proper size immediate. Reorder the various
1273 cases by ascending size of immediate, and put all such together.
1274
1275 2018-09-25 Richard Biener <rguenther@suse.de>
1276
1277 PR debug/83941
1278 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1279 GC-ification.
1280 (maybe_create_die_with_external_ref): Do not create
1281 DW_TAG_imported_unit here.
1282 (add_abstract_origin_attribute): Handle external BLOCK refs.
1283 (dwarf2out_abstract_function): Simplify LTO case.
1284 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1285 rather than using maybe_create_die_with_external_ref.
1286
1287 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1288
1289 PR target/71278
1290 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1291 (frndintxf2_mask_pm_i387): Ditto.
1292 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1293 Enable for !flag_trapping_math.
1294 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1295 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1296 Change operand 1 predicate to nonimmediate_operand.
1297 (attr "i387_cw"): Remove mask_pm.
1298 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1299 (enum ix86_entity): Remove I387_MASK_PM.
1300 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1301 handle I387_MASK_PM.
1302 (ix86_mode_needed): Ditto.
1303 (ix86_mode_after): Ditto.
1304 (ix86_mode_entry): Ditto.
1305 (ix86_mode_exit): Ditto.
1306 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1307
1308 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1309
1310 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1311 to_update_switch_stmts to vNULL instead of calling create on them
1312 immediately.
1313
1314 2018-09-25 Richard Biener <rguenther@suse.de>
1315
1316 PR tree-optimization/87402
1317 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1318 (visit_phi): Re-instantiate handling of supposed to be VARYING
1319 but non-VARYING backedge value.
1320
1321 2018-09-25 Richard Biener <rguenther@suse.de>
1322
1323 PR debug/83941
1324 * dwarf2out.c (struct sym_off_pair): New.
1325 (external_die_map): New global.
1326 (lookup_decl_die): When in LTO create DIEs lazily from the
1327 external_die_map.
1328 (lookup_block_die): New function, create DIEs lazily in LTO.
1329 (equate_block_to_die): New function.
1330 (dwarf2out_die_ref_for_decl): During WPA get the association
1331 from the external DIE map.
1332 (dwarf2out_register_external_die): Record mapping into the
1333 external DIE map.
1334 (maybe_create_die_with_external_ref): New function split out from
1335 DIE generation part of old dwarf2out_register_external_die.
1336 (add_abstract_origin_attribute): Do not return the DIE. When
1337 in LTO reference externals directly.
1338 (dwarf2out_abstract_function): When in LTO ignore calls for
1339 decls with external DIEs (already present abstract instances).
1340 (gen_call_site_die): Adjust.
1341 (add_high_low_attributes): Likewise.
1342 (gen_lexical_block_die): Likewise.
1343 (gen_inlined_subroutine_die): Likewie.
1344 (gen_block_die): Likewise.
1345 (dwarf2out_inline_entry): Likewise.
1346 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1347 DIEs.
1348
1349 2018-09-25 Martin Liska <mliska@suse.cz>
1350
1351 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1352 integers and not by a float value.
1353
1354 2018-09-25 Martin Liska <mliska@suse.cz>
1355
1356 PR fortran/87394
1357 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1358 instead of NULL.
1359 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1360 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1361 * godump.c (go_format_type): Remove extra parenthesis.
1362
1363 2018-09-25 Martin Liska <mliska@suse.cz>
1364
1365 * alias.c (set_dest_equal_p): Remove unused function.
1366 * config/i386/i386.c (def_builtin_pure2): Likewise.
1367 * diagnostic-show-locus.c (class layout): Remove
1368 unused field.
1369 (layout::layout): Likewise here.
1370 * dump-context.h (class temp_dump_context): Likewise.
1371 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1372 (add_AT_loclistsptr): Likewise.
1373 (add_AT_offset): Likewise.
1374 (get_AT_hi_pc): Likewise.
1375 (is_comdat_die): Likewise.
1376 (type_is_enum): Likewise.
1377 (ceiling): Likewise.
1378 (add_AT_vms_delta): Likewise.
1379 (is_class_die): Likewise.
1380 * edit-context.c (class line_event): Remove unused field.
1381 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1382 unused function.
1383 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1384 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1385 (ok_for_base_p_nonstrict): Likewise.
1386 * tree-chrec.c (is_not_constant_evolution): Likewise.
1387 (chrec_fold_poly_cst): Likewise.
1388 * tree-if-conv.c (has_pred_critical_p): Likewise.
1389 * tree-ssa-coalesce.c (print_exprs): Likewise.
1390 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1391 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1392 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1393 (value_range_nonnegative_p): Likewise.
1394
1395 2018-09-25 Martin Liska <mliska@suse.cz>
1396
1397 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1398 Do not handle "GNU Pascal".
1399 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1400 Likewise.
1401 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1402 from documentation. Likewise.
1403 * dbxout.c (dbxout_range_type): Likewise.
1404 * doc/cpp.texi: Likewise.
1405 * doc/extend.texi: Likewise.
1406 * doc/frontends.texi: Likewise.
1407 * doc/invoke.texi: Remove Pascal entry.
1408 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1409 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1410
1411 2018-09-25 Martin Liska <mliska@suse.cz>
1412
1413 PR middle-end/86078
1414 * doc/invoke.texi: Document all parameters and remove default
1415 of the parameters.
1416
1417 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1418
1419 PR bootstrap/87417
1420 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1421 contains HOST_WIDE_INTs when computing its size.
1422
1423 2018-09-24 Jim Wilson <jimw@sifive.com>
1424
1425 PR target/87391
1426 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1427 not TARGET_RVE.
1428 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1429
1430 2018-09-24 Andrew Pinski <apinski@marvell.com>
1431
1432 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1433 access prev before checking it for NULLness in the
1434 AARCH64_FUSE_CMP_BRANCH case.
1435
1436 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1437
1438 PR target/82699
1439 * config/i386/i386.c (rest_of_insert_endbranch): Set
1440 endbr_queued_at_entrance to true and don't insert ENDBR if
1441 x86_function_profiler will be called.
1442 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1443 is true.
1444 * config/i386/i386.h (machine_function): Add
1445 endbr_queued_at_entrance.
1446
1447 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1448
1449 * genattrtab.c (mk_attr_alt): Use alternative_mask.
1450 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1451 types.
1452 (check_attr_test): Use alternative_mask.
1453 (get_attr_value): Likewise.
1454 (compute_alternative_mask): Use alternative_mask and XWINT.
1455 (make_alternative_compare): Use alternative_mask.
1456 (attr_alt_subset_p): Use XWINT.
1457 (attr_alt_subset_of_compl_p): Likewise.
1458 (attr_alt_intersection): Use alternative_mask and XWINT.
1459 (attr_alt_union): Likewise.
1460 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1461 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1462 (simplify_test_exp): Use alternative_mask and XWINT.
1463 (write_test_expr): Use alternative_mask and XWINT, adjust bit
1464 number calculation to support 64 bits. Generate code that
1465 checks 64-bit masks.
1466 (main): Use alternative_mask.
1467 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1468
1469 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1470
1471 PR target/80080
1472 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1473 RETURN+USE when returning via %r14.
1474
1475 2018-09-24 Martin Liska <mliska@suse.cz>
1476
1477 * gcov.c (output_lines): Print colorization legend
1478 for both flag_use_colors and flag_use_hotness_colors.
1479 Reword the help.
1480
1481 2018-09-24 Martin Liska <mliska@suse.cz>
1482
1483 * coverage.c (get_coverage_counts): Use warning_at
1484 with current_function_decl location. Use %qD in warning
1485 message.
1486
1487 2018-09-24 Martin Liska <mliska@suse.cz>
1488
1489 * memory-block.h (memory_block_pool::release): Annotate with
1490 valgrind that the memory is not accessible.
1491
1492 2018-09-24 Martin Liska <mliska@suse.cz>
1493
1494 PR sanitizer/85774
1495 * asan.c: Make asan_handled_variables extern.
1496 * asan.h: Likewise.
1497 * cfgexpand.c (expand_stack_vars): Make sure
1498 a representative is unpoison if another
1499 variable in the partition is handled by
1500 use-after-scope sanitization.
1501
1502 2018-09-24 Richard Biener <rguenther@suse.de>
1503
1504 PR tree-optimization/63155
1505 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1506 the worklist when the edge of the respective argument isn't
1507 executable.
1508
1509 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1510
1511 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1512 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1513 (MASK_CLASS_P): Update for rename.
1514 (MAYBE_MASK_CLASS_P): Ditto.
1515 (REG_CLASS_NAMES): Update.
1516 (REG_CLASS_CONTENT): Update.
1517 * config/i386/i386.c (regclass_map): Update for MASK_REG
1518 and ALL_MASK_REGS rename.
1519 * config/i386/constraints.md (Yk): Update for rename.
1520 (k): Ditto.
1521
1522 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1523
1524 * config/i386/i386.h (enum reg_class): Remove
1525 EVEX_SSE_REGS and MOD4_SSE_REGS.
1526 (REG_CLASS_NAMES): Update.
1527 (REG_CLASS_CONTENT): Update.
1528 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1529 registers as ALL_SSE_REGS.
1530 (ix86_additional_allocno_class_p): Remove.
1531 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1532 (ix86_register_priority): Lower priority of EVEX SSE registers.
1533 Use IN_RANGE macro where appropriate.
1534 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1535 AVX-5124VNNIW checks.
1536 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1537 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1538 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1539 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1540 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1541 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1542 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1543 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1544 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1545 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1546 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1547 * config/i386/constraints.md (Yh): Remove.
1548
1549 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1550
1551 * config/i386/i386.c (regclass_map): Declare integer REX registers
1552 as GENERAL_REGS.
1553
1554 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
1555
1556 * doc/service.texi (Service): Switch the fsf.org link to https.
1557
1558 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
1559
1560 PR target/86798
1561 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1562 Define to speculation_safe_value_not_needed.
1563
1564 2018-09-21 Florian Weimer <fweimer@redhat.com>
1565
1566 PR middle-end/81035
1567 * doc/extend.texi (Common Function Attributes): Mention that
1568 noreturn suppresses tail call optimization.
1569
1570 2018-09-21 Jeff Law <law@redhat.com>
1571
1572 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1573 vr_values::cleanup_edges_and_switches.
1574 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1575 vr_values class.
1576 (identify_jump_threads): Remove EDGE_IGNORE handling.
1577 (execute_vrp): Move handling of to_remove_edges and
1578 to_update_switch_stmts into vr_values class member functions.
1579 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1580 (to_update_switch_stmts): Likewise.
1581 * vr-values.c: Include cfghooks.h.
1582 (vr_values::vr_values): Initialize to_remove_edges and
1583 to_update_switch_stmts.
1584 (vr_values::~vr_values): Verify to_remove_edges and
1585 to_update_switch_stmts are empty.
1586 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1587 (vr_values::cleanup_edges_and_switches): New member function.
1588 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1589 function. Add new data members.
1590
1591 2018-09-21 David Malcolm <dmalcolm@redhat.com>
1592
1593 PR tree-optimization/87309
1594 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1595 calls with pflags and alt_flags.
1596 (selftest::test_capture_of_dump_calls): Add test of interaction of
1597 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1598
1599 2018-09-21 Olivier Hainque <hainque@adacore.com>
1600
1601 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1602
1603 2018-09-21 Olivier Hainque <hainque@adacore.com>
1604
1605 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1606
1607 2018-09-21 Olivier Hainque <hainque@adacore.com>
1608
1609 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1610 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1611 (VXWORKS_LIBS_RTP): Minor reordering.
1612
1613 2018-09-21 Olivier Hainque <hainque@adacore.com>
1614
1615 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1616 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1617
1618 2018-09-21 Olivier Hainque <hainque@adacore.com>
1619
1620 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1621 (PTRDIFF_TYPE): Likewise.
1622
1623 2018-09-21 Olivier Hainque <hainque@adacore.com>
1624
1625 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1626 triplet, similar to support for VxWorks7.
1627 * config/vxworks-dummy.h: Provide a default definition
1628 of TARGET_VXWORKS64 to 0.
1629
1630 2018-09-21 Olivier Hainque <hainque@adacore.com>
1631
1632 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1633 * config/vxworks-dummy.h: here.
1634
1635 2018-09-21 Olivier Hainque <hainque@adacore.com>
1636
1637 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1638
1639 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
1640 Bo Zhou <zbo.zhou@hisilicon.com>
1641
1642 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1643 * config/aarch64/aarch64-tune.md: Regenerated.
1644 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1645 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1646 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1647
1648 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
1649 Julian Brown <julian@codesourcery.com>
1650
1651 * builtins.c (get_builtin_sync_mem): Handle address spaces.
1652
1653 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1654
1655 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1656 if the call takes a static chain.
1657
1658 2018-09-21 Martin Liska <mliska@suse.cz>
1659
1660 * auto-profile.c (autofdo_source_profile::read): Do not
1661 set sum_all.
1662 (read_profile): Do not add working sets.
1663 (read_autofdo_file): Remove sum_all.
1664 (afdo_callsite_hot_enough_for_early_inline): Remove const
1665 qualifier.
1666 * coverage.c (struct counts_entry): Remove gcov_summary.
1667 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1668 do not support GCOV_TAG_PROGRAM_SUMMARY.
1669 (get_coverage_counts): Remove summary and expected
1670 arguments.
1671 * coverage.h (get_coverage_counts): Likewise.
1672 * doc/gcov-dump.texi: Remove -w option.
1673 * gcov-dump.c (dump_working_sets): Remove.
1674 (main): Do not support '-w' option.
1675 (print_usage): Likewise.
1676 (tag_summary): Likewise.
1677 * gcov-io.c (gcov_write_summary): Do not dump
1678 histogram.
1679 (gcov_read_summary): Likewise.
1680 (gcov_histo_index): Remove.
1681 (gcov_histogram_merge): Likewise.
1682 (compute_working_sets): Likewise.
1683 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1684 it not obsolete.
1685 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1686 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1687 (GCOV_HISTOGRAM_SIZE): Remove.
1688 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1689 (struct gcov_summary): Simplify rapidly just
1690 to runs and sum_max fields.
1691 (gcov_histo_index): Remove.
1692 (NUM_GCOV_WORKING_SETS): Likewise.
1693 (compute_working_sets): Likewise.
1694 * gcov-tool.c (print_overlap_usage_message): Remove
1695 trailing empty line.
1696 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1697 (output_lines): Remove program related line.
1698 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1699 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1700 histogram.
1701 (input_profile_summary): Do not read it.
1702 (merge_profile_summaries): And do not merge it.
1703 (input_symtab): Do not call removed function.
1704 * modulo-sched.c (sms_schedule): Do not print sum_max.
1705 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1706 removed when histogram method was invented.
1707 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1708 mode.
1709 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1710 GCOV coding style.
1711 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1712 and dump selected value.
1713 * profile.c (add_working_set): Remove.
1714 (get_working_sets): Likewise.
1715 (find_working_set): Likewise.
1716 (get_exec_counts): Do not work with working sets.
1717 (read_profile_edge_counts): Do not inform as sum_max is removed.
1718 (compute_branch_probabilities): Likewise.
1719 (compute_value_histograms): Remove argument for call of
1720 get_coverage_counts.
1721 * profile.h: Do not make gcov_summary const.
1722
1723 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
1724
1725 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1726
1727 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1728
1729 PR tree-optimization/86990
1730 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1731 Check that the entire merged store group is made of constants only for
1732 overlapping stores.
1733
1734 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
1735
1736 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1737 (VTABLE_VERIFICATION_SPEC): Likewise.
1738 (SANITIZER_EARLY_SPEC): Likewise.
1739 (SANITIZER_SPEC): Likewise.
1740 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1741 * doc/invoke.texi (Link Options): Document -r.
1742
1743 2018-09-20 Richard Biener <rguenther@suse.de>
1744
1745 PR middle-end/87054
1746 * gimplify.c (gimplify_expr): Retain alignment of
1747 addressable lvalue in dereference.
1748
1749 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
1750
1751 PR bootstrap/87013
1752 * configure.ac: Check for .loc is_stmt support.
1753 * configure, config.in: Rebuilt.
1754 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1755 if not supported.
1756
1757 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
1758
1759 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1760 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1761 -misel=no.
1762
1763 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
1764
1765 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1766 VECTOR_OTHER.
1767 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1768 case VECTOR_OTHER.
1769
1770 2018-09-20 Marek Polacek <polacek@redhat.com>
1771
1772 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1773
1774 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
1775
1776 PR tree-optimization/87288
1777 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1778 into account when determining PEELING_FOR_NITERS.
1779
1780 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
1781
1782 PR tree-optimization/86877
1783 * tree-vect-loop.c (vect_analyze_loop_2): Call
1784 vect_verify_datarefs_alignment.
1785
1786 2018-09-19 Marek Polacek <polacek@redhat.com>
1787
1788 * doc/invoke.texi: Document -Wclass-conversion.
1789
1790 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
1791
1792 * config/pa/pa.c (pa_adjust_priority): Delete.
1793 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
1794
1795 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
1796 (atomic_storehi): Likewise.
1797 (atomic_storesi): Likewise.
1798 (atomic_loaddi): Restore compare and swap exchange loop code.
1799
1800 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
1801
1802 PR rtl-optimization/86902
1803 * combine.c (try_combine): When changing the CC mode used, don't change
1804 an unrelated mode in other_insn to that new CC mode.
1805
1806 2018-09-19 David Malcolm <dmalcolm@redhat.com>
1807
1808 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
1809 with %T in place of calls to dump_generic_expr.
1810 (prune_runtime_alias_test_list): Likewise.
1811 (create_runtime_alias_checks): Likewise.
1812 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
1813 (vect_analyze_data_ref_dependence): Likewise.
1814 (vect_slp_analyze_data_ref_dependence): Likewise.
1815 (vect_record_base_alignment): Likewise. Use %G in place of call
1816 to dump_gimple_stmt.
1817 (vect_compute_data_ref_alignment): Likewise.
1818 (verify_data_ref_alignment): Likewise.
1819 (vect_find_same_alignment_drs): Likewise.
1820 (vect_analyze_group_access_1): Likewise.
1821 (vect_analyze_data_ref_accesses): Likewise.
1822 (dependence_distance_ge_vf): Likewise.
1823 (dump_lower_bound): Likewise.
1824 (vect_prune_runtime_alias_test_list): Likewise.
1825 (vect_find_stmt_data_reference): Likewise.
1826 (vect_analyze_data_refs): Likewise.
1827 (vect_create_addr_base_for_vector_ref): Likewise.
1828 (vect_create_data_ref_ptr): Likewise.
1829 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
1830 (vect_can_advance_ivs_p): Likewise.
1831 (vect_update_ivs_after_vectorizer): Likewise.
1832 (vect_gen_prolog_loop_niters): Likewise.
1833 (vect_prepare_for_masked_peels): Likewise.
1834 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1835 (vect_determine_vectorization_factor): Likewise.
1836 (vect_is_simple_iv_evolution): Likewise.
1837 (vect_analyze_scalar_cycles_1): Likewise.
1838 (vect_analyze_loop_operations): Likewise.
1839 (report_vect_op): Likewise.
1840 (vect_is_slp_reduction): Likewise.
1841 (check_reduction_path): Likewise.
1842 (vect_is_simple_reduction): Likewise.
1843 (vect_create_epilog_for_reduction): Likewise.
1844 (vect_finalize_reduction:): Likewise.
1845 (vectorizable_induction): Likewise.
1846 (vect_transform_loop_stmt): Likewise.
1847 (vect_transform_loop): Likewise.
1848 (optimize_mask_stores): Likewise.
1849 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
1850 (vect_split_statement): Likewise.
1851 (vect_recog_over_widening_pattern): Likewise.
1852 (vect_recog_average_pattern): Likewise.
1853 (vect_determine_min_output_precision_1): Likewise.
1854 (vect_determine_precisions_from_range): Likewise.
1855 (vect_determine_precisions_from_users): Likewise.
1856 (vect_mark_pattern_stmts): Likewise.
1857 (vect_pattern_recog_1): Likewise.
1858 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1859 (vect_record_max_nunits): Likewise.
1860 (vect_build_slp_tree_1): Likewise.
1861 (vect_build_slp_tree_2): Likewise.
1862 (vect_print_slp_tree): Likewise.
1863 (vect_analyze_slp_instance): Likewise.
1864 (vect_detect_hybrid_slp_stmts): Likewise.
1865 (vect_detect_hybrid_slp_1): Likewise.
1866 (vect_slp_analyze_operations): Likewise.
1867 (vect_slp_analyze_bb_1): Likewise.
1868 (vect_transform_slp_perm_load): Likewise.
1869 (vect_schedule_slp_instance): Likewise.
1870 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1871 (vect_mark_stmts_to_be_vectorized): Likewise.
1872 (vect_init_vector_1): Likewise.
1873 (vect_get_vec_def_for_operand): Likewise.
1874 (vect_finish_stmt_generation_1): Likewise.
1875 (vect_check_load_store_mask): Likewise.
1876 (vectorizable_call): Likewise.
1877 (vectorizable_conversion): Likewise.
1878 (vectorizable_operation): Likewise.
1879 (vectorizable_load): Likewise.
1880 (vect_analyze_stmt): Likewise.
1881 (vect_is_simple_use): Likewise.
1882 (vect_get_vector_types_for_stmt): Likewise.
1883 (vect_get_mask_type_for_stmt): Likewise.
1884 * tree-vectorizer.c (increase_alignment): Likewise.
1885
1886 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
1887
1888 * doc/rtl.texi: Adjust vec_select description.
1889 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
1890 non-constant selectors.
1891
1892 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
1893
1894 * config/aarch64/aarch64-protos.h
1895 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
1896 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
1897 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
1898 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
1899 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
1900 (AARCH64_FL_PROFILE): Move index so flags are ordered.
1901 (AARCH64_ISA_RCPC8_4): New flag.
1902 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
1903 to aarch64_offset_9bit_signed_unscaled_p.
1904 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
1905 and use stlur.
1906 * config/aarch64/constraints.md (Ust): New constraint.
1907 * config/aarch64/predicates.md.
1908 (aarch64_9bit_offset_memory_operand): New predicate.
1909 (aarch64_rcpc_memory_operand): New predicate.
1910
1911 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
1912
1913 PR rtl-optimization/87361
1914 * rtlanal.c (nonzero_bits1): Revert accidental change.
1915
1916 2018-09-19 Richard Biener <rguenther@suse.de>
1917
1918 PR tree-optimization/87349
1919 PR tree-optimization/87342
1920 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
1921
1922 2018-09-18 Marek Polacek <polacek@redhat.com>
1923
1924 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
1925 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
1926
1927 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
1928
1929 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
1930
1931 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
1932
1933 PR rtl-optimization/86882
1934 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
1935
1936 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
1937
1938 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
1939 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
1940
1941 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
1942
1943 PR other/87353
1944 * doc/invoke.texi (Link Options): Fix formatting and grammar.
1945
1946 2018-09-18 Richard Biener <rguenther@suse.de>
1947
1948 PR middle-end/63155
1949 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
1950 (compute_samebase_partition_bases): Likewise.
1951 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
1952 (gimple_can_coalesce_p): Simplify.
1953
1954 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
1955
1956 Handle a library implementation of ffs calling __builtin_ffs.
1957 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
1958 (mmix_init_libfuncs): New function: make __builtin_ffs expand
1959 to __ffsdi2.
1960
1961 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1962
1963 * diagnostic-show-locus.c (class layout_range): Add field
1964 "m_original_idx".
1965 (layout_range::layout_range): Add "original_idx" param and use it
1966 to initialize new field.
1967 (make_range): Use 0 for original_idx.
1968 (layout::layout): Pass in index to calls to
1969 maybe_add_location_range.
1970 (layout::maybe_add_location_range): Add param "original_idx" and
1971 pass it on to layout_range.
1972 (layout::print_any_labels): Pass on range->m_original_idx to
1973 get_text call.
1974 (gcc_rich_location::add_location_if_nearby): Use 0 for
1975 original_idx.
1976 * gcc-rich-location.h (text_range_label::get_text): Update for new
1977 param.
1978 (range_label_for_type_mismatch::get_text): Likewise.
1979
1980 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
1981
1982 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
1983
1984 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1985
1986 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
1987 format_string_diagnostic_t.
1988 (fmtwarn_n): Likewise.
1989 * substring-locations.c
1990 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
1991 (format_warning_n_va): Convert to...
1992 (format_string_diagnostic_t::emit_warning_n_va): ...this.
1993 (format_warning_va): Convert to...
1994 (format_string_diagnostic_t::emit_warning_va): ...this.
1995 (format_warning_at_substring): Convert to...
1996 (format_string_diagnostic_t::emit_warning): ...this.
1997 (format_warning_at_substring_n): Convert to...
1998 (format_string_diagnostic_t::emit_warning_n): ...this.
1999 * substring-locations.h (class format_string_diagnostic_t): New
2000 class.
2001 (format_warning_va): Convert to
2002 format_string_diagnostic_t::emit_warning_va.
2003 (format_warning_n_va): Convert to
2004 format_string_diagnostic_t::emit_warning_n_va.
2005 (format_warning_at_substring): Convert to
2006 format_string_diagnostic_t::emit_warning.
2007 (format_warning_at_substring_n): Convert to
2008 format_string_diagnostic_t::emit_warning_n.
2009
2010 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2011 Bernd Schmidt <bernds_cb1@t-online.de>
2012
2013 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2014 SImode args.
2015
2016 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2017
2018 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2019 operand 0 predicate to nonimmediate operand.
2020 (rint<mode>2_frndint): Remove insn pattern.
2021 (rint<mode>2): Change operand 1 predicate to general_operand.
2022 Extend operand 1 to XFmode and generate rintxf2 insn.
2023 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2024 Do not use X87MODEF mode macro.
2025 (frndintxf2_<rounding>_i387): Rename from
2026 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2027 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2028 to XFmode and generate significandxf3 insn.
2029
2030 2018-09-17 Richard Biener <rguenther@suse.de>
2031
2032 PR tree-optimization/87328
2033 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2034 visiting unexecutable backedges when not iterating.
2035 (do_rpo_vn): Mark all edges not executable even when not
2036 iterating.
2037
2038 2018-09-17 Martin Jambor <mjambor@suse.cz>
2039
2040 PR c/63886
2041 * doc/invoke.texi (Warning Options): Likewise.
2042
2043 2018-09-17 Richard Biener <rguenther@suse.de>
2044
2045 PR tree-optimization/87301
2046 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2047 clean EH info from leftover copy assignments.
2048
2049 2018-09-17 Martin Liska <mliska@suse.cz>
2050
2051 PR gcov-profile/85871
2052 * gcov.c (output_intermediate_file): Fix out of bounds
2053 access.
2054
2055 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2056
2057 * config/arc/arc.c: Object attributes for core4 not reflected
2058 correctly.
2059 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2060 core3).
2061
2062 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2063
2064 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2065
2066 2018-09-17 Martin Liska <mliska@suse.cz>
2067
2068 * doc/gcov.texi: Document new option --use-hotness-colors.
2069 * gcov.c (struct source_info): Declare new field.
2070 (source_info::source_info): Set default for maximum_count.
2071 (print_usage): Add new -q option.
2072 (process_args): Process it.
2073 (accumulate_line_info): Save src->maximum_count.
2074 (output_line_beginning): Make color line number if
2075 flag_use_hotness_colors is set.
2076 (output_line_details): Pass default argument value.
2077 (output_lines): Pass src->maximum_count.
2078
2079 2018-09-17 Martin Liska <mliska@suse.cz>
2080
2081 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2082 Use processor_names table.
2083 * config/i386/i386.c (ix86_default_align): Use
2084 processor_cost_table for alignment values.
2085 (ix86_option_override_internal): Use processor_names.
2086 (ix86_function_specific_print): Likewise.
2087 * config/i386/i386.h (struct processor_costs):
2088 Add alignment values.
2089 (struct ptt): Remove and replace with const char *.
2090 * config/i386/x86-tune-costs.h (struct processor_costs):
2091 Declare default alignments for all costs.
2092
2093 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2094
2095 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2096 symbolics or VR_VARYING ranges for ABS_EXPR.
2097 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2098 when range will wrap.
2099
2100 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2101
2102 PR middle-end/86864
2103 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2104 before and after a JUMP_TABLE_DATA.
2105
2106 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2107
2108 PR middle-end/87188
2109 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2110 when one operand is a function pointer. Use POINTER_TYPE_P and
2111 FUNC_OR_METHOD_TYPE_P.
2112 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2113 * fold-const.c (build_range_check): Likewise.
2114 * match.pd (simple_comparison): Likewise.
2115
2116 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2117
2118 PR c/82967
2119 * spellcheck.c (get_edit_distance_cutoff): New function.
2120 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2121 (selftest::test_get_edit_distance_one_way): ...this.
2122 (selftest::test_get_edit_distance_unit): Rename to...
2123 (selftest::test_get_edit_distance_both_ways): ...this.
2124 (selftest::test_edit_distances): Move tests to this new function,
2125 and test some more pairs of strings. Update for above renaming.
2126 (selftest::get_old_cutoff): New function.
2127 (selftest::test_get_edit_distance_cutoff): New function.
2128 (selftest::assert_suggested_for): New function.
2129 (ASSERT_SUGGESTED_FOR): New macro.
2130 (selftest::assert_not_suggested_for): New function.
2131 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2132 (selftest::test_suggestions): New function.
2133 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2134 tests to selftest::test_edit_distances and call it. Add calls to
2135 selftest::test_get_edit_distance_cutoff and
2136 selftest::test_suggestions.
2137 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2138 (best_match::consider): Replace hard-coded cutoff calculation with
2139 a call to...
2140 (best_match::get_cutoff): New declaration.
2141 (best_match::get_best_meaningful_candidate): Likewise.
2142
2143 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2144
2145 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2146
2147 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2148
2149 revert:
2150 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2151
2152 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2153 terminated string literal.
2154
2155 2018-09-14 Martin Sebor <msebor@redhat.com>
2156
2157 * builtins.c (unterminated_array): Handle ARRAY_REF.
2158 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2159 * builtins.h (unterminated_array): Declare extern.
2160 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2161 arrays.
2162 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2163 calls.
2164
2165 2018-09-14 Martin Sebor <msebor@redhat.com>
2166 Jeff Law <law@redhat.com>
2167
2168 * builtins.c (unterminated_array): New.
2169 (expand_builtin_strcpy): Adjust.
2170 (expand_builtin_strcpy_args): Detect unterminated arrays.
2171 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2172 unterminated arrays.
2173 * gimple-fold.h (get_maxval_strlen): Add argument.
2174 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2175
2176 * gimple-fold.c (get_range_strlen): Add argument.
2177 (get_maxval_strlen): Adjust.
2178 * gimple-fold.h (get_range_strlen): Add argument.
2179
2180 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2181
2182 * config/i386/movdirintrin.h: Fix copyright year.
2183
2184 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2185
2186 * reg-stack.c: Include regs.h.
2187 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2188 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2189 FIRST_STACK_REG, not DFmode.
2190 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2191 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2192 (change stack): Default register mode to the reg_raw_mode of
2193 FIRST_STACK_REG, not DFmode.
2194 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2195 (*swapxf): Rename from swapxf.
2196
2197 2018-09-14 Carl Love <cel@us.ibm.com>
2198
2199 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2200 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2201
2202 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2203
2204 PR target/87224
2205 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2206 alternatives.
2207
2208 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2209
2210 PR target/85628
2211 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2212
2213 2018-09-14 Jason Merrill <jason@redhat.com>
2214
2215 Fix --enable-gather-detailed-mem-stats.
2216 * hash-table.c (hash_table_usage): Change from variable to function.
2217 * hash-table.h: Adjust.
2218 * Makefile.in: Add missing dependencies on hash-table.h.
2219
2220 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2221
2222 PR tree-optimization/87259
2223 PR lto/87283
2224 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2225 execute_cse_reciprocals_1 has tried transforming.
2226
2227 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2228
2229 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2230 VR_VARYING for PLUS/MINUS_EXPR.
2231
2232 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2233
2234 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2235 formatting.
2236
2237 2018-09-14 Richard Biener <rguenther@suse.de>
2238
2239 PR middle-end/63155
2240 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2241 bits for the merged partition.
2242
2243 2018-09-13 Martin Sebor <msebor@redhat.com>
2244 Bernd Edlinger <bernd.edlinger@hotmail.de>
2245
2246 * builtins.h (c_srlen): Add argument.
2247 * builtins.c (warn_string_no_nul): New function.
2248 (c_strlen): Add argument and use it. Update recursive calls.
2249 Pass DECL argument to string_constant to get info on non
2250 terminated strings. Update *NONSTR as needed.
2251 (fold_builtin_strlen): Add argument to calls to c_strlen.
2252 Warn for unterminated arrays.
2253 (warn_string_no_null): Add prototype.
2254 * expr.c (string_constant): Update arguments. Update recursive
2255 calls appropriately. Detect missing NUL terminator and outermost
2256 declaration its missing in.
2257 Improve checks for arrays with nonzero lower bound or elements
2258 that are not a single byte. Simplify offset computation.
2259 Simplify checks for non-NUL terminated strings.
2260 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2261 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2262
2263 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2264
2265 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2266 correctly.
2267 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2268 argument. Fix range checks.
2269 * fold-const.h (c_getstr): Adjust protoype.
2270 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2271 string is constant but contains no NUL byte.
2272
2273 * expr.c (string_constant): Adjust function comment.
2274 Remove bogus check for zero termination.
2275
2276 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2277
2278 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2279 (get_constant_size): Don't make STRING_CSTs larger than they are.
2280 (check_string_literal): New check function for STRING_CSTs.
2281 (output_constant): Use it.
2282
2283 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2284
2285 PR target/86812
2286 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2287
2288 2018-09-13 Richard Biener <rguenther@suse.de>
2289
2290 PR tree-optimization/87263
2291 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2292 (struct unwind_state): Add max_rpo field.
2293 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2294 Compute max_rpo, the max RPO number a block can be backwards reached
2295 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2296 separating it from the iterating mode.
2297
2298 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2299
2300 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2301 (rfs_decision): New scheduling decision.
2302
2303 2018-09-13 Richard Biener <rguenther@suse.de>
2304
2305 PR bootstrap/87134
2306 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2307 (vn_nary_op_insert_pieces_predicated): Do not write useless
2308 valid_dominated_by_p entry outside of the allocated storage.
2309
2310 2018-09-13 Omar Sandoval <osandov@osandov.com>
2311 Tom de Vries <tdevries@suse.de>
2312
2313 PR debug/86985
2314 * dwarf2out.c (is_c): New function.
2315 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2316
2317 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2318
2319 PR target/85628
2320 * config/aarch64/aarch64.md (*aarch64_bfxil):
2321 Define.
2322 * config/aarch64/constraints.md (Ulc): Define.
2323 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2324 Define.
2325 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2326 New function.
2327
2328 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2329
2330 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2331 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2332 aarch64_layout_frame call.
2333 (aarch64_expand_epilogue): Likewise.
2334 (aarch64_initial_elimination_offset): Likewise.
2335 (aarch64_get_separate_components): Likewise.
2336 (aarch64_use_return_insn_p): Likewise.
2337 (aarch64_layout_frame): Remove unneeded check.
2338
2339 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2340
2341 * configure.ac: Only append
2342 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2343 gcc_config_arguments if it was never reconfigured or last reconfigure
2344 was with different arguments.
2345 * configure: Regenerated.
2346
2347 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2348 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2349
2350 PR middle-end/87290
2351 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2352 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2353
2354 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2355
2356 PR tree-optimization/87287
2357 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2358 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2359 * match.pd (X % C == 0): ... here. New optimization.
2360
2361 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2362
2363 PR middle-end/82853
2364 * expr.h (maybe_optimize_mod_cmp): Declare.
2365 * expr.c (mod_inv): New function.
2366 (maybe_optimize_mod_cmp): New function.
2367 (do_store_flag): Use it.
2368 * cfgexpand.c (expand_gimple_cond): Likewise.
2369
2370 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2371 Julian Brown <julian@codesourcery.com>
2372
2373 PR middle-end/86336
2374 * gimplify.c (gimplify_scan_omp_clauses): Set
2375 target_firstprivatize_array_bases in OpenACC parallel and kernels
2376 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2377 OpenACC data regions.
2378
2379 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2380
2381 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2382 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2383
2384 2018-09-12 Richard Biener <rguenther@suse.de>
2385
2386 PR tree-optimization/87280
2387 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2388 edge but unreachable target.
2389 (do_rpo_vn): For conservatively handling a PHI only mark
2390 the backedge executable but not the block reachable.
2391
2392 2018-09-12 Richard Biener <rguenther@suse.de>
2393
2394 PR tree-optimization/87266
2395 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2396 visited blocks.
2397
2398 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2399
2400 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2401 constants.
2402 ("trunc<BFP:mode><DFP_ALL:mode>2")
2403 ("trunc<DFP_ALL:mode><BFP:mode>2")
2404 ("extend<BFP:mode><DFP_ALL:mode>2")
2405 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2406 according to the target operand type.
2407
2408 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2409 Andreas Krebbel <krebbel@linux.ibm.com>
2410
2411 PR tree-optimization/86844
2412 * gimple-ssa-store-merging.c
2413 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2414 there are any overlapping stores in between them, make sure they are
2415 also coalesced or we give up completely.
2416
2417 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2418
2419 PR middle-end/87248
2420 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2421 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2422
2423 2018-09-12 Tom de Vries <tdevries@suse.de>
2424
2425 * common.opt (gdescribe-dies): Add option.
2426 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2427 attribute for artifical and nameless decls.
2428 (dwarf2out_register_external_die): Add description attribute to
2429 external reference die.
2430 (add_desc_attribute): New functions.
2431 (gen_subprogram_die): Add description attribute to
2432 DW_TAG_call_site_parameter.
2433 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2434 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2435 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2436 -gno-describe-dies.
2437 (@item -gdescribe-dies): Add.
2438
2439 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2440
2441 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2442 (extract_range_from_binary_expr_1: Call
2443 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2444 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2445 depend on sign.
2446
2447 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2448
2449 * gimple-ssa-warn-alloca.c
2450 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2451 field for ALLOCA_BOUND_*_LARGE.
2452
2453 2018-09-11 Nathan Sidwell <nathan@acm.org>
2454
2455 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2456
2457 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2458
2459 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2460 for clobbers. Remove obsolete comment.
2461
2462 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2463
2464 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2465 mpxchk, mpxld and mpxst types.
2466 (define_attr length_immediate): Remove all processing of mpx types.
2467 (define_attr prefix_0f): Ditto.
2468 (define_attr memory): Ditto.
2469
2470 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2471
2472 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2473 (log<mode>2): Change operand 1 predicate to general_operand.
2474 Extend operand 1 to XFmode and generate logxf3 insn.
2475 (log10<mode>2): Change operand 1 predicate to general_operand.
2476 Extend operand 1 to XFmode and generate log10xf3 insn.
2477 (log2<mode>2): Change operand 1 predicate to general_operand.
2478 Extend operand 1 to XFmode and generate log2xf3 insn.
2479 (fyl2xp1_extend<mode>xf3_i387): Remove.
2480 (log1p<mode>2): Change operand 1 predicate to general_operand.
2481 Extend operand 1 to XFmode and generate log1pxf3 insn.
2482 (fxtract_extend<mode>xf3_i387): Remove.
2483 (logb<mode>2): Change operand 1 predicate to general_operand.
2484 Extend operand 1 to XFmode and generate logbxf3 insn.
2485 (ilogb<mode>2): Change operand 1 predicate to general_operand.
2486 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2487 (significand<mode>2): Change operand 1 predicate to general_operand.
2488 Extend operand 1 to XFmode and generate significandxf3 insn.
2489
2490 2018-09-11 Nathan Sidwell <nathan@acm.org>
2491
2492 * gcc.c (perror_with_name, pfatal_with_name): Delete.
2493 (load_specs): Use fatal_error.
2494 (DELETE_IF_ORDINARY, process_command): Use error.
2495 (execute, run_attempt): Use fatal_error.
2496
2497 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
2498
2499 * diagnostic-core.h (sorry_at): New prototype.
2500 * diagnostic.c (sorry_at): New function.
2501
2502 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
2503
2504 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2505 by zero as VR_UNDEFINED.
2506
2507 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2508
2509 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2510 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2511 (<sincos>mode2): New expander.
2512 (sincos_extend<mode>xf3_i387): Remove insn pattern.
2513 (sincos -> sin, cos splitters): Remove splitter patterns.
2514 (sincos<mode>3): Change operand 2 predicate to general_operand.
2515 Extend operand 2 to XFmode and generate sincosxf3 insn.
2516 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2517 Change operand 3 predicate to const1_operand.
2518 (fptan_extend<mode>xf4_i387): Remove insn pattern.
2519 (tanxf2): Update operands in the call to fptanxf4_i387.
2520 (tan<mode>2): Change operand 1 predicate to general_operand.
2521 Extend operand 1 to XFmode and generate tanxf3 insn.
2522 (atan2xf3): Rename from *fpatanxf3_i387.
2523 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2524 (atan2xf3): Remove expander.
2525 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
2526 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2527 (atan<mode>2): Change operand 1 predicate to general_operand.
2528 Extend operand 1 to XFmode and generate atanxf3 insn.
2529
2530 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2531
2532 * config/i386/i386.md (x87/SSE constant load splitter): Use
2533 memory_operand instead of nonimmediate_operand for input operand
2534 predicate.
2535
2536 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
2537
2538 * config/i386/i386.md (float partial SSE register stall splitter): Move
2539 splitter near its instruction pattern.
2540 (float_extend partial SSE register stall splitter): Ditto.
2541 (float_truncate partial SSE register stall splitter): Ditto.
2542
2543 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2544
2545 PR target/86794
2546 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2547 to speculation_safe_value_not_needed.
2548
2549 PR target/85666
2550 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2551 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2552 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2553 leaf_function_p, instead use has_hard_reg_initial_val.
2554
2555 2018-09-09 Nathan Sidwell <nathan@acm.org>
2556
2557 * gcc.h (pfatal_with_name): Don't declare here.
2558 * gcc.c (pfatal_with_name): Make static.
2559
2560 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
2561
2562 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2563 earlyclobber.
2564
2565 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
2566
2567 PR rtl-optimization/85458
2568 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2569 priority hook to reduce the priority of EXPR.
2570
2571 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
2572
2573 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2574 DImode for x87 on 32bit targets. Conditionally disable x87 modes
2575 with X87_ENABLE_FLOAT. Remove preparation code.
2576 (*float<SWI48:mode><MODEF:mode>2): Rename from
2577 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
2578 math using "enabled" attribute.
2579 (*floatdi<MODEF:mode>2_i387): Rename from
2580 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
2581 enable for 32bit targets only.
2582 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2583 splitter.
2584 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2585 as operand 1 predicate. Rewrite as define_insn_and_split.
2586 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2587
2588 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2589
2590 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2591 to fallthru to FLOAT case.
2592
2593 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2594
2595 PR target/86731
2596 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2597 around folding of vec_sl to handle out of range shift values.
2598
2599 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2600
2601 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2602 Update callers to gen_fix_trunc<mode>_i387_fisttp
2603 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2604 nonimmediate_operand.
2605 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2606 and corresponding splitters.
2607 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2608 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2609 (fix_truncdi_i387_with_temp): Remove insn pattern
2610 and corresponding splitters.
2611 (fix_trunc<mode>_i387): Change operand 0 predicate to
2612 nonimmediate_operand.
2613 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2614 and corresponding splitters.
2615 (*fistdi2_1): Remove.
2616 (fistdi2): Ditto.
2617 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2618 (lrintxfdi2): Remove expander. Reimplement as define_insn.
2619 (*fist<mode>2_1): Remove.
2620 (fist<mode>2): Ditto.
2621 (fist<mode>2_with_temp): Remove insn pattern and corresponding
2622 splitters.
2623 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
2624 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2625 (fistdi2_<rounding>): Change operand 0 predicate to
2626 nonimmediate_operand.
2627 (fistdi2_<rounding>_with_temp): Remove insn pattern
2628 and corresponding splitters.
2629 (fist<mode>2_<rounding>): Change operand 0 predicate to
2630 nonimmediate_operand.
2631 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2632 and corresponding splitters.
2633
2634 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2635
2636 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2637
2638 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2639 the init value.
2640
2641 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2642
2643 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2644 early gimple folding of vec_splat().
2645 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2646 * gimple-fold.h: Add an extern define for tree_vec_extract().
2647
2648 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2649
2650 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2651 wrappers around TREE_TYPE comparisons.
2652
2653 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2654
2655 PR target/80080
2656 * config/s390/predicates.md: Add nonsym_memory_operand.
2657 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2658 contains a SYMBOL_REF, load it into an intermediate pseudo.
2659 (s390_emit_compare_and_swap): Legitimize operand.
2660 * config/s390/s390.md: Use the new nonsym_memory_operand
2661 with UNSPECV_CAS patterns.
2662
2663 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2664
2665 PR target/80080
2666 * config/s390/s390-passes.def: New file.
2667 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2668 declaration.
2669 (make_pass_s390_early_mach): Add declaration.
2670 * config/s390/s390.c (make_pass_s390_early_mach):
2671 (s390_option_override): Remove dynamic registration.
2672 * config/s390/t-s390: Add s390-passes.def.
2673
2674 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2675
2676 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2677 Remove UNSPEC_LTREL_BASE check.
2678 (annotate_constant_pool_refs): Likewise.
2679 (find_constant_pool_ref): Likewise.
2680 (find_ltrel_base): Removed.
2681 (replace_ltrel_base): Removed.
2682 (s390_mainpool_finish): Remove replace_ltrel_base call.
2683 (s390_chunkify_start): Remove pending LTREL_BASE logic.
2684 (s390_chunkify_finish): Remove replace_ltrel_base call.
2685 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2686
2687 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
2688
2689 PR target/86779
2690 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2691 to speculation_safe_value_not_needed.
2692
2693 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
2694 Bernd Schmidt <bernds_cb1@t-online.de>
2695
2696 * config/nvptx/nvptx-opts.h: New file.
2697 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2698 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2699 (ASM_SPEC): Define.
2700 (TARGET_SM35): New macro.
2701 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2702 correct predicate.
2703 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2704 values.
2705 (misa=): New option.
2706 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2707
2708 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
2709
2710 * config/i386/i386.md (truncdfsf2): Remove expander.
2711 (truncdfsf2_with_temp): Ditto.
2712 (truncxf<mode>2): Ditto.
2713 (*truncdfsf_fast_mixed): Remove insn pattern.
2714 (*truncdfsf_fast_i387): Ditto.
2715 (*truncdfsf_mixed): Ditto.
2716 (*truncdfsf_i387): Ditto.
2717 (*truncdfsf2_i387_1): Ditto.
2718 (*truncxfsf2_mixed): Ditto.
2719 (*truncxfdf2_mixed): Ditto.
2720 (*truncxf<mode>2_i387_noop): Ditto. Update callers
2721 to call gen_truncxf<mode>2 instead.
2722 (*truncxf<mode>2_i387): Remove.
2723 (reg->reg splitters): Remove splitter pattern.
2724 (reg->mem splitters): Ditto.
2725
2726 (truncdfsf2): New insn pattern.
2727 (truncxf<mode>2): Ditto.
2728
2729 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2730
2731 * tree-ssa-math-opts.c (is_mult_by): New function.
2732 (is_square_of): Use the above.
2733 (optimize_recip_sqrt): New function.
2734 (pass_cse_reciprocals::execute): Use the above.
2735
2736 2018-09-05 Richard Biener <rguenther@suse.de>
2737
2738 PR bootstrap/87134
2739 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2740 to zero-init the emplaced vec.
2741
2742 2018-09-05 Martin Liska <mliska@suse.cz>
2743
2744 PR tree-optimization/87205
2745 * tree-switch-conversion.c (pass_lower_switch::execute):
2746 Group cases for switch statements.
2747
2748 2018-09-05 Richard Biener <rguenther@suse.de>
2749
2750 PR tree-optimization/87217
2751 * tree-ssa-sccvn.c (vuse_valueize): New.
2752 (vn_reference_lookup_pieces): Use it.
2753 (vn_reference_lookup): Likewise.
2754
2755 2018-09-05 Nathan Sidwell <nathan@acm.org>
2756
2757 PR c++/87137
2758 * stor-layout.c (place_field): Scan forwards to check last
2759 bitfield when ms_bitfield_placement is in effect.
2760
2761 2018-09-05 Richard Biener <rguenther@suse.de>
2762
2763 PR bootstrap/87225
2764 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2765 return.
2766
2767 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
2768 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2769
2770 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2771 * config.gcc (extra_objs): Build it.
2772 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2773 Likewise.
2774 * config/aarch64/aarch64-passes.def
2775 (pass_tag_collision_avoidance): New pass.
2776 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2777 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2778 (aarch64_classify_address): Remove static qualifier.
2779 (aarch64_address_info, aarch64_address_type): Move to...
2780 * config/aarch64/aarch64-protos.h: ... here.
2781 (make_pass_tag_collision_avoidance): New function.
2782 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
2783 New tuning flag.
2784
2785 2018-09-05 Martin Liska <mliska@suse.cz>
2786
2787 * doc/gcov.texi: Update documentation of humar
2788 readable mode.
2789 * gcov.c (format_count): Print one decimal place, it provides
2790 more fine number of situations like '1G' vs. '1.4G'.
2791
2792 2018-09-05 Martin Liska <mliska@suse.cz>
2793
2794 PR target/87164
2795 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
2796 * optc-gen.awk: Allow 'Var' for Deprecated options in order
2797 to generate a MASK value.
2798
2799 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
2800
2801 PR debug/86593
2802 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
2803 if frame pointer isn't used.
2804 (compute_frame_pointer_to_fb_displacement): Likewise.
2805
2806 2018-09-04 Jakub Jelinek <jakub@redhat.com>
2807
2808 PR target/87198
2809 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
2810 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
2811 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
2812 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
2813 and OPTION_MASK_ISA_XSAVEC_UNSET.
2814
2815 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
2816
2817 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
2818 XOR operations in NAND case.
2819
2820 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
2821
2822 * wide-int-range.cc (wide_int_range_convert): New.
2823 * wide-int-range.h (wide_int_range_convert): New.
2824 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
2825 code into wide_int_range_convert.
2826 (extract_range_into_wide_ints): Do not munge anti range constants
2827 into the entire domain. Just return the range back.
2828
2829 2018-09-04 Martin Liska <mliska@suse.cz>
2830
2831 * genmatch.c (output_line_directive): Add new argument
2832 fnargs.
2833 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
2834
2835 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
2836
2837 * doc/invoke.texi (Option Summary): Add whitespace.
2838
2839 * doc/invoke.texi (Option Summary): Add -Waligned-new.
2840
2841 2018-09-04 Richard Biener <rguenther@suse.de>
2842
2843 PR tree-optimization/87211
2844 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
2845 backedge value we're supposed to treat as VARYING also number
2846 the PHI to VARYING in case it got a different value-number already.
2847
2848 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
2849
2850 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
2851 (extract_range_from_binary_expr_1): Do not call
2852 vrp_can_optimize_bit_op.
2853 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
2854 static.
2855 (wide_int_range_get_mask_and_bounds): New.
2856 (wide_int_range_optimize_bit_op): New.
2857 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
2858 (wide_int_range_bit_and): Same.
2859 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
2860 (wide_int_range_optimize_bit_op): New.
2861 (wide_int_range_get_mask_and_bounds): New.
2862
2863 2018-09-04 Richard Biener <rguenther@suse.de>
2864
2865 PR tree-optimization/87176
2866 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
2867 variable. When value-numbering a virtual PHI node make sure
2868 to not value-number to the backedge value.
2869
2870 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
2871
2872 * doc/extend.texi (Long Long, Hex Floats): Document support for
2873 long long and hex floats in more recent versions of ISO C++.
2874
2875 2018-09-03 Richard Biener <rguenther@suse.de>
2876
2877 PR tree-optimization/87177
2878 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
2879 cleanup.
2880
2881 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2882
2883 * bb-reorder.c (edge_order): Convert to C-qsort-style
2884 tri-state comparator.
2885 (reorder_basic_blocks_simple): Change std::stable_sort to
2886 gcc_stablesort.
2887
2888 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2889
2890 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
2891 tri-state comparator.
2892 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
2893
2894 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2895
2896 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
2897 (mergesort): ... here as maximum count for using netsort.
2898 (gcc_qsort): Set nlim to 3 if stable sort is requested.
2899 (gcc_stablesort): New.
2900 * system.h (gcc_stablesort): Declare.
2901
2902 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2903
2904 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
2905 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
2906 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
2907
2908 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
2909
2910 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
2911 lxsdx and stxsdx alternatives.
2912 (*mov<mode>_hardfloat64): Ditto.
2913 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
2914
2915 2018-09-03 Richard Biener <rguenther@suse.de>
2916
2917 PR tree-optimization/87200
2918 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
2919 simplify result.
2920
2921 2018-09-03 Martin Liska <mliska@suse.cz>
2922
2923 PR tree-optimization/87201
2924 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
2925 Fix parenthesis in an expression.
2926
2927 2018-09-03 Richard Biener <rguenther@suse.de>
2928
2929 PR tree-optimization/87197
2930 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
2931 visited. CSE the VN_INFO hashtable lookup.
2932
2933 PR tree-optimization/87169
2934 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
2935 iterating make sure there's no extra backedges from irreducible
2936 regions feeding the header. Mark the destination block
2937 executable.
2938
2939 2018-09-03 Martin Liska <mliska@suse.cz>
2940
2941 PR driver/83193
2942 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
2943 * common/common-targhooks.c (default_get_valid_option_values):
2944 New function.
2945 * common/common-targhooks.h (default_get_valid_option_values):
2946 Likewise.
2947 * common/config/i386/i386-common.c: Move processor_target_table
2948 from i386.c.
2949 (ix86_get_valid_option_values): New function.
2950 (TARGET_GET_VALID_OPTION_VALUES): New macro.
2951 * config/i386/i386.c (struct ptt): Move to i386-common.c.
2952 (PTA_*): Move all defined masks into i386-common.c.
2953 (ix86_function_specific_restore): Use new processor_cost_table.
2954 * config/i386/i386.h (struct ptt): Moved from i386.c.
2955 (struct pta): Likewise.
2956 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
2957 * doc/tm.texi.in: Likewise.
2958 * opt-suggestions.c (option_proposer::suggest_option):
2959 Pass prefix to build_option_suggestions.
2960 (option_proposer::get_completions): Likewise.
2961 (option_proposer::build_option_suggestions): Use the new target
2962 hook.
2963 * opts.c (struct option_help_tuple): New struct.
2964 (print_filtered_help): Use the new target hook.
2965
2966 2018-09-03 Martin Liska <mliska@suse.cz>
2967
2968 PR middle-end/59521
2969 * predict.c (set_even_probabilities): Add likely_edges
2970 argument and handle cases where we have precisely one
2971 likely edge.
2972 (combine_predictions_for_bb): Catch also likely_edges.
2973 (tree_predict_by_opcode): Handle gswitch statements.
2974 * tree-cfg.h (find_case_label_for_value): New declaration.
2975 (find_taken_edge_switch_expr): Likewise.
2976 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
2977 Find pivot in decision tree based on probabily, not by number of
2978 nodes.
2979
2980 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
2981
2982 * doc/standards.texi (Standards): Update Objective-C reference.
2983
2984 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
2985
2986 * doc/install.texi (Prerequisites): Update link for MPC.
2987
2988 2018-09-01 Michael Matz <matz@suse.de>
2989
2990 PR tree-optimization/87074
2991 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
2992 PHIs for outer-loop uses.
2993
2994 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
2995
2996 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
2997 * doc/invoke.texi (C Dialect Options): Ditto.
2998
2999 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3000
3001 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3002
3003 2018-08-31 Richard Biener <rguenther@suse.de>
3004
3005 PR tree-optimization/87168
3006 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3007 (rpo_elim::eliminate_avail): When OP was not visited it must
3008 be available.
3009
3010 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3011
3012 * tree-vrp.c (copy_value_range): Convert param "from" from
3013 "value_range *" to "const value_range *".
3014 (range_is_null): Likewise for param "vr".
3015 (range_int_cst_p): Likewise.
3016 (range_int_cst_singleton_p): Likewise.
3017 (symbolic_range_p): Likewise.
3018 (value_ranges_intersect_p): Likewise for both params.
3019 (value_range_nonnegative_p): Likewise for param "vr".
3020 (value_range_constant_singleton): Likewise.
3021 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3022 (extract_range_into_wide_ints): Likewise for param "vr".
3023 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3024 and "vr1".
3025 (vrp_can_optimize_bit_op): Likewise.
3026 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3027 "vr1_".
3028 (extract_range_from_unary_expr): Likewise.
3029 (debug_value_range): Likewise for param "vr".
3030 (value_range::dump): Add "const" qualifier.
3031 (vrp_prop::check_array_ref): Convert local "vr" from
3032 "value_range *" to "const value_range *".
3033 (vrp_prop::check_mem_ref): Likewise.
3034 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3035 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3036 (vrp_intersect_ranges): Likewise.
3037 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3038 (vrp_prop::vrp_finalize): Likewise.
3039 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3040 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3041 (extract_range_from_unary_expr): Likewise.
3042 (value_range_constant_singleton): Likewise.
3043 (symbolic_range_p): Likewise.
3044 (copy_value_range): Likewise.
3045 (extract_range_from_binary_expr_1): Likewise.
3046 (range_int_cst_p): Likewise.
3047 (vrp_set_zero_nonzero_bits): Likewise.
3048 (range_int_cst_singleton_p): Likewise.
3049
3050 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3051
3052 * config/aarch64/arm_neon.h (vabsd_s64): New.
3053 (vnegd_s64): Likewise.
3054
3055 2018-08-31 Martin Jambor <mjambor@suse.cz>
3056
3057 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3058
3059 2018-08-31 Martin Liska <mliska@suse.cz>
3060
3061 * ipa-icf.c (sem_item::add_type): Use
3062 sem_item::m_type_hash_cache.
3063 * ipa-icf.h: Move the cache from sem_item_optimizer
3064 to sem_item.
3065
3066 2018-08-31 Nathan Sidwell <nathan@acm.org>
3067
3068 * doc/extend.texi (Backwards Compatibility): Remove implicit
3069 extern C leeway of () being (...).
3070
3071 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3072
3073 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3074
3075 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3076
3077 PR target/86684
3078 PR target/87149
3079 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3080
3081 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3082
3083 PR middle-end/87138
3084 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3085 gen_int_mode. Formatting fixes.
3086
3087 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3088
3089 * target.def (custom_function_descriptors): Improve documentation.
3090 * doc/tm.texi.in (Trampolines): Expand discussion of function
3091 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3092 beginning of the section.
3093 * doc/tm.texi: Regenerated.
3094
3095 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3096
3097 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3098 base class in the initializer list. This is a workaround for
3099 building with older GCC.
3100 (class auto_bb_flag): Likewise.
3101
3102 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3103
3104 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3105 (altivec_vcmpequ<VI_char>_p): Remove star.
3106 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3107 vector load modes.
3108 (expand_strncmp_vec_sequence): New function.
3109 (emit_final_str_compare_vec): New function.
3110 (expand_strn_compare): Add support for vector strncmp.
3111 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3112 length specification to bytes.
3113 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3114 (vcmpnezb_p): New pattern.
3115 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3116 for option -mstring-compare-inline-limit.
3117
3118 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3119
3120 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3121 (PTA_SKYLAKE): Add PTA_AES.
3122 (PTA_GOLDMONT): Likewise.
3123
3124 2018-08-29 Jan Hubicka <jh@suse.cz>
3125
3126 PR lto/86517
3127 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3128 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3129
3130 2018-08-29 Jan Hubicka <jh@suse.cz>
3131
3132 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3133 TYPE_STUB_DECL.
3134 (hash_tree): Do not visit TYPE_STUB_DECL.
3135 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3136 stream TYPE_STUB_DECL.
3137 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3138 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3139 after free_lang_data.
3140 (type_in_anonymous_namespace_p): Likewise.
3141
3142 2018-08-29 Jan Hubicka <jh@suse.cz>
3143
3144 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3145 comment that it has to be even number.
3146 (class sreal): Change m_sig type to int32_t.
3147 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3148 int64_t for temporary calculations.
3149 (sreal_verify_basics): Drop one bit from minimum and maximum.
3150
3151 2018-08-30 Richard Biener <rguenther@suse.de>
3152
3153 PR tree-optimization/87147
3154 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3155 (visit_phi): When the degenerate result is from the backedge and
3156 we didn't visit its definition yet drop to VARYING.
3157 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3158
3159 2018-08-29 Jan Hubicka <jh@suse.cz>
3160
3161 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3162 DECL_VINDEX.
3163 (hash_tree): Likewise.
3164
3165 2018-08-29 Jan Hubicka <jh@suse.cz>
3166
3167 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3168 and TYPE_NEXT_REF_TO.
3169
3170 2018-08-29 Jan Hubicka <jh@suse.cz>
3171
3172 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3173 comment that it has to be even number.
3174 (class sreal): Change m_sig type to int32_t.
3175 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3176 int64_t for temporary calculations.
3177 (sreal_verify_basics): Drop one bit from minimum and maximum.
3178
3179 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3180
3181 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3182
3183 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3184
3185 PR middle-end/86995
3186 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3187 if to_add is negative.
3188
3189 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3190
3191 PR middle-end/87053
3192 * builtins.c (c_strlen): Improve range checks.
3193
3194 2018-08-29 Martin Sebor <msebor@redhat.com>
3195 Jeff Law <law@redhat.com>
3196
3197 PR tree-optimization/86714
3198 PR tree-optimization/86711
3199 * builtins.c (c_strlen): Add arguments to call to string_constant.
3200 * expr.c (string_constant): Add argument. Detect missing nul
3201 terminator and outermost declaration it's missing in.
3202 * expr.h (string_constant): Add argument.
3203 * fold-const.c (read_from_constant_string): Add arguments to call to
3204 string_constant.
3205 (c_getstr): Likewise.
3206 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3207 to string_constant.
3208 * tree-ssa-strlen.c (get_stridx): Likewise.
3209
3210 2018-08-29 Jan Hubicka <jh@suse.cz>
3211
3212 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3213 Do not stream DECL_VINDEX.
3214 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3215 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3216 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3217
3218 2018-08-29 Richard Biener <rguenther@suse.de>
3219
3220 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3221 virtual operands that are not default defs to honor region
3222 boundaries.
3223 (rpo_vn_valueize): Remove ineffective code here.
3224
3225 2018-08-29 Richard Biener <rguenther@suse.de>
3226
3227 PR tree-optimization/87132
3228 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3229 when skipping defs reachable over backedges.
3230
3231 2018-08-29 Richard Biener <rguenther@suse.de>
3232
3233 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3234 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3235 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3236 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3237 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3238 (vn_reference_lookup_3): Remove use of const_parms.
3239 (free_rpo_vn): Do not free const_parms.
3240 (do_rpo_vn): Do not call init_const_parms.
3241 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3242 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3243 (call_may_clobber_ref_p_1): Likewise.
3244
3245 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3246
3247 PR other/86726
3248 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3249 (-O): Ditto.
3250 (-ftree-scev-cprop): Document.
3251
3252 2018-08-29 Jan Hubicka <jh@suse.cz>
3253
3254 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3255 parameters.
3256 (sreal constructor): Update.
3257 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3258 sreal:operator/): Update.
3259
3260 2018-08-29 Martin Liska <mliska@suse.cz>
3261
3262 * tree-switch-conversion.c (switch_conversion::expand):
3263 Strenghten assumption about gswitch statements.
3264
3265 2018-08-29 Richard Biener <rguenther@suse.de>
3266
3267 PR tree-optimization/87117
3268 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3269 re-value-number released SSA VDEFs.
3270
3271 2018-08-29 Richard Biener <rguenther@suse.de>
3272
3273 PR tree-optimization/87126
3274 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3275
3276 2018-08-28 Jim Wilson <jimw@sifive.com>
3277
3278 * config/riscv/pic.md: Rewrite.
3279 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3280 invalid address.
3281 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3282 (SOFTF, default_load, softload, softstore): New.
3283
3284 2018-08-28 Jeff Law <law@redhat.com>
3285
3286 * fold-const.c (fold_binary_loc): Remove recently added assert.
3287
3288 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3289
3290 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3291 to OP parmeter of generated function.
3292
3293 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3294
3295 PR tree-optimization/87009
3296 * match.pd: Add boolean optimizations.
3297
3298 2018-08-28 Martin Sebor <msebor@redhat.com>
3299
3300 PR middle-end/86631
3301 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3302 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3303 (pass_walloca::gate): Use it.
3304 (alloca_call_type): Same.
3305 (pass_walloca::execute): Same.
3306 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3307
3308 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3309
3310 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3311 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3312 >= 3005 to >= 9000.
3313
3314 2018-08-28 Richard Biener <rguenther@suse.de>
3315
3316 PR tree-optimization/87124
3317 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3318 constants before looking up avail.
3319
3320 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3321
3322 PR middle-end/87099
3323 * calls.c (maybe_warn_nonstring_arg): Punt early if
3324 warn_stringop_overflow is zero. Don't call get_range_strlen
3325 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3326 Swap comparison operands to have constants on rhs. Only use
3327 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3328 increment lenrng[0].
3329
3330 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3331
3332 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3333 use of tree_to_shwi. Remove duplicated test for the size being
3334 a whole number of bytes.
3335
3336 2018-08-28 Richard Biener <rguenther@suse.de>
3337
3338 PR tree-optimization/87117
3339 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3340 Handle removed stmt without LHS (GIMPLE_NOP).
3341
3342 2018-08-28 Richard Biener <rguenther@suse.de>
3343
3344 PR tree-optimization/87117
3345 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3346 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3347
3348 2018-08-28 Richard Biener <rguenther@suse.de>
3349
3350 PR tree-optimization/87117
3351 * tree-ssa-pre.c (compute_avail): Do not make expressions
3352 with predicated values available.
3353 (get_expr_value_id): Assert we do not run into predicated value
3354 expressions.
3355
3356 2018-08-28 Richard Biener <rguenther@suse.de>
3357
3358 PR tree-optimization/87117
3359 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3360 get virtual operands.
3361 (get_expr_operands): Handle STRING_CST like other decls.
3362
3363 2018-08-28 Martin Liska <mliska@suse.cz>
3364
3365 * tree.h: Update documentation of fndecl_built_in_p
3366 functions.
3367
3368
3369 2018-08-27 Jeff Law <law@redhat.com>
3370 PR tree-optimization/87110
3371 * tree-ssa-dse.c (compute_trims): Handle non-constant
3372 TYPE_SIZE_UNIT.
3373
3374 2018-08-27 Martin Sebor <msebor@redhat.com>
3375
3376 PR tree-optimization/86914
3377 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3378
3379 2018-08-27 Martin Sebor <msebor@redhat.com>
3380
3381 PR tree-optimization/87112
3382 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3383 the type of the bound argument.
3384
3385 2018-08-27 Jeff Law <law@redhat.com>
3386
3387 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3388 type does not have a TYPE_SIZE_UNIT.
3389
3390 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3391
3392 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3393 with include of backend.h.
3394
3395 2018-08-27 Richard Biener <rguenther@suse.de>
3396
3397 PR tree-optimization/86927
3398 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3399 use const cond reduction code.
3400
3401 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3402
3403 PR tree-optimization/85758
3404 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3405
3406 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3407
3408 PR c++/87091
3409 * diagnostic-show-locus.c (class layout_range): Update for
3410 conversion of show_caret_p to a tri-state.
3411 (layout_range::layout_range): Likewise.
3412 (make_range): Likewise.
3413 (layout::maybe_add_location_range): Likewise.
3414 (layout::should_print_annotation_line_p): Don't show annotation
3415 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3416 (layout::get_state_at_point): Update for conversion of
3417 show_caret_p to a tri-state. Bail out early for
3418 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3419 underlining or source colorization.
3420 (gcc_rich_location::add_location_if_nearby): Update for conversion
3421 of show_caret_p to a tri-state.
3422 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3423 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3424 Likewise.
3425 (selftest::test_one_liner_labels): Likewise.
3426 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3427 conversion of show_caret_p to a tri-state.
3428 * pretty-print.c (text_info::set_location): Likewise.
3429 * pretty-print.h (text_info::set_location): Likewise.
3430 * substring-locations.c (format_warning_n_va): Likewise.
3431 * tree-diagnostic.c (default_tree_printer): Likewise.
3432 * tree-pretty-print.c (newline_and_indent): Likewise.
3433
3434 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3435
3436 PR c++/87091
3437 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3438 line above for line-insertion fix-it hints.
3439 (selftest::test_fixit_insert_containing_newline): Update the
3440 expected results, and add a test with line-numbering enabled.
3441
3442 2018-08-27 Martin Liska <mliska@suse.cz>
3443
3444 PR sanitizer/86962
3445 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3446 params with DECL_HAS_VALUE_EXPR_P.
3447
3448 2018-08-27 Martin Liska <mliska@suse.cz>
3449
3450 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3451 selected expansion strategy.
3452
3453 2018-08-27 Martin Liska <mliska@suse.cz>
3454
3455 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3456 * builtins.c (is_builtin_fn): Likewise.
3457 * attribs.c (diag_attr_exclusions): Use new function
3458 fndecl_built_in_p and remove check for FUNCTION_DECL if
3459 possible.
3460 (builtin_mathfn_code): Likewise.
3461 (fold_builtin_expect): Likewise.
3462 (fold_call_expr): Likewise.
3463 (fold_builtin_call_array): Likewise.
3464 (fold_call_stmt): Likewise.
3465 (set_builtin_user_assembler_name): Likewise.
3466 (is_simple_builtin): Likewise.
3467 * calls.c (gimple_alloca_call_p): Likewise.
3468 (maybe_warn_nonstring_arg): Likewise.
3469 * cfgexpand.c (expand_call_stmt): Likewise.
3470 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3471 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3472 (cgraph_node::verify_node): Likewise.
3473 * cgraphclones.c (build_function_decl_skip_args): Likewise.
3474 (cgraph_node::create_clone): Likewise.
3475 * config/arm/arm.c (arm_insert_attributes): Likewise.
3476 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3477 * dse.c (scan_insn): Likewise.
3478 * expr.c (expand_expr_real_1): Likewise.
3479 * fold-const.c (operand_equal_p): Likewise.
3480 (fold_binary_loc): Likewise.
3481 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3482 * gimple-low.c (lower_stmt): Likewise.
3483 * gimple-pretty-print.c (dump_gimple_call): Likewise.
3484 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3485 Likewise.
3486 * gimple.c (gimple_build_call_from_tree): Likewise.
3487 (gimple_call_builtin_p): Likewise.
3488 (gimple_call_combined_fn): Likewise.
3489 * gimplify.c (gimplify_call_expr): Likewise.
3490 (gimple_boolify): Likewise.
3491 (gimplify_modify_expr): Likewise.
3492 (gimplify_addr_expr): Likewise.
3493 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3494 * ipa-cp.c (determine_versionability): Likewise.
3495 * ipa-fnsummary.c (compute_fn_summary): Likewise.
3496 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3497 * ipa-split.c (visit_bb): Likewise.
3498 (split_function): Likewise.
3499 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3500 * lto-cgraph.c (input_node): Likewise.
3501 * lto-streamer-out.c (write_symbol): Likewise.
3502 * omp-low.c (setjmp_or_longjmp_p): Likewise.
3503 (lower_omp_1): Likewise.
3504 * predict.c (strip_predict_hints): Likewise.
3505 * print-tree.c (print_node): Likewise.
3506 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3507 * trans-mem.c (is_tm_irrevocable): Likewise.
3508 (is_tm_load): Likewise.
3509 (is_tm_simple_load): Likewise.
3510 (is_tm_store): Likewise.
3511 (is_tm_simple_store): Likewise.
3512 (is_tm_abort): Likewise.
3513 (tm_region_init_1): Likewise.
3514 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3515 * tree-cfg.c (verify_gimple_call): Likewise.
3516 (move_stmt_r): Likewise.
3517 (stmt_can_terminate_bb_p): Likewise.
3518 * tree-eh.c (lower_eh_constructs_2): Likewise.
3519 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3520 * tree-inline.c (remap_gimple_stmt): Likewise.
3521 (copy_bb): Likewise.
3522 (estimate_num_insns): Likewise.
3523 (fold_marked_statements): Likewise.
3524 * tree-sra.c (scan_function): Likewise.
3525 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3526 (optimize_stack_restore): Likewise.
3527 (pass_fold_builtins::execute): Likewise.
3528 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3529 (mark_all_reaching_defs_necessary_1): Likewise.
3530 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3531 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3532 (pass_forwprop::execute): Likewise.
3533 * tree-ssa-loop-im.c (stmt_cost): Likewise.
3534 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3535 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3536 * tree-ssa-strlen.c (get_string_length): Likewise.
3537 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3538 (find_func_aliases_for_call): Likewise.
3539 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3540 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3541 * tree-tailcall.c (find_tail_calls): Likewise.
3542 * tree.c (need_assembler_name_p): Likewise.
3543 (free_lang_data_in_decl): Likewise.
3544 (get_call_combined_fn): Likewise.
3545 * ubsan.c (is_ubsan_builtin_p): Likewise.
3546 * varasm.c (incorporeal_function_p): Likewise.
3547 * tree.h (DECL_BUILT_IN): Remove and replace with
3548 fndecl_built_in_p.
3549 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3550 (fndecl_built_in_p): New.
3551
3552 2018-08-27 Martin Liska <mliska@suse.cz>
3553
3554 PR tree-optimization/86847
3555 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3556 Dump also subtree probability.
3557 (switch_decision_tree::do_jump_if_equal): New function.
3558 (switch_decision_tree::emit_case_nodes): Handle special
3559 situations in balanced tree that can be emitted much simpler.
3560 Fix calculation of probabilities that happen in tree expansion.
3561 * tree-switch-conversion.h (struct cluster): Add
3562 is_single_value_p.
3563 (struct simple_cluster): Likewise.
3564 (struct case_tree_node): Add new function has_child.
3565 (do_jump_if_equal): New.
3566
3567 2018-08-27 Martin Liska <mliska@suse.cz>
3568
3569 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3570 Add new argument to bit_test_cluster constructor.
3571 (bit_test_cluster::emit): Set bits really number of values
3572 handlel by a test.
3573 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3574 probability argument.
3575 * tree-switch-conversion.h (struct bit_test_cluster):
3576 Add m_handles_entire_switch.
3577
3578 2018-08-27 Martin Liska <mliska@suse.cz>
3579
3580 PR tree-optimization/86702
3581 * tree-switch-conversion.c (jump_table_cluster::emit):
3582 Make probabilities even for values in jump table
3583 according to number of cases handled.
3584 (switch_decision_tree::compute_cases_per_edge): Pass
3585 argument to reset_out_edges_aux function.
3586 (switch_decision_tree::analyze_switch_statement): Likewise.
3587 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3588 Make it static.
3589
3590 2018-08-27 Martin Liska <mliska@suse.cz>
3591
3592 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3593 cfun argument explicitly.
3594 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3595 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3596 function gimple_switch_default_bb.
3597 (convert_switch_statements):
3598 (expand_builtins):
3599 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3600 * stmt.c (label_to_block_fn): Use label_to_block and pass
3601 cfun argument explicitly and use gimple_switch_label_bb.
3602 (expand_case): Likewise.
3603 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3604 cfun argument explicitly. Likewise.
3605 (make_edges_bb): Likewise.
3606 (make_cond_expr_edges): Likewise.
3607 (get_cases_for_edge): Likewise.
3608 (make_gimple_switch_edges): Likewise.
3609 (label_to_block_fn): Likewise.
3610 (label_to_block): Likewise.
3611 (make_goto_expr_edges): Likewise.
3612 (make_gimple_asm_edges): Likewise.
3613 (main_block_label): Likewise.
3614 (group_case_labels_stmt): Likewise.
3615 (find_taken_edge_computed_goto): Likewise.
3616 (find_taken_edge_switch_expr): Likewise.
3617 (gimple_verify_flow_info): Likewise.
3618 (gimple_redirect_edge_and_branch): Likewise.
3619 (gimple_switch_label_bb): New function.
3620 (gimple_switch_default_bb): Likewise.
3621 (gimple_switch_edge): Likewise.
3622 (gimple_switch_default_edge): Likewise.
3623 * tree-cfg.h (label_to_block_fn): Remove and replace ...
3624 (label_to_block): ... with this.
3625 (gimple_switch_label_bb): New.
3626 (gimple_switch_default_bb): Likewise.
3627 (gimple_switch_edge): Likewise.
3628 (gimple_switch_default_edge): Likewise.
3629 * tree-cfgcleanup.c (convert_single_case_switch): Use
3630 new gimple functions and pass new argument to label_to_block.
3631 (cleanup_control_flow_bb):
3632 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3633 cfun argument explicitly.
3634 (make_eh_edges): Likewise.
3635 (redirect_eh_dispatch_edge): Likewise.
3636 (lower_resx): Likewise.
3637 (lower_eh_dispatch): Likewise.
3638 (maybe_remove_unreachable_handlers): Likewise.
3639 (unsplit_eh): Likewise.
3640 (cleanup_empty_eh): Likewise.
3641 (verify_eh_edges): Likewise.
3642 (verify_eh_dispatch_edge): Likewise.
3643 * tree-ssa-dom.c (record_edge_info): Likewise.
3644 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3645 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3646 (thread_through_normal_block): Likewise.
3647 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3648 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3649 * tree-switch-conversion.c (switch_conversion::collect): Use new
3650 gimple functions.
3651 (switch_conversion::check_final_bb): Likewise.
3652 (switch_conversion::gather_default_values): Pass new argument
3653 to label_to_block.
3654 (switch_conversion::build_constructors): Likewise.
3655 (switch_decision_tree::compute_cases_per_edge): Use new
3656 gimple_switch_edge function.
3657 (switch_decision_tree::analyze_switch_statement): Pass new argument
3658 to label_to_block.
3659 (switch_decision_tree::try_switch_expansion): Use
3660 gimple_switch_default_edge.
3661 * tree-vrp.c (find_switch_asserts): Pass new argument
3662 to label_to_block.
3663 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3664 (vr_values::simplify_switch_using_ranges): Likewise.
3665
3666 2018-08-27 Richard Biener <rguenther@suse.de>
3667
3668 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3669 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3670
3671 * tree-ssa-sccvn.h (struct vn_pval): New structure.
3672 (struct vn_nary_op_s): Add unwind_to member. Add
3673 predicated_values flag and put result into a union together
3674 with a linked list of vn_pval.
3675 (struct vn_ssa_aux): Add name member to make maintaining
3676 a map of SSA name to vn_ssa_aux possible. Remove no longer
3677 needed info, dfsnum, low, visited, on_sccstack, use_processed
3678 and range_info_anti_range_p members.
3679 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3680 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3681 New functions.
3682 (vn_valueize): New global.
3683 (vn_context_bb): Likewise.
3684 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3685 VN_INFO_PTR_INFO): Remove.
3686 * tree-ssa-sccvn.c: ... (rewrite)
3687 (pass_fre::execute): For -O2+ initialize loops and run
3688 RPO VN in optimistic mode (iterating). For -O1 and -Og
3689 run RPO VN in non-optimistic mode.
3690 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3691 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3692 * doc/invoke.texi (sccvn-max-scc-size): Remove.
3693 (rpo-vn-max-loop-depth): Document.
3694 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3695 when valuezing the VUSE signals we walked out of the region.
3696 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3697 (phi_translate): Set VN context block to use for availability
3698 lookup.
3699 (compute_avail): Likewise.
3700 (pre_valueize): New function.
3701 (pass_pre::execute): Adjust to the RPO VN API.
3702
3703 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3704 (propagate_constants_for_unrolling): Remove.
3705 (tree_unroll_loops_completely): Perform value-numbering
3706 on the unrolled bodies loop parent.
3707
3708 2018-08-27 Richard Biener <rguenther@suse.de>
3709
3710 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3711 for partial antic compute.
3712
3713 2018-08-27 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR rtl-optimization/87065
3716 * combine.c (simplify_if_then_else): Formatting fix.
3717 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3718 check.
3719 (known_cond): Don't return const_true_rtx for vector modes. Use
3720 CONST0_RTX instead of const0_rtx. Formatting fixes.
3721
3722 2018-08-27 Martin Liska <mliska@suse.cz>
3723
3724 PR gcov-profile/87069
3725 * gcov.c (process_file): Record files already processed
3726 and warn about a file being processed multiple times.
3727
3728 2018-08-27 Martin Liska <mliska@suse.cz>
3729
3730 PR driver/83193
3731 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3732 Set default values for x_aarch64_*_string strings.
3733 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3734 prefix. For -mabi do not print '=ABI' in help and use
3735 <option_value> format for -msve-vector-bits and -moverride
3736 options.
3737
3738 2018-08-26 Jeff Law <law@redhat.com>
3739
3740 * config/mips/frame-header-opt.c: Include "backend.h" rather than
3741 "cfg.h"
3742
3743 2018-08-26 Marek Polacek <polacek@redhat.com>
3744
3745 PR c++/87029, Implement -Wredundant-move.
3746 * doc/invoke.texi: Document -Wredundant-move.
3747
3748 2018-08-25 Martin Sebor <msebor@redhat.com>
3749
3750 PR tree-optimization/87059
3751 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3752 to the same type as the other.
3753 * fold-const.c (fold_binary_loc): Assert expectation.
3754
3755 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
3756
3757 * config/darwin.c (machopic_legitimize_pic_address): Clean up
3758 extraneous parentheses, dead code section and formatting.
3759
3760 2018-08-24 David Malcolm <dmalcolm@redhat.com>
3761
3762 PR c++/87091
3763 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3764 wide enough for jumps in the line-numbering to be visible.
3765 (layout::print_gap_in_line_numbering): New member function.
3766 (layout::calculate_line_spans): When using line numbering, merge
3767 line spans that are only 1 line apart.
3768 (diagnostic_show_locus): When printing line numbers, show gaps in
3769 line numbering directly, rather than printing headers.
3770 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3771 line-numbering with multiple line spans.
3772 (selftest::test_fixit_insert_containing_newline_2): Add test of
3773 line-numbering, in which the spans are close enough to be merged.
3774
3775 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
3776
3777 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3778 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
3779 * tree-vrp.c (range_is_nonnull): Remove.
3780 (range_includes_zero_p): Accept value_range instead of min/max.
3781 (extract_range_from_binary_expr_1): Do not early bail on
3782 POINTER_PLUS_EXPR.
3783 Use range_includes_zero_p instead of range_is_nonnull.
3784 (extract_range_from_unary_expr): Use range_includes_zero_p instead
3785 of range_is_nonnull.
3786 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
3787 special case VR_ANTI_RANGE.
3788 (vrp_finalize): Same.
3789 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
3790 instead of min/max.
3791 (range_is_nonnull): Remove.
3792 * vr-values.c (vrp_stmt_computes_nonzero): Use
3793 range_includes_zero_p instead of range_is_nonnull.
3794 (extract_range_basic): Pass value_range to range_includes_zero_p
3795 instead of range_is_nonnull.
3796
3797 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
3798
3799 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
3800 * emit-rtl.h (rtl_data): Remove return_bnd.
3801 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
3802 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
3803 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
3804 (POINTER_BOUNDS_MODE): Remove definition.
3805 (make_pointer_bounds_mode): Remove.
3806 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
3807 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
3808 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
3809 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
3810 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
3811 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
3812 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
3813
3814 * config/i386/i386-modes.def (BND32, BND64): Remove.
3815 * config/i386/i386.c (dbx_register_map): Remove bound registers.
3816 (dbx64_register_map): Ditto.
3817 (svr4_dbx_register_map): Ditto.
3818 (indirect_thunk_bnd_needed): Remove.
3819 (indirect_thunks_bnd_used): Ditto.
3820 (indirect_return_bnd_needed): Ditto.
3821 (indirect_return_via_cx_bnd): Ditto.
3822 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
3823 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
3824 (output_indirect_thunk): Ditto. Remove need_prefix argument.
3825 (output_indirect_thunk_function): Remove handling of
3826 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
3827 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
3828 (ix86_save_reg): Remove handling of crtl->return_bnd.
3829 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
3830 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
3831 and UNSPEC_BNDLX_ADDR.
3832 (ix86_output_indirect_branch_via_reg): Remove handling of
3833 indirect_thunk_prefix_bnd.
3834 (ix86_output_indirect_branch_via_push): Ditto.
3835 (ix86_output_function_return): Ditto.
3836 (ix86_output_indirect_function_return): Ditto.
3837 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
3838 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
3839 (CALL_USED_REGISTERS): Ditto.
3840 (REG_ALLOC_ORDER): Update for removal of bound registers.
3841 (HI_REGISTER_NAMES): Ditto.
3842 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
3843 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
3844 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
3845 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
3846 (FIRST_PSEUDO_REG): Update.
3847 (BND): Remove mode iterator.
3848 * config/i386/predicates.md (bnd_mem_operator): Remove.
3849
3850 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
3851
3852 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
3853 vectors.
3854
3855 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
3856
3857 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
3858 the case in which the permute needs only a single element and
3859 repeats for every vector of the result. Extend that case to
3860 handle variable-length vectors.
3861 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3862
3863 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
3864
3865 PR debug/79342
3866 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
3867 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
3868
3869 2018-08-24 Richard Biener <rguenther@suse.de>
3870
3871 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
3872 bb_flags_allocated members.
3873 (auto_flag): New RAII class for allocating flags.
3874 (auto_edge_flag): New RAII class for allocating edge flags.
3875 (auto_bb_flag): New RAII class for allocating bb flags.
3876 * cfgloop.c (verify_loop_structure): Allocate temporary edge
3877 flag dynamically.
3878 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
3879 in favor of temporarily allocated BB flag.
3880 * hsa-brig.c: Re-order includes.
3881 * hsa-dump.c: Likewise.
3882 * hsa-regalloc.c: Likewise.
3883 * print-rtl.c: Likewise.
3884 * profile-count.c: Likewise.
3885
3886 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
3887
3888 PR target/86989
3889 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
3890 the TOC register.
3891
3892 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
3893
3894 PR 87073/bootstrap
3895 * wide-int-range.cc (wide_int_range_div): Do not ignore result
3896 from wide_int_range_multiplicative_op.
3897
3898 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3899
3900 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
3901 "permutaion".
3902
3903 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
3904
3905 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
3906 to 'expanded'.
3907
3908 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
3909
3910 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
3911 full GENERIC expression used for replacement.
3912
3913 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
3914
3915 * tree-vrp.c (abs_extent_range): Remove.
3916 (extract_range_into_wide_ints): Pass wide ints by reference.
3917 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
3918 Pass wide ints by reference in all calls to
3919 extract_range_into_wide_ints.
3920 * wide-int-range.cc (wide_int_range_div): New.
3921 * wide-int-range.h (wide_int_range_div): New.
3922 (wide_int_range_includes_zero_p): New.
3923 (wide_int_range_zero_p): New.
3924
3925 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
3926
3927 * config/aarch64/aarch64.md (arches): New enum.
3928 (arch): New enum attr.
3929 (arch_enabled): New attr.
3930 (enabled): Now uses arch_enabled only.
3931 (simd, sve, fp16): Removed attribute.
3932 (fp): Attr now defined in terms of 'arch'.
3933 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
3934 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
3935 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
3936 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
3937 attributes into 'arch'.
3938 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
3939 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
3940 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
3941 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
3942 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
3943 'simd' attribute into 'arch'.
3944 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
3945 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
3946 Convert use of 'fp' attribute to 'arch'.
3947 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
3948 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
3949 into 'arch'.
3950 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
3951 (different modes) Merge 'fp' and 'simd' into 'arch'.
3952 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
3953 'simd' into 'arch'.
3954
3955 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
3956
3957 PR rtl-optimization/87026
3958 * expmed.c (canonicalize_comparison): If we can no longer create
3959 pseudoregisters, don't.
3960
3961 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
3962
3963 PR target/86951
3964 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
3965 prototype.
3966 * config/arm/arm.c (speculation_barrier_libfunc): New static
3967 variable.
3968 (arm_init_libfuncs): Initialize it.
3969 (arm_emit_speculation_barrier): New function.
3970 * config/arm/arm.md (speculation_barrier): Call
3971 arm_emit_speculation_barrier for architectures that do not have
3972 DSB or ISB.
3973 (speculation_barrier_insn): Only match on Armv7 or later.
3974
3975 2018-08-23 Richard Biener <rguenther@suse.de>
3976
3977 PR middle-end/87024
3978 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
3979 calls.
3980
3981 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
3982
3983 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
3984 of single-vector TBLs.
3985 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
3986 one input is given.
3987
3988 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
3989
3990 PR target/85910
3991 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
3992 aarch64_evpc_tbl guard.
3993
3994 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
3995
3996 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
3997 behaviour.
3998
3999 2018-08-22 Martin Sebor <msebor@redhat.com>
4000
4001 PR middle-end/87052
4002 * tree-pretty-print.c (pretty_print_string): Add argument.
4003 (dump_generic_node): Call to pretty_print_string with string size.
4004
4005 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4006
4007 PR rtl-optimization/86771
4008 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4009 of two SETs into those two SETs, one to be placed at i2, if that SETs
4010 destination is modified between i2 and i3.
4011
4012 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4013
4014 PR tree-optimization/86725
4015 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4016 function.
4017 (vect_analyze_scalar_cycles_1): Check it.
4018
4019 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4020
4021 PR tree-optimization/86725
4022 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4023 an outer loop phi as a double reduction, make sure that the
4024 single user of the phi result is an inner loop phi.
4025
4026 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4027
4028 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4029 grouped stores with gaps to a strided group.
4030
4031 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4032
4033 * tree-vect-stmts.c (get_group_load_store_type)
4034 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4035 first statement in a group.
4036
4037 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4038
4039 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4040 the sequence used in gcc/gcc.c.
4041
4042 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4043
4044 PR other/704
4045 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4046 building it.
4047
4048 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4049
4050 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4051 Darwin10-specific unwinder-shim.
4052 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4053 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4054 New to cater for Darwin10 Rosetta.
4055
4056 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4057
4058 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4059 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4060
4061 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4062
4063 PR bootstrap/81033
4064 PR target/81733
4065 PR target/52795
4066 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4067 (dwarf2out_switch_text_section): Generate a local label for the
4068 second function sub-section and apply it as the second FDE start
4069 label.
4070 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4071 second sub-section start.
4072
4073 2018-08-22 Richard Biener <rguenther@suse.de>
4074
4075 PR tree-optimization/86988
4076 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4077
4078 2018-08-22 Richard Biener <rguenther@suse.de>
4079
4080 PR tree-optimization/86945
4081 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4082
4083 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4084
4085 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4086 a comment about how uses of r2 for .sdata2 come about.
4087
4088 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4089
4090 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4091
4092 2018-08-21 Marek Polacek <polacek@redhat.com>
4093
4094 PR c++/86981, Implement -Wpessimizing-move.
4095 * doc/invoke.texi: Document -Wpessimizing-move.
4096
4097 2018-08-21 Jan Hubicka <jh@suse.cz>
4098
4099 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4100 * tree.h (is_redundant_typedef): Remove.
4101 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4102
4103 2018-08-21 Jan Hubicka <jh@suse.cz>
4104
4105 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4106 when possible.
4107
4108 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4109
4110 * expmed.c (extract_low_bits): Reject invalid subregs early.
4111
4112 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4113
4114 PR middle-end/86121
4115 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4116 behaviour.
4117
4118 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4119
4120 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4121 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4122 * config/vxworks.c: Likewise.
4123
4124 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4125
4126 * config/vxworks.c: Set targetm.have_ctors_dtors
4127 if HAVE_INITFINI_ARRAY_SUPPORT.
4128 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4129 if HAVE_INITFINI_ARRAY_SUPPORT.
4130
4131 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4132
4133 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4134 default search path for VxWorks < 7.
4135
4136 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4137
4138 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4139 (get_format_string): Refer to c_getstr.
4140
4141 2018-08-21 Tom de Vries <tdevries@suse.de>
4142
4143 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4144 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4145 (debuginfo_early_stop): Declare.
4146 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4147 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4148 (debuginfo_early_stop): New function.
4149 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4150 and debuginfo_early_stop.
4151 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4152 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4153 (general_init): Call debuginfo_early_init.
4154 (finalize): Call debuginfo_fini.
4155 (do_compile): Call debuginfo_init.
4156 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4157 -fdump-early-debug.
4158 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4159
4160 2018-08-21 Tom de Vries <tdevries@suse.de>
4161
4162 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4163 flag_dump_noaddr and flag_dump_unnumbered.
4164
4165 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4166
4167 * wide-int-range.cc (wide_int_range_abs): New.
4168 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4169 * wide-int-range.h (wide_int_range_abs): New.
4170 (wide_int_range_min_max): New.
4171 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4172 case to call wide_int_range_abs.
4173 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4174 (extract_range_from_abs_expr): Delete.
4175
4176 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4177
4178 PR target/87033
4179 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4180 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4181 for indexed loads.
4182
4183 2018-08-20 Nathan Sidwell <nathan@acm.org>
4184 Jeff Law <law@redhat.com>
4185
4186 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4187 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4188
4189 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4190
4191 PR other/84889
4192 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4193 (decl_attributes): Likewise.
4194 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4195 instance.
4196 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4197 * diagnostic-core.h (class auto_diagnostic_group): New class.
4198 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4199 (diagnostic_report_diagnostic): Handle the first diagnostics within
4200 a group.
4201 (emit_diagnostic): Add auto_diagnostic_group instance.
4202 (inform): Likewise.
4203 (inform_n): Likewise.
4204 (warning): Likewise.
4205 (warning_at): Likewise.
4206 (warning_n): Likewise.
4207 (pedwarn): Likewise.
4208 (permerror): Likewise.
4209 (error): Likewise.
4210 (error_n): Likewise.
4211 (error_at): Likewise.
4212 (sorry): Likewise.
4213 (fatal_error): Likewise.
4214 (internal_error): Likewise.
4215 (internal_error_no_backtrace): Likewise.
4216 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4217 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4218 * diagnostic.h (struct diagnostic_context): Add fields
4219 "diagnostic_group_nesting_depth",
4220 "diagnostic_group_emission_count", "begin_group_cb",
4221 "end_group_cb".
4222 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4223 Add auto_diagnostic_group instance(s).
4224 (find_explicit_erroneous_behavior): Likewise.
4225 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4226 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4227 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4228 (gimplify_va_arg_expr): Likewise.
4229 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4230 (HSA_SORRY_AT): Likewise.
4231 * ipa-devirt.c (compare_virtual_tables): Likewise.
4232 (warn_odr): Likewise.
4233 * multiple_target.c (expand_target_clones): Likewise.
4234 * opts-common.c (cmdline_handle_error): Likewise.
4235 * reginfo.c (globalize_reg): Likewise.
4236 * substring-locations.c (format_warning_n_va): Likewise.
4237 * tree-inline.c (expand_call_inline): Likewise.
4238 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4239 * tree-ssa-loop-niter.c
4240 (do_warn_aggressive_loop_optimizations): Likewise.
4241 * tree-ssa-uninit.c (warn_uninit): Likewise.
4242 * tree.c (warn_deprecated_use): Likewise.
4243
4244 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4245
4246 PR target/87014
4247 * config/i386/i386.md (eh_return): Always update EH return
4248 address in word_mode.
4249
4250 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4251
4252 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4253 TARGET_SPLIT_COMPLEX_ARG is defined.
4254
4255 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4256
4257 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4258
4259 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4260
4261 PR target/86984
4262 * expr.c (expand_assignment): Assert that bitpos is positive.
4263 (store_field): Likewise
4264 (expand_expr_real_1): Make sure that bitpos is positive.
4265 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4266 integer overflow.
4267
4268 2018-08-20 Nathan Sidwell <nathan@acm.org>
4269
4270 * Makefile.in (CPP_ID_DATA_H): Delete.
4271 (CPP_INTERNAL_H): Don't add it.
4272 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4273 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4274
4275 2018-08-20 Richard Biener <rguenther@suse.de>
4276
4277 PR tree-optimization/78655
4278 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4279 pointer + offset nonnull if either operand is nonnull work.
4280
4281 2018-08-20 Tom de Vries <tdevries@suse.de>
4282
4283 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4284 unless the referenced die describes the added property using
4285 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4286 Otherwise, add a DW_AT_location to the referenced die.
4287
4288 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4289
4290 PR target/86994
4291 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4292 register_operand when calling ix86_set_reg_reg_cost.
4293 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4294 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4295 predicate and to 1 otherwise.
4296
4297 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4298
4299 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4300 emit a diagnostic that it is not supported and reset the option.
4301 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4302 supported and consume the option. (ASM_FINAL_SPEC): New.
4303
4304 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4305
4306 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4307 a sentence.
4308
4309 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4310
4311 C-SKY port: Documentation
4312
4313 * doc/extend.texi (C-SKY Function Attributes): New section.
4314 * doc/invoke.texi (Option Summary): Add C-SKY options.
4315 (C-SKY Options): New section.
4316 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4317
4318 2018-08-17 Jojo <jijie_rong@c-sky.com>
4319 Huibin Wang <huibin_wang@c-sky.com>
4320 Sandra Loosemore <sandra@codesourcery.com>
4321 Chung-Lin Tang <cltang@codesourcery.com>
4322
4323 C-SKY port: Backend implementation
4324
4325 * config/csky/*: New.
4326 * common/config/csky/*: New.
4327
4328 2018-08-17 Jojo <jijie_rong@c-sky.com>
4329 Huibin Wang <huibin_wang@c-sky.com>
4330 Sandra Loosemore <sandra@codesourcery.com>
4331 Chung-Lin Tang <cltang@codesourcery.com>
4332 Andrew Jenner <andrew@codesourcery.com>
4333
4334 C-SKY port: Configury
4335
4336 * config.gcc (csky-*-*): New.
4337 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4338 * configure: Regenerated.
4339
4340 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4341
4342 * dump-context.h: Include "dumpfile.h".
4343 (dump_context::dump_printf_va): Convert final param from va_list
4344 to va_list *. Convert from ATTRIBUTE_PRINTF to
4345 ATTRIBUTE_GCC_DUMP_PRINTF.
4346 (dump_context::dump_printf_loc_va): Likewise.
4347 * dumpfile.c: Include "stringpool.h".
4348 (make_item_for_dump_printf_va): Delete.
4349 (make_item_for_dump_printf): Delete.
4350 (class dump_pretty_printer): New class.
4351 (dump_pretty_printer::dump_pretty_printer): New ctor.
4352 (dump_pretty_printer::emit_items): New member function.
4353 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4354 function.
4355 (dump_pretty_printer::emit_item): New member function.
4356 (dump_pretty_printer::stash_item): New member function.
4357 (dump_pretty_printer::format_decoder_cb): New member function.
4358 (dump_pretty_printer::decode_format): New member function.
4359 (dump_context::dump_printf_va): Reimplement in terms of
4360 dump_pretty_printer.
4361 (dump_context::dump_printf_loc_va): Convert final param from va_list
4362 to va_list *.
4363 (dump_context::begin_scope): Reimplement call to
4364 make_item_for_dump_printf.
4365 (dump_printf): Update for change to dump_printf_va.
4366 (dump_printf_loc): Likewise.
4367 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4368 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4369 with %T, %E, and %G.
4370 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4371 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4372 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4373 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4374 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4375 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4376 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4377 within a dump_printf_loc call to "%wu".
4378 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4379 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4380 missing space after "=".
4381 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4382 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4383 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4384 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4385 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4386 duplicate "vectorized" from message.
4387
4388 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4389
4390 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4391 polyNxK_t element's TYPE_STRING_FLAG.
4392
4393 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4394
4395 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4396 (they were unnamed before). Fix comments.
4397
4398 2018-08-17 Nathan Sidwell <nathan@acm.org>
4399
4400 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4401
4402 2018-08-17 Richard Biener <rguenther@suse.de>
4403
4404 PR tree-optimization/86841
4405 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4406
4407 2018-08-17 Martin Liska <mliska@suse.cz>
4408
4409 * common.opt: Remove Warn, Init and Report for options with
4410 Ignore/Deprecated flag. Warning is done automatically for
4411 Deprecated flags.
4412 * config/i386/i386.opt: Likewise.
4413 * config/ia64/ia64.opt: Likewise.
4414 * config/rs6000/rs6000.opt: Likewise.
4415 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4416 Remove usage of flag_check_pointer_bounds.
4417 * lto-wrapper.c (merge_and_complain): Do not handle
4418 OPT_fcheck_pointer_bounds.
4419 (append_compiler_options): Likewise.
4420 * opt-functions.awk: Do not handle Deprecated.
4421 * optc-gen.awk: Check that Var, Report and Init are not
4422 used for an option with Ignore/Deprecated flag.
4423 * opts-common.c (decode_cmdline_option): Do not report
4424 CL_ERR_DEPRECATED.
4425 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4426 options.
4427 * opts.h (struct cl_option): Remove cl_deprecated flag.
4428 (CL_ERR_DEPRECATED): Remove error enum value.
4429
4430 2018-08-17 Richard Biener <rguenther@suse.de>
4431
4432 PR middle-end/86505
4433 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4434 across a va-arg-pack using call adjust its return value accordingly.
4435
4436 2018-08-16 Martin Sebor <msebor@redhat.com>
4437
4438 PR tree-optimization/86853
4439 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4440 (struct fmtresult): Add member and initialize it in ctors.
4441 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4442 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4443 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4444 (parse_directive): Handle %C same as %c.
4445 (sprintf_dom_walker::compute_format_length): Adjust.
4446 (is_call_safe): Adjust.
4447
4448 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4449
4450 * builtins.c (c_strlen): Add new parameter eltsize. Use it
4451 for determining how to count the elements.
4452 * builtins.h (c_strlen): Adjust prototype.
4453 * expr.c (string_constant): Add new parameter mem_size.
4454 Set *mem_size appropriately.
4455 * expr.h (string_constant): Adjust protoype.
4456 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4457 * gimple-fold.h (get_range_strlen): Adjust prototype.
4458 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4459 (format_string): Call get_string_length with eltsize.
4460
4461 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4462
4463 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4464 to emit the span, rather than setting it as the prefix.
4465
4466 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4467
4468 * diagnostic-show-locus.c (layout::start_annotation_line): Add
4469 "margin_char" parameter, defaulting to space. Use it in place
4470 of pp_space for the initial part of the margin.
4471 (layout::print_leading_fixits): Use '+' when filling the margin
4472 of line-insertion fix-it hints.
4473
4474 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4475
4476 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4477 Delete.
4478
4479 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4480
4481 * config/rs6000/altivec.md: Don't set length attribute to the default
4482 value.
4483 * config/rs6000/darwin.md: Ditto.
4484 * config/rs6000/dfp.md: Ditto.
4485 * config/rs6000/htm.md: Ditto.
4486 * config/rs6000/rs6000.md: Ditto.
4487 * config/rs6000/sync.md: Ditto.
4488 * config/rs6000/vsx.md: Ditto.
4489
4490 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4491
4492 * config/rs6000/altivec.md: Don't set length attribute to the default
4493 value, for branch instructions.
4494 * config/rs6000/darwin.md: Ditto.
4495 * config/rs6000/rs6000.md: Ditto.
4496
4497 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4498
4499 * config/rs6000/rs6000.md (length): Always define as const_int 4.
4500 (unnamed conditional branch define_insn): Set length to 4 or 8
4501 depending on offset.
4502 (<bd>_<mode>): Similar, for alternative 0.
4503 (<bd>tf_<mode>): Ditto.
4504
4505 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4506
4507 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4508
4509 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
4510
4511 * doc/rtl.texi: Replace old RTX class names with new names.
4512
4513
4514 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
4515
4516 * expmed.h (canonicalize_comparison): New declaration.
4517 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4518 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4519 * optabs.c (prepare_cmp_insn): Likewise.
4520 * rtl.h (unsigned_condition_p): New function which checks if a
4521 comparison operator is unsigned.
4522
4523 2018-08-16 Nathan Sidwell <nathan@acm.org>
4524
4525 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4526 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4527
4528 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4529
4530 PR target/84711
4531 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4532 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4533 (mov<mov>): ..this and enable unconditionally.
4534
4535 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4536
4537 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4538
4539 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
4540
4541 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4542 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4543 "Common" with "Target".
4544
4545 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4546
4547 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4548 * doc/invoke.texi (mmitigate-rop): Remove.
4549 * config/i386/i386.c: Do not include "regrename.h".
4550 (ix86_rop_should_change_byte_p, reg_encoded_number)
4551 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4552 Remove.
4553 (ix86_reorg): Remove call to ix86_mitigate_rop.
4554 * config/i386/i386.md (attr "modrm_class"): Remove.
4555 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4556 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4557 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4558
4559 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
4560
4561 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4562 allow folding of mergeh() and mergel() for the float and double types.
4563 (fold_mergehl_helper): Rework to handle building a permute tree
4564 for float vectors.
4565
4566 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4567
4568 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4569 for TARGET_SSE.
4570
4571 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4572
4573 * common.opt (fdiagnostics-show-labels): New option.
4574 * diagnostic-show-locus.c (class layout_range): Add field
4575 "m_label".
4576 (class layout): Add field "m_show_labels_p".
4577 (layout_range::layout_range): Add param "label" and use it to
4578 initialize m_label.
4579 (make_range): Pass in NULL for new "label" param of layout_range's
4580 ctor.
4581 (layout::layout): Initialize m_show_labels_p.
4582 (layout::maybe_add_location_range): Pass in loc_range->m_label
4583 when constructing layout_range instances.
4584 (struct line_label): New struct.
4585 (layout::print_any_labels): New member function.
4586 (layout::print_line): Call it if label-printing is enabled.
4587 (selftest::test_one_liner_labels): New test.
4588 (selftest::test_diagnostic_show_locus_one_liner): Call it.
4589 * diagnostic.c (diagnostic_initialize): Initialize
4590 context->show_labels_p.
4591 * diagnostic.h (struct diagnostic_context): Add field
4592 "show_labels_p".
4593 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4594 -fno-diagnostics-show-labels.
4595 * dwarf2out.c (gen_producer_string): Add
4596 OPT_fdiagnostics_show_labels to the ignored options.
4597 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4598 param.
4599 (gcc_rich_location::maybe_add_expr): Likewise.
4600 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4601 label" param, defaulting to NULL.
4602 (gcc_rich_location::add_expr): Add "label" param.
4603 (gcc_rich_location::maybe_add_expr): Likewise.
4604 (class text_range_label): New class.
4605 (class range_label_for_type_mismatch): New class.
4606 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4607 of format_warning_va.
4608 (fmtwarn_n): Likewise for new params of format_warning_n_va.
4609 * lto-wrapper.c (merge_and_complain): Add
4610 OPT_fdiagnostics_show_labels to the "pick one setting" options.
4611 (append_compiler_options): Likewise to the dropped options.
4612 (append_diag_options): Likewise to the passed-on options.
4613 * opts.c (common_handle_option): Handle the new option.
4614 * selftest-diagnostic.c
4615 (test_diagnostic_context::test_diagnostic_context): Enable
4616 show_labels_p.
4617 * substring-locations.c: Include "gcc-rich-location.h".
4618 (format_warning_n_va): Add "fmt_label" and "param_label" params
4619 and use them as appropriate.
4620 (format_warning_va): Add "fmt_label" and "param_label" params,
4621 passing them on to format_warning_n_va.
4622 (format_warning_at_substring): Likewise.
4623 (format_warning_at_substring_n): Likewise.
4624 * substring-locations.h (format_warning_va): Add "fmt_label" and
4625 "param_label" params.
4626 (format_warning_n_va): Likewise.
4627 (format_warning_at_substring): Likewise.
4628 (format_warning_at_substring_n): Likewise.
4629 * toplev.c (general_init): Initialize global_dc->show_labels_p.
4630
4631 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
4632
4633 PR testsuite/86519
4634 * builtins.c (expand_builtin_memcmp): Do not expand the call
4635 when overflow is detected.
4636
4637 2018-08-15 Martin Sebor <msebor@redhat.com>
4638
4639 PR tree-optimization/71625
4640 * config/aarch64/aarch64-builtins.c
4641 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4642
4643 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
4644
4645 * config/s390/s390.c (s390_reorg): Remove loop.
4646
4647 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4648
4649 * config/darwin.c
4650 (darwin_function_switched_text_sections): Delete.
4651 * gcc/config/darwin.h
4652 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4653
4654 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4655
4656 PR target/81685
4657 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4658 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
4659 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4660
4661 2018-08-15 Martin Liska <mliska@suse.cz>
4662
4663 PR tree-optimization/86925
4664 * predict.c (expr_expected_value_1): When taking
4665 later predictor, assign also probability.
4666 Use fold_build2_initializer_loc in order to fold
4667 the expression in -frounding-math.
4668
4669 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
4670
4671 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4672 patterns.
4673 (expand_vec_perm_1): Try the new method.
4674
4675 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
4676
4677 PR target/86547
4678 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4679 Check whether lra_live_max_point is 0 before dividing.
4680
4681 2018-08-14 Martin Sebor <msebor@redhat.com>
4682
4683 PR tree-optimization/86650
4684 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4685 (vrp_prop::check_mem_ref): Same.
4686
4687 2018-08-13 Liu Hao <lh_mouse@126.com>
4688
4689 * pretty-print.c (eat_esc_sequence): Swap the foreground and
4690 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4691 and clear it thereafter, as it only works for DBCS.
4692
4693 2018-08-13 Liu Hao <lh_mouse@126.com>
4694
4695 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4696 handle returned by _get_osf_handle().
4697
4698 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4699
4700 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4701 for folding vec_perm.
4702
4703 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4704
4705 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4706 Add support for gimple-folding of vec_pack() and vec_unpack()
4707 intrinsics.
4708
4709 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4710
4711 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4712 vec_xst variants to the list.
4713 (rs6000_gimple_fold_builtin): Add support for folding unaligned
4714 vector loads and stores.
4715
4716 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
4717
4718 * config.gcc (rs6000-ibm-aix4.x): Delete.
4719 (rs6000-ibm-aix5.1): Delete.
4720 (rs6000-ibm-aix5.2): Delete.
4721 (rs6000-ibm-aix5.3): Delete.
4722 * config/rs6000/aix43.h: Delete.
4723 * config/rs6000/aix51.h: Delete.
4724 * config/rs6000/aix52.h: Delete.
4725 * config/rs6000/t-aix43: Delete.
4726
4727 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
4728
4729 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4730 New function.
4731 (s390_decompose_address): Factor out constant pool ref
4732 decomposition.
4733
4734 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4735
4736 * config/nds32/nds32-predicates.c
4737 (nds32_can_use_bclr_p): Change return type as bool.
4738 (nds32_can_use_bset_p): Ditto.
4739 (nds32_can_use_btgl_p): Ditto.
4740 (nds32_can_use_bitci_p): Ditto.
4741 * config/nds32/nds32-protos.h
4742 (nds32_can_use_bclr_p): Change declaration.
4743 (nds32_can_use_bset_p): Ditto.
4744 (nds32_can_use_btgl_p): Ditto.
4745 (nds32_can_use_bitci_p): Ditto.
4746
4747 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4748
4749 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4750 Support -msched-prolog-epilog option.
4751 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4752
4753 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4754
4755 * common/config/nds32/nds32-common.c
4756 (nds32_option_optimization_table): Enalbe -malways-align.
4757
4758 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4759
4760 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4761 extra_headers.
4762 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4763 OPT_misr_secure_ case.
4764 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4765 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4766 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4767 secure attribute.
4768 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4769 (nds32_isr_info): New field security_level.
4770 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4771 * config/nds32/nds32.md (return_internal): Consider critical attribute.
4772 * config/nds32/nds32.opt (misr-secure): New option.
4773 * config/nds32/nds32_init.inc: New file.
4774 * config/nds32/nds32_isr.h: New file.
4775
4776 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
4777
4778 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4779 Update comment for atomic instructions.
4780 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4781 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
4782 Remove.
4783 (atomic_loaddi): Revise fence expansion to only emit fence prior to
4784 load for __ATOMIC_SEQ_CST model.
4785 (atomic_loaddi_1): Remove float register target.
4786 (atomic_storedi): Handle CONST_INT values.
4787 (atomic_storedi_1): Remove float register source. Add special case
4788 for zero value.
4789 (memory_barrier): New expander and insn.
4790
4791 2018-08-11 Jakub Jelinek <jakub@redhat.com>
4792
4793 PR tree-optimization/86835
4794 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
4795 new_stmt after def_gsi, make sure to insert new_square_stmt after
4796 that stmt, not 2 stmts before it.
4797
4798 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
4799
4800 PR target/82418
4801 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
4802 instead of SWI48.
4803
4804 2018-08-10 Martin Liska <mliska@suse.cz>
4805
4806 PR target/83610
4807 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
4808 function type.
4809 * builtins.c (expand_builtin_expect_with_probability):
4810 New function.
4811 (expand_builtin_expect_with_probability): New function.
4812 (build_builtin_expect_predicate): Add new argumnet probability
4813 for BUILT_IN_EXPECT_WITH_PROBABILITY.
4814 (fold_builtin_expect):
4815 (fold_builtin_2):
4816 (fold_builtin_3):
4817 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
4818 * builtins.h (fold_builtin_expect): Set new argument.
4819 * doc/extend.texi: Document __builtin_expect_with_probability.
4820 * doc/invoke.texi: Likewise.
4821 * gimple-fold.c (gimple_fold_call): Pass new argument.
4822 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
4823 also BUILT_IN_EXPECT_WITH_PROBABILITY.
4824 * predict.c (get_predictor_value): New function.
4825 (expr_expected_value): Add new argument probability. Assume
4826 that predictor and probability are always non-null.
4827 (expr_expected_value_1): Likewise. For __builtin_expect and
4828 __builtin_expect_with_probability set probability. Handle
4829 combination in binary expressions.
4830 (tree_predict_by_opcode): Simplify code by simply calling
4831 get_predictor_value.
4832 (pass_strip_predict_hints::execute): Add handling of
4833 BUILT_IN_EXPECT_WITH_PROBABILITY.
4834 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
4835 new predictor.
4836 * tree.h (DECL_BUILT_IN_P): New function.
4837
4838 2018-08-10 Martin Liska <mliska@suse.cz>
4839
4840 PR tree-optimization/85799
4841 * passes.def: Add argument for pass_strip_predict_hints.
4842 * predict.c (class pass_strip_predict_hints): Add new argument
4843 early_p.
4844 (strip_predictor_early): New function.
4845 (pass_strip_predict_hints::execute): Call the function to
4846 strip predictors.
4847 (strip_predict_hints): New function.
4848 * predict.def: Fix comment.
4849
4850 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
4851
4852 * Makefile.in: Clarify which tm.texi to copy over to assert the
4853 right to grant a GFDL license for all.
4854
4855 2018-08-09 Jeff Law <law@redhat.com>
4856
4857 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
4858 unused variable.
4859
4860 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
4861
4862 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
4863 prototype.
4864
4865 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
4866
4867 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
4868 reductions for variable-length vectors.
4869
4870 2018-08-09 David Malcolm <dmalcolm@redhat.com>
4871
4872 PR other/84889
4873 * common.opt (fdiagnostics-show-line-numbers): New option.
4874 * diagnostic-show-locus.c (class layout): Add fields
4875 "m_show_line_numbers_p" and "m_linenum_width";
4876 (num_digits): New function.
4877 (test_num_digits): New function.
4878 (layout::layout): Initialize new fields. Update m_x_offset
4879 logic to handle any left margin.
4880 (layout::print_source_line): Print line number when requested.
4881 (layout::start_annotation_line): New member function.
4882 (layout::print_annotation_line): Call it.
4883 (layout::print_leading_fixits): Likewise.
4884 (layout::print_trailing_fixits): Likewise. Update calls to
4885 move_to_column for new parameter.
4886 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
4887 it to potentially call start_annotation_line.
4888 (layout::show_ruler): Call start_annotation_line.
4889 (selftest::test_line_numbers_multiline_range): New selftest.
4890 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
4891 and selftest::test_line_numbers_multiline_range.
4892 * diagnostic.c (diagnostic_initialize): Initialize
4893 show_line_numbers_p.
4894 * diagnostic.h (struct diagnostic_context): Add field
4895 "show_line_numbers_p".
4896 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4897 -fno-diagnostics-show-line-numbers.
4898 * dwarf2out.c (gen_producer_string): Add
4899 OPT_fdiagnostics_show_line_numbers to the ignored options.
4900 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
4901 one setting" options.
4902 (append_compiler_options): Likewise to the dropped options.
4903 (append_diag_options): Likewise to the passed-on options.
4904 * opts.c (common_handle_option): Handle the new option.
4905 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
4906
4907 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
4908
4909 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
4910 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
4911 third argument of type "const signed char" to descriptions of
4912 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
4913 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
4914 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
4915 __builtin_bcdsub_ov functions.
4916
4917 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
4918
4919 PR tree-optimization/86858
4920 * tree-vect-loop.c (vect_is_simple_reduction): Restore
4921 flow_bb_inside_loop_p calls.
4922
4923 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
4924
4925 PR tree-optimization/86871
4926 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
4927 instead of gimple_assign_lhs.
4928
4929 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
4930
4931 PR target/86887
4932 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
4933 register constraint to operand 0.
4934 (add<mode>3_carryinC): Likewise.
4935 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
4936
4937 2018-08-09 Martin Liska <mliska@suse.cz>
4938
4939 PR c/86895
4940 * common.opt: Remove extra line.
4941
4942 2018-08-09 Martin Liska <mliska@suse.cz>
4943
4944 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
4945 at the end of a line, make first letter capital and end up
4946 a sentence with a dot.
4947 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
4948 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
4949 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
4950 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
4951 (PARAM_MAX_ISL_OPERATIONS): Likewise.
4952 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
4953 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
4954 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
4955 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
4956 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
4957 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
4958 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
4959 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
4960 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
4961 (PARAM_TREE_REASSOC_WIDTH): Likewise.
4962 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
4963 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
4964 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
4965
4966 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
4967
4968 PR target/84332
4969 * config/s390/s390.c (s390_option_override_internal): Reduce the
4970 stack-clash-protection-probe-interval param if it would be too big
4971 for z900.
4972
4973 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
4974
4975 PR target/46179
4976 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
4977 * config/m68k/m68k.c (handle_move_double): Don't call
4978 m68k_final_prescan_insn.
4979 (m68k_adjust_decorated_operand): Renamed from
4980 m68k_final_prescan_insn, remove first and third operand and
4981 simplify.
4982 (print_operand): Call it.
4983 (print_operand_address): Call it.
4984
4985 2018-08-08 Nathan Sidwell <nathan@acm.org>
4986
4987 * diagnostic.c (diagnostic_report_current_module): Use
4988 linemap_included_from & linemap_included_from_linemap.
4989
4990 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
4991
4992 * config/aarch64/aarch64-cores.def: Add phecda core.
4993 * config/aarch64/aarch64-tune.md: Regenerate.
4994 * doc/invoke.texi: Add phecda core.
4995
4996 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
4997
4998 PR target/85295
4999 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5000 definitions.
5001 * config/s390/s390.md ("movti"): Add more alternatives for
5002 constant to GPR copies.
5003
5004 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5005
5006 * config/s390/s390.c: Fix whitespace damage throughout the file.
5007 * config/s390/s390.h: Likewise.
5008 * config/s390/tpf.h: Likewise.
5009
5010 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5011
5012 * config/s390/s390.c (s390_loadrelative_operand_p):
5013 Remove TARGET_CPU_ZARCH usages.
5014 (s390_rtx_costs): Likewise.
5015 (s390_legitimate_constant_p): Likewise.
5016 (s390_cannot_force_const_mem): Likewise.
5017 (legitimate_reload_constant_p): Likewise.
5018 (s390_preferred_reload_class): Likewise.
5019 (legitimize_pic_address): Likewise.
5020 (legitimize_tls_address): Likewise.
5021 (s390_split_branches): Removed.
5022 (s390_add_execute): Removed.
5023 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5024 (s390_mainpool_start): Likewise.
5025 (s390_mainpool_finish): Likewise.
5026 (s390_mainpool_cancel): Removed.
5027 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5028 (s390_chunkify_cancel): Likewise.
5029 (s390_return_addr_rtx): Likewise.
5030 (s390_register_info): Remove split_branches_pending_p uages.
5031 (s390_optimize_register_info): Likewise.
5032 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5033 split_branches_pending_p usages.
5034 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5035 (s390_load_got): Likewise.
5036 (s390_expand_split_stack_prologue): Likewise.
5037 (output_asm_nops): Likewise.
5038 (s390_function_profiler): Likewise.
5039 (s390_emit_call): Likewise.
5040 (s390_conditional_register_usage): Likewise.
5041 (s390_optimize_prologue): Likewise.
5042 (s390_reorg): Remove TARGET_CPU_ZARCH and
5043 split_branches_pending_p usages.
5044 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5045 usages.
5046 (s390_output_indirect_thunk_function): Likewise.
5047 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5048 (TARGET_CPU_ZARCH_P): Removed.
5049 (struct machine_function): Remove split_branches_pending_p.
5050 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5051
5052 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5053
5054 * common/config/s390/s390-common.c (processor_flags_table):
5055 Remove flags.
5056 * config.gcc: Remove with_arch/with_tune support.
5057 * config/s390/2064.md: Remove cpu attribute comparisons.
5058 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5059 Remove MTN.
5060 * config/s390/linux.h (ASM_SPEC):
5061 Remove -march support.
5062 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5063 Use a table to get an arch level.
5064 * config/s390/s390-opts.h (enum processor_type):
5065 Remove enum values.
5066 * config/s390/s390.c
5067 (processor_table): Remove entries, add arch_level values.
5068 (s390_issue_rate): Remove cases.
5069 (s390_option_override): Adjust
5070 s390_option_override_internal() call.
5071 (s390_option_override_internal): Remove deprecation warning.
5072 (s390_valid_target_attribute_tree): Adjust
5073 s390_option_override_internal() call.
5074 * config/s390/s390.h (struct s390_processor):
5075 Share with s390-c.c, add arch_level field.
5076 * config/s390/s390.md:
5077 Remove occurrences in cpu attribute.
5078 * config/s390/s390.opt: Remove -march/-mtune support.
5079 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5080 * doc/invoke.texi: Remove deprecation warning.
5081
5082 2018-08-08 Luis Machado <luis.machado@linaro.org>
5083
5084 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5085 global.
5086 (qdf24xx_tunings): Set vector cost structure to
5087 qdf24xx_vector_cost.
5088
5089 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5090 <register_sextend>: Set to 3.
5091
5092 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5093
5094 PR target/86838
5095 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5096 * config/aarch64/aarch64-simd.md
5097 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5098 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5099 (aarch64_frecpx<mode>): ...this new pattern.
5100 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5101 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5102
5103 2018-08-07 Martin Liska <mliska@suse.cz>
5104
5105 PR middle-end/83023
5106 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5107 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5108 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5109 * doc/extend.texi: Document that malloc attribute adds
5110 hit to compiler.
5111
5112 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5113
5114 PR target/86785
5115 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5116 Define to speculation_safe_value_not_needed.
5117
5118 2018-08-06 Jeff Law <law@redhat.com>
5119
5120 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5121 the vr_values instance to cprop_into_stmt.
5122 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5123 (cprop_operand): Also query EVRP to determine if OP is a constant.
5124
5125 2018-08-06 Nathan Sidwell <nathan@acm.org>
5126
5127 * diagnostic.c (diagnostic_report_current_module): Reroll
5128 included-at loop. Translate text.
5129
5130 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5131
5132 * function-tests.c (selftest::test_expansion_to_rtl): Call
5133 free_after_compilation.
5134
5135 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5136
5137 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5138
5139 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5140
5141 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5142 loops with memory block operations from getting unrolled.
5143
5144 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5145
5146 PR target/86807
5147 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5148 Define to speculation_safe_value_not_needed.
5149
5150 2018-08-06 Jeff Law <law@redhat.com>
5151
5152 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5153 assert.
5154
5155 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5156
5157 PR target/86662
5158 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5159 with all enabled __intN types.
5160
5161 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5162
5163 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5164
5165 * alias.c (record_set): Check for clobber high.
5166 * cfgexpand.c (expand_gimple_stmt): Likewise.
5167 * combine-stack-adj.c (single_set_for_csa): Likewise.
5168 * combine.c (find_single_use_1): Likewise.
5169 (set_nonzero_bits_and_sign_copies): Likewise.
5170 (get_combine_src_dest): Likewise.
5171 (is_parallel_of_n_reg_sets): Likewise.
5172 (try_combine): Likewise.
5173 (record_dead_and_set_regs_1): Likewise.
5174 (reg_dead_at_p_1): Likewise.
5175 (reg_dead_at_p): Likewise.
5176 * dce.c (deletable_insn_p): Likewise.
5177 (mark_nonreg_stores_1): Likewise.
5178 (mark_nonreg_stores_2): Likewise.
5179 * df-scan.c (df_find_hard_reg_defs): Likewise.
5180 (df_uses_record): Likewise.
5181 (df_get_call_refs): Likewise.
5182 * dwarf2out.c (mem_loc_descriptor): Likewise.
5183 * haifa-sched.c (haifa_classify_rtx): Likewise.
5184 * ira-build.c (create_insn_allocnos): Likewise.
5185 * ira-costs.c (scan_one_insn): Likewise.
5186 * ira.c (equiv_init_movable_p): Likewise.
5187 (rtx_moveable_p): Likewise.
5188 (interesting_dest_for_shprep): Likewise.
5189 * jump.c (mark_jump_label_1): Likewise.
5190 * postreload-gcse.c (record_opr_changes): Likewise.
5191 * postreload.c (reload_cse_simplify): Likewise.
5192 (struct reg_use): Add source expr.
5193 (reload_combine): Check for clobber high.
5194 (reload_combine_note_use): Likewise.
5195 (reload_cse_move2add): Likewise.
5196 (move2add_note_store): Likewise.
5197 * print-rtl.c (print_pattern): Likewise.
5198 * recog.c (decode_asm_operands): Likewise.
5199 (store_data_bypass_p): Likewise.
5200 (if_test_bypass_p): Likewise.
5201 * regcprop.c (kill_clobbered_value): Likewise.
5202 (kill_set_value): Likewise.
5203 * reginfo.c (reg_scan_mark_refs): Likewise.
5204 * reload1.c (maybe_fix_stack_asms): Likewise.
5205 (eliminate_regs_1): Likewise.
5206 (elimination_effects): Likewise.
5207 (mark_not_eliminable): Likewise.
5208 (scan_paradoxical_subregs): Likewise.
5209 (forget_old_reloads_1): Likewise.
5210 * reorg.c (find_end_label): Likewise.
5211 (try_merge_delay_insns): Likewise.
5212 (redundant_insn): Likewise.
5213 (own_thread_p): Likewise.
5214 (fill_simple_delay_slots): Likewise.
5215 (fill_slots_from_thread): Likewise.
5216 (dbr_schedule): Likewise.
5217 * resource.c (update_live_status): Likewise.
5218 (mark_referenced_resources): Likewise.
5219 (mark_set_resources): Likewise.
5220 * rtl.c (copy_rtx): Likewise.
5221 * rtlanal.c (reg_referenced_p): Likewise.
5222 (single_set_2): Likewise.
5223 (noop_move_p): Likewise.
5224 (note_stores): Likewise.
5225 * sched-deps.c (sched_analyze_reg): Likewise.
5226 (sched_analyze_insn): Likewise.
5227
5228 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5229
5230 * cse.c (invalidate_reg): New function extracted from...
5231 (invalidate): ...here.
5232 (canonicalize_insn): Check for clobber high.
5233 (invalidate_from_clobbers): invalidate clobber highs.
5234 (invalidate_from_sets_and_clobbers): Likewise.
5235 (count_reg_usage): Check for clobber high.
5236 (insn_live_p): Likewise.
5237 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5238 (cselib_invalidate_regno): Check for clobber in setter.
5239 (cselib_invalidate_rtx): Pass through setter.
5240 (cselib_invalidate_rtx_note_stores):
5241 (cselib_process_insn): Check for clobber high.
5242 * cselib.h (cselib_invalidate_rtx): Add operand.
5243
5244 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5245
5246 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5247 (mark_not_eliminable): Likewise.
5248 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5249 * lra-lives.c (process_bb_lives): Check for clobber high.
5250 * lra.c (new_insn_reg): Remember clobber highs.
5251 (collect_non_operand_hard_regs): Check for clobber high.
5252 (lra_set_insn_recog_data): Likewise.
5253 (add_regs_to_insn_regno_info): Likewise.
5254 (lra_update_insn_regno_info): Likewise.
5255
5256 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5257
5258 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5259 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5260
5261 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5262
5263 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5264 (copy_insn_1): Likewise.
5265 (gen_hard_reg_clobber_high): New gen function.
5266 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5267 * genemit.c (gen_exp): Likewise.
5268 (gen_emit_seq): Pass through info.
5269 (gen_insn): Check for CLOBBER_HIGH.
5270 (gen_expand): Pass through info.
5271 (gen_split): Likewise.
5272 (output_add_clobbers): Likewise.
5273 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5274 (remove_clobbers): Likewise.
5275 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5276
5277 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5278
5279 * doc/rtl.texi (clobber_high): Add.
5280 (parallel): Add in clobber high
5281 * rtl.c (rtl_check_failed_code3): Add function.
5282 * rtl.def (CLOBBER_HIGH): Add expression.
5283 * rtl.h (RTL_CHECKC3): Add macro.
5284 (rtl_check_failed_code3): Add declaration.
5285 (XC3EXP): Add macro.
5286
5287 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5288
5289 PR target/86386
5290 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5291 cfun->machine->max_used_stack_alignment if needed.
5292
5293 2018-08-04 Martin Sebor <msebor@redhat.com>
5294
5295 PR tree-optimization/86571
5296 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5297 NaN output to 4.
5298
5299 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5300
5301 PR target/86799
5302 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5303 Define.
5304
5305 2018-08-03 Jeff Law <law@redhat.com>
5306
5307 PR target/86795
5308 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5309 Define to speculation_safe_value_not_needed.
5310
5311 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5312
5313 * doc/gcov.texi (-x): Remove duplicate "to".
5314 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5315 (-Wif-not-aligned): Remove duplicate "is".
5316 (-flto): Remove duplicate "the".
5317 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5318 duplicate "v5.00.b".
5319 (MSP430 Options): Remove duplicate "and" from the description
5320 of "-mgprel-sec=regexp".
5321 (x86 Options): Remove duplicate copies of "vmldLog102" and
5322 vmlsLog104 from description of "-mveclibabi=type".
5323
5324 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5325
5326 * internal-fn.h (first_commutative_argument): Declare.
5327 * internal-fn.c (first_commutative_argument): New function.
5328 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5329 restrictions for pattern statements. Use first_commutative_argument
5330 to look for commutative operands in calls to internal functions.
5331
5332 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5333
5334 * Makefile.in (wide-int-range.o): New.
5335 * tree-vrp.c: Move all the wide_int_* functions to...
5336 * wide-int-range.cc: ...here.
5337 * tree-vrp.h: Move all the wide_int_* prototypes to...
5338 * wide-int-range.h: ...here.
5339
5340 2018-08-03 Tom de Vries <tdevries@suse.de>
5341
5342 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5343 UI_NONE.
5344 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5345 * except.c (output_function_exception_table): Do early exit if
5346 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5347
5348 2018-08-03 Martin Liska <mliska@suse.cz>
5349
5350 * predict.c (dump_prediction): Change to 2 digits
5351 in fraction part.
5352
5353 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5354
5355 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5356 neon_dup_q to...
5357 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5358
5359 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5360
5361 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5362 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5363 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5364 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5365 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5366
5367 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5368
5369 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5370 pp_take_prefix when saving the existing prefix.
5371 * diagnostic.c (diagnostic_append_note): Likewise.
5372 * langhooks.c (lhd_print_error_function): Likewise.
5373 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5374 param's type. Free the existing prefix.
5375 (pp_take_prefix): New function.
5376 (pretty_printer::pretty_printer): Drop the prefix parameter.
5377 Rename the length parameter to match the comment.
5378 (pretty_printer::~pretty_printer): Free the prefix.
5379 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5380 parameter.
5381 (struct pretty_printer): Drop the "const" from "prefix" field's
5382 type and clarify memory management.
5383 (pp_set_prefix): Drop the "const" from the 2nd param.
5384 (pp_take_prefix): New decl.
5385
5386 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5387
5388 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5389 for word_mode_ok here instead of passing as argument.
5390 (expand_block_compare): Change select_block_compare_mode() call.
5391 (expand_strncmp_gpr_sequence): New function.
5392 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5393
5394 2018-08-02 Jeff Law <law@redhat.com>
5395
5396 PR target/86790
5397 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5398 Define to speculation_safe_value_not_needed.
5399
5400 PR target/86784
5401 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5402 Define to speculation_safe_value_not_needed.
5403
5404 2018-08-02 Tom de Vries <tdevries@suse.de>
5405
5406 PR target/86660
5407 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5408 function. Return UI_TARGET unconditionally.
5409 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5410 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5411
5412 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5413
5414 * genemit.c (print_overload_test): Fix typo.
5415
5416 2018-08-02 Richard Biener <rguenther@suse.de>
5417
5418 PR tree-optimization/86816
5419 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5420 which checks for value availability before querying it.
5421 (gvn_uses_equal): Use it.
5422 (same_succ_hash): Likewise.
5423 (gimple_equal_p): Likewise.
5424
5425 2018-08-02 Nick Clifton <nickc@redhat.com>
5426
5427 PR target/86813
5428 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5429 Define to speculation_safe_value_not_needed.
5430
5431 PR target/86810
5432 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5433 Define to speculation_safe_value_not_needed.
5434
5435 PR target/86810
5436 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5437 Define to speculation_safe_value_not_needed.
5438
5439 PR target/86803
5440 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5441 Define to speculation_safe_value_not_needed.
5442
5443 PR target/86797
5444 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5445 Define to speculation_safe_value_not_needed.
5446
5447 PR target/86791
5448 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5449 Define to speculation_safe_value_not_needed.
5450
5451 PR target/86789
5452 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5453 Define to speculation_safe_value_not_needed.
5454
5455 PR target/86787
5456 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5457 Define to speculation_safe_value_not_needed.
5458
5459 PR target/86782
5460 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5461 speculation_safe_value_not_needed.
5462
5463 PR target/86781
5464 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5465 to speculation_safe_value_not_needed.
5466
5467 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5468
5469 * doc/md.texi: Expand the documentation of instruction names
5470 to mention port-local uses. Document '@' in pattern names.
5471 * read-md.h (overloaded_instance, overloaded_name): New structs.
5472 (mapping): Declare.
5473 (md_reader::handle_overloaded_name): New member function.
5474 (md_reader::get_overloads): Likewise.
5475 (md_reader::m_first_overload): New member variable.
5476 (md_reader::m_next_overload_ptr): Likewise.
5477 (md_reader::m_overloads_htab): Likewise.
5478 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5479 m_next_overload_ptr and m_overloads_htab.
5480 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5481 (get_mode_token, get_code_token, get_int_token): New functions.
5482 (map_attr_string): Add an optional argument that passes back
5483 the associated iterator.
5484 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5485 (md_reader::handle_overloaded_name, add_overload_instance): New
5486 functions.
5487 (apply_iterators): Handle '@' names. Report an error if '@'
5488 is used without iterators.
5489 (initialize_iterators): Initialize the new iterator_group fields.
5490 * genopinit.c (handle_overloaded_code_for)
5491 (handle_overloaded_gen): New functions.
5492 (main): Use them to print declarations of maybe_code_for_* and
5493 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5494 * genemit.c (print_overload_arguments, print_overload_test)
5495 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5496 (main): Use it to print definitions of maybe_code_for_* and
5497 maybe_gen_* functions.
5498 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5499 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5500 instead of explicit mode checks.
5501 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5502 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5503 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5504 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5505 (aarch64_expand_compare_and_swap): Likewise
5506 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5507 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5508 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5509 (aarch64_constant_pool_reload_icode): Delete.
5510 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5511 instead of aarch64_constant_pool_reload_icode. Use
5512 code_for_aarch64_reload_mov instead of explicit mode checks.
5513 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5514 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5515 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5516 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5517 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5518 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5519 (aarch64_atomic_load_op_code): Delete.
5520 (aarch64_emit_atomic_load_op): Likewise.
5521 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5522 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
5523 instead of aarch64_emit_atomic_load_op.
5524 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5525 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5526 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5527 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5528 character before the pattern name.
5529 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5530 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5531 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5532 (aarch64_frecps<mode>): Likewise.
5533 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5534 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5535 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5536 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5537 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5538
5539 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5540
5541 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5542 Allow HFmode constants if TARGET_FP_F16INST.
5543
5544 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
5545
5546 PR target/86014
5547 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5548 No longer check last store for clobber of address register.
5549
5550 2018-08-02 Martin Liska <mliska@suse.cz>
5551
5552 PR gcov-profile/86817
5553 * gcov.c (process_all_functions): New function.
5554 (main): Call it.
5555 (process_file): Move functions processing to
5556 process_all_functions.
5557
5558 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5559
5560 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5561 "const" to the "gimple *" and "rtx_insn *" parameters.
5562 * dumpfile.h (dump_user_location_t::dump_user_location_t):
5563 Likewise.
5564 (dump_location_t::dump_location_t): Likewise.
5565
5566 2018-08-01 Martin Sebor <msebor@redhat.com>
5567
5568 PR tree-optimization/86650
5569 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5570 rather than a "gcall *". Directly pass the data of interest
5571 to percent_K_format, rather than building a temporary CALL_EXPR
5572 to hold it.
5573 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5574 (gimple_fold_builtin_strncat): Adjust.
5575 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5576 gcall* argument with gimple*.
5577 * gimple-ssa-warn-restrict.c (check_call): Same.
5578 (wrestrict_dom_walker::before_dom_children): Same.
5579 (builtin_access::builtin_access): Same.
5580 (check_bounds_or_overlap): Same
5581 (maybe_diag_overlap): Same.
5582 (maybe_diag_offset_bounds): Same.
5583 * tree-diagnostic.c (default_tree_printer): Move usage of
5584 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5585 to this callsite.
5586 * tree-pretty-print.c (percent_K_format): Add argument.
5587 * tree-pretty-print.h: Add argument.
5588 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5589 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5590 (maybe_diag_stxncpy_trunc): Same.
5591 (handle_builtin_stxncpy): Same.
5592 (handle_builtin_strcat): Same.
5593
5594 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5595
5596 * match.pd: Optimise pointer range checks.
5597
5598 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5599
5600 PR tree-optimization/86758
5601 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5602 to remove pattern statements.
5603
5604 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5605
5606 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5607 result of dfs_enumerate_from when constructing stmt_vec_infos,
5608 instead of additionally calling get_loop_body.
5609
5610 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5611
5612 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5613 parameter.
5614 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5615 When creating an iv, assert that the step is not known to be zero.
5616 (vect_setup_realignment): Update call accordingly.
5617 * tree-vect-stmts.c (vectorizable_store): Likewise.
5618 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
5619
5620 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5621
5622 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5623 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5624 (vectorizable_reduction): Likewise.
5625 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5626 (vect_detect_hybrid_slp_stmts): Likewise.
5627 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5628
5629 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
5630
5631 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5632 (wide_int_set_zero_nonzero_bits): ...this.
5633 (zero_nonzero_bits_from_vr): Rename to...
5634 (vrp_set_zero_nonzero_bits): ...this.
5635 (extract_range_from_multiplicative_op_1): Abstract wide int
5636 code...
5637 (wide_int_range_multiplicative_op): ...here.
5638 (extract_range_from_binary_expr_1): Extract wide int binary
5639 operations into their own functions.
5640 (wide_int_range_lshift): New.
5641 (wide_int_range_can_optimize_bit_op): New.
5642 (wide_int_range_shift_undefined_p): New.
5643 (wide_int_range_bit_xor): New.
5644 (wide_int_range_bit_ior): New.
5645 (wide_int_range_bit_and): New.
5646 (wide_int_range_trunc_mod): New.
5647 (extract_range_into_wide_ints): New.
5648 (vrp_shift_undefined_p): New.
5649 (extract_range_from_multiplicative_op): New.
5650 (vrp_can_optimize_bit_op): New.
5651 * tree-vrp.h (value_range::dump): New.
5652 (wide_int_range_multiplicative_op): New.
5653 (wide_int_range_lshift):New.
5654 (wide_int_range_shift_undefined_p): New.
5655 (wide_int_range_bit_xor): New.
5656 (wide_int_range_bit_ior): New.
5657 (wide_int_range_bit_and): New.
5658 (wide_int_range_trunc_mod): New.
5659 (zero_nonzero_bits_from_bounds): Rename to...
5660 (wide_int_set_zero_nonzero_bits): ...this.
5661 (zero_nonzero_bits_from_vr): Rename to...
5662 (vrp_set_zero_nonzero_bits): ...this.
5663 (range_easy_mask_min_max): Rename to...
5664 (wide_int_range_can_optimize_bit_op): this.
5665 * vr-values.c (simplify_bit_ops_using_ranges): Rename
5666 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5667
5668 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5669
5670 * tree-vectorizer.h (vect_orig_stmt): New function.
5671 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5672 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5673 (vect_create_epilog_for_reduction): Likewise.
5674 (vectorizable_live_operation): Likewise.
5675 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5676 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5677 * tree-vect-stmts.c (vectorizable_call): Likewise.
5678 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5679
5680 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5681
5682 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5683 argument.
5684 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5685 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5686 (vect_transform_loop): Likewise.
5687 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5688
5689 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5690
5691 * tree-vectorizer.h (vect_schedule_slp): Return void.
5692 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5693 (vect_schedule_slp): Likewise.
5694
5695 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5696
5697 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5698 argument.
5699 (vect_transform_loop): Update calls accordingly. Schedule SLP
5700 instances before the main loop, if any exist.
5701
5702 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5703
5704 PR tree-optimization/86749
5705 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5706 If the lhs is used in a COND_EXPR, check that it is being used
5707 as the "then" or "else" value.
5708
5709 2018-08-01 Tom de Vries <tdevries@suse.de>
5710
5711 PR target/86800
5712 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5713 speculation_safe_value_not_needed.
5714
5715 2018-08-01 Richard Biener <rguenther@suse.de>
5716
5717 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5718 as base and offset.
5719
5720 2018-08-01 Martin Liska <mliska@suse.cz>
5721
5722 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5723 format how successful transformation is dumped.
5724 (gimple_mod_pow2_value_transform): Likewise.
5725 (gimple_mod_subtract_transform): Likewise.
5726 (gimple_stringops_transform): Likewise.
5727
5728 2018-08-01 Martin Liska <mliska@suse.cz>
5729
5730 PR value-prof/35543
5731 * value-prof.c (interesting_stringop_to_profile_p):
5732 Simplify the code and add BUILT_IN_MEMMOVE.
5733 (gimple_stringops_transform): Likewise.
5734
5735 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
5736
5737 * config/aarch64/aarch64-simd.md
5738 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5739 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5740 use GPI iterator instead of SI mode.
5741
5742 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
5743
5744 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5745 rs6000_speculation_barrier.
5746 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5747 new barrier pattern name.
5748
5749 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
5750
5751 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5752 (speculation_barrier): New insn.
5753
5754 2018-08-01 Richard Biener <rguenther@suse.de>
5755
5756 PR bootstrap/86724
5757 * graphite.h: Include isl/id.h and isl/space.h to allow build
5758 with ISL 0.20.
5759
5760 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
5761
5762 PR target/86651
5763 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5764 mode for COFF targets.
5765 * defaults.h (TARGET_COFF): Define.
5766 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5767 TARGET_COFF): Define.
5768 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5769 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5770 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5771
5772 2018-07-31 Alexandre Oliva <oliva@adacore.com>
5773
5774 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5775 * gimple-streamer-out.c (output_bb): Save it.
5776 * lto-streamer-in.c (input_struct_function_base): Restore
5777 instance discriminator if available. Create map on demand.
5778 * lto-streamer-out.c (output_struct_function_base): Save it if
5779 available.
5780 * final.c (decl_to_instance_map): Document LTO strategy.
5781
5782 2018-07-31 Alexandre Oliva <oliva@adacore.com>
5783 Olivier Hainque <hainque@adacore.com>
5784
5785 * debug.h (decl_to_instance_map_t): New type.
5786 (decl_to_instance_map): Declare.
5787 (maybe_create_decl_to_instance_map): New inline function.
5788 * final.c (bb_discriminator, last_bb_discriminator): New statics,
5789 to track basic block discriminators.
5790 (final_start_function_1): Initialize them.
5791 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
5792 bb_discriminator.
5793 (decl_to_instance_map): New variable.
5794 (map_decl_to_instance, maybe_set_discriminator): New functions.
5795 (notice_source_line): Set discriminator.
5796
5797 2018-07-31 Ian Lance Taylor <iant@golang.org>
5798
5799 * targhooks.c (default_have_speculation_safe_value): Add
5800 ATTRIBUTE_UNUSED.
5801
5802 2018-07-31 David Malcolm <dmalcolm@redhat.com>
5803
5804 * dump-context.h: Include "pretty-print.h".
5805 (dump_context::refresh_dumps_are_enabled): New decl.
5806 (dump_context::emit_item): New decl.
5807 (class dump_context): Add fields "m_test_pp" and
5808 "m_test_pp_flags".
5809 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5810 (temp_dump_context::get_dumped_text): New decl.
5811 (class temp_dump_context): Add field "m_pp".
5812 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
5813 (dump_context::refresh_dumps_are_enabled): ...and add a test for
5814 m_test_pp.
5815 (set_dump_file): Update for above change.
5816 (set_alt_dump_file): Likewise.
5817 (dump_loc): New overload, taking a pretty_printer *.
5818 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
5819 to any test pretty-printer.
5820 (make_item_for_dump_gimple_stmt): New function, adapted from
5821 optinfo::add_gimple_stmt.
5822 (dump_context::dump_gimple_stmt): Call it, and use the result,
5823 eliminating the direct usage of dump_file and alt_dump_file in
5824 favor of indirectly using them via emit_item.
5825 (make_item_for_dump_gimple_expr): New function, adapted from
5826 optinfo::add_gimple_expr.
5827 (dump_context::dump_gimple_expr): Call it, and use the result,
5828 eliminating the direct usage of dump_file and alt_dump_file in
5829 favor of indirectly using them via emit_item.
5830 (make_item_for_dump_generic_expr): New function, adapted from
5831 optinfo::add_tree.
5832 (dump_context::dump_generic_expr): Call it, and use the result,
5833 eliminating the direct usage of dump_file and alt_dump_file in
5834 favor of indirectly using them via emit_item.
5835 (make_item_for_dump_printf_va): New function, adapted from
5836 optinfo::add_printf_va.
5837 (make_item_for_dump_printf): New function.
5838 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
5839 and use the result, eliminating the direct usage of dump_file and
5840 alt_dump_file in favor of indirectly using them via emit_item.
5841 (make_item_for_dump_dec): New function.
5842 (dump_context::dump_dec): Call it, and use the result,
5843 eliminating the direct usage of dump_file and alt_dump_file in
5844 favor of indirectly using them via emit_item.
5845 (make_item_for_dump_symtab_node): New function, adapted from
5846 optinfo::add_symtab_node.
5847 (dump_context::dump_symtab_node): Call it, and use the result,
5848 eliminating the direct usage of dump_file and alt_dump_file in
5849 favor of indirectly using them via emit_item.
5850 (dump_context::begin_scope): Reimplement, avoiding direct usage
5851 of dump_file and alt_dump_file in favor of indirectly using them
5852 via emit_item.
5853 (dump_context::emit_item): New member function.
5854 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5855 Set up test pretty-printer on the underlying context. Call
5856 refresh_dumps_are_enabled.
5857 (temp_dump_context::~temp_dump_context): Call
5858 refresh_dumps_are_enabled.
5859 (temp_dump_context::get_dumped_text): New member function.
5860 (selftest::verify_dumped_text): New function.
5861 (ASSERT_DUMPED_TEXT_EQ): New macro.
5862 (selftest::test_capture_of_dump_calls): Run all tests twice, with
5863 and then without optinfo enabled. Add uses of
5864 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
5865 * dumpfile.h: Update comment for the dump_* API.
5866 * optinfo-emit-json.cc
5867 (selftest::test_building_json_from_dump_calls): Update for new
5868 param for temp_dump_context ctor.
5869 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
5870 and "m_owned" field.
5871 (optinfo_item::~optinfo_item): Likewise.
5872 (optinfo::add_item): New member function.
5873 (optinfo::emit): Update comment.
5874 (optinfo::add_string): Delete.
5875 (optinfo::add_printf): Delete.
5876 (optinfo::add_printf_va): Delete.
5877 (optinfo::add_gimple_stmt): Delete.
5878 (optinfo::add_gimple_expr): Delete.
5879 (optinfo::add_tree): Delete.
5880 (optinfo::add_symtab_node): Delete.
5881 (optinfo::add_dec): Delete.
5882 * optinfo.h (class dump_context): New forward decl.
5883 (optinfo::add_item): New decl.
5884 (optinfo::add_string): Delete.
5885 (optinfo::add_printf): Delete.
5886 (optinfo::add_printf_va): Delete.
5887 (optinfo::add_gimple_stmt): Delete.
5888 (optinfo::add_gimple_expr): Delete.
5889 (optinfo::add_tree): Delete.
5890 (optinfo::add_symtab_node): Delete.
5891 (optinfo::add_dec): Delete.
5892 (optinfo::add_poly_int): Delete.
5893 (optinfo_item::optinfo_item): Remove "owned" param.
5894 (class optinfo_item): Remove field "m_owned".
5895
5896 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5897
5898 PR middle-end/86705
5899 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
5900 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
5901 requested variable alignment.
5902 (expand_one_ssa_partition): Likewise.
5903 (expand_one_var): Likewise.
5904
5905 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5906
5907 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5908 to speculation_safe_value_not_needed.
5909
5910 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5911
5912 * targhooks.h (speculation_safe_value_not_needed): New prototype.
5913 * targhooks.c (speculation_safe_value_not_needed): New function.
5914 * target.def (have_speculation_safe_value): Update documentation.
5915 * doc/tm.texi: Regenerated.
5916
5917 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5918
5919 * config/aarch64/iterators.md (ALLI_TI): New iterator.
5920 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
5921 expand.
5922 (despeculate_copy<ALLI:mode>_insn): New insn.
5923 (despeculate_copyti_insn): New insn.
5924 (despeculate_simple<ALLI:mode>): New insn
5925 (despeculate_simpleti): New insn.
5926 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
5927 function.
5928 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
5929 aarch64_speculation_safe_value.
5930 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
5931
5932 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5933
5934 * config/aarch64/aarch64-speculation.cc: New file.
5935 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
5936 before pass_reorder_blocks.
5937 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
5938 prototype.
5939 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
5940 X14 and X15 when tracking speculation.
5941 * config/aarch64/aarch64.md (register name constants): Add
5942 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
5943 (unspec): Add UNSPEC_SPECULATION_TRACKER.
5944 (speculation_barrier): New insn attribute.
5945 (cmp<mode>): Allow SP in comparisons.
5946 (speculation_tracker): New insn.
5947 (speculation_barrier): Add speculation_barrier attribute.
5948 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
5949 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
5950 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
5951
5952 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5953
5954 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
5955 aarch64_track_speculation is true.
5956 (tb<optab><mode>1): Likewise.
5957 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
5958 generate CB[N]Z when tracking speculation.
5959 (aarch64_split_compare_and_swap): Likewise.
5960 (aarch64_split_atomic_op): Likewise.
5961
5962 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5963
5964 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
5965
5966 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5967
5968 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
5969 (speculation_barrier): New insn.
5970
5971 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5972
5973 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
5974 * config/arm/arm.md (speculation_barrier): New expand.
5975 (speculation_barrier_insn): New pattern.
5976
5977 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5978
5979 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
5980 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
5981 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
5982 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
5983 list.
5984 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
5985 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
5986 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
5987 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
5988 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
5989 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
5990 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
5991 * builtins.c (expand_speculation_safe_value): New function.
5992 (expand_builtin): Call it.
5993 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
5994 * doc/extend.texi: Document __builtin_speculation_safe_value.
5995 * doc/md.texi: Document "speculation_barrier" pattern.
5996 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
5997 TARGET_HAVE_SPECULATION_SAFE_VALUE.
5998 * doc/tm.texi: Regenerated.
5999 * target.def (have_speculation_safe_value, speculation_safe_value): New
6000 hooks.
6001 * targhooks.c (default_have_speculation_safe_value): New function.
6002 (default_speculation_safe_value): New function.
6003 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6004 (default_speculation_safe_value): Add prototype.
6005
6006 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6007
6008 * dump-context.h (dump_context::dump_loc): New decl.
6009 * dumpfile.c (dump_context::dump_loc): New member function.
6010 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6011 and dump_gimple_stmt.
6012 (dump_context::dump_gimple_expr_loc): Likewise, using
6013 dump_gimple_expr.
6014 (dump_context::dump_generic_expr_loc): Likewise, using
6015 dump_generic_expr.
6016 (dump_context::dump_printf_loc_va): Likewise, using
6017 dump_printf_va.
6018 (dump_context::begin_scope): Explicitly using the global function
6019 "dump_loc", rather than the member function.
6020
6021 2018-07-31 Martin Sebor <msebor@redhat.com>
6022
6023 PR tree-optimization/86741
6024 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6025
6026 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6027
6028 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6029 depend on whether prefetch instructions will be emitted or not.
6030 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6031 will be emitted or not.
6032 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6033 (TARGET_SETMEM_PFD): New macros.
6034
6035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6036
6037 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6038 (NULL_STMT_VEC_INFO): Delete.
6039 (stmt_vec_info::operator*): Likewise.
6040 (stmt_vec_info::operator gimple *): Likewise.
6041 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6042 of NULL_STMT_VEC_INFO.
6043 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6044 (vect_reassociating_reduction_p): Likewise.
6045 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6046 (vectorizable_store): Likewise.
6047 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6048 (vec_info::free_stmt_vec_infos): Likewise.
6049
6050 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6051
6052 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6053 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6054
6055 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6056
6057 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6058 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6059 (vec_info::free_stmt_vec_info): New private member functions.
6060 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6061 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6062 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6063 set_stmt_vec_info_vec and free_stmt_vec_infos.
6064 * tree-vect-loop.c (_loop_vec_info): Remove call to
6065 set_stmt_vec_info_vec.
6066 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6067 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6068 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6069 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6070 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6071 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6072 with the clearing in the xcalloc.
6073 (stmt_vec_info_vec): Delete.
6074 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6075 (vectorize_loops): Likewise.
6076 (vec_info::~vec_info): Remove argument from call to
6077 free_stmt_vec_infos.
6078 (vec_info::add_stmt): Remove vinfo argument from call to
6079 new_stmt_vec_info.
6080
6081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6082
6083 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6084 rather than a gimple stmt.
6085 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6086 information for pattern statements when passed the original
6087 statement; instead wait to be passed the pattern statement itself.
6088 Don't call set_vinfo_for_stmt here.
6089 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6090 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6091 stmt_vec_infos here.
6092 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6093 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6094 stmt_vec_infos entry.
6095
6096 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6097
6098 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6099 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6100 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6101 * tree-vect-stmts.c (vectorizable_call): Likewise.
6102 (vectorizable_simd_clone_call): Likewise.
6103
6104 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6105
6106 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6107 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6108 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6109 * tree-vect-loop.c (vect_transform_loop): Likewise.
6110 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6111 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6112
6113 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6114
6115 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6116 (vect_dr_stmt): Delete.
6117 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6118 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6119 of DR_VECT_AUX.
6120 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6121 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6122 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6123 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6124 (vect_analyze_data_refs): Likewise.
6125 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6126 argument.
6127 (vect_find_same_alignment_drs): Likewise.
6128 (vect_slp_analyze_node_dependences): Update calls accordingly.
6129 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6130 instead of DR_VECT_AUX.
6131 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6132 of a vector data references. Use vec_info::lookup_dr instead of
6133 DR_VECT_AUX.
6134 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6135 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6136 instead of DR_VECT_AUX.
6137
6138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6139
6140 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6141 dr_vec_info.
6142 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6143 accordingly.
6144 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6145 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6146 (vect_gen_prolog_loop_niters): Likewise.
6147
6148 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6149
6150 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6151 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6152 (vect_known_alignment_in_bytes, vect_dr_behavior)
6153 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6154 instead of data_references. Update calls to other routines for
6155 which the same change has been made.
6156 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6157 dr_vec_infos instead of stmt_vec_infos.
6158 (vect_analyze_data_ref_dependence): Update call accordingly.
6159 (vect_slp_analyze_data_ref_dependence)
6160 (vect_record_base_alignments): Use DR_VECT_AUX.
6161 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6162 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6163 (vector_alignment_reachable_p, vect_get_data_access_cost)
6164 (vect_peeling_supportable, vect_analyze_group_access_1)
6165 (vect_analyze_group_access, vect_analyze_data_ref_access)
6166 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6167 (vect_compile_time_alias, vect_small_gap_p)
6168 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6169 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6170 instead of data_references. Update calls to other routines for
6171 which the same change has been made.
6172 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6173 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6174 (vect_slp_analyze_and_verify_node_alignment)
6175 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6176 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6177 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6178 above changes.
6179 (_vect_peel_info::dr): Replace with...
6180 (_vect_peel_info::dr_info): ...this new field.
6181 (vect_peeling_hash_get_most_frequent)
6182 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6183 (vect_peeling_hash_get_lowest_cost):
6184 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6185 routines for which the same change has been made.
6186 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6187 data_reference.
6188 * tree-vect-loop-manip.c (get_misalign_in_elems)
6189 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6190 above changes.
6191 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6192 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6193 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6194 (get_group_load_store_type, get_negative_load_store_type)
6195 (vect_get_data_ptr_increment, vectorizable_store)
6196 (vectorizable_load): Likewise.
6197 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6198 Update calls to other routines for which the same change has been made.
6199
6200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6201
6202 * tree-vectorizer.h (vec_info::move_dr): New member function.
6203 (dataref_aux): Rename to...
6204 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6205 (_stmt_vec_info::dr_aux): Update accordingly.
6206 (_stmt_vec_info::data_ref_info): Delete.
6207 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6208 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6209 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6210 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6211 of data_ref.
6212 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6213 (STMT_VINFO_DR_INFO): New macro.
6214 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6215 (set_dr_misalignment): Update after rename of dataref_aux.
6216 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6217 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6218 initialization of STMT_VINFO_DATA_REF.
6219 * tree-vectorizer.c (vec_info::move_dr): New function.
6220 * tree-vect-patterns.c (vect_recog_bool_pattern)
6221 (vect_recog_mask_conversion_pattern)
6222 (vect_recog_gather_scatter_pattern): Use it.
6223 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6224 the "dr" and "stmt" fields of dr_vec_info instead of
6225 STMT_VINFO_DATA_REF.
6226
6227 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6228
6229 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6230 (is_pattern_stmt_p): Use it.
6231 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6232 on pattern statements.
6233
6234 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6235
6236 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6237 original stmt as a stmt_vec_info rather than a gimple stmt.
6238 (vect_pattern_recog_1): Take the statement directly as a
6239 stmt_vec_info, rather than via a gimple_stmt_iterator.
6240 Update call to vect_mark_pattern_stmts.
6241 (vect_pattern_recog): Update calls accordingly.
6242
6243 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6244
6245 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6246 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6247 a vect_def_type for the first argument.
6248 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6249 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6250 operand if it isn't defined by a vectorized statement.
6251 (vect_build_gather_load_calls): Remove the mask_dt argument and
6252 update calls to vect_get_vec_def_for_stmt_copy.
6253 (vectorizable_bswap): Likewise the dt argument.
6254 (vectorizable_call): Update calls to vectorizable_bswap and
6255 vect_get_vec_def_for_stmt_copy.
6256 (vectorizable_simd_clone_call, vectorizable_assignment)
6257 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6258 (vectorizable_comparison): Update calls to
6259 vect_get_vec_def_for_stmt_copy.
6260 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6261 vect_is_simple_use.
6262 (vect_get_loop_based_defs): Remove dt argument and update call
6263 to vect_get_vec_def_for_stmt_copy.
6264 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6265 and vect_get_vec_def_for_stmt_copy.
6266 (vectorizable_load): Update calls to vect_build_gather_load_calls
6267 and vect_get_vec_def_for_stmt_copy.
6268 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6269 (vectorizable_reduction, vectorizable_live_operation): Update calls
6270 to vect_get_vec_def_for_stmt_copy.
6271
6272 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6273
6274 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6275 and gimple stmt arguments with a stmt_vec_info.
6276 (vect_record_base_alignments): Update calls accordingly.
6277 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6278 and gimple stmt arguments with a stmt_vec_info.
6279 (vect_build_slp_tree_1): Remove vinfo argument and update call
6280 to vect_record_max_nunits.
6281 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6282 and vect_record_max_nunits.
6283
6284 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6285
6286 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6287 file and take a stmt_vec_info instead of a gimple stmt.
6288 (supportable_widening_operation, vect_finish_replace_stmt)
6289 (vect_finish_stmt_generation, vect_get_store_rhs)
6290 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6291 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6292 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6293 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6294 (vect_create_data_ref_ptr, bump_vector_ptr)
6295 (vect_permute_store_chain, vect_setup_realignment)
6296 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6297 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6298 (vectorizable_reduction, vectorizable_induction)
6299 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6300 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6301 than gimple stmts as arguments.
6302 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6303 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6304 (can_group_stmts_p, vect_check_gather_scatter)
6305 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6306 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6307 (vect_permute_load_chain, vect_shift_permute_load_chain)
6308 (vect_transform_grouped_load)
6309 (vect_record_grouped_load_vectors): Likewise.
6310 * tree-vect-loop.c (vect_fixup_reduc_chain)
6311 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6312 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6313 (vectorizable_reduction, vectorizable_induction)
6314 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6315 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6316 (vect_get_load_store_mask): Likewise.
6317 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6318 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6319 * tree-vect-stmts.c (vect_mark_relevant)
6320 (is_simple_and_all_uses_invariant)
6321 (exist_non_indexing_operands_for_use_p, process_use)
6322 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6323 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6324 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6325 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6326 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6327 (get_negative_load_store_type, get_load_store_type)
6328 (vect_check_load_store_mask, vect_check_store_rhs)
6329 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6330 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6331 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6332 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6333 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6334 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6335 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6336 (supportable_widening_operation): Likewise.
6337
6338 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6339
6340 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6341 a stmt_vec_info instead of a gcall.
6342 (vect_check_gather_scatter): Update call accordingly.
6343 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6344 of a gphi.
6345 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6346 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6347 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6348 instead of a gimple stmt.
6349 (vect_transform_loop): Update calls accordingly.
6350 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6351 stmt_vec_infos instead of gimple stmts.
6352 (vect_analyze_slp_instance): Update use accordingly.
6353 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6354 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6355 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6356 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6357 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6358 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6359 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6360 down to subroutines.
6361
6362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6363
6364 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6365 of the worklist from a vector of gimple stmts to a vector of
6366 stmt_vec_infos.
6367 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6368 (vect_mark_stmts_to_be_vectorized): Likewise
6369
6370 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6371
6372 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6373 statement before passing it to vect_analyze_stmt.
6374 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6375 the chain of phi vector definitions. Track the exit phi via its
6376 stmt_vec_info.
6377 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6378 STMT_VINFO_REDUC_DEF.
6379 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6380 stmt_vec_infos to handle the statement chains.
6381 (vect_get_slp_defs): Record the first statement in the node
6382 using a stmt_vec_info.
6383 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6384 statements here and pass their stmt_vec_info down to subroutines.
6385 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6386 down to vect_finish_stmt_generation.
6387 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6388 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6389 stmt_vec_infos to subroutines.
6390 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6391 chains.
6392
6393 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6394
6395 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6396 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6397 (vect_permute_store_chain, vect_setup_realignment)
6398 (vect_permute_load_chain, vect_shift_permute_load_chain)
6399 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6400 stmts internally, and when passing values to other vectorizer routines.
6401 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6402 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6403 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6404 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6405 (vectorizable_reduction, vectorizable_induction)
6406 (vectorizable_live_operation, vect_transform_loop_stmt)
6407 (vect_transform_loop): Likewise.
6408 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6409 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6410 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6411 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6412 (vect_slp_analyze_node_operations_1): Likewise.
6413 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6414 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6415 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6416 (vect_finish_stmt_generation_1, get_group_load_store_type)
6417 (get_load_store_type, vect_build_gather_load_calls)
6418 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6419 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6420 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6421 (vectorizable_store, vectorizable_load, vectorizable_condition)
6422 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6423 (supportable_widening_operation): Likewise.
6424 (vect_get_vector_types_for_stmt): Likewise.
6425 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6426
6427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6428
6429 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6430 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6431 (vect_permute_store_chain, vect_permute_load_chain)
6432 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6433 repeated stmt_vec_info lookups.
6434 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6435 (vect_update_ivs_after_vectorizer): Likewise.
6436 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6437 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6438 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6439 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6440 (vect_bb_slp_scalar_cost): Likewise.
6441 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6442
6443 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6444
6445 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6446 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6447 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6448 to get gassigns and gcalls, rather than operating on generc gimple
6449 stmts.
6450 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6451 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6452 (vectorizable_load, vect_analyze_stmt): Likewise.
6453 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6454
6455 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6456
6457 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6458 return stmt_vec_infos rather than gimple stmts. Do not accept
6459 null arguments.
6460 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6461 of a gimple stmt.
6462 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6463 Update use of get_later_stmt.
6464 (vect_get_constant_vectors): Update call accordingly.
6465 (vect_schedule_slp_instance): Likewise
6466 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6467 (vect_slp_analyze_instance_dependence): Likewise.
6468 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6469
6470 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6471
6472 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6473 (stmt_info_for_cost::stmt_info): ...this new field.
6474 (add_stmt_costs): Update accordingly.
6475 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6476 (vect_get_known_peeling_cost): Likewise.
6477 (vect_estimate_min_profitable_iters): Likewise.
6478 * tree-vect-stmts.c (record_stmt_cost): Likewise.
6479
6480 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6481
6482 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6483 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6484 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6485 accordingly.
6486 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6487
6488 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6489
6490 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6491 a gimple stmt to a stmt_vec_info.
6492 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6493
6494 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6495
6496 * tree-vectorizer.h (vec_info::grouped_stores): Change from
6497 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6498 (_loop_vec_info::reduction_chains): Likewise.
6499 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6500 accordingly.
6501 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6502
6503 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6504
6505 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6506 a gimple stmt to a stmt_vec_info.
6507 (_stmt_vec_info::next_element): Likewise.
6508 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6509 (vect_slp_analyze_and_verify_node_alignment)
6510 (vect_analyze_group_access_1, vect_analyze_group_access)
6511 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6512 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6513 (vect_supportable_dr_alignment): Update accordingly.
6514 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6515 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6516 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6517 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6518 * tree-vect-slp.c (vect_build_slp_tree_1)
6519 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6520 (vect_split_slp_store_group, vect_analyze_slp_instance)
6521 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6522 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6523 (get_group_load_store_type, get_load_store_type)
6524 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6525 (vect_transform_stmt, vect_remove_stores): Likewise.
6526
6527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6528
6529 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6530 than a gimple stmt.
6531 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6532 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6533 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6534 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6535 (vector_alignment_reachable_p, vect_get_data_access_cost)
6536 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6537 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6538 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6539 (vect_analyze_group_access_1, vect_analyze_group_access)
6540 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6541 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6542 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6543 result of vect_dr_stmt and use the stmt_vec_info instead of
6544 the associated gimple stmt.
6545 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6546 (vect_gen_prolog_loop_niters): Likewise.
6547 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6548
6549 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6550
6551 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6552 to a vec<stmt_vec_info>.
6553 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6554 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6555 vec<stmt_vec_info>.
6556 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6557 to a vec<stmt_vec_info>.
6558 (bst_traits::value_type, bst_traits::value_type): Likewise.
6559 (bst_traits::hash): Update accordingly.
6560 (vect_get_and_check_slp_defs): Change the stmts parameter from
6561 a vec<gimple *> to a vec<stmt_vec_info>.
6562 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6563 (vect_build_slp_tree): Likewise.
6564 (vect_build_slp_tree_2): Likewise. Update uses of
6565 SLP_TREE_SCALAR_STMTS.
6566 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6567 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6568 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6569 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6570 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6571 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6572 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6573 (vect_get_constant_vectors, vect_get_slp_defs)
6574 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6575 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6576 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6577 instead of gimple stmts.
6578 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6579 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6580 (vect_slp_analyze_instance_dependence): Update uses of
6581 SLP_TREE_SCALAR_STMTS.
6582 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6583 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6584 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6585 (get_initial_defs_for_reduction): Likewise.
6586 (vect_create_epilog_for_reduction): Likewise.
6587 (vectorize_fold_left_reduction): Likewise.
6588 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6589 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6590 (can_vectorize_live_stmts): Likewise.
6591
6592 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6593
6594 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6595 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6596 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6597 than gimple stmts.
6598 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6599 of a gimple stmt.
6600 (gather_scalar_reductions): Update after above interface changes.
6601 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6602 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6603 than gimple stmts.
6604 (vect_force_simple_reduction): Likewise.
6605 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6606 LOOP_VINFO_REDUCTIONS.
6607 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6608
6609 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6610
6611 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6612 a gimple stmt to a stmt_vec_info.
6613 * tree-vect-loop.c (vect_active_double_reduction_p)
6614 (vect_force_simple_reduction, vectorizable_reduction): Update
6615 accordingly.
6616
6617 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6618
6619 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6620 vec<gimple *> to a vec<stmt_vec_info>.
6621 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6622 the reduction_phis argument from a vec<gimple *> to a
6623 vec<stmt_vec_info>.
6624 (vectorizable_reduction): Likewise the phis local variable that
6625 is passed to vect_create_epilog_for_reduction. Update for new type
6626 of SLP_TREE_VEC_STMTS.
6627 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6628 (vectorizable_live_operation): Likewise.
6629 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6630 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6631
6632 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6633
6634 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6635 a gimple stmt to a stmt_vec_info.
6636 (vectorizable_condition, vectorizable_live_operation)
6637 (vectorizable_reduction, vectorizable_induction): Pass back the
6638 vectorized statement as a stmt_vec_info.
6639 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6640 use of STMT_VINFO_VEC_STMT.
6641 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6642 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6643 as stmt_vec_infos rather than gimple stmts.
6644 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6645 to a stmt_vec_info.
6646 (vectorizable_live_operation): Likewise.
6647 (vectorizable_reduction, vectorizable_induction): Likewise,
6648 updating use of STMT_VINFO_VEC_STMT.
6649 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6650 of STMT_VINFO_VEC_STMT.
6651 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6652 (vectorizable_simd_clone_call, vectorizable_conversion)
6653 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6654 (vectorizable_store, vectorizable_load, vectorizable_condition)
6655 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6656 from a gimple stmt to a stmt_vec_info.
6657 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
6658 pointer to a stmt_vec_info to the vectorizable_* routines.
6659
6660 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6661
6662 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6663 a gimple stmt to a stmt_vec_info.
6664 (is_pattern_stmt_p): Update accordingly.
6665 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6666 (vect_record_grouped_load_vectors): Likewise.
6667 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6668 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6669 (vect_model_reduction_cost): Likewise.
6670 (vect_create_epilog_for_reduction): Likewise.
6671 (vectorizable_reduction, vectorizable_induction): Likewise.
6672 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6673 Return the stmt_vec_info for the pattern statement.
6674 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6675 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6676 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6677 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6678 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6679 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6680 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6681 (free_stmt_vec_info, vect_is_simple_use): Likewise.
6682
6683 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6684
6685 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6686 (vect_finish_stmt_generation): Likewise.
6687 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6688 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6689 (vect_build_gather_load_calls): Use the return value of the above
6690 functions instead of a separate call to vinfo_for_stmt. Use narrow
6691 scopes for the input gimple stmt and wider scopes for the associated
6692 stmt_vec_info. Use vec_info::lookup_def when setting these
6693 stmt_vec_infos from an SSA_NAME definition.
6694 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6695 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6696 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6697 (vectorizable_store, vectorizable_load, vectorizable_condition)
6698 (vectorizable_comparison): Likewise.
6699 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6700 (vectorizable_reduction): Likewise.
6701
6702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6703
6704 * tree-vectorizer.h (vect_is_simple_use): Add an optional
6705 stmt_vec_info * parameter before the optional gimple **.
6706 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6707 (process_use, vect_get_vec_def_for_operand_1): Update callers.
6708 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6709 * tree-vect-loop.c (vectorizable_reduction): Likewise.
6710 (vectorizable_live_operation): Likewise.
6711 * tree-vect-patterns.c (type_conversion_p): Likewise.
6712 (vect_look_through_possible_promotion): Likewise.
6713 (vect_recog_rotate_pattern): Likewise.
6714 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6715
6716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6717
6718 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6719 a typedef to a wrapper class.
6720 (NULL_STMT_VEC_INFO): New macro.
6721 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6722 (stmt_vec_info::operator*): New function.
6723 (stmt_vec_info::operator gimple *): Likewise.
6724 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6725 (add_stmt_costs): Likewise.
6726 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6727 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6728 (vect_get_known_peeling_cost): Likewise.
6729 (vect_estimate_min_profitable_iters): Likewise.
6730 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6731 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6732 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6733 (vectorizable_store, free_stmt_vec_infos): Likewise.
6734 (new_stmt_vec_info): Change return type of xcalloc to
6735 _stmt_vec_info *.
6736
6737 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6738
6739 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6740 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6741 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6742 a single_imm_use-based sequence.
6743 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6744
6745 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6746
6747 * tree-vectorizer.h (vec_info::lookup_def): Declare.
6748 * tree-vectorizer.c (vec_info::lookup_def): New function.
6749 * tree-vect-patterns.c (vect_get_internal_def): Use it.
6750 (vect_widened_op_tree): Likewise.
6751 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6752 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6753 (vectorizable_reduction): Likewise.
6754 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6755 of a gimple *.
6756 (vect_is_slp_reduction): Update calls accordingly. Use
6757 vec_info::lookup_def.
6758 (vect_is_simple_reduction): Likewise
6759 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6760
6761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6762
6763 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6764 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6765 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6766 of vinfo_for_stmt.
6767 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6768 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6769 (vect_update_vf_for_slp, vect_analyze_loop_operations)
6770 (vect_is_slp_reduction, vectorizable_induction)
6771 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6772 * tree-vect-patterns.c (vect_init_pattern_stmt):
6773 (vect_determine_min_output_precision_1, vect_determine_precisions)
6774 (vect_pattern_recog): Likewise.
6775 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6776 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6777 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6778 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6779 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6780 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
6781 info field from a loop to a loop_vec_info.
6782
6783 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6784
6785 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
6786 (vec_info::add_stmt): Declare.
6787 * tree-vectorizer.c (vec_info::add_stmt): New function.
6788 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
6789 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
6790 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6791 (vectorizable_induction): Likewise.
6792 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
6793 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6794 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
6795 (vectorizable_load): Likewise.
6796 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6797 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
6798 (vect_recog_gather_scatter_pattern): Likewise.
6799 (append_pattern_def_seq): Likewise. Remove a check that is
6800 performed by add_stmt itself.
6801
6802 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6803
6804 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
6805 which make_ssa_name was called with new_stmt before new_stmt
6806 had been created.
6807
6808 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6809
6810 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
6811 split out from...
6812 (vect_is_slp_reduction): ...here...
6813 (vect_is_simple_reduction): ...and here. Remove repetition of tests
6814 that are already known to be false.
6815
6816 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6817
6818 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
6819 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
6820 STMT_VINFO_NUM_SLP_USES when it's true.
6821 (vect_free_slp_instance): Add a final_p parameter and pass it to
6822 vect_free_slp_tree.
6823 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
6824 (vect_analyze_slp_instance): Likewise.
6825 (vect_slp_analyze_operations): Likewise.
6826 (vect_slp_analyze_bb_1): Likewise.
6827 * tree-vectorizer.c (vec_info): Likewise.
6828 * tree-vect-loop.c (vect_transform_loop): Likewise.
6829
6830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6831
6832 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6833 function is not called for second and subsequent members of
6834 a reduction group.
6835
6836 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6837
6838 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
6839 cases for nested loops from here to ...
6840 (vect_create_epilog_for_reduction): ...here. Only call
6841 vect_is_simple_use for inner-loop reductions.
6842
6843 2018-07-31 Martin Liska <mliska@suse.cz>
6844
6845 PR gcov-profile/85338
6846 PR gcov-profile/85350
6847 PR gcov-profile/85372
6848 * profile.c (struct location_triplet): New.
6849 (struct location_triplet_hash): Likewise.
6850 (output_location): Do not output a BB that
6851 is already recorded for a line.
6852 (branch_prob): Use streamed_locations.
6853
6854 2018-07-31 Martin Liska <mliska@suse.cz>
6855
6856 PR gcov-profile/85370
6857 * coverage.c (coverage_begin_function): Do not mark target
6858 clones as artificial functions.
6859
6860 2018-07-31 Martin Liska <mliska@suse.cz>
6861
6862 PR gcov-profile/83813
6863 PR gcov-profile/84758
6864 PR gcov-profile/85217
6865 PR gcov-profile/85332
6866 * profile.c (branch_prob): Do not record GOTO expressions
6867 for GIMPLE statements which locations are already streamed.
6868
6869 2018-07-31 Olivier Hainque <hainque@adacore.com>
6870
6871 * gcc.c (handle_spec_function): Accept a soft_matched_part
6872 argument, as do_spec_1. Pass it down to ...
6873 (eval_spec_function): Accept a soft_matched_part argument,
6874 and pass it down to ...
6875 (do_spec_2): Accept a soft_matched_part argument, and pass
6876 it down to do_spec_1.
6877 (do_spec_1): Pass soft_matched_part to handle_spec_function.
6878 (handle_braces): Update call to handle_spec_function.
6879 (driver::set_up_specs): Update calls to do_spec_2.
6880 (compare_debug_dump_opt_spec_function): Likewise.
6881 (compare_debug_self_opt_spec_function): Likewise.
6882
6883 2018-07-31 Olivier Hainque <hainque@adacore.com>
6884
6885 * common.opt (nolibc): New option.
6886 * doc/invoke.texi (Link Options): Document it.
6887 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
6888 * config/alpha/linux.h: Likewise.
6889 * config/arc/elf.h: Likewise.
6890 * config/arm/uclinux-elf.h: Likewise.
6891 * config/arm/unknown-elf.h: Likewise.
6892 * config/avr/avrlibc.h: Likewise.
6893 * config/bfin/bfin.h: Likewise.
6894 * config/bfin/linux.h: Likewise.
6895 * config/bfin/uclinux.h: Likewise.
6896 * config/darwin.h: Likewise.
6897 * config/darwin10.h: Likewise.
6898 * config/darwin12.h: Likewise.
6899 * config/gnu-user.h: Likewise.
6900 * config/lm32/uclinux-elf.h: Likewise.
6901 * config/pa/pa-hpux11.h: Likewise.
6902 * config/pa/pa64-hpux.h: Likewise.
6903 * config/sparc/sparc.h: Likewise.
6904
6905 2018-07-31 Olivier Hainque <hainque@adacore.com>
6906
6907 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
6908 undefined variables.
6909
6910 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
6911
6912 PR target/86640
6913 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
6914 instead of GEN_INT.
6915
6916 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6917
6918 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6919 terminated string literal.
6920
6921 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
6922
6923 PR rtl-optimization/85160
6924 * combine.c (is_just_move): New function.
6925 (try_combine): Allow combining two instructions into two if neither of
6926 the original instructions was a move.
6927
6928 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
6929
6930 PR target/86673
6931 * doc/extend.texi (Global Register Variables): Discourage use of type
6932 qualifiers.
6933 (Local Register Variables): Likewise.
6934
6935 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
6936
6937 PR tree-optimization/86506
6938 * hwint.h (ceil_log2): Resync with hwint.c implementation.
6939
6940 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
6941
6942 PR target/86547
6943 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
6944 hard_regno, make sure no insn between `from` and `to` clobbers it.
6945
6946 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
6947 Tom de Vries <tdevries@suse.de>
6948
6949 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
6950 (PTX_DEFAULT_RUNTIME_DIM): ... this.
6951 (nvptx_goacc_validate_dims): Set default worker and gang dims to
6952 PTX_DEFAULT_RUNTIME_DIM.
6953 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
6954
6955 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
6956
6957 * config/pa/pa.c (pa_output_addr_vec): Align address table.
6958 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
6959 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
6960
6961 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
6962
6963 * config/rs6000/constraints.md (wG constraint): Delete, no longer
6964 used.
6965 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
6966 predicate to reflect toc fusion has been deleted.
6967 (toc_fusion_mem_raw): Delete, no longer used.
6968 (toc_fusion_mem_wrapped): Likewise.
6969 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
6970 fusion mask bit.
6971 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
6972 Delete, no longer used.
6973 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
6974 meant to be used for toc fusion.
6975 (rs6000_debug_print_mode): Delete toc fusion debugging.
6976 (rs6000_debug_reg_global): Likewise.
6977 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
6978 fusion and secondary reload support that were never used.
6979 (rs6000_option_override_internal): Delete TOC fusion, that was only
6980 partially defined, and it did not work unless you also used the
6981 -mcmodel= switch.
6982 (rs6000_legitimate_address_p): Delete TOC fusion support.
6983 (rs6000_opt_masks): Likewise.
6984 (fusion_wrap_memory_address): Delete function, no longer used.
6985 (fusion_split_address); Delete TOC fusion support.
6986 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
6987 longer used with toc fusion being deleted.
6988 (TARGET_TOC_FUSION_FP): Likewise.
6989 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
6990 UNSPEC.
6991 (toc fusion spliter): Delete TOC fusion support.
6992 (toc_fusionload_<mode>): Likewise.
6993 (toc_fusionload_di): Likewise.
6994 (fusion_gpr_load_<mode>): Delete generator function, this insn no
6995 longer needs to be named. Rename predicate to delete TOC fusion.
6996 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
6997 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
6998 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
6999 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7000 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7001
7002 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7003
7004 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7005 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7006 __int128 in built-in function prototypes.
7007 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7008 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7009
7010 2018-07-27 Martin Sebor <msebor@redhat.com>
7011
7012 PR tree-optimization/86696
7013 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7014 types, including enums.
7015 (handle_char_store): Be prepared for the above function to fail.
7016
7017 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7018
7019 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7020 when optimization level is lower than 2 or optimize for size.
7021
7022 2018-07-26 Martin Sebor <msebor@redhat.com>
7023
7024 PR tree-optimization/86043
7025 PR tree-optimization/86042
7026 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7027 (get_string_cst_length): Rename...
7028 (get_min_string_length): ...to this. Add argument.
7029 (handle_char_store): Extend to handle multi-character stores by
7030 MEM_REF.
7031 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7032 * tree.h (initializer_zerop): Add argument.
7033
7034 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7035
7036 PR middle-end/86660
7037 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7038 declare target to variables if they have always,{to,from,tofrom} map
7039 kinds.
7040
7041 2018-07-26 Martin Liska <mliska@suse.cz>
7042
7043 PR lto/86548
7044 * lto-wrapper.c: Add linker_output as prefix
7045 for ltrans_output_file.
7046
7047 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7048
7049 PR rtl-optimization/85805
7050 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7051 value for hard registers if that was written in the same mode.
7052
7053 2018-07-26 Martin Liska <mliska@suse.cz>
7054
7055 PR gcov-profile/86536
7056 * gcov.c (format_gcov): Use printf format %.*f directly
7057 and do not handle special values.
7058
7059 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7060
7061 * common/config/arc/arc-common.c (arc_option_optimization_table):
7062 Update default optimizations for size.
7063
7064 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7065
7066 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7067 * config/arc/constraints.md (CfZ): New constraint.
7068 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7069 (subsf3_fpu): Likewise.
7070 (cmpsf_fpu): Likewise.
7071 (cmpsf_fpu_uneq): Likewise.
7072
7073 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7074
7075 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7076 accesses as well.
7077 (arc_is_uncached_mem_p): uncached applies to both the variable and
7078 the pointer.
7079
7080 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7081
7082 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7083 register names.
7084
7085 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7086
7087 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7088 field "m_scopes" from vec to auto_vec.
7089
7090 2018-07-25 Martin Liska <mliska@suse.cz>
7091
7092 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7093 return type.
7094
7095 2018-07-25 Richard Biener <rguenther@suse.de>
7096
7097 PR debug/86654
7098 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7099 special wrt context_die late.
7100 (gen_subprogram_die): Re-use DIEs in local scope.
7101
7102 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7103
7104 PR tree-optimization/86644
7105 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7106
7107 2018-07-25 Martin Liska <mliska@suse.cz>
7108
7109 PR middle-end/86645
7110 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7111 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7112
7113 2018-07-25 Martin Liska <mliska@suse.cz>
7114
7115 PR sanitizer/79635
7116 * params.def: Explain ASan abbreviation and provide
7117 a documentation link.
7118
7119 2018-07-24 Martin Sebor <msebor@redhat.com>
7120
7121 PR tree-optimization/86622
7122 PR tree-optimization/86532
7123 * builtins.h (string_length): Declare.
7124 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7125 (check_access): Be prepared for non-constant length ranges.
7126 (string_length): Make extern.
7127 * expr.c (string_constant): Only handle the minor non-constant
7128 array index. Use string_constant to compute the length of
7129 a generic string constant.
7130
7131 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7132
7133 PR tree-optimization/86618
7134 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7135 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7136
7137 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7138
7139 PR tree-optimization/86636
7140 * json.cc (json::object::set): Fix comment. Add assertions.
7141 (json::array::append): Move here from json.h. Add comment and an
7142 assertion.
7143 (json::string::string): Likewise.
7144 * json.h (json::array::append): Move to json.cc.
7145 (json::string::string): Likewise.
7146 * optinfo-emit-json.cc
7147 (optrecord_json_writer::impl_location_to_json): Assert that we
7148 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7149 wrapper around it. Expand the location once, rather than three
7150 times.
7151 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7152 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7153 wrappers.
7154 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7155 places. Fix some overlong lines.
7156
7157 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7158
7159 * config/aarch64/aarch64-simd.md
7160 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7161 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7162 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7163 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7164 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7165 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7166 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7167 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7168 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7169
7170 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7171
7172 PR middle-end/86627
7173 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7174 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7175 and abs_d == d, do the power of two handling if profitable.
7176
7177 2018-07-24 Richard Biener <rguenther@suse.de>
7178
7179 * match.pd: Add BIT_FIELD_REF canonicalizations.
7180
7181 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7182
7183 PR c/86617
7184 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7185
7186 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7187
7188 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7189 terminated STRING_CST object.
7190
7191 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7192
7193 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7194
7195 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7196
7197 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7198 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7199 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7200 the elements into a register.
7201 (rs6000_split_v4si_init_di_reg): Delete.
7202 (rs6000_split_v4si_init): Delete.
7203 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7204 (vsx_init_v4si): Rewrite as a define_expand.
7205
7206 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7207
7208 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7209 zero_extend argument from memory): New.
7210
7211 2018-07-22 Martin Sebor <msebor@redhat.com>
7212
7213 PR bootstrap/86621
7214 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7215 diagnosing calls with unknown arguments unless -Walloca-larger-than
7216 is restricted to less than PTRDIFF_MAX bytes.
7217
7218 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7219
7220 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7221
7222 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7223
7224 * pretty-print.c (text_info::set_location): Remove redundant
7225 "line_table" parameter from call to rich_location::set_range.
7226
7227 2018-07-20 Martin Sebor <msebor@redhat.com>
7228
7229 PR middle-end/82063
7230 * builtins.c (expand_builtin_alloca): Adjust.
7231 * calls.c (alloc_max_size): Simplify.
7232 * cgraphunit.c (cgraph_node::expand): Adjust.
7233 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7234 variables.
7235 (frame_larger_than_size): Same.
7236 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7237 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7238 Initialize.
7239 * doc/invoke.texi (GCC Command Options): Document option arguments.
7240 Explain byte-size arguments and suffixes.
7241 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7242 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7243 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7244 * doc/options.texi (UInteger): Expand.
7245 (Host_Wide_Int, ByteSize): Document new properties.
7246 * final.c (final_start_function_1): Include sizes in an error message.
7247 * function.c (frame_offset_overflow): Same.
7248 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7249 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7250 Diagnose unbounded alloca calls only for limits of less than
7251 PTRDIFF_MAX.
7252 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7253 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7254 for alloca(0).
7255 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7256 only for limits of less than PTRDIFF_MAX.
7257 * langhooks-def.h (lhd_handle_option): Change function argument
7258 to HOST_WIDE_INT.
7259 * langhooks.c (lhd_handle_option): Same.
7260 * langhooks.h (handle_option): Same.
7261 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7262 ByteSize flags.
7263 (var_type, var_type_struct): Same.
7264 (var_set): Handle ByteSize flag.
7265 * optc-gen.awk: Add comments to output to ease debugging. Make
7266 use of HOST_WIDE_INT where appropriate.
7267 * opts-gen-save.awk: Use %lx to format unsigned long.
7268 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7269 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7270 arguments. Parse bytes-size suffixes.
7271 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7272 (enum_value_to_arg): Same.
7273 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7274 (handle_option): Adjust.
7275 (generate_option): Change function argument to HOST_WIDE_INT.
7276 (cmdline_handle_error): Adjust.
7277 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7278 (set_option): Change function argument to HOST_WIDE_INT.
7279 (option_enabled): Handle cl_host_wide_int.
7280 (get_option_state): Handle CLVC_SIZE.
7281 (control_warning_option): Same.
7282 * opts.c (common_handle_option): Change function argument to
7283 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7284 OPT_Wvla_larger_than_.
7285 * opts.h (enum cl_var_type): Add an enumerator.
7286 * stor-layout.c (layout_decl): Print a more meaningful warning.
7287 * toplev.c (output_stack_usage): Adjust.
7288
7289 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7290
7291 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7292 call to inline_expand_builtin_string_cmp.
7293 (expand_builtin_strcmp): Likewise.
7294 (expand_builtin_strncmp): Likewise.
7295 (inline_string_cmp): Delete the last parameter, change char_type_node
7296 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7297 two operands.
7298 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7299 the inlining expansion on target where the type of the call has same or
7300 narrower precision than unsigned char.
7301
7302 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7303
7304 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7305 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7306 * common.opt (fsave-optimization-record): New option.
7307 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7308 * doc/invoke.texi (-fsave-optimization-record): New option.
7309 * dumpfile.c: Include "optinfo-emit-json.h".
7310 (struct kv_pair): Move to coretypes.h.
7311 (optgroup_options): Make non-static.
7312 (dump_context::end_scope): Call
7313 optimization_records_maybe_pop_dump_scope.
7314 * dumpfile.h (optgroup_options): New decl.
7315 * json.cc: New file.
7316 * json.h: New file.
7317 * optinfo-emit-json.cc: New file.
7318 * optinfo-emit-json.h: New file.
7319 * optinfo.cc: Include "optinfo-emit-json.h".
7320 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7321 (optinfo_enabled_p): Check optimization_records_enabled_p.
7322 (optinfo_wants_inlining_info_p): Likewise.
7323 * optinfo.h: Update comment.
7324 * profile-count.c (profile_quality_as_string): New function.
7325 * profile-count.h (profile_quality_as_string): New decl.
7326 (profile_count::quality): New accessor.
7327 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7328 and optinfo_emit_json_cc_tests.
7329 * selftest.h (selftest::json_cc_tests): New decl.
7330 (selftest::optinfo_emit_json_cc_tests): New decl.
7331 * toplev.c: Include "optinfo-emit-json.h".
7332 (compile_file): Call optimization_records_finish.
7333 (do_compile): Call optimization_records_start.
7334 * tree-ssa-live.c: Include optinfo.h.
7335 (remove_unused_scope_block_p): Retain inlining information if
7336 optinfo_wants_inlining_info_p returns true.
7337
7338 2018-07-20 Richard Biener <rguenther@suse.de>
7339
7340 PR debug/86585
7341 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7342 to cover -flto-partition=none.
7343
7344 2018-07-20 Martin Liska <mliska@suse.cz>
7345
7346 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7347 (get_decl_source_range): Remove unused function.
7348
7349 2018-07-20 Richard Biener <rguenther@suse.de>
7350
7351 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7352 (struct vn_phi_s): Likewise.
7353 (struct vn_reference_s): Likewise.
7354 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7355 for searching the slot of an entry known to be in the hash itself.
7356 (vn_phi_hasher::equal): Likewise.
7357 (vn_reference_hasher::equal): Likewise.
7358 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7359 globals.
7360 (optimistic_info, current_info): Remove, keeping only valid_info.
7361 (vn_reference_lookup_1): Remove fallback lookup.
7362 (vn_reference_lookup_2): Likewise.
7363 (vn_nary_op_lookup_1): Likewise.
7364 (vn_phi_lookup): Likewise.
7365 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7366 hash element.
7367 (vn_reference_insert): Adjust, chain the inserted hash element
7368 at last_inserted_ref.
7369 (vn_reference_insert_pieces): Likewise.
7370 (visit_reference_op_call): Likewise.
7371 (vn_nary_op_insert_into): Chain the inserted hash element at
7372 last_inserted_nary.
7373 (vn_nary_op_insert_pieces): Adjust.
7374 (vn_nary_op_insert): Likewise.
7375 (vn_nary_op_insert_stmt): Likewise.
7376 (vn_phi_insert): Adjust, chain the inserted hash element at
7377 last_inserted_phi.
7378 (process_scc): Remove clearing and copying the optimistic
7379 table. Instead remove elements inserted during an optimistic
7380 iteration from the single table we maintain.
7381 (init_scc_vn): Adjust.
7382 (free_scc_vn): Likewise.
7383 (sccvn_dom_walker::record_cond): Likewise.
7384 (sccvn_dom_walker::after_dom_children): Likewise.
7385
7386 2018-07-19 Martin Sebor <msebor@redhat.com>
7387
7388 PR tree-optimization/84047
7389 PR tree-optimization/83776
7390 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7391 (check_array_bounds): Call it.
7392
7393 2018-07-19 Martin Sebor <msebor@redhat.com>
7394
7395 * align.h (align_flags): Use member initialization.
7396
7397 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7398
7399 * Makefile.in (OBJS): Add optinfo.o.
7400 * coretypes.h (class symtab_node): New forward decl.
7401 (struct cgraph_node): New forward decl.
7402 (class varpool_node): New forward decl.
7403 * dump-context.h: New file.
7404 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7405 "tree-pass.h".
7406 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7407 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7408 (set_alt_dump_file): Likewise.
7409 (dump_context::~dump_context): New dtor.
7410 (dump_gimple_stmt): Move implementation to...
7411 (dump_context::dump_gimple_stmt): ...this new member function.
7412 Add the stmt to any pending optinfo, creating one if need be.
7413 (dump_gimple_stmt_loc): Move implementation to...
7414 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7415 Start a new optinfo and add the stmt to it.
7416 (dump_gimple_expr): Move implementation to...
7417 (dump_context::dump_gimple_expr): ...this new member function.
7418 Add the stmt to any pending optinfo, creating one if need be.
7419 (dump_gimple_expr_loc): Move implementation to...
7420 (dump_context::dump_gimple_expr_loc): ...this new member function.
7421 Start a new optinfo and add the stmt to it.
7422 (dump_generic_expr): Move implementation to...
7423 (dump_context::dump_generic_expr): ...this new member function.
7424 Add the tree to any pending optinfo, creating one if need be.
7425 (dump_generic_expr_loc): Move implementation to...
7426 (dump_context::dump_generic_expr_loc): ...this new member
7427 function. Add the tree to any pending optinfo, creating one if
7428 need be.
7429 (dump_printf): Move implementation to...
7430 (dump_context::dump_printf_va): ...this new member function. Add
7431 the text to any pending optinfo, creating one if need be.
7432 (dump_printf_loc): Move implementation to...
7433 (dump_context::dump_printf_loc_va): ...this new member function.
7434 Start a new optinfo and add the stmt to it.
7435 (dump_dec): Move implementation to...
7436 (dump_context::dump_dec): ...this new member function. Add the
7437 value to any pending optinfo, creating one if need be.
7438 (dump_context::dump_symtab_node): New member function.
7439 (dump_context::get_scope_depth): New member function.
7440 (dump_context::begin_scope): New member function.
7441 (dump_context::end_scope): New member function.
7442 (dump_context::ensure_pending_optinfo): New member function.
7443 (dump_context::begin_next_optinfo): New member function.
7444 (dump_context::end_any_optinfo): New member function.
7445 (dump_context::s_current): New global.
7446 (dump_context::s_default): New global.
7447 (dump_scope_depth): Delete global.
7448 (dumpfile_ensure_any_optinfo_are_flushed): New function.
7449 (dump_symtab_node): New function.
7450 (get_dump_scope_depth): Reimplement in terms of dump_context.
7451 (dump_begin_scope): Likewise.
7452 (dump_end_scope): Likewise.
7453 (selftest::temp_dump_context::temp_dump_context): New ctor.
7454 (selftest::temp_dump_context::~temp_dump_context): New dtor.
7455 (selftest::verify_item): New function.
7456 (ASSERT_IS_TEXT): New macro.
7457 (ASSERT_IS_TREE): New macro.
7458 (ASSERT_IS_GIMPLE): New macro.
7459 (selftest::test_capture_of_dump_calls): New test.
7460 (selftest::dumpfile_c_tests): Call it.
7461 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7462 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7463 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7464 descriptive comment.
7465 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7466 (dump_node, dump_bb): Move these unrelated decls.
7467 (class dump_manager): Add leading comment.
7468 * optinfo.cc: New file.
7469 * optinfo.h: New file.
7470
7471 2018-07-19 Michael Collison <michael.collison@arm.com>
7472 Richard Henderson <rth@redhat.com>
7473
7474 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7475 (subti): Handle op1 zero.
7476 (subvti4, usub4ti4): New.
7477 (*sub<GPI>3_compare1_imm): New.
7478 (sub<GPI>3_carryinCV): New.
7479 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7480 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7481
7482 2018-07-19 Michael Collison <michael.collison@arm.com>
7483 Richard Henderson <rth@redhat.com>
7484
7485 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7486 (addti3): Create simpler code if low part is already known to be 0.
7487 (addvti4, uaddvti4): New.
7488 (*add<GPI>3_compareC_cconly_imm): New.
7489 (*add<GPI>3_compareC_cconly): New.
7490 (*add<GPI>3_compareC_imm): New.
7491 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7492 handle constants within this pattern..
7493 (*add<GPI>3_compareV_cconly_imm): New.
7494 (*add<GPI>3_compareV_cconly): New.
7495 (*add<GPI>3_compareV_imm): New.
7496 (add<GPI>3_compareV): New.
7497 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7498 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7499 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7500 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7501 with 'comparison' operator.
7502 (*add<GPI>3_compareV_cconly_imm): Ditto.
7503 (*add<GPI>3_compareV_cconly): Ditto.
7504 (*add<GPI>3_compareV_imm): Ditto.
7505 (add<GPI>3_compareV): Ditto.
7506 (add<mode>3_carryinC): Ditto.
7507 (*add<mode>3_carryinC_zero): Ditto.
7508 (*add<mode>3_carryinC): Ditto.
7509 (add<mode>3_carryinV): Ditto.
7510 (*add<mode>3_carryinV_zero): Ditto.
7511 (*add<mode>3_carryinV): Ditto.
7512
7513 2018-07-19 Michael Collison <michael.collison@arm.com>
7514 Richard Henderson <rth@redhat.com>
7515
7516 * config/aarch64/aarch64-modes.def (CC_V): New.
7517 * config/aarch64/aarch64-protos.h
7518 (aarch64_addti_scratch_regs): Declare
7519 (aarch64_subvti_scratch_regs): Declare.
7520 (aarch64_expand_subvti): Declare.
7521 (aarch64_gen_unlikely_cbranch): Declare
7522 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7523 for signed overflow using CC_Vmode.
7524 (aarch64_get_condition_code_1): Handle CC_Vmode.
7525 (aarch64_gen_unlikely_cbranch): New function.
7526 (aarch64_addti_scratch_regs): New function.
7527 (aarch64_subvti_scratch_regs): New function.
7528 (aarch64_expand_subvti): New function.
7529
7530 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7531
7532 * config/aarch64/aarch64-option-extensions.def: New entry for profile
7533 extension.
7534 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7535 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7536 extension.
7537
7538 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7539
7540 PR target/83009
7541 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7542 address check not strict.
7543
7544 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7545
7546 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7547 Umq with Umn.
7548 (store_pair_lanes<mode>): Likewise.
7549 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7550 enum value 'ADDR_QUERY_LDP_STP_N'.
7551 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7552 (aarch64_print_address_internal): Add declaration.
7553 (aarch64_print_ldpstp_address): Remove.
7554 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7555 (aarch64_print_operand): Change printing of 'y'.
7556 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7557 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7558 'true' rather than '1'.
7559 * config/aarch64/constraints.md (Uml): Likewise.
7560 (Uml): Rename to Umn.
7561 (Umq): Remove.
7562
7563 2018-07-19 Richard Biener <rguenther@suse.de>
7564
7565 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7566 a trailing array.
7567 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7568 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7569 (vn_reference_hasher): Likewise.
7570 (struct vn_tables_s): Remove obstack and alloc-pool members.
7571 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7572 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7573 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7574 (vn_reference_insert_pieces): Likewise.
7575 (alloc_vn_nary_op_noinit): Adjust.
7576 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7577 (vn_phi_eq): Adjust.
7578 (shared_lookup_phiargs): Remove.
7579 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7580 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7581 (visit_reference_op_call): Likewise.
7582 (copy_nary, copy_phi, copy_reference): Remove.
7583 (process_scc): Rewind the obstack when iterating. Do not
7584 copy the elements to valid_info but just move them from one
7585 hashtable to the other.
7586 (allocate_vn_table): Adjust.
7587 (free_vn_table): Likewise.
7588 (init_scc_vn): Likewise.
7589 (free_scc_vn): Likewise.
7590
7591 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
7592
7593 PR target/86560
7594 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7595 indirect_return as function type attribute.
7596 (ix86_attribute_table): Change indirect_return to function
7597 type attribute.
7598 * doc/extend.texi: Update indirect_return attribute.
7599
7600 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
7601
7602 * wide-int.h (widest2_int): New.
7603 * gimple-fold.c (arith_overflowed_p): Use it.
7604 * tree.h (widest2_int_cst): New.
7605 * tree-vrp.c (wide_int_binop_overflow): Rename from
7606 vrp_int_const_binop.
7607 Rewrite to work on trees.
7608 (extract_range_from_multiplicative_op_1): Abstract code to...
7609 (wide_int_range_min_max): ...here.
7610 (wide_int_range_cross_product): ...and here.
7611 (extract_range_from_binary_expr_1): Abstract overflow code to...
7612 (wide_int_range_mult_wrapping): ...here.
7613 * tree-vrp.h (wide_int_range_cross_product): New.
7614 (wide_int_range_mult_wrapping): New.
7615
7616 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
7617 Julia Koval <julia.koval@intel.com>
7618
7619 * config/i386/x86-tune-costs.h (skylake_memcpy,
7620 skylake_memset): Replace rep_prefix with unrolling for size 512.
7621
7622 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
7623
7624 PR middle-end/86544
7625 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7626 comparision with EQ_EXPR in last stmt.
7627
7628 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
7629
7630 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7631 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7632 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7633 previously known as "PowerPC AltiVec Built-in Functions". Move
7634 some material to new subsubsections "PowerPC AltiVec Built-in
7635 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7636 ISA 2.07".
7637 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7638 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7639 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7640 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7641
7642 2018-07-18 Richard Biener <rguenther@suse.de>
7643
7644 PR tree-optimization/86557
7645 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7646 EXACT_DIV_EXPR.
7647
7648 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
7649
7650 * config/s390/s390.c (s390_function_profiler): Generate CFI.
7651
7652 2018-07-17 Jeff Law <law@redhat.com>
7653
7654 * config/arm/arm.c (get_label_padding): Update for recent
7655 changes to label_to_alignment.
7656
7657 PR tree-optimization/86010
7658 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7659
7660 * config/mips/mips.c (vr4130_align_insns): Update for recent
7661 changes to label_to_alignment.
7662
7663 * config/frv/frv.c (frv_label_align): Update for recent changes
7664 to label_to_alignment.
7665
7666 * config/nios2/nios2.c (nios2_label_align): Update for recent
7667 changes which dropped ALIGN_LABELS_LOG.
7668
7669 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
7670
7671 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7672 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7673
7674 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
7675
7676 * config/arc/arc.c (arc_label_align): Use align_labels instead of
7677 deprecated align_labels_log.
7678
7679 2018-07-17 Richard Biener <rguenther@suse.de>
7680
7681 PR lto/86456
7682 * dwarf2out.c (init_sections_and_labels): Always generate
7683 a debug_line_str_section for early LTO debug.
7684 (dwarf2out_finish): Reset debug_line_str_hash output early.
7685 Bump counter for extra dwarf5 .debug_loc labels to not conflict
7686 with fat LTO part.
7687 (dwarf2out_early_finish): Output debug_line_str.
7688
7689 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7690
7691 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7692 index register on z196 or later.
7693
7694 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7695
7696 * config/s390/s390.c (s390_default_align): Set default function
7697 alignment to 16.
7698 (s390_override_options_after_change): Call s390_default align.
7699 (s390_option_override_internal): Call s390_default_align.
7700 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7701
7702 2018-07-17 Jakub Jelinek <jakub@redhat.com>
7703
7704 PR middle-end/86542
7705 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7706 to _looptemp_ clauses, other than the first two.
7707
7708 2018-07-17 Martin Liska <mliska@suse.cz>
7709
7710 * opts.c: Do not enable OPT_falign_* for -Os.
7711
7712 2018-07-17 Martin Liska <mliska@suse.cz>
7713
7714 * align.h (MAX_CODE_ALIGN): New.
7715 (MAX_CODE_ALIGN_VALUE): New.
7716 * common/config/i386/i386-common.c (ix86_handle_option):
7717 (MAX_CODE_ALIGN): Moved to align.h.
7718 * final.c (MAX_CODE_ALIGN): Likewise.
7719 * opts.c (parse_and_check_align_values):
7720 (MAX_CODE_ALIGN): Likewise.
7721 (MAX_CODE_ALIGN_VALUE): Likewise.
7722
7723 2018-07-17 Martin Liska <mliska@suse.cz>
7724
7725 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7726 in order to fulfil coding style.
7727 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7728 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7729 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7730 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7731 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7732 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7733 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7734 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7735 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7736
7737 2018-07-17 Martin Liska <mliska@suse.cz>
7738
7739 * align.h: New file.
7740 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7741 directly.
7742 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7743 align_flags of label_to_alignment.
7744 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7745 align_flags class.
7746 * config/m68k/m68k.c: Do not use removed align_labels_value and
7747 align_loops_value.
7748 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7749 (LOOP_ALIGN): Likewise.
7750 (LABEL_ALIGN): Likewise.
7751 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7752 Remove not used macro.
7753 (rs6000_loop_align): Change return type to align_flags.
7754 (rs6000_loop_align_max_skip): Remove.
7755 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7756 Change return type to align_flags.
7757 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7758 Remove not used macro.
7759 (rs6000_loop_align): Change return type to align_flags.
7760 (rs6000_loop_align_max_skip): Remove.
7761 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7762 * config/rx/rx-protos.h (rx_align_for_label): Make it
7763 static function.
7764 * config/rx/rx.c (rx_align_for_label): Change return type
7765 to align_flags.
7766 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7767 macro definitions.
7768 into align_flags class.
7769 (LABEL_ALIGN): Likewise.
7770 (LOOP_ALIGN): Likewise.
7771 * config/s390/s390.c (s390_label_align): Use align_flags
7772 class member.
7773 (s390_asm_output_function_label): Likewise.
7774 * config/sh/sh.c (sh_override_options_after_change):
7775 Use align_flags class directly without macros.
7776 (find_barrier): Likewise.
7777 (barrier_align): Likewise.
7778 (sh_loop_align): Likewise.
7779 * config/spu/spu.c (spu_option_override):
7780 Use align_flags_tuple::get_value instead of removed macros.
7781 (spu_sched_init): Likewise.
7782 * config/spu/spu.h (GTY): Likewise.
7783 * config/visium/visium.c (visium_option_override):
7784 Set "8" as default secondary alignment.
7785 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
7786 in order to guarantee secondary alignment of 8.
7787 * coretypes.h: Include align.h header file.
7788 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
7789 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
7790 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
7791 * doc/tm.texi.in: Likewise.
7792 * final.c (struct label_alignment): Remove not used structure.
7793 (LABEL_ALIGN): Change type to align_flags.
7794 (LOOP_ALIGN): Likewise.
7795 (JUMP_ALIGN): Likewise.
7796 (default_loop_align_max_skip): Remove.
7797 (default_label_align_max_skip): Likewise.
7798 (default_jump_align_max_skip): Likewise.
7799 (default_label_align_after_barrier_max_skip):
7800 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
7801 (LABEL_TO_MAX_SKIP): Remove.
7802 (label_to_alignment): Return align_flags type instead of integer.
7803 (label_to_max_skip): Remove.
7804 (align_fuzz): Use align_flags type.
7805 (compute_alignments): Use align_flags type and use align_flags::max
7806 to combine multiple alignments.
7807 (grow_label_align): Grow vec instead of C array.
7808 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
7809 (shorten_branches): Use align_flags type and use align_flags::max
7810 to combine multiple alignments.
7811 (final_scan_insn_1): Remove usage of secondary alignment that comes
7812 from label alignment, but instead use proper secondary alignment
7813 which is computed in grow_label_align.
7814 * flags.h (struct align_flags_tuple): Move to align.h.
7815 (struct align_flags): Likewise.
7816 (state_align_loops): Rename to align_loops.
7817 (state_align_jumps): Rename to align_jumps.
7818 (state_align_labels): Rename to align_labels.
7819 (state_align_functions): Rename to align_functions.
7820 (align_loops_log): Remove.
7821 (align_jumps_log): Remove.
7822 (align_labels_log): Remove.
7823 (align_functions_log): Remove.
7824 (align_loops_max_skip): Remove.
7825 (align_jumps_max_skip): Remove.
7826 (align_labels_max_skip): Remove.
7827 (align_functions_max_skip): Remove.
7828 (align_loops_value): Remove.
7829 (align_jumps_value): Remove.
7830 (align_labels_value): Remove.
7831 (align_functions_value): Remove.
7832 * output.h (label_to_alignment): Change return type to align_flags.
7833 (label_to_max_skip): Remove.
7834 * target.def: Remove loop_align_max_skip, label_align_max_skip,
7835 jump_align_max_skip macros.
7836 * targhooks.h (default_loop_align_max_skip): Remove.
7837 (default_label_align_max_skip): Likewise.
7838 (default_jump_align_max_skip): Likewise.
7839 (default_label_align_after_barrier_max_skip): Remove.
7840 * toplev.c (read_log_maxskip): Use ::normalize function.
7841 (parse_N_M): Remove not used argument and also call ::normalize.
7842 (parse_alignment_opts): Do not pass unused arguments.
7843 * varasm.c (assemble_start_function): Use directly align_functions
7844 instead of removed macros.
7845 * system.h: Do not poison removed macros.
7846
7847 2018-07-17 Jakub Jelinek <jakub@redhat.com>
7848
7849 PR middle-end/86539
7850 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
7851 and cond temporaries don't have reference type if iterator has
7852 pointer type. For init use &for_pre_body instead of pre_p if
7853 for_pre_body is non-empty.
7854
7855 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
7856
7857 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
7858 double-double modes to SFmode directly directly.
7859 (trunc<mode>sf2_fprs): Delete.
7860
7861 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
7862
7863 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
7864 for conversions between IFmode and the decimal floating point modes.
7865 (init_float128_ieee): Use the correct names for conversions between
7866 KFmode and the decimal floating point modes.
7867
7868 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
7869
7870 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
7871 for the conversions between TDmode and IFmode.
7872 (init_float128_ieee): Use more correct names for the conversions
7873 between TDmode and KFmode.
7874
7875 2018-07-16 Jakub Jelinek <jakub@redhat.com>
7876
7877 PR tree-optimization/86526
7878 * builtins.c (expand_builtin_memcmp): Formatting fixes.
7879 (inline_expand_builtin_string_cmp): Likewise.
7880 (inline_string_cmp): Likewise. Use c_readstr instead of
7881 builtin_memcpy_read_str. Add unit_mode temporary.
7882
7883 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7884
7885 PR middle-end/86528
7886 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
7887 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
7888
7889 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
7890
7891 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
7892 Alphabetize prototypes of built-in functions, separating out
7893 built-in functions that are listed in this section but should be
7894 described elsewhere.
7895
7896 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
7897
7898 PR target/86511
7899 * expmed.c (emit_store_flag): Do not emit setcc followed by a
7900 conditional move when trapping comparison was split to a
7901 non-trapping one (and vice versa).
7902
7903 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
7904
7905 * config/s390/s390.c (s390_function_profiler): Generate nops
7906 instead of profiler call sequences.
7907 * config/s390/s390.opt: Add the new option.
7908
7909 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
7910
7911 * config/s390/s390.c (s390_function_profiler): Generate
7912 __mcount_loc section.
7913 * config/s390/s390.opt: Add the new option.
7914
7915 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
7916
7917 * common.opt: Add the new warning.
7918 * config/s390/s390.c (s390_function_profiler): Emit "brasl
7919 %r0,__fentry__" when -mfentry is specified.
7920 (s390_option_override_internal): Disallow -mfentry for 31-bit
7921 CPUs.
7922 * config/s390/s390.opt: Add the new option.
7923
7924 2018-07-16 Richard Biener <rguenther@suse.de>
7925
7926 PR lto/86523
7927 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
7928 for function-local FUNCTION_DECL and RESULT_DECL immediately.
7929
7930 2018-07-16 Martin Liska <mliska@suse.cz>
7931
7932 PR ipa/86529
7933 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
7934 to ::get_create.
7935
7936 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
7937
7938 * config/arc/arcHS.md: Update ARCHS scheduling rules.
7939
7940 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
7941
7942 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
7943 for ARCHS4x.
7944 * config/arc/arc-cpus.def (hs4x): New cpu.
7945 (hs4xd): Likewise.
7946 * config/arc/arc-tables.opt: Regenerate.
7947 * config/arc/arc.c (arc_sched_issue_rate): New function.
7948 (TARGET_SCHED_ISSUE_RATE): Define.
7949 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
7950 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
7951 fpu_cvt.
7952 (attr tune): Add ARCHS4x tune values.
7953 (attr tune_dspmpy): Define.
7954 (*tst): Correct instruction type.
7955 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
7956 * config/arc/arcHS4x.md: New file.
7957 * config/arc/fpu.md: Update instruction type attributes.
7958 * config/arc/t-multilib: Regenerate.
7959
7960 2018-07-16 Tom de Vries <tdevries@suse.de>
7961
7962 PR debug/86455
7963 * var-tracking.c (vt_initialize): Fix pre_dec handling.
7964
7965 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7966
7967 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
7968 early clobber.
7969
7970 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
7971
7972 PR tree-optimization/86514
7973 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
7974 conversion to a boolean type from a type with greater precision.
7975
7976 2018-07-16 Tom de Vries <tdevries@suse.de>
7977
7978 * var-tracking.c (vt_initialize): Print adjusted insn slim if
7979 dump_flags request TDF_SLIM.
7980
7981 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
7982
7983 * fold-const.c (int_const_binop_1): Abstract...
7984 (wide_int_binop): ...wide int code here.
7985 (poly_int_binop): ...poly int code here.
7986 Abstract the rest of int_const_binop_1 into int_const_binop.
7987 * fold-const.h (wide_int_binop): New.
7988 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
7989 Remove useless PLUS/MINUS_EXPR case.
7990 (zero_nonzero_bits_from_vr): Move wide int code...
7991 (zero_nonzero_bits_from_bounds): ...here.
7992 (extract_range_from_binary_expr_1): Move mask optimization code...
7993 (range_easy_mask_min_max): ...here.
7994 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
7995 (range_easy_mask_min_max): New.
7996
7997 2018-07-15 Jeff Law <law@redhat.com>
7998
7999 PR target/85993
8000 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8001 block.
8002
8003 2018-07-14 Jim Wilson <jimw@sifive.com>
8004
8005 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8006
8007 2018-07-14 Paul Koning <ni1d@arrl.net>
8008
8009 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8010
8011 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8012
8013 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8014 copying section.
8015
8016 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8017 Steve Munroe <munroesj52@gmail.com>
8018
8019 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8020 (_mm_andnot_si128): Likewise.
8021 (_mm_or_si128): Likewise.
8022 (_mm_xor_si128): Likewise.
8023
8024 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8025
8026 PR middle-end/78809
8027 * builtins.c (expand_builtin_memcmp): Inline the calls first
8028 when result_eq is false.
8029 (expand_builtin_strcmp): Inline the calls first.
8030 (expand_builtin_strncmp): Likewise.
8031 (inline_string_cmp): New routine. Expand a string compare
8032 call by using a sequence of char comparison.
8033 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8034 a call to str(n)cmp/memcmp.
8035 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8036 New option.
8037 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8038
8039 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8040
8041 * config/arm/driver-arm.c: Include arm-native.h.
8042 (host_detect_local_cpu): Use auto-generated data tables.
8043 (vendors, arm_cpu_table): Delete. Move part information to ...
8044 * config/arm/arm-cpus.in: ... here.
8045 * config/arm/parsecpu.awk (gen_native): New function.
8046 (vendor, part): New CPU fields.
8047 (END): Add support for building the native CPU detection tables.
8048 * config/arm/t-arm (arm-native.h): Add build rule.
8049 (driver-arm.o): Add dependency on arm-native.h.
8050
8051 2018-07-13 Richard Biener <rguenther@suse.de>
8052
8053 PR middle-end/85974
8054 * match.pd (addr1 - addr2): Allow either of the operand to
8055 have a conversion.
8056
8057 2018-07-13 Tom de Vries <tdevries@suse.de>
8058
8059 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8060 in remap_ssa_name.
8061
8062 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8063
8064 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8065 arrays instead of numbered variables.
8066
8067 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8068
8069 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8070 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8071
8072 2018-07-13 Richard Biener <rguenther@suse.de>
8073
8074 PR debug/86452
8075 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8076 instead of get_context_die.
8077
8078 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8079 Richard Biener <rguenther@suse.de>
8080
8081 PR middle-end/86489
8082 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8083 that the loop latch destination where phi is defined.
8084
8085 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8086
8087 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8088 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8089 (riscv_set_current_function): Extract getting interrupt type to new
8090 function.
8091 (riscv_get_interrupt_type): New function.
8092 (riscv_merge_decl_attributes): New function, checking interrupt type is
8093 same.
8094 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8095
8096 2018-07-12 Paul Koning <ni1d@arrl.net>
8097
8098 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8099 directive.
8100
8101 2018-07-12 Paul Koning <ni1d@arrl.net>
8102
8103 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8104 zero reference, add doloop_end instead.
8105 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8106 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8107 detail for doloop_end.
8108
8109 2018-07-12 Martin Sebor <msebor@redhat.com>
8110
8111 PR c/86453
8112 * attribs.c (decl_attributes): Reject conflicting attributes before
8113 calling attribute handlers.
8114
8115 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8116
8117 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8118 parameter.
8119 (gcc::dump_manager::get_dump_file_name): likewise.
8120 (dump_begin): Likewise.
8121 * dumpfile.h (dump_begin): Update prototype.
8122 (gcc::dump_manager::get_dump_file_name,
8123 gcc::dump_manager::get_dump_file_name): Update prototype.
8124
8125 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8126
8127 * internal-fn.h (vectorizable_internal_fn_p): New function.
8128 * tree-vect-slp.c (compatible_calls_p): Likewise.
8129 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8130 to internal functions.
8131 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8132
8133 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8134
8135 * fold-const.h (inverse_conditions_p): Declare.
8136 * fold-const.c (inverse_conditions_p): New function.
8137 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8138 that test the inverse condition of a conditional internal function.
8139 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8140 * internal-fn.c (internal_fn_mask_index): Handle conditional
8141 internal functions.
8142 (vectorized_internal_fn_supported_p): New function.
8143 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8144 (any_pred_load_store): Replace with...
8145 (need_to_predicate): ...this new variable.
8146 (redundant_ssa_names): New variable.
8147 (ifcvt_can_use_mask_load_store): Move initial checks to...
8148 (ifcvt_can_predicate): ...this new function. Handle tree codes
8149 for which a conditional internal function exists.
8150 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8151 instead of ifcvt_can_use_mask_load_store. Update after variable
8152 name change.
8153 (predicate_load_or_store): New function, split out from
8154 predicate_mem_writes.
8155 (check_redundant_cond_expr): New function.
8156 (value_available_p): Likewise.
8157 (predicate_rhs_code): Likewise.
8158 (predicate_mem_writes): Rename to...
8159 (predicate_statements): ...this. Use predicate_load_or_store
8160 and predicate_rhs_code.
8161 (combine_blocks, tree_if_conversion): Update after above name changes.
8162 (ifcvt_local_dce): Handle redundant_ssa_names.
8163 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8164 general conditional functions.
8165 * tree-vect-stmts.c (vectorizable_call): Likewise.
8166
8167 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8168 Alan Hayward <alan.hayward@arm.com>
8169 David Sherwood <david.sherwood@arm.com>
8170
8171 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8172 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8173 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8174 plus and minus and convert them into IFN_COND_FMA-based sequences.
8175 (convert_mult_to_fma): Handle conditional plus and minus.
8176
8177 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8178
8179 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8180 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8181 (cond_fnms_optab): New optabs.
8182 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8183 internal functions.
8184 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8185 * internal-fn.h (get_conditional_internal_fn): Declare.
8186 (get_unconditional_internal_fn): Likewise.
8187 * internal-fn.c (cond_ternary_direct): New macro.
8188 (expand_cond_ternary_optab_fn): Likewise.
8189 (direct_cond_ternary_optab_supported_p): Likewise.
8190 (FOR_EACH_COND_FN_PAIR): Likewise.
8191 (get_conditional_internal_fn): New function.
8192 (get_unconditional_internal_fn): Likewise.
8193 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8194 (gimple_match_op::gimple_match_op): Add a new overload for 5
8195 operands.
8196 (gimple_match_op::set_op): Likewise.
8197 (gimple_resimplify5): Declare.
8198 * genmatch.c (decision_tree::gen): Generate simplifications for
8199 5 operands.
8200 * gimple-match-head.c (gimple_simplify): Define an overload for
8201 5 operands. Handle calls with 5 arguments in the top-level overload.
8202 (convert_conditional_op): Handle conversions from unconditional
8203 internal functions to conditional ones.
8204 (gimple_resimplify5): New function.
8205 (build_call_internal): Pass a fifth operand.
8206 (maybe_push_res_to_seq): Likewise.
8207 (try_conditional_simplification): Try converting conditional
8208 internal functions to unconditional internal functions.
8209 Handle 3-operand unconditional forms.
8210 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8211 Define ternary equivalents of the current rules for binary conditional
8212 internal functions.
8213 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8214 ternary operations.
8215 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8216 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8217 (optab): Handle them.
8218 (SVE_COND_FP_TERNARY): New int iterator.
8219 (sve_fmla_op, sve_fmad_op): New int attributes.
8220 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8221 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8222 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8223
8224 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8225
8226 * target.def (preferred_else_value): New target hook.
8227 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8228 * doc/tm.texi: Regenerate.
8229 * targhooks.h (default_preferred_else_value): Declare.
8230 * targhooks.c (default_preferred_else_value): New function.
8231 * internal-fn.h (conditional_internal_fn_code): Declare.
8232 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8233 (get_conditional_internal_fn): Use it.
8234 (conditional_internal_fn_code): New function.
8235 * gimple-match.h (gimple_match_cond): New struct.
8236 (gimple_match_op): Add a cond member function.
8237 (gimple_match_op::gimple_match_op): Update all forms to take a
8238 gimple_match_cond.
8239 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8240 for the suboperation, but don't specify a particular else_value.
8241 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8242 (visit_nary_op, visit_reference_op_load): Pass
8243 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8244 * gimple-match-head.c: Include tree-eh.h
8245 (convert_conditional_op): New function.
8246 (maybe_resimplify_conditional_op): Likewise.
8247 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8248 (gimple_resimplify2): Likewise.
8249 (gimple_resimplify3): Likewise.
8250 (gimple_resimplify4): Likewise.
8251 (maybe_push_res_to_seq): Return null for conditional operations.
8252 (try_conditional_simplification): New function.
8253 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8254 constructor.
8255 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8256 IFN_COND_* call.
8257 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8258 function.
8259 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8260
8261 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8262
8263 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8264 DECL_FCONTEXT
8265 (hash_tree): Do not hash DECL_FCONTEXT
8266 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8267 Do not stream DECL_FCONTEXT.
8268 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8269 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8270
8271 2018-07-12 Richard Biener <rguenther@suse.de>
8272
8273 PR debug/86462
8274 * dwarf2out.c (gen_block_die): Only output blocks when they have
8275 at least one !DECL_IGNORED_P variable.
8276
8277 2018-07-12 Richard Biener <rguenther@suse.de>
8278
8279 PR target/84829
8280 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8281 Remove -mieee-fp handling.
8282
8283 2018-07-12 Richard Biener <rguenther@suse.de>
8284
8285 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8286 left-over from last patch.
8287
8288 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8289
8290 PR tree-optimization/86492
8291 * gimple-ssa-store-merging.c
8292 (imm_store_chain_info::coalesce_immediate_stores): Call
8293 check_no_overlap even for the merge_overlapping case. Formatting fix.
8294
8295 2018-07-12 Richard Biener <rguenther@suse.de>
8296
8297 PR middle-end/86479
8298 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8299 move possibly trapping operations into the conditional.
8300
8301 2018-07-12 Richard Biener <rguenther@suse.de>
8302
8303 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8304 (vn_lookup_simplify_result): Remove recursion limit applied
8305 here.
8306 (vn_nary_build_or_lookup_1): Adjust.
8307 (try_to_simplify): Likewise.
8308 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8309 here.
8310 (gimple_resimplify2): Likewise.
8311 (gimple_resimplify3): Likewise.
8312 (gimple_resimplify4): Likewise.
8313
8314 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8315
8316 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8317 Use __mmask64 type instead of __mmask8 for __M argument.
8318 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8319 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8320 __U argument.
8321 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8322 __mmask16 for __M argument.
8323 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8324 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8325 to __mmask16 instead of __mmask8.
8326 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8327 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8328 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8329 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8330 instead of __mmask16 for __U argument.
8331 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8332 __mmask16 instead of __mmask8 for __U argument.
8333 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8334 __U argument.
8335 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8336 __mmask16.
8337 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8338 argument.
8339 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8340 __U argument.
8341 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8342 __mmask16.
8343 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8344 of __mmask16.
8345 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8346 __U argument.
8347 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8348 __U argument.
8349 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8350 __U argument.
8351 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8352 __U argument.
8353 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8354 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8355 return type as well as __M argument type and all casts from __mmask8
8356 to __mmask32.
8357 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8358 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8359 return type as well as __M argument type and all casts from __mmask8
8360 to __mmask16.
8361 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8362 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8363 return type as well as __M argument type and all casts from __mmask8
8364 to __mmask32.
8365 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8366 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8367 return type as well as __M argument type and all casts from __mmask8
8368 to __mmask16.
8369 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8370 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8371 __mmask16.
8372
8373 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8374
8375 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8376 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8377 for __U argument.
8378
8379 2018-07-11 Paul Koning <ni1d@arrl.net>
8380
8381 * doc/md.texi (define_subst): Document how multiple occurrences of
8382 the same argument in the replacement pattern are handled.
8383
8384 2018-07-11 Paul Koning <ni1d@arrl.net>
8385
8386 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8387 alphabetical order.
8388 (Common Type Attributes): Add "mode" attribute.
8389
8390 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8391
8392 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8393 stream DECL_ORIGINAL_TYPE.
8394 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8395 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8396 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8397 Do not walk original type.
8398 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8399 external decls.
8400 (write_ts_decl_non_common_tree_pointers): Do not stream
8401 DECL_ORIGINAL_TYPE
8402 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8403 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8404
8405 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8406
8407 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8408 thread twice from the same starting edge.
8409
8410 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8411
8412 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8413 * gimple.c (gimple_call_nonnull_result_p): ...here...
8414 (gimple_call_nonnull_arg): ...and here.
8415 * gimple.h (gimple_call_nonnull_result_p): New.
8416 (gimple_call_nonnull_arg): New.
8417
8418 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8419
8420 * config/arm/arm-cpus.in: Move information from fpu field of each
8421 cpu definition to the isa field.
8422 * config/arm/parsecpu.awk (fpu): Delete match rule.
8423 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8424
8425 2018-07-11 Richard Biener <rguenther@suse.de>
8426
8427 PR debug/86457
8428 * dwarf2out.c (init_sections_and_labels): Use
8429 output_asm_line_debug_info consistently.
8430 (dwarf2out_early_finish): Likewise.
8431 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8432 type units.
8433
8434 2018-07-11 Richard Biener <rguenther@suse.de>
8435
8436 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8437 Rework father_bb setting in a way to avoid propagating constants
8438 multiple times on a loop body.
8439
8440 2018-07-10 Mark Wielaard <mark@klomp.org>
8441
8442 PR debug/86459
8443 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8444
8445 2018-07-10 Richard Biener <rguenther@suse.de>
8446
8447 * hash-map.h (hash_map::iterator::operator*): Return
8448 references to key and value.
8449
8450 2018-07-10 Jakub Jelinek <jakub@redhat.com>
8451
8452 PR c++/86443
8453 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8454 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8455 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8456 (gimplify_omp_for): For composite loops, move outer
8457 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8458 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
8459 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
8460 TREE_LIST for both the original class iterator and the "last" helper
8461 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
8462 loop, remember has_decl_expr from outer composite loops for the
8463 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8464
8465 2018-07-09 Martin Sebor <msebor@redhat.com>
8466
8467 PR middle-end/77357
8468 PR middle-end/86428
8469 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8470 accessing implicitly initialized array elements.
8471 * expr.c (string_constant): Handle string initializers of
8472 character arrays within aggregates.
8473 * gimple-fold.c (fold_array_ctor_reference): Add argument.
8474 Store element offset. As a special case, handle zero size.
8475 (fold_nonarray_ctor_reference): Same.
8476 (fold_ctor_reference): Add argument. Store subobject offset.
8477 * gimple-fold.h (fold_ctor_reference): Add argument.
8478
8479 2018-07-09 Paul Koning <ni1d@arrl.net>
8480
8481 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8482 (pdp11_insn_cost): New function.
8483 (pdp11_md_asm_adjust): New function.
8484 (TARGET_INVALID_WITHIN_DOLOOP): Define.
8485 (pdp11_rtx_costs): Update to match machine better.
8486 (output_addr_const_pdp11): Correct format mismatch warnings.
8487 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8488 * config/pdp11/pdp11.md: General change to add base_cost and/or
8489 length attributes for use by new pdp11_insn_cost function.
8490 (MIN_BRANCH): Correct definition.
8491 (MIN_SOB): Ditto.
8492 (doloop_end): Use standard pattern name for looping pattern.
8493 (doloop_end_nocc): New.
8494 (movsf): Add another constraint alternative.
8495 (zero_extendqihi2): Add constraint alternatives for not in place
8496 extend.
8497 (zero_extendhisi2): Remove.
8498 (shift patterns): Add CC handling variants.
8499 (bswaphi2): New.
8500 (bswapsi2): New.
8501 (rothi3): New.
8502 (define_peephole2): New peephole to recognize mov that sets CC for
8503 subsequent test.
8504
8505 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8506
8507 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8508 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8509 wi::add.
8510
8511 2018-07-09 Jakub Jelinek <jakub@redhat.com>
8512
8513 PR c/86420
8514 * real.c (real_nextafter): Return true if result is denormal.
8515
8516 2018-07-09 Martin Liska <mliska@suse.cz>
8517
8518 * common.opt: Add back wrongly removed attribute.
8519
8520 2018-07-09 Richard Biener <rguenther@suse.de>
8521
8522 PR debug/86413
8523 * dwarf2out.c (gen_block_die): For an early generated DIE
8524 always output high/low PC attributes.
8525
8526 2018-07-09 Tom de Vries <tdevries@suse.de>
8527
8528 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8529 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8530 onto VAR_DECL with abstract origin.
8531
8532 2018-07-07 Jim Wilson <jimw@sifive.com>
8533
8534 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8535
8536 2018-07-07 Tom de Vries <tdevries@suse.de>
8537
8538 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8539
8540 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
8541
8542 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8543 overflow_type.
8544 (combine_bound): Use wide-int overflow calculation instead of
8545 rolling our own.
8546 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8547 overflow_type.
8548 * fold-const.c (int_const_binop_2): Same.
8549 (extract_muldiv_1): Same.
8550 (fold_div_compare): Same.
8551 (fold_abs_const): Same.
8552 * match.pd: Same.
8553 * poly-int.h (add): Same.
8554 (sub): Same.
8555 (neg): Same.
8556 (mul): Same.
8557 * predict.c (predict_iv_comparison): Same.
8558 * profile-count.c (slow_safe_scale_64bit): Same.
8559 * simplify-rtx.c (simplify_const_binary_operation): Same.
8560 * tree-chrec.c (tree_fold_binomial): Same.
8561 * tree-data-ref.c (split_constant_offset_1): Same.
8562 * tree-if-conv.c (idx_within_array_bound): Same.
8563 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8564 * tree-ssa-phiopt.c (minmax_replacement): Same.
8565 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8566 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8567 * vr-values.c (vr_values::adjust_range_with_scev): Same.
8568 * wide-int.cc (wi::add_large): Same.
8569 (wi::mul_internal): Same.
8570 (wi::sub_large): Same.
8571 (wi::divmod_internal): Same.
8572 * wide-int.h: Change overflow type to overflow_type for neg, add,
8573 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8574 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8575 mul_internal, divmod_internal.
8576 (overflow_type): New enum.
8577 (accumulate_overflow): New.
8578
8579 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8580
8581 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8582 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8583
8584 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8585
8586 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8587 argument is checked for zero before entering loop, avoid checking again.
8588
8589 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8590
8591 * gimplify.h (generic_expr_could_trap_p): Set as global function.
8592 * gimplify.h (generic_expr_could_trap_p): Likwise.
8593 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8594
8595 2018-07-06 Jakub Jelinek <jakub@redhat.com>
8596
8597 PR tree-optimization/86401
8598 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8599 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8600 (fold_bit_and_mask): ... here. New helper function for match.pd.
8601 * fold-const.h (fold_bit_and_mask): Declare.
8602 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8603
8604 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
8605
8606 PR target/86324
8607 * target.def (translate_mode_attribute): New hook.
8608 * targhooks.h (default_translate_mode_attribute): Declare.
8609 * targhooks.c (default_translate_mode_attribute): New function.
8610 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8611 * doc/tm.texi: Regenerate.
8612 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8613 (rs6000_translate_mode_attribute): New function.
8614
8615 2018-07-06 Paul Koning <ni1d@arrl.net>
8616
8617 * doc/md.texi (define_split): Document DONE and FAIL.
8618 (define_peephole2): Ditto.
8619
8620 2018-07-05 Jeff Law <law@redhat.com>
8621
8622 PR tree-optimization/86010
8623 * tree-ssa-dse.c (compute_trims): More aggressively trim at
8624 both the head and tail of mem* and str* calls.
8625
8626 2018-07-05 Jim Wilson <jimw@sifive.com>
8627
8628 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8629
8630 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
8631
8632 * config/aarch64/aarch64-simd.md: correct flags text for
8633 MIN_EXPR replacement.
8634
8635 2018-07-05 James Clarke <jrtc27@jrtc27.com>
8636
8637 * configure: Regenerated.
8638
8639 2018-07-05 Carl Love <cel@us.ibm.com>
8640
8641 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8642 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8643 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8644 VSX_BUILTIN_DOUBLEL_V4SF.
8645
8646 2018-07-05 Martin Sebor <msebor@redhat.com>
8647
8648 PR c++/86400
8649 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8650 than its domain to compute its the upper bound of a char array.
8651
8652 2018-07-05 Nathan Sidwell <nathan@acm.org>
8653
8654 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8655 * doc/cpp.texi: Update comment.
8656 * doc/tm.texi: Rebuilt.
8657 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8658 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8659 * doc/extend.texi (Backwards Compatibility): Clarify it is system
8660 headers affected by extern "C".
8661 * system.h: Poison NO_IMPLICIT_EXTERN_C.
8662 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8663 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8664 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8665 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8666 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8667 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8668 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8669 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8670 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8671 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8672 config/sparc/sp64-elf.h, config/spu/spu.h,
8673 config/stormy16/stormy16.h, config/v850/v850.h,
8674 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8675 define NO_IMPLICIT_EXTERN_C.
8676 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8677
8678 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8679
8680 PR target/84711
8681 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8682 instead of GET_MODE_SIZE when comparing Units.
8683
8684 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8685
8686 PR target/84711
8687 * rtlanal.c (set_noop_p): Constrain on mode change,
8688 include hard-reg-set.h
8689
8690 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8691
8692 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8693
8694 2018-07-05 Jakub Jelinek <jakub@redhat.com>
8695
8696 Revert
8697 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
8698
8699 PR sanitizer/84250
8700 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8701 libasan.
8702 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8703
8704 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
8705
8706 PR sanitizer/84250
8707 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8708 libasan.
8709 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8710
8711 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
8712
8713 PR middle-end/86380
8714 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8715
8716 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
8717
8718 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8719 neg_*_op* variables.
8720
8721 2018-07-04 Martin Liska <mliska@suse.cz>
8722
8723 * tree-switch-conversion.c: Define
8724 max_ratio_for_speed and max_ratio_for_size constants.
8725
8726 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
8727 Martin Liska <mliska@suse.cz>
8728
8729 PR middle-end/66240
8730 PR target/45996
8731 PR c/84100
8732 * common.opt: Rename align options with 'str_' prefix.
8733 * common/config/i386/i386-common.c (set_malign_value): New
8734 function.
8735 (ix86_handle_option): Use it to set -falign-* options/
8736 * config/aarch64/aarch64-protos.h (struct tune_params): Change
8737 type from int to string.
8738 * config/aarch64/aarch64.c: Update default values from int
8739 to string.
8740 * config/alpha/alpha.c (alpha_override_options_after_change):
8741 Likewise.
8742 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8743 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8744 max skip conditionally.
8745 * config/i386/freebsd.h (SUBALIGN_LOG): New.
8746 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8747 max skip conditionally.
8748 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8749 max skip conditionally.
8750 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8751 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8752 max skip conditionally.
8753 * config/i386/i386.c (struct ptt): Change type from int to
8754 string.
8755 (ix86_default_align): Set default values.
8756 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8757 max skip conditionally.
8758 * config/i386/iamcu.h (SUBALIGN_LOG): New.
8759 (ASM_OUTPUT_MAX_SKIP_ALIGN):
8760 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8761 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8762 max skip conditionally.
8763 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8764 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8765 * config/i386/x86-64.h (SUBALIGN_LOG): New.
8766 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8767 max skip conditionally.
8768 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8769 * config/ia64/ia64.c (ia64_option_override): Set default values
8770 for alignment options.
8771 * config/m68k/m68k.c: Handle new str_align_* options.
8772 * config/mips/mips.c (mips_set_compression_mode): Change
8773 type of constants.
8774 (mips_option_override): Set default values for options.
8775 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8776 Likewise.
8777 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8778 Likewise.
8779 * config/rx/rx.c (rx_option_override): Likewise.
8780 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8781 (LABEL_ALIGN): Use align_labels_log.
8782 (LOOP_ALIGN): Use align_loops_align.
8783 * config/s390/s390.c (s390_asm_output_function_label): Use new
8784 macros.
8785 * config/sh/sh.c (sh_override_options_after_change):
8786 Change type of constants.
8787 * config/spu/spu.c (spu_sched_init): Likewise.
8788 * config/sparc/sparc.c (sparc_option_override): Set default
8789 values for options.
8790 * config/visium/visium.c (visium_option_override): Likewise.
8791 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
8792 emit p2align format with last argument if it's not needed.
8793 * doc/invoke.texi: Document extended format of -falign-*.
8794 * final.c: Use align_labels alignment.
8795 * flags.h (struct target_flag_state): Change type to use
8796 align_flags.
8797 (struct align_flags_tuple): New.
8798 (struct align_flags): Likewise.
8799 (align_loops_log): Redefine macro to use new types.
8800 (align_loops_max_skip): Redefine macro to use new types.
8801 (align_jumps_log): Redefine macro to use new types.
8802 (align_jumps_max_skip): Redefine macro to use new types.
8803 (align_labels_log): Redefine macro to use new types.
8804 (align_labels_max_skip): Redefine macro to use new types.
8805 (align_functions_log): Redefine macro to use new types.
8806 (align_loops): Redefine macro to use new types.
8807 (align_jumps): Redefine macro to use new types.
8808 (align_labels): Redefine macro to use new types.
8809 (align_functions): Redefine macro to use new types.
8810 (align_functions_max_skip): Redefine macro to use new types.
8811 (align_loops_value): New macro.
8812 (align_jumps_value): New macro.
8813 (align_labels_value): New macro.
8814 (align_functions_value): New macro.
8815 * function.c (invoke_set_current_function_hook): Propagate
8816 alignment values from flags to global variables default in
8817 topleev.h.
8818 * ipa-icf.c (sem_function::equals_wpa): Use
8819 cl_optimization_option_eq instead of memcmp.
8820 * lto-streamer.h (cl_optimization_stream_out): Support streaming
8821 of string types.
8822 (cl_optimization_stream_in): Likewise.
8823 * optc-save-gen.awk: Support strings in cl_optimization.
8824 * opth-gen.awk: Likewise.
8825 * opts.c (finish_options): Remove error checking of invalid
8826 value ranges.
8827 (MAX_CODE_ALIGN): Remove.
8828 (MAX_CODE_ALIGN_VALUE): Likewise.
8829 (parse_and_check_align_values): New function.
8830 (check_alignment_argument): Likewise.
8831 (common_handle_option): Use check_alignment_argument.
8832 * opts.h (parse_and_check_align_values): Declare.
8833 * toplev.c (init_alignments): Remove.
8834 (read_log_maxskip): New.
8835 (parse_N_M): Likewise.
8836 (parse_alignment_opts): Likewise.
8837 (backend_init_target): Remove usage of init_alignments.
8838 * toplev.h (parse_alignment_opts): Declare.
8839 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
8840 argument.
8841 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
8842 * tree.c (cl_option_hasher::equal): New.
8843 * varasm.c: Use new global macros.
8844
8845 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
8846
8847 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
8848 Use a simpler align directive also if MAXSKIP = ALIGN-1.
8849 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8850 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8851 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8852 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8853 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
8854 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
8855 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
8856 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8857 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8858 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8859 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8860
8861 2018-07-04 Martin Liska <mliska@suse.cz>
8862 Jonathan Wakely <jwakely@redhat.com>
8863
8864 * coverage.c: Use correct type.
8865 * doc/invoke.texi: Language correction.
8866
8867 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
8868
8869 PR target/85620
8870 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
8871 ENDBRANCH for non-tail call which may return via indirect branch.
8872 * doc/extend.texi: Document indirect_return attribute.
8873
8874 2018-07-03 Martin Sebor <msebor@redhat.com>
8875
8876 PR tree-optimization/86274
8877 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
8878 precondition.
8879 (format_floating): Correct handling of infinities and NaNs.
8880
8881 2018-07-03 Martin Sebor <msebor@redhat.com>
8882
8883 * print-tree.c (print_real_cst): New function.
8884 (print_node_brief): Call it.
8885 (print_node): Ditto.
8886
8887 2018-07-03 Jeff Law <law@redhat.com>
8888
8889 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
8890 into a single pattern.
8891
8892 * config/h8300/h8300.md (ors code_iterator): New.
8893 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
8894 a single pattern and single splitter.
8895 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
8896 (iorqi3_1, xorqi3_1): Likewise.
8897 (iorqi3, xorqi3 expanders): Similarly.
8898
8899 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
8900 (movmd_internal) into a single pattern using the P mode iterator.
8901 (movmd splitters): Similarly.
8902 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
8903 (movsd splitters): Similarly.
8904
8905 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
8906 ADDB, ADDW and ADDL into a single ADD attribute which selects the
8907 right table based on the size of the operand.
8908 * config/h8300/h8300.md (length_table): Corresponding changes. All
8909 references to "addb", "addw" and "addl" changed to "add".
8910 (btst patterns): Merge two variants into a single pattern.
8911 (tstqi, tsthi): Likewise.
8912 (addhi3_incdec, addsi3_incdec): Likewise.
8913 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
8914 (mulhi3, mulsi3): Likewise.
8915 (udivhi3, udivsi3): Likewise.
8916 (divhi3, divsi3): Likewise.
8917 (andorqi3, andorhi3, andorsi3): Likewise.
8918
8919 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
8920
8921 PR target/85694
8922 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
8923 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
8924
8925 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
8926
8927 PR tree-optimization/85694
8928 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
8929 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
8930 UNSPEC_URHADD.
8931 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
8932 (<u>avg<mode>3_ceil): New patterns.
8933
8934 2018-07-03 David Malcolm <dmalcolm@redhat.com>
8935
8936 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
8937 scan-tree-dump directive.
8938 * gcc.dg/vect/slp-perm-2.c: Likewise.
8939 * gcc.dg/vect/slp-perm-3.c: Likewise.
8940 * gcc.dg/vect/slp-perm-5.c: Likewise.
8941 * gcc.dg/vect/slp-perm-6.c: Likewise.
8942 * gcc.dg/vect/slp-perm-7.c: Likewise.
8943 * gcc.dg/vect/slp-perm-8.c: Likewise.
8944
8945 2018-07-03 Marek Polacek <polacek@redhat.com>
8946
8947 PR middle-end/86202
8948 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
8949
8950 2018-07-03 Richard Biener <rguenther@suse.de>
8951
8952 PR ipa/86389
8953 * tree-ssa-structalias.c (find_func_clobbers): Properly
8954 handle indirect calls.
8955
8956 2018-07-03 Jeff Law <law@redhat.com>
8957
8958 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
8959 (shifts): New code iterator.
8960 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
8961 expander. Fix HImode handling on H8/SX.
8962 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
8963 (subqi3, subhi3, subsi3 expanders): Likewise.
8964 (andqi3, andhi3, andsi3 expanders): Likewise.
8965 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
8966 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
8967 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
8968 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
8969 (zero_extendqihi2, zero_extendqisi2): Likewise.
8970 (extendqihi2, extendqisi2): Likewise.
8971 (rotlqi3, rotlhi3, rotlsi3): Likewise.
8972 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
8973 (rotlqi3_1, rotlhi3_1): Likewise.
8974 (logicalhi3_sn, logicalsi3_sn): Likewise.
8975 (logicalhi3, logicalsi3): Likewise.
8976
8977 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
8978
8979 * tree-vect-patterns.c (vect_recog_rotate_pattern)
8980 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8981 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
8982 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
8983 type to append_pattern_def_seq instead of creating a stmt_vec_info
8984 directly.
8985 (build_mask_conversion): Likewise. Remove vinfo argument.
8986 (vect_add_conversion_to_patterm): Likewise, renaming to...
8987 (vect_add_conversion_to_pattern): ...this.
8988 (vect_recog_mask_conversion_pattern): Update call to
8989 build_mask_conversion. Pass the vector type to
8990 append_pattern_def_seq here too.
8991 (vect_recog_gather_scatter_pattern): Update call to
8992 vect_add_conversion_to_pattern.
8993
8994 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
8995
8996 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
8997 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8998 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
8999 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9000 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9001 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9002 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9003 append_pattern_def_seq instead of new_pattern_def_seq.
9004 (vect_recog_divmod_pattern): Do both of the above.
9005 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9006 is null.
9007
9008 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9009
9010 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9011 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9012 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9013 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9014 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9015 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9016 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9017 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9018 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9019 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9020 parameter with a single stmt_vec_info.
9021 (vect_recog_func_ptr): Likewise.
9022 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9023 (vect_try_gather_scatter_pattern): ...this.
9024 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9025 the stmt_vec_info of the statement to be matched. Don't clear
9026 STMT_VINFO_RELATED_STMT.
9027 (vect_pattern_recog): Update call accordingly.
9028
9029 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9030
9031 PR tree-optimization/85694
9032 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9033 (uavgM3_ceil): Document new optabs.
9034 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9035 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9036 functions.
9037 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9038 (savg_ceil_optab): New optabs.
9039 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9040 (vect_vect_recog_func_ptrs): Add it.
9041 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9042 constant directly from the associated lhs.
9043
9044 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9045
9046 * tree-vect-patterns.c (vect_split_statement): New function.
9047 (vect_convert_input): Use it to try to split an existing cast.
9048
9049 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9050
9051 * poly-int.h (print_hex): New function.
9052 * dumpfile.h (dump_dec, dump_hex): Declare.
9053 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9054 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9055 min_input_precision, operation_precision and operation_sign.
9056 * tree-vect-patterns.c (vect_get_range_info): New function.
9057 (vect_same_loop_or_bb_p, vect_single_imm_use)
9058 (vect_operation_fits_smaller_type): Delete.
9059 (vect_look_through_possible_promotion): Add an optional
9060 single_use_p parameter.
9061 (vect_recog_over_widening_pattern): Rewrite to use new
9062 stmt_vec_info infomration. Handle one operation at a time.
9063 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9064 (vect_truncatable_operation_p, vect_set_operation_type)
9065 (vect_set_min_input_precision): New functions.
9066 (vect_determine_min_output_precision_1): Likewise.
9067 (vect_determine_min_output_precision): Likewise.
9068 (vect_determine_precisions_from_range): Likewise.
9069 (vect_determine_precisions_from_users): Likewise.
9070 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9071 (vect_vect_recog_func_ptrs): Put over_widening first.
9072 Add cast_forwprop.
9073 (vect_pattern_recog): Call vect_determine_precisions.
9074
9075 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9076
9077 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9078 statements that have been replaced by further pattern statements.
9079 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9080
9081 2018-07-03 Richard Biener <rguenther@suse.de>
9082
9083 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9084 always set *dt. Dump vectype in vectype overload.
9085 * dumpfile.h (dump_gimple_expr): New function.
9086 (dump_gimple_expr_loc): Likewise.
9087 * dumpfile.c (dump_gimple_expr): New function.
9088 (dump_gimple_expr_loc): Likewise.
9089
9090 2018-07-02 Jeff Law <law@redhat.com>
9091
9092 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9093 the H8/300, H8/300H and H8/S variants into a single pattern.
9094 (movhi_h8300, movqi_h8300hs): Similarly.
9095 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9096 (QHI mode iterator): New.
9097
9098 * config/h8300/h8300.md: Remove trailing whitespace.
9099
9100 2018-07-02 Jim Wilson <jimw@sifive.com>
9101
9102 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9103 instead of emit_insn for interrupt returns.
9104 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9105 (riscv_sret, riscv_uret): Likewise.
9106
9107 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9108
9109 * pretty-print.c (selftest::test_pp_format): Move save and restore
9110 of quotes to class auto_fix_quotes, and add an instance.
9111 * selftest.c: Include "intl.h".
9112 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9113 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9114 * selftest.h (selftest::auto_fix_quotes): New class.
9115
9116 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9117
9118 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9119 (aarch64_sve_prepare_conditional_op): Remove.
9120 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9121 Allow aarch64_simd_reg_or_zero as select operand; remove
9122 the aarch64_sve_prepare_conditional_op call.
9123 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9124 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9125 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9126 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9127 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9128 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9129 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9130 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9131 and a splitters to match all of the *_any patterns.
9132 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9133
9134 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9135 (SVE_COND_FP_BINARY_REV): Remove.
9136 (sve_int_op_rev, sve_fp_op_rev): New.
9137 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9138 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9139 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9140 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9141 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9142 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9143 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9144 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9145 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9146
9147 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9148 Remove match_dup 1 from the inner unspec.
9149 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9150
9151 * config/aarch64/aarch64.md (movprfx): New attr.
9152 (length): Default movprfx to 8.
9153 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9154 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9155 (*<su>mul<SVE_I>3_highpart): Likewise.
9156 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9157 (*v<ASHIFT><SVE_I>3): Likewise.
9158 (*<su><MAXMIN><SVE_I>3): Likewise.
9159 (*<su><MAXMIN><SVE_F>3): Likewise.
9160 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9161 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9162 (*div<SVE_F>4): Likewise.
9163
9164 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9165
9166 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9167 in dump string.
9168
9169 2018-07-02 Richard Biener <rguenther@suse.de>
9170
9171 PR tree-optimization/86363
9172 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9173 memset argument refers to a non-variable address.
9174
9175 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9176
9177 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9178 {PLUS,MINUS}_EXPR code to...
9179 (adjust_symbolic_bound): ...here,
9180 (combine_bound): ...here,
9181 (set_value_range_with_overflow): ...and here.
9182
9183 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9184
9185 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9186 code...
9187 (extract_range_from_abs_expr): ...here.
9188
9189 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9190
9191 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9192 -fno-omit-frame-pointer when not optimizing.
9193
9194 2018-07-02 Martin Liska <mliska@suse.cz>
9195
9196 PR ipa/86279
9197 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9198 (propagate_nothrow): Likewise.
9199
9200 2018-07-02 Martin Liska <mliska@suse.cz>
9201
9202 PR ipa/86323
9203 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9204
9205 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9206
9207 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9208 function in r262149, changing "loc" param from source_location to
9209 const dump_location_t &.
9210 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9211 declaration, as above.
9212
9213 2018-07-01 Paul Koning <ni1d@arrl.net>
9214
9215 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9216 -munit-asm, -mgnu-asm, -mdec-asm.
9217 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9218 (pdp11_output_labelref): New.
9219 (pdp11_output_def): New.
9220 (pdp11_output_addr_vec_elt): New.
9221 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9222 %# and %@ format codes.
9223 (pdp11_option_override): New.
9224 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9225 (pdp11_output_ident): New.
9226 (pdp11_asm_named_section): New.
9227 (pdp11_asm_init_sections): New.
9228 (pdp11_file_start): New.
9229 (pdp11_file_end): New.
9230 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9231 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9232 %o, like %c but octal.
9233 (pdp11_option_override): New.
9234 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9235 -mdec-asm.
9236 (DATA_SECTION_ASM_OP): Ditto.
9237 (READONLY_DATA_SECTION_ASM_OP): New.
9238 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9239 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9240 (ASM_OUTPUT_LABELREF): Ditto.
9241 (ASM_OUTPUT_DEF): Ditto.
9242 (ASM_OUTPUT_EXTERNAL): New.
9243 (ASM_OUTPUT_SOURCE_FILENAME): New.
9244 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9245 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9246 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9247 %# and %@ format codes.
9248 * config/pdp11/pdp11.opt (mgnu-asm): New.
9249 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9250 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9251 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9252
9253 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9254
9255 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9256 dereferencing path[] beyond its length.
9257 (debug_path): New.
9258 (debug_all_paths): New.
9259 (rewire_first_differing_edge): New.
9260 (adjust_paths_after_duplication): New.
9261 (duplicate_thread_path): Call adjust_paths_after_duplication.
9262 Add new argument.
9263 (thread_through_all_blocks): Add new argument to
9264 duplicate_thread_path.
9265
9266 2018-06-30 Jim Wilson <jimw@sifive.com>
9267
9268 * config/riscv/predicates.md (p2m1_shift_operand): New.
9269 (high_mask_shift_operand): New.
9270 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9271 pattern using p2m1_shift_operand.
9272 (lshsi3_zero_extend_3+2): New combiner pattern using
9273 high_mask_shift_operand.
9274
9275 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9276
9277 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9278 split out from...
9279 (vect_recog_rotate_pattern): ...here.
9280 (vect_convert_input): Try to insert casts of invariants in the
9281 preheader.
9282 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9283 preheader to be empty.
9284
9285 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9286
9287 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9288 vector type. If given, install it in the new statement's
9289 STMT_VINFO_VECTYPE.
9290 (vect_element_precision): New function.
9291 (vect_unpromoted_value): New struct.
9292 (vect_unpromoted_value::vect_unpromoted_value): New function.
9293 (vect_unpromoted_value::set_op): Likewise.
9294 (vect_look_through_possible_promotion): Likewise.
9295 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9296 (vect_widened_op_tree, vect_convert_input): Likewise.
9297 (vect_convert_inputs, vect_convert_output): Likewise.
9298 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9299 to handle the optional cast of the multiplication result and
9300 vect_widened_op_tree to detect the widened multiplication itself.
9301 Do not require the input and output of promotion casts to have
9302 the same sign, but base the signedness of the operation on the
9303 input rather than the result. If the pattern includes two
9304 promotions, check that those promotions have the same sign.
9305 Do not restrict the MULT_EXPR handling to a double-width result;
9306 handle quadruple-width results and wider. Use vect_convert_inputs
9307 to convert the inputs to the common type.
9308 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9309 to handle the optional cast of the ABS result. Also allow a sign
9310 change or a sign extension between the ABS and MINUS.
9311 Use vect_widened_op_tree to detect the widened subtraction and use
9312 vect_convert_inputs to convert the inputs to the common type.
9313 (vect_handle_widen_op_by_const): Delete.
9314 (vect_recog_widen_op_pattern): New function.
9315 (vect_recog_widen_mult_pattern): Use it.
9316 (vect_recog_widen_shift_pattern): Likewise.
9317 (vect_recog_widen_sum_pattern): Use
9318 vect_look_through_possible_promotion to handle the promoted
9319 PLUS_EXPR operand.
9320
9321 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9322
9323 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9324 the containing gimple_seq *.
9325 * gimple-iterator.h (gsi_for_stmt): Declare it.
9326 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9327 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9328 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9329 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9330 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9331 checks.
9332 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9333 split out from...
9334 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9335 statement being replaced is part of an existing pattern
9336 definition sequence, inserting the new pattern statements before
9337 the original one.
9338 (vect_pattern_recog_1): Don't return a bool. If the statement
9339 is already part of a pattern, instead apply pattern matching
9340 to the pattern definition statements. Don't clear the
9341 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9342 (vect_pattern_recog): Don't break after the first match;
9343 continue processing the pattern definition statements instead.
9344 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9345
9346 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9347
9348 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9349 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9350 (vect_recog_widen_sum_pattern): Use it.
9351
9352 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9353
9354 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9355 phi is not a pattern statement and has not been replaced by
9356 a pattern statement.
9357 * tree-vect-patterns.c (type_conversion_p): Don't check
9358 STMT_VINFO_IN_PATTERN_P.
9359 (vect_recog_vector_vector_shift_pattern): Likewise.
9360 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9361 the pattern statement rather than the original statement; check
9362 directly for a WIDEN_MULT_EXPR here.
9363 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9364 vect_is_simple_use to return the pattern statement rather
9365 than the original statement; use is_pattern_stmt_p to check
9366 for such a pattern statement.
9367 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9368 to return the pattern statement rather than the original statement;
9369 don't do the same transformation here.
9370 (vect_is_simple_use): If the defining statement has been replaced
9371 by a pattern statement, return the pattern statement instead.
9372 Remove the corresponding (local) transformation from the vectype
9373 overload.
9374
9375 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9376
9377 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9378 end and default to null.
9379 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9380 (vectorizable_reduction): Update calls accordingly, dropping the
9381 gimple ** argument if the passed-back statement isn't needed.
9382 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9383 (vect_recog_rotate_pattern): Likewise.
9384 (vect_recog_mask_conversion_pattern): Likewise.
9385 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9386 (vect_mask_constant_operand_p): Likewise.
9387 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9388 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9389 (get_group_load_store_type, get_load_store_type): Likewise.
9390 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9391 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9392 (vectorizable_conversion, vectorizable_assignment): Likewise.
9393 (vectorizable_shift, vectorizable_operation): Likewise.
9394 (vectorizable_store, vect_is_simple_cond): Likewise.
9395 (vectorizable_condition, vectorizable_comparison): Likewise.
9396 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9397 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9398 and move it to the end. Cope with null def_stmt_outs.
9399
9400 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9401
9402 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9403
9404 2018-06-29 Jeff Law <law@redhat.com>
9405
9406 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9407 displacements for TARGET_V850E2V3 and newer.
9408 (TARGET_LRA_P): Remove. Defaults to LRA now.
9409 * config/v850/v850.md (sign23byte_load): Remove.
9410 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9411 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9412
9413 2018-06-29 Martin Liska <mliska@suse.cz>
9414
9415 PR lto/85759
9416 * coverage.c (coverage_init): Mangle full path name.
9417 * doc/invoke.texi: Document the change.
9418 * gcov-io.c (mangle_path): New.
9419 * gcov-io.h (mangle_path): Likewise.
9420 * gcov.c (mangle_name): Use mangle_path for path mangling.
9421
9422 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9423
9424 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9425 if starting source register is not even.
9426
9427 2018-06-29 Martin Liska <mliska@suse.cz>
9428
9429 PR tree-optimization/86263
9430 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9431 Make edge redirection.
9432
9433 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9434
9435 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9436 (dump_scope_depth): New variable.
9437 (get_dump_scope_depth): New function.
9438 (dump_begin_scope): New function.
9439 (dump_end_scope): New function.
9440 * dumpfile.h (get_dump_scope_depth): New declaration.
9441 (dump_begin_scope): New declaration.
9442 (dump_end_scope): New declaration.
9443 (class auto_dump_scope): New class.
9444 (AUTO_DUMP_SCOPE): New macro.
9445 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9446 AUTO_DUMP_SCOPE.
9447
9448 2018-06-29 Richard Biener <rguenther@suse.de>
9449
9450 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9451 compute_all_dependences succeeds.
9452 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9453 exceed --param loop-max-datarefs-for-datadeps.
9454
9455 2018-06-29 Jakub Jelinek <jakub@redhat.com>
9456
9457 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9458
9459 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
9460
9461 PR target/86348
9462 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9463 alternative 0 in preferred_for_speed attribute.
9464
9465 2018-06-28 Paul Koning <ni1d@arrl.net>
9466
9467 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9468 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9469 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9470 * config/pdp11/pdp11.md: Correct "length" attribute calculation
9471 for shift insn patterns.
9472
9473 2018-06-28 David Malcolm <dmalcolm@redhat.com>
9474
9475 * cgraph.c (cgraph_node::get_body): Replace assignments to
9476 "dump_file" with calls to set_dump_file.
9477 * dumpfile.c (alt_dump_file): Make static, and group with...
9478 (alt_flags): ...this definition.
9479 (dumps_are_enabled): New variable.
9480 (refresh_dumps_are_enabled): New function.
9481 (set_dump_file): New function.
9482 (set_alt_dump_file): New function.
9483 (gcc::dump_manager::dump_start): Replace assignments to
9484 "dump_file" and "alt_dump_file" with calls to set_dump_file and
9485 set_alt_dump_file.
9486 (gcc::dump_manager::dump_finish): Likewise.
9487 * dumpfile.h (alt_dump_file): Delete decl.
9488 (dumps_are_enabled): New variable decl.
9489 (set_dump_file): New function decl.
9490 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9491 global.
9492 * tree-nested.c (lower_nested_functions): Replace assignments to
9493 "dump_file" with calls to set_dump_file.
9494
9495 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9496
9497 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9498 goto_locus of each outgoing edge of each basic block.
9499
9500 2018-06-28 Richard Biener <rguenther@suse.de>
9501
9502 * dwarf2out.c (decl_scope_table): Remove.
9503 (push_decl_scope): Likewise.
9504 (pop_decl_scope): Likewise.
9505 (gen_type_die_for_member): Do not call push/pop_decl_scope.
9506 (gen_struct_or_union_type_die): Likewise.
9507 (gen_tagged_type_die): Likewise.
9508 (dwarf2out_init): Do not initialize decl_scope_table.
9509 (dwarf2out_c_finalize): Do not free it.
9510
9511 2018-06-28 Richard Biener <rguenther@suse.de>
9512
9513 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9514 deciding whether to not re-use a DIE.
9515
9516 2018-06-28 Richard Biener <rguenther@suse.de>
9517
9518 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9519 DW_AT_abstract_origin attribute.
9520
9521 2018-06-28 Martin Liska <mliska@suse.cz>
9522
9523 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9524 Use newly introduced constants.
9525 * tree-switch-conversion.h (struct jump_table_cluster):
9526 Define max_ratio_for_size and max_ratio_for_speed.
9527
9528 2018-06-28 Martin Liska <mliska@suse.cz>
9529
9530 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9531 Add new checking assert to catch invalid state.
9532 (jump_table_cluster::can_be_handled): Handle single case
9533 clusters.
9534 (jump_table_cluster::is_beneficial): Bail out for such case.
9535 (bit_test_cluster::find_bit_tests):
9536 Add new checking assert to catch invalid state.
9537 (bit_test_cluster::can_be_handled): Handle single case
9538 clusters.
9539 (bit_test_cluster::is_beneficial): Bail out for such case.
9540 (switch_decision_tree::analyze_switch_statement):
9541 Fix comment.
9542
9543 2018-06-28 Martin Liska <mliska@suse.cz>
9544
9545 * common.opt: Introduce -completion option.
9546 * gcc.c (driver_handle_option): Handle it.
9547 (driver::main): Print completions if completion
9548 is set.
9549 * opt-suggestions.c (option_proposer::get_completions):
9550 New function.
9551 (option_proposer::suggest_completion): Likewise.
9552 (option_proposer::find_param_completions): Likewise.
9553 (verify_autocompletions): Likewise.
9554 (test_completion_valid_options): Likewise.
9555 (test_completion_valid_params): Likewise.
9556 (in_completion_p): Likewise.
9557 (empty_completion_p): Likewise.
9558 (test_completion_partial_match): Likewise.
9559 (test_completion_garbage): Likewise.
9560 (opt_proposer_c_tests): Likewise.
9561 * opt-suggestions.h: Declare new functions.
9562 * opts.c (common_handle_option): Handle OPT__completion_.
9563 * selftest-run-tests.c (selftest::run_tests): Add
9564 opt_proposer_c_tests.
9565 * selftest.c (assert_str_startswith): New.
9566 * selftest.h (assert_str_startswith): Likewise.
9567 (opt_proposer_c_tests): New.
9568 (ASSERT_STR_STARTSWITH): Likewise.
9569
9570 2018-06-28 Martin Liska <mliska@suse.cz>
9571
9572 * Makefile.in: Add opt-suggestions.o.
9573 * gcc-main.c: Include opt-suggestions.h.
9574 * gcc.c (driver::driver): Likewise.
9575 (driver::~driver): Remove m_option_suggestions.
9576 (driver::build_option_suggestions): Moved to option_proposer.
9577 (driver::suggest_option): Likewise.
9578 (driver::handle_unrecognized_options): Use option_proposer.
9579 * gcc.h (class driver): Add new memver m_option_proposer.
9580 * opt-suggestions.c: New file.
9581 * opt-suggestions.h: New file.
9582
9583 2018-06-28 Martin Liska <mliska@suse.cz>
9584
9585 * vec.h (class auto_string_vec): New (moved from auto_argvec).
9586 (auto_string_vec::~auto_string_vec): Likewise.
9587
9588 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9589
9590 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9591 prevent_decl_creation_for_types fields up and add reset_location field.
9592 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9593 statement if id->reset_location is true.
9594 (copy_edges_for_bb): Do not set goto_locus on the new edges if
9595 id->reset_location is true.
9596 (copy_phis_for_bb): Force input_location on the arguments if
9597 id->reset_location is true.
9598 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9599 is set on the function to be inlined.
9600
9601 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
9602
9603 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9604
9605 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
9606
9607 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9608 registers for Pmode.
9609 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9610 hard registers for the clobbered pseudo.
9611
9612 2018-06-27 Paul Koning <ni1d@arrl.net>
9613
9614 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9615 mutually exclusive options.
9616 * config/pdp11/constraints.md (h): New constraint.
9617 (O): Update definition to match shift code generation.
9618 (D): New constraint.
9619 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9620 (CCFP): Remove.
9621 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9622 function.
9623 (output_jump): Change arguments.
9624 (pdp11_fixed_cc_regs): New function.
9625 (pdp11_cc_mode): Ditto.
9626 (pdp11_expand_shift): Ditto.
9627 (pdp11_assemble_shift): Ditto.
9628 (pdp11_small_shift): Ditto.
9629 (pdp11_branch_cost): Remove.
9630 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9631 from output.
9632 (pdp11_register_move_cost): Update for CC registers.
9633 (pdp11_rtx_costs): Add case for LSHIFTRT.
9634 (pdp11_output_jump): Add CCNZ mode conditional branches.
9635 (notice_update_cc_on_set): Remove.
9636 (pdp11_cc_mode): New function.
9637 (simple_memory_operand): Correct pre/post decrement case.
9638 (no_side_effect_operand): New function.
9639 (pdp11_regno_reg_class): Add CC_REGS class.
9640 (pdp11_fixed_cc_regs): New function.
9641 (pdp11_small_shift): New function.
9642 (pdp11_expand_shift): New function to expand shift insns.
9643 (pdp11_assemble_shift): New function to output shifts.
9644 (pdp11_branch_cost): Remove.
9645 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9646 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9647 (WCHAR_TYPE): Ditto.
9648 (PTRDIFF_TYPE): Ditto.
9649 (ADJUST_INSN_LENGTH): New macro.
9650 (FIXED_REGISTERS): Add CC registers.
9651 (CALL_USED_REGISTERS): Ditto.
9652 (reg_class): Ditto.
9653 (REG_CLASS_NAMES): Ditto.
9654 (REG_CLASS_CONTENTS): Ditto.
9655 (SELECT_CC_MODE): Use new function.
9656 (TARGET_FLAGS_REGNUM): New macro.
9657 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9658 (cc0_reg_rtx): Remove.
9659 (CC_STATUS_MDEP): Remove.
9660 (CC_STATUS_MDEFP_INIT): Remove.
9661 (CC_IN_FPU): Remove.
9662 (NOTICE_UPDATE_CC): Remove.
9663 (REGISTER_NAMES): Add CC registers.
9664 (BRANCH_COST): Change to constant 1.
9665 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9666 handling.
9667 * config/pdp11/pdp11.opt (mbcopy): Remove.
9668 (mbcopy-builtin): Remove.
9669 (mbranch-cheap): Remove.
9670 (mbranch-expensive): Remove.
9671 * config/pdp11/predicates.md (expand_shift_operand): Update to
9672 match shift code generation.
9673 (ccnz_operator): New predicate.
9674 * doc/invoke.texi (PDP-11 Options): Remove deleted options
9675 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9676 Remove non-existent option -mabshi, -mno-abshi. Document mutually
9677 exclusive options.
9678 * doc/md.texi (PDP-11): Document new D and h constraints. Update
9679 description of O constraint.
9680
9681 2018-06-27 Jeff Law <law@redhat.com>
9682 Austin Law <austinklaw@gmail.com>
9683
9684 * config/v850/v850.md (addsi3_set_flags): New pattern.
9685 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9686 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9687 (zero_extendhisi2_v850_set_flags): Likewise.
9688 (zero_extendqisi2_v850_set_flags): Likewise.
9689 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9690 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9691 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9692
9693 * config/v850/v850-protos.h (notice_update_cc): Remove.
9694 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9695 (v850_print_operand): Handle 'D' and "d".
9696 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9697 Add handling of arithmetic/logical operations compared against zero.
9698 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9699 Do not look at v850_compare_op, instead get mode from last argument.
9700 (v850_gen_compare): Remove
9701 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9702 after reload for prologue insns.
9703 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9704 patterns.
9705 (construct_save_jarl): Likewise.
9706 (TARGET_FLAGS_REGNUM): Define.
9707 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9708 (NOTICE_UPDATE_CC): Remove.
9709 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9710 than cc0. Conditionalize on reload_completed.
9711 (cmpsi_insn, setfcc_insn): Likewise.
9712 (tst1 splitter): Turn into define_and_split which sets the flags
9713 after reload.
9714 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9715 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9716 (cstoresf4, cstoredf4): Clobber the flags.
9717 (cmpsi, cmpsf, cmpdf): Remove expanders.
9718 (setf_insn): Remove pattern.
9719 (addsi3): Turn into define_and_split which clobbers the flags after
9720 reload and a suitable pattern (addsi3_clobber_flags) for use after
9721 reload.
9722 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9723 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9724 (ashrsi3, ashrsi3_v850e2): Likewise.
9725 (bins): Clobber the flags.
9726 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9727 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9728 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9729 (call_value_internal_short, call_value_internal_long): Likewise.
9730 (callt_save_interrupt, callt_return_interrupt): Likewise.
9731 (save_interrupt, return_interrupt): Likewise.
9732 (callt_save_all_interrupt, save_all_interrupt): Likewise.
9733 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9734 (restore_all_interrupt, _restore_all_interrupt): Likewise.
9735 (All FP comparisons): Only allow after reload has completed.
9736 (trfsr): Likewise.
9737 (divh, divhu): Tweak output template.
9738 (branch_z_normal, branch_z_invert): Remove
9739 (branch_nz_normal, branch_nz_invert): Likewise.
9740 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9741
9742 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9743 * config/v850/v850.c (notice_update_cc): Remove.
9744 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
9745 (CC_NO_CARRY): Likewise.
9746 (NOTICE_UPDATE_CC): Define to nothing.
9747 * config/v850/v850.md: Remove block comment on cc0 handling
9748 Remove "cc" attribute from all patterns. Remove cc_status handling
9749 from all patterns. Minor formatting fixes.
9750
9751 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9752
9753 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9754 (cortex-a76.cortex-a55): Likewise.
9755 * config/aarch64/aarch64-tune.md: Regenerate.
9756 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9757 cortex-a76.cortex-a55.
9758
9759 2018-06-27 Jeff Law <law@redhat.com>
9760
9761 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9762 (MULTILIB_DIRNAMES): Similarly.
9763
9764 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
9765
9766 * gimple.h (gimple_return_retbnd): Delete.
9767 (gimple_return_set_retbnd): Likewise.
9768 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9769 gimple_return_set_retbnd.
9770 * gimple-pretty-print.c (dump_gimple_return): Remove call to
9771 gimple_return_retbnd and adjust.
9772 * tree-inline.h (struct copy_body_data): Remove retbnd field.
9773 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9774 Explicitly return NULL in a couple more cases. Move assertion
9775 on debug statements and remove unreachable code.
9776 (reset_debug_binding): Do not test id->retbnd.
9777 (expand_call_inline): Do not set it.
9778
9779 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9780
9781 * configure.ac: Add --disable-gcov option.
9782 * configure: Regenerate.
9783 * Makefile.in: Honour @enable_gcov@.
9784 * doc/install.texi: Document --disable-gcov.
9785
9786 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9787
9788 * config/arm/arm-cpus.in (cortex-a76): New entry.
9789 (cortex-a76.cortex-a55): Likewise.
9790 * config/arm/arm-tables.opt: Regenerate.
9791 * config/arm/arm-tune.md: Likewise.
9792 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
9793 * doc/invoke.texi (ARM Options): Document cortex-a76 and
9794 cortex-a76.cortex-a55.
9795
9796 2018-06-27 Tamar Christina <tamar.christina@arm.com>
9797
9798 PR target/85769
9799 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
9800
9801 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
9802
9803 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
9804 comment.
9805 (EPILOGUE_USES): Likewise.
9806
9807 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
9808
9809 * tree-inline.c (remap_location): New function extracted from...
9810 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
9811 (copy_phis_for_bb): ...here. Call remap_location.
9812 (copy_cfg_body): Adjust call to copy_edges_for_bb.
9813
9814 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
9815
9816 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
9817 unaligned vsx for 16B memset.
9818
9819 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
9820
9821 PR target/86285
9822 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
9823 ieee128_float_type_node to long_double_type_node unless
9824 TARGET_LONG_DOUBLE_128 is set.
9825
9826 2018-06-26 David Malcolm <dmalcolm@redhat.com>
9827
9828 * cfgloop.c (get_loop_location): Convert return type from
9829 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
9830 by implicit construction from rtx_insn *, and using
9831 dump_user_location_t::from_function_decl for the fallback case.
9832 * cfgloop.h (get_loop_location): Convert return type from
9833 location_t to dump_user_location_t.
9834 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
9835 dump_printf_loc to pass in a dump_location_t rather than a
9836 location_t, via the gimple stmt.
9837 * coverage.c (get_coverage_counts): Update calls to
9838 dump_printf_loc to pass in dump_location_t rather than a
9839 location_t.
9840 * doc/optinfo.texi (Dump types): Convert example of
9841 dump_printf_loc from taking "locus" to taking "insn". Update
9842 description of the "_loc" calls to cover dump_location_t.
9843 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
9844 "selftest.h".
9845 (dump_user_location_t::dump_user_location_t): New constructors,
9846 from gimple *stmt and rtx_insn *.
9847 (dump_user_location_t::from_function_decl): New function.
9848 (dump_loc): Make static.
9849 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
9850 const dump_location_t &.
9851 (dump_generic_expr_loc): Delete.
9852 (dump_printf_loc): Convert param "loc" from location_t to
9853 const dump_location_t &.
9854 (selftest::test_impl_location): New function.
9855 (selftest::dumpfile_c_tests): New function.
9856 * dumpfile.h: Include "profile-count.h".
9857 (class dump_user_location_t): New class.
9858 (struct dump_impl_location_t): New struct.
9859 (class dump_location_t): New class.
9860 (dump_printf_loc): Convert 2nd param from source_location to
9861 const dump_location_t &.
9862 (dump_generic_expr_loc): Delete.
9863 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
9864 const dump_location_t &.
9865 * gimple-fold.c (fold_gimple_assign): Update call to
9866 dump_printf_loc to pass in a dump_location_t rather than a
9867 location_t, via the gimple stmt.
9868 (gimple_fold_call): Likewise.
9869 * gimple-loop-interchange.cc
9870 (loop_cand::analyze_iloop_reduction_var): Update for change to
9871 check_reduction_path.
9872 (tree_loop_interchange::interchange): Update for change to
9873 find_loop_location.
9874 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
9875 change in return-type of find_loop_location.
9876 (graphite_regenerate_ast_isl): Likewise.
9877 * graphite-optimize-isl.c (optimize_isl): Likewise.
9878 * graphite.c (graphite_transform_loops): Likewise.
9879 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
9880 pass in a dump_location_t rather than a location_t, via the
9881 gimple stmt.
9882 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9883 * ipa.c (walk_polymorphic_call_targets): Likewise.
9884 * loop-unroll.c (report_unroll): Convert "locus" param from
9885 location_t to dump_location_t.
9886 (decide_unrolling): Update for change to get_loop_location's
9887 return type.
9888 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
9889 location_t to dump_user_location_t.
9890 (grid_find_single_omp_among_assignments_1): Updates calls to
9891 dump_printf_loc to pass in a dump_location_t rather than a
9892 location_t, via the gimple stmt.
9893 (grid_parallel_clauses_gridifiable): Convert "tloc" from
9894 location_t to dump_location_t. Updates calls to dump_printf_loc
9895 to pass in a dump_location_t rather than a location_t, via the
9896 gimple stmt.
9897 (grid_inner_loop_gridifiable_p): Likewise.
9898 (grid_dist_follows_simple_pattern): Likewise.
9899 (grid_gfor_follows_tiling_pattern): Likewise.
9900 (grid_target_follows_gridifiable_pattern): Likewise.
9901 (grid_attempt_target_gridification): Convert initialization
9902 of local "grid" from memset to zero-initialization; FIXME: does
9903 this require C++11? Update call to dump_printf_loc to pass in a
9904 optinfo_location rather than a location_t, via the gimple stmt.
9905 * profile.c (read_profile_edge_counts): Updates call to
9906 dump_printf_loc to pass in a dump_location_t rather than a
9907 location_t
9908 (compute_branch_probabilities): Likewise.
9909 * selftest-run-tests.c (selftest::run_tests): Call
9910 dumpfile_c_tests.
9911 * selftest.h (dumpfile_c_tests): New decl.
9912 * tree-loop-distribution.c (pass_loop_distribution::execute):
9913 Update for change in return type of find_loop_location.
9914 * tree-parloops.c (parallelize_loops): Likewise.
9915 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
9916 "locus" from location_t to dump_user_location_t.
9917 (canonicalize_loop_induction_variables): Likewise.
9918 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
9919 for change in return type of find_loop_location.
9920 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
9921 to dump_printf_loc to pass in a dump_location_t rather than a
9922 location_t, via the stmt.
9923 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
9924 Likewise.
9925 * tree-vect-loop-manip.c (find_loop_location): Convert return
9926 type from source_location to dump_user_location_t.
9927 (vect_do_peeling): Update for above change.
9928 (vect_loop_versioning): Update for change in type of
9929 vect_location.
9930 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
9931 from location_t to dump_user_location_t.
9932 (vect_estimate_min_profitable_iters): Update for change in type
9933 of vect_location.
9934 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
9935 location_t to dump_location_t.
9936 (vect_slp_bb): Update for change in type of vect_location.
9937 * tree-vectorizer.c (vect_location): Convert from source_location
9938 to dump_user_location_t.
9939 (try_vectorize_loop_1): Update for change in vect_location's type.
9940 (vectorize_loops): Likewise.
9941 (increase_alignment): Likewise.
9942 * tree-vectorizer.h (vect_location): Convert from source_location
9943 to dump_user_location_t.
9944 (find_loop_location): Convert return type from source_location to
9945 dump_user_location_t.
9946 (check_reduction_path): Convert 1st param from location_t to
9947 dump_user_location_t.
9948 * value-prof.c (check_counter): Update call to dump_printf_loc to
9949 pass in a dump_user_location_t rather than a location_t; update
9950 call to error_at for change in type of "locus".
9951 (check_ic_target): Update call to dump_printf_loc to
9952 pass in a dump_user_location_t rather than a location_t, via the
9953 call_stmt.
9954
9955 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
9956
9957 * config/s390/s390.h (enum processor_flags): Do not use
9958 default tune parameter when -march was specified.
9959
9960 2018-06-26 Jakub Jelinek <jakub@redhat.com>
9961
9962 PR target/86314
9963 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
9964 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
9965 operands.
9966
9967 2018-06-26 Richard Biener <rguenther@suse.de>
9968
9969 PR tree-optimization/86287
9970 PR bootstrap/86316
9971 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
9972 (vect_analyze_loop): Initialize n_stmts.
9973
9974 2018-06-26 Richard Biener <rguenther@suse.de>
9975
9976 PR middle-end/86271
9977 * fold-const.c (fold_convertible_p): Pointer extension
9978 isn't valid.
9979
9980 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
9981
9982 PR debug/86064
9983 * dwarf2out.c (loc_list_has_views): Adjust comments.
9984 (dw_loc_list): Split single cross-partition range with
9985 nonzero locview.
9986
9987 2018-06-25 Jeff Law <law@redhat.com>
9988
9989 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
9990 on -mbig-switch by default.
9991
9992 * config/v850/predicates.md (const_float_1_operand): Fix match_code
9993 test.
9994 (const_float_0_operand): Remove unused predicate.
9995 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
9996 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
9997 (recipsf2): New expander. Original pattern now called
9998 (recipsf2_insn).
9999 (recipdf2, recipdf2_insn): Similarly.
10000 (rsqrtsf2, rsqrtsf2_insn): Similarly
10001 (rsqrtdf2, rsqrtdf2_insn): Similarly
10002
10003 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10004
10005 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10006 Simplify logic for FreeBSD (twice).
10007
10008 2018-06-25 Martin Sebor <msebor@redhat.com>
10009
10010 PR tree-optimization/86204
10011 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10012 a strnlen result if it's less than the length of the string.
10013
10014 2018-06-25 Martin Sebor <msebor@redhat.com>
10015
10016 PR tree-optimization/85700
10017 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10018 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10019 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10020
10021 2018-06-25 Martin Sebor <msebor@redhat.com>
10022
10023 * doc/extend.texi (Zero-length arrays): Update and clarify.
10024
10025 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10026
10027 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10028 added IEEE/IBM long double multilib support on PowerPC little
10029 endian Linux systems.
10030 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10031 (MULTILIB_DEFAULTS): Likewise.
10032 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10033 Likewise.
10034 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10035 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10036 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10037
10038 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10039
10040 PR middle-end/86311
10041 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10042 (REORDER_45): Likewise.
10043
10044 2018-06-25 Jeff Law <law@redhat.com>
10045
10046 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10047 dividend to 32 bits. Adjust length.
10048 (udivmodhi4): Cleanup output template. Fix length.
10049
10050 2018-06-25 Carl Love <cel@us.ibm.com>
10051
10052 * config/rs6000/vsx.md: Change word selector to prefered location.
10053
10054 2018-06-25 Richard Biener <rguenther@suse.de>
10055
10056 PR tree-optimization/86304
10057 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10058 epilogue-if-converted loops as well.
10059
10060 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10061
10062 * lto-section-out.c (lto_begin_section): Do not print section
10063 name for noaddr and unnumbered dumps.
10064
10065 2018-06-25 Richard Biener <rguenther@suse.de>
10066
10067 * tree-vectorizer.h (struct vec_info_shared): New structure
10068 with parts split out from struct vec_info and loop_nest from
10069 struct _loop_vec_info.
10070 (struct vec_info): Adjust accordingly.
10071 (struct _loop_vec_info): Likewise.
10072 (LOOP_VINFO_LOOP_NEST): Adjust.
10073 (LOOP_VINFO_DATAREFS): Likewise.
10074 (LOOP_VINFO_DDRS): Likewise.
10075 (struct _bb_vec_info): Likewise.
10076 (BB_VINFO_DATAREFS): Likewise.
10077 (BB_VINFO_DDRS): Likewise.
10078 (struct _stmt_vec_info): Add dr_aux member.
10079 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10080 (DR_MISALIGNMENT_UNINITIALIZED): New.
10081 (set_dr_misalignment): Adjust.
10082 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10083 (vect_analyze_loop): Adjust prototype.
10084 (vect_analyze_loop_form): Likewise.
10085 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10086 Compute dependences lazily.
10087 (vect_record_base_alignments): Use shared datarefs/ddrs.
10088 (vect_verify_datarefs_alignment): Likewise.
10089 (vect_analyze_data_refs_alignment): Likewise.
10090 (vect_analyze_data_ref_accesses): Likewise.
10091 (vect_analyze_data_refs): Likewise.
10092 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10093 constructor parameter for shared part.
10094 (vect_analyze_loop_form): Pass in shared part and adjust.
10095 (vect_analyze_loop_2): Pass in storage for the number of
10096 stmts. Move loop nest finding to the caller. Compute
10097 datarefs lazily.
10098 (vect_analyze_loop): Pass in shared part.
10099 (vect_transform_loop): Verify shared datarefs are unchanged.
10100 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10101 constructor parameter for shared part.
10102 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10103 (vect_slp_bb): Verify shared datarefs are unchanged before
10104 transform.
10105 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10106 change.
10107 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10108 DR_MISALIGNMENT_UNINITIALIZED.
10109 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10110 parameter for shared part.
10111 (vec_info::~vec_info): Adjust.
10112 (vec_info_shared::vec_info_shared): New.
10113 (vec_info_shared::~vec_info_shared): Likewise.
10114 (vec_info_shared::save_datarefs): Likewise.
10115 (vec_info_shared::check_datarefs): Likewise.
10116 (try_vectorize_loop_1): Construct shared part live for analyses
10117 of a single loop for multiple vector sizes.
10118 * tree-parloops.c (gather_scalar_reductions): Adjust.
10119
10120 2018-06-25 Richard Biener <rguenther@suse.de>
10121
10122 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10123 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10124 (vect_analyze_data_refs): Remove similar code from here and
10125 simplify accordingly.
10126
10127 2018-06-25 Richard Biener <rguenther@suse.de>
10128
10129 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10130 for reverse storage order accesses rather than asserting
10131 they cannot happen here.
10132
10133 2018-06-25 Tom de Vries <tdevries@suse.de>
10134
10135 PR debug/86257
10136 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10137 Use data16 instead of .byte for insn prefix.
10138
10139 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10140
10141 PR C++/86082
10142 * parser.c (make_char_string_pack): Pass this literal chars
10143 through cpp_interpret_string.
10144 (cp_parser_userdef_numeric_literal): Check the result of
10145 make_char_string_pack.
10146
10147 2018-06-24 Maya Rashish <coypu@sdf.org>
10148
10149 * ginclude/stddef.h: Simplify conditions around avoiding
10150 re-definition of __size_t.
10151
10152 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10153
10154 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10155 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10156
10157 2018-06-22 Maya Rashish <coypu@sdf.org>
10158
10159 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10160 made to OpenBSD and NetBSD through the years.
10161
10162 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10163
10164 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10165 behavior of vec_pack (vector double, vector double) to match
10166 behavior of vec_float2 (vector double, vector double).
10167
10168 2018-06-22 Olivier Hainque <hainque@adacore.com>
10169
10170 * gimplify.c (gimplify_function_tree): Prevent creation
10171 of a trampoline for the address of the current function
10172 passed to entry/exit instrumentation hooks.
10173
10174 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10175
10176 PR target/86222
10177 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10178 correctly.
10179
10180 2018-06-22 Martin Liska <mliska@suse.cz>
10181
10182 PR tree-optimization/86263
10183 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10184 Bail out if is_enabled is false.
10185 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10186 New declaration.
10187 (jump_table_cluster::is_enabled): New function.
10188
10189 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10190
10191 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10192 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10193 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10194 (lto_input_ts_binfo_tree_pointers): Likewise.
10195 * tree-streamer-out.c (streamer_write_tree_bitfields,
10196 write_ts_binfo_tree_pointers): Likewise.
10197 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10198
10199 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10200
10201 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10202
10203 2018-06-22 Martin Liska <mliska@suse.cz>
10204
10205 * symbol-summary.h (get): Make it pure and inline move
10206 functionality from ::get function.
10207 (get): Remove and inline into ::get and ::get_create.
10208 (get_create): Move code from ::get function.
10209
10210 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10211
10212 PR target/85994
10213 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10214 -x assembler-with-cpp.
10215
10216 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10217
10218 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10219 _FILE_OFFSET_BITS=64 for C++.
10220
10221 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10222
10223 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10224 conversion insn that shows up when pr85657-3.c is compiled using
10225 IEEE 128-bit long double.
10226 (neg<mode>2_internal): Use the correct mode to check whether the
10227 mode is IBM extended.
10228 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10229 multiply and divide external functions from being created more
10230 than once.
10231
10232 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10233
10234 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10235 functions.
10236 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10237 the edge can be forwarded.
10238 (cfg_layout_merge_blocks): Likewise.
10239
10240 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10241
10242 * except.c (finish_eh_generation): Commit edge insertions only after
10243 the EH edges have been redirected from post-landing to landing pads.
10244
10245 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10246
10247 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10248 create_tmp_var_for to create the FRAME decl.
10249 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10250
10251 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10252
10253 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10254 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10255 debug statement when resetting its value.
10256 (expand_call_inline): Copy the locus of the call onto the assignment
10257 of the return value, if any. Use local variable in more cases.
10258
10259 2018-06-21 Martin Liska <mliska@suse.cz>
10260
10261 * ipa-pure-const.c (propagate_nothrow): Use
10262 funct_state_summaries->get.
10263 (dump_malloc_lattice): Likewise.
10264 (propagate_malloc): Likewise.
10265
10266 2018-06-21 Richard Biener <rguenther@suse.de>
10267
10268 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10269 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10270 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10271 comment.
10272 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10273 BLOCK_ABSTRACT_ORIGIN unconditionally.
10274
10275 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10276
10277 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10278 deleting it.
10279 * ipa-reference.c (ipa_reference_c_finalize): Delete
10280 ipa_ref_opt_sum_summaries and set it to NULL.
10281
10282 2018-06-21 Tom de Vries <tdevries@suse.de>
10283
10284 PR tree-optimization/85859
10285 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10286 test with comment from bb_no_side_effects_p.
10287
10288 2018-06-21 Richard Biener <rguenther@suse.de>
10289
10290 PR tree-optimization/86232
10291 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10292 max for constant niter.
10293
10294 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10295
10296 * config/aarch64/aarch64-simd.md
10297 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10298
10299 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10300
10301 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10302 Make opernads of the unspec commutative.
10303
10304 2018-06-21 Richard Biener <rguenther@suse.de>
10305
10306 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10307 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10308 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10309 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10310 NULL DR_STEP.
10311 (vect_record_base_alignments): Do not record base alignment
10312 for gathers or scatters.
10313 (vect_compute_data_ref_alignment): Drop return value that is always
10314 true. Bail out early for gathers or scatters.
10315 (vect_enhance_data_refs_alignment): Bail out early for gathers
10316 or scatters.
10317 (vect_find_same_alignment_drs): Likewise.
10318 (vect_analyze_data_refs_alignment): Remove dead code.
10319 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10320 (vect_analyze_data_refs): For possible gathers or scatters do
10321 not create an alternate DR, just check their possible validity
10322 and mark them. Adjust DECL_NONALIASED handling to not rely
10323 on DR_BASE_ADDRESS.
10324 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10325 update inits of gathers or scatters.
10326 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10327 Also copy gather/scatter flag to pattern vinfo.
10328
10329 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10330
10331 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10332 behavior of vec_packsu (vector unsigned long long, vector unsigned
10333 long long) to match behavior of vec_packs with same signature.
10334
10335 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10336 Thomas Schwinge <thomas@codesourcery.com>
10337 Cesar Philippidis <cesar@codesourcery.com>
10338
10339 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10340 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10341 (gimplify_adjust_omp_clauses): Likewise.
10342 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10343 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10344 (gimplify_omp_target_update): Update handling of acc update and
10345 enter/exit data.
10346 * omp-low.c (install_var_field): Remove unused parameter
10347 base_pointers_restrict.
10348 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10349 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10350 FINALIZE}
10351 (omp_target_base_pointers_restrict_p): Delete.
10352 (scan_omp_target): Update call to scan_sharing_clauses.
10353 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10354 FINALIZE}.
10355 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10356 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10357 (convert_local_omp_clauses): Likewise.
10358 * tree-pretty-print.c (dump_omp_clause): Likewise.
10359 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10360 FINALIZE}.
10361 (omp_clause_code_name): Likewise.
10362
10363 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10364
10365 PR debug/86194
10366 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10367 be narrowed.
10368
10369 PR tree-optimization/86231
10370 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10371 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10372
10373 2018-06-20 Tom de Vries <tdevries@suse.de>
10374
10375 PR tree-optimization/86097
10376 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10377 iv type if signedness of iv type is not the same as that of *nit.
10378
10379 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10380
10381 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10382 EDGE_EH edges, verify they are all EDGE_EH.
10383
10384 2018-06-20 Maya Rashish <coypu@sdf.org>
10385
10386 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10387
10388 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10389
10390 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10391 * config/aarch64/aarch64.c (xgene1_tunings): Add
10392 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10393 (aarch64_mode_valid_for_sched_fusion_p):
10394 Allow 16-byte modes.
10395 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10396 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10397 128-bit modes.
10398 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10399 New pattern.
10400 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10401 * config/aarch64/iterators.md (VQ2): New mode iterator.
10402
10403 2018-06-20 Martin Liska <mliska@suse.cz>
10404
10405 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10406 Change default ratio from 10 to 8.
10407
10408 2018-06-20 Martin Liska <mliska@suse.cz>
10409
10410 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10411 New.
10412 (bit_test_cluster::find_bit_tests): Likewise.
10413 (switch_decision_tree::analyze_switch_statement): Find clusters.
10414 * tree-switch-conversion.h (struct jump_table_cluster): Document
10415 hierarchy.
10416
10417 2018-06-20 Martin Liska <mliska@suse.cz>
10418
10419 * tree-switch-conversion.c (switch_conversion::collect):
10420 Record m_uniq property.
10421 (switch_conversion::expand): Bail out for special conditions.
10422 (group_cluster::~group_cluster): New.
10423 (group_cluster::group_cluster): Likewise.
10424 (group_cluster::dump): Likewise.
10425 (jump_table_cluster::emit): New.
10426 (switch_decision_tree::fix_phi_operands_for_edges): New.
10427 (struct case_node): Remove struct.
10428 (jump_table_cluster::can_be_handled): New.
10429 (case_values_threshold): Moved to header.
10430 (reset_out_edges_aux): Likewise.
10431 (jump_table_cluster::is_beneficial): New.
10432 (bit_test_cluster::can_be_handled): Likewise.
10433 (add_case_node): Remove.
10434 (bit_test_cluster::is_beneficial): New.
10435 (case_bit_test::cmp): New.
10436 (bit_test_cluster::emit): New.
10437 (expand_switch_as_decision_tree_p): Remove.
10438 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10439 (fix_phi_operands_for_edge): Likewise.
10440 (switch_decision_tree::analyze_switch_statement): New.
10441 (compute_cases_per_edge): Move ...
10442 (switch_decision_tree::compute_cases_per_edge): ... here.
10443 (try_switch_expansion): Likewise.
10444 (switch_decision_tree::try_switch_expansion): Likewise.
10445 (record_phi_operand_mapping): Likewise.
10446 (switch_decision_tree::record_phi_operand_mapping): Likewise.
10447 (emit_case_decision_tree): Likewise.
10448 (switch_decision_tree::emit): Likewise.
10449 (balance_case_nodes): Likewise.
10450 (switch_decision_tree::balance_case_nodes): Likewise.
10451 (dump_case_nodes): Likewise.
10452 (switch_decision_tree::dump_case_nodes): Likewise.
10453 (emit_jump): Likewise.
10454 (switch_decision_tree::emit_jump): Likewise.
10455 (emit_cmp_and_jump_insns): Likewise.
10456 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10457 (emit_case_nodes): Likewise.
10458 (switch_decision_tree::emit_case_nodes): Likewise.
10459 (conditional_probability): Remove.
10460 * tree-switch-conversion.h (enum cluster_type): New.
10461 (PRINT_CASE): New.
10462 (struct cluster): Likewise.
10463 (cluster::cluster): Likewise.
10464 (struct simple_cluster): Likewise.
10465 (simple_cluster::simple_cluster): Likewise.
10466 (struct group_cluster): Likewise.
10467 (struct jump_table_cluster): Likewise.
10468 (struct bit_test_cluster): Likewise.
10469 (struct min_cluster_item): Likewise.
10470 (struct case_tree_node): Likewise.
10471 (case_tree_node::case_tree_node): Likewise.
10472 (jump_table_cluster::case_values_threshold): Likewise.
10473 (struct case_bit_test): Likewise.
10474 (struct switch_decision_tree): Likewise.
10475 (struct switch_conversion): Likewise.
10476 (switch_decision_tree::reset_out_edges_aux): Likewise.
10477
10478 2018-06-20 Martin Liska <mliska@suse.cz>
10479
10480 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10481 (hoist_edge_and_branch_if_true): Likewise.
10482 (expand_switch_using_bit_tests_p): Likewise.
10483 (struct case_bit_test): Likewise.
10484 (case_bit_test_cmp): Likewise.
10485 (emit_case_bit_tests): Likewise.
10486 (switch_conversion::switch_conversion): New class.
10487 (struct switch_conv_info): Remove old struct.
10488 (collect_switch_conv_info): More to ...
10489 (switch_conversion::collect): ... this.
10490 (check_range): Likewise.
10491 (switch_conversion::check_range): Likewise.
10492 (check_all_empty_except_final): Likewise.
10493 (switch_conversion::check_all_empty_except_final): Likewise.
10494 (check_final_bb): Likewise.
10495 (switch_conversion::check_final_bb): Likewise.
10496 (create_temp_arrays): Likewise.
10497 (switch_conversion::create_temp_arrays): Likewise.
10498 (free_temp_arrays): Likewise.
10499 (gather_default_values): Likewise.
10500 (switch_conversion::gather_default_values): Likewise.
10501 (build_constructors): Likewise.
10502 (switch_conversion::build_constructors): Likewise.
10503 (constructor_contains_same_values_p): Likewise.
10504 (switch_conversion::contains_same_values_p): Likewise.
10505 (array_value_type): Likewise.
10506 (switch_conversion::array_value_type): Likewise.
10507 (build_one_array): Likewise.
10508 (switch_conversion::build_one_array): Likewise.
10509 (build_arrays): Likewise.
10510 (switch_conversion::build_arrays): Likewise.
10511 (gen_def_assigns): Likewise.
10512 (switch_conversion::gen_def_assigns): Likewise.
10513 (prune_bbs): Likewise.
10514 (switch_conversion::prune_bbs): Likewise.
10515 (fix_phi_nodes): Likewise.
10516 (switch_conversion::fix_phi_nodes): Likewise.
10517 (gen_inbound_check): Likewise.
10518 (switch_conversion::gen_inbound_check): Likewise.
10519 (process_switch): Use the newly created class.
10520 (switch_conversion::expand): New.
10521 (switch_conversion::~switch_conversion): New.
10522 * tree-switch-conversion.h: New file.
10523
10524 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10525
10526 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10527 tree-vect-patterns.c.
10528 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10529 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
10530 (vect_recog_sad_pattern): Likewise.
10531 (vect_recog_widen_sum_pattern): Likewise.
10532 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
10533 (vect_recog_widen_shift_pattern): Remove the type_in argument.
10534 (vect_recog_rotate_pattern): Likewise.
10535 (vect_recog_mult_pattern): Likewise.
10536 (vect_recog_vector_vector_shift_pattern): Likewise.
10537 (vect_recog_divmod_pattern): Likewise.
10538 (vect_recog_mixed_size_cond_pattern): Likewise.
10539 (vect_recog_bool_pattern): Likewise.
10540 (vect_recog_mask_conversion_pattern): Likewise.
10541 (vect_try_gather_scatter_pattern): Likewise.
10542 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
10543 (vect_recog_over_widening_pattern): Likewise.
10544 (vect_recog_gather_scatter_pattern): Likewise.
10545 (vect_recog_func_ptr): Move from tree-vectorizer.h
10546 (vect_vect_recog_func_ptrs): Move further down the file.
10547 (vect_recog_func): Likewise. Remove the third argument.
10548 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10549 (vect_pattern_recog_1): Expect the pattern function to do any
10550 necessary target tests. Also expect it to provide a vector type.
10551 Remove the type_in handling.
10552
10553 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10554
10555 * tree-vect-patterns.c (vect_pattern_detected): New function.
10556 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10557 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10558 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10559 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10560 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10561 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10562 (vect_recog_mask_conversion_pattern)
10563 (vect_try_gather_scatter_pattern): Likewise.
10564
10565 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10566
10567 * tree-vect-patterns.c (vect_get_internal_def): New function.
10568 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10569 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10570 (search_type_for_mask_1): Use it.
10571
10572 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10573
10574 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10575 redundant WIDEN_SUM_EXPR handling.
10576 (vect_recog_sad_pattern): Likewise.
10577
10578 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10579
10580 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10581 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10582 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10583 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10584 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10585
10586 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10587
10588 * tree-vect-stmts.c (vectorizable_call): Make sure that we
10589 use the stmt_vec_info of the original bb statement for the
10590 new zero assignment, even if the call is part of a pattern.
10591
10592 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10593
10594 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10595 that the sequence is attached to the original statement rather
10596 than the pattern statement.
10597 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10598 PATTERN_DEF_SEQ from the original statement rather than
10599 the main pattern statement.
10600 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10601 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10602 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10603
10604 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10605
10606 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10607 definition statements before the early exit for statements that aren't
10608 live or relevant.
10609 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10610 split out from...
10611 (vect_transform_loop): ...here. Process pattern definition
10612 statements without first checking whether the main pattern
10613 statement is live or relevant.
10614
10615 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10616
10617 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10618 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10619
10620 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
10621
10622 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10623 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10624 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10625 (expand_block_compare): Change select_block_compare_mode call.
10626 (expand_strncmp_align_check): Use new functions, fix comment.
10627 (emit_final_str_compare_gpr): New function.
10628 (expand_strn_compare): Refactor and clean up code.
10629 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10630
10631 2018-06-19 Tony Reix <tony.reix@atos.com>
10632 Damien Bergamini <damien.bergamini@atos.com>
10633 David Edelsohn <dje.gcc@gmail.com>
10634
10635 * collect2.c (static_obj): New variable.
10636 (static_libs): New variable.
10637 (is_in_list): Uncomment declaration.
10638 (main): Track AIX libraries linked statically.
10639 (is_in_list): Uncomment definition.
10640 (scan_prog_file): Don't add AIX shared libraries initializer
10641 to constructor list if linking statically.
10642
10643 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
10644
10645 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10646 constant.
10647 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10648
10649 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
10650
10651 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10652 blocks.
10653
10654 2018-06-19 Martin Liska <mliska@suse.cz>
10655
10656 * config/i386/i386.c (ix86_can_inline_p): Do not use
10657 ipa_fn_summaries::get_create.
10658 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10659 get.
10660 (devirtualization_time_bonus): Likewise.
10661 (ipcp_propagate_stage): Likewise.
10662 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10663 (edge_set_predicate): Likewise.
10664 (evaluate_conditions_for_known_args): Likewise.
10665 (evaluate_properties_for_edge): Likewise.
10666 (ipa_call_summary::reset): Tranform to ...
10667 (ipa_call_summary::~ipa_call_summary): ... this.
10668 (ipa_fn_summary::reset): Transform to ...
10669 (ipa_fn_summary::~ipa_fn_summary): ... this.
10670 (ipa_fn_summary_t::remove): Rename to ...
10671 (ipa_fn_summary_t::remove_callees): ... this.
10672 (ipa_fn_summary_t::duplicate): Use placement new
10673 instead of memory copy.
10674 (ipa_call_summary_t::duplicate): Likewise.
10675 (ipa_call_summary_t::remove): Remove.
10676 (dump_ipa_call_summary): Change get_create to get.
10677 (ipa_dump_fn_summary): Dump only when summary exists.
10678 (analyze_function_body): Use symbol_summary::get instead
10679 of get_create.
10680 (compute_fn_summary): Likewise.
10681 (estimate_edge_devirt_benefit): Likewise.
10682 (estimate_edge_size_and_time): Likewise.
10683 (inline_update_callee_summaries): Likewise.
10684 (remap_edge_change_prob): Likewise.
10685 (remap_edge_summaries): Likewise.
10686 (ipa_merge_fn_summary_after_inlining): Likewise.
10687 (write_ipa_call_summary): Likewise.
10688 (ipa_fn_summary_write): Likewise.
10689 (ipa_free_fn_summary): Likewise.
10690 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10691 (struct ipa_call_summary): Likewise.
10692 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10693 of get_create.
10694 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10695 (estimate_size_after_inlining): Likewise.
10696 (estimate_growth): Likewise.
10697 (growth_likely_positive): Likewise.
10698 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10699 (inline_call): Likewise.
10700 * ipa-inline.c (caller_growth_limits): Likewise.
10701 (can_inline_edge_p): Likewise.
10702 (can_inline_edge_by_limits_p): Likewise.
10703 (compute_uninlined_call_time): Likewise.
10704 (compute_inlined_call_time): Likewise.
10705 (want_inline_small_function_p): Likewise.
10706 (edge_badness): Likewise.
10707 (update_caller_keys): Likewise.
10708 (update_callee_keys): Likewise.
10709 (inline_small_functions): Likewise.
10710 (inline_to_all_callers_1): Likewise.
10711 (dump_overall_stats): Likewise.
10712 (early_inline_small_functions): Likewise.
10713 (early_inliner): Likewise.
10714 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10715 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10716 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10717 * ipa-split.c (execute_split_functions): Likewise.
10718 * symbol-summary.h: Likewise.
10719 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10720
10721 2018-06-19 Richard Biener <rguenther@suse.de>
10722
10723 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10724 (vectorize_loops): ... here. Fix dbgcnt handling.
10725 (try_vectorize_loop): Wrap try_vectorize_loop_1.
10726
10727 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
10728
10729 PR target/86197
10730 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10731 ieee128 argument takes up only one (vector) register, not two (floating
10732 point) registers.
10733
10734 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10735
10736 * gimplify.c (gimplify_init_constructor): Really never clear for an
10737 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10738
10739 2018-06-19 Richard Biener <rguenther@suse.de>
10740
10741 PR tree-optimization/86179
10742 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10743 after failed recognition.
10744
10745 2018-06-18 Martin Sebor <msebor@redhat.com>
10746
10747 PR middle-end/85602
10748 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10749 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10750 Handle integer subtraction.
10751 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10752 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10753
10754 2018-06-18 David Malcolm <dmalcolm@redhat.com>
10755
10756 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10757 param from rtx to rtx_insn *.
10758 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10759 param.
10760 (frv_ifcvt_modify_insn): Likwise.
10761 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10762 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
10763 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10764 as_a <rtx_insn *> cast to local "unprotected_region" once
10765 it's been established that it's not NULL or pc_rtx.
10766 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10767 param "sethi" from rtx to rtx_insn *.
10768 (nds32_group_float_insns): Likewise for param "insn".
10769 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10770 param.
10771 (vax_output_int_subtract): Likewise.
10772 * config/vax/vax.c (vax_output_int_add): Likewise for param
10773 "insn".
10774 (vax_output_int_subtract): Likewise.
10775 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10776 (emit_pattern_after): Likewise for param "after".
10777 (emit_insn_after): Likewise.
10778 (emit_jump_insn_after): Likewise.
10779 (emit_call_insn_after): Likewise.
10780 (emit_debug_insn_after): Likewise.
10781 (emit_pattern_before): Likewise for param "before".
10782 (emit_insn_before): Likewise.
10783 (emit_jump_insn_before): Likewise.
10784 * final.c (get_insn_template): Likewise for param "insn", removing
10785 a cast.
10786 * output.h (get_insn_template): Likewise for 2nd param.
10787 * rtl.h (emit_insn_before): Likewise.
10788 (emit_jump_insn_before): Likewise.
10789 (emit_debug_insn_before_noloc): Likewise.
10790 (emit_insn_after): Likewise.
10791 (emit_jump_insn_after): Likewise.
10792 (emit_call_insn_after): Likewise.
10793 (emit_debug_insn_after): Likewise.
10794 (set_insn_deleted): Likewise for param.
10795
10796 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
10797
10798 PR target/85358
10799 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
10800 floating point modes, so that IFmode is numerically greater than
10801 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
10802 to declare the ordering. This prevents IFmode from being
10803 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
10804 machine. Include rs6000-modes.h to share the fractional values
10805 between genmodes* and the rest of the compiler.
10806 (IFmode): Likewise.
10807 (KFmode): Likewise.
10808 (TFmode): Likewise.
10809 * config/rs6000/rs6000-modes.h: New file.
10810 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
10811 meaning of rs6000_long_double_size so that 126..128 selects an
10812 appropriate 128-bit floating point type.
10813 (rs6000_option_override_internal): Likewise.
10814 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
10815 (TARGET_LONG_DOUBLE_128): Change the meaning of
10816 rs6000_long_double_size so that 126..128 selects an appropriate
10817 128-bit floating point type.
10818 (LONG_DOUBLE_TYPE_SIZE): Update comment.
10819 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
10820 source and destination to match the standard usage.
10821 (truncifkf2): Likewise.
10822 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
10823 ISA 2.07 to use an explicit clobber, instead of passing in a
10824 temporary.
10825 (copysign<mode>3_soft): Likewise.
10826
10827 2018-06-18 David Malcolm <dmalcolm@redhat.com>
10828
10829 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10830 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
10831 (vect_slp_analyze_instance_dependence): Likewise.
10832 (vect_enhance_data_refs_alignment): Likewise.
10833 (vect_analyze_data_refs_alignment): Likewise.
10834 (vect_slp_analyze_and_verify_instance_alignment
10835 (vect_analyze_data_ref_accesses): Likewise.
10836 (vect_prune_runtime_alias_test_list): Likewise.
10837 (vect_analyze_data_refs): Likewise.
10838 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
10839 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
10840 (vect_analyze_scalar_cycles_1): Likewise.
10841 (vect_get_loop_niters): Likewise.
10842 (vect_analyze_loop_form_1): Likewise.
10843 (vect_update_vf_for_slp): Likewise.
10844 (vect_analyze_loop_operations): Likewise.
10845 (vect_analyze_loop): Likewise.
10846 (vectorizable_induction): Likewise.
10847 (vect_transform_loop): Likewise.
10848 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
10849 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10850 (vect_make_slp_decision): Likewise.
10851 (vect_detect_hybrid_slp): Likewise.
10852 (vect_slp_analyze_operations): Likewise.
10853 (vect_slp_bb): Likewise.
10854 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
10855 (vectorizable_bswap): Likewise.
10856 (vectorizable_call): Likewise.
10857 (vectorizable_simd_clone_call): Likewise.
10858 (vectorizable_conversion): Likewise.
10859 (vectorizable_assignment): Likewise.
10860 (vectorizable_shift): Likewise.
10861 (vectorizable_operation): Likewise.
10862 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
10863
10864 2018-06-18 Martin Sebor <msebor@redhat.com>
10865
10866 PR tree-optimization/81384
10867 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
10868 * builtins.c (expand_builtin_strnlen): New function.
10869 (expand_builtin): Call it.
10870 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
10871 * builtins.def (BUILT_IN_STRNLEN): New.
10872 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
10873 Warn for bounds in excess of maximum object size.
10874 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
10875 single-value ranges. Handle strnlen.
10876 (handle_builtin_strlen): Handle strnlen.
10877 (strlen_check_and_optimize_stmt): Same.
10878 * doc/extend.texi (Other Builtins): Document strnlen.
10879
10880 2018-06-18 Maya Rashish <coypu@sdf.org>
10881
10882 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
10883 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
10884 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
10885
10886 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
10887 here to ...
10888 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
10889
10890 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10891
10892 * tree.c (escaped_string::escape): Replace cast to char * by
10893 const_cast<char *> (unescaped).
10894
10895 2018-06-18 Nick Clifton <nickc@redhat.com>
10896
10897 PR 84195
10898 * tree.c (escaped_string): New class. Converts an unescaped
10899 string into its escaped equivalent.
10900 (warn_deprecated_use): Use the new class to convert the
10901 deprecation message, if present.
10902 (test_escaped_strings): New self test.
10903 (test_c_tests): Add test_escaped_strings.
10904 * doc/extend.texi (deprecated): Add a note that the
10905 deprecation message is affected by the -fmessage-length
10906 option, and that control characters will be escaped.
10907 (#pragma GCC error): Document this pragma.
10908 (#pragma GCC warning): Likewise.
10909 * doc/invoke.texi (-fmessage-length): Document this option's
10910 effect on the #warning and #error preprocessor directives and
10911 the deprecated attribute.
10912
10913 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
10914
10915 * tree.c (decl_value_expr_lookup): Revert latest change.
10916 (decl_value_expr_insert): Likewise.
10917
10918 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
10919
10920 * gimplify.c (nonlocal_vlas): Delete.
10921 (nonlocal_vla_vars): Likewise.
10922 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
10923 referenced VLAs.
10924 (gimplify_body): Do not create and destroy nonlocal_vlas.
10925 * tree-nested.c: Include diagnostic.h.
10926 (use_pointer_in_frame): Tweak.
10927 (lookup_field_for_decl): Add assertion and declare the transformation.
10928 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
10929 internal error when the reference is in a wrong context. Do not
10930 create a debug decl by default.
10931 (note_nonlocal_block_vlas): Delete.
10932 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
10933 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
10934 create a debug decl by default.
10935 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
10936 call is in a wrong context.
10937 (fixup_vla_decls): New function.
10938 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
10939 debug variables were created.
10940 * tree.c (decl_value_expr_lookup): Add checking assertion.
10941 (decl_value_expr_insert): Likewise.
10942
10943 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
10944
10945 PR middle-end/82479
10946 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
10947 * tree-scalar-evolution.c (interpret_expr): Likewise.
10948 (expression_expensive_p): Likewise.
10949 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
10950 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
10951 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
10952 (ssa_defined_by_minus_one_stmt_p): New.
10953
10954 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
10955
10956 PR middle-end/64946
10957 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
10958 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
10959 * dojump.c (do_jump): Likewise.
10960 * expr.c (expand_expr_real_2): Check operand type's sign.
10961 * fold-const.c (const_unop): Handle ABSU_EXPR.
10962 (fold_abs_const): Likewise.
10963 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
10964 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
10965 (strip_sign_op_1): Likesise.
10966 * match.pd: Add new pattern to generate ABSU_EXPR.
10967 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
10968 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10969 * tree-eh.c (operation_could_trap_helper_p): Likewise.
10970 * tree-inline.c (estimate_operator_cost): Likewise.
10971 * tree-pretty-print.c (dump_generic_node): Likewise.
10972 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
10973 * tree.def (ABSU_EXPR): New.
10974
10975 2018-06-16 Jakub Jelinek <jakub@redhat.com>
10976
10977 PR middle-end/86095
10978 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
10979 documented as preserved for backward compatibility only.
10980 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
10981
10982 PR rtl-optimization/86108
10983 * bb-reorder.c (create_forwarder_block): Renamed to ...
10984 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
10985 jump from new landing pad to the second part.
10986 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
10987 Adjust callers.
10988
10989 2018-06-15 Jakub Jelinek <jakub@redhat.com>
10990
10991 PR middle-end/85878
10992 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
10993 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
10994 Only call store_expr for halves if the mode is the same.
10995
10996 PR middle-end/86123
10997 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
10998 Fix up comment formatting.
10999
11000 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11001
11002 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11003 (typed_splay_tree::closure,
11004 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11005 (typed_splay_tree::typed_splay_tree,
11006 typed_splay_tree::operator =): Declared private.
11007 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11008 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11009 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11010 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11011 typed_splay_tree::splay_tree_splay,
11012 typed_splay_tree::splay_tree_foreach_helper,
11013 typed_splay_tree::splay_tree_insert,
11014 typed_splay_tree::splay_tree_remove,
11015 typed_splay_tree::splay_tree_lookup,
11016 typed_splay_tree::splay_tree_predecessor,
11017 typed_splay_tree::splay_tree_successor,
11018 typed_splay_tree::splay_tree_min,
11019 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11020 (typed_splay_tree::root, typed_splay_tree::comp,
11021 typed_splay_tree::delete_key,
11022 typed_splay_tree::delete_value): New data members.
11023 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11024 typed_splay_tree::remove.
11025
11026 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11027
11028 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11029 -mginv and -mno-ginv to the assembler.
11030 * config/mips/mips.opt (-mcrc): New option.
11031 (-mginv): Likewise.
11032 * doc/invoke.text (-mcrc): Document.
11033 (-mginv): Likewise.
11034
11035 2018-06-15 Nick Clifton <nickc@redhat.com>
11036
11037 PR 84195
11038 * tree.c (escaped_string): New class. Converts an unescaped
11039 string into its escaped equivalent.
11040 (warn_deprecated_use): Use the new class to convert the
11041 deprecation message, if present.
11042 (test_escaped_strings): New self test.
11043 (test_c_tests): Add test_escaped_strings.
11044 * doc/extend.texi (deprecated): Add a note that the
11045 deprecation message is affected by the -fmessage-length
11046 option, and that control characters will be escaped.
11047 (#pragma GCC error): Document this pragma.
11048 (#pragma GCC warning): Likewise.
11049 * doc/invoke.texi (-fmessage-length): Document this option's
11050 effect on the #warning and #error preprocessor directives and
11051 the deprecated attribute.
11052
11053 2018-06-15 Richard Biener <rguenther@suse.de>
11054
11055 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11056 here, also noting vector size used.
11057 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11058 size used in MSG_OPTIMIZED_LOCATIONS dump.
11059 (pass_slp_vectorize::execute): Adjust.
11060
11061 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11062
11063 PR target/85968
11064 * config/arc/arc.c (arc_return_address_register): Fix
11065 if-condition.
11066
11067 2018-06-15 Richard Biener <rguenther@suse.de>
11068
11069 PR middle-end/86159
11070 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11071 leave useless conversion stripping to force_gimple_operand_gsi.
11072 (gimplify_build2): Likewise.
11073 (gimplify_build1): Likewise.
11074
11075 2018-06-15 Richard Biener <rguenther@suse.de>
11076
11077 PR middle-end/86076
11078 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11079 before adjusting their block.
11080
11081 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11082
11083 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11084 multilibs for *-*-rtems*.
11085 * config/riscv/t-rtems: New file.
11086
11087 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11088
11089 PR middle-end/86122
11090 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11091 unsigned_type_for returns NULL.
11092
11093 PR target/85945
11094 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11095 subregs of multi-word pseudos unless the float mode has word size.
11096
11097 2018-06-14 Richard Biener <rguenther@suse.de>
11098
11099 PR middle-end/86139
11100 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11101 duplicate and harmful type_hash_canon.
11102 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11103
11104 2018-06-14 Richard Biener <rguenther@suse.de>
11105
11106 PR ipa/86124
11107 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11108 NULL cgraph_node.
11109
11110 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11111
11112 * config/rtems.h (STDINT_LONG32): Define.
11113
11114 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11115 Prachi Godbole <prachi.godbole@imgtec.com>
11116
11117 * config/mips/mips-cpus.def: Define P6600.
11118 * config/mips/mips-tables.opt: Regenerate.
11119 * config/mips/mips.c (mips_ucbranch_type): New enum.
11120 (mips_rtx_cost_data): Add support for P6600.
11121 (mips_issue_rate): Likewise.
11122 (mips_multipass_dfa_lookahead): Likewise.
11123 (mips_avoid_hazard): Likewise.
11124 (mips_reorg_process_insns): Likewise.
11125 (mips_classify_branch_p6600): New function.
11126 * config/mips/mips.h (TUNE_P6600): New define.
11127 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11128 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11129 * config/mips/mips.md: Include p6600.md.
11130 (processor): Add p6600.
11131 * config/mips/p6600.md: New file.
11132 * doc/invoke.texi: Add p6600 to supported architectures.
11133
11134 2018-06-13 Martin Sebor <msebor@redhat.com>
11135
11136 PR tree-optimization/86114
11137 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11138 of integer types.
11139 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11140
11141 2018-06-13 Richard Biener <rguenther@suse.de>
11142
11143 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11144 Properly set vector type of the intermediate stmt.
11145 * tree-vect-stmts.c (vectorizable_operation): The destination
11146 var always has vectype_out type.
11147
11148 2018-06-13 Jeff Law <law@redhat.com>
11149
11150 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11151 integer 0 for argument to print_rtl_with_bb.
11152 (rl78_reorg): Likewise.
11153
11154 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11155
11156 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11157 from rtx to rtx_insn *.
11158 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11159 "label".
11160 (add_sched_insns_for_speculation): Likewise for local "target",
11161 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11162 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11163 from rtx_insn ** to rtx_code_label **.
11164 (reorg_emit_nops): Likewise.
11165 (c6x_reorg): Likewise for local "call_labels".
11166 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11167 rtx to rtx_insn *.
11168 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11169 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11170 the loops over LABEL_REFS.
11171 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11172 braf_label.
11173 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11174 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11175 (split_branches): Strengthen local "olabel" from rtx to
11176 rtx_insn *, adding a safe_as_a cast.
11177 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11178 to "rtx_insn *".
11179 (add_insn_after): Likewise for first two params.
11180 (add_insn_before): Likewise.
11181 (remove_insn): Likewise for param.
11182 (emit_pattern_before_noloc): Likewise for second and third params.
11183 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11184 (emit_call_insn_before_noloc): Likewise.
11185 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11186 to "rtx_insn *".
11187 (emit_barrier_before): Likewise.
11188 (emit_label_before): Strengthen "label" param from "rtx" to
11189 "rtx_code_label *". Strengthen "before" param from "rtx" to
11190 "rtx_insn *".
11191 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11192 "rtx_insn *".
11193 (emit_pattern_after_noloc): Likewise.
11194 (emit_insn_after_noloc): Likewise.
11195 (emit_jump_insn_after_noloc): Likewise.
11196 (emit_call_insn_after_noloc): Likewise.
11197 (emit_debug_insn_after_noloc): Likewise.
11198 (emit_barrier_after): Likewise.
11199 (emit_label_after): Likewise for both params.
11200 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11201 "loc" param from "int" to "location_t".
11202 (emit_insn_after_setloc): Likewise.
11203 (emit_jump_insn_after_setloc): Likewise.
11204 (emit_call_insn_after_setloc): Likewise.
11205 (emit_debug_insn_after_setloc): Likewise.
11206 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11207 "loc" param from "int" to "location_t".
11208 (emit_pattern_before): Convert NULL_RTX to NULL.
11209 (emit_insn_before_setloc): Convert "loc" param from "int" to
11210 "location_t".
11211 (emit_jump_insn_before_setloc): Likewise.
11212 (emit_call_insn_before_setloc): Likewise.
11213 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11214 rtx_insn *. Convert "loc" param from "int" to "location_t".
11215 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11216 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11217 Convert 3rd param from "int" to "location_t".
11218 (emit_barrier_before, emit_barrier_after, next_real_insn):
11219 Strengthen param from rtx to rtx_insn *.
11220 (emit_label_before): Strengthen 1st param from "rtx" to
11221 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11222 "rtx_insn *".
11223 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11224 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11225 Strengthen 2nd param from "rtx" to "rtx_insn *".
11226 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11227 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11228 Likewise. Convert 3rd param from "int" to "location_t".
11229 (emit_label_after): Strengthen 1st param from "rtx" to
11230 "rtx_code_label *".
11231 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11232 "rtx_insn *".
11233 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11234 from "rtx" to "rtx_insn *".
11235
11236 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11237
11238 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11239 bodies streamed in with -Q.
11240 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11241 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11242 * gimple-streamer-out.c: Include gimple-pretty-print.h
11243 (output_bb): Dump stmts streamed.
11244 * lto-section-out.c: Include print-tree.h
11245 (lto_begin_section): Dump sections created.
11246 (lto_output_decl_index): Dump decl encoded.
11247 * lto-streamer-out.c: Include print-tree.h
11248 (create_output_block): Dump output block created.
11249 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11250 (output_function): Dump function output.
11251 (output_constructor): Dump constructor streamed.
11252 (write_global_stream): Output indexes encoded.
11253 (produce_asm_for_decls): Dump streams encoded.
11254 * lto-streamer.c (streamer_dump_file): New global var.
11255 * lto-streamer.h (streamer_dump_file): Declare.
11256 * passes.c (ipa_write_summaries): Initialize streamer dump.
11257 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11258 in.
11259
11260 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11261
11262 PR target/86048
11263 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11264 offsets for register save directives. Emit a second batch of save
11265 directives, if need be, when the function accesses prior frames.
11266
11267 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11268
11269 * config/arc/fpu.md (fmasf4): Force operand to register.
11270 (fnmasf4): Likewise.
11271
11272 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11273
11274 * config/arc/arc-protos.h (arc_pad_return): Remove.
11275 * config/arc/arc.c (machine_function): Remove force_short_suffix
11276 and size_reason.
11277 (arc_print_operand): Adjust printing of '&'.
11278 (arc_verify_short): Remove conditional printing of short suffix.
11279 (arc_final_prescan_insn): Remove reference to size_reason.
11280 (pad_return): New function.
11281 (arc_reorg): Call pad_return.
11282 (arc_pad_return): Remove.
11283 (arc_init_machine_status): Remove reference to force_short_suffix.
11284 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11285 (attr length): When attribute iscompact is true force to 2
11286 regardless; in the case of maybe check if we want to force the
11287 instruction to have 4 bytes length.
11288 (nopv): Change it to generate 4 byte long nop as well.
11289 (blockage): New pattern.
11290 (simple_return): Remove call to arc_pad_return.
11291 (p_return_i): Likewise.
11292
11293 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11294
11295 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11296
11297 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11298
11299 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11300 ARC cores.
11301
11302 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11303
11304 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11305 for ARC700 and ARCv2.
11306
11307 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11308
11309 PR target/86076
11310 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11311 operands[2] instead of operands[1].
11312
11313
11314 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11315
11316 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11317 case, check whether the outer register overlaps an unallocatable
11318 register, not just whether it fits the required class.
11319
11320 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11321
11322 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11323 are poly_ints.
11324 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11325 (memrefs_conflict_p): Likewise.
11326 (init_alias_analysis): Likewise.
11327 * cfgexpand.c (expand_debug_expr): Likewise.
11328 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11329 * cse.c (fold_rtx): Likewise.
11330 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11331 * expr.c (emit_block_move_hints): Likewise.
11332 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11333 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11334 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11335 (emit_group_store): Likewise.
11336 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11337 to read the PRE/POST_MODIFY increment.
11338 * calls.c (store_one_arg): Use strip_offset.
11339 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11340 poly_int_rtx_p.
11341 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11342 by a VEC_SELECT.
11343 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11344 (simplify_binary_operation_1): Extend CONST_INT handling to
11345 poly_int_rtx_p.
11346 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11347 than a HOST_WIDE_INT.
11348 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11349 poly_int64.
11350 (adjust_mems, add_stores): Update accodingly.
11351 (vt_canonicalize_addr): Track polynomial offsets.
11352 (emit_note_insn_var_location): Likewise.
11353 (vt_add_function_parameter): Likewise.
11354 (vt_initialize): Likewise.
11355
11356 2018-06-12 Jeff Law <law@redhat.com>
11357
11358 * config.gcc (alpha*-*-freebsd*): Remove.
11359 * config/alpha/freebsd.h: Remove.
11360
11361 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11362
11363 PR other/69968
11364 * spellcheck-tree.c (levenshtein_distance): Rename to...
11365 (get_edit_distance): ...this, and update for underlying renaming.
11366 * spellcheck-tree.h (levenshtein_distance): Rename to...
11367 (get_edit_distance): ...this.
11368 * spellcheck.c (levenshtein_distance): Rename to...
11369 (get_edit_distance): ...this. Convert from Levenshtein distance
11370 to Damerau-Levenshtein distance by supporting transpositions of
11371 adjacent characters. Rename "v1" to "v_next" and "v0" to
11372 "v_one_ago".
11373 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11374 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11375 update for underlying renaming.
11376 (selftest::levenshtein_distance_unit_test): Rename to...
11377 (selftest::test_get_edit_distance_unit): ...this, and update for
11378 underlying renaming.
11379 (selftest::test_find_closest_string): Add example from PR 69968
11380 where transposition helps
11381 (selftest::test_metric_conditions): Update for renaming.
11382 (selftest::test_metric_conditions): Likewise.
11383 (selftest::spellcheck_c_tests): Likewise.
11384 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11385 (get_edit_distance): ...this.
11386 (best_match::consider): Update for renaming.
11387
11388 2018-06-12 Martin Sebor <msebor@redhat.com>
11389
11390 PR tree-optimization/85259
11391 * builtins.c (compute_objsize): Handle constant offsets.
11392 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11393 true iff a warning has been issued.
11394 * gimple.h (gimple_nonartificial_location): New function.
11395 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11396 gimple_nonartificial_location and handle -Wno-system-headers.
11397 (handle_builtin_stxncpy): Same.
11398
11399 2018-06-12 Martin Sebor <msebor@redhat.com>
11400
11401 PR c/85931
11402 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11403
11404 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11405
11406 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11407 BUILTIN_VEC_XST entries for pointer to double and long long.
11408
11409 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11410
11411 PR target/85990
11412 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11413 Update comments.
11414 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11415 Likewise.
11416
11417 2018-06-12 Martin Liska <mliska@suse.cz>
11418
11419 * doc/options.texi: Document IntegerRange.
11420
11421 2018-06-12 Martin Liska <mliska@suse.cz>
11422
11423 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11424 * opt-functions.awk: Handle Deprecated flag.
11425 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11426 and report error.
11427 (read_cmdline_option): Report warning for a deprecated option.
11428 * opts.h (struct cl_option): Add new field cl_deprecated.
11429 (CL_ERR_DEPRECATED): New.
11430
11431 2018-06-12 Martin Liska <mliska@suse.cz>
11432
11433 * doc/options.texi: Document Deprecated option flag.
11434
11435 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11436
11437 * config/arc/arc-arch.h (arc_extras): New enum.
11438 (arc_cpu_t):Add field extra.
11439 (arc_cpu_types): Consider the extras.
11440 * config/arc/arc-cpus.def: Add extras info.
11441 * config/arc/arc-opts.h (processor_type): Consider extra field.
11442 * config/arc/arc.c (arc_override_options): Handle extra field.
11443
11444 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11445
11446 * config/arc/arc-arch.h: Update ARC_OPTX macro.
11447 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11448 field.
11449 * config/arc/arc.c (arc_init): Update pic warning.
11450 (irq_range): Update irq range parsing warnings.
11451 (arc_override_options): Update various warning messages.
11452 (arc_handle_aux_attribute): Likewise.
11453
11454 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
11455
11456 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11457
11458 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11459
11460 * doc/sourcebuild.texi: Document usage of line number 0 in verify
11461 compiler messages directives.
11462
11463 2018-06-12 Matthew Fortune <mfortune@gmail.com>
11464
11465 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11466 * config/mips/mips-tables.opt: Regenerate.
11467 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11468 mips64r6.
11469 * doc/invoke.texi: Document -march=i6500.
11470
11471 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
11472
11473 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11474 (i6400_gpmul): Add cpu_unit.
11475 (i6400_gpdiv): Likewise.
11476 (i6400_msa_add_d): Update reservations.
11477 (i6400_msa_int_add) Likewise.
11478 (i6400_msa_short_logic3) Likewise.
11479 (i6400_msa_short_logic2) Likewise.
11480 (i6400_msa_short_logic) Likewise.
11481 (i6400_msa_move) Likewise.
11482 (i6400_msa_cmp) Likewise.
11483 (i6400_msa_short_float2) Likewise.
11484 (i6400_msa_div_d) Likewise.
11485 (i6400_msa_long_logic1) Likewise.
11486 (i6400_msa_long_logic2) Likewise.
11487 (i6400_msa_mult) Likewise.
11488 (i6400_msa_long_float2) Likewise.
11489 (i6400_msa_long_float4) Likewise.
11490 (i6400_msa_long_float5) Likewise.
11491 (i6400_msa_long_float8) Likewise.
11492 (i6400_fpu_fadd): Include frint type.
11493 (i6400_fpu_store): New define_insn_reservation.
11494 (i6400_fpu_load): Likewise.
11495 (i6400_fpu_move): Likewise.
11496 (i6400_fpu_fcmp): Likewise.
11497 (i6400_fpu_fmadd): Likewise.
11498 (i6400_int_mult): Include imul3nc type and update reservation.
11499 (i6400_int_div): Include idiv3 type and update reservation.
11500 (i6400_int_load): Update to check type not move_type.
11501 (i6400_int_store): Likewise.
11502 (i6400_int_prefetch): Set zero latency.
11503
11504 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
11505
11506 * gcc.c: Document new %@{...} sequence.
11507 (LINK_COMMAND_SPEC): Use it for the -L switches.
11508 (cpp_unique_options): Use it for the -I switches.
11509 (at_file_argbuf): New global variable.
11510 (in_at_file): Likewise.
11511 (alloc_args): Create at_file_argbuf.
11512 (clear_args): Truncate at_file_argbuf.
11513 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11514 (open_at_file): New function.
11515 (close_at_file): Likewise.
11516 (create_at_file): Delete.
11517 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11518 <'o'>: Likewise.
11519 <'@'>: New case.
11520 (validate_switches_from_spec): Deal with %@{...} sequence.
11521 (validate_switches): Likewise.
11522 (driver::finalize): Call clear_args.
11523
11524 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11525
11526 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11527
11528 2018-06-11 Martin Sebor <msebor@redhat.com>
11529
11530 * doc/invoke.texi (-Wall): List -Wc++17-compat.
11531 (Wno-class-memaccess): Add @opindex.
11532 (Wno-templates, Wno-multiple-inheritance): Same.
11533 (Wno-virtual-inheritance, Wno-namespaces): Same.
11534 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11535 (Wno-format-overflow, Wno-format-truncation): Same.
11536 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11537 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11538 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11539 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11540 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11541 (Wno-misspelled-isr): Same.
11542
11543 2018-06-11 Martin Sebor <msebor@redhat.com>
11544
11545 * PR tree-optimization/86083
11546 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11547
11548 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
11549
11550 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11551
11552 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
11553
11554 PR target/85755
11555 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11556 on the correct operand.
11557 (*movdi_internal64): Ditto.
11558
11559 2018-06-11 Martin Liska <mliska@suse.cz>
11560
11561 PR tree-optimization/86089
11562 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11563
11564 2018-06-11 Julia Koval <julia.koval@intel.com>
11565
11566 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11567 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11568 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11569
11570 2018-06-11 Olivier Hainque <hainque@adacore.com>
11571
11572 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11573 for Ada with strict dwarf2.
11574
11575 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
11576
11577 PR target/85755
11578 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11579 addresses.
11580
11581 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
11582
11583 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11584
11585 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
11586
11587 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11588 TARGET_ELF.
11589
11590 2018-06-08 Martin Liska <mliska@suse.cz>
11591
11592 * tree-cfg.h (debug_function): Fix argument type to match
11593 implementation.
11594
11595 2018-06-08 Martin Liska <mliska@suse.cz>
11596
11597 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11598 Remove usage of MPX-related (and removed) fields.
11599 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11600
11601 2018-06-08 David Malcolm <dmalcolm@redhat.com>
11602
11603 * cfg.c (debug): Use TDF_NONE rather than 0.
11604 * cfghooks.c (debug): Likewise.
11605 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11606 (struct dump_option_value_info): Convert to...
11607 (struct kv_pair): ...this template type.
11608 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11609 rather than 0.
11610 (optinfo_verbosity_options): Likewise.
11611 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11612 OPTGROUP_NONE.
11613 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11614 than int for "optgroup_flags" param.
11615 (dump_generic_expr_loc): Use dump_flags_t rather than int for
11616 "dump_kind" param.
11617 (dump_dec): Likewise.
11618 (dump_finish): Use TDF_NONE rather than 0.
11619 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11620 rather than int for "optgroup_flags" param. Use TDF_NONE rather
11621 than 0. Update for change to option_ptr.
11622 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11623 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
11624 0. Update for changes to optinfo_verbosity_options and
11625 optgroup_options.
11626 (opt_info_switch_p): Convert optgroup_flags from int to
11627 optgroup_flags_t.
11628 (dump_basic_block): Use dump_flags_t rather than int
11629 for "dump_kind" param.
11630 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11631 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11632 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11633 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11634 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11635 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11636 TDF_NONE): Convert from macros to...
11637 (enum dump_flag): ...this new enum.
11638 (dump_flags_t): Update to use enum.
11639 (operator|, operator&, operator~, operator|=, operator&=):
11640 Implement for dump_flags_t.
11641 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11642 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11643 Convert from macros to...
11644 (enum optgroup_flag): ...this new enum.
11645 (optgroup_flags_t): New typedef.
11646 (operator|, operator|=): Implement for optgroup_flags_t.
11647 (struct dump_file_info): Convert field "alt_flags" to
11648 dump_flags_t. Convert field "optgroup_flags" to
11649 optgroup_flags_t.
11650 (dump_basic_block): Use dump_flags_t rather than int for param.
11651 (dump_generic_expr_loc): Likewise.
11652 (dump_dec): Likewise.
11653 (dump_register): Convert param "optgroup_flags" to
11654 optgroup_flags_t.
11655 (opt_info_enable_passes): Likewise.
11656 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11657 than 0.
11658 * gimple-pretty-print.c (debug): Likewise.
11659 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11660 (merged_store_group::apply_stores): Likewise.
11661 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11662 * gimple.c (verify_gimple_pp): Likewise.
11663 * graphite-poly.c (print_pbb_body): Likewise.
11664 * passes.c (pass_manager::register_one_dump_file): Convert
11665 local "optgroup_flags" to optgroup_flags_t.
11666 * print-tree.c (print_node): Use TDF_NONE rather than 0.
11667 (debug): Likewise.
11668 (debug_body): Likewise.
11669 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11670 to optgroup_flags_t.
11671 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11672 than 0.
11673 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11674 (convert_mult_to_fma): Likewise.
11675 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11676 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11677 * tree-vect-data-refs.c (dump_lower_bound): Convert param
11678 "dump_kind" to dump_flags_t.
11679
11680 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11681
11682 * config/rs6000/rs6000.c (min, max): Delete.
11683
11684 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11685
11686 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11687 -mabi=spe and -mabi=no-spe.
11688
11689 2018-06-08 Martin Liska <mliska@suse.cz>
11690
11691 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11692 where we expect an existing summary.
11693
11694 2018-06-08 Martin Liska <mliska@suse.cz>
11695
11696 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11697 * ipa-inline.h (estimate_edge_growth): Likewise.
11698
11699 2018-06-08 Martin Liska <mliska@suse.cz>
11700
11701 * cgraph.c (function_version_hasher::hash): Use
11702 cgraph_node::get_uid ().
11703 (function_version_hasher::equal):
11704 * cgraph.h (cgraph_node::get_uid): New method.
11705 * ipa-inline.c (update_caller_keys): Use
11706 cgraph_node::get_uid ().
11707 (update_callee_keys): Likewise.
11708 * ipa-utils.c (searchc): Likewise.
11709 (ipa_reduced_postorder): Likewise.
11710 * lto-cgraph.c (input_node): Likewise.
11711 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11712 * symbol-summary.h (symtab_insertion): Likewise.
11713 (symtab_removal): Likewise.
11714 (symtab_duplication): Likewise.
11715 * tree-pretty-print.c (dump_function_header): Likewise.
11716 * tree-sra.c (convert_callers_for_node): Likewise.
11717
11718 2018-06-08 Martin Liska <mliska@suse.cz>
11719
11720 * cgraph.c (symbol_table::create_edge): Always assign a new
11721 unique number.
11722 (symbol_table::free_edge): Do not recycle numbers.
11723 * cgraph.h (cgraph_edge::get): New method.
11724 * symbol-summary.h (symtab_removal): Use it.
11725 (symtab_duplication): Likewise.
11726 (call_summary::hashable_uid): Remove.
11727
11728 2018-06-08 Martin Liska <mliska@suse.cz>
11729
11730 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11731 (initialize_growth_caches): Remove.
11732 (free_growth_caches): Likewise.
11733 (do_estimate_edge_time): Use edge_growth_cache.
11734 (do_estimate_edge_size): Likewise.
11735 (do_estimate_edge_hints): Likewise.
11736 * ipa-inline.c (reset_edge_caches): Likewise.
11737 (recursive_inlining): Likewise.
11738 (inline_small_functions): Likewise.
11739 * ipa-inline.h (initialize_growth_caches): Remove.
11740 (estimate_edge_size): Likewise.
11741 (estimate_edge_time): Likewise.
11742 (estimate_edge_hints): Likewise.
11743 (reset_edge_growth_cache): Likewise.
11744 * symbol-summary.h (call_summary::remove): New method.
11745
11746 2018-06-08 Martin Liska <mliska@suse.cz>
11747
11748 * ipa-cp.c (class edge_clone_summary): New summary.
11749 (grow_edge_clone_vectors): Remove.
11750 (ipcp_edge_duplication_hook): Remove.
11751 (class edge_clone_summary_t): New call_summary class.
11752 (ipcp_edge_removal_hook): Remove.
11753 (edge_clone_summary_t::duplicate): New function.
11754 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11755 (create_specialized_node): Likewise.
11756 (ipcp_driver): Initialize edge_clone_summaries and do not
11757 register hooks.
11758
11759 2018-06-08 Martin Liska <mliska@suse.cz>
11760
11761 * symbol-summary.h (get): New function.
11762 (call_summary::m_initialize_when_cloning): New class member.
11763
11764 2018-06-08 Martin Liska <mliska@suse.cz>
11765
11766 * cgraph.c (cgraph_node::remove): Do not recycle uid.
11767 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11768 (symbol_table::allocate_cgraph_symbol): Do not set uid.
11769 * passes.c (uid_hash_t): Record removed_nodes by their uids.
11770 (remove_cgraph_node_from_order): Use the removed_nodes set.
11771 (do_per_function_toporder): Likwise.
11772 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11773 instead of summary_uid.
11774 (symtab_removal): Likewise.
11775 (symtab_duplication): Likewise.
11776
11777 2018-06-08 Martin Liska <mliska@suse.cz>
11778
11779 * ipa-cp.c (ipcp_store_bits_results): Use
11780 ipcp_transformation_sum.
11781 (ipcp_store_vr_results): Likewise.
11782 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
11783 to ...
11784 (ipcp_transformation_initialize): ... this.
11785 (ipa_set_node_agg_value_chain):
11786 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
11787 (write_ipcp_transformation_info): Likewise.
11788 (read_ipcp_transformation_info): Likewise.
11789 (ipcp_update_bits): Likewise.
11790 (ipcp_update_vr): Likewise.
11791 (ipcp_transform_function): Likewise.
11792 * ipa-prop.h: Rename ipcp_transformation_summary to
11793 ipcp_transformation.
11794 (class ipcp_transformation_t): New function summary.
11795 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
11796 (ipa_get_agg_replacements_for_node): Likewise.
11797
11798 2018-06-08 Martin Liska <mliska@suse.cz>
11799
11800 * ipa-pure-const.c (struct funct_state_d): Do it class instead
11801 of struct.
11802 (class funct_state_summary_t): New function_summary class.
11803 (has_function_state): Remove.
11804 (get_function_state): Likewise.
11805 (set_function_state): Likewise.
11806 (add_new_function): Likewise.
11807 (funct_state_summary_t::insert): New function.
11808 (duplicate_node_data): Remove.
11809 (remove_node_data): Remove.
11810 (funct_state_summary_t::duplicate): New function.
11811 (register_hooks): Create new funct_state_summaries.
11812 (pure_const_generate_summary): Use it.
11813 (pure_const_write_summary): Likewise.
11814 (pure_const_read_summary): Likewise.
11815 (propagate_pure_const): Likewise.
11816 (propagate_nothrow): Likewise.
11817 (dump_malloc_lattice): Likewise.
11818 (propagate_malloc): Likewise.
11819 (execute): Do not register hooks, just remove summary
11820 instead.
11821 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
11822 constructor.
11823
11824 2018-06-08 Martin Liska <mliska@suse.cz>
11825
11826 * ipa-reference.c (remove_node_data): Remove.
11827 (duplicate_node_data): Likewise.
11828 (class ipa_ref_var_info_summary_t): New class.
11829 (class ipa_ref_opt_summary_t): Likewise.
11830 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
11831 (get_reference_optimization_summary): Use
11832 ipa_ref_opt_sum_summaries.
11833 (set_reference_vars_info): Remove.
11834 (set_reference_optimization_summary): Likewise.
11835 (ipa_init): Create summaries.
11836 (init_function_info): Use function summary.
11837 (ipa_ref_opt_summary_t::duplicate): New function.
11838 (ipa_ref_opt_summary_t::remove): New function.
11839 (get_read_write_all_from_node): Fix GNU coding style.
11840 (propagate): Use function summary.
11841 (write_node_summary_p): Fix GNU coding style.
11842 (stream_out_bitmap): Likewise.
11843 (ipa_reference_read_optimization_summary): Use function summary.
11844 (ipa_reference_c_finalize): Do not release hooks.
11845
11846 2018-06-08 Martin Liska <mliska@suse.cz>
11847
11848 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
11849 (analyze_function_body): Extract multiple calls of get_create.
11850 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11851 * ipa-inline.c (recursive_inlining): Use ::get method.
11852 * ipa-inline.h (estimate_edge_growth): Likewise.
11853
11854 2018-06-08 Martin Liska <mliska@suse.cz>
11855
11856 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
11857 HSA_INVALID.
11858 (hsa_function_summary::hsa_function_summary): Use the new enum
11859 value.
11860 (hsa_gpu_implementation_p): Use hsa_summaries::get.
11861 * hsa-gen.c (hsa_get_host_function): Likewise.
11862 (get_brig_function_name): Likewise.
11863 * ipa-hsa.c (process_hsa_functions): Likewise.
11864 (ipa_hsa_write_summary): Likewise.
11865 * symbol-summary.h (symtab_duplication): Use ::get function/
11866 (get): New function.
11867
11868 2018-06-08 Martin Liska <mliska@suse.cz>
11869
11870 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
11871 of get.
11872 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
11873 (hsa_register_kernel): Likewise.
11874 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
11875 * hsa-gen.c (hsa_get_host_function): Likewise.
11876 (get_brig_function_name): Likewise.
11877 (generate_hsa): Likewise.
11878 (pass_gen_hsail::execute): Likewise.
11879 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
11880 (devirtualization_time_bonus): Likewise.
11881 (ipcp_propagate_stage): Likewise.
11882 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11883 (edge_set_predicate): Likewise.
11884 (evaluate_conditions_for_known_args): Likewise.
11885 (evaluate_properties_for_edge): Likewise.
11886 (ipa_fn_summary::reset): Likewise.
11887 (ipa_fn_summary_t::duplicate): Likewise.
11888 (dump_ipa_call_summary): Likewise.
11889 (ipa_dump_fn_summary): Likewise.
11890 (analyze_function_body): Likewise.
11891 (compute_fn_summary): Likewise.
11892 (estimate_edge_devirt_benefit): Likewise.
11893 (estimate_edge_size_and_time): Likewise.
11894 (estimate_calls_size_and_time): Likewise.
11895 (estimate_node_size_and_time): Likewise.
11896 (inline_update_callee_summaries): Likewise.
11897 (remap_edge_change_prob): Likewise.
11898 (remap_edge_summaries): Likewise.
11899 (ipa_merge_fn_summary_after_inlining): Likewise.
11900 (ipa_update_overall_fn_summary): Likewise.
11901 (read_ipa_call_summary): Likewise.
11902 (inline_read_section): Likewise.
11903 (write_ipa_call_summary): Likewise.
11904 (ipa_fn_summary_write): Likewise.
11905 (ipa_free_fn_summary): Likewise.
11906 * ipa-hsa.c (process_hsa_functions): Likewise.
11907 (ipa_hsa_write_summary): Likewise.
11908 (ipa_hsa_read_section): Likewise.
11909 * ipa-icf.c (sem_function::merge): Likewise.
11910 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11911 (do_estimate_edge_time): Likewise.
11912 (estimate_size_after_inlining): Likewise.
11913 (estimate_growth): Likewise.
11914 (growth_likely_positive): Likewise.
11915 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11916 (inline_call): Likewise.
11917 * ipa-inline.c (caller_growth_limits): Likewise.
11918 (can_inline_edge_p): Likewise.
11919 (can_inline_edge_by_limits_p): Likewise.
11920 (compute_uninlined_call_time): Likewise.
11921 (compute_inlined_call_time): Likewise.
11922 (want_inline_small_function_p): Likewise.
11923 (edge_badness): Likewise.
11924 (update_caller_keys): Likewise.
11925 (update_callee_keys): Likewise.
11926 (recursive_inlining): Likewise.
11927 (inline_small_functions): Likewise.
11928 (inline_to_all_callers_1): Likewise.
11929 (dump_overall_stats): Likewise.
11930 (early_inline_small_functions): Likewise.
11931 (early_inliner): Likewise.
11932 * ipa-inline.h (estimate_edge_growth): Likewise.
11933 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11934 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11935 * ipa-prop.h (IPA_NODE_REF): Likewise.
11936 (IPA_EDGE_REF): Likewise.
11937 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11938 (propagate_malloc): Likewise.
11939 * ipa-split.c (execute_split_functions): Likewise.
11940 * symbol-summary.h: Rename get to get_create.
11941 (get): Likewise.
11942 (get_create): Likewise.
11943 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11944
11945 2018-06-08 Martin Liska <mliska@suse.cz>
11946
11947 * symbol-summary.h (release): Move definition out of class
11948 declaration.
11949 (symtab_removal): Likewise.
11950 (symtab_duplication): Likewise.
11951
11952 2018-06-08 Martin Liska <mliska@suse.cz>
11953
11954 * symbol-summary.h (function_summary): Move constructor
11955 implementation out of class declaration.
11956 (release): Likewise.
11957 (symtab_insertion): Likewise.
11958 (symtab_removal): Likewise.
11959 (symtab_duplication): Likewise.
11960 (get): Likewise.
11961
11962 2018-06-08 Martin Liska <mliska@suse.cz>
11963
11964 * Makefile.in: Remove support for MPX (macros, related functions,
11965 fields in cgraph_node, ...).
11966 * builtin-types.def (BT_BND): Likewise.
11967 (BT_FN_BND_CONST_PTR): Likewise.
11968 (BT_FN_CONST_PTR_BND): Likewise.
11969 (BT_FN_VOID_PTR_BND): Likewise.
11970 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
11971 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
11972 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
11973 (expand_builtin_mempcpy_with_bounds): Likewise.
11974 (expand_builtin_memset_with_bounds): Likewise.
11975 (expand_builtin_memset_args): Likewise.
11976 (std_expand_builtin_va_start): Likewise.
11977 (expand_builtin): Likewise.
11978 (expand_builtin_with_bounds): Likewise.
11979 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
11980 (DEF_LIB_BUILTIN_CHKP): Likewise.
11981 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
11982 (DEF_CHKP_BUILTIN): Likewise.
11983 (BUILT_IN_MEMCPY): Likewise.
11984 (BUILT_IN_MEMMOVE): Likewise.
11985 (BUILT_IN_MEMPCPY): Likewise.
11986 (BUILT_IN_MEMSET): Likewise.
11987 (BUILT_IN_STPCPY): Likewise.
11988 (BUILT_IN_STRCAT): Likewise.
11989 (BUILT_IN_STRCHR): Likewise.
11990 (BUILT_IN_STRCPY): Likewise.
11991 (BUILT_IN_STRLEN): Likewise.
11992 (BUILT_IN_MEMCPY_CHK): Likewise.
11993 (BUILT_IN_MEMMOVE_CHK): Likewise.
11994 (BUILT_IN_MEMPCPY_CHK): Likewise.
11995 (BUILT_IN_MEMSET_CHK): Likewise.
11996 (BUILT_IN_STPCPY_CHK): Likewise.
11997 (BUILT_IN_STRCAT_CHK): Likewise.
11998 (BUILT_IN_STRCPY_CHK): Likewise.
11999 * calls.c (store_bounds): Likewise.
12000 (emit_call_1): Likewise.
12001 (special_function_p): Likewise.
12002 (maybe_warn_nonstring_arg): Likewise.
12003 (initialize_argument_information): Likewise.
12004 (finalize_must_preallocate): Likewise.
12005 (compute_argument_addresses): Likewise.
12006 (expand_call): Likewise.
12007 * cfgexpand.c (expand_call_stmt): Likewise.
12008 (expand_return): Likewise.
12009 (expand_gimple_stmt_1): Likewise.
12010 (pass_expand::execute): Likewise.
12011 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12012 (cgraph_node::remove): Likewise.
12013 (cgraph_node::dump): Likewise.
12014 (cgraph_node::verify_node): Likewise.
12015 * cgraph.h (chkp_function_instrumented_p): Likewise.
12016 (symtab_node::get_alias_target): Likewise.
12017 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12018 (cgraph_local_p): Likewise.
12019 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12020 (cgraph_edge::rebuild_references): Likewise.
12021 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12022 (walk_polymorphic_call_targets): Likewise.
12023 (cgraph_node::expand_thunk): Likewise.
12024 (symbol_table::output_weakrefs): Likewise.
12025 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12026 (ix86_handle_option): Likewise.
12027 * config/i386/constraints.md: Likewise.
12028 * config/i386/i386-builtin-types.def (BND): Likewise.
12029 (VOID): Likewise.
12030 (PVOID): Likewise.
12031 (ULONG): Likewise.
12032 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12033 (BDESC_FIRST): Likewise.
12034 (BDESC): Likewise.
12035 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12036 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12037 * config/i386/i386.c (enum reg_class): Likewise.
12038 (ix86_target_string): Likewise.
12039 (ix86_option_override_internal): Likewise.
12040 (ix86_conditional_register_usage): Likewise.
12041 (ix86_valid_target_attribute_inner_p): Likewise.
12042 (ix86_set_indirect_branch_type): Likewise.
12043 (ix86_set_current_function): Likewise.
12044 (ix86_function_arg_regno_p): Likewise.
12045 (init_cumulative_args): Likewise.
12046 (ix86_function_arg_advance): Likewise.
12047 (ix86_function_arg): Likewise.
12048 (ix86_pass_by_reference): Likewise.
12049 (ix86_function_value_regno_p): Likewise.
12050 (ix86_function_value_1): Likewise.
12051 (ix86_function_value_bounds): Likewise.
12052 (ix86_return_in_memory): Likewise.
12053 (ix86_setup_incoming_vararg_bounds): Likewise.
12054 (ix86_va_start): Likewise.
12055 (indirect_thunk_need_prefix): Likewise.
12056 (print_reg): Likewise.
12057 (ix86_print_operand): Likewise.
12058 (ix86_expand_call): Likewise.
12059 (ix86_output_function_return): Likewise.
12060 (reg_encoded_number): Likewise.
12061 (BDESC_VERIFYS): Likewise.
12062 (ix86_init_mpx_builtins): Likewise.
12063 (ix86_init_builtins): Likewise.
12064 (ix86_emit_cmove): Likewise.
12065 (ix86_emit_move_max): Likewise.
12066 (ix86_expand_builtin): Likewise.
12067 (ix86_builtin_mpx_function): Likewise.
12068 (ix86_get_arg_address_for_bt): Likewise.
12069 (ix86_load_bounds): Likewise.
12070 (ix86_store_bounds): Likewise.
12071 (ix86_load_returned_bounds): Likewise.
12072 (ix86_store_returned_bounds): Likewise.
12073 (ix86_class_likely_spilled_p): Likewise.
12074 (ix86_hard_regno_mode_ok): Likewise.
12075 (x86_order_regs_for_local_alloc): Likewise.
12076 (ix86_mitigate_rop): Likewise.
12077 (ix86_bnd_prefixed_insn_p): Likewise.
12078 (ix86_mpx_bound_mode): Likewise.
12079 (ix86_make_bounds_constant): Likewise.
12080 (ix86_initialize_bounds): Likewise.
12081 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12082 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12083 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12084 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12085 (TARGET_CHKP_BOUND_MODE): Likewise.
12086 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12087 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12088 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12089 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12090 * config/i386/i386.h (TARGET_MPX): Likewise.
12091 (TARGET_MPX_P): Likewise.
12092 (VALID_BND_REG_MODE): Likewise.
12093 (FIRST_BND_REG): Likewise.
12094 (LAST_BND_REG): Likewise.
12095 (enum reg_class): Likewise.
12096 (BND_REG_P): Likewise.
12097 (BND_REGNO_P): Likewise.
12098 (BNDmode): Likewise.
12099 (ADJUST_INSN_LENGTH): Likewise.
12100 * config/i386/i386.md: Likewise.
12101 * config/i386/i386.opt: Likewise.
12102 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12103 (defined): Likewise.
12104 (LINK_MPX): Likewise.
12105 (MPX_SPEC): Likewise.
12106 (LIBMPX_SPEC): Likewise.
12107 (LIBMPXWRAPPERS_SPEC): Likewise.
12108 (CHKP_SPEC): Likewise.
12109 * config/i386/predicates.md: Likewise.
12110 * dbxout.c (dbxout_type): Likewise.
12111 * doc/extend.texi: Likewise.
12112 * doc/invoke.texi: Likewise.
12113 * doc/md.texi: Likewise.
12114 * doc/tm.texi: Likewise.
12115 * doc/tm.texi.in: Likewise.
12116 * dwarf2out.c (is_base_type): Likewise.
12117 (gen_formal_types_die): Likewise.
12118 (gen_subprogram_die): Likewise.
12119 (gen_type_die_with_usage): Likewise.
12120 (gen_decl_die): Likewise.
12121 (dwarf2out_late_global_decl): Likewise.
12122 * expr.c (expand_assignment): Likewise.
12123 (emit_storent_insn): Likewise.
12124 (store_expr_with_bounds): Likewise.
12125 (store_expr): Likewise.
12126 (expand_expr_real_1): Likewise.
12127 * expr.h (store_expr_with_bounds): Likewise.
12128 * function.c (use_register_for_decl): Likewise.
12129 (struct bounds_parm_data): Likewise.
12130 (assign_parms_augmented_arg_list): Likewise.
12131 (assign_parm_find_entry_rtl): Likewise.
12132 (assign_parm_is_stack_parm): Likewise.
12133 (assign_parm_load_bounds): Likewise.
12134 (assign_bounds): Likewise.
12135 (assign_parms): Likewise.
12136 (expand_function_start): Likewise.
12137 * gcc.c (CHKP_SPEC): Likewise.
12138 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12139 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12140 (wrestrict_dom_walker::check_call): Likewise.
12141 * gimple.c (gimple_build_call_from_tree): Likewise.
12142 * gimple.h (enum gf_mask): Likewise.
12143 (gimple_call_with_bounds_p): Likewise.
12144 (gimple_call_set_with_bounds): Likewise.
12145 * gimplify.c (gimplify_init_constructor): Likewise.
12146 * ipa-cp.c (initialize_node_lattices): Likewise.
12147 (propagate_constants_across_call): Likewise.
12148 (find_more_scalar_values_for_callers_subset): Likewise.
12149 * ipa-hsa.c (process_hsa_functions): Likewise.
12150 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12151 * ipa-icf.c (sem_function::merge): Likewise.
12152 * ipa-inline.c (early_inliner): Likewise.
12153 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12154 (warn_function_cold): Likewise.
12155 (propagate_pure_const): Likewise.
12156 * ipa-ref.h (enum GTY): Likewise.
12157 * ipa-split.c (find_retbnd): Likewise.
12158 (consider_split): Likewise.
12159 (split_function): Likewise.
12160 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12161 * ipa.c (walk_polymorphic_call_targets): Likewise.
12162 (symbol_table::remove_unreachable_nodes): Likewise.
12163 (process_references): Likewise.
12164 (cgraph_build_static_cdtor_1): Likewise.
12165 * lto-cgraph.c (lto_output_node): Likewise.
12166 (output_refs): Likewise.
12167 (compute_ltrans_boundary): Likewise.
12168 (input_overwrite_node): Likewise.
12169 (input_node): Likewise.
12170 (input_cgraph_1): Likewise.
12171 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12172 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12173 (class pass_chkp_instrumentation_passes): Likewise.
12174 (make_pass_chkp_instrumentation_passes): Likewise.
12175 * passes.def: Likewise.
12176 * rtl.h (struct GTY): Likewise.
12177 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12178 * stor-layout.c (layout_type): Likewise.
12179 * symtab.c: Likewise.
12180 * target.def: Likewise.
12181 * targhooks.c (default_chkp_bound_type): Likewise.
12182 (default_chkp_bound_mode): Likewise.
12183 (default_builtin_chkp_function): Likewise.
12184 (default_chkp_function_value_bounds): Likewise.
12185 (default_chkp_make_bounds_constant): Likewise.
12186 (default_chkp_initialize_bounds): Likewise.
12187 * targhooks.h (default_chkp_bound_type): Likewise.
12188 (default_chkp_bound_mode): Likewise.
12189 (default_builtin_chkp_function): Likewise.
12190 (default_chkp_function_value_bounds): Likewise.
12191 (default_chkp_make_bounds_constant): Likewise.
12192 (default_chkp_initialize_bounds): Likewise.
12193 * toplev.c (compile_file): Likewise.
12194 (process_options): Likewise.
12195 * tree-core.h (DEF_BUILTIN): Likewise.
12196 (DEF_BUILTIN_CHKP): Likewise.
12197 * tree-inline.c (declare_return_variable): Likewise.
12198 (remap_gimple_stmt): Likewise.
12199 (copy_bb): Likewise.
12200 (initialize_inlined_parameters): Likewise.
12201 (expand_call_inline): Likewise.
12202 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12203 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12204 (make_pass_ipa_chkp_produce_thunks): Likewise.
12205 (make_pass_chkp): Likewise.
12206 (make_pass_chkp_opt): Likewise.
12207 (make_pass_chkp_instrumentation_passes): Likewise.
12208 * tree-pretty-print.c (dump_generic_node): Likewise.
12209 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12210 * tree-ssa-dce.c (propagate_necessity): Likewise.
12211 (eliminate_unnecessary_stmts): Likewise.
12212 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12213 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12214 * tree-ssa-sccvn.h: Likewise.
12215 * tree-ssa-strlen.c (get_string_length): Likewise.
12216 (valid_builtin_call): Likewise.
12217 (adjust_last_stmt): Likewise.
12218 (handle_builtin_strchr): Likewise.
12219 (handle_builtin_strcpy): Likewise.
12220 (handle_builtin_stxncpy): Likewise.
12221 (handle_builtin_memcpy): Likewise.
12222 (handle_builtin_strcat): Likewise.
12223 (strlen_check_and_optimize_stmt): Likewise.
12224 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12225 * tree-streamer-in.c: Likewise.
12226 * tree-streamer.c (record_common_node): Likewise.
12227 * tree.c (tree_code_size): Likewise.
12228 (wide_int_to_tree_1): Likewise.
12229 (type_contains_placeholder_1): Likewise.
12230 (build_common_tree_nodes): Likewise.
12231 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12232 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12233 (POINTER_BOUNDS_P): Likewise.
12234 (BOUNDED_TYPE_P): Likewise.
12235 (BOUNDED_P): Likewise.
12236 (CALL_WITH_BOUNDS_P): Likewise.
12237 (pointer_bounds_type_node): Likewise.
12238 * value-prof.c (gimple_ic): Likewise.
12239 * var-tracking.c (vt_add_function_parameters): Likewise.
12240 * varasm.c (make_decl_rtl): Likewise.
12241 (assemble_start_function): Likewise.
12242 (output_constant): Likewise.
12243 (maybe_assemble_visibility): Likewise.
12244 * varpool.c (ctor_for_folding): Likewise.
12245 * chkp-builtins.def: Remove.
12246 * ipa-chkp.c: Remove.
12247 * ipa-chkp.h: Remove.
12248 * rtl-chkp.c: Remove.
12249 * rtl-chkp.h: Remove.
12250 * tree-chkp-opt.c: Remove.
12251 * tree-chkp.c: Remove.
12252 * tree-chkp.h: Remove.
12253
12254 2018-06-07 Carl Love <cel@us.ibm.com>
12255
12256 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12257 vextract_fp_from_shortl): Add BE support.
12258
12259 2018-06-07 Paul Koning <ni1d@arrl.net>
12260
12261 * compare-elim.c (try_merge_compare): Don't merge compare if
12262 address contains a side effect.
12263 (try_eliminate_compare): Likewise.
12264
12265 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12266
12267 * config.gcc: Support "tremont".
12268 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12269 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12270 PROCESSOR_TREMONT.
12271 * config/i386/i386.c (m_TREMONT): Define.
12272 (processor_target_table): Add "tremont".
12273 (PTA_TREMONT): Define.
12274 (ix86_lea_outperforms): Add TARGET_TREMONT.
12275 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12276 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12277 and M_INTEL_GOLDMONT_PLUS.
12278 (fold_builtin_cpu): Add "tremont".
12279 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12280 (ix86_option_override_internal): Add "tremont".
12281 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12282 (processor_type): Add PROCESSOR_TREMONT.
12283 * config/i386/x86-tune.def: Add m_TREMONT.
12284 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12285
12286 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12287
12288 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12289 symbol defined for msp430i* devices to be lower case.
12290
12291 2018-06-07 Richard Biener <rguenther@suse.de>
12292
12293 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12294 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12295 Properly wrap signed arithmetic if overflow wraps.
12296
12297 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12298
12299 PR tree-optimization/69615
12300 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12301 of a cast from a same precision integral SSA_NAME in a bb dominated
12302 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12303 cast to utype if rhs2 has already a compatible type.
12304
12305 2018-06-07 Richard Biener <rguenther@suse.de>
12306
12307 PR tree-optimization/85935
12308 * graphite-scop-detection.c (find_params_in_bb): Analyze
12309 condition operands with respect to the correct loop. Assert
12310 the analysis doesn't fail.
12311
12312 2018-06-04 Carl Love <cel@us.ibm.com>
12313
12314 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12315 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12316 as it is slightly cheaper.
12317 (first_match_or_eos_index_<mode>):
12318 Calculate index using natural element order.
12319 (first_match_index_<mode>):
12320 Calculate index using natural element order.
12321 (first_match_or_eos_index_<mode>):
12322 Calculate index using natural order.
12323 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12324 for BE and LE modes.
12325 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12326 P9V_BUILTIN_VCLZLSBB_V16QI.
12327 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12328 specific.
12329
12330 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12331
12332 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12333 indentation and line wrap for many prototypes. Add missing
12334 @smallexample directives around block of prototypes for vec_xl and
12335 vec_xst.
12336
12337 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12338
12339 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12340 track if we pass or return IEEE 128-bit floating point.
12341 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12342 C++ mangling that is compatible with GCC 8.1.
12343 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12344 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12345 floating point types.
12346 (rs6000_function_arg_advance_1): Likewise.
12347 (rs6000_mangle_type): Optionally generate mangled names that match
12348 what GCC 8.1 generated for IEEE 128-bit floating point types.
12349 (rs6000_globalize_decl_name): If we have an external function that
12350 passes or returns IEEE 128-bit types, generate a weak reference
12351 from the mangled name used in GCC 8.1 to the current mangled
12352 name.
12353 (rs6000_init_builtins): Make __ibm128 use the long double type if
12354 long double is IBM extended double. Make __float128 use the long
12355 double type if long double is IEEE 128-bit.
12356
12357 PR target/85657
12358 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12359 macro for __ibm128 built-in functions.
12360 (PACK_IF): Add __ibm128 pack/unpack functions.
12361 (UNPACK_IF): Likewise.
12362 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12363 enable long double built-in functions if long double is IEEE
12364 128-bit floating point.
12365 (rs6000_invalid_builtin): Update long double built-in function
12366 error message.
12367 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12368 functions, adjust the built-in function to use the long double
12369 built-in function if __ibm128 and long double are the same type.
12370 * doc/extend.texi (PowerPC builtins): Update documention for
12371 __builtin_{,un}pack_longdouble. Add documentation for
12372 __builtin_{,un}pack_ibm128.
12373
12374 2018-06-06 Jim Wilson <jimw@sifive.com>
12375
12376 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12377 (struct machine_function): New field interrupt_mode.
12378 (riscv_handle_type_attribute): New function. Add forward declaration.
12379 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12380 (riscv_expand_epilogue): Check interrupt_mode field.
12381 (riscv_set_current_function): Check interrupt attribute args and
12382 set interrupt_mode field.
12383 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12384 (riscv_sret, riscv_uret): New.
12385 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12386 new arguments to interrupt attribute.
12387
12388 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12389
12390 PR target/63177
12391 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12392 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12393
12394 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12395
12396 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12397 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12398 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12399 several redundant entries.
12400
12401 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12402
12403 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12404 type from "rtx" to "rtx_insn *".
12405 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12406 for local "call_insn", removing cast.
12407 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12408
12409 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12410
12411 PR tree-optimization/86066
12412 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12413 for BIT_INSERT_EXPR stores.
12414
12415 2018-06-06 Richard Biener <rguenther@suse.de>
12416
12417 PR tree-optimization/86062
12418 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12419 component refs ontop
12420 of to be offsetted base.
12421
12422 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12423
12424 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12425 to be static and remove check on interrupt attribute name.
12426
12427 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12428
12429 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12430 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12431
12432 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12433
12434 PR target/79924
12435 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12436 second argument.
12437 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12438 Remove second argument, change how error is called.
12439 (aarch64_layout_arg): Remove second argument from
12440 aarch64_err_no_fpadvsimd call.
12441 (aarch64_init_cumulative_args): Ditto.
12442 (aarch64_gimplify_va_arg_expr): Ditto.
12443 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12444
12445 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
12446
12447 * config/i386/i386.md (simple_return_indirect_internal): New expander.
12448 (*simple_return_indirect_internal<mode>): Rename from
12449 simple_return_indirect_internal. Use W mode iterator.
12450 (rstorssp): New expander.
12451 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
12452 (clrssbsy): New expander.
12453 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
12454
12455 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
12456
12457 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12458 __typeof__.
12459 (cmse_check_pointed_object): Likewise.
12460
12461 2018-06-05 Martin Liska <mliska@suse.cz>
12462
12463 PR gcov-profile/47618
12464 * doc/invoke.texi: Document how -fprofile-dir format
12465 is extended.
12466
12467 2018-06-05 Richard Biener <rguenther@suse.de>
12468
12469 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12470 removal pretend DOM info isn't available so we do not update
12471 it and only remove edges, not dominated blocks. Actually free
12472 DOM info in case we removed something. Remove unreachable blocks.
12473 (mfb_keep_latches): Work with either DOM info or marked backedges.
12474 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12475 first. Mark backedges if DOM info isn't available.
12476 (Re-)compute DOM info after cleanup_control_flow_pre.
12477
12478 2018-06-05 Richard Biener <rguenther@suse.de>
12479
12480 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12481 (locus_discrim_hasher::hash): Adjust.
12482 (locus_discrim_hasher::equal): Likewise.
12483 (next_discriminator_for_locus): Work on line directly.
12484 (same_line_p): Pass in expanded locus1 as well.
12485 (assign_discriminators): Avoid redundant location expansions.
12486
12487 2018-06-05 Richard Biener <rguenther@suse.de>
12488
12489 PR tree-optimization/86046
12490 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12491 if required after clearing TREE_ADDRESSABLE.
12492
12493 2018-06-05 Richard Biener <rguenther@suse.de>
12494
12495 PR tree-optimization/86047
12496 * tree-ssa-loop.c (for_each_index): Glob handling of all
12497 decls and constants and really handle all of them.
12498
12499 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12500
12501 PR target/81497
12502 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12503 qualifier_void_pointer and qualifier_const_void_pointer.
12504 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12505 (arm_init_builtins): Handle the above.
12506 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12507 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12508 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12509 void intrinsics.
12510
12511 2018-06-05 Martin Liska <mliska@suse.cz>
12512
12513 * auto-profile.c (read_autofdo_file): Do not use
12514 gcov_ctr_summary struct.
12515 (afdo_callsite_hot_enough_for_early_inline): Likewise.
12516 * coverage.c (struct counts_entry): Likewise.
12517 (read_counts_file): Read just single summary entry.
12518 (get_coverage_counts): Use gcov_summary struct.
12519 * coverage.h (get_coverage_counts): Likewise.
12520 * gcov-dump.c (dump_working_sets): Likewise.
12521 (tag_summary): Dump just single summary.
12522 * gcov-io.c (gcov_write_summary): Write just histogram
12523 summary.
12524 (gcov_read_summary): Read just single summary.
12525 (compute_working_sets): Use gcov_summary struct.
12526 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12527 of GCOV_COUNTERS_SUMMABLE.
12528 (GCOV_COUNTERS_SUMMABLE): Remove.
12529 (GCOV_FIRST_VALUE_COUNTER): Replace with
12530 GCOV_COUNTER_V_INTERVAL.
12531 (struct gcov_ctr_summary): Remove.
12532 (struct gcov_summary): Directly use fields of former
12533 gcov_ctr_summary.
12534 (compute_working_sets): Use gcov_summary struct.
12535 * gcov.c (read_count_file): Do not use ctrs fields.
12536 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12537 struct.
12538 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12539 struct.
12540 * profile.c: Likewise.
12541 * profile.h: Likewise.
12542
12543 2018-06-05 Martin Liska <mliska@suse.cz>
12544
12545 PR gcov-profile/84846
12546 * gcov.c (output_lines): Print working directory only
12547 in intermediate format.
12548
12549 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
12550
12551 * config/s390/s390-builtin-types.def: Add void function type.
12552 * config/s390/s390-builtins.def: Use the function type for the
12553 tbeginc builtin.
12554
12555 2018-06-04 Jim Wilson <jimw@sifive.com>
12556
12557 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12558 to int.
12559 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12560 and maybe_eh_return. Change regno to unsigned int. Use new args to
12561 handle EH_RETURN_DATA_REGNO registers properly.
12562 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12563 (riscv_expand_epilogue): Update comment. Change argument name and
12564 type. Update code to use new name and type. Pass new args to
12565 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
12566 EXCEPTION_RETURN.
12567 * config/riscv/riscv.md (NORMAL_RETURN): New.
12568 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12569 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12570 (eh_return): Call gen_eh_return_internal and emit barrier.
12571 (eh_return_internal): Call riscv_expand_epilogue.
12572
12573 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
12574
12575 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12576 bit_insertion field and declare can_be_merged_into method.
12577 (merged_store_group::can_be_merged_into): New method.
12578 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12579 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
12580 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12581
12582 2018-06-04 Richard Biener <rguenther@suse.de>
12583
12584 PR tree-optimization/85955
12585 * builtins.c (fold_builtin_sincos): Convert pointers to
12586 destination to appropriate type before dereferencing.
12587
12588 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
12589
12590 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12591
12592 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
12593
12594 * expr.c (expand_expr_real_1): Force the operand into memory if
12595 its TYPE_MODE is BLKmode and if there is no integer mode for
12596 the number of bits being extracted.
12597
12598 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12599
12600 PR target/85832
12601 PR target/86036
12602 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12603 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12604
12605 2018-06-04 Richard Biener <rguenther@suse.de>
12606
12607 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12608 (cleanup_tree_cfg_noloop): ... single caller. Do
12609 start_recording_case_labels later.
12610
12611 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
12612
12613 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12614 to _IMMINTRIN_H_INCLUDED.
12615 * config/i386/pconfigintrin.h: Ditto.
12616 * config/i386/waitpkgintrin.h: Ditto.
12617 * config/i386/immintrin.h: Add includes for sgxintrin.h,
12618 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12619 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12620 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12621 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12622 waitpkgintrin.h and cldemoteintrin.h.
12623
12624 2018-06-04 Richard Biener <rguenther@suse.de>
12625
12626 PR tree-optimization/86038
12627 * tracer.c (find_best_successor): Check probability for
12628 being initialized, bail out if not.
12629
12630 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
12631
12632 PR target/86003
12633 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12634 of bits to ignore when comparing architectures.
12635
12636 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12637
12638 PR tree-optimization/69615
12639 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12640 maximum or minimum of the type, try to merge it also as if
12641 range1 is + [-, x - 1] or + [x + 1, -].
12642
12643 PR c++/86025
12644 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12645
12646 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
12647
12648 PR tree-optimization/86034
12649 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12650 the unsigned bitfield type in a bit insertion sequence if it does not
12651 have a larger precision than the bitfield size.
12652 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12653
12654 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
12655
12656 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12657
12658 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12659
12660 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12661 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12662 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12663 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12664
12665 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12666
12667 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12668 Disable -fdelete-null-pointer-checks for ELF toolchain.
12669
12670 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12671 Kito Cheng <kito.cheng@gmail.com>
12672
12673 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12674 (nds32le-*-*, nds32be-*-*): Integrate checking process.
12675 (nds32*-*-*): Add glibc and uclibc conditions.
12676 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12677 (TARGET_EXCEPT_UNWIND_INFO): Define.
12678 * config/nds32/elf.h: New file.
12679 * config/nds32/linux.h: New file.
12680 * config/nds32/nds32-elf.opt: New file.
12681 * config/nds32/nds32-linux.opt: New file.
12682 * config/nds32/nds32-fp-as-gp.c
12683 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12684 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12685 TARGET_LINUX_ABI.
12686 (nds32_asm_file_end): Ditto.
12687 (nds32_print_operand): Ditto.
12688 (nds32_insert_attributes): Ditto.
12689 (nds32_init_libfuncs): New function.
12690 (TARGET_HAVE_TLS): Define.
12691 (TARGET_INIT_LIBFUNCS): Define.
12692 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12693 spec content.
12694 (TARGET_ELF): Apply different mcmodel setting.
12695 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12696 been migrated into elf.h and linux.h files.
12697 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12698 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12699 (mcmodel): The content has been migrated into nds32-elf.opt and
12700 nds32-linux.opt files.
12701 * config/nds32/t-elf: New file.
12702 * config/nds32/t-linux: New file.
12703
12704 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12705 Shiva Chen <shiva0217@gmail.com>
12706
12707 * config/nds32/constants.md (unspec_volatile_element): Add
12708 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12709 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12710 optimization.
12711 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12712 (make_pass_nds32_fp_as_gp): Declare.
12713 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12714 optmization pass.
12715 (nds32_asm_function_end_prologue): Remove unused asm output.
12716 (nds32_asm_function_begin_epilogue): Remove unused asm output.
12717 (nds32_asm_file_start): Output necessary fp_as_gp information.
12718 (nds32_option_override): Adjust register usage.
12719 (nds32_expand_prologue): Consider fp_as_gp situation.
12720 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12721 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12722 (epilogue): Ditto.
12723 (return): Ditto.
12724 (simple_return): Ditto.
12725 (omit_fp_begin): Output special directive for fp_as_gp.
12726 (omit_fp_end): Output special directive for fp_as_gp.
12727 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12728 mforbid-fp-as-gp): New options.
12729
12730 2018-06-01 Mark Wielaard <mark@klomp.org>
12731
12732 * dwarf2out.c (dwarf2out_finish): Remove generation of
12733 DW_AT_loclists_base.
12734
12735 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
12736
12737 * gimple-ssa-store-merging.c: Include gimple-fold.h.
12738 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12739 (struct merged_store_group): Add bit_insertion field.
12740 (dump_char_array): Use standard hexadecimal format.
12741 (merged_store_group::merged_store_group): Set bit_insertion to false.
12742 (merged_store_group::apply_stores): Use optimal buffer size. Deal
12743 with BIT_INSERT_EXPR stores. Move up code updating the mask and
12744 also print the mask in the dump file.
12745 (pass_store_merging::gate): Minor tweak.
12746 (imm_store_chain_info::coalesce_immediate): Fix wrong association
12747 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
12748 stores with INTEGER_CST stores.
12749 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12750 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12751 and use it throughout. Generate bit insertion sequences if need be.
12752 (pass_store_merging::process_store): Remove redundant condition.
12753 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12754
12755 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
12756
12757 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12758 the 128-bit floating point types. Fix function comment.
12759
12760 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12761
12762 * config/aarch64/aarch64-simd.md
12763 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12764 mnemonics.
12765 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12766 mnemonics.
12767
12768 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
12769
12770 PR tree-optimization/85989
12771 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12772 variable.
12773 (backprop::intersect_uses): Check it when deciding whether this
12774 is a backedge reference.
12775 (backprop::process_block): Add each phi to m_visited_phis
12776 after visiting it, then clear it at the end.
12777
12778 2018-06-01 Richard Biener <rguenther@suse.de>
12779
12780 * tree-vectorizer.h (vect_dr_stmt): New function.
12781 (vect_get_load_cost): Adjust.
12782 (vect_get_store_cost): Likewise.
12783 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
12784 Use vect_dr_stmt instead of DR_SMTT.
12785 (vect_record_base_alignments): Likewise.
12786 (vect_calculate_target_alignment): Likewise.
12787 (vect_compute_data_ref_alignment): Likewise and make static.
12788 (vect_update_misalignment_for_peel): Likewise.
12789 (vect_verify_datarefs_alignment): Likewise.
12790 (vector_alignment_reachable_p): Likewise.
12791 (vect_get_data_access_cost): Likewise. Pass down
12792 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
12793 (vect_get_peeling_costs_all_drs): Likewise.
12794 (vect_peeling_hash_get_lowest_cost): Likewise.
12795 (vect_enhance_data_refs_alignment): Likewise.
12796 (vect_find_same_alignment_drs): Likewise.
12797 (vect_analyze_data_refs_alignment): Likewise.
12798 (vect_analyze_group_access_1): Likewise.
12799 (vect_analyze_group_access): Likewise.
12800 (vect_analyze_data_ref_access): Likewise.
12801 (vect_analyze_data_ref_accesses): Likewise.
12802 (vect_vfa_segment_size): Likewise.
12803 (vect_small_gap_p): Likewise.
12804 (vectorizable_with_step_bound_p): Likewise.
12805 (vect_prune_runtime_alias_test_list): Likewise.
12806 (vect_analyze_data_refs): Likewise.
12807 (vect_supportable_dr_alignment): Likewise.
12808 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12809 (vect_gen_prolog_loop_niters): Likewise.
12810 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12811 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
12812 modify DR_STMT.
12813 (vect_recog_mask_conversion_pattern): Likewise.
12814 (vect_try_gather_scatter_pattern): Likewise.
12815 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
12816 to vect_get_store_cost.
12817 (vect_get_store_cost): Get stmt_info instead of DR.
12818 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
12819 (vect_get_load_cost): Get stmt_info instead of DR.
12820
12821 2018-06-01 Richard Biener <rguenther@suse.de>
12822
12823 PR middle-end/86017
12824 * gimple-fold.c (var_decl_component_p): Also allow offsetted
12825 vars wrapped in MEM_REFs.
12826
12827 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
12828
12829 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12830 Fix subreg tests so that we only return a choice between
12831 GENERAL_REGS and FP_REGS if the original classes included both.
12832
12833 2018-06-01 Richard Biener <rguenther@suse.de>
12834
12835 PR ipa/85960
12836 * tree-ssa-structalias.c (get_function_part_constraint):
12837 Handle NULL fi->decl.
12838 (find_func_aliases_for_call): Properly handle indirect
12839 fi from direct call.
12840 (find_func_clobbers): Likewise.
12841 (ipa_pta_execute): Likewise.
12842 (create_variable_info_for): For functions that are ifunc_resolver
12843 resolve to a varinfo that contains the result of the resolver call.
12844 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
12845 aliases.
12846
12847 2018-05-31 Michael Collison <michael.collison@arm.com>
12848
12849 * config/aarch64/aarch64.md:
12850 (*fix_to_zero_extenddfdi2): New pattern.
12851 * gcc.target/aarch64/fix_extend1.c: New testcase.
12852
12853 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
12854
12855 PR middle-end/78809
12856 PR middle-end/83026
12857 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
12858 and BUILT_IN_STRNCMP_EQ.
12859 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
12860 BUILT_IN_STRNCMP_EQ.
12861 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
12862 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12863 (gimple_fold_builtin): Likewise.
12864 * tree-ssa-strlen.c (compute_string_length): New function.
12865 (determine_min_obsize): New function.
12866 (handle_builtin_string_cmp): New function to handle calls to
12867 string compare functions.
12868 (strlen_optimize_stmt): Add handling to builtin string compare
12869 calls.
12870 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
12871 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12872 * tree.c (build_common_builtin_nodes): Add new defines of
12873 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
12874
12875 2018-05-31 Jakub Jelinek <jakub@redhat.com>
12876
12877 PR target/85984
12878 * bb-reorder.c (pass_partition_blocks::gate): Return false for
12879 functions with naked attribute.
12880
12881 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
12882
12883 * config/i386/sse.md (avx_vec_concat<mode>):
12884 Substitute concat_tg_mode mode attribute with xtg_mode.
12885 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
12886 (concat_tg_mode): Remove mode attribute.
12887
12888 2018-05-31 Martin Sebor <msebor@redhat.com>
12889
12890 PR c/82063
12891 * calls.c (alloc_max_size): Correct a logic error/typo.
12892 Treat excessive arguments as infinite. Warn for invalid arguments.
12893 * doc/invoke.texi (-Walloc-size-larger-than): Update.
12894
12895 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
12896
12897 PR target/85829
12898 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
12899 and movx for Haswell.
12900
12901 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
12902 Cesar Philippidis <cesar@codesourcery.com>
12903
12904 PR middle-end/85879
12905 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
12906 when emitting error on private/firstprivate reductions.
12907 * omp-low.c (lower_omp_target): Avoid reference-type processing
12908 on pointers for firstprivate clause.
12909
12910 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
12911
12912 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
12913 (st1x2): Likewise.
12914 (st1x3): Likewise.
12915 * config/aarch64/aarch64-simd.md
12916 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
12917 (aarch64_ld1_x3_<mode>): Likewise
12918 (aarch64_st1x2<VALLDIF:mode>): Likewise
12919 (aarch64_st1_x2_<mode>): Likewise
12920 (aarch64_st1x3<VALLDIF:mode>): Likewise
12921 (aarch64_st1_x3_<mode>): Likewise
12922 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
12923 (vld1_s8_x3): Likewise.
12924 (vld1_u16_x3): Likewise.
12925 (vld1_s16_x3): Likewise.
12926 (vld1_u32_x3): Likewise.
12927 (vld1_s32_x3): Likewise.
12928 (vld1_u64_x3): Likewise.
12929 (vld1_s64_x3): Likewise.
12930 (vld1_f16_x3): Likewise.
12931 (vld1_f32_x3): Likewise.
12932 (vld1_f64_x3): Likewise.
12933 (vld1_p8_x3): Likewise.
12934 (vld1_p16_x3): Likewise.
12935 (vld1_p64_x3): Likewise.
12936 (vld1q_u8_x3): Likewise.
12937 (vld1q_s8_x3): Likewise.
12938 (vld1q_u16_x3): Likewise.
12939 (vld1q_s16_x3): Likewise.
12940 (vld1q_u32_x3): Likewise.
12941 (vld1q_s32_x3): Likewise.
12942 (vld1q_u64_x3): Likewise.
12943 (vld1q_s64_x3): Likewise.
12944 (vld1q_f16_x3): Likewise.
12945 (vld1q_f32_x3): Likewise.
12946 (vld1q_f64_x3): Likewise.
12947 (vld1q_p8_x3): Likewise.
12948 (vld1q_p16_x3): Likewise.
12949 (vld1q_p64_x3): Likewise.
12950 (vst1_s64_x2): Likewise.
12951 (vst1_u64_x2): Likewise.
12952 (vst1_f64_x2): Likewise.
12953 (vst1_s8_x2): Likewise.
12954 (vst1_p8_x2): Likewise.
12955 (vst1_s16_x2): Likewise.
12956 (vst1_p16_x2): Likewise.
12957 (vst1_s32_x2): Likewise.
12958 (vst1_u8_x2): Likewise.
12959 (vst1_u16_x2): Likewise.
12960 (vst1_u32_x2): Likewise.
12961 (vst1_f16_x2): Likewise.
12962 (vst1_f32_x2): Likewise.
12963 (vst1_p64_x2): Likewise.
12964 (vst1q_s8_x2): Likewise.
12965 (vst1q_p8_x2): Likewise.
12966 (vst1q_s16_x2): Likewise.
12967 (vst1q_p16_x2): Likewise.
12968 (vst1q_s32_x2): Likewise.
12969 (vst1q_s64_x2): Likewise.
12970 (vst1q_u8_x2): Likewise.
12971 (vst1q_u16_x2): Likewise.
12972 (vst1q_u32_x2): Likewise.
12973 (vst1q_u64_x2): Likewise.
12974 (vst1q_f16_x2): Likewise.
12975 (vst1q_f32_x2): Likewise.
12976 (vst1q_f64_x2): Likewise.
12977 (vst1q_p64_x2): Likewise.
12978 (vst1_s64_x3): Likewise.
12979 (vst1_u64_x3): Likewise.
12980 (vst1_f64_x3): Likewise.
12981 (vst1_s8_x3): Likewise.
12982 (vst1_p8_x3): Likewise.
12983 (vst1_s16_x3): Likewise.
12984 (vst1_p16_x3): Likewise.
12985 (vst1_s32_x3): Likewise.
12986 (vst1_u8_x3): Likewise.
12987 (vst1_u16_x3): Likewise.
12988 (vst1_u32_x3): Likewise.
12989 (vst1_f16_x3): Likewise.
12990 (vst1_f32_x3): Likewise.
12991 (vst1_p64_x3): Likewise.
12992 (vst1q_s8_x3): Likewise.
12993 (vst1q_p8_x3): Likewise.
12994 (vst1q_s16_x3): Likewise.
12995 (vst1q_p16_x3): Likewise.
12996 (vst1q_s32_x3): Likewise.
12997 (vst1q_s64_x3): Likewise.
12998 (vst1q_u8_x3): Likewise.
12999 (vst1q_u16_x3): Likewise.
13000 (vst1q_u32_x3): Likewise.
13001 (vst1q_u64_x3): Likewise.
13002 (vst1q_f16_x3): Likewise.
13003 (vst1q_f32_x3): Likewise.
13004 (vst1q_f64_x3): Likewise.
13005 (vst1q_p64_x3): Likewise.
13006
13007 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13008
13009 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13010 user_label_prefix to name.
13011
13012 * tree-core.h: Update comment about the format of NAME string
13013 passed to handler in attribute_spec.
13014
13015 * config/msp430/msp430.md: Remove erroneous subreg expression from
13016 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13017 zero_extend{q,h}isi2.
13018
13019 2018-05-30 Borislav Petkov <bp@suse.de>
13020
13021 * doc/extend.texi: Document some architecture specific
13022 constraints and sort entries.
13023
13024 2018-05-30 Martin Sebor <msebor@redhat.com>
13025
13026 PR middle-end/85369
13027 * builtins.c (expand_builtin_stpcpy_1): New function.
13028 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13029 only if the former succeeds.
13030
13031 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13032
13033 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13034 in saphira.
13035
13036 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13037
13038 * doc/invoke.texi (-flinker-output): Document
13039
13040 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13041
13042 * passes.c (ipa_write_summaries): Only modify statements if body
13043 is in memory.
13044 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13045 incrementally linking.
13046 (ipa_passes): Likewise.
13047 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13048 pass down resolution info.
13049 * common.opt (flag_incremental_link): Update info.
13050 * gcc.c (plugin specs): Turn flinker-output=* to
13051 -plugin-opt=-linker-output-known
13052 * toplev.c (compile_file): Also cut compilation when doing incremental
13053 link.
13054 * flag-types. (enum lto_partition_model): Add
13055 LTO_LINKER_OUTPUT_NOLTOREL.
13056 (invoke.texi): Add -flinker-output docs.
13057 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13058 link same way as WPA; do not stream in dead initializers.
13059
13060 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13061 darf2out_register_external_decl): Support incremental link.
13062
13063 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13064
13065 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13066
13067 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13068
13069 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13070 it down to simple_object_copy_lto_debug_sections.
13071 (run_gcc): Determine incremental LTO link time and configure
13072 lto1 into non-wpa mode, disable renaming of debug sections.
13073
13074 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13075
13076 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13077 descriptions of various incorrectly documented functions.
13078
13079 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13080
13081 Revert:
13082 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13083 address check not strict.
13084
13085 2018-05-30 Richard Biener <rguenther@suse.de>
13086
13087 PR tree-optimization/85964
13088 * tracer.c (better_p): Drop initialized count check, we only
13089 call the function with initialized counts now.
13090 (find_best_successor): Do find a best edge if one
13091 has uninitialized count.
13092 (find_best_predecessor): Likewise. Do BB frequency check only
13093 if count is initialized.
13094
13095 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13096
13097 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13098 (aarch64_ldrstr_offset_compare): New.
13099 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13100 load/store orderings.
13101 (aarch64_gen_adjusted_ldpstp): Likewise.
13102
13103 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13104
13105 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13106 Check for subset of GENERAL_REGS and FP_REGS.
13107 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13108 r=w alternative.
13109
13110 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13111
13112 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13113 and wi::to_poly_offset. Add the current offset and then check
13114 whether the sum fits, rather than using an unchecked addition of
13115 a checked term. Check for a shwi rather than a uhwi.
13116 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13117 (store_constructor): Use poly_int_tree_p.
13118 (expand_expr_real_1): Likewise.
13119 * function.c (assign_temp): Likewise.
13120 * fold-const.c (const_binop): Use poly_int_tree_p and
13121 wi::to_poly_offset.
13122 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13123 division.
13124 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13125 to_poly_offset for MEM offsets.
13126 * ipa-icf.c (sem_variable::equals): Likewise.
13127 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13128 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13129 wi::to_poly_offset for BIT_FIELD_REF offsets.
13130 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13131 wi::to_poly_offset.
13132 * var-tracking.c (emit_note_insn_var_location): Use
13133 tree_to_poly_uint64.
13134
13135 2018-05-29 Jim Wilson <jimw@sifive.com>
13136
13137 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13138
13139 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13140
13141 PR target/85950
13142 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13143 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13144 sequence.
13145 (sse4_1_round<mode>2): Use nonimmediate_operand
13146 for operand 1 predicate.
13147
13148 2018-05-29 Martin Sebor <msebor@redhat.com>
13149 Richard Biener <rguenther@suse.de>
13150
13151 PR testsuite/85888
13152 * calls.c (get_size_range): Call determine_value_range instead
13153 of get_value_range..
13154 * tree-vrp.h (determine_value_range): Declared new function.
13155 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13156
13157 2018-05-29 Richard Biener <rguenther@suse.de>
13158
13159 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13160 sure to use non-pattern stmts for get_earlier_stmt arguments.
13161 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13162 called on pattern stmts.
13163 (get_later_stmt): Likewise.
13164
13165 2018-05-29 Martin Liska <mliska@suse.cz>
13166
13167 PR gcov-profile/85759
13168 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13169 env variables.
13170
13171 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13172
13173 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13174 VEC_UNPACK_*_EXPR.
13175 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13176 VEC_PACK_*_EXPR.
13177
13178 PR target/85918
13179 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13180 VEC_PACK_FLOAT_EXPR): New tree codes.
13181 * tree-pretty-print.c (op_code_prio): Handle
13182 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13183 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13184 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13185 * tree-inline.c (estimate_operator_cost): Likewise.
13186 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13187 * fold-const.c (const_binop): Likewise.
13188 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13189 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13190 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13191 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13192 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13193 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13194 * expr.c (expand_expr_real_2): Likewise.
13195 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13196 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13197 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13198 optabs.
13199 * optabs.c (expand_widen_pattern_expr): For
13200 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13201 sign from result type rather than operand's type.
13202 (expand_binop_directly): For vec_packu_float_optab and
13203 vec_packs_float_optab allow result type to be different from operand's
13204 type.
13205 * optabs-tree.c (optab_for_tree_code): Handle
13206 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13207 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13208 * tree-vect-generic.c (expand_vector_operations_1): Handle
13209 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13210 VEC_PACK_FLOAT_EXPR.
13211 * tree-vect-stmts.c (supportable_widening_operation): Handle
13212 FIX_TRUNC_EXPR.
13213 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13214 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13215 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13216 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13217 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13218 mode attributes.
13219 (vec_pack<floatprefix>_float_<mode>): New expander.
13220 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13221 attributes.
13222 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13223 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13224 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13225 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13226 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13227 Document.
13228 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13229 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13230 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13231 VEC_PACK_FLOAT_EXPR): Document.
13232
13233 2018-05-29 Richard Biener <rguenther@suse.de>
13234
13235 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13236 member.
13237 (stmt_vec_info_vec): Make pointer.
13238 (init_stmt_vec_info_vec): Remove.
13239 (free_stmt_vec_info_vec): Likewise.
13240 (set_stmt_vec_info_vec): New function.
13241 (free_stmt_vec_infos): Likewise.
13242 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13243 (set_vinfo_for_stmt): Likewise.
13244 (get_earlier_stmt): Likewise.
13245 (get_later_stmt): Likewise.
13246 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13247 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13248 (vec_info::~vec_info): Free stmt_vec_infos.
13249 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13250 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13251 (pass_slp_vectorize::execute): Likewise.
13252 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13253 (free_stmt_vec_info_vec): Likewise.
13254 (set_stmt_vec_info_vec): New function.
13255 (free_stmt_vec_infos): Likewise.
13256 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13257 the global stmt_vec_info_vec.
13258 * tree-parloops.c (gather_scalar_reductions): Use
13259 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13260 vector.
13261
13262 2018-05-29 Richard Biener <rguenther@suse.de>
13263
13264 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13265
13266 2018-05-29 Martin Liska <mliska@suse.cz>
13267 David Malcolm <dmalcolm@redhat.com>
13268
13269 * vec.c (test_reverse): New.
13270 (vec_c_tests): Add new test.
13271 * vec.h (vl_ptr>::reverse): New function.
13272
13273 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13274
13275 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13276
13277 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13278 and later.
13279
13280 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13281
13282 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13283
13284 2018-05-28 Richard Biener <rguenther@suse.de>
13285
13286 PR tree-optimization/85933
13287 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13288 look at stmts marked as vectorizable.
13289
13290 2018-05-28 Richard Biener <rguenther@suse.de>
13291
13292 PR tree-optimization/85934
13293 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13294 vector boolean check before scalar optimization.
13295
13296 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13297
13298 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13299 for armv5te.
13300
13301 2018-05-28 Mark Wielaard <mark@klomp.org>
13302
13303 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13304 if it is an expression containing a minus sign.
13305
13306 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13307
13308 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13309
13310 2018-05-27 Paul Koning <ni1d@arrl.net>
13311
13312 * config/pdp11/pdp11.md (truncsihi2): Remove.
13313
13314 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13315 Chung-Ju Wu <jasonwucj@gmail.com>
13316
13317 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13318 implementation.
13319 (unaligned_store_dw): Ditto.
13320 * config/nds32/nds32-memory-manipulation.c
13321 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13322 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13323 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13324 (emit_setmem_word_loop): Rename to ...
13325 (emit_setmem_doubleword_loop): ... this.
13326 (nds32_gen_dup_4_byte_to_word_value): New function.
13327 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13328 (nds32_expand_setmem_loop): Refine implementation.
13329 (nds32_expand_setmem_loop_v3m): Ditto.
13330 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13331 pattern.
13332
13333 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13334
13335 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13336
13337 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13338
13339 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13340 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13341 machine->attr_no_prologue_p.
13342 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13343 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13344 (nds32_expand_epilogue): Consider attr_naked_p.
13345 (nds32_expand_epilogue_v3pop): Likewise.
13346 (nds32_can_use_return_insn): Likewise.
13347 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13348 attr_no_prologue_p fields.
13349 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13350
13351 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13352
13353 PR target/85918
13354 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13355 attributes.
13356 * config/i386/sse.md
13357 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13358 Rename to ...
13359 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13360 ... this.
13361 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13362 Rename to ...
13363 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13364 ... this.
13365 (*<floatsuffix>floatv2div2sf2): Rename to ...
13366 (*float<floatunssuffix>v2div2sf2): ... this.
13367 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13368 (float<floatunssuffix>v2div2sf2_mask): ... this.
13369 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13370 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13371 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13372 to ...
13373 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13374 ... this.
13375 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13376 Rename to ...
13377 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13378 ... this.
13379 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13380 Rename to ...
13381 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13382 ... this.
13383 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13384 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13385 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13386 gen_ufix_truncv8dfv8si2.
13387 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13388 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13389 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13390 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13391 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13392 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13393 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13394 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13395
13396 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13397
13398 PR target/85900
13399 PR target/85345
13400 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13401
13402 2018-05-25 Jim Wilson <jimw@sifive.com>
13403
13404 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13405 * config/riscv/riscv.c (struct machine_function): Add
13406 interrupt_handler_p and attribute_checked_p fields.
13407 (riscv_attribute_table): Add interrupt.
13408 (riscv_interrupt_type_p): New.
13409 (riscv_save_reg_p): Save extra regs for interrupt handler.
13410 (riscv_use_save_libcall): Return false for interrupt handler.
13411 (riscv_first_stack_step): Add forward declaration.
13412 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13413 for interrupt handler with large frame. Use it for saved reg list.
13414 (riscv_expand_prologue): Move flag_stack_usage_info support to
13415 eliminate duplication.
13416 (riscv_expand_epilogue): Generate mret for interrupt handler.
13417 (riscv_epilogue_uses): New.
13418 (riscv_can_use_return_insn): Return false for interrupt handler.
13419 (riscv_function_ok_for_sibcall): Likewise.
13420 (riscv_set_current_function): Add interrupt handler support.
13421 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13422 * config/riscv/riscv.md (UNSPECV_MRET): New.
13423 (GP_REGNUM): New.
13424 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13425 (riscv_mret): New.
13426 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13427
13428 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13429
13430 PR tree-optimization/85712
13431 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13432 this candidate has already been replaced in-situ by a copy.
13433
13434 2018-05-25 Jason Merrill <jason@redhat.com>
13435
13436 PR c++/80485 - inline function non-zero address.
13437 * symtab.c (nonzero_address): Check DECL_COMDAT.
13438
13439 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13440
13441 PR target/83628
13442 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13443 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13444 extension of SImode operation. Use const123_operand predicate.
13445 (*saddsi_1): Remove.
13446 (*saddl_se_1): Ditto.
13447 (*ssubsi_1): Ditto.
13448 (*ssubl_se_1): Ditto.
13449 * config/alpha/predicates.md (const123_operand): New predicate.
13450 * config/alpha/constraints.md (P): Use IN_RANGE.
13451
13452 2018-05-25 Richard Biener <rguenther@suse.de>
13453
13454 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13455 defaulted to true.
13456 (ref_maybe_used_by_stmt_p): Likewise.
13457 (stmt_may_clobber_ref_p): Likewise.
13458 (stmt_may_clobber_ref_p_1): Likewise.
13459 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13460 and pass it along.
13461 (ref_maybe_used_by_stmt_p): Likewise.
13462 (stmt_may_clobber_ref_p): Likewise.
13463 (stmt_may_clobber_ref_p_1): Likewise.
13464 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13465 the alias oracle to disambiguate DRs with stmts DR analysis
13466 couldn't handle.
13467 (vect_analyze_data_refs): Do not give up on not analyzable
13468 DRs for BB vectorization. Remove code truncating the dataref
13469 vector.
13470
13471 2018-05-25 Jakub Jelinek <jakub@redhat.com>
13472
13473 PR target/85832
13474 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13475 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
13476 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13477
13478 2018-05-25 Richard Biener <rguenther@suse.de>
13479
13480 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13481 function, combining stmt data ref gathering and fatal analysis
13482 parts.
13483 (vect_analyze_data_refs): Remove now redudnant code and simplify.
13484 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13485 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13486 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13487 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13488
13489 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13490
13491 PR tree-optimization/85720
13492 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13493 SCC if all partitions are builtins.
13494 (version_loop_by_alias_check): New parameter. Generate cancelable
13495 runtime alias check if all partitions are builtins.
13496 (distribute_loop): Update call to above function.
13497
13498 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13499
13500 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13501 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13502 (parm_default_def_partition_arg): Ditto.
13503 (set_parm_default_def_partition): Ditto.
13504 (get_parm_default_def_partitions): Ditto and make it static.
13505 (get_undefined_value_partitions): Ditto and make it static.
13506 (remove_ssa_form): Refactor call to init_var_map here.
13507 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13508 computation for loop region.
13509 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13510 (register_default_def): Delete.
13511 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13512 (parm_default_def_partition_arg): Ditto.
13513 (set_parm_default_def_partition): Ditto.
13514 (get_parm_default_def_partitions): Ditto and make it static.
13515 (get_undefined_value_partitions): Ditto and make it static.
13516 (coalesce_with_default, coalesce_with_default): Update comment.
13517 (create_coalesce_list_for_region): New func factored out from
13518 create_outofssa_var_map.
13519 (populate_coalesce_list_for_outofssa): New func factored out from
13520 create_outofssa_var_map and coalesce_ssa_name.
13521 (create_outofssa_var_map): Delete.
13522 (coalesce_ssa_name): Refactor to support live range computation.
13523 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13524 (get_parm_default_def_partitions): Delete.
13525 (get_undefined_value_partitions): Ditto.
13526 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13527 computation for loop region.
13528 (new_tree_live_info, loe_visit_block): Ditto.
13529 (live_worklist, set_var_live_on_entry): Ditto.
13530 (calculate_live_on_exit, verify_live_on_entry): Ditto.
13531 * tree-ssa-live.h (struct _var_map): New fields.
13532 (init_var_map): Change decl.
13533 (region_contains_p): New.
13534
13535 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13536
13537 * tree-ssa-live.h (live_merge_and_clear): Delete.
13538
13539 2018-05-25 Richard Biener <rguenther@suse.de>
13540
13541 PR c++/85912
13542 * tree-dump.c (dequeue_and_dump): Remove access to removed
13543 operand 2 of a SWITCH_EXPR.
13544
13545 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13546
13547 * doc/sourcebuild.texi (vect_double_cond_arith): Include
13548 multiplication and division.
13549 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13550 (cond_udiv@var{m}, cond_umod@var{m}): Document.
13551 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13552 (cond_udiv_optab, cond_umod_optab): New optabs.
13553 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13554 (IFN_COND_RDIV): New internal functions.
13555 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13556 TRUNC_MOD_EXPR and RDIV_EXPR.
13557 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13558 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13559 New unspecs.
13560 (SVE_INT_BINARY): Include mult.
13561 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13562 (optab, sve_int_op): Handle mult.
13563 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13564 UNSPEC_COND_DIV.
13565 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13566 for SVE_INT_BINARY_SD.
13567
13568 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13569
13570 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13571 (optab, sve_int_op): Handle div and udiv.
13572 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13573 for SVE_INT_BINARY_SD.
13574 (*<optab><mode>3): New insn for the same.
13575
13576 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13577
13578 * tree-vect-patterns.c: Include predict.h.
13579 (vect_recog_divmod_pattern): Restrict check for division support
13580 to when optimizing for size.
13581
13582 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13583
13584 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13585 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13586 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13587 (gimple_match_op::set_op): Likewise.
13588 (gimple_resimplify4): Declare.
13589 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13590 (expr::gen_transform): Likewise.
13591 (decision_tree::gen): Generate a simplification routine for 4 operands.
13592 * gimple-match-head.c (gimple_simplify): Add an overload for
13593 4 operands. In the top-level function, handle up to 4 call
13594 arguments and call gimple_resimplify4.
13595 (gimple_resimplify4): New function.
13596 (build_call_internal): Pass a fourth operand.
13597 (maybe_push_to_seq): Likewise.
13598 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13599 Fold VEC_COND_EXPRs of an operation and a default value into
13600 an IFN_COND_* function if possible.
13601 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13602 New unspecs.
13603 (SVE_COND_FP_BINARY): Include them.
13604 (optab, sve_fp_op): Handle them.
13605 (SVE_INT_BINARY_REV): New code iterator.
13606 (SVE_COND_FP_BINARY_REV): New int iterator.
13607 (commutative): New int attribute.
13608 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13609 Declare.
13610 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13611 function.
13612 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13613 (*cond_<optab><mode>): New patterns for reversed operands.
13614
13615 2018-05-25 Richard Biener <rguenther@suse.de>
13616
13617 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13618 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13619 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13620 (STMT_VINFO_GROUPED_ACCESS): Adjust.
13621 * tree-vect-data-refs.c (everywhere): Adjust users.
13622 * tree-vect-loop.c (everywhere): Likewise.
13623 * tree-vect-slp.c (everywhere): Likewise.
13624 * tree-vect-stmts.c (everywhere): Likewise.
13625 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13626
13627 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13628
13629 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13630 Rename to...
13631 (gcc_cv_as_section_exclude): ... this.
13632 Try Solaris as #exclude syntax.
13633 * configure: Regenerate.
13634 * config.in: Regenerate.
13635 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13636 SECTION_EXCLUDE.
13637 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13638 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13639
13640 * varasm.c (default_elf_asm_named_section): Don't check if
13641 HAVE_GAS_SECTION_EXCLUDE is defined.
13642
13643 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13644
13645 * doc/md.texi: Update the documentation of the cond_* optabs
13646 to mention the new final operand. Fix GET_MODE_NUNITS call.
13647 Describe the scalar case too.
13648 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13649 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13650 instead of 2.
13651 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13652 (get_conditional_internal_fn): Update comment.
13653 * tree-vect-loop.c (vectorizable_reduction): Pass the original
13654 accumulator value as a final argument to conditional functions.
13655 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13656 a define_expand and add an "else" operand. Assert for now that
13657 the else operand is equal to operand 2. Use SVE_INT_BINARY and
13658 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13659 (*cond_<optab><mode>): New patterns.
13660 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13661 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13662 (UNSPEC_COND_EOR): Delete.
13663 (optab): Remove associated mappings.
13664 (SVE_INT_BINARY): New code iterator.
13665 (sve_int_op): Remove int attribute and add "minus" to the code
13666 attribute.
13667 (SVE_COND_INT_OP): Delete.
13668 (SVE_COND_FP_OP): Rename to...
13669 (SVE_COND_FP_BINARY): ...this.
13670
13671 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13672
13673 * optabs.c (can_reuse_operands_p): New function.
13674 (maybe_legitimize_operands): Try to reuse the results for
13675 earlier operands.
13676
13677 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13678
13679 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13680 Add {q} suffix to insn mnemonic.
13681
13682 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13683
13684 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13685 (msp430_warn_func_return): New.
13686
13687 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
13688
13689 * fold-const.c (tree_nonzero_bits): New function.
13690 * fold-const.h (tree_nonzero_bits): Likewise.
13691 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13692 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13693
13694 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13695
13696 PR target/85900
13697 PR target/85345
13698 * varasm.c (assemble_alias): Check ifunc_resolver only on
13699 FUNCTION_DECL.
13700
13701 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13702
13703 PR target/85903
13704 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13705 when memory input operand is handled.
13706
13707 2018-05-24 Luis Machado <luis.machado@linaro.org>
13708
13709 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13710 global.
13711 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13712
13713 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
13714
13715 * match.pd: Delay FMA folds until after vectorization.
13716
13717 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
13718
13719 PR target/83009
13720 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13721 address check not strict.
13722
13723 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
13724
13725 * gimple-match.h (gimple_match_op): New class.
13726 (mprts_hook): Replace parameters with a gimple_match_op *.
13727 (maybe_build_generic_op): Likewise.
13728 (gimple_simplified_result_is_gimple_val): Replace parameters with
13729 a const gimple_match_op *.
13730 (gimple_simplify): Replace code_helper * and tree * parameters with
13731 a gimple_match_op * parameter.
13732 (gimple_resimplify1): Replace code_helper *, tree and tree *
13733 parameters with a gimple_match_op * parameter.
13734 (gimple_resimplify2): Likewise.
13735 (gimple_resimplify3): Likewise.
13736 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13737 parameters with a gimple_match_op * parameter.
13738 * gimple-match-head.c (gimple_simplify): Change prototypes of
13739 auto-generated functions to take a gimple_match_op * instead of
13740 separate code_helper * and tree * parameters. Make the same
13741 change in the top-level overload and update calls to the
13742 gimple_resimplify routines. Update calls to the auto-generated
13743 functions and to maybe_push_res_to_seq in the publicly-facing
13744 operation-specific gimple_simplify overloads.
13745 (gimple_match_op::MAX_NUM_OPS): Define.
13746 (gimple_resimplify1): Replace rcode and ops with a single res_op
13747 parameter. Update call to gimple_simplify.
13748 (gimple_resimplify2): Likewise.
13749 (gimple_resimplify3): Likewise.
13750 (mprts_hook): Replace parameters with a gimple_match_op *.
13751 (maybe_build_generic_op): Likewise.
13752 (build_call_internal): Replace type, nargs and ops with
13753 a gimple_match_op *.
13754 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13755 with a single gimple_match_op *. Update calls to mprts_hook,
13756 build_call_internal and gimple_simplified_result_is_gimple_val.
13757 Factor out code that is common to the tree_code and combined_fn cases.
13758 * genmatch.c (expr::gen_transform): Replace tem_code and
13759 tem_ops with a gimple_match_op called tem_op. Update calls
13760 to the gimple_resimplify functions and maybe_push_res_to_seq.
13761 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13762 res_ops. Update call to the gimple_resimplify functions.
13763 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13764 (decision_tree::gen): Make the functions take a gimple_match_op *
13765 called res_op instead of separate res_code and res_ops parameters.
13766 Update call accordingly.
13767 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13768 and ops with a single res_op parameter. Update calls to
13769 maybe_build_generic_op and maybe_push_res_to_seq.
13770 (fold_stmt_1): Update calls to gimple_simplify and
13771 replace_stmt_with_simplification.
13772 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13773 and gimple_simplified_result_is_gimple_val.
13774 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13775 gimple_simplify.
13776 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13777 with a gimple_match_op *.
13778 (vn_nary_build_or_lookup): Likewise. Update call to
13779 vn_nary_build_or_lookup_1.
13780 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13781 gimple_match_op *. Update calls to the gimple_resimplify routines
13782 and to gimple_simplified_result_is_gimple_val.
13783 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
13784 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
13785 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
13786 (visit_nary_op): Likewise.
13787 (visit_reference_op_load): Likewise.
13788
13789 2018-05-23 Luis Machado <luis.machado@linaro.org>
13790
13791 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
13792 modifier for printing the step amount.
13793
13794 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
13795
13796 PR target/78849
13797 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
13798 types.
13799
13800 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
13801
13802 * doc/sourcebuild.texi (Endianness): New subsubsection.
13803
13804 2018-05-23 Luis Machado <luis.machado@linaro.org>
13805
13806 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13807 <prefetch_dynamic_strides>: New const bool field.
13808 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13809 prefetch_dynamic_strides.
13810 (exynosm1_prefetch_tune): Likewise.
13811 (thunderxt88_prefetch_tune): Likewise.
13812 (thunderx_prefetch_tune): Likewise.
13813 (thunderx2t99_prefetch_tune): Likewise.
13814 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
13815 false.
13816 (aarch64_override_options_internal): Update to set
13817 PARAM_PREFETCH_DYNAMIC_STRIDES.
13818 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13819 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13820 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13821 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13822 prefetch-dynamic-strides setting.
13823
13824 2018-05-23 Luis Machado <luis.machado@linaro.org>
13825
13826 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13827 <minimum_stride>: New const int field.
13828 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13829 minimum_stride field defaulting to -1.
13830 (exynosm1_prefetch_tune): Likewise.
13831 (thunderxt88_prefetch_tune): Likewise.
13832 (thunderx_prefetch_tune): Likewise.
13833 (thunderx2t99_prefetch_tune): Likewise.
13834 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
13835 <default_opt_level>: Set to 3.
13836 (aarch64_override_options_internal): Update to set
13837 PARAM_PREFETCH_MINIMUM_STRIDE.
13838 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13839 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13840 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13841 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13842 stride is constant and is below the minimum stride threshold.
13843
13844 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13845
13846 * config/arm/arm-cpus.in (mode26): Delete.
13847 (armv4): Delete mode26 reference.
13848 * config/arm/arm.c (arm_configure_build_target): Delete use of
13849 isa_bit_mode26.
13850
13851 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
13852
13853 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
13854 New insn pattern.
13855 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
13856 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
13857 for non-SSE modes.
13858 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
13859 (floatunsdidf2): Ditto.
13860
13861 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
13862
13863 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
13864 (fixuns_trunc<mode>si2_avx512f): Ditto.
13865 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
13866 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
13867 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
13868
13869 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
13870
13871 PR rtl-optimization/79985
13872 * df-scan.c (df_insn_refs_collect): Remove special case for
13873 global registers and asm statements.
13874
13875 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
13876
13877 * extend.texi (Global Register Variables): Rewrite the bullet list.
13878 Note that the register is available for allocation. Note that access
13879 via inline asm must use constraints. Add note about async-signal
13880 handlers. Remove paragraph about automagic register selection.
13881
13882 2018-05-23 Richard Biener <rguenther@suse.de>
13883
13884 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
13885 of fixed offset from memset VN.
13886
13887 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
13888
13889 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
13890 first_interp field.
13891 (alloc_cand_and_find_basis): Initialize first_interp field.
13892 (slsr_process_mul): Modify first_interp field.
13893 (slsr_process_add): Likewise.
13894 (slsr_process_cast): Modify first_interp field for each new
13895 interpretation.
13896 (slsr_process_copy): Likewise.
13897 (dump_candidate): Dump first_interp field.
13898 (replace_mult_candidate): Process all interpretations, not just
13899 subsequent ones.
13900 (replace_rhs_if_not_dup): Likewise.
13901 (replace_one_candidate): Likewise.
13902
13903 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
13904
13905 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
13906 Add new boolean.
13907 (aarch64_needs_frame_chain): New function.
13908 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
13909
13910 2018-05-23 Sudakshina Das <sudi.das@arm.com>
13911
13912 PR target/84882
13913 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
13914 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
13915 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
13916 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
13917 as true for strict-align.
13918 (aarch64_can_inline_p): Perform checks even when callee has no
13919 attributes to check for strict alignment.
13920 * doc/extend.texi (AArch64 Function Attributes): Document
13921 no-strict-align.
13922 * doc/invoke.texi: (AArch64 Options): Likewise.
13923
13924 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
13925
13926 PR tree-optimization/85853
13927 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
13928 the handling of the root of the node to...
13929 (vect_slp_analyze_node_operations_1): ...this new function,
13930 and run the whole thing with the child nodes' def types
13931 set according to their SLP node's def type.
13932
13933 2018-05-23 Richard Biener <rguenther@suse.de>
13934
13935 PR middle-end/85874
13936 * tree-data-ref.c (create_runtime_alias_checks): Defer
13937 and ignore overflow warnings.
13938
13939 2018-05-23 Yury Gribov <tetra2005@gmail.com>
13940
13941 PR tree-optimization/85822
13942 * tree-vrp.c (is_masked_range_test): Fix handling of negative
13943 constants.
13944
13945 2018-05-23 Richard Biener <rguenther@suse.de>
13946
13947 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13948 memset constants via native_interpret_expr.
13949
13950 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
13951
13952 PR target/85345
13953 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
13954 attribute.
13955 (cgraph_node::create_alias): Likewise.
13956 (cgraph_node::get_availability): Check ifunc_resolver instead
13957 of looking up ifunc attribute.
13958 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
13959 * varasm.c (do_assemble_alias): Likewise.
13960 (assemble_alias): Likewise.
13961 (default_binds_local_p_3): Likewise.
13962 * cgraph.h (cgraph_node): Add ifunc_resolver.
13963 (cgraph_node::only_called_directly_or_aliased_p): Return false
13964 for IFUNC resolver.
13965 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
13966 attribute.
13967 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
13968 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
13969 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
13970 instead of looking up ifunc attribute.
13971
13972 2018-05-22 Luis Machado <luis.machado@linaro.org>
13973
13974 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
13975
13976 2018-05-22 Martin Sebor <msebor@redhat.com>
13977
13978 PR middle-end/85359
13979 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
13980 only when expasion succeeds.
13981 (expand_builtin_strcmp): Same.
13982 (expand_builtin_strncmp): Same.
13983
13984 2018-05-22 Martin Sebor <msebor@redhat.com>
13985
13986 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
13987
13988 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
13989 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13990
13991 * config/aarch64/aarch64-ldpstp.md: Replace uses of
13992 aarch64_mem_pair_operand with memory_operand and delete operand swapping
13993 code.
13994 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
13995 Add check for legitimate_address.
13996 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
13997 (aarch64_swap_ldrstr_operands): New.
13998 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
13999 Define prototype.
14000
14001 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14002 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14003
14004 * config/aarch64/aarch64.md: New patterns to generate stp
14005 and ldp.
14006 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14007 single words and double words.
14008 (load_pair_sw, load_pair_dw): Likewise.
14009 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14010 Delete.
14011 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14012 Delete.
14013 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14014 for different mode ldpstp and add peephole for merged zero stores.
14015 Likewise for loads.
14016 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14017 Add size check.
14018 (aarch64_gen_store_pair): Rename calls to match new patterns.
14019 (aarch64_gen_load_pair): Rename calls to match new patterns.
14020 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14021 (load_pair<DREG:mode><DREG2:mode>): ... This.
14022 (store_pair<mode>): Rename to...
14023 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14024 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14025 New mode iterators.
14026 (V_INT_EQUIV): Handle SImode.
14027 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14028 New predicate.
14029
14030 2018-05-22 Martin Sebor <msebor@redhat.com>
14031
14032 PR c/85623
14033 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14034 or ajust the presumed bound on an operation to avoid unnecessary
14035 warnings.
14036
14037 2018-05-22 Martin Sebor <msebor@redhat.com>
14038
14039 PR tree-optimization/85826
14040 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14041 assuming that a DECL necesarily has a constant size.
14042
14043 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14044
14045 PR middle-end/85862
14046 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14047
14048 2018-05-22 Richard Biener <rguenther@suse.de>
14049
14050 PR tree-optimization/85834
14051 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14052 non-constant and non-zero memset arguments.
14053
14054 2018-05-22 Martin Liska <mliska@suse.cz>
14055
14056 PR ipa/85607
14057 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14058
14059 2018-05-22 Richard Biener <rguenther@suse.de>
14060
14061 PR tree-optimization/85863
14062 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14063 comparisons when vectype is specified.
14064 (vectorizable_condition): Do not specify vectype for
14065 vect_is_simple_cond when SLP vectorizing.
14066
14067 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14068
14069 PR target/85657
14070 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14071 define __ibm128 as long double.
14072 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14073 as a distinct type when IEEE 128-bit support is enabled.
14074 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14075 128-bit types to use the correct functions.
14076 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14077 convert between 128-bit floating point types that have different
14078 modes but the same representation, instead of using gen_lowpart to
14079 makean alias.
14080 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14081 KFmode.
14082 (IFKF_reg): New attributes to give the register constraints for
14083 IFmode and KFmode.
14084 (extend<mode>tf2_internal): New insns to mark an explicit
14085 conversion between 128-bit floating point types that have a
14086 different mode but share the same representation.
14087
14088 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14089
14090 PR tree-optimization/85814
14091 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14092 a null return from get_strinfo when unsharing the next
14093 strinfo in the chain.
14094
14095 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14096
14097 PR gcc/84923
14098 * varasm.c (weak_finish): Clean up weak_decls.
14099
14100 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14101
14102 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14103 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14104 UNSPEC_UADALP values.
14105 * config/aarch64/iterators.md (ABAL): New int iterator.
14106 (ABDL2): Likewise.
14107 (ADALP): Likewise.
14108 (sur): Add mappings for the above.
14109 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14110 New define_insn.
14111 (aarch64_<sur>abal<mode>_4): Likewise.
14112 (aarch64_<sur>adalp<mode>_3): Likewise.
14113 (<sur>sadv16qi): New define_expand.
14114
14115 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14116
14117 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14118 (*movdf_internal): Ditto.
14119 (*rcpsf2_sse): Ditto.
14120 (*rsqrtsf2_sse): Ditto.
14121 (*sqrt<mode>2_sse): Ditto.
14122
14123 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14124
14125 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14126 eor3q<mode>4.
14127 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14128 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14129 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14130 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14131 vbcaxq_s64): New.
14132 * config/aarch64/arm_neon.h: Likewise.
14133 * config/aarch64/iterators.md (VQ_I): New.
14134
14135 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14136
14137 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14138 arc*-*-linux*.
14139 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14140 MULTILIB_DIRNAMES
14141
14142 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14143
14144 * config/nds32/constraints.md (S): New constraint.
14145 * config/nds32/nds32.md (call_internal): Use constraint S.
14146 (call_value_internal): Likewise.
14147 (sibcall_internal): Likewise.
14148 (sibcall_value_internal): Likewise.
14149
14150 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14151 Chung-Ju Wu <jasonwucj@gmail.com>
14152
14153 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14154 into consideration.
14155
14156 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14157 Chung-Ju Wu <jasonwucj@gmail.com>
14158
14159 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14160 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14161 (nds32_rtx_costs_impl): Simplify.
14162 (nds32_address_cost_impl): Simplify.
14163 (nds32_init_rtx_costs): New function.
14164 (nds32_rtx_costs_speed_prefer): Likewise.
14165 (nds32_rtx_costs_size_prefer): Likewise.
14166 (nds32_address_cost_speed_prefer): Likewise.
14167 (nds32_address_cost_speed_fwprop): Likewise.
14168 (nds32_address_cost_size_prefer): Likewise.
14169 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14170 * config/nds32/nds32.c (nds32_option_override): Use
14171 nds32_init_rtx_costs function.
14172
14173 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14174
14175 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14176 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14177 (TARGET_PIPELINE_N8): Likewise.
14178 (TARGET_PIPELINE_N10): Likewise.
14179 (TARGET_PIPELINE_N13): Likewise.
14180 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14181
14182 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14183
14184 * config/nds32/nds32-fpu.md: Update copyright year.
14185
14186 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14187
14188 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14189
14190 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14191
14192 * config/nds32/nds32.c
14193 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14194 * config/nds32/nds32.opt (minline-asm-r15): New option.
14195
14196 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14197
14198 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14199 MASK_HW_ABS.
14200 * config/nds32/nds32.md (abssi2): New pattern.
14201
14202 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14203
14204 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14205 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14206 Merge insn pattern from sse_cvtsi2ss<round_name> and
14207 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14208 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14209 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14210 using SWI48 mode iterator.
14211 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14212 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14213 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14214 pattern from sse_cvttss2si<round_saeonly_name>
14215 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14216 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14217 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14218 using SWI48 mode iterator.
14219 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14220 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14221 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14222 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14223 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14224 using SWI48 mode iterator.
14225 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14226 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14227 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14228 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14229 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14230 SWI48 mode iterator.
14231 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14232 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14233 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14234 pattern from sse_cvttsd2si<round_saeonly_name>
14235 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14236
14237 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14238
14239 * config/nds32/nds32-md-auxiliary.c
14240 (nds32_valid_smw_lwm_base_p): Refine.
14241 (nds32_output_smw_single_word): Refine.
14242 (nds32_output_smw_double_word): New.
14243 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14244
14245 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14246
14247 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14248 (nds32_output_stack_pop): Refine.
14249 (nds32_expand_unaligned_load): Refine.
14250 (nds32_expand_unaligned_store): Refine.
14251
14252 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14253 Chung-Ju Wu <jasonwucj@gmail.com>
14254
14255 * config/nds32/constants.md: Add TP_REGNUM constant.
14256 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14257 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14258 UNSPEC_ADD32.
14259 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14260 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14261 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14262 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14263 and PIC code generation.
14264 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14265 code generation.
14266 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14267 optimization.
14268 * config/nds32/nds32.md: Support TLS and PIC.
14269 * config/nds32/nds32.c: Support TLS and PIC.
14270 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14271 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14272 predicate.
14273
14274 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14275
14276 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14277 mode with E_ prefix.
14278
14279 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14280 Chung-Ju Wu <jasonwucj@gmail.com>
14281
14282 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14283 * config/nds32/nds32-md-auxiliary.c
14284 (symbolic_reference_mentioned_p): New.
14285 (nds32_legitimize_ict_address): New.
14286 (nds32_expand_ict_move): New.
14287 (nds32_indirect_call_referenced_p): New.
14288 (nds32_symbol_binds_local_p): Delete.
14289 (nds32_long_call_p): Modify.
14290 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14291 * config/nds32/nds32-protos.h
14292 (symbolic_reference_mentioned_p): Declare.
14293 (nds32_legitimize_ict_address): Declare.
14294 (nds32_expand_ict_move): Declare.
14295 (nds32_indirect_call_referenced_p): Declare.
14296 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14297 (nds32_relax_group): Use nds32_ict_const_p as condition.
14298 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14299 (nds32_asm_file_start): Output ict_model directive in asm code.
14300 (nds32_legitimate_address_p): Consider indirect call.
14301 (nds32_print_operand): Consider indirect call.
14302 (nds32_print_operand_address): Consider indirect call.
14303 (nds32_insert_attributes): Handle "indirect_call" attribute.
14304 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14305 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14306 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14307 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14308 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14309 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14310 (TARGET_ICT_MODEL_SMALL): Define.
14311 (TARGET_ICT_MODEL_LARGE): Define.
14312 * config/nds32/nds32.md (movsi): Consider ict model.
14313 (call, call_value): Consider ict model.
14314 (sibcall, sibcall_value): Consider ict model.
14315 * config/nds32/nds32.opt (mict-model): New option.
14316 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14317 model.
14318
14319 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14320 Monk Chiang <sh.chiang04@gmail.com>
14321 Jim Wilson <jimw@sifive.com>
14322
14323 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14324 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14325 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14326 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14327 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14328 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14329 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14330 compute save_libcall_adjustment properly.
14331 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14332 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14333 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14334 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14335 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14336 (ABI_SPEC): Handle mabi=ilp32e.
14337 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14338 (RVE): Add RVE mask.
14339 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14340 <-march>: Add rv32e as an example.
14341
14342 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14343
14344 PR c++/82899
14345 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14346 (intra_create_variable_infos): Handle C++ constructors.
14347
14348 2018-05-18 Martin Liska <mliska@suse.cz>
14349
14350 * passes.def: Remove a redundant pass.
14351
14352 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14353
14354 PR bootstrap/85838
14355 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14356
14357 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14358
14359 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14360 (ARMv4): Update.
14361 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14362 (ARMv6m): Update.
14363 (armv2, armv2a, armv3, armv3m): Delete architectures.
14364 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14365 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14366 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14367 Delete cpus.
14368 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14369 (*mulsidi3adddi): Likewise.
14370 (mulsidi3): Likewise.
14371 (*mulsidi3_nov6): Likewise.
14372 (umulsidi3): Likewise.
14373 (umulsidi3_nov6): Likewise.
14374 (umaddsidi4): Likewise.
14375 (*umulsidi3adddi): Likewise.
14376 (smulsi3_highpart): Likewise.
14377 (*smulsi3_highpart_nov6): Likewise.
14378 (umulsi3_highpart): Likewise.
14379 (*umulsi3_highpart_nov6): Likewise.
14380 * config/arm/arm.h (arm_arch3m): Delete.
14381 * config/arm/arm.c (arm_arch3m): Delete.
14382 (arm_option_override_internal): Update armv3-related comment.
14383 (arm_configure_build_target): Delete use of isa_bit_mode32.
14384 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14385 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14386 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14387 (mulsa3): Likewise.
14388 (mulusa3): Likewise.
14389 * config/arm/arm-protos.h (arm_arch3m): Delete.
14390 * config/arm/arm-tables.opt: Regenerate.
14391 * config/arm/arm-tune.md: Likewise.
14392 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14393 deleted architectures.
14394
14395 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14396
14397 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14398 (armv5t, armv5te): New features.
14399 (ARMv5, ARMv5e): Delete fgroups.
14400 (ARMv5t, ARMv5te): Adjust for above changes.
14401 (ARMv6m): Likewise.
14402 (armv5, armv5e): Delete arches.
14403 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14404 arm_arch5.
14405 (*call_reg_arm): Likewise.
14406 (*call_value_reg_armv5): Likewise.
14407 (*call_value_reg_arm): Likewise.
14408 (*call_symbol): Likewise.
14409 (*call_value_symbol): Likewise.
14410 (*sibcall_insn): Likewise.
14411 (*sibcall_value_insn): Likewise.
14412 (clzsi2): Likewise.
14413 (prefetch): Likewise.
14414 (define_split and define_peephole2 dependent on arm_arch5):
14415 Likewise.
14416 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14417 arm_arch5e.
14418 (TARGET_ARM_QBIT): Likewise.
14419 (TARGET_DSP_MULTIPLY): Likewise.
14420 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14421 (arm_arch5, arm_arch5e): Delete.
14422 (arm_arch5t, arm_arch5te): Declare.
14423 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14424 (arm_arch5t): Declare.
14425 (arm_option_reconfigure_globals): Update for the above.
14426 (arm_options_perform_arch_sanity_checks): Update comment, replace
14427 use of arm_arch5 with arm_arch5t.
14428 (use_return_insn): Likewise.
14429 (arm_emit_call_insn): Likewise.
14430 (output_return_instruction): Likewise.
14431 (arm_final_prescan_insn): Likewise.
14432 (arm_coproc_builtin_available): Likewise.
14433 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14434 arm_arch5e with arm_arch5t and arm_arch5te.
14435 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14436 (arm_arch5t, arm_arch5te): Declare.
14437 * config/arm/arm-tables.opt: Regenerate.
14438 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14439 * config/arm/t-multilib: Likewise.
14440 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14441 instead of arm_arch5.
14442 (*call_reg_thumb1): Likewise.
14443 (*call_value_reg_thumb1_v5): Likewise.
14444 (*call_value_reg_thumb1): Likewise.
14445 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14446 unreachable path.
14447 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14448
14449 2018-05-18 Martin Liska <mliska@suse.cz>
14450
14451 PR gcov-profile/84846
14452 * doc/gcov.texi: Document -t option of gcov tool.
14453
14454 2018-05-18 Martin Liska <mliska@suse.cz>
14455
14456 PR gcov-profile/84846
14457 * gcov.c (print_usage): Add new -t option.
14458 (process_args): Handle the option.
14459 (generate_results): Use stdout as output when requested by
14460 the option.
14461
14462 2018-05-18 Martin Liska <mliska@suse.cz>
14463
14464 PR gcov-profile/84846
14465 * coverage.c (coverage_init): Write PWD to .gcno file.
14466 * doc/gcov.texi: Document how working directory is printed.
14467 * gcov-dump.c (dump_gcov_file): Print PWD.
14468 * gcov.c (output_intermediate_file): Likewise.
14469 (read_graph_file): Read PWD string.
14470 (output_lines): Print PWD.
14471
14472 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14473
14474 PR middle-end/85817
14475 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14476 for retval and return false if all args to phi are zero.
14477
14478 2018-05-18 Richard Biener <rguenther@suse.de>
14479
14480 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14481 method.
14482 (evrp_dom_walker::before_dom_children): Call it.
14483
14484 2018-05-18 Richard Biener <rguenther@suse.de>
14485
14486 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14487 results when processing array refs with variable index.
14488
14489 2018-05-18 Toon Moene <toon@moene.org>
14490
14491 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14492 directly after that of -floop-interchange. Indicate that both
14493 options are enabled by default when specifying -O3.
14494
14495 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14496
14497 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14498 iterator. Delete separate integer-mode vec_set<mode> expander.
14499 (aarch64_simd_vec_setv2di): Delete.
14500 (vec_setv2di): Delete.
14501 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14502 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
14503 the "w, r" alternative.
14504
14505 2018-05-18 Martin Liska <mliska@suse.cz>
14506
14507 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14508 * tree-pass.h (make_pass_lower_switch_O0): New function.
14509 * tree-switch-conversion.c (node_has_low_bound): Remove.
14510 (node_has_high_bound): Likewise.
14511 (node_is_bounded): Likewise.
14512 (class pass_lower_switch): Make it a template type and create
14513 two instances.
14514 (pass_lower_switch::execute): Add template argument.
14515 (make_pass_lower_switch): New function.
14516 (make_pass_lower_switch_O0): New function.
14517 (do_jump_if_equal): Remove.
14518 (emit_case_nodes): Simplify to just handle all 3 cases and leave
14519 all the hard work to tree optimization passes.
14520
14521 2018-05-18 Martin Liska <mliska@suse.cz>
14522
14523 * dbgcnt.c (limit_low): Renamed from limit.
14524 (limit_high): New variable.
14525 (dbg_cnt_is_enabled): Check for upper limit.
14526 (dbg_cnt): Adjust dumping.
14527 (dbg_cnt_set_limit_by_index): Add new argument for high
14528 value.
14529 (dbg_cnt_set_limit_by_name): Likewise.
14530 (dbg_cnt_process_single_pair): Parse new format.
14531 (dbg_cnt_process_opt): Use strtok.
14532 (dbg_cnt_list_all_counters): Remove 'value' and add
14533 'limit_high'.
14534 * doc/invoke.texi: Document changes.
14535
14536 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
14537
14538 * doc/sourcebuild.texi (scalar_all_fma): Document.
14539 * tree.def (FMA_EXPR): Delete.
14540 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14541 * internal-fn.c (ternary_direct): New macro.
14542 (expand_ternary_optab_fn): Likewise.
14543 (direct_ternary_optab_supported_p): Likewise.
14544 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14545 * builtins.c (fold_builtin_fma): Delete.
14546 (fold_builtin_3): Don't call it.
14547 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14548 * expr.c (expand_expr_real_2): Likewise.
14549 * fold-const.c (operand_equal_p): Likewise.
14550 (fold_ternary_loc): Likewise.
14551 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14552 * gimple.c (DEFTREECODE): Likewise.
14553 * gimplify.c (gimplify_expr): Likewise.
14554 * optabs-tree.c (optab_for_tree_code): Likewise.
14555 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14556 * tree-eh.c (operation_could_trap_p): Likewise.
14557 (stmt_could_throw_1_p): Likewise.
14558 * tree-inline.c (estimate_operator_cost): Likewise.
14559 * tree-pretty-print.c (dump_generic_node): Likewise.
14560 (op_code_prio): Likewise.
14561 * tree-ssa-loop-im.c (stmt_cost): Likewise.
14562 * tree-ssa-operands.c (get_expr_operands): Likewise.
14563 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14564 * fold-const-call.h (fold_fma): Delete.
14565 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14566 CFN_FNMA and CFN_FNMS.
14567 (fold_fma): Delete.
14568 * genmatch.c (combined_fn): New enum.
14569 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14570 (commutative_op): New function.
14571 (commutate): Use it. Handle more than 2 operands.
14572 (dt_operand::gen_gimple_expr): Use commutative_op.
14573 (parser::parse_expr): Allow :c to be used with non-binary
14574 operators if the commutative operand is known.
14575 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14576 CFN_FMS, CFN_FNMA and CFN_FNMS.
14577 (backprop::process_assign_use): Remove FMA_EXPR handling.
14578 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14579 (gen_hsa_fma): New function.
14580 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14581 IFN_FNMA and IFN_FNMS.
14582 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14583 * gimple-fold.h (follow_all_ssa_edges): Declare.
14584 * gimple-fold.c (follow_all_ssa_edges): New function.
14585 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14586 gimple_build interface and use follow_all_ssa_edges to fold the result.
14587 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14588 instead of checking for optabs directly.
14589 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14590 rather than FMA_EXPRs.
14591 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14592 call to IFN_FMA instead of an FMA_EXPR.
14593
14594 2018-05-17 Jim Wilson <jimw@sifive.com>
14595
14596 * expr.c (do_tablejump): When converting index to Pmode, if we have a
14597 sign extended promoted subreg, and the range does not have the sign bit
14598 set, then do a sign extend.
14599
14600 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14601 test, check for sign extended subreg and/or constant operands, and
14602 do a sign extend in that case.
14603
14604 2018-05-17 Steve Ellcey <sellcey@cavium.com>
14605
14606 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14607 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14608 Add untyped.
14609 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14610 Change logics_shift_reg to logics_shift_imm.
14611 (thunderx2t99_fp_loadpair_basic): Delete.
14612 (thunderx2t99_fp_storepair_basic): Delete.
14613 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14614 (thunderx2t99_asimd_polynomial): Delete.
14615 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14616 and neon_fp_mul_d_scalar_q.
14617 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14618 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14619 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14620 (thunderx2t99_asimd_lut): Add missing tbl types.
14621 (thunderx2t99_asimd_ext): Delete.
14622 (thunderx2t99_asimd_load1_1_mult): Delete.
14623 (thunderx2t99_asimd_load1_2_mult): Delete.
14624 (thunderx2t99_asimd_load1_ldp): New.
14625 (thunderx2t99_asimd_load1): New.
14626 (thunderx2t99_asimd_load2): Add missing *load2* types.
14627 (thunderx2t99_asimd_load3): New.
14628 (thunderx2t99_asimd_load4): New.
14629 (thunderx2t99_asimd_store1_1_mult): Delete.
14630 (thunderx2t99_asimd_store1_2_mult): Delete.
14631 (thunderx2t99_asimd_store2_mult): Delete.
14632 (thunderx2t99_asimd_store2_onelane): Delete.
14633 (thunderx2t99_asimd_store_stp): New.
14634 (thunderx2t99_asimd_store1): New.
14635 (thunderx2t99_asimd_store2): New.
14636 (thunderx2t99_asimd_store3): New.
14637 (thunderx2t99_asimd_store4): New.
14638
14639 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
14640
14641 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14642 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
14643
14644 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
14645 Segher Boessenkool <segher@kernel.crashing.org>
14646
14647 PR target/85698
14648 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14649 operand.
14650
14651 2018-05-17 Richard Biener <rguenther@suse.de>
14652
14653 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14654 for pruning loop and prune defs feeding only already visited PHIs.
14655
14656 2018-05-17 Richard Biener <rguenther@suse.de>
14657
14658 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14659
14660 2018-05-17 Bin Cheng <bin.cheng@arm.com>
14661 Richard Biener <rguenther@suse.de>
14662
14663 PR tree-optimization/85793
14664 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14665 for VMAT_ELEMENTWISE.
14666
14667 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14668
14669 * internal-fn.h (lookup_internal_fn): Declare
14670 * internal-fn.c (lookup_internal_fn): New function.
14671 * gimple.c (gimple_build_call_from_tree): Handle calls to
14672 internal functions.
14673 * gimple-pretty-print.c (dump_gimple_call): Print "." before
14674 internal function names.
14675 * tree-pretty-print.c (dump_generic_node): Likewise.
14676 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14677
14678 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14679
14680 * gimple-fold.h (gimple_build): Make the function forms take
14681 combined_fn rather than built_in_function.
14682 (gimple_simplify): Likewise.
14683 * gimple-match-head.c (gimple_simplify): Likewise.
14684 * gimple-fold.c (gimple_build): Likewise.
14685 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14686 rather than gimple_build_call_internal.
14687 (get_initial_defs_for_reduction): Likewise.
14688 (vect_create_epilog_for_reduction): Likewise.
14689 (vectorizable_live_operation): Likewise.
14690
14691 2018-05-17 Martin Liska <mliska@suse.cz>
14692
14693 * gimple-ssa-sprintf.c (format_directive): Do not use
14694 space in between 'G_' and '('.
14695
14696 2018-05-17 Jakub Jelinek <jakub@redhat.com>
14697
14698 PR target/85323
14699 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14700 even if the mask is not all ones.
14701
14702 PR target/85323
14703 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14704 vector.
14705 (ix86_gimple_fold_builtin): Likewise.
14706
14707 PR target/85323
14708 * config/i386/i386.c: Include tree-vector-builder.h.
14709 (ix86_vector_shift_count): New function.
14710 (ix86_fold_builtin): Fold shift builtins by scalar count.
14711 (ix86_gimple_fold_builtin): Likewise.
14712
14713 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14714 _mm512_setzero): New intrinsics.
14715
14716 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
14717 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14718
14719 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14720 code generation for cases where splatting a value is not useful.
14721 * simplify-rtx.c (simplify_ternary_operation): Simplify
14722 vec_merge across a vec_duplicate and a paradoxical subreg forming
14723 a vector mode to a vec_concat.
14724
14725 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
14726
14727 * config.gcc: Support "goldmont-plus".
14728 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14729 "goldmont-plus".
14730 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14731 PROCESSOR_GOLDMONT_PLUS.
14732 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14733 (processor_target_table): Add "goldmont-plus".
14734 (PTA_GOLDMONT_PLUS): Define.
14735 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14736 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14737 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14738 (fold_builtin_cpu): Add "goldmont-plus".
14739 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14740 (ix86_option_override_internal): Add "goldmont-plus".
14741 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14742 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14743 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14744 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14745
14746 2018-05-17 Richard Biener <rguenther@suse.de>
14747
14748 PR tree-optimization/85757
14749 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14750 remove defs that only feed that PHI from further processing.
14751
14752 2018-05-16 Jim Wilson <jimw@sifive.com>
14753
14754 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14755 asterisk to name.
14756 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14757
14758 2018-05-16 Mark Wielaard <mark@klomp.org>
14759
14760 * dwarf2out.c (count_index_strings): New function.
14761 (output_indirect_strings): Call count_index_strings and generate
14762 header for dwarf_version >= 5.
14763
14764 2018-05-16 Mark Wielaard <mark@klomp.org>
14765
14766 * dwarf2out.c (dwarf_FORM): New function.
14767 (set_indirect_string): Use dwarf_FORM.
14768 (reset_indirect_string): Likewise.
14769 (size_of_die): Likewise.
14770 (value_format): Likewise.
14771 (output_die): Likewise.
14772 (add_skeleton_AT_string): Likewise.
14773 (output_macinfo_op): Likewise.
14774 (index_string): Likewise.
14775 (output_index_string_offset): Likewise.
14776 (output_index_string): Likewise.
14777 (count_index_strings): Likewise.
14778
14779 2018-05-16 Carl Love <cel@us.ibm.com>
14780
14781 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14782 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
14783
14784 2018-05-16 Martin Jambor <mjambor@suse.cz>
14785
14786 * ipa-prop.c (ipa_free_all_edge_args): Remove.
14787 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
14788
14789 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
14790
14791 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
14792 (fnma<mode>4): Likewise.
14793 (fms<mode>4): Likewise.
14794 (fnms<mode>4): Likewise.
14795 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
14796 (aarch64_fnma<mode>4): Likewise.
14797 (aarch64_fms<mode>4): Likewise.
14798 (aarch64_fnms<mode>4): Likewise.
14799 (aarch64_fnmadd<mode>4): Likewise.
14800
14801 2018-05-16 Jason Merrill <jason@redhat.com>
14802
14803 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
14804
14805 2018-05-16 Richard Biener <rguenther@suse.de>
14806
14807 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
14808 (dump_stmt_cost): Declare.
14809 (add_stmt_cost): Dump cost we add.
14810 (add_stmt_costs): New function.
14811 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
14812 No longer exported.
14813 (vect_analyze_stmt): Adjust prototype.
14814 (vectorizable_condition): Likewise.
14815 (vectorizable_live_operation): Likewise.
14816 (vectorizable_reduction): Likewise.
14817 (vectorizable_induction): Likewise.
14818 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
14819 cost vector to pass to vectorizable_ and record afterwards.
14820 (vect_model_reduction_cost): Take cost vector argument and adjust.
14821 (vect_model_induction_cost): Likewise.
14822 (vectorizable_reduction): Likewise.
14823 (vectorizable_induction): Likewise.
14824 (vectorizable_live_operation): Likewise.
14825 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
14826 SLP_TREE_NUMBER_OF_VEC_STMTS.
14827 (vect_analyze_slp_cost_1): Remove.
14828 (vect_analyze_slp_cost): Likewise.
14829 (vect_slp_analyze_node_operations): Take visited args and
14830 a target cost vector. Avoid processing already visited stmt sets.
14831 (vect_slp_analyze_operations): Use a local cost vector to gather
14832 costs and register those of non-discarded instances.
14833 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
14834 (vect_schedule_slp_instance): Remove copying of
14835 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
14836 zero.
14837 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
14838 adding cost. Record cost entry location.
14839 (vect_prologue_cost_for_slp_op): Function to compute cost of
14840 a constant or invariant generated for SLP vect in the prologue,
14841 split out from vect_analyze_slp_cost_1.
14842 (vect_model_simple_cost): Make static. Adjust for SLP costing.
14843 (vect_model_promotion_demotion_cost): Likewise.
14844 (vect_model_store_cost): Likewise, make static.
14845 (vect_model_load_cost): Likewise.
14846 (vectorizable_bswap): Add cost vector arg and adjust.
14847 (vectorizable_call): Likewise.
14848 (vectorizable_simd_clone_call): Likewise.
14849 (vectorizable_conversion): Likewise.
14850 (vectorizable_assignment): Likewise.
14851 (vectorizable_shift): Likewise.
14852 (vectorizable_operation): Likewise.
14853 (vectorizable_store): Likewise.
14854 (vectorizable_load): Likewise.
14855 (vectorizable_condition): Likewise.
14856 (vectorizable_comparison): Likewise.
14857 (can_vectorize_live_stmts): Likewise.
14858 (vect_analyze_stmt): Likewise.
14859 (vect_transform_stmt): Adjust calls to vectorizable_*.
14860 * tree-vectorizer.c: Include gimple-pretty-print.h.
14861 (dump_stmt_cost): New function.
14862
14863 2018-05-16 Richard Biener <rguenther@suse.de>
14864
14865 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
14866 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
14867 * tree-ssa-dse.c: Include tree-ssa-loop.h.
14868 (check_name): New callback.
14869 (dse_classify_store): Track cycles via a visited bitmap of PHI
14870 defs and simplify handling of in-loop and across loop dead stores
14871 and properly fail for loop-variant refs. Handle byte-tracking with
14872 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
14873 limiting the walk.
14874
14875 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
14876
14877 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
14878 (vect_get_mask_type_for_stmt): Likewise.
14879 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
14880 split out from...
14881 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
14882 to determine the statement's vector type and the vector type that
14883 should be used for calculating nunits. Deal with cases in which
14884 the type has to be deferred.
14885 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
14886 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
14887 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
14888 (vect_determine_vf_for_stmt): New functions, split out from...
14889 (vect_determine_vectorization_factor): ...here.
14890 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
14891 (vect_get_mask_type_for_stmt): New functions, split out from
14892 vect_determine_vectorization_factor.
14893
14894 2018-05-16 Richard Biener <rguenther@suse.de>
14895
14896 * tree-cfg.c (verify_gimple_assign_ternary): Properly
14897 verify the [VEC_]COND_EXPR embedded comparison.
14898
14899 2018-05-15 Martin Sebor <msebor@redhat.com>
14900
14901 PR tree-optimization/85753
14902 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
14903 RECORD_TYPE in addition to ARRAY_TYPE.
14904
14905 2018-05-15 Martin Sebor <msebor@redhat.com>
14906
14907 PR middle-end/85643
14908 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
14909
14910 2018-05-15 Richard Biener <rguenther@suse.de>
14911
14912 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
14913 add by_clobber_p one. Change algorithm to collect all defs
14914 representing uses we need to walk and try reducing them to
14915 a single one before failing.
14916 (dse_dom_walker::dse_optimize_stmt): Adjust.
14917
14918 2018-05-13 Mark Wielaard <mark@klomp.org>
14919
14920 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
14921 (size_of_loc_descr): Likewise.
14922 (output_loc_operands): Likewise.
14923 (output_loc_operands_raw): Likewise.
14924 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
14925 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
14926 (hash_loc_operands): Likewise.
14927 (compare_loc_operands): Likewise.
14928
14929 2018-05-14 Mark Wielaard <mark@klomp.org>
14930
14931 * dwarf2out.c (count_index_addrs): New function.
14932 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
14933
14934 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14935
14936 PR tree-optimization/83648
14937 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
14938 return value as malloc candidate.
14939
14940 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14941
14942 PR ipa/85734
14943 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
14944 param as true in call to suggest_attribute.
14945
14946 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
14947
14948 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
14949 -mreadonly-in-sdata.
14950
14951 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14952
14953 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
14954 New pattern.
14955 (aarch64_crypto_aesd_fused): Likewise.
14956
14957 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
14958
14959 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
14960 (movsi_aarch64): Likewise.
14961 (load_pairsi): Likewise.
14962 (load_pairdi): Likewise.
14963 (store_pairsi): Likewise.
14964 (store_pairdi): Likewise.
14965 (load_pairsf): Likewise.
14966 (load_pairdf): Likewise.
14967 (store_pairsf): Likewise.
14968 (store_pairdf): Likewise.
14969 (zero_extend): Likewise.
14970 (trunc): Swap alternatives.
14971 (fcvt_target): Add '?' to prefer w over r.
14972
14973 2018-05-14 Jakub Jelinek <jakub@redhat.com>
14974
14975 PR target/85756
14976 * config/i386/i386.md: Disallow non-commutative arithmetics in
14977 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
14978 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
14979 in the peephole2 before it.
14980
14981 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
14982
14983 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
14984 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
14985 (ix86_handle_option): Handle -mcldemote.
14986 * config.gcc: New header.
14987 * config/i386/cldemoteintrin.h: New file.
14988 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
14989 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14990 -mcldemote.
14991 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14992 OPTION_MASK_ISA_CLDEMOTE.
14993 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
14994 (ix86_valid_target_attribute_inner_p): Ditto.
14995 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
14996 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
14997 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
14998 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
14999 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15000 (cldemote): New.
15001 * config/i386/i386.opt: Add -mcldemote.
15002 * config/i386/x86intrin.h: New header.
15003 * doc/invoke.texi: Add -mcldemote.
15004
15005 2018-05-14 Richard Biener <rguenther@suse.de>
15006
15007 * doc/match-and-simplify.texi: Adjust :s documentation.
15008
15009 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15010
15011 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15012 intended memcpy size.
15013 (REORDER_45): Likewise.
15014
15015 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15016
15017 * sort.cc: New file.
15018 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15019 * vec.c (qsort_chk): Use gcc_qsort.
15020 * Makefile.in (OBJS-libcommon): Add sort.o.
15021 (build/sort.o): New target. Use it...
15022 (BUILD_RTL): ... here, and...
15023 (build/gencfn-macros): ... here, and...
15024 (build/genmatch): ... here.
15025
15026 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15027 Chung-Ju Wu <jasonwucj@gmail.com>
15028
15029 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15030 * config/nds32/nds32-graywolf.md: New file.
15031 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15032 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15033 pipeline.
15034 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15035 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15036 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15037 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15038 * config/nds32/pipelines.md: Include n15 settings.
15039
15040 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15041 Chung-Ju Wu <jasonwucj@gmail.com>
15042
15043 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15044 * config/nds32/nds32-n13.md: New file.
15045 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15046 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15047 pipeline.
15048 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15049 * config/nds32/nds32.md (pipeline_model): Add n13.
15050 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15051 * config/nds32/pipelines.md: Include n13 settings.
15052
15053 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15054 Chung-Ju Wu <jasonwucj@gmail.com>
15055
15056 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15057 * config/nds32/nds32-n10.md: New file.
15058 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15059 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15060 pipeline.
15061 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15062 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15063 * config/nds32/nds32.md (pipeline_model): Add n10.
15064 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15065 * config/nds32/pipelines.md: Include n10 settings.
15066
15067 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15068 Kito Cheng <kito.cheng@gmail.com>
15069 Chung-Ju Wu <jasonwucj@gmail.com>
15070
15071 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15072 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15073 Add enum values for DSP extension instructions.
15074 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15075 New constraints.
15076 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15077 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15078 New code iterators.
15079 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15080 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15081 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15082 * config/nds32/nds32-intrinsic.md: Likewise.
15083 * config/nds32/nds32_intrinsic.h: Likewise.
15084 * config/nds32/nds32-md-auxiliary.c: Likewise.
15085 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15086 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15087 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15088 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15089 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15090 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15091 TYPE_DMAC in switch statement.
15092 * config/nds32/nds32.c: New checking and implementation for DSP
15093 extension instructions.
15094 * config/nds32/nds32.h: Likewise.
15095 * config/nds32/nds32.md: Likewise.
15096 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15097 * config/nds32/predicates.md: Implement new predicates for DSP
15098 extension.
15099
15100 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15101
15102 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15103 Reformat alternatives and attributes so it is easier to identify
15104 which constraints/attributes go with which instruction.
15105 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15106 (mov<mode>_softfloat32, FMOVE64): Likewise.
15107 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15108 (mov<mode>_softfloat64, FMOVE64): Likewise.
15109
15110 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15111
15112 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15113 subsection.
15114 (Basic PowerPC Built-in Functions): The new name of the
15115 subsection previously known as "PowerPC Built-in Functions".
15116 (Basic PowerPC Built-in Functions Available on all Configurations):
15117 New subsubsection.
15118 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15119 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15120 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15121 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15122
15123 2018-05-11 Martin Jambor <mjambor@suse.cz>
15124
15125 PR ipa/85655
15126 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15127 single const.
15128
15129 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15130
15131 PR target/85733
15132 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15133
15134 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15135
15136 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15137 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15138 (ix86_handle_option): Handle -mwaitpkg.
15139 * config.gcc: New header.
15140 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15141 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15142 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15143 function type.
15144 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15145 OPTION_MASK_ISA_WAITPKG.
15146 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15147 (ix86_option_override_internal): Add PTA_WAITPKG.
15148 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15149 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15150 IX86_BUILTIN_TPAUSE.
15151 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15152 __builtin_ia32_umwait and __builtin_ia32_tpause.
15153 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15154 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15155 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15156 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15157 UNSPECV_TPAUSE): New.
15158 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15159 * config/i386/i386.opt: Add -mwaitpkg.
15160 * config/i386/waitpkgintrin.h: New file.
15161 * config/i386/x86intrin.h: New header.
15162 * doc/invoke.texi: Add -mwaitpkg.
15163
15164 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15165
15166 PR target/85606
15167 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15168 equivalent.
15169 (cortex-m0): Use armv6s-m isa.
15170 (cortex-m0plus): Likewise.
15171 (cortex-m1): Likewise.
15172 (cortex-m0.small-multiply): Likewise.
15173 (cortex-m0plus.small-multiply): Likewise.
15174 (cortex-m1.small-multiply): Likewise.
15175
15176 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15177 Jakub Jelinek <jakub@redhat.com>
15178
15179 PR tree-optimization/85692
15180 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15181 source permute as well.
15182
15183 2018-05-11 Martin Liska <mliska@suse.cz>
15184
15185 PR sanitizer/85556
15186 * doc/extend.texi: Document LLVM style format for no_sanitize
15187 attribute.
15188
15189 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15190
15191 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15192 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15193 (mode_supports_vsx_dform_quad): Likewise.
15194 (mode_supports_vmx_dform): Move these functions to be next to the
15195 other mode_supports functions.
15196 (mode_supports_dq_form): Likewise.
15197 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15198 mode_supports_dq_form.
15199 (reg_offset_addressing_ok_p): Likewise.
15200 (offsettable_ok_by_alignment): Likewise.
15201 (rs6000_legitimate_offset_address_p): Likewise.
15202 (legitimate_lo_sum_address_p): Likewise.
15203 (rs6000_legitimize_address): Likewise.
15204 (rs6000_legitimize_reload_address): Likewise.
15205 (rs6000_secondary_reload_inner): Likewise.
15206 (rs6000_preferred_reload_class): Likewise.
15207 (rs6000_output_move_128bit): Likewise.
15208
15209 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15210
15211 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15212 Generate SImode target register for null target.
15213 <case IX86_BUILTIN_XGETBV>: Ditto.
15214 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15215 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15216
15217 2018-05-10 Carl Love <cel@us.ibm.com>
15218
15219 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15220 dcbtt and dcbtstt if operands[2] is 0.
15221
15222 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15223
15224 PR target/85693
15225 * config/i386/sse.md (usadv64qi): New expander.
15226
15227 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15228
15229 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15230 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15231 -maltivec=be support.
15232 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15233 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15234 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15235 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15236 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15237 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15238 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15239 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15240 altivec_vsumsws): Adjust.
15241 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15242 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15243 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15244 support.
15245 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15246 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15247 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15248 (altivec_lve<VI_char>x): Delete expand.
15249 (*altivec_lve<VI_char>x_internal): Rename to...
15250 (altivec_lve<VI_char>x): ... this.
15251 (altivec_lvxl_<mode>): Delete expand.
15252 (*altivec_lvxl_<mode>_internal): Rename to ...
15253 (altivec_lvxl_<mode>): ... this.
15254 (altivec_stvxl_<mode>): Delete expand.
15255 (*altivec_stvxl_<mode>_internal): Rename to ...
15256 (altivec_stvxl_<mode>): ... this.
15257 (altivec_stve<VI_char>x): Delete expand.
15258 (*altivec_stve<VI_char>x_internal): Rename to ...
15259 (altivec_stve<VI_char>x): ... this.
15260 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15261 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15262 reduc_plus_scal_<mode>): Adjust.
15263 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15264 comment.
15265 (rs6000_cpu_cpp_builtins): Adjust.
15266 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15267 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15268 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15269 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15270 -maltivec=be support.
15271 (rs6000_split_vec_extract_var): Adjust.
15272 (rs6000_split_v4si_init): Adjust.
15273 (swap_selector_for_mode): Delete.
15274 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15275 altivec_expand_stvex_be): Delete.
15276 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15277 -maltivec=be support.
15278 (rs6000_gimple_fold_builtin): Ditto.
15279 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15280 Adjust.
15281 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15282 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15283 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15284 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15285 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15286 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15287 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15288 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15289 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15290 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15291 anonymous split): Adjust.
15292 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15293 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15294
15295 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15296
15297 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15298 when --with-gxx-include-dir is also specified.
15299 * configure: Regenerate.
15300
15301 2018-05-09 Jim Wilson <jimw@sifive.com>
15302
15303 PR target/84797
15304 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15305 * config/riscv/t-withmultilib: New.
15306 * config/riscv/withmultilib.h: New.
15307 * doc/install.texi: Document RISC-V --with-multilib-list support.
15308
15309 2018-05-09 Richard Biener <rguenther@suse.de>
15310
15311 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15312 vector.
15313 (vect_bb_vectorization_profitable_p): Adjust. Compute
15314 actual scalar cost using the cost vector and the add_stmt_cost
15315 machinery.
15316
15317 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15318
15319 PR rtl-optimization/85645
15320 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15321 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15322
15323 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15324
15325 PR rtl-optimization/85645
15326 * shrink-wrap.c (spread_components): Return a boolean saying if
15327 anything was changed.
15328 (try_shrink_wrapping_separate): Iterate spread_components until
15329 nothing changes anymore.
15330
15331 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15332
15333 PR rtl-optimization/85645
15334 * regrename.c (build_def_use): Also kill the chains that include the
15335 destination of a REG_CFA_REGISTER note.
15336
15337 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15338
15339 PR rtl-optimization/85645
15340 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15341 insn that has a REG_CFA_REGISTER note.
15342
15343 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15344
15345 * cfgexpand.c (expand_clobber): New function.
15346 (expand_gimple_stmt_1): Use it.
15347 * tree-vect-stmts.c (vect_clobber_variable): New function,
15348 split out from...
15349 (vectorizable_simd_clone_call): ...here.
15350 (vectorizable_store): Emit a clobber either side of an
15351 IFN_STORE_LANES sequence.
15352 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15353
15354 2018-05-09 Tom de Vries <tom@codesourcery.com>
15355
15356 PR target/85626
15357 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15358 (define_insn "trap_if_false"): Add exit after trap.
15359
15360 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15361
15362 PR rtl-optimization/85638
15363 * bb-reorder.c: Include common/common-target.h.
15364 (create_forwarder_block): New function extracted from...
15365 (fix_up_crossing_landing_pad): ...here. Rename into...
15366 (dw2_fix_up_crossing_landing_pad): ...this.
15367 (sjlj_fix_up_crossing_landing_pad): New function.
15368 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15369 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15370 from both partitions and exit the loop after one iteration.
15371
15372 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15373
15374 Revert:
15375 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15376 subsection.
15377 (Basic PowerPC Built-in Functions): The new name of the
15378 subsection previously known as "PowerPC Built-in Functions".
15379 (Basic PowerPC Built-in Functions Available on all Configurations):
15380 New subsubsection.
15381 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15382 subsubsection.
15383 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15384 subsubsection.
15385 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15386 subsubsection.
15387 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15388 subsubsection.
15389
15390 2018-05-08 Jim Wilson <jimw@sifive.com>
15391
15392 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15393 (LD_EMUL_SUFFIX): New.
15394 (LINK_SPEC): Use it.
15395
15396 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15397
15398 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15399 subsection.
15400 (Basic PowerPC Built-in Functions): The new name of the
15401 subsection previously known as "PowerPC Built-in Functions".
15402 (Basic PowerPC Built-in Functions Available on all Configurations):
15403 New subsubsection.
15404 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15405 subsubsection.
15406 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15407 subsubsection.
15408 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15409 subsubsection.
15410 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15411 subsubsection.
15412
15413 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15414
15415 PR target/85683
15416 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15417 after cmpelim optimization.
15418
15419 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15420
15421 * config.gcc: Support "goldmont".
15422 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15423 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15424 PROCESSOR_GOLDMONT.
15425 * config/i386/i386.c (m_GOLDMONT): Define.
15426 (processor_target_table): Add "goldmont".
15427 (PTA_GOLDMONT): Define.
15428 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15429 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15430 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15431 (fold_builtin_cpu): Add "goldmont".
15432 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15433 (ix86_option_override_internal): Add "goldmont".
15434 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15435 (processor_type): Add PROCESSOR_GOLDMONT.
15436 * config/i386/i386.md: Add CPU "glm".
15437 * config/i386/glm.md: New file.
15438 * config/i386/x86-tune.def: Add m_GOLDMONT.
15439 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15440
15441 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15442
15443 PR target/85572
15444 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15445 E_V4DImode.
15446 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15447 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
15448 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
15449
15450 PR target/85317
15451 * config/i386/i386.c (ix86_fold_builtin): Handle
15452 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15453
15454 PR target/85480
15455 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15456 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15457
15458 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
15459
15460 PR target/85658
15461 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15462 (check_arch): Likewise.
15463 (check_fpu): Return the result rather than printing it.
15464 (end arch): Fix operator precedence.
15465 (end cpu): Likewise.
15466 (END): Print the result from check_fpu.
15467
15468 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15469 Alan Hayward <alan.hayward@arm.com>
15470 David Sherwood <david.sherwood@arm.com>
15471
15472 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15473 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15474 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15475 (*fcmuo<mode>_and): New patterns.
15476
15477 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15478
15479 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15480 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15481 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15482 (cmp_op, sve_imm_con): New code attributes.
15483 (SVE_COND_INT_CMP, imm_con): Delete.
15484 (cmp_op): Remove above unspecs from int attribute.
15485 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15486 to...
15487 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
15488 comparison-specific unspecs.
15489 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15490 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15491 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15492 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15493 (*vec_fcm<cmp_op><mode>): Rename to...
15494 (*fcm<cmp_op><mode>): ...this and adjust likewise.
15495 (*vec_fcmuo<mode>): Rename to...
15496 (*fcmuo<mode>): ...this and adjust likewise.
15497 (*pred_fcm<cmp_op><mode>): New pattern.
15498 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15499 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15500 functions.
15501 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15502 and UNORDERED.
15503 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15504 (aarch64_emit_sve_predicated_cond): New function.
15505 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15506 (aarch64_emit_unspec_cond_or): Replace with...
15507 (aarch64_emit_sve_or_conds): ...this new function. Use
15508 aarch64_emit_sve_ptrue_op for the individual comparisons and
15509 aarch64_emit_binop to OR them together.
15510 (aarch64_emit_inverted_unspec_cond): Replace with...
15511 (aarch64_emit_sve_inverted_cond): ...this new function. Use
15512 aarch64_emit_sve_ptrue_op for the comparison and
15513 aarch64_emit_unop to invert the result.
15514 (aarch64_expand_sve_vec_cmp_float): Update after the above
15515 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
15516
15517 2018-05-07 Nathan Sidwell <nathan@acm.org>
15518
15519 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15520 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15521 (Backwards Compatibility): Likewise.
15522
15523 2018-05-07 Luis Machado <luis.machado@linaro.org>
15524
15525 PR bootstrap/85681
15526 Revert:
15527 2018-05-07 Luis Machado <luis.machado@linaro.org>
15528
15529 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15530 <prefetch_dynamic_strides>: New const bool field.
15531 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15532 prefetch_dynamic_strides.
15533 (exynosm1_prefetch_tune): Likewise.
15534 (thunderxt88_prefetch_tune): Likewise.
15535 (thunderx_prefetch_tune): Likewise.
15536 (thunderx2t99_prefetch_tune): Likewise.
15537 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15538 to false.
15539 (aarch64_override_options_internal): Update to set
15540 PARAM_PREFETCH_DYNAMIC_STRIDES.
15541 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15542 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15543 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15544 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15545 prefetch-dynamic-strides setting.
15546
15547 2018-05-07 Luis Machado <luis.machado@linaro.org>
15548
15549 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15550 <minimum_stride>: New const int field.
15551 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15552 minimum_stride field.
15553 (exynosm1_prefetch_tune): Likewise.
15554 (thunderxt88_prefetch_tune): Likewise.
15555 (thunderx_prefetch_tune): Likewise.
15556 (thunderx2t99_prefetch_tune): Likewise.
15557 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15558 (aarch64_override_options_internal): Update to set
15559 PARAM_PREFETCH_MINIMUM_STRIDE.
15560 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15561 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15562 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15563 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15564 stride is constant and is below the minimum stride threshold.
15565
15566 2018-05-07 Luis Machado <luis.machado@linaro.org>
15567
15568 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15569 to 512.
15570
15571 2018-05-07 Luis Machado <luis.machado@linaro.org>
15572
15573 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15574 <prefetch_dynamic_strides>: New const bool field.
15575 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15576 prefetch_dynamic_strides.
15577 (exynosm1_prefetch_tune): Likewise.
15578 (thunderxt88_prefetch_tune): Likewise.
15579 (thunderx_prefetch_tune): Likewise.
15580 (thunderx2t99_prefetch_tune): Likewise.
15581 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15582 to false.
15583 (aarch64_override_options_internal): Update to set
15584 PARAM_PREFETCH_DYNAMIC_STRIDES.
15585 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15586 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15587 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15588 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15589 prefetch-dynamic-strides setting.
15590
15591 2018-05-07 Luis Machado <luis.machado@linaro.org>
15592
15593 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15594 <minimum_stride>: New const int field.
15595 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15596 minimum_stride field.
15597 (exynosm1_prefetch_tune): Likewise.
15598 (thunderxt88_prefetch_tune): Likewise.
15599 (thunderx_prefetch_tune): Likewise.
15600 (thunderx2t99_prefetch_tune): Likewise.
15601 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15602 (aarch64_override_options_internal): Update to set
15603 PARAM_PREFETCH_MINIMUM_STRIDE.
15604 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15605 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15606 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15607 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15608 stride is constant and is below the minimum stride threshold.
15609
15610 2018-05-06 Jakub Jelinek <jakub@redhat.com>
15611
15612 PR c++/85659
15613 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15614 the type is addressable. Don't force op into register if it has
15615 BLKmode.
15616
15617 2018-05-05 Roland McGrath <mcgrathr@google.com>
15618
15619 PR other/77609
15620 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15621 any section for which we don't know a specific type it should have,
15622 regardless of name. Previously this was done only for the exact
15623 names ".init_array", ".fini_array", and ".preinit_array".
15624 (default_elf_asm_named_section): Add comment about
15625 relationship with default_section_type_flags and SECTION_NOTYPE.
15626 (get_section): Don't consider it a type conflict if one side has
15627 SECTION_NOTYPE and the other doesn't, as long as neither has the
15628 SECTION_BSS et al used in the default_section_type_flags logic.
15629
15630 2018-05-05 Tom de Vries <tom@codesourcery.com>
15631
15632 PR target/85653
15633 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15634 (workaround_barsyncs): New function.
15635 (nvptx_reorg): Use workaround_barsyncs.
15636 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15637 (define_expand "nvptx_membar_cta"): New define_expand.
15638 (define_insn "*nvptx_membar_cta"): New insn.
15639
15640 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
15641
15642 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15643 To improve optimization opportunities.
15644 * builtin-types.def: The new needed builtin types for the above.
15645
15646 2018-05-04 Richard Biener <rguenther@suse.de>
15647
15648 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15649 * gimple-ssa-store-merging.c
15650 (imm_store_chain_info::output_merged_store): Remove redundant create,
15651 release split_store vector contents on failure.
15652 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15653 scalar stmt vector on cache hit.
15654
15655 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
15656
15657 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15658 Xilinx FP support.
15659 * config.gcc (powerpc-xilinx-eabi*): Remove.
15660 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15661 support.
15662 (fusion_addis_mem_combo_load): Ditto.
15663 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15664 FP support.
15665 (rs6000_cpu_cpp_builtins): Ditto.
15666 * config/rs6000/rs6000-linux.c
15667 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15668 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15669 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15670 support.
15671 (rs6000_setup_reg_addr_masks): Ditto.
15672 (rs6000_init_hard_regno_mode_ok): Ditto.
15673 (rs6000_option_override_internal): Ditto.
15674 (legitimate_lo_sum_address_p): Ditto.
15675 (rs6000_legitimize_address): Ditto.
15676 (rs6000_legitimize_reload_address): Ditto.
15677 (rs6000_legitimate_address_p): Ditto.
15678 (abi_v4_pass_in_fpr): Ditto.
15679 (setup_incoming_varargs): Ditto.
15680 (rs6000_gimplify_va_arg): Ditto.
15681 (rs6000_split_multireg_move): Ditto.
15682 (rs6000_savres_strategy): Ditto.
15683 (rs6000_emit_prologue_components): Ditto.
15684 (rs6000_emit_epilogue_components): Ditto.
15685 (rs6000_emit_prologue): Ditto.
15686 (rs6000_emit_epilogue): Ditto.
15687 (rs6000_elf_file_end): Ditto.
15688 (rs6000_function_value): Ditto.
15689 (rs6000_libcall_value): Ditto.
15690 * config/rs6000/rs6000.h: Ditto.
15691 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15692 (TARGET_MINMAX): ... this. New.
15693 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15694 * config/rs6000/rs6000.md: Remove Xilinx FP support.
15695 (*movsi_internal1_single): Delete.
15696 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15697 mfpu=, mxilinx-fpu): Delete.
15698 * config/rs6000/singlefp.h: Delete.
15699 * config/rs6000/sysv4.h: Remove Xilinx FP support.
15700 * config/rs6000/t-rs6000: Ditto.
15701 * config/rs6000/t-xilinx: Delete.
15702 * config/rs6000/titan.md: Adjust for fp_type removal.
15703 * config/rs6000/vsx.md: Remove Xilinx FP support.
15704 (VStype_simple): Delete.
15705 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15706 * config/rs6000/xfpu.h: Delete.
15707 * config/rs6000/xfpu.md: Delete.
15708 * config/rs6000/xilinx.h: Delete.
15709 * config/rs6000/xilinx.opt: Delete.
15710 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15711 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15712
15713 2018-05-04 Tom de Vries <tom@codesourcery.com>
15714
15715 PR libgomp/85639
15716 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15717 if ignore == 0.
15718
15719 2018-05-04 Richard Biener <rguenther@suse.de>
15720
15721 PR middle-end/85627
15722 * tree-complex.c (update_complex_assignment): We are always in SSA form.
15723 (expand_complex_div_wide): Likewise.
15724 (expand_complex_operations_1): Likewise.
15725 (expand_complex_libcall): Preserve EH info of the original stmt.
15726 (tree_lower_complex): Handle removed blocks.
15727 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15728 on complex multiplication and division libcall builtins.
15729
15730 2018-05-04 Richard Biener <rguenther@suse.de>
15731
15732 PR middle-end/85574
15733 * fold-const.c (negate_expr_p): Restrict negation of operand
15734 zero of a division to when we know that can happen without
15735 overflow.
15736 (fold_negate_expr_1): Likewise.
15737
15738 2018-05-04 Jakub Jelinek <jakub@redhat.com>
15739
15740 PR libstdc++/85466
15741 * real.h (real_nextafter): Declare.
15742 * real.c (real_nextafter): New function.
15743 * fold-const-call.c (fold_const_nextafter): New function.
15744 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15745 CASE_CFN_NEXTTOWARD.
15746 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15747 even when arg1_mode is different from arg0_mode.
15748
15749 2018-05-03 Nathan Sidwell <nathan@acm.org>
15750
15751 * doc/extend.texi (Deprecated Features): Remove
15752 -ffriend-injection.
15753 (Backwards Compatibility): Likewise.
15754 * doc/invoke.texi (C++ Language Options): Likewise.
15755 (C++ Dialect Options): Likewise.
15756
15757 2018-05-03 Jakub Jelinek <jakub@redhat.com>
15758
15759 PR target/85530
15760 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15761 _mm512_mask_mullox_epi64): New intrinsics.
15762
15763 2018-05-03 Tom de Vries <tom@codesourcery.com>
15764
15765 PR testsuite/85106
15766 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15767 dump files): Add offload-tree.
15768
15769 2018-05-03 Richard Biener <rguenther@suse.de>
15770
15771 PR tree-optimization/85615
15772 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15773 to loops not nested in BBs loop father to avoid creating multi-entry
15774 loops.
15775
15776 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15777
15778 PR tree-optimization/70291
15779 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15780 arguments. Change return type to tree. Emit libcall as a new
15781 statement rather than replacing existing one when inplace_p is true.
15782 (expand_complex_multiplication_components): New function.
15783 (expand_complex_multiplication): Expand floating-point complex
15784 multiplication using the above.
15785 (expand_complex_division): Rename inner_type parameter to type.
15786 Update expand_complex_libcall call-site.
15787 (expand_complex_operations_1): Update expand_complex_multiplication
15788 and expand_complex_division call-sites.
15789
15790 2018-05-02 Jakub Jelinek <jakub@redhat.com>
15791
15792 PR target/85582
15793 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15794 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15795 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
15796 the highest significant bit of the shift count mask is clear. In
15797 check whether and[sq]i3 is needed verify that all significant bits
15798 of the shift count other than the highest are set.
15799
15800 2018-05-02 Tom de Vries <tom@codesourcery.com>
15801
15802 PR libgomp/82428
15803 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
15804 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
15805 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
15806 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
15807 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
15808 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
15809 __builtin_goacc_parlevel_size.
15810
15811 2018-05-02 Richard Biener <rguenther@suse.de>
15812
15813 PR tree-optimization/85597
15814 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
15815 do not use split vect_get_vec_defs call but call vect_get_slp_defs
15816 directly.
15817
15818 2018-05-02 Tom de Vries <tom@codesourcery.com>
15819
15820 PR testsuite/85106
15821 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15822 dump files): Add ltrans-tree.
15823
15824 2018-05-02 Tom de Vries <tom@codesourcery.com>
15825
15826 PR testsuite/85106
15827 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15828 dump files): Add wpa-ipa.
15829
15830 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
15831
15832 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
15833 powerpc*-*-linux*paired* target.
15834 * config/rs6000/750cl.h: Delete.
15835 * config/rs6000/paired.h: Delete.
15836 * config/rs6000/paired.md: Delete.
15837 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
15838 float support.
15839 * config/rs6000/rs6000-builtin.def: Remove paired float support.
15840 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
15841 comment. Remove paired float support.
15842 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
15843 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
15844 VECTOR_PAIRED.
15845 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
15846 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
15847 declarations.
15848 * config/rs6000/rs6000.c: Remove paired float support.
15849 (paired_expand_vector_init, paired_expand_vector_move,
15850 paired_emit_vector_compare, paired_emit_vector_cond_expr,
15851 (paired_expand_lv_builtin, paired_expand_stv_builtin,
15852 paired_expand_builtin, paired_expand_predicate_builtin,
15853 paired_init_builtins): Delete.
15854 * config/rs6000/rs6000.h: Remove paired float support.
15855 * config/rs6000/rs6000.md: Remove paired float support.
15856 (move_from_CR_ov_bit): Delete.
15857 * config/rs6000/rs6000.opt (mpaired): Delete.
15858 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
15859 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
15860
15861 2018-05-02 Richard Biener <rguenther@suse.de>
15862
15863 PR middle-end/85567
15864 * gimplify.c (gimplify_save_expr): When in SSA form allow
15865 SAVE_EXPRs to compute to SSA vars.
15866
15867 2018-05-02 Jakub Jelinek <jakub@redhat.com>
15868
15869 PR target/85582
15870 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15871 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15872 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
15873 clobber operands[2], instead use a new pseudo. Formatting fixes.
15874
15875 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
15876
15877 PR tree-optimization/85586
15878 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
15879 exit early for statements in the same group if the accesses are
15880 not strided.
15881
15882 2018-05-02 Tom de Vries <tom@codesourcery.com>
15883
15884 PR lto/85451
15885 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
15886 error message.
15887
15888 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
15889
15890 PR tree-optimization/85143
15891 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
15892
15893 2018-05-01 Tom de Vries <tom@codesourcery.com>
15894
15895 PR lto/85451
15896 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
15897 not found" error message.
15898
15899 2018-05-01 Tom de Vries <tom@codesourcery.com>
15900
15901 PR other/83786
15902 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
15903 * vec.c (test_ordered_remove_if): New function.
15904 (vec_c_tests): Call test_ordered_remove_if.
15905 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
15906 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
15907 * tree-vect-patterns.c (vect_pattern_recog_1): Use
15908 VEC_ORDERED_REMOVE_IF.
15909
15910 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15911
15912 PR tree-optimization/82665
15913 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
15914 pointer subtraction where arguments come from a memchr call.
15915
15916 2018-05-01 Jakub Jelinek <jakub@redhat.com>
15917
15918 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
15919 --push-state --as-needed and --pop-state instead of --as-needed and
15920 --no-as-needed if ld supports it.
15921 * configure: Regenerated.
15922
15923 PR web/85578
15924 * doc/install.texi2html: Replace _002d with - and _002a with * in
15925 generated html files using sed.
15926
15927 2018-04-30 David Malcolm <dmalcolm@redhat.com>
15928
15929 PR c++/85523
15930 * gcc-rich-location.c (blank_line_before_p): New function.
15931 (use_new_line): New function.
15932 (gcc_rich_location::add_fixit_insert_formatted): New function.
15933 * gcc-rich-location.h
15934 (gcc_rich_location::add_fixit_insert_formatted): New function.
15935
15936 2018-04-30 David Malcolm <dmalcolm@redhat.com>
15937
15938 * selftest.c (assert_streq): Rename "expected" and "actual" to
15939 "val1" and "val2". Extend NULL-handling to cover both inputs
15940 symmetrically, while still requiring both to be non-NULL for a pass.
15941 * selftest.h (assert_streq): Rename "expected" and "actual" to
15942 "val1" and "val2".
15943 (ASSERT_EQ): Likewise.
15944 (ASSERT_EQ_AT): Likewise.
15945 (ASSERT_KNOWN_EQ): Likewise.
15946 (ASSERT_KNOWN_EQ_AT): Likewise.
15947 (ASSERT_NE): Likewise.
15948 (ASSERT_MAYBE_NE): Likewise.
15949 (ASSERT_MAYBE_NE_AT): Likewise.
15950 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
15951 the assertion to pass.
15952 (ASSERT_STREQ_AT): Likewise.
15953
15954 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
15955
15956 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
15957 interaction with -pie.
15958
15959 2018-04-30 David Malcolm <dmalcolm@redhat.com>
15960
15961 * selftest.h: Fix alphabetization of per-source-file selftest
15962 declarations.
15963
15964 2018-04-30 Jason Merrill <jason@redhat.com>
15965
15966 PR c++/61982 - dead stores to destroyed objects.
15967 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
15968 of clobber.
15969
15970 2018-04-30 Jason Merrill <jason@redhat.com>
15971
15972 * tree.c (build_clobber): New.
15973 * tree.h: Declare it.
15974 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
15975
15976 2018-04-30 David Malcolm <dmalcolm@redhat.com>
15977
15978 * diagnostic-show-locus.c (layout::layout): Update for
15979 location_get_source_line returning a char_span.
15980 (struct char_span): Move to input.h.
15981 (struct correction): Update for fields in char_span becoming
15982 private.
15983 (struct source_line): Update for location_get_source_line
15984 returning a char_span.
15985 (layout::print_line): Likewise.
15986 * edit-context.c (edited_file::print_content): Likewise.
15987 (edited_file::print_diff_hunk): Likewise.
15988 (edited_file::print_run_of_changed_lines): Likewise.
15989 (edited_file::get_num_lines): Likewise.
15990 (edited_line::edited_line): Likewise.
15991 * final.c (asm_show_source): Likewise.
15992 * input.c (location_get_source_line): Convert return type
15993 from const char * to char_span, losing the final "line_len"
15994 param.
15995 (dump_location_info): Update for the above.
15996 (get_substring_ranges_for_loc): Likewise. Use a char_span
15997 when handling the literal within the line.
15998 (test_reading_source_line): Update for location_get_source_line
15999 returning a char_span.
16000 * input.h (class char_span): Move here from
16001 diagnostic-show-locus.c, converting from a struct to a class.
16002 Make data members private.
16003 (char_span::operator bool): New.
16004 (char_span::length): New.
16005 (char_span::get_buffer): New.
16006 (char_span::operator[]): New.
16007 (char_span::subspan): Make const.
16008 (char_span::xstrdup): New.
16009 (location_get_source_line): Convert return type from const char *
16010 to char_span, losing the final "line_size" param.
16011
16012 2018-04-30 Jan Hubicka <jh@suse.cz>
16013
16014 * lto-wrapper.c (ltrans_priorities): New static var.
16015 (cmp_priority): New.
16016 (run_gcc): Read priorities and if doing parallel build order
16017 the Makefile by them.
16018
16019 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16020
16021 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16022
16023 2018-04-30 Richard Biener <rguenther@suse.de>
16024
16025 * tree-cfg.c (verify_address): Remove base argument, add
16026 flag whether to check TREE_ADDRESSABLE and do that.
16027 (verify_expr): Remove.
16028 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16029 (verify_gimple_assign_single): Likewise.
16030 (verify_gimple_switch): Likewise.
16031 (verify_expr_location_1): Dereference tp once. Add (disabled)
16032 piece from verify_expr.
16033 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16034
16035 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16036
16037 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16038
16039 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16040
16041 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16042 (small_data_pattern): Likewise.
16043 (arc_rewrite_small_data): Likewise.
16044 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16045 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16046 (get_symbol_alignment): New function.
16047 (legitimate_small_data_address_p): Likewise.
16048 (legitimate_scaled_address): Update, call
16049 legitimate_small_data_address_p.
16050 (output_sdata): New static variable.
16051 (arc_print_operand): Update how we handle small data operands.
16052 (arc_print_operand_address): Likewise.
16053 (arc_legitimate_address_p): Update, use
16054 legitimate_small_data_address_p.
16055 (arc_rewrite_small_data_p): Remove.
16056 (arc_rewrite_small_data_1): Likewise.
16057 (arc_rewrite_small_data): Likewise.
16058 (small_data_pattern): Likewise.
16059 (compact_sda_memory_operand): Update to use
16060 legitimate_small_data_address_p and get_symbol_alignment.
16061 (prepare_move_operands): Don't rewite sdata pattern.
16062 (prepare_extend_operands): Remove.
16063 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16064 pattern.
16065 (zero_extendqisi2): Likewise.
16066 (zero_extendhisi2): Likewise.
16067 (extendqihi2): Likewise.
16068 (extendqisi2): Likewise.
16069 (extendhisi2): Likewise.
16070 (addsi3): Likewise.
16071 (subsi3): Likewise.
16072 (andsi3): Likewise.
16073 * config/arc/constraints.md (Usd): Change it to memory constraint.
16074
16075 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16076
16077 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16078 as source of std instructions.
16079 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16080 allow 6-bit constants as source for store instructions.
16081 (movdi_insn): Update instruction pattern to allow 6-bit constants
16082 as source for store instructions.
16083
16084 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16085
16086 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16087
16088 2018-04-30 Nathan Sidwell <nathan@acm.org>
16089 Sandra Loosemore <sandra@codesourcery.com>
16090
16091 * dumpfile.c (dump_open): Allow '-' for stdout.
16092 * doc/invoke.texi (Developer Options): Document dump filename
16093 determination early. Document stdin/stdout selection.
16094
16095 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16096
16097 Microblaze Target: PIC data text relative
16098
16099 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16100 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16101 Add declaration.
16102 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16103 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16104 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16105 New addressing mode for data-text relative position indepenedent code.
16106 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16107 'ADDRESS_SYMBOLIC_TXT_REL'.
16108 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16109 (microblaze_legitimate_pic_operand): Exclude function calls from
16110 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16111 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16112 addresses cases.
16113 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16114 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16115 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16116 for 'address + offset'.
16117 (microblaze_expand_prologue): Add new function prologue call for
16118 'r20' assignation.
16119 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16120 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16121 table in case of TARGET_PIC_DATA_TEXT_REL.
16122 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16123 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16124 Add new macros 'UNSPEC_TEXT',
16125 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16126 + exclude function calls from 'UNSPEC_PLT' in case of data text
16127 relative mode.
16128 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16129 new target hook for generating address diff vector tables in case of
16130 flag_pic.
16131 * doc/tm.texi : Regenerate.
16132 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16133 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16134 of addr diff vector generation.
16135 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16136 target hook definition.
16137 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16138 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16139 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16140 option for data text relative.
16141
16142 2018-04-30 Richard Biener <rguenther@suse.de>
16143
16144 * tree-chrec.h (evolution_function_is_constant_p): Remove
16145 redundant check.
16146 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16147
16148 2018-04-30 Richard Biener <rguenther@suse.de>
16149
16150 PR bootstrap/85571
16151 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16152
16153 2018-04-30 Richard Biener <rguenther@suse.de>
16154
16155 PR tree-optimization/28364
16156 PR tree-optimization/85275
16157 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16158 copying first exit test.
16159
16160 2018-04-28 Mark Wielaard <mark@klomp.org>
16161
16162 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16163 dwarf_version >= 5.
16164 (dwarf_AT): Handle DW_AT_addr_base.
16165 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16166
16167 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16168
16169 PR target/84431
16170 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16171 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16172 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16173 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16174
16175 2018-04-28 Richard Biener <rguenther@suse.de>
16176
16177 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16178 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16179 to reflect use. Only add interesting stmts.
16180
16181 2018-04-27 Martin Jambor <mjambor@suse.cz>
16182
16183 PR ipa/85549
16184 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16185 the jump function allows for passing through aggregate values.
16186
16187 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16188
16189 * input.h (in_system_header_at): Convert from macro to inline
16190 function.
16191 (from_macro_expansion_at): Likewise.
16192 (from_macro_definition_at): Likewise.
16193
16194 2018-04-27 Jeff Law <law@redhat.com>
16195
16196 * config.gcc: Mark tile* targets as deprecated/obsolete.
16197
16198 2018-04-27 Richard Biener <rguenther@suse.de>
16199
16200 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16201 fix for ILP32.
16202
16203 2018-04-27 Richard Biener <rguenther@suse.de>
16204
16205 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16206
16207 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16208
16209 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16210 with Yd constraint. Set "preferred_for_speed" attribute from
16211 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16212 with Yd constraint.
16213 (*movdi_internal): Ditto.
16214 (movti_interunit splitters): Remove
16215 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16216 (movdi_interunit splitters): Ditto.
16217 * config/i386/constraints.md (Ye): Remove.
16218 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16219
16220 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16221
16222 PR target/85512
16223 * config/aarch64/constraints.md (Usg): Limit to 31.
16224 (Usj): Limit to 63.
16225
16226 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16227
16228 PR tree-optimization/85529
16229 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16230 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16231 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16232 zero extension or masking of the MSB bit.
16233 (optimize_range_tests): Add FIRST_BB argument, pass it through
16234 to optimize_range_tests_var_bound.
16235 (maybe_optimize_range_tests, reassociate_bb): Adjust
16236 optimize_range_tests callers.
16237
16238 2018-04-26 Richard Biener <rguenther@suse.de>
16239 Jakub Jelinek <jakub@redhat.com>
16240
16241 * cgraph.h (symbol_table): Just declare debug method here.
16242 * symtab.c (symbol_table::debug): Define.
16243
16244 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16245
16246 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16247
16248 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16249
16250 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16251 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16252 (*movdi_internal): Substitute Yi and Yj constraint with x
16253 and Ym and Yn constraint with y constraint. Update "isa"
16254 attribute and set "preferred_for_speed" attribute from
16255 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16256 (*movsi_internal): Ditto.
16257 (*movdf_internal): Ditto.
16258 (*movsf_internal): Ditto.
16259 (*zero_extendsidi2): Ditto.
16260 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16261 (sse2_loadld): Ditto.
16262 (*vec_extract<ssevecmodelower>_0): Ditto.
16263 (*vec_extractv4si_0_zext_sse4): Ditto.
16264 (vec_concatv2di): Ditto.
16265 (*vec_dup<mode>): Ditto.
16266 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16267 * config/i386/constraints.md (Yi): Remove.
16268 (Yj): Remove.
16269 (Ym): Remove.
16270 (Yn): Remove.
16271
16272 2018-04-26 Nathan Sidwell <nathan@acm.org>
16273
16274 * dumpfile.c (dump_open): New.
16275 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16276 (dump_finish): Detect stdio/stderr by value not name.
16277
16278 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16279
16280 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16281
16282 2018-04-26 Tom de Vries <tom@codesourcery.com>
16283
16284 PR target/84952
16285 * config/nvptx/nvptx.c (verify_neutering_jumps)
16286 (verify_neutering_labels): New function
16287 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16288
16289 2018-04-26 Tom de Vries <tom@codesourcery.com>
16290
16291 PR target/84025
16292 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16293 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16294 need neutering.
16295
16296 2018-04-26 Richard Biener <rguenther@suse.de>
16297 Tom de Vries <tom@codesourcery.com>
16298
16299 PR lto/85422
16300 * lto-streamer-out.c (output_function): Fixup loops if required to match
16301 discovery done in the reader.
16302
16303 2018-04-26 Richard Biener <rguenther@suse.de>
16304
16305 PR tree-optimization/85116
16306 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16307 have a loop exit from the single latch predecessor. Remove
16308 case of header with just condition.
16309 (ch_base::copy_headers): Exclude infinite loops from any
16310 processing.
16311 (pass_ch::execute): Record exits.
16312
16313 2018-04-26 Richard Biener <rguenther@suse.de>
16314
16315 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16316 prologue cost vector and pass it to vect_get_load_cost.
16317 (vect_get_peeling_costs_all_drs): Likewise.
16318 (vect_peeling_hash_get_lowest_cost): Likewise.
16319 (vect_enhance_data_refs_alignment): Likewise.
16320
16321 2018-04-26 Richard Biener <rguenther@suse.de>
16322
16323 PR middle-end/85450
16324 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16325 checking of integer<->pointer conversions.
16326 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16327 sign-/zero-extending pointer types.
16328 (expand_omp_for_static_chunk): Likewise.
16329
16330 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16331 Jean Lee <xiaoyur347@gmail.com>
16332
16333 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16334 (TARGET_ASAN_SHADOW_OFFSET): Define.
16335 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16336 true for -fsanitize=address.
16337
16338 2018-04-25 Mark Wielaard <mark@klomp.org>
16339
16340 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16341 shorter ones.
16342
16343 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16344
16345 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16346 than "alu", remove explicit "memory" and "imm_disp" attributes.
16347 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16348
16349 PR middle-end/85414
16350 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16351 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16352 gen_lowpart_no_emit.
16353
16354 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16355
16356 PR target/85473
16357 * config/i386/i386.c (ix86_expand_builtin): Change memory
16358 operand to XI, extend p0 to Pmode.
16359 * config/i386/i386.md: Change unspec volatile and operand
16360 1 mode to XI, change operand 0 mode to P.
16361
16362 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16363
16364 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16365 GET_MODE_MASK before any checking.
16366 (nds32_can_use_bset_p): Likewise.
16367 (nds32_can_use_btgl_p): Likewise.
16368
16369 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16370
16371 * config/nds32/nds32-doubleword.md: New define_split pattern for
16372 illegal register number.
16373
16374 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16375
16376 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16377
16378 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16379
16380 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16381
16382 2018-04-25 Richard Biener <rguenther@suse.de>
16383
16384 * lto-streamer.h (LTO_major_version): Bump to 8.
16385
16386 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16387
16388 * BASE-VER: Set to 9.0.0.
16389
16390 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16391
16392 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16393 in __abskf2 and __powikf2.
16394
16395 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16396
16397 PR target/85512
16398 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16399 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16400 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16401 Use the above on operand 2. Reindent.
16402 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16403
16404 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16405
16406 PR target/85485
16407 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16408 handle OPT_mcet.
16409 * config/i386/i386.opt (mcet): Removed.
16410 * doc/install.texi: Remove -mcet documentation.
16411 * doc/invoke.texi: Likewise.
16412
16413 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16414
16415 PR target/85485
16416 * doc/install.texi: Remove -mcet from bootstrap-cet.
16417
16418 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16419
16420 PR target/85511
16421 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16422 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16423 if TARGET_64BIT.
16424
16425 PR target/85503
16426 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16427 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16428 containing a CONST_VECTOR.
16429
16430 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16431
16432 * doc/install.texi: Update newlib dependency for nvptx.
16433
16434 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16435
16436 PR target/85508
16437 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16438 instead of INTVAL when shifting x left.
16439
16440 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16441
16442 PR tree-optimization/85478
16443 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16444 vect_grouped_store_supported for single element vectors.
16445
16446 2018-04-24 Richard Biener <rguenther@suse.de>
16447
16448 PR target/85491
16449 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16450 load cost increase to the case of non-constant step.
16451
16452 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16453
16454 PR target/84828
16455 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16456 destination if any_malformed_asm.
16457
16458 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
16459
16460 PR middle-end/85496
16461 * expr.c (store_field): In the bitfield case, if the value comes from
16462 a function call and is returned in registers by means of a PARALLEL,
16463 do not change the mode of the temporary unless BLKmode and VOIDmode.
16464
16465 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
16466
16467 PR rtl-optimization/85423
16468 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16469 dependencies to debug insns when the previous insn is non-debug.
16470
16471 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16472
16473 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16474 enums into a single definition.
16475 (fls): Fix predicates and printing.
16476 (seti): Likewise.
16477
16478 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16479
16480 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16481 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16482 and short u6 immediate.
16483 (check_if_valid_sleep_operand): Remove.
16484 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16485
16486 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16487
16488 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16489 flag_always_save_lp condition.
16490 * config/nds32/nds32.opt (malways-save-lp): New option.
16491
16492 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16493
16494 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16495 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16496 * config/nds32/nds32.h
16497 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16498 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16499
16500 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16501
16502 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16503 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16504
16505 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16506 Chung-Ju Wu <jasonwucj@gmail.com>
16507
16508 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16509 Declare.
16510 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16511 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16512
16513 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16514
16515 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16516
16517 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16518
16519 * config/nds32/nds32-protos.h (nds32_data_alignment,
16520 nds32_local_alignment): Declare.
16521 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16522 nds32_local_alignment): New functions.
16523 (TARGET_CONSTANT_ALIGNMENT): Define.
16524 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16525
16526 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16527
16528 * config/nds32/nds32.c
16529 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16530 (TARGET_MODES_TIEABLE_P): Likewise.
16531
16532 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16533
16534 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16535 level Ofast and Og.
16536
16537 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
16538 Chung-Ju Wu <jasonwucj@gmail.com>
16539
16540 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16541 for unaligned access.
16542 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16543 unaligned access.
16544 * config/nds32/nds32-intrinsic.md: Likewise.
16545 * config/nds32/nds32_intrinsic.h: Likewise.
16546 * config/nds32/nds32.h (nds32_builtins): Likewise.
16547 * config/nds32/nds32.opt (munaligned-access): New option.
16548 * config/nds32/nds32.c (nds32_asm_file_start): Display
16549 flag_unaligned_access status.
16550
16551 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16552
16553 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16554 -mno-relax is present.
16555 * config/riscv/linux.h (LINK_SPEC): Ditto.
16556
16557 2018-04-20 Martin Sebor <msebor@redhat.com>
16558
16559 PR c/85365
16560 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16561 for null pointers.
16562 (gimple_fold_builtin_stxcpy_chk): Same.
16563 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16564
16565 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
16566
16567 PR target/85456
16568 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16569 __powikf2 when long double is IEEE 128-bit.
16570
16571 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16572
16573 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16574 step to make sure stack always aligned.
16575
16576 2018-04-20 Carl Love <cel@us.ibm.com>
16577
16578 PR target/83402
16579 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16580 size check for arg0.
16581
16582 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
16583 Tom de Vries <tom@codesourcery.com>
16584
16585 PR target/85445
16586 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16587 Emit insns for calls too.
16588 (nvptx_find_par): Always look for worker-level predecessor insn.
16589 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
16590 calls.
16591 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16592 (nvptx_process_pars): Propagate frames for calls.
16593
16594 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
16595
16596 PR target/85469
16597 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16598 Removed.
16599 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16600 (ix86_handle_option): Don't handle OPT_mibt.
16601 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16602 __SHSTK__.
16603 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16604 has_ibt and ibt.
16605 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16606 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16607 (ix86_target_macros): Define __CET__ with flag_cf_protection
16608 for -fcf-protection.
16609 * config/i386/i386.c (isa2_opts): Remove -mibt.
16610 * config/i386/i386.h (TARGET_IBT): Removed.
16611 (TARGET_IBT_P): Likewise.
16612 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16613 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16614 * config/i386/i386.opt (mcet): Update help message.
16615 (mshstk): Likewise.
16616 (mibt): Removed.
16617 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
16618 -mcet as an alias for -mshstk.
16619
16620 2018-04-20 Richard Biener <rguenther@suse.de>
16621
16622 PR middle-end/85475
16623 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16624 complexity by forcing a single use of the multiply operand.
16625
16626 2018-04-20 Martin Jambor <mjambor@suse.cz>
16627
16628 ipa/85449
16629 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16630 recursion dependency to only apply to non-clones.
16631
16632 2018-04-20 Martin Jambor <mjambor@suse.cz>
16633
16634 ipa/85447
16635 * ipa-cp.c (create_specialized_node): Check that clones of
16636 self-recursive edges exist during IPA-CP.
16637
16638 2018-04-19 Toon Moene <toon@moene.org>
16639
16640 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16641 by -O3.
16642
16643 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16644
16645 PR tree-optimization/85467
16646 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16647 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
16648 VECTOR_CST element to type.
16649
16650 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16651
16652 PR target/85397
16653 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16654 * config/i386/i386.md (builtin_setjmp_setup): Removed.
16655 (builtin_longjmp): Likewise.
16656 (save_stack_nonlocal): New pattern.
16657 (restore_stack_nonlocal): Likewise.
16658
16659 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16660
16661 PR target/85404
16662 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16663 Replace ASM_OUTPUT_LABEL with fprintf.
16664
16665 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16666
16667 PR target/85417
16668 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16669 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16670 * config/i386/i386-c.c (ix86_target_macros_internal): Also
16671 define __IBT__ and __SHSTK__ for -fcf-protection.
16672 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16673 TARGET_IBT.
16674 (ix86_trampoline_init): Likewise.
16675 (x86_output_mi_thunk): Likewise.
16676 (ix86_notrack_prefixed_insn_p): Likewise.
16677 (ix86_option_override_internal): Don't disallow -fcf-protection.
16678 * config/i386/i386.md (rdssp<mode>): Also enable for
16679 -fcf-protection.
16680 (incssp<mode>): Likewise.
16681 (nop_endbr): Likewise.
16682 * config/i386/i386.opt (mcet): Change help message to built-in
16683 functions only.
16684 (mibt): Likewise.
16685 (mshstk): Likewise.
16686 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16687 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
16688 enable CET built-in functions.
16689
16690 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
16691
16692 * common/config/i386/i386-common.c
16693 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16694 OPTION_MASK_ISA_MOVDIRI_UNSET,
16695 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16696 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16697 * config.gcc (movdirintrin.h): New header.
16698 * config/i386/cpuid.h (bit_MOVDIRI,
16699 bit_MOVDIR64B): New bits.
16700 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16701 and -mmvodir64b.
16702 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16703 (VOID, PVOID, PCVOID)): New function types.
16704 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16705 __builtin_ia32_directstoreu_u64,
16706 __builtin_ia32_movdir64b): New builtins.
16707 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16708 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16709 and -mmovdiri.
16710 (ix86_valid_target_attribute_inner_p): Ditto.
16711 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16712 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16713 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16714 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16715 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16716 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16717 (movdiri<mode>, movdir64b_<mode>): New.
16718 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16719 * config/i386/immintrin.h: Include movdirintrin.h.
16720 * config/i386/movdirintrin.h: New file.
16721 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16722
16723 2018-04-19 Richard Biener <rguenther@suse.de>
16724
16725 PR middle-end/85455
16726 * cfg.c (clear_bb_flags): When loop state says we have
16727 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16728
16729 2018-04-19 Richard Biener <rguenther@suse.de>
16730
16731 PR tree-optimization/84737
16732 * tree-vect-data-refs.c (vect_copy_ref_info): New function
16733 copying restrict info.
16734 (vect_setup_realignment): Use it.
16735 * tree-vectorizer.h (vect_copy_ref_info): Declare.
16736 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16737 the first DR to all generated stores.
16738 (vectorizable_load): Likewise for loads.
16739
16740 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16741
16742 PR tree-optimization/85446
16743 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16744 the integral and pointer types to have the same precision.
16745
16746 * doc/install.texi: Document --disable-cet being the default and
16747 --enable-cet=auto.
16748
16749 2018-04-18 Martin Liska <mliska@suse.cz>
16750
16751 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16752 style.
16753
16754 2018-04-18 Martin Liska <mliska@suse.cz>
16755
16756 Revert
16757 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16758
16759 PR ipa/83983
16760 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16761 arguments if they are comparable.
16762
16763 2018-04-18 Martin Liska <mliska@suse.cz>
16764
16765 Revert
16766 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16767
16768 PR lto/84805
16769 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16770 incomplete types.
16771
16772 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
16773
16774 PR target/85388
16775 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16776 ENDBR after calling __morestack.
16777
16778 2018-04-18 David Malcolm <dmalcolm@redhat.com>
16779
16780 PR jit/85384
16781 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
16782 by using gcc_base_ver to generate a gcc_driver_version, and use
16783 it when generating GCC_DRIVER_NAME.
16784 * configure: Regenerate.
16785
16786 2018-04-18 Jakub Jelinek <jakub@redhat.com>
16787
16788 PR target/81084
16789 * config.gcc: Obsolete powerpc*-*-*spe*.
16790
16791 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16792
16793 PR debug/84637
16794 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
16795 (stabstr_D): Change type of unum from unsigned int to
16796 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
16797 type.
16798
16799 2018-04-17 Jim Wilson <jimw@sifive.com>
16800
16801 PR 84856
16802 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
16803 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
16804 Set arg_pointer_offset after using pretend_args_size.
16805
16806 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16807
16808 PR rtl-optimization/85431
16809 * dse.c (record_store): Ignore zero width stores.
16810
16811 PR sanitizer/85230
16812 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
16813 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
16814 __builtin_stack_restore rather than after it.
16815 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
16816 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
16817 argument instead of virtual_dynamic_stack_rtx.
16818
16819 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
16820
16821 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
16822 New prototype.
16823 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16824 Add note to error message to explain internal mapping of overloaded
16825 built-in function name to non-overloaded built-in function name.
16826 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
16827 function.
16828
16829 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16830
16831 PR target/85424
16832 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
16833 where the inputs overlap with the output.
16834
16835 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16836
16837 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
16838 (=v, v) alternative and explicit "memory" attribute.
16839 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
16840 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16841 attributes.
16842 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
16843 "sselog1" type instead of "sselog".
16844 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
16845 "sselog". Remove explicit "memory" attribute.
16846 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
16847 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16848 attributes.
16849 (vec_extract_hi_v32hi): Merge all alternatives into one, use
16850 "sselog1" type instead of "sselog". Remove explicit "memory"
16851 attribute.
16852 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
16853 use "sselog1" type instead of "sselog". Remove explicit "memory"
16854 attribute.
16855 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
16856 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16857 attributes.
16858 (vec_extract_hi_v64qi): Merge all alternatives into one, use
16859 "sselog1" type instead of "sselog". Remove explicit "memory"
16860 attribute.
16861 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
16862 use "sselog1" type instead of "sselog". Remove explicit "memory"
16863 attribute.
16864
16865 PR target/85430
16866 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
16867
16868 PR middle-end/85414
16869 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
16870 on a SUBREG.
16871
16872 2018-04-17 Martin Jambor <mjambor@suse.cz>
16873
16874 PR ipa/85421
16875 * ipa-cp.c (create_specialized_node): Call
16876 expand_all_artificial_thunks if necessary.
16877
16878 2018-04-17 Martin Liska <mliska@suse.cz>
16879
16880 PR lto/85405
16881 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
16882 in message, remote space in between '_G' and '('.
16883
16884 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16885
16886 PR target/85281
16887 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
16888 avx512f_vmcmp<mode>3<round_saeonly_name>,
16889 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
16890 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
16891 avx512f_rndscale<mode><round_saeonly_name>,
16892 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
16893 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
16894 Use %<iptr>2 instead of %2 for -masm=intel.
16895 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
16896 avx512f_vcvttss2usi<round_saeonly_name>,
16897 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
16898 -masm=intel.
16899 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
16900 avx512f_vcvttsd2usi<round_saeonly_name>,
16901 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
16902 Use %q1 instead of %1 for -masm=intel.
16903 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
16904 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
16905 of %3 for -masm=intel.
16906 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
16907 -masm=intel.
16908 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
16909 -masm=intel.
16910 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
16911 -masm=intel.
16912 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
16913 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
16914 %g1.
16915 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
16916 -masm=intel.
16917 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
16918 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
16919 %g1 and one with %0 and %1.
16920 (avx512er_vmrcp28<mode><round_saeonly_name>,
16921 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
16922 %1 for -masm=intel.
16923 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
16924 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
16925 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
16926 of %0 and %{%4%} for -masm=intel.
16927 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
16928 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
16929 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
16930 order of %0 and %{%5%}%{z%} for -masm=intel.
16931
16932 2018-04-17 Jan Hubicka <jh@suse.cz>
16933
16934 PR lto/85405
16935 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
16936
16937 2018-04-17 Martin Liska <mliska@suse.cz>
16938
16939 PR ipa/85329
16940 * multiple_target.c (create_dispatcher_calls): Set apostrophes
16941 for target_clone error message. Make default implementation
16942 clone to be a local declaration.
16943 (separate_attrs): Add new argument and check for an empty
16944 string.
16945 (expand_target_clones): Handle it.
16946 (ipa_target_clone): Make redirection just for target_clones
16947 functions.
16948
16949 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
16950 Tom de Vries <tom@codesourcery.com>
16951
16952 PR middle-end/84955
16953 * omp-expand.c (expand_oacc_for): Add dummy false branch for
16954 tiled basic blocks without omp continue statements.
16955
16956 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
16957
16958 PR target/83660
16959 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
16960 vec_extract expression as having side effects to make sure it gets
16961 a cleanup point.
16962
16963 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
16964
16965 PR target/85403
16966 * config/i386/i386.c (get_builtin_code_for_version): Check
16967 error_mark_node.
16968
16969 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
16970
16971 PR target/84331
16972 * config.gcc: Support "skylake".
16973 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16974 PROCESSOR_SKYLAKE.
16975 * config/i386/i386.c (m_SKYLAKE): Define.
16976 (processor_target_table): Add "skylake".
16977 (ix86_option_override_internal): Add "skylake".
16978 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
16979 PROCESSOR_CANNONLAKE.
16980 (get_builtin_code_for_version): Fix priority for
16981 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
16982 PROCESSOR_SKYLAKE-AVX512.
16983 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
16984 (processor_type): Add PROCESSOR_SKYLAKE.
16985
16986 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
16987 Jason Merrill <jason@redhat.com>
16988
16989 PR c++/85112
16990 * convert.c (convert_to_integer_1): Use direct recursion for
16991 enumeral types and types with a precision less than the number
16992 of bits in their mode.
16993
16994 2018-04-16 Julia Koval <julia.koval@intel.com>
16995
16996 PR target/84413
16997 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
16998 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
16999
17000 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17001
17002 PR target/85293
17003 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17004 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17005 and -mno-direct-move.
17006
17007 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17008
17009 PR target/83402
17010 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17011 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17012 Ensure negative shifts result in {0}.
17013
17014 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17015
17016 PR rtl-optimization/79916
17017 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17018 regs (if any) to define how to gnerate SD moves when LRA is in
17019 progress.
17020
17021 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17022
17023 PR rtl-optimization/85393
17024 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17025 * except.c (expand_dw2_landing_pad_for_region): Make static.
17026 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17027 a label and unconditional jump to old_bb, rather than
17028 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17029 basic block.
17030
17031 PR rtl-optimization/85376
17032 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17033 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17034 instead of a specific value.
17035
17036 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17037 Bin Cheng <bin.cheng@arm.com>
17038
17039 PR tree-optimization/82965
17040 PR tree-optimization/83991
17041 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17042 by_profile_only parameter.
17043 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17044 information if the loop was predicted to iterate too many times.
17045 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17046
17047 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17048
17049 PR lto/71991
17050 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17051 always inline.
17052
17053 2018-04-13 Martin Liska <mliska@suse.cz>
17054 Jakub Jelinek <jakub@redhat.com>
17055
17056 PR middle-end/81657
17057 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17058 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17059 * builtins.c (expand_builtin_memory_copy_args): Use
17060 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17061 handle dest_addr == pc_rtx.
17062
17063 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17064
17065 PR target/85291
17066 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17067 asked to not generate direct moves.
17068 (fix_trunc<mode>si2_stfiwx): Similar.
17069 (fix_trunc<mode>si2_internal): Similar.
17070
17071 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17072
17073 PR debug/83157
17074 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17075 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17076 lookup if dest in some wider mode is known to be const0_rtx and
17077 if so, record permanent equivalence for it to be ZERO_EXTEND of
17078 the narrower mode destination.
17079
17080 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17081
17082 * lto-streamer-out.c (output_function): Revert 259346.
17083 * omp-expand.c (expand_oacc_for): Likewise.
17084
17085 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17086
17087 PR rtl-optimization/85354
17088 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17089 * sel-sched.c (sel_global_init): ... here.
17090
17091 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17092
17093 PR target/85238
17094 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17095 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17096 mode for PE-COFF targets.
17097 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17098 (i386_pe_asm_lto_end): Likewise.
17099 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17100 (TARGET_ASM_LTO_END): Likewise.
17101 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17102 (i386_pe_asm_lto_start): New function.
17103 (i386_pe_asm_lto_end): Likewise.
17104
17105 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17106 Richard Biener <rguenther@suse.de>
17107
17108 PR middle-end/84955
17109 * lto-streamer-out.c (output_function): Fix CFG loop state before
17110 streaming out.
17111 * omp-expand.c (expand_oacc_for): Handle calls to internal
17112 functions like regular functions.
17113
17114 2018-04-12 Richard Biener <rguenther@suse.de>
17115
17116 PR lto/85371
17117 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17118 for the early LTO debug to properly generate references to it
17119 during DIE emission. Do not re-use that for the skeleton for
17120 split-dwarf.
17121 (dwarf2out_early_finish): Likewise.
17122
17123 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17124
17125 PR target/85328
17126 * config/i386/sse.md
17127 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17128 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17129 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17130 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17131 and output is a reg, avoid creating invalid lowpart subreg, but
17132 instead split into a 512-bit move. Don't split if not AVX512VL,
17133 input is xmm16+ reg and output is a mem.
17134 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17135 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17136 xmm16+ reg and output is a mem.
17137
17138 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17139
17140 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17141 also for flag_dwarf2_cfi_asm.
17142
17143 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17144
17145 PR rtl-optimization/85342
17146 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17147 a bool scalar var inside of the loop instead. Don't try to update
17148 recog_data.operand after failed apply_change_group.
17149
17150 2018-04-12 Tom de Vries <tom@codesourcery.com>
17151
17152 PR target/85296
17153 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17154 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17155 array with flexible array member as array without given dimension.
17156 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17157 argument for undefined param to true.
17158
17159 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17160
17161 PR target/85321
17162 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17163 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17164 from PowerPC section.
17165 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17166 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17167 help text that is too long.
17168 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17169 help text that is too long.
17170 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17171 help text that is too long.
17172
17173 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17174
17175 * config/alpha/alpha.md (stack_probe_internal): Rename
17176 from "probe_stack". Update all callers.
17177
17178 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17179
17180 PR rtl-optimization/84566
17181 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17182 sched_macro_fuse_insns.
17183
17184 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17185
17186 PR target/84301
17187 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17188 (compute_block_dependences): ... from here.
17189
17190 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17191
17192 PR tree-optimization/85331
17193 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17194 from int to HOST_WIDE_INT.
17195
17196 2018-04-11 Martin Jambor <mjambor@suse.cz>
17197
17198 PR ipa/84149
17199 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17200 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17201 not the same as the source val.
17202 (cgraph_edge_brings_value_p): New parameter.
17203 (gather_edges_for_value): Pass destination value to
17204 cgraph_edge_brings_value_p.
17205 (perhaps_add_new_callers): Likewise.
17206 (get_info_about_necessary_edges): Likewise and exclude values brought
17207 only by self-recursive edges.
17208 (create_specialized_node): Redirect only clones of self-calling edges.
17209 (+self_recursive_pass_through_p): New function.
17210 (find_more_scalar_values_for_callers_subset): Use it.
17211 (find_aggregate_values_for_callers_subset): Likewise.
17212 (known_aggs_to_agg_replacement_list): Removed.
17213 (decide_whether_version_node): Re-calculate known constants for all
17214 remaining context clones.
17215
17216 2018-04-11 Richard Biener <rguenther@suse.de>
17217
17218 PR lto/85339
17219 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17220 from early DWARF output.
17221 (dwarf2out_early_finish): Output line info unconditionally into
17222 early DWARF and add reference to it.
17223
17224 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17225
17226 PR target/85281
17227 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17228 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17229 other than V2DFmode using iptr mode attribute.
17230 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17231
17232 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17233
17234 PR rtl-optimization/84659
17235 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17236
17237 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17238
17239 PR debug/85302
17240 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17241 SIZEP is NULL.
17242 (output_loc_list): Pass address of a dummy size variable even in the
17243 locview handling loop.
17244 (index_location_lists): Add comment on why skip_loc_list_entry can't
17245 call size_of_locs.
17246
17247 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17248
17249 PR target/85261
17250 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17251 into register.
17252
17253 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17254
17255 PR target/85321
17256 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17257 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17258 and -mstring-compare-inline-limit.
17259
17260 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17261
17262 PR target/85287
17263 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17264 for stack clash protection in a register whenever we need it to be in
17265 a register.
17266
17267 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17268
17269 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17270 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17271
17272 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17273
17274 PR target/85321
17275 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17276 the help text.
17277 (mlong-double-): Ditto.
17278 * config/rs6000/sysv4.opt (msdata=): Ditto.
17279 (mtls-size=): Ditto.
17280
17281 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17282
17283 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17284 erroneous entries for
17285 "vector int vec_ldl (int, long int *)", and
17286 "vector unsigned int vec_ldl (int, unsigned long int *)".
17287 Add comments and entries for
17288 "vector bool char vec_ldl (int, bool char *)",
17289 "vector bool short vec_ldl (int, bool short *)",
17290 "vector bool int vec_ldl (int, bool int *)",
17291 "vector bool long long vec_ldl (int, bool long long *)",
17292 "vector pixel vec_ldl (int, pixel *)",
17293 "vector long long vec_ldl (int, long long *)",
17294 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17295 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17296 type tree bool_long_long_type_node and correct definition of
17297 bool_V2DI_type_node to make reference to this new type tree.
17298 (rs6000_mangle_type): Replace erroneous reference to
17299 bool_long_type_node with bool_long_long_type_node.
17300 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17301 comments to emphasize sign distinctions for char and int types and
17302 replace RS6000_BTI_bool_long constant with
17303 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17304 use of RS6000_BTI_pixel.
17305 (bool_long_type_node): Remove this macro definition.
17306 (bool_long_long_type_node): New macro definition
17307
17308 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17309
17310 PR rtl-optimization/85300
17311 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17312 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17313 simplify_unary_operation fails.
17314
17315 2018-04-10 Martin Liska <mliska@suse.cz>
17316
17317 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17318 cgraph_edge and ipa_ref.
17319
17320 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17321
17322 PR target/85177
17323 PR target/85255
17324 * config/i386/sse.md
17325 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17326 computation of the VEC_MERGE selector from mask.
17327 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17328 Fix decoding of the VEC_MERGE selector into mask.
17329
17330 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17331
17332 PR tree-optimization/85286
17333 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17334
17335 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17336
17337 * final.c (final_1): Set insn_last_address as well as
17338 insn_current_address.
17339
17340 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17341
17342 PR target/85173
17343 * explow.c (emit_stack_probe): Call validize_mem on memory location
17344 before passing it to gen_probe_stack. Create address operand and
17345 legitimize it for the probe_stack_address case.
17346
17347 2018-04-09 Jan Hubicka <jh@suse.cz>
17348
17349 PR lto/85078
17350 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17351 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17352 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17353 walk basetypes.
17354 (free_lang_data): Rebuild type inheritance graph.
17355
17356 2018-04-09 Martin Sebor <msebor@redhat.com>
17357
17358 * invoke.texi (-finline-small-functions): Mention other optimization
17359 options.
17360 (-findirect-inlining, -fpartial-inlining): Same.
17361 (-finline-functions-called-once): Same.
17362 (-freorder-blocks-and-partition): Same.
17363
17364 2018-04-09 Jan Hubicka <jh@suse.cz>
17365
17366 PR rtl/84058
17367 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17368 jumps; choose last target that matches the criteria (i.e.
17369 no partition changes for non-crossing jumps).
17370 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17371 support for redirecting crossing jumps to non-crossing.
17372
17373 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17374
17375 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17376 also for naked functions.
17377
17378 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17379
17380 * config/arc/arc.md (add_shift): New pattern.
17381 (add_shift2): Likewise.
17382 (sub_shift): Likewise.
17383 (sub_shift_cmp0_noout): Likewise.
17384 (compare_si_ashiftsi): Likewise.
17385 (xbfu_cmp0_noout): New combine pattern.
17386 (xbfu_cmp0"): Likewise.
17387 (movsi_set_cc_insn): Place the predicable variant first.
17388 (commutative_binary_cmp0_noout): Remove clobber.
17389 (commutative_binary_cmp0): New pattern.
17390 (noncommutative_binary_cmp0): Likewise.
17391 (noncommutative_binary_cmp0_noout): Likewise.
17392 (noncommutative_binary_comparison_result_used): Removed.
17393 (rsub_cmp0): New pattern.
17394 (rsub_cmp0_noout): Likewise.
17395 (extzvsi): Changed, keep only meaningful variants.
17396 (SQH, SEZ): New iterators.
17397 (SQH_postfix): New mode attribute.
17398 (SEZ_prefix): New code attribute.
17399 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17400 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17401 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17402 of numerical value.
17403 (noncommutative_operator): Check the availability of barrel
17404 shifter option.
17405
17406 2018-04-09 Richard Biener <rguenther@suse.de>
17407
17408 PR tree-optimization/85284
17409 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17410 Only use the niter constraining form of simple_iv when the exit
17411 is always executed.
17412
17413 2018-04-09 Tom de Vries <tom@codesourcery.com>
17414
17415 PR target/84041
17416 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17417 (define_expand "*memory_barrier"): New define_expand.
17418 (define_insn "memory_barrier"): New insn.
17419
17420 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17421
17422 PR rtl-optimization/80463
17423 PR rtl-optimization/83972
17424 PR rtl-optimization/83480
17425
17426 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17427 correct producer for the insn.
17428 (tidy_control_flow): Fixup seqnos in case of debug insns.
17429
17430 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17431
17432 PR rtl-optimization/83913
17433
17434 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17435 different sched-times when merging exprs.
17436
17437 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17438
17439 PR rtl-optimization/83962
17440
17441 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17442 tidy_fallthru_edge and tidy_control_flow.
17443
17444 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17445
17446 PR rtl-optimization/83530
17447
17448 * sel-sched.c (force_next_insn): New global variable.
17449 (remove_insn_for_debug): When force_next_insn is true, also leave only
17450 next insn in the ready list.
17451 (sel_sched_region): When the region wasn't scheduled, make another pass
17452 over it with force_next_insn set to 1.
17453
17454 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17455
17456 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17457 into tm_file.
17458 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17459 for interrupt control.
17460 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17461 functions for interrupt control.
17462 * config/nds32/nds32-intrinsic.md: Likewise.
17463 * config/nds32/nds32_intrinsic.h: Likewise.
17464 * config/nds32/nds32.h (nds32_builtins): Likewise.
17465
17466 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17467
17468 * config/nds32/nds32.c (nds32_init_machine_status,
17469 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17470 strict_aligned_p field.
17471 (nds32_expand_to_rtl_hook): New function.
17472 (TARGET_EXPAND_TO_RTL_HOOK): Define.
17473 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17474
17475 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17476 Chung-Ju Wu <jasonwucj@gmail.com>
17477
17478 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17479 * config/nds32/nds32-n7.md: New file.
17480 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17481 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17482 pipeline.
17483 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17484 * config/nds32/nds32.md (pipeline_model): Add n7.
17485 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17486 * config/nds32/pipelines.md: Include n7 settings.
17487
17488 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17489 Chung-Ju Wu <jasonwucj@gmail.com>
17490
17491 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17492 * config/nds32/nds32-e8.md: New file.
17493 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17494 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17495 pipeline.
17496 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17497 * config/nds32/nds32.md (pipeline_model): Add e8.
17498 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17499 * config/nds32/pipelines.md: Include e8 settings.
17500
17501 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17502 Chung-Ju Wu <jasonwucj@gmail.com>
17503
17504 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17505 * config/nds32/nds32-n8.md: New file.
17506 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17507 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17508 pipeline.
17509 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17510 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17511 * config/nds32/nds32.md (pipeline_model): Add n8.
17512 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17513 * config/nds32/pipelines.md: Include n8 settings.
17514
17515 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17516 Chung-Ju Wu <jasonwucj@gmail.com>
17517
17518 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17519 * config/nds32/nds32-n9-2r1w.md: New file.
17520 * config/nds32/nds32-n9-3r2w.md: New file.
17521 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17522 nds32_register_ports): New or modify for cpu n9.
17523 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17524 pipeline.
17525 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17526 * config/nds32/nds32-utils.c: New file.
17527 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17528 TARGET_MUL_SLOW): Define.
17529 * config/nds32/nds32.md (pipeline_model): New attribute.
17530 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17531 New options that support cpu n9.
17532 * config/nds32/pipelines.md: Include n9 settings.
17533 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17534
17535 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17536
17537 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17538 information if necessary.
17539 (output_cond_branch_compare_zero): Likewise.
17540 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17541 (nds32_target_alignment): Refine for alignment.
17542 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17543 (FUNCTION_BOUNDARY): Modify.
17544 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17545 align case.
17546 * config/nds32/nds32.opt (malways-align, malign-functions): New.
17547
17548 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17549
17550 * config/nds32/constants.md (unspec_volatile_element): Add values for
17551 TLB operation and data prefetch.
17552 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17553 functions for TLB operation and data prefetch.
17554 * config/nds32/nds32-intrinsic.md: Likewise.
17555 * config/nds32/nds32_intrinsic.h: Likewise.
17556 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17557 (nds32_print_operand): Likewise.
17558 * config/nds32/nds32.h (nds32_builtins): Likewise.
17559
17560 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
17561 Andrew Pinski <pinsika@gcc.gnu.org>
17562
17563 PR middle-end/82976
17564 * match.pd: Use constant_boolean_node of correct type instead of
17565 boolean_true_node or boolean_false_node for simplifying
17566 pointer comparisons to zero.
17567
17568 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17569
17570 PR tree-optimization/80021
17571 * tree.c (verify_type_variant): Make error call in verify_variant_match
17572 translatable and remove final full stop.
17573
17574 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17575
17576 * config/nds32/constants.md (unspec_volatile_element): Add
17577 UNSPEC_VOLATILE_EH_RETURN.
17578 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17579 nds32_output_stack_pop): Support dwarf exception handling process.
17580 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17581 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17582 exception handling process.
17583 (nds32_compute_stack_frame): Likewise.
17584 (nds32_return_addr_rtx): Likewise.
17585 (nds32_initial_elimination_offset): Likewise.
17586 (nds32_expand_prologue): Likewise.
17587 (nds32_expand_epilogue): Likewise.
17588 (nds32_dynamic_chain_address): New function.
17589 * config/nds32/nds32.h (machine_function): Add fields for dwarf
17590 exception handling.
17591 (DYNAMIC_CHAIN_ADDRESS): Define.
17592 (EH_RETURN_DATA_REGNO): Define.
17593 (EH_RETURN_STACKADJ_RTX): Define.
17594 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17595 patterns for dwarf exception handling.
17596
17597 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17598
17599 * config/nds32/nds32.h: Clean up obsolete macros.
17600
17601 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17602
17603 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17604 Add enum values for particular instructions.
17605 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17606 particular intrinsic functions.
17607 * config/nds32/nds32-intrinsic.md: Likewise.
17608 * config/nds32/nds32_intrinsic.h: Likewise.
17609 * config/nds32/nds32.h (nds32_builtins): Likewise.
17610 * config/nds32/nds32.md (type): Add pbsad and pbsada.
17611 (btst, ave): New patterns for particular instructions.
17612
17613 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17614
17615 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17616 Add enum values for atomic load/store and memory sync.
17617 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17618 and memory sync.
17619 * config/nds32/nds32-intrinsic.md: Likewise.
17620 * config/nds32/nds32_intrinsic.h: Likewise.
17621 * config/nds32/nds32.h (nds32_builtins): Likewise.
17622
17623 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17624
17625 PR tree-optimization/85257
17626 * fold-const.c (native_encode_vector): If not all elts could fit
17627 and off is -1, return 0 rather than offset.
17628 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17629 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17630 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
17631 adjust buffer in native_interpret_expr call.
17632
17633 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17634
17635 * config/nds32/constants.md (unspec_volatile_element): Add cache
17636 control enum values.
17637 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17638 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17639 * config/nds32/nds32.c (nds32_cctl_names): New.
17640 (nds32_print_operand): Handle cache control register names.
17641 * config/nds32/nds32.h (nds32_builtins): New enum values.
17642 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17643 macros.
17644 * config/nds32/nds32.md (type): Add mmu.
17645 * config/nds32/pipelines.md (simple_insn): Add mmu.
17646
17647 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17648
17649 * config/nds32/nds32.md (type): Remove call.
17650 * config/nds32/pipelines.md (simple_insn): Likewise.
17651
17652 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17653
17654 * config/nds32/constants.md (unspec_volatile_element): Add
17655 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17656 UNSPEC_VOLATILE_FMFCFG.
17657 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17658 description for fmfcfg and fmfcsr.
17659 (bdesc_1arg): Add fmtcsr.
17660 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17661 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17662 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17663 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17664 unspec_fmfcfg): New patterns.
17665 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17666 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17667 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17668 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17669 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17670 __nds32__fmfcfg): Define.
17671
17672 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17673
17674 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17675 intrinsic register names.
17676 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17677 intrinsic register enum values and macros.
17678
17679 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17680
17681 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17682 for load/store addressing form.
17683 (nds32_print_operand_address): Likewise.
17684
17685 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
17686
17687 PR target/85196
17688 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17689 based on LABEL_REF. Remove useless assertion.
17690 (pic_address_needs_scratch): Fix formatting.
17691 (sparc_legitimize_pic_address): Minor tweaks.
17692 (sparc_delegitimize_address): Adjust assertion accordingly.
17693 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17694 into symbolic_operand.
17695 (movsi_high_pic_label_ref): Likewise.
17696 (movsi_lo_sum_pic_label_ref): Likewise.
17697 (movdi_pic_label_ref): Likewise.
17698 (movdi_high_pic_label_ref): Likewise.
17699 (movdi_lo_sum_pic_label_ref): Likewise.
17700
17701 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
17702
17703 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17704 custom LIB_SPEC setup.
17705
17706 2018-04-06 Ruslan Bukin <br@bsdpad.com>
17707 Kito Cheng <kito.cheng@gmail.com>
17708
17709 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17710 * config/riscv/freebsd.h: New.
17711
17712 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17713
17714 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17715 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17716 file.
17717
17718 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17719 Kito Cheng <kito.cheng@gmail.com>
17720
17721 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17722 nds32_output_call, nds32_symbol_binds_local_p): New functions.
17723 * config/nds32/nds32-protos.h (nds32_output_call,
17724 nds32_output_return): Declare.
17725 * config/nds32/nds32.md: Refine all the call and return patterns.
17726
17727 2018-04-06 Jakub Jelinek <jakub@redhat.com>
17728
17729 PR debug/85252
17730 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17731 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17732
17733 PR rtl-optimization/84872
17734 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17735 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17736 EDGE_CROSSING edge.
17737
17738 2018-04-06 Tamar Christina <tamar.christina@arm.com>
17739
17740 * expr.c (copy_blkmode_to_reg): Revert 254862.
17741 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17742
17743 2018-04-06 Richard Biener <rguenther@suse.de>
17744
17745 PR middle-end/85244
17746 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17747 after seeing a component reference with an adjacent field. Treat
17748 refs to arrays at struct end of external decls similar to
17749 refs to unconstrained commons.
17750
17751 2018-04-06 Jakub Jelinek <jakub@redhat.com>
17752
17753 PR sanitizer/85213
17754 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17755 look through SAVE_EXPRs with non-side-effects argument. Adjust
17756 recursive calls.
17757 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17758 save_p here.
17759
17760 2018-04-06 Richard Biener <rguenther@suse.de>
17761
17762 PR middle-end/85180
17763 * alias.c (find_base_term): New wrapper around find_base_term
17764 unwinding CSELIB_VAL_PTR changes.
17765 (find_base_term): Do not restore CSELIB_VAL_PTR during the
17766 recursion.
17767
17768 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17769
17770 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17771 instructions.
17772 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17773 constant definitions.
17774 ("nop"): lr 0,0 -> nopr r0
17775 ("nop_lr0", "nop_lr1"): New insn definitions.
17776
17777 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17778
17779 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17780 NDS32_V3PUSH_AVAILABLE_P macro.
17781
17782 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
17783 Chung-Ju Wu <jasonwucj@gmail.com>
17784
17785 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
17786 (nds32*-*-*): Add float and fpu_config into supported_defaults.
17787 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
17788 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
17789 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
17790 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
17791 * config/nds32/constraints.md: New constraints and checking for hard
17792 float configuration.
17793 * config/nds32/iterators.md: New mode iterator and attribute for hard
17794 float configuration.
17795 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
17796 patterns.
17797 * config/nds32/nds32-fpu.md: New file.
17798 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
17799 deal with hard float code generation.
17800 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
17801 ARCH_V3S.
17802 (abi_type, float_reg_number): New enum type.
17803 * config/nds32/nds32-predicates.c: New predicates for hard float.
17804 * config/nds32/nds32-protos.h: Declare functions for hard float.
17805 * config/nds32/nds32.c: Implementation for hard float configuration.
17806 * config/nds32/nds32.h: Definitions for hard float configuration.
17807 * config/nds32/nds32.md: Include hard float machine description and
17808 modify patterns for hard float configuration.
17809 * config/nds32/nds32.opt: New options for hard float configuration.
17810 * config/nds32/predicates.md: New predicates for hard float
17811 configuration.
17812
17813 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17814
17815 * common/config/nds32/nds32-common.c
17816 (nds32_option_optimization_table): Enable -mreleax-hint by default.
17817
17818 2018-04-05 Jakub Jelinek <jakub@redhat.com>
17819
17820 PR middle-end/85195
17821 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
17822 CONSTRUCTOR_ELT (ctor, ...)->value.
17823
17824 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
17825
17826 PR target/85193
17827 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
17828
17829 2018-04-05 Tom de Vries <tom@codesourcery.com>
17830
17831 PR target/85204
17832 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
17833 cond jump.
17834
17835 2018-04-05 Shiva Chen <shiva0217@gmail.com>
17836 Kito Cheng <kito.cheng@gmail.com>
17837
17838 * config/nds32/constraints.md (U33): Fine-tune checking condition.
17839 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
17840 * config/nds32/nds32.h (nds32_16bit_address_type): Add
17841 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
17842
17843 2018-04-05 Shiva Chen <shiva0217@gmail.com>
17844 Kito Cheng <kito.cheng@gmail.com>
17845
17846 * config/nds32/constraints.md (Ufe): New memory constraint.
17847 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
17848 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
17849 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
17850 operands.
17851 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
17852 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
17853
17854 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17855
17856 * config/nds32/nds32.md: Use optimize_size in the condition for
17857 alu-shift instructions.
17858
17859 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17860
17861 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
17862
17863 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17864
17865 * config/nds32/nds32.md (negsi2): Refine pattern.
17866
17867 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
17868 Chung-Ju Wu <jasonwucj@gmail.com>
17869
17870 * config/nds32/iterators.md (shift_rotate): New code iterator.
17871 (shift): New code attribute.
17872 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
17873 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
17874 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
17875 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
17876 bit-wise operations.
17877 (andsi3, *andsi3): Ditto.
17878 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
17879 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
17880 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
17881 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
17882 nds32_ior_operand, nds32_xor_operand): New predicates.
17883
17884 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17885
17886 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
17887 (addsi3, subsi3): ... this.
17888
17889 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17890
17891 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
17892
17893 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17894
17895 * config/nds32/nds32.md: Adjust indention.
17896
17897 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
17898
17899 * config/nds32/nds32.md (feature): New attribute.
17900
17901 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17902
17903 * config/nds32/nds32.md (subtype): New attribute.
17904
17905 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
17906
17907 PR target/85203
17908 * config/arm/arm-builtins.c (arm_expand_builtin): Change
17909 expansion to perform a bitwise AND of the argument followed by a
17910 boolean negation of the result.
17911
17912 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
17913
17914 PR rtl-optimization/84878
17915 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
17916 the basic block. Assert the use reference is not artificial and that
17917 it has an associated insn.
17918
17919 2018-04-04 Michael Matz <matz@suse.de>
17920
17921 * builtins.c (compute_objsize): Pass correct operand
17922 to array_at_struct_end_p.
17923
17924 2018-04-04 Richard Biener <rguenther@suse.de>
17925
17926 PR lto/85176
17927 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
17928 from contexts for DINFO_LEVEL_TERSE and below.
17929
17930 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
17931
17932 * config/nds32/nds32-doubleword.md (move_<mode>): Require
17933 resiter_operand condition.
17934 * config/nds32/nds32.md (*move<mode>): Ditto.
17935
17936 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
17937 Monk Chiang <sh.chiang04@gmail.com>
17938
17939 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
17940
17941 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
17942
17943 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
17944
17945 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
17946 Kito Cheng <kito.cheng@gmail.com>
17947
17948 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
17949 nds32_cond_code_str, output_cond_branch,
17950 output_cond_branch_compare_zero, nds32_expand_cbranch,
17951 nds32_expand_cstore, nds32_expand_movcc,
17952 nds32_output_cbranchsi4_equality_zero,
17953 nds32_output_cbranchsi4_equality_reg,
17954 nds32_output_cbranchsi4_equality_reg_or_const_int,
17955 nds32_output_cbranchsi4_greater_less_zero: New functions.
17956 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
17957 nds32_expand_cstore, nds32_expand_movcc,
17958 nds32_output_cbranchsi4_equality_zero,
17959 nds32_output_cbranchsi4_equality_reg,
17960 nds32_output_cbranchsi4_equality_reg_or_const_int,
17961 nds32_output_cbranchsi4_greater_less_zero): Declare.
17962 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
17963 nds32_rimm11s_operand): New predicates.
17964 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
17965 * config/nds32/nds32.md: Rewrite all the branch and conditional move
17966 patterns.
17967
17968 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
17969
17970 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
17971 * config/nds32/nds32.md: Ditto.
17972 * config/nds32/pipelines.md: Ditto.
17973
17974 2018-04-04 Richard Biener <rguenther@suse.de>
17975
17976 PR tree-optimization/85168
17977 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
17978 propagating abnormals.
17979
17980 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
17981
17982 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
17983
17984 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
17985 Kito Cheng <kito.cheng@gmail.com>
17986
17987 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
17988 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
17989 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
17990 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
17991 * config/nds32/nds32.md (sibcall_internal): New.
17992 (sibcall_register): Remove.
17993 (sibcall_immediate): Remove.
17994 (sibcall_value_internal): New.
17995 (sibcall_value_register): Remove.
17996 (sibcall_value_immediate): Remove.
17997 * config/nds32/predicates.md (nds32_general_register_operand): New.
17998 (nds32_call_address_operand): New.
17999
18000 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18001
18002 PR rtl-optimization/85167
18003 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18004 bb_defs if *split_p, instead preinitialize it to NULL.
18005
18006 PR tree-optimization/85156
18007 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18008 evaluating the argument multiple times.
18009
18010 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18011
18012 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18013 than vector.
18014 (_mm_cvtpd_ps): Likewise.
18015 (_mm_cvttpd_epi32): Likewise.
18016 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18017 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18018 vector, pixel, and bool following altivec.h include.
18019
18020 2018-04-03 Martin Sebor <msebor@redhat.com>
18021
18022 * doc/extend.texi (Common Function Attributes): Clarify.
18023 (const attribute): Likewise.
18024 (pure attribute): Likewise.
18025
18026 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18027
18028 PR target/85169
18029 * config/i386/i386.c (ix86_expand_vector_set): Use
18030 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18031
18032 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18033
18034 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18035 instructions when changing rounding bits to preserve precision bits
18036 in the x87 control word.
18037
18038 2018-04-03 Martin Liska <mliska@suse.cz>
18039
18040 PR tree-optimization/82491
18041 * rtl.h (strip_offset_and_add): Replace += suboffset with
18042 poly_uint64 () + suboffset.
18043
18044 2018-03-29 Martin Liska <mliska@suse.cz>
18045 Martin Jambor <mjambor@suse.cz>
18046
18047 PR ipa/84947
18048 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18049 param_type is not an integral or pointer type.
18050
18051 2018-04-03 Richard Biener <rguenther@suse.de>
18052
18053 * sese.h (recompute_all_dominators): Remove.
18054
18055 2018-04-02 Martin Sebor <msebor@redhat.com>
18056
18057 * doc/invoke.texi (-Wrestrict): Fix typos.
18058
18059 2018-04-02 Jim Wilson <jimw@sifive.com>
18060
18061 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18062 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18063 (<optab>di3, <optab>si3_extend): Likewise.
18064 (<optab>si3_mask, <optab>si3_mask_1): New.
18065 (<optab>di3_mask, <optab>di3_mask_1): New.
18066 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18067 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18068 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18069
18070 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18071
18072 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18073 example.
18074
18075 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18076
18077 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18078 (nds32_canonicalize_comparison): New function.
18079
18080 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18081 Kito Cheng <kito.cheng@gmail.com>
18082 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18083
18084 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18085 * config/nds32/constants.md (unspec_volatile_element): Add
18086 UNSPEC_VOLATILE_RELAX_GROUP.
18087 * config/nds32/nds32-relax-opt.c: New file.
18088 * config/nds32/nds32-predicates.c
18089 (nds32_symbol_load_store_p): New function.
18090 * config/nds32/nds32-protos.h
18091 (nds32_symbol_load_store_p): Declare function.
18092 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18093 * config/nds32/nds32.c
18094 (nds32_register_pass): New function to register pass.
18095 (nds32_register_passes): New function to register passes.
18096 * config/nds32/nds32.md (relax_group): New pattern.
18097 * config/nds32/nds32.opt (mrelax-hint): New option.
18098 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18099
18100 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18101
18102 * config/nds32/t-nds32: Modify files dependency.
18103
18104 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18105
18106 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18107 (PROFILE_HOOK): Define its implementation.
18108
18109 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18110
18111 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18112 type and 32-bit size.
18113
18114 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18115
18116 PR middle-end/85090
18117 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18118 (V_128_256): New mode iterator.
18119 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18120 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18121 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18122 of V.
18123 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18124 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18125
18126 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18127
18128 PR target/83315
18129 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18130 NaN inputs correctly.
18131
18132 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18133
18134 PR target/80546
18135 * config/rs6000/vsx.md (??r): New mode attribute.
18136 (*vsx_mov<mode>_64bit): Use it.
18137 (*vsx_mov<mode>_32bit): Likewise.
18138
18139 2018-03-30 Martin Sebor <msebor@redhat.com>
18140
18141 PR tree-optimization/84818
18142 * builtins.c (check_access): Use warning_n.
18143
18144 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18145
18146 PR target/83822
18147 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18148 condition.
18149 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18150 condition.
18151
18152 2018-03-30 Julia Koval <julia.koval@intel.com>
18153
18154 PR target/84413
18155 * x86-tune.def (movx, partial_reg_dependency): Enable for
18156 m_SKYLAKE_AVX512.
18157
18158 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18159
18160 PR inline-asm/84985
18161 * lra-constraints.c (process_alt_operands): Move setting
18162 this_alternative_matches below.
18163
18164 2018-03-29 Martin Liska <mliska@suse.cz>
18165
18166 PR lto/84995.
18167 * doc/invoke.texi: Document how LTO works with debug info.
18168 Describe auto-load support of binutils. Mention 'x86-64'
18169 as valid option value of -march option.
18170
18171 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18172
18173 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18174
18175 PR c/85094
18176 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18177 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18178 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18179 checking.
18180
18181 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18182
18183 PR target/84912
18184 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18185 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18186 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18187 for RS6000_BTM_POWERPC64.
18188 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18189 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18190 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18191 definition.
18192 (DIVDE): Use it.
18193 (DIVDEU): Likewise.
18194
18195 2018-03-28 Carl Love <cel@us.ibm.com>
18196
18197 Revert
18198 2017-09-27 Carl Love <cel@us.ibm.com>
18199
18200 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18201 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18202 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18203 fctiw instruction.
18204
18205 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18206
18207 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18208 instead of __vector bool.
18209 (_mm_max_pu8): Likewise.
18210 (_mm_min_pi16): Likewise.
18211
18212 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18213
18214 PR target/84912
18215 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18216 (DIVWEUO): Likewise.
18217 (DIVDEO): Likewise.
18218 (DIVDEUO): Likewise.
18219 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18220 DIVWEUO and DIVDEUO.
18221 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18222 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18223 (div_extend): Likewise.
18224 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18225 builtin function.
18226 (__builtin_divweuo): Likewise.
18227 (__builtin_divdeo): Likewise.
18228 (__builtin_divdeuo): Likewise.
18229
18230 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18231
18232 PR target/85095
18233 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18234 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18235
18236 PR tree-optimization/82004
18237 * gimple-match-head.c (optimize_pow_to_exp): New function.
18238 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18239 Don't fold to exp if optimize_pow_to_exp is false.
18240
18241 2018-03-28 Martin Liska <mliska@suse.cz>
18242
18243 PR other/84819
18244 * calls.c (initialize_argument_information): Fix trailing space.
18245 * common.opt: Fix typo and provide better explanation for
18246 -fsanitize-coverage option.
18247 * config/i386/i386.opt: Fix typo.
18248
18249 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18250 Martin Liska <mliska@suse.cz>
18251
18252 PR sanitizer/85081
18253 * gimplify.c (asan_poison_variable): Don't do the check for
18254 gimplify_omp_ctxp here.
18255 (gimplify_decl_expr): Do it here.
18256 (gimplify_target_expr): Likewise.
18257
18258 2018-03-28 Martin Liska <mliska@suse.cz>
18259
18260 PR target/84988
18261 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18262 chkp_type_bounds_count if MPX is not enabled.
18263
18264 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18265
18266 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18267
18268 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18269
18270 PR target/84914
18271 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18272 function to create the function decl for complex long double
18273 multiply and divide for -mabi=ieeelongdouble.
18274 (init_float128_ieee): Call it.
18275
18276 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18277
18278 PR target/85044
18279 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18280 -fcf-protection=branch -mibt.
18281 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18282
18283 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18284
18285 PR target/81863
18286 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18287 arm_word_relocations.
18288
18289 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18290
18291 PR target/85056
18292 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18293 extern array declarations.
18294
18295 2018-03-27 Richard Biener <rguenther@suse.de>
18296
18297 PR middle-end/84067
18298 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18299 explicit single_use checks.
18300
18301 2018-03-27 Richard Biener <rguenther@suse.de>
18302
18303 PR tree-optimization/85082
18304 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18305 Valueize the VUSE.
18306
18307 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18308
18309 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18310 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18311 Turn on fasynchronous-unwind-tables and funwind-tables.
18312
18313 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18314
18315 PR target/85073
18316 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18317 (*bmi_blsr_<mode>_ccz): Ditto.
18318
18319 2018-03-26 Tom de Vries <tom@codesourcery.com>
18320
18321 PR tree-optimization/85063
18322 * omp-general.c (offloading_function_p): New function. Factor out
18323 of ...
18324 * omp-offload.c (pass_omp_target_link::gate): ... here.
18325 * omp-general.h (offloading_function_p): Declare.
18326 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18327 with attribute omp declare target for offloading functions.
18328
18329 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18330
18331 PR tree-optimization/84005
18332 * tree-data-ref.h (get_base_for_alignment): Declare.
18333 * tree-data-ref.c (get_base_for_alignment_1): New function.
18334 (get_base_for_alignment): Likewise.
18335 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18336 get_base_for_alignment to find a suitable base object, instead
18337 of always using drb->base_address.
18338
18339 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18340
18341 PR inline-asm/85022
18342 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18343 known size by default.
18344
18345 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18346
18347 PR inline-asm/85030
18348 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18349 and non BLKmode operands.
18350
18351 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18352
18353 PR target/85026
18354 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18355 Clean up attributes.
18356
18357 2018-03-23 Richard Biener <rguenther@suse.de>
18358
18359 PR debug/85020
18360 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18361 we are going to emit early debug for LTO.
18362
18363 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18364
18365 PR inline-asm/85034
18366 * function.c (match_asm_constraints_1): Don't optimize if input
18367 doesn't satisfy general_operand predicate for output's mode.
18368
18369 PR inline-asm/85022
18370 * alias.c (write_dependence_p): Don't require for x_canonicalized
18371 non-VOIDmode if x has VOIDmode.
18372
18373 PR sanitizer/85029
18374 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18375 just don't try to optimize it rather than assert it never happens.
18376
18377 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18378
18379 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18380 macro expansions for definition of ST_INTERNAL_<mode> and
18381 LD_INTERNAL_<mode> builtins.
18382 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18383 Remove prototype.
18384 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18385 function.
18386 (altivec_expand_st_builtin): Likewise.
18387 (altivec_expand_builtin): Remove calls to deleted functions.
18388 (rs6000_address_for_altivec): Delete this function.
18389 * config/rs6000/vector.md: Remove expands for
18390 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18391
18392 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18393
18394 PR target/84826
18395 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18396 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18397 re-computing once computed.
18398 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18399 (arm_init_machine_status): Initialize
18400 machine->static_chain_stack_bytes.
18401
18402 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18403
18404 PR target/84760
18405 * doc/extend.texi: Add four new prototypes for vec_ld.
18406 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18407 definitions for more logical presentation.
18408 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18409 entries for V1TI variants of __builtin_altivec_ld builtin.
18410 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18411 handling of V1TI variant of LVX icode pattern.
18412 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18413 (rs6000_gimple_fold_builtin): Likewise.
18414 (altivec_init_builtins): Add code to define
18415 __builtin_altivec_lvx_v1ti function.
18416
18417 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18418
18419 PR inline-asm/84941
18420 * function.c (match_asm_constraints_1): Don't do the optimization
18421 if input isn't a REG, SUBREG, MEM or constant.
18422
18423 2018-03-22 Tom de Vries <tom@codesourcery.com>
18424
18425 PR tree-optimization/84956
18426 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18427 bb_has_abnormal_pred.
18428
18429 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18430
18431 PR sanitizer/85018
18432 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18433 DECL_INITIAL (decl) to decl at the end.
18434 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18435 adjust the comment.
18436
18437 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18438
18439 * doc/extend.texi (__builtin_tgmath): Document when complex
18440 integer types are treated as _Complex _Float64.
18441
18442 2018-03-21 Tom de Vries <tom@codesourcery.com>
18443
18444 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18445
18446 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18447
18448 PR tree-optimization/84960
18449 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18450 if it is ENTRY block, move them into single succ of ENTRY in that case.
18451
18452 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
18453
18454 PR tree-optimization/84811
18455 * poly-int.h (poly_span_traits): Remove the T3 parameter and
18456 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18457 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18458 (known_subrange_p): Update accordingly. Cast each value involved
18459 in the size comparison, rather than casting the result of the
18460 subtraction.
18461
18462 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18463
18464 PR tree-optimization/84982
18465 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18466 by flipping the least significant bit rather than all bits from
18467 bitpos to bitpos + bitsize - 1.
18468
18469 2018-03-21 Nathan Sidwell <nathan@acm.org>
18470
18471 * doc/extend.texi (Deprecated Features): Remove mention of
18472 long-deleted deprecations.
18473
18474 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18475
18476 PR jit/84288
18477 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18478 * configure: Regenerate.
18479
18480 2018-03-21 Tom de Vries <tom@codesourcery.com>
18481
18482 PR tree-optimization/83126
18483 * tree-parloops.c (num_phis): New function.
18484 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18485
18486 2018-03-21 Nathan Sidwell <nathan@acm.org>
18487
18488 * doc/extend.texi (Deprecated Features): Update deprecated flags,
18489 mention anon-struct/union members and trailing attributes.
18490
18491 2018-03-21 Bin Cheng <bin.cheng@arm.com>
18492
18493 PR tree-optimization/84969
18494 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18495 builtin memset partitions if they set different rhs values.
18496
18497 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18498
18499 PR rtl-optimization/84989
18500 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18501 VEC_DUPLICATE with scalar result mode.
18502
18503 2018-03-21 Martin Liska <mliska@suse.cz>
18504
18505 PR ipa/84963
18506 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18507 not intended return statement.
18508
18509 2018-03-21 Martin Liska <mliska@suse.cz>
18510
18511 PR target/84988
18512 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18513 (chkp_find_bound_slots_1): Limit number of iterations.
18514
18515 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
18516
18517 PR target/84838
18518 * Minor grammar fixes for x86 options.
18519
18520 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18521
18522 PR debug/84875
18523 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18524 holding REG_CFA_RESTORE notes, instead turn them into a USE.
18525
18526 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
18527
18528 PR target/83789
18529 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18530 (altivec_lvx_<mode>_1op): Likewise.
18531 (altivec_stvx_<mode>_2op): Likewise.
18532 (altivec_stvx_<mode>_1op): Likewise.
18533 (altivec_lvx_<VM2:mode>): New define_expand.
18534 (altivec_stvx_<VM2:mode>): Likewise.
18535 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18536 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18537 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18538 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18539 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18540 (rs6000_gen_lvx): Likewise.
18541 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18542 (altivec_expand_stv_builtin): Likewise.
18543 (altivec_expand_builtin): Likewise.
18544 * config/rs6000/vector.md: Likewise.
18545
18546 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18547
18548 PR target/82518
18549 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18550 BYTES_BIG_ENDIAN.
18551
18552 2018-03-20 Richard Biener <rguenther@suse.de>
18553
18554 PR target/84986
18555 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18556 sign-conversions as zero, fall back to standard scalar_stmt
18557 cost for the rest.
18558
18559 2018-03-20 Martin Liska <mliska@suse.cz>
18560
18561 PR ipa/84825
18562 * predict.c (rebuild_frequencies): Handle case when we have
18563 PROFILE_ABSENT, but flag_guess_branch_prob is false.
18564
18565 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18566
18567 PR target/84990
18568 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18569 flag_section_anchors.
18570 * varasm.c (use_blocks_for_decl_p): Remove hack for
18571 dw2_force_const_mem.
18572
18573 PR target/84845
18574 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18575 to ...
18576 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
18577 be created, use lowpart_subreg of operands[0] rather than operands[0]
18578 itself.
18579 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18580 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18581 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18582 and n constraint instead of aarch64_shift_imm_di and Usd.
18583 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18584 (*aarch64_<optab>_reg_minus<mode>3): ... this.
18585
18586 2018-03-20 Sudakshina Das <sudi.das@arm.com>
18587
18588 PR target/82989
18589 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18590 to favor GPR over NEON registers.
18591 (<shift>di3_neon): Likewise.
18592
18593 2018-03-20 Tom de Vries <tom@codesourcery.com>
18594
18595 PR target/84952
18596 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18597 (nvptx_process_pars): Emit bar.sync asap and alap.
18598
18599 2018-03-20 Tom de Vries <tom@codesourcery.com>
18600
18601 PR target/84954
18602 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18603 seen_label if seen_label is already set.
18604
18605 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18606
18607 PR target/84945
18608 * config/i386/i386.c (fold_builtin_cpu): For features above 31
18609 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18610 Use 1U instead of 1. Formatting fixes.
18611
18612 PR c/84953
18613 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18614 instead of TREE_TYPE (s1) for the return value.
18615
18616 2018-03-19 Jakub Jelinek <jakub@redhat.com>
18617
18618 PR tree-optimization/84946
18619 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18620 bitsize + bitsize in poly_uint64 rather than poly_int64.
18621
18622 PR sanitizer/78651
18623 * dwarf2asm.c: Include fold-const.c.
18624 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18625 of decl rather than decl itself.
18626
18627 PR rtl-optimization/84643
18628 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18629
18630 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
18631
18632 PR sanitizer/78651
18633 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18634 calling assemble_variable.
18635
18636 2018-03-19 Sudakshina Das <sudi.das@arm.com>
18637
18638 PR target/81647
18639 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18640 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18641
18642 2018-03-19 Jim Wilson <jimw@sifive.com>
18643
18644 PR bootstrap/84856
18645 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18646 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18647 (riscv_first_stack_step): Likewise.
18648 (riscv_option_override): Use STACK_BOUNDARY instead of
18649 MIN_STACK_BOUNDARY.
18650 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18651 MIN_STACK_BOUNDARY.
18652 (BIGGEST_ALIGNMENT): Set to 128.
18653 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18654 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18655 STACK_BOUNDARY.
18656
18657 2018-03-19 Richard Biener <rguenther@suse.de>
18658
18659 PR tree-optimization/84933
18660 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18661 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18662
18663 2018-03-19 Richard Biener <rguenther@suse.de>
18664
18665 PR tree-optimization/84859
18666 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18667 (cond_if_else_store_replacement): Perform sinking operation on
18668 single-store BBs regardless of MAX_STORES_TO_SINK setting.
18669 Generalize what a BB with a single eligible store is.
18670
18671 2018-03-19 Richard Biener <rguenther@suse.de>
18672
18673 PR tree-optimization/84929
18674 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18675 chrec_is_positive against non-chrec arg.
18676
18677 2018-03-19 Tamar Christina <tamar.christina@arm.com>
18678
18679 PR target/84711
18680 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18681
18682 2018-03-18 Martin Liska <mliska@suse.cz>
18683
18684 PR rtl-optimization/84635
18685 * regrename.c (build_def_use): Use matches_mode only when
18686 matches >= 0.
18687
18688 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
18689
18690 PR tree-optimization/84913
18691 * tree-vect-loop.c (vectorizable_reduction): Don't try to
18692 vectorize chains of COND_EXPRs.
18693
18694 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18695
18696 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18697
18698 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18699
18700 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18701
18702 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18703
18704 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18705
18706 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
18707 Kito Cheng <kito.cheng@gmail.com>
18708
18709 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18710 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18711 (nds32_adjust_reg_alloc_order): New function.
18712 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18713
18714 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
18715
18716 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18717 nds32_print_operand, nds32_print_operand_address): Use
18718 HOST_WIDE_INT_PRINT_DEC instead.
18719
18720 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
18721
18722 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18723
18724 2018-03-17 Jakub Jelinek <jakub@redhat.com>
18725
18726 PR target/84902
18727 * config/i386/i386.c (initial_ix86_tune_features,
18728 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18729 unsigned long long.
18730 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18731 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18732 rather than 1u << ix86_tune. Formatting fix.
18733 (ix86_option_override_internal): Change ix86_arch_mask from
18734 unsigned int to unsigned HOST_WIDE_INT, initialize to
18735 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18736 (ix86_function_specific_restore): Likewise.
18737
18738 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18739
18740 PR target/84899
18741 * postreload.c (reload_combine_recognize_pattern): Perform
18742 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18743 truncate_int_for_mode the result for the destination's mode.
18744
18745 PR c/84909
18746 * hsa-gen.c (mem_type_for_type): Fix comment typo.
18747 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18748 Likewise.
18749 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18750 Likewise.
18751
18752 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
18753
18754 PR target/84876
18755 * lra-assigns.c (lra_split_hard_reg_for): Don't use
18756 regno_allocno_class_array and sorted_pseudos.
18757 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18758 insns where regno is used.
18759
18760 2018-03-16 Martin Liska <mliska@suse.cz>
18761
18762 PR ipa/84833
18763 * multiple_target.c (create_dispatcher_calls): Redirect
18764 reference in the symbol table.
18765
18766 2018-03-16 Martin Liska <mliska@suse.cz>
18767
18768 PR ipa/84722
18769 * multiple_target.c (create_dispatcher_calls): Redirect also
18770 an alias.
18771
18772 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18773
18774 PR c++/79937
18775 PR c++/82410
18776 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18777 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18778 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18779
18780 2018-03-16 Julia Koval <julia.koval@intel.com>
18781
18782 * doc/invoke.texi (Skylake Server): Add CLWB.
18783 Cannonlake): Remove CLWB.
18784
18785 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18786
18787 PR tree-optimization/84841
18788 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
18789 1 << 3.
18790 (FLOAT_ONE_CONST_TYPE): Define.
18791 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
18792 (sort_by_operand_rank): Put entries with higher constant_type last
18793 rather than first to match comments.
18794
18795 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
18796
18797 * config/nios2/nios2.md (movsi_internal): Fix thinko in
18798 split predicate.
18799
18800 2018-03-15 Jakub Jelinek <jakub@redhat.com>
18801
18802 PR c++/79085
18803 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
18804 check and use address of target always.
18805
18806 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
18807
18808 PR target/84574
18809 * config/i386/i386.c (indirect_thunk_needed): Update comments.
18810 (indirect_thunk_bnd_needed): Likewise.
18811 (indirect_thunks_used): Likewise.
18812 (indirect_thunks_bnd_used): Likewise.
18813 (indirect_return_needed): New.
18814 (indirect_return_bnd_needed): Likewise.
18815 (output_indirect_thunk_function): Add a bool argument for
18816 function return.
18817 (output_indirect_thunk_function): Don't generate alias for
18818 function return thunk.
18819 (ix86_code_end): Call output_indirect_thunk_function to generate
18820 function return thunks.
18821 (ix86_output_function_return): Set indirect_return_bnd_needed
18822 and indirect_return_needed instead of indirect_thunk_bnd_needed
18823 and indirect_thunk_needed.
18824
18825 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
18826
18827 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
18828 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
18829 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
18830
18831 2018-03-15 David Malcolm <dmalcolm@redhat.com>
18832 Paul Hua <paul.hua.gm@gmail.com>
18833
18834 PR c/84852
18835 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
18836
18837 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
18838
18839 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
18840 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
18841 resp. SFmode cases.
18842
18843 2018-03-15 Tamar Christina <tamar.christina@arm.com>
18844
18845 PR target/84711
18846 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
18847 instead of GET_MODE_SIZE when comparing Units.
18848
18849 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18850
18851 PR target/68256
18852 * varasm.c (hash_section): Return an unchangeble hash value
18853 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
18854 Return !aarch64_can_use_per_function_literal_pools_p ().
18855
18856 2018-03-15 Jakub Jelinek <jakub@redhat.com>
18857
18858 PR target/84860
18859 * optabs.c (emit_conditional_move): Pass address of cmode's copy
18860 rather than address of cmode as last argument to prepare_cmp_insn.
18861
18862 2018-03-15 Julia Koval <julia.koval@intel.com>
18863
18864 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
18865 F_AVX512VNNI, F_AVX512BITALG): New.
18866
18867 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
18868
18869 PR target/83451
18870 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
18871 insn for floating-point loads and stores.
18872
18873 2018-03-14 Carl Love <cel@us.ibm.com>
18874
18875 * config/rs6000/rs6000-c.c: Add macro definitions for
18876 ALTIVEC_BUILTIN_VEC_PERMXOR.
18877 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
18878 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
18879 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
18880 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
18881 UNSPEC_VPERMXOR.
18882 * config/doc/extend.texi: Add prototypes for vec_permxor.
18883
18884 2018-03-14 David Malcolm <dmalcolm@redhat.com>
18885
18886 PR c/84852
18887 * diagnostic-show-locus.c (class layout_point): Convert m_line
18888 from int to linenum_type.
18889 (line_span::comparator): Use linenum "compare" function when
18890 comparing line numbers.
18891 (test_line_span): New function.
18892 (layout_range::contains_point): Convert param "row" from int to
18893 linenum_type.
18894 (layout_range::intersects_line_p): Likewise.
18895 (layout::will_show_line_p): Likewise.
18896 (layout::print_source_line): Likewise.
18897 (layout::should_print_annotation_line_p): Likewise.
18898 (layout::print_annotation_line): Likewise.
18899 (layout::print_leading_fixits): Likewise.
18900 (layout::annotation_line_showed_range_p): Likewise.
18901 (struct line_corrections): Likewise for field m_row.
18902 (line_corrections::line_corrections): Likewise for param "row".
18903 (layout::print_trailing_fixits): Likewise.
18904 (layout::get_state_at_point): Likewise.
18905 (layout::get_x_bound_for_row): Likewise.
18906 (layout::print_line): Likewise.
18907 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
18908 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
18909 * input.c (selftest::test_linenum_comparisons): New function.
18910 (selftest::input_c_tests): Call it.
18911 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
18912 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
18913 * selftest.h (ASSERT_GT): New macro.
18914 (ASSERT_GT_AT): New macro.
18915 (ASSERT_LT): New macro.
18916 (ASSERT_LT_AT): New macro.
18917
18918 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
18919
18920 PR rtl-optimization/84780
18921 * combine.c (distribute_links): Don't make a link based on pc_rtx.
18922
18923 2018-03-14 Martin Liska <mliska@suse.cz>
18924
18925 * tree.c (record_node_allocation_statistics): Use
18926 get_stats_node_kind.
18927 (get_stats_node_kind): New function extracted from
18928 record_node_allocation_statistics.
18929 (free_node): Use get_stats_node_kind.
18930
18931 2018-03-14 Richard Biener <rguenther@suse.de>
18932
18933 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
18934 that the value-set of ANTIC_IN doesn't grow.
18935
18936 Revert
18937 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18938 member.
18939 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18940 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18941
18942 2018-03-14 Julia Koval <julia.koval@intel.com>
18943
18944 * config.gcc (icelake-client, icelake-server): New.
18945 (icelake): Remove.
18946 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
18947 (initial_ix86_arch_features): Ditto.
18948 (PTA_SKYLAKE): Add SGX.
18949 (PTA_ICELAKE): Remove.
18950 (PTA_ICELAKE_CLIENT): New.
18951 (PTA_ICELAKE_SERVER): New.
18952 (ix86_option_override_internal): Split up icelake on icelake client and
18953 icelake server.
18954 (get_builtin_code_for_version): Ditto.
18955 (fold_builtin_cpu): Ditto.
18956 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
18957 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
18958 * config/i386/i386.h (processor_type): Ditto.
18959 * doc/invoke.texi: Ditto.
18960
18961 2018-03-14 Jakub Jelinek <jakub@redhat.com>
18962
18963 PR sanitizer/83392
18964 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
18965 INTEGER_CST offset, add it together with bitpos / 8 and
18966 sign extend based on POINTER_SIZE.
18967
18968 PR target/84844
18969 Revert
18970 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
18971
18972 PR target/78090
18973 * config/i386/constraints.md (Yc): New register constraint.
18974 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
18975 Use Yc constraint for alternative 2 of operand 0. Remove
18976 preferred_for_speed attribute.
18977
18978 2018-03-14 Richard Biener <rguenther@suse.de>
18979
18980 PR tree-optimization/84830
18981 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
18982 with the old one to avoid oscillations.
18983
18984 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
18985
18986 PR target/83712
18987 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
18988 pseudos.
18989 (assign_by_spills): Return a flag of reload assignment failure.
18990 Do not process the reload assignment failures. Do not spill other
18991 reload pseudos if they has the same reg class. Update n if
18992 necessary.
18993 (lra_assign): Add a return arg. Set up from the result of
18994 assign_by_spills call.
18995 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18996 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
18997 usage_insns if it is not NULL.
18998 (spill_hard_reg_in_range): New function.
18999 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19000 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19001 function prototypes.
19002 (lra_assign): Change prototype.
19003 * lra.c (lra): Add code to deal with fails by splitting hard reg
19004 live ranges.
19005
19006 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19007
19008 * config/riscv/riscv.opt (mrelax): New option.
19009 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19010 "norelax" when riscv_mrelax is disabled.
19011 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19012
19013 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19014
19015 PR target/84743
19016 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19017 reassociation for int modes.
19018
19019 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19020
19021 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19022 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19023 for big-endian.
19024 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19025 * config/aarch64/aarch64-sve.md
19026 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19027 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19028 (*extend<mode><Vwide>2): Rename to...
19029 (aarch64_sve_extend<mode><Vwide>2): ...this.
19030 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19031 renaming the old pattern to...
19032 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19033 unsigned packs.
19034 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19035 define_expand, renaming the old pattern to...
19036 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19037 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19038 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19039 account when deciding which SVE instruction the optab should use.
19040 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19041
19042 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19043
19044 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19045 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19046 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19047 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19048 (tlsdesc_small_<mode>): Turn a define_expand and use
19049 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19050 (tlsdesc_small_advsimd_<mode>): ...this.
19051 (tlsdesc_small_sve_<mode>): New pattern.
19052
19053 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19054
19055 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19056 (UNSPEC_UMUL_HIGHPART): New constants.
19057 (MUL_HIGHPART): New int iteraor.
19058 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19059 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19060 define_expand.
19061 (*<su>mul<mode>3_highpart): New define_insn.
19062
19063 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19064
19065 PR lto/84805
19066 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19067 incomplete types.
19068
19069 2018-03-13 Martin Liska <mliska@suse.cz>
19070
19071 PR ipa/84658.
19072 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19073 vector.
19074 (sem_item_optimizer::~sem_item_optimizer): Release it.
19075 (sem_item_optimizer::merge_classes): Register variable aliases.
19076 (sem_item_optimizer::fixup_pt_set): New function.
19077 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19078 * ipa-icf.h: Declare new variables and functions.
19079
19080 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19081
19082 PR middle-end/84834
19083 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19084 integer_pow2p@2 and test integer_pow2p in condition.
19085 (A < 0 ? C : 0): Similarly for @1.
19086
19087 PR middle-end/84831
19088 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19089 characters starting at p contain '\0' character, don't look beyond
19090 that.
19091
19092 PR target/84827
19093 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19094 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19095
19096 PR target/84828
19097 * reg-stack.c (change_stack): Change update_end var from int to
19098 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19099 also call set_block_for_insn on the newly added insns and rescan.
19100
19101 PR target/84786
19102 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19103 on the last operand.
19104
19105 PR c++/84704
19106 * tree.c (stabilize_reference_1): Return save_expr (e) for
19107 STATEMENT_LIST even if it doesn't have side-effects.
19108
19109 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19110
19111 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19112
19113 2018-03-12 Renlin Li <renlin.li@arm.com>
19114
19115 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19116 aarch64_output_scalar_simd_mov_immediate.
19117
19118 2018-03-12 Martin Sebor <msebor@redhat.com>
19119
19120 PR tree-optimization/83456
19121 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19122 for perfectly overlapping calls to memcpy.
19123 (gimple_fold_builtin_memory_chk): Same.
19124 (gimple_fold_builtin_strcpy): Handle no-warning.
19125 (gimple_fold_builtin_stxcpy_chk): Same.
19126 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19127
19128 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19129
19130 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19131 parameter. Use it for SFmode.
19132 (rs6000_function_arg_advance_1): Adjust.
19133 (rs6000_function_arg): Adjust.
19134 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19135
19136 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19137
19138 PR rtl-optimization/84169
19139 PR rtl-optimization/84780
19140 * combine.c (can_combine_p): Check for a 2-insn combination whether
19141 the destination register is used between the two insns, too.
19142
19143 2018-03-12 Richard Biener <rguenther@suse.de>
19144
19145 PR tree-optimization/84803
19146 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19147 for refs DR analysis didn't process.
19148
19149 2018-03-12 Richard Biener <rguenther@suse.de>
19150
19151 PR tree-optimization/84777
19152 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19153 force-vectorize loops ignore whether we are optimizing for size.
19154
19155 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19156
19157 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19158 (TARGET_MD_ASM_ADJUST): Define.
19159
19160 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19161 Kito Cheng <kito.cheng@gmail.com>
19162 Chung-Ju Wu <jasonwucj@gmail.com>
19163
19164 * config/nds32/nds32.c (nds32_compute_stack_frame,
19165 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19166 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19167 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19168 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19169 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19170 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19171 * config/nds32/nds32.md (prologue, epilogue): Use macro
19172 NDS32_V3PUSH_AVAILABLE_P to do checking.
19173
19174 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19175
19176 PR debug/58150
19177 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19178 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19179 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19180 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19181 addition of most attributes on !orig_type_die or the attribute not
19182 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19183
19184 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19185 Chung-Ju Wu <jasonwucj@gmail.com>
19186
19187 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19188 __NDS32_VH__ macro.
19189 * config/nds32/nds32.opt (mvh): New option.
19190
19191 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19192 Chung-Ju Wu <jasonwucj@gmail.com>
19193
19194 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19195 function.
19196 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19197 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19198 definition.
19199
19200 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19201 Chung-Ju Wu <jasonwucj@gmail.com>
19202
19203 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19204 function.
19205 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19206 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19207
19208 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19209 Kito Cheng <kito.cheng@gmail.com>
19210 Chung-Ju Wu <jasonwucj@gmail.com>
19211
19212 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19213 UNSPEC_FFMISM and UNSPEC_FLMISM.
19214 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19215 for ffb, ffmism and flmism.
19216 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19217 (unspec_ffmism): Ditto.
19218 (unspec_flmism): Ditto.
19219 (nds32_expand_builtin_impl): Check if string extension is available.
19220 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19221 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19222
19223 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19224
19225 Reverting patch:
19226 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19227
19228 PR target/83712
19229 * lra-assigns.c (assign_by_spills): Return a flag of reload
19230 assignment failure. Do not process the reload assignment
19231 failures. Do not spill other reload pseudos if they has the same
19232 reg class.
19233 (lra_assign): Add a return arg. Set up from the result of
19234 assign_by_spills call.
19235 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19236 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19237 usage_insns if it is not NULL.
19238 (spill_hard_reg_in_range): New function.
19239 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19240 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19241 function prototypes.
19242 (lra_assign): Change prototype.
19243 * lra.c (lra): Add code to deal with fails by splitting hard reg
19244 live ranges.
19245
19246 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19247
19248 PR target/84807
19249 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19250
19251 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19252
19253 PR debug/84620
19254 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19255 (dw_val_node): Add val_symbolic_view.
19256 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19257 (symview_upper_bound): New.
19258 (new_line_info_table): Initialize symviews_since_reset.
19259 (dwarf2out_source_line): Count symviews_since_reset and set
19260 symview_upper_bound.
19261 (dw_val_equal_p): Handle symview.
19262 (add_AT_symview): New.
19263 (print_dw_val): Handle symview.
19264 (attr_checksum, attr_checksum_ordered): Likewise.
19265 (same_dw_val_p, size_of_die): Likewise.
19266 (value_format, output_die): Likewise.
19267 (add_high_low_attributes): Use add_AT_symview for entry_view.
19268 (dwarf2out_finish): Reset symview_upper_bound, clear
19269 zero_view_p.
19270
19271 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19272
19273 PR target/83969
19274 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19275 Add strict argument and use it.
19276 (rs6000_split_multireg_move): Update for new strict argument.
19277 (mem_operand_gpr): Disallow all non-offsettable addresses.
19278 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19279
19280 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19281
19282 PR target/84772
19283 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19284 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19285 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19286
19287 PR c++/84767
19288 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19289 decl, use remap_type if we want to use the type.
19290
19291 2018-03-09 Martin Sebor <msebor@redhat.com>
19292
19293 PR tree-optimization/84526
19294 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19295 Remove dead code.
19296 (builtin_access::generic_overlap): Be prepared to handle non-array
19297 base objects.
19298
19299 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19300
19301 PR rtl-optimization/84682
19302 * lra-constraints.c (process_address_1): Check is_address flag
19303 for address constraints.
19304 (process_alt_operands): Likewise.
19305 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19306 preprocess_constraints.
19307 * recog.h (preprocess_constraints): Add oploc parameter.
19308 Adjust callers.
19309 * recog.c (preprocess_constraints): Test address_operand for
19310 CT_ADDRESS constraints.
19311
19312 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19313
19314 PR target/83712
19315 * lra-assigns.c (assign_by_spills): Return a flag of reload
19316 assignment failure. Do not process the reload assignment
19317 failures. Do not spill other reload pseudos if they has the same
19318 reg class.
19319 (lra_assign): Add a return arg. Set up from the result of
19320 assign_by_spills call.
19321 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19322 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19323 usage_insns if it is not NULL.
19324 (spill_hard_reg_in_range): New function.
19325 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19326 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19327 function prototypes.
19328 (lra_assign): Change prototype.
19329 * lra.c (lra): Add code to deal with fails by splitting hard reg
19330 live ranges.
19331
19332 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19333
19334 PR target/83193
19335 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19336 Accept complain bool parameter. Only emit errors if it is true.
19337 (arm_parse_cpu_option_name): Likewise.
19338 (arm_target_thumb_only): Adjust callers of the above.
19339 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19340 prototype to take a default true bool parameter.
19341 (arm_parse_arch_option_name): Likewise.
19342
19343 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19344 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19345
19346 PR jit/64089
19347 PR jit/84288
19348 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19349 * configure: Regenerate.
19350 * configure.ac ("linker --version-script option"): New.
19351 ("linker soname option"): New.
19352
19353 2018-03-09 Richard Biener <rguenther@suse.de>
19354
19355 PR tree-optimization/84775
19356 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19357 immediate uses of predicate stmts and mark them modified.
19358
19359 Revert
19360 PR tree-optimization/84178
19361 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19362 to caller.
19363 (version_loop_for_if_conversion): Delay update_ssa call.
19364 (tree_if_conversion): Delay update_ssa until after predicate
19365 insertion.
19366
19367 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19368
19369 PR target/84763
19370 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19371 when the function accesses prior frames.
19372
19373 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19374
19375 PR debug/84456
19376 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19377 gen_llsym, otherwise call maybe_gen_llsym.
19378
19379 PR inline-asm/84742
19380 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19381 has ',' character inside of it.
19382
19383 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19384
19385 PR target/84748
19386 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19387 as clobbering CC_REGNUM.
19388
19389 2018-03-08 Richard Biener <rguenther@suse.de>
19390
19391 PR middle-end/84552
19392 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19393 (follow_copies_to_constant): Do not follow SSA names registered
19394 for update.
19395
19396 2018-03-08 Richard Biener <rguenther@suse.de>
19397
19398 PR tree-optimization/84178
19399 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19400 to caller.
19401 (version_loop_for_if_conversion): Delay update_ssa call.
19402 (tree_if_conversion): Delay update_ssa until after predicate
19403 insertion.
19404
19405 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19406
19407 PR tree-optimization/84178
19408 * tree-if-conv.c (release_bb_predicate): Remove the
19409 the assertion that the stmts have NULL use_ops.
19410 Discard the statements, asserting that they haven't
19411 yet been added to a BB.
19412
19413 2018-03-08 Richard Biener <rguenther@suse.de>
19414
19415 PR tree-optimization/84746
19416 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19417 (phi_translate): Pass in destination ANTIC_OUT set.
19418 (phi_translate_1): Likewise. For a simplified result lookup
19419 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19420 (phi_translate_set): Adjust.
19421 (do_pre_regular_insertion): Likewise.
19422 (do_pre_partial_partial_insertion): Likewise.
19423
19424 2018-03-08 Martin Liska <mliska@suse.cz>
19425
19426 PR gcov-profile/84735
19427 * doc/gcov.texi: Document usage of profile files.
19428 * gcov-io.h: Document changes in the format.
19429
19430 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19431
19432 PR debug/84404
19433 PR debug/84408
19434 * dwarf2out.c (struct dw_line_info_table): Update comments for
19435 view == -1.
19436 (FORCE_RESET_NEXT_VIEW): New.
19437 (FORCE_RESETTING_VIEW_P): New.
19438 (RESETTING_VIEW_P): Check for -1 too.
19439 (ZERO_VIEW_P): Likewise.
19440 (new_line_info_table): Force-reset next view.
19441 (dwarf2out_begin_function): Likewise.
19442 (dwarf2out_source_line): Simplify zero_view_p initialization.
19443 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19444 view directly. Omit view when omitting .loc at line 0.
19445
19446 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19447
19448 PR tree-optimization/84740
19449 * tree-switch-conversion.c (process_switch): Call build_constructors
19450 only if info.phi_count is non-zero.
19451
19452 PR tree-optimization/84739
19453 * tree-tailcall.c (find_tail_calls): Check call arguments against
19454 DECL_ARGUMENTS (current_function_decl) rather than
19455 DECL_ARGUMENTS (func) when checking for tail recursion.
19456
19457 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19458
19459 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19460 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19461 Volker Reichelt's entry and add entries for people that perform
19462 GCC fuzzy testing and report numerous bugs.
19463
19464 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
19465
19466 PR target/82411
19467 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19468 readonly data in sdata, if that is disabled.
19469 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19470 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19471 -mreadonly-in-sdata option.
19472
19473 2018-03-07 Martin Sebor <msebor@redhat.com>
19474
19475 PR tree-optimization/84468
19476 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19477 basic block when looking for nul assignment.
19478
19479 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
19480
19481 PR target/84277
19482 * except.h (output_function_exception_table): Adjust prototype.
19483 * except.c (output_function_exception_table): Remove FNNAME parameter
19484 and add SECTION parameter. Ouput one part of the table at a time.
19485 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19486 the first part of the exception table and emit unwind directives.
19487 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19488 (i386_pe_seh_cold_init): Likewise.
19489 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19490 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19491 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19492 (ix86_output_call_insn): Emit a nop in one more case for SEH.
19493 * config/i386/winnt.c: Include except.h.
19494 (struct seh_frame_state): Add reg_offset, after_prologue and
19495 in_cold_section fields.
19496 (i386_pe_seh_end_prologue): Set seh->after_prologue.
19497 (i386_pe_seh_cold_init): New function.
19498 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19499 to seh->in_cold_section.
19500 (seh_emit_push): Record the offset of the push.
19501 (seh_emit_save): Record the offet of the save.
19502 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19503 Test seh->after_prologue to disregard the epilogue.
19504 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19505 (i386_pe_end_cold_function): New function.
19506
19507 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19508
19509 PR fortran/84565
19510 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19511 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19512
19513 PR c++/84704
19514 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19515 on tmp_var.
19516 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19517 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19518
19519 PR middle-end/84723
19520 * multiple_target.c: Include tree-inline.h and intl.h.
19521 (expand_target_clones): Diagnose and fail if node->definition and
19522 !tree_versionable_function_p (node->decl).
19523
19524 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
19525
19526 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19527 sprint_ul.
19528 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19529 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19530 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19531
19532 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19533
19534 PR target/84710
19535 * combine.c (try_combine): Use reg_or_subregno instead of handling
19536 just paradoxical SUBREGs and REGs.
19537
19538 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
19539
19540 * config/arc/arc.c (arc_finalize_pic): Remove function.
19541 (arc_must_save_register): We use single base PIC register, remove
19542 checks to save/restore the PIC register.
19543 (arc_expand_prologue): Likewise.
19544 * config/arc/arc-protos.h (arc_set_default_type_attributes):
19545 Remove.
19546 (arc_verify_short): Likewise.
19547 (arc_attr_type): Likewise.
19548 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19549 (walk_stores): Likewise.
19550 (arc_address_cost): Make it static.
19551 (arc_verify_short): Likewise.
19552 (branch_dest): Likewise.
19553 (arc_attr_type): Likewise.
19554 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19555 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19556 (arc_final_prescan_insn): Remove inserting the nops due to
19557 hardware hazards. It is done in reorg step.
19558 (insn_length_variant_t): Remove.
19559 (insn_length_parameters_t): Likewise.
19560 (arc_insn_length_parameters): Likewise.
19561 (arc_get_insn_variants): Likewise.
19562 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19563
19564 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19565
19566 PR inline-asm/84683
19567 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19568 assertion failure.
19569
19570 PR tree-optimization/84687
19571 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19572 on new_node->decl.
19573 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19574
19575 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19576
19577 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19578 Rename to ppc_speculation_barrier.
19579 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19580 __builtin_ppc_speculation_barrier.
19581
19582 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19583
19584 PR target/84700
19585 * combine.c (combine_simplify_rtx): Don't try to simplify if
19586 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19587 are equal to x.
19588
19589 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
19590
19591 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19592 to 32 bytes when compiling for POWER9.
19593
19594 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19595
19596 PR target/84564
19597 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19598 regparm >= 3 with no arg reg available also for calls with
19599 flag_force_indirect_call. Pass decl to ix86_function_regparm.
19600
19601 PR target/84524
19602 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19603 orig,vex.
19604 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
19605
19606 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
19607
19608 PR target/84264
19609 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19610
19611 2018-03-05 Richard Biener <rguenther@suse.de>
19612
19613 PR tree-optimization/84486
19614 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19615 When inserting a __builtin_assume_aligned call set the LHS
19616 SSA name alignment info accordingly.
19617
19618 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
19619
19620 PR tree-optimization/84114
19621 * config/aarch64/aarch64.c (aarch64_reassociation_width)
19622 Avoid reassociation of FLOAT_MODE addition.
19623
19624 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
19625
19626 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19627 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19628 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19629 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19630 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19631 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19632 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19633 and -mwbnoinvd.
19634 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19635 __builtin_ia32_wbinvd): New builtins.
19636 (SPECIAL_ARGS2): New.
19637 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19638 (SPECIAL_ARGS2): New.
19639 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19640 (ix86_valid_target_attribute_inner_p): Ditto.
19641 (ix86_init_mmx_sse_builtins): Add special_args2.
19642 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19643 TARGET_WBNOINVD_P): New.
19644 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19645 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19646 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19647 * config/i386/immintrin.h (_wbinvd): New intrinsic.
19648 * config/i386/pconfigintrin.h: New file.
19649 * config/i386/wbnoinvdintrin.h: Ditto.
19650 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19651 wbnoinvdintrin.h.
19652 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19653
19654 2018-03-05 Richard Biener <rguenther@suse.de>
19655
19656 PR tree-optimization/84670
19657 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19658 member.
19659 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19660 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19661 (compute_antic_aux): Only assert the number of values in ANTIC_IN
19662 doesn't grow if all successors (recursively) were visited at least
19663 once.
19664
19665 2018-03-05 Richard Biener <rguenther@suse.de>
19666
19667 PR tree-optimization/84650
19668 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19669 if executed in the loop pipeline.
19670
19671 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
19672
19673 * doc/configfiles.texi (Configuration Files): Move info about
19674 conditionalizing $target-protos.h to...
19675 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
19676 differs from $target-protos.h.
19677
19678 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
19679 Chung-Ju Wu <jasonwucj@gmail.com>
19680
19681 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19682 * config/nds32/nds32-multiple.md (setmemsi): Define.
19683 * config/nds32/nds32-memory-manipulation.c
19684 (nds32_gen_dup_4_byte_to_word_value): New.
19685 (emit_setmem_word_loop): New.
19686 (emit_setmem_byte_loop): New.
19687 (nds32_expand_setmem_loop): New.
19688 (nds32_expand_setmem_loop_v3m): New.
19689 (nds32_expand_setmem_unroll): New.
19690 (nds32_expand_setmem): New.
19691
19692 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19693 Chung-Ju Wu <jasonwucj@gmail.com>
19694
19695 * config/nds32/nds32-memory-manipulation.c
19696 (nds32_emit_load_store): New.
19697 (nds32_emit_post_inc_load_store): New.
19698 (nds32_emit_mem_move): New.
19699 (nds32_emit_mem_move_block): New.
19700 (nds32_expand_movmemsi_loop_unknown_size): New.
19701 (nds32_expand_movmemsi_loop_known_size): New.
19702 (nds32_expand_movmemsi_loop): New.
19703 (nds32_expand_movmemsi_unroll): New.
19704 (nds32_expand_movmemqi): Rename ...
19705 (nds32_expand_movmemsi): ... to this.
19706 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19707 (movmemsi): ... to this.
19708 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19709 (nds32_expand_movmemsi): ... to this.
19710
19711 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19712 Monk Chiang <sh.chiang04@gmail.com>
19713 Chung-Ju Wu <jasonwucj@gmail.com>
19714
19715 * config/nds32/nds32-protos.h
19716 (nds32_expand_load_multiple): New arguments.
19717 (nds32_expand_store_multiple): Ditto.
19718 (nds32_valid_multiple_load_store): Rename ...
19719 (nds32_valid_multiple_load_store_p): ... to this.
19720 * config/nds32/nds32-memory-manipulation.c
19721 (nds32_expand_load_multiple): Refine implementation.
19722 (nds32_expand_store_multiple): Ditto.
19723 * config/nds32/nds32-multiple.md
19724 (load_multiple): Update nds32_expand_load_multiple interface.
19725 (store_multiple): Update nds32_expand_store_multiple interface.
19726 * config/nds32/nds32-predicates.c
19727 (nds32_valid_multiple_load_store): Rename ...
19728 (nds32_valid_multiple_load_store_p): ... to this and refine
19729 implementation.
19730 * config/nds32/predicates.md
19731 (nds32_load_multiple_and_update_address_operation): New predicate.
19732 (nds32_store_multiple_and_update_address_operation): New predicate.
19733
19734 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19735 Chung-Ju Wu <jasonwucj@gmail.com>
19736
19737 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19738 (combo): New attribute.
19739 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19740
19741 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
19742
19743 * config/nds32/nds32.opt: Change -mcmodel= default value.
19744
19745 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
19746 Monk Chiang <sh.chiang04@gmail.com>
19747 Chung-Ju Wu <jasonwucj@gmail.com>
19748
19749 * config/nds32/constants.md (unspec_element): New enum.
19750 * config/nds32/constraints.md (Umw): New constraint.
19751 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19752 * config/nds32/nds32-intrinsic.md: Likewise.
19753 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19754 (nds32_valid_smw_lwm_base_p): New.
19755 (nds32_output_smw_single_word): New.
19756 (nds32_output_lmw_single_word): New.
19757 (nds32_expand_unaligned_load): New.
19758 (nds32_expand_unaligned_store): New.
19759 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19760 (nds32_output_smw_single_word): Declare.
19761 (nds32_output_lmw_single_word): Declare.
19762 (nds32_expand_unaligned_load): Declare.
19763 (nds32_expand_unaligned_store): Declare.
19764 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19765 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19766 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19767 NDS32_BUILTIN_UASTORE_DW.
19768 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19769 predicate.
19770
19771 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
19772 Kito Cheng <kito.cheng@gmail.com>
19773 Chung-Ju Wu <jasonwucj@gmail.com>
19774
19775 * config/nds32/nds32-intrinsic.c
19776 (nds32_expand_builtin_null_ftype_reg): Delete.
19777 (nds32_expand_builtin_reg_ftype_imm): Ditto.
19778 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19779 (nds32_read_argument): New.
19780 (nds32_legitimize_target): Ditto.
19781 (nds32_legitimize_argument): Ditto.
19782 (nds32_check_constant_argument): Ditto.
19783 (nds32_expand_unop_builtin): Ditto.
19784 (nds32_expand_unopimm_builtin): Ditto.
19785 (nds32_expand_binop_builtin): Ditto.
19786 (nds32_builtin_decl_impl): Ditto.
19787 (builtin_description): Ditto.
19788 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
19789 (nds32_init_builtins_impl): Ditto.
19790 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
19791 (nds32_builtin_decl): New.
19792 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
19793 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
19794
19795 2018-03-02 Jeff Law <law@redhat.com>
19796
19797 * reorg.c (stop_search_p): Handle DEBUG_INSN.
19798 (redundant_insn, fill_simple_delay_slots): Likewise.
19799 (fill_slots_from_thread): Likewise.
19800 * resource.c (mark_referenced_resources): Likewise.
19801 (mark_set_resources, find_dead_or_set_registers): Likewise.
19802
19803 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19804
19805 * substring-locations.h (format_warning_va): Formatting fix for
19806 ATTRIBUTE_GCC_DIAG.
19807 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
19808 argument.
19809 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
19810 * substring-locations.c: Include intl.h.
19811 (format_warning_va): Turned into small wrapper around
19812 format_warning_n_va, renamed to ...
19813 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
19814 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
19815 use ngettext.
19816 (format_warning_at_substring_n): New function.
19817 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
19818 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
19819 format_warning_at_substring with just a shorter name instead of
19820 const function pointer.
19821 (fmtwarn_n): New function.
19822 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
19823 appropriate, get rid of all the fmtstr temporaries, move conditionals
19824 with G_() wrapped string literals directly into fmtwarn arguments,
19825 cast dir.len to (int), formatting fixes.
19826
19827 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
19828
19829 * doc/invoke.texi: Remove "Cilk Plus" references.
19830
19831 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19832 Richard Biener <rguenther@suse.de>
19833
19834 PR ipa/84628
19835 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
19836 for error or warning attributes if CALL_FROM_THUNK_P is set.
19837 Formatting fixes.
19838
19839 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19840
19841 PR target/56540
19842 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
19843 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
19844
19845 PR target/56540
19846 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
19847 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
19848
19849 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
19850 instead of -1U in last predictors element's probability member.
19851
19852 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19853
19854 PR ipa/83983
19855 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19856 arguments if they are comparable.
19857
19858 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
19859
19860 PR tree-optimization/84634
19861 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
19862 masks and masked_loop_p with a single loop_masks, making sure it's
19863 null for bb vectorization.
19864
19865 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
19866
19867 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
19868 (vect_analyze_data_ref_access): Use loop->safe_len rather than
19869 loop->force_vectorize to check whether there is no alias.
19870
19871 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19872
19873 PR target/84614
19874 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
19875 prototypes.
19876 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
19877 comments.
19878 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
19879 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
19880 instead of a loop around prev_real_insn.
19881 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
19882 prev_real_insn.
19883
19884 PR inline-asm/84625
19885 * config/i386/i386.c (ix86_print_operand): Use conditional
19886 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
19887 zero vector.
19888
19889 2018-03-02 Richard Biener <rguenther@suse.de>
19890
19891 PR tree-optimization/84427
19892 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
19893 (bitmap_set_subtract_values): Rewrite to handle multiple
19894 exprs per value.
19895 (clean): Likewise.
19896 (prune_clobbered_mems): Likewise.
19897 (phi_translate): Take edge instead of pred/phiblock.
19898 (phi_translate_1): Likewise.
19899 (phi_translate_set): Likewise. Insert all translated
19900 exprs for a value into the set, keeping possibly multiple
19901 expressions per value.
19902 (compute_antic_aux): Adjust for phi_translate changes.
19903 When intersecting union the expressions and prune those
19904 not in the final value set, keeping possibly multiple
19905 expressions per value. Do not use value-insertion
19906 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
19907 all expressions. Add verification that the value-sets
19908 only shrink during iteration.
19909 (compute_partial_antic_aux): Adjust for the phi_translate changes.
19910 (do_pre_regular_insertion): Likewise.
19911 (do_pre_partial_partial_insertion): Likewise.
19912
19913 2018-03-02 Richard Biener <rguenther@suse.de>
19914
19915 PR target/82005
19916 * config/darwin.c (saved_debug_info_level): New static global.
19917 (darwin_asm_lto_start): Disable debug info generation for LTO out.
19918 (darwin_asm_lto_end): Restore debug info generation settings.
19919
19920 2018-03-01 Martin Liska <mliska@suse.cz>
19921
19922 PR sanitizer/82484
19923 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
19924 volatile arguments.
19925
19926 2018-03-01 Richard Biener <rguenther@suse.de>
19927
19928 PR debug/84645
19929 * dwarf2out.c (gen_variable_die): Properly handle late VLA
19930 type annotation with LTO when debug was disabled at compile-time.
19931
19932 2018-03-01 Matthew Fortune <mfortune@gmail.com>
19933
19934 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
19935 XINT with INTVAL.
19936 (mips_final_postscan_insn): Likewise.
19937
19938 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
19939
19940 PR rtl-optimization/84528
19941 * alias.c (init_alias_target): Add commentary.
19942 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
19943 a unique base value if the frame pointer is not eliminated
19944 to the stack pointer.
19945
19946 2018-03-01 Tom de Vries <tom@codesourcery.com>
19947
19948 PR rtl-optimization/83327
19949 * lra-int.h (hard_regs_spilled_into): Declare.
19950 * lra.c (hard_regs_spilled_into): Define.
19951 (init_reg_info): Init hard_regs_spilled_into.
19952 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
19953 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
19954 (process_bb_lives): Handle hard_regs_spilled_into.
19955 (lra_create_live_ranges_1): Before doing liveness propagation, clear
19956 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
19957
19958 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
19959
19960 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
19961 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
19962 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
19963 * config/rs6000/aix72.h: New file.
19964
19965 2018-02-28 Jakub Jelinek <jakub@redhat.com>
19966
19967 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
19968 instead of warning_at with conditional singular and plural messages
19969 where possible.
19970
19971 PR target/52991
19972 * stor-layout.c (update_alignment_for_field): For
19973 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
19974 && !DECL_PACKED (field), do the alignment update, just use
19975 only desired_align instead of MAX (type_align, desired_align)
19976 as the alignment.
19977 (place_field): Don't do known_align < desired_align handling
19978 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
19979 is non-NULL, instead do it after rli->prev_field handling and
19980 only if not within a bitfield word. For DECL_PACKED (field)
19981 use type_align of BITS_PER_UNIT.
19982
19983 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
19984
19985 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
19986 superfluous parentheses and trailing spaces.
19987
19988 2018-02-28 Richard Biener <rguenther@suse.de>
19989
19990 PR tree-optimization/84584
19991 * graphite-scop-detection.c (scop_detection::add_scop): Discard
19992 SCoPs with fake exit edge.
19993
19994 2018-02-28 Martin Liska <mliska@suse.cz>
19995
19996 PR testsuite/84597
19997 * timevar.c (timer::print): Fix format to properly print 100%
19998 values.
19999
20000 2018-02-28 Richard Biener <rguenther@suse.de>
20001
20002 PR middle-end/84607
20003 * genmatch.c (capture_info::walk_match): Do not mark
20004 captured expressions without operands as expr_p given
20005 they act more like predicates and should be subject to
20006 "lost tail" side-effect preserving.
20007
20008 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20009
20010 PR rtl-optimization/81611
20011 * auto-inc-dec.c (attempt_change): Move dead note from
20012 mem_insn if it's the next use of regno
20013 (find_address): Take address use of reg holding
20014 non-incremented value. Add parm to limit search to the named
20015 reg only.
20016 (merge_in_block): Attempt to use a mem insn that is the next
20017 use of the original regno.
20018
20019 2018-02-27 Martin Sebor <msebor@redhat.com>
20020
20021 PR c++/83871
20022 * doc/invoke.texi (-Wmissing-attributes): New option.
20023 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20024
20025 2018-02-27 Martin Sebor <msebor@redhat.com>
20026
20027 PR translation/84207
20028 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20029 n argument to unsigned HOST_WIDE_INT.
20030 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20031 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20032 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20033 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20034
20035 2018-02-27 Richard Biener <rguenther@suse.de>
20036
20037 PR tree-optimization/84512
20038 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20039 Do not use the estimate returned from record_stmt_cost for
20040 the scalar iteration cost but sum properly using add_stmt_cost.
20041
20042 2018-02-27 Richard Biener <rguenther@suse.de>
20043
20044 PR tree-optimization/84466
20045 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20046 Adjust last change to less strictly validate use operands.
20047
20048 2018-02-27 Martin Liska <mliska@suse.cz>
20049
20050 PR gcov-profile/84548
20051 * gcov.c (process_file): Allow partial overlap and consider it
20052 also as group functions.
20053 (output_lines): Properly calculate range of lines for a group.
20054
20055 2018-02-27 Martin Liska <mliska@suse.cz>
20056
20057 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20058 'ggc' suffixes. Change first column width.
20059 (timer::print): Fix formatting of the column.
20060
20061 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20062
20063 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20064 preserve inline entry blocks for the sake of debug inline
20065 entry point markers alone.
20066 (remove_unused_locals): Suggest in comments a better place to
20067 force the preservation of inline entry blocks that are
20068 otherwise unused, but do not preserve them.
20069
20070 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20071
20072 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20073
20074 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20075
20076 PR target/84039
20077 * config/i386/constraints.md (Bs): Replace
20078 ix86_indirect_branch_register with
20079 TARGET_INDIRECT_BRANCH_REGISTER.
20080 (Bw): Likewise.
20081 * config/i386/i386.md (indirect_jump): Likewise.
20082 (tablejump): Likewise.
20083 (*sibcall_memory): Likewise.
20084 (*sibcall_value_memory): Likewise.
20085 Peepholes of indirect call and jump via memory: Likewise.
20086 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20087 (*sibcall_value_GOT_32): Likewise.
20088 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20089 (GOT_memory_operand): Likewise.
20090 (call_insn_operand): Likewise.
20091 (sibcall_insn_operand): Likewise.
20092 (GOT32_symbol_operand): Likewise.
20093 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20094
20095 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20096
20097 PR rtl-optimization/83496
20098 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20099 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20100 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20101 redundant insn, if any.
20102 (relax_delay_slots): Likewise.
20103 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20104
20105 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20106
20107 PR tree-optimization/83965
20108 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20109 that grouped statements are part of a reduction chain. Return
20110 true if the statement is not marked as a reduction itself but
20111 is part of a group.
20112 (vect_recog_dot_prod_pattern): Don't check whether the statement
20113 is part of a group here.
20114 (vect_recog_sad_pattern): Likewise.
20115 (vect_recog_widen_sum_pattern): Likewise.
20116
20117 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20118
20119 PR debug/84545
20120 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20121
20122 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20123
20124 PR target/84530
20125 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20126 the bool argument.
20127 (ix86_output_indirect_function_return): New prototype.
20128 (ix86_split_simple_return_pop_internal): Likewise.
20129 * config/i386/i386.c (indirect_return_via_cx): New.
20130 (indirect_return_via_cx_bnd): Likewise.
20131 (indirect_thunk_name): Handle return va CX_REG.
20132 (output_indirect_thunk_function): Create alias for
20133 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20134 (ix86_output_indirect_jmp): Remove the bool argument.
20135 (ix86_output_indirect_function_return): New function.
20136 (ix86_split_simple_return_pop_internal): Likewise.
20137 * config/i386/i386.md (*indirect_jump): Don't pass false
20138 to ix86_output_indirect_jmp.
20139 (*tablejump_1): Likewise.
20140 (simple_return_pop_internal): Change it to define_insn_and_split.
20141 Call ix86_split_simple_return_pop_internal to split it for
20142 -mfunction-return=.
20143 (simple_return_indirect_internal): Call
20144 ix86_output_indirect_function_return instead of
20145 ix86_output_indirect_jmp.
20146
20147 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20148
20149 PR bootstrap/84405
20150 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20151 memset and value initialization afterwards.
20152
20153 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20154
20155 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20156
20157 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20158
20159 PR target/84521
20160 * common/config/aarch64/aarch64-common.c
20161 (aarch_option_optimization_table[]): Switch
20162 off fomit-frame-pointer
20163
20164 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20165 Chung-Ju Wu <jasonwucj@gmail.com>
20166
20167 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20168 volatile memory.
20169 (store_multiple): Ditto.
20170
20171 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20172
20173 * config.gcc: Add --with-cpu support for nds32 target.
20174 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20175 * config/nds32/nds32.opt: Add -mcpu= option.
20176
20177 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20178
20179 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20180 isel=yes): Warn for these deprecated options.
20181
20182 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20183
20184 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20185 ISA_2_5_MASKS_EMBEDDED.
20186
20187 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20188
20189 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20190 p->max as pointers rather than using iterative_hash_expr.
20191
20192 2018-02-23 Carl Love <cel@us.ibm.com>
20193
20194 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20195 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20196 BU_P8V_OVERLOAD_2.
20197 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20198 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20199 P8V_BUILTIN_VEC_VUNSIGNED2.
20200
20201 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20202
20203 PR target/81572
20204 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20205 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20206 LRA_UNKNOWN_ALT.
20207 * lra-constraints.c (curr_insn_transform): Set up
20208 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20209 LRA_UNKNOWN_ALT.
20210 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20211 * lra-eliminations.c (spill_pseudos): Ditto.
20212 (process_insn_for_elimination): Ditto.
20213 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20214 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20215 LRA_NON_CLOBBERED_ALT.
20216
20217 2018-02-22 Martin Sebor <msebor@redhat.com>
20218
20219 PR tree-optimization/84480
20220 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20221 to maybe_diag_stxncpy_trunc. Call it.
20222 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20223 from gimple_fold_builtin_strcpy. Print inlining stack.
20224 (handle_builtin_stxncpy): Print inlining stack.
20225 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20226
20227 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20228
20229 PR target/84176
20230 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20231 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20232 and -fcheck-pointer-bounds are used together.
20233 (indirect_thunk_prefix): New enum.
20234 (indirect_thunk_need_prefix): New function.
20235 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20236 "_nt" instead of "_bnd" for NOTRACK prefix.
20237 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20238 (output_indirect_thunk_function): Likewise.
20239 (): Likewise.
20240 (ix86_code_end): Update output_indirect_thunk_function calls.
20241 (ix86_output_indirect_branch_via_reg): Replace
20242 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20243 (ix86_output_indirect_branch_via_push): Likewise.
20244 (ix86_output_function_return): Likewise.
20245 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20246 incompatible with -fcf-protection=branch and
20247 -fcheck-pointer-bounds.
20248
20249 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20250
20251 PR target/83335
20252 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20253 Change gcc_assert call to output_operand_lossage.
20254
20255 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20256
20257 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20258
20259 2018-02-22 DJ Delorie <dj@redhat.com>
20260 Sebastian Perta <sebastian.perta@renesas.com>
20261 Oleg Endo <olegendo@gcc.gnu.org>
20262
20263 * config/rx/rx.c (rx_rtx_costs): New function.
20264 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20265
20266 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20267
20268 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20269
20270 2018-02-22 Martin Liska <mliska@suse.cz>
20271
20272 PR driver/83193
20273 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20274 Add "native" as a possible value.
20275
20276 2018-02-22 Martin Liska <mliska@suse.cz>
20277
20278 PR driver/83193
20279 * config/i386/i386.c (ix86_option_override_internal):
20280 Add "native" as a possible value for -march and -mtune.
20281
20282 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20283
20284 PR target/84502
20285 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20286 to all type variants.
20287
20288 PR tree-optimization/84503
20289 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20290 width as info->bitpos + info->bitsize - start.
20291 (merged_store_group::merge_overlapping): Simplify width computation.
20292 (check_no_overlap): New function.
20293 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20294 start + width and last_order of the group, fail if check_no_overlap
20295 fails.
20296 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20297 to group if check_no_overlap fails.
20298
20299 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20300
20301 * config/rs6000/altivec.md: Delete contraint arguments to
20302 define_expand, define_split, and define_peephole2, and in
20303 define_insn_and_split if always unused.
20304 * config/rs6000/darwin.md: Ditto.
20305 * config/rs6000/dfp.md: Ditto.
20306 * config/rs6000/rs6000.md: Ditto.
20307 * config/rs6000/sync.md: Ditto.
20308 * config/rs6000/vector.md: Ditto.
20309 * config/rs6000/vsx.md: Ditto.
20310
20311 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20312
20313 * config/rs6000/altivec.md: Write output control strings as braced
20314 blocks instead of double-quoted strings.
20315 * config/rs6000/darwin.md: Ditto.
20316 * config/rs6000/rs6000.md: Ditto.
20317 * config/rs6000/vector.md: Ditto.
20318 * config/rs6000/vsx.md: Ditto.
20319
20320 2018-02-21 Jason Merrill <jason@redhat.com>
20321
20322 PR c++/84314 - ICE with templates and fastcall attribute.
20323 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20324
20325 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20326
20327 * ipa-cp.c (determine_versionability): Fix comment typos.
20328
20329 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20330
20331 PR c/84229
20332 * ipa-cp.c (determine_versionability): Do not version functions caling
20333 va_arg_pack.
20334
20335 2018-02-21 Martin Liska <mliska@suse.cz>
20336
20337 PR driver/83193
20338 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20339 Add "native" as a possible value.
20340 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20341 the macro when native cpu detection is available.
20342
20343 2018-02-21 Martin Liska <mliska@suse.cz>
20344
20345 PR driver/83193
20346 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20347 Add "native" as a possible value.
20348 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20349 when native cpu detection is available.
20350
20351 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20352 Martin Sebor <msebor@redhat.com>
20353
20354 PR tree-optimization/84478
20355 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20356 false.
20357 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20358 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20359 support which is conservatively correct, for 2 only stay conservative
20360 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20361 argument to the 2 argument get_range_strlen, adjust 6 arg
20362 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20363 false.
20364 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20365 (gimple_fold_builtin_strlen): Pass true as last argument to
20366 get_range_strlen.
20367
20368 2018-02-20 Martin Sebor <msebor@redhat.com>
20369
20370 PR middle-end/84095
20371 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20372 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20373 (builtin_memref::builtin_memref): Factor out parts into
20374 set_base_and_offset and call it.
20375
20376 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20377
20378 PR middle-end/84406
20379 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20380 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20381 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20382 search at the associated MODE_INT.
20383
20384 2018-02-20 Jeff Law <law@redhat.com>
20385
20386 PR middle-end/82123
20387 PR tree-optimization/81592
20388 PR middle-end/79257
20389 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20390 for range data rather than using global data.
20391 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20392 range data rather than using global data.
20393 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20394 pass it to children as needed.
20395 (struct directive::fmtresult): Similarly.
20396 (struct directive::set_width): Similarly.
20397 (struct directive::set_precision): Similarly.
20398 (format_integer, format_directive, parse_directive): Similarly.
20399 (format_none): Accept unnamed vr_values parameter.
20400 (format_percent, format_floating, format_character): Similarly.
20401 (format_string, format_plain): Similarly.
20402 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20403 the EVRP range analyzer for range data rather than using global data.
20404 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20405 gimple-ssa-evrp-analyze.h
20406 (class sprintf_dom_walker): Add after_dom_children member function.
20407 Add evrp_range_analyzer member.
20408 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20409 range analyzer as needed.
20410 (sprintf_dom_walker::after_dom_children): New member function.
20411 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20412 if not optimizing.
20413 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20414 (evrp_range_analyzer::pop_to_marker): Likewise.
20415
20416 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20417
20418 PR tree-optimization/84419
20419 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20420 with the required type if its current type is compatible but
20421 different.
20422
20423 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20424
20425 PR middle-end/82004
20426 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20427 after vectorization.
20428
20429 2018-02-20 Martin Liska <mliska@suse.cz>
20430
20431 PR driver/83193
20432 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20433 possible values if we don't have a hint.
20434
20435 2018-02-20 Martin Liska <mliska@suse.cz>
20436
20437 PR c/84310
20438 PR target/79747
20439 * final.c (shorten_branches): Build align_tab array with one
20440 more element.
20441 * opts.c (finish_options): Add alignment option limit check.
20442 (MAX_CODE_ALIGN): Likewise.
20443 (MAX_CODE_ALIGN_VALUE): Likewise.
20444 * doc/invoke.texi: Document maximum allowed option value for
20445 all -falign-* options.
20446
20447 2018-02-19 Jakub Jelinek <jakub@redhat.com>
20448
20449 PR target/84146
20450 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20451 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20452 * var-tracking.c (emit_note_insn_var_location): Remove all references
20453 to NOTE_INSN_CALL_ARG_LOCATION.
20454 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20455 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20456 Use copy_rtx_if_shared.
20457 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20458 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20459 (dwarf2out_var_location): Remove handling of
20460 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20461 on call_insn.
20462 * final.c (final_scan_insn): Remove all references to
20463 NOTE_INSN_CALL_ARG_LOCATION.
20464 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
20465 before dumping final insns.
20466 * except.c (emit_note_eh_region_end): Remove all references to
20467 NOTE_INSN_CALL_ARG_LOCATION.
20468 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20469 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20470 * config/arc/arc.c (hwloop_optimize): Likewise.
20471 * config/arm/arm.c (create_fix_barrier): Likewise.
20472 * config/s390/s390.c (s390_chunkify_start): Likewise.
20473 * config/sh/sh.c (find_barrier): Likewise.
20474 * config/i386/i386.c (rest_of_insert_endbranch,
20475 ix86_seh_fixup_eh_fallthru): Likewise.
20476 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20477 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20478 * config/frv/frv.c (frv_function_prologue): Likewise.
20479 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
20480 reg note.
20481 (note_outside_basic_block_p): Remove all references to
20482 NOTE_INSN_CALL_ARG_LOCATION.
20483 * gengtype.c (adjust_field_rtx_def): Likewise.
20484 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20485 Likewise.
20486 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20487 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20488
20489 PR c++/84444
20490 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20491 is ADDR_EXPR.
20492
20493 PR tree-optimization/84452
20494 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20495 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20496 is NULL.
20497
20498 2018-02-19 Martin Liska <mliska@suse.cz>
20499
20500 PR sanitizer/82183
20501 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20502
20503 2018-02-19 Martin Liska <mliska@suse.cz>
20504 Richard Sandiford <richard.sandiford@linaro.org>
20505
20506 PR tree-optimization/82491
20507 * gimple-fold.c (get_base_constructor): Make earlier bail out
20508 to prevent ubsan.
20509
20510 2018-02-19 Carl Love <cel@us.ibm.com>
20511
20512 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20513 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20514 BU_P8V_OVERLOAD_1.
20515 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20516 P8V_BUILTIN_VEC_NEG.
20517
20518 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
20519
20520 * config/rl78/rl78.md (movdf): New define expand.
20521
20522 2018-02-19 Martin Liska <mliska@suse.cz>
20523
20524 PR other/80589
20525 * doc/invoke.texi: Fix typo.
20526 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20527
20528 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
20529
20530 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20531 handle rs6000_single_float and rs6000_double_float specially for
20532 e500 family CPUs.
20533
20534 2018-02-16 Jeff Law <law@redhat.com>
20535
20536 * config/rx/rx.c (add_pop_cfi_notes): New function.;
20537 (pop_regs): Use it.
20538
20539 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20540
20541 PR ipa/84425
20542 * ipa-inline.c (inline_small_functions): Fix a typo.
20543
20544 2018-02-16 Nathan Sidwell <nathan@acm.org>
20545
20546 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20547
20548 2018-02-16 Carl Love <cel@us.ibm.com>
20549
20550 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20551 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20552 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20553 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20554 expansion to P8V_BUILTIN_VEC_FLOAT2.
20555
20556 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
20557
20558 PR rtl-optimization/70023
20559 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20560 src_regno into account.
20561
20562 2018-02-16 Carl Love <cel@us.ibm.com>
20563
20564 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20565 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20566 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20567 * config/rs6000/rs6000.c: Remove case statements for
20568 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20569 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20570 and P9V_BUILTIN_VEC_VINSERT4B.
20571 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20572 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20573 * config/rs6000/vsx.md:
20574 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20575 vec_insert4b.
20576
20577 2018-02-16 Carl Love <cel@us.ibm.com>
20578
20579 * config/rs6000/altivec.h: Add builtin names vec_extract4b
20580 vec_insert4b.
20581 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20582 definitions.
20583 * config/rs6000/rs6000-c.c: Add the definitions for
20584 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20585 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20586 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20587 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
20588 definition for insert4b and define insn *insert3b_internal.
20589 * doc/extend.texi: Add documentation for vec_extract4b.
20590
20591 2018-02-16 Nathan Sidwell <nathan@acm.org>
20592
20593 * doc/extend.texi (Backwards Compatibility): Mention friend
20594 injection. Note for-scope is deprecated.
20595 * doc/invoke.texi (-ffriend-injection): Deprecate.
20596
20597 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
20598
20599 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20600 that moved to I2, also allow destinations that are a paradoxical
20601 subreg (instead of a normal reg).
20602
20603 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
20604
20605 PR target/83831
20606 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20607 to QImode.
20608
20609 2018-02-16 Richard Biener <rguenther@suse.de>
20610
20611 PR tree-optimization/84037
20612 PR tree-optimization/84016
20613 PR target/82862
20614 * config/i386/i386.c (ix86_builtin_vectorization_cost):
20615 Adjust vec_construct for the fact we need additional higher latency
20616 128bit inserts for AVX256 and AVX512 vector builds.
20617 (ix86_add_stmt_cost): Scale vector construction cost for
20618 elementwise loads.
20619
20620 2018-02-16 Richard Biener <rguenther@suse.de>
20621
20622 PR tree-optimization/84417
20623 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20624 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20625 (non_rewritable_lvalue_p): Likewise, use poly-ints.
20626
20627 2018-02-16 Martin Liska <mliska@suse.cz>
20628
20629 PR sanitizer/84307
20630 * internal-fn.def (ASAN_CHECK): Set proper flags.
20631 (ASAN_MARK): Likewise.
20632
20633 2018-02-16 Julia Koval <julia.koval@intel.com>
20634
20635 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20636 from PTA_CANNONLAKE.
20637
20638 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20639
20640 PR target/84272
20641 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20642 Use ++iter rather than iter++ for std::list iterators.
20643 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
20644 defer deleting them until all nodes in the forest are processed. Do
20645 free even leaf nodes. Change to_process into auto_vec.
20646
20647 PR bootstrap/84405
20648 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20649 * vec.h (vec_default_construct): Use memset instead of placement new
20650 if BROKEN_VALUE_INITIALIZATION is defined.
20651 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20652 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20653 is defined.
20654
20655 PR rtl-optimization/83723
20656 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20657 * lra.c (lra_substitute_pseudo): Likewise. If true, use
20658 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
20659 recursive calls.
20660 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20661 callers.
20662 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20663
20664 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
20665
20666 PR rtl-optimization/81443
20667 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20668 from inner REGs to paradoxical SUBREGs.
20669
20670 2018-02-16 Richard Biener <rguenther@suse.de>
20671
20672 PR tree-optimization/84399
20673 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20674 For operands we can analyze at their definition make sure we can
20675 analyze them at each use as well.
20676
20677 2018-02-16 Richard Biener <rguenther@suse.de>
20678
20679 PR tree-optimization/84190
20680 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20681 volatile accesses if the decl isn't volatile.
20682
20683 2018-02-15 Jason Merrill <jason@redhat.com>
20684
20685 PR c++/84314 - ICE with templates and fastcall attribute.
20686 * attribs.c (build_type_attribute_qual_variant): Don't clobber
20687 TYPE_CANONICAL on an existing type.
20688
20689 2018-02-15 Jakub Jelinek <jakub@redhat.com>
20690
20691 PR tree-optimization/84383
20692 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20693 dstoff nor call operand_equal_p if dstbase is NULL.
20694
20695 PR tree-optimization/84334
20696 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20697 also a CONSTANT_CLASS_P, punt.
20698
20699 2018-02-14 Jim Wilson <jimw@sifive.com>
20700
20701 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20702 first SMALL_OPERAND check. New local min_second_step. Move assert
20703 to where locals are set. Add TARGET_RVC support.
20704 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20705
20706 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
20707
20708 * doc/invoke.texi: Correct -Wformat-overflow code sample.
20709
20710 2018-02-14 Martin Sebor <msebor@redhat.com>
20711
20712 PR tree-optimization/83698
20713 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20714 arrays constrain the offset range to their bounds.
20715 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20716 (builtin_access::overlap): Avoid setting the size of overlap if it's
20717 already been set.
20718 (maybe_diag_overlap): Also consider arrays when deciding what values
20719 of offsets to include in diagnostics.
20720
20721 2018-02-14 Martin Sebor <msebor@redhat.com>
20722
20723 PR c/84108
20724 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20725 that correspond to the kind of a declaration.
20726
20727 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
20728
20729 PR target/83984
20730 * config/pa/pa.md: Load address of PIC label using the linkage table
20731 if the label is nonlocal.
20732
20733 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
20734
20735 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20736 warning message if user requests -maltivec=be.
20737 * doc/invoke.texi: Document deprecation of -maltivec=be.
20738
20739 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
20740
20741 PR target/84220
20742 * config/rs6000/rs6000-c.c: Update definitions for
20743 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20744 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20745
20746 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20747
20748 PR target/84239
20749 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20750 add _get_ssp intrinsics. Remove argument from
20751 __builtin_ia32_rdssp[d|q].
20752 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20753 * config/i386/i386-builtin.def: Remove argument from
20754 __builtin_ia32_rdssp[d|q].
20755 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20756 ix86_expand_special_args_builtin for _rdssp[d|q].
20757 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20758 Clear register before usage.
20759 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20760 Add documentation for new _get_ssp and _inc_ssp intrinsics.
20761
20762 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
20763
20764 PR tree-optimization/84357
20765 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20766 operand 1 of an ARRAY_REF too.
20767
20768 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
20769
20770 PR target/83831
20771 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20772 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20773 declarations.
20774 (set_of_reg): New struct.
20775 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20776 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20777 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20778 functions.
20779 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20780 Split into bitclr, bitset, bitinvert patterns if appropriate.
20781 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
20782 use rx_fuse_in_memory_bitop.
20783 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
20784 to named insn, correct maximum insn length.
20785
20786 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
20787
20788 PR target/79242
20789 * machmode.def: Define a complex mode for PARTIAL_INT.
20790 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
20791 MODE_PARTIAL_INT.
20792 * doc/rtl.texi: Document CSPImode.
20793 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
20794 handling.
20795 (msp430_hard_regno_nregs_with_padding): Likewise.
20796
20797 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
20798
20799 PR target/84279
20800 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
20801
20802 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
20803
20804 PR rtl-optimization/84169
20805 * combine.c (try_combine): New variable split_i2i3. Set it to true if
20806 we generated a parallel as new i3 and we split that to new i2 and i3
20807 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
20808 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
20809 those to i2, not i1. Partially rewrite this scan code.
20810
20811 2018-02-13 Jakub Jelinek <jakub@redhat.com>
20812
20813 PR c/82210
20814 * stor-layout.c (place_field): For variable length fields, adjust
20815 offset_align afterwards not just based on the field's alignment,
20816 but also on the size.
20817
20818 PR middle-end/84309
20819 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
20820 of exps and logs in the use_exp2 case.
20821
20822 2018-02-13 Jeff Law <law@redhat.com>
20823
20824 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
20825 entry for "vector".
20826
20827 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
20828 ARGS as unused.
20829
20830 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
20831
20832 PR debug/84342
20833 PR debug/84319
20834 * common.opt (gas-loc-support, gas-locview-support): New.
20835 (ginline-points, ginternal-reset-location-views): New.
20836 * doc/invoke.texi: Document them. Use @itemx where intended.
20837 (gvariable-location-views): Adjust.
20838 * target.def (reset_location_view): New.
20839 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
20840 (TARGET_RESET_LOCATION_VIEW): New.
20841 * doc/tm.texi: Rebuilt.
20842 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
20843 (dwarf2out_default_as_locview_support): New.
20844 (output_asm_line_debug_info): Use option variables.
20845 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
20846 (output_loc_list): Likewise.
20847 (add_high_low_attributes): Check option variables.
20848 Don't output entry view attribute in strict mode.
20849 (gen_inlined_subroutine_die): Check option variables.
20850 (dwarf2out_inline_entry): Likewise.
20851 (init_sections_and_labels): Likewise.
20852 (dwarf2out_early_finish): Likewise.
20853 (maybe_reset_location_view): New, from...
20854 (dwarf2out_var_location): ... here. Call it.
20855 * debug.h (dwarf2out_default_as_loc_support): Declare.
20856 (dwarf2out_default_as_locview_support): Declare.
20857 * hooks.c (hook_int_rtx_insn_0): New.
20858 * hooks.h (hook_int_rtx_insn_0): Declare.
20859 * toplev.c (process_options): Take -gas-loc-support and
20860 -gas-locview-support from dwarf2out. Enable
20861 -gvariable-location-views by default only with locview
20862 assembler support. Enable -ginternal-reset-location-views by
20863 default only if the target defines the corresponding hook.
20864 Enable -ginline-points by default if location views are
20865 enabled; force it disabled if statement frontiers are
20866 disabled.
20867 * tree-inline.c (expand_call_inline): Check option variables.
20868 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
20869
20870 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
20871
20872 PR tree-optimization/84321
20873 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
20874 handling. Also check whether the anti-range contains any values
20875 that satisfy the mask; switch to a VR_RANGE if not.
20876
20877 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
20878
20879 PR sanitizer/84340
20880 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
20881
20882 2018-02-13 Martin Jambor <mjambor@suse.cz>
20883
20884 PR c++/83990
20885 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
20886 of call statements, also set location of a load to a temporary.
20887
20888 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
20889
20890 * config/rl78/rl78.c (add_vector_labels): New function.
20891 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
20892 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
20893 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
20894 which checks that no arguments are passed.
20895 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
20896 * doc/extend.texi: Documentation for the new attribute.
20897
20898 2018-02-13 Andreas Schwab <schwab@suse.de>
20899
20900 * config/riscv/linux.h (CPP_SPEC): Define.
20901
20902 2018-02-13 Jakub Jelinek <jakub@redhat.com>
20903
20904 PR target/84335
20905 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
20906 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
20907 OPTION_MASK_ISA_AES as first argument to def_builtin_const
20908 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
20909 instead of OPTION_MASK_ISA_PCLMUL as first argument to
20910 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
20911 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
20912 temporarily for AES and PCLMUL builtins.
20913
20914 PR tree-optimization/84339
20915 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
20916 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
20917 Formatting fixes.
20918
20919 PR middle-end/84309
20920 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
20921 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
20922 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
20923 inline function.
20924 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
20925 inline function.
20926 * omp-simd-clone.h: New file.
20927 * omp-simd-clone.c: Include omp-simd-clone.h.
20928 (expand_simd_clones): No longer static.
20929 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
20930 cgraph.h and omp-simd-clone.h.
20931 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
20932 (vect_recog_widen_shift_pattern): Formatting fix.
20933 (vect_pattern_recog_1): Don't check optab for calls.
20934
20935 PR target/84336
20936 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
20937 operands[2] into a REG before using gen_lowpart on it.
20938
20939 2018-02-12 Jeff Law <law@redhat.com>
20940
20941 PR target/83760
20942 * config/sh/sh.c (find_barrier): Consider a sibling call
20943 a barrier as well.
20944
20945 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
20946 successfully back substituting a reg.
20947
20948 2018-02-12 Richard Biener <rguenther@suse.de>
20949
20950 PR tree-optimization/84037
20951 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
20952 parameter, move visited init to caller.
20953 (vect_slp_analyze_operations): Separate cost from validity
20954 check, initialize visited once for all instances.
20955 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
20956 for all instances.
20957 * tree-vect-stmts.c (vect_model_simple_cost): Make early
20958 out an assert.
20959 (vect_model_promotion_demotion_cost): Likewise.
20960 (vectorizable_bswap): Guard cost modeling with !slp_node
20961 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
20962 SLP stmts.
20963 (vectorizable_call): Likewise.
20964 (vectorizable_conversion): Likewise.
20965 (vectorizable_assignment): Likewise.
20966 (vectorizable_shift): Likewise.
20967 (vectorizable_operation): Likewise.
20968 (vectorizable_store): Likewise.
20969 (vectorizable_load): Likewise.
20970 (vectorizable_condition): Likewise.
20971 (vectorizable_comparison): Likewise.
20972
20973 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
20974
20975 PR sanitizer/84307
20976 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
20977 (ASAN_MARK): Fix fnspec to account for return value, change pointer
20978 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
20979
20980 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
20981
20982 PR middle-end/83665
20983 * params.def (inline-min-speedup): Increase from 8 to 15.
20984 (max-inline-insns-auto): Decrease from 40 to 30.
20985 * ipa-split.c (consider_split): Add some buffer for function to
20986 be considered inlining candidate.
20987 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
20988 default values.
20989
20990 2018-02-12 Richard Biener <rguenther@suse.de>
20991
20992 PR tree-optimization/84037
20993 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
20994 matched stmts if we cannot swap the non-matched ones.
20995
20996 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
20997
20998 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
20999 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21000 _mm_maskz_scalef_round_ss): New intrinsics.
21001 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21002 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21003 __builtin_ia32_scalefss_round): Remove.
21004 (__builtin_ia32_scalefsd_mask_round,
21005 __builtin_ia32_scalefss_mask_round): New intrinsics.
21006 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21007 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21008 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21009 "<round_constraint>")): Changed to ...
21010 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21011 "<round_scalar_constraint>")): ... this.
21012 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21013 %0, %1, %2<round_op3>}"): Changed to ...
21014 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21015 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21016 %2<round_scalar_mask_op3>}"): ... this.
21017 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21018
21019 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21020
21021 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21022 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21023 (_mm_maskz_sqrt_round_ss): New intrinsics.
21024 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21025 (__builtin_ia32_sqrtsd_mask_round)
21026 (__builtin_ia32_sqrtss_mask_round): New builtins.
21027 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21028 (__builtin_ia32_sqrtss_round): Remove.
21029 (__builtin_ia32_sqrtsd_mask_round)
21030 (__builtin_ia32_sqrtss_mask_round): New builtins.
21031 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21032 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21033 ((match_operand:VF_128 1 "vector_operand"
21034 "xBm,<round_constraint>")): Changed to ...
21035 ((match_operand:VF_128 1 "vector_operand"
21036 "xBm,<round_scalar_constraint>")): ... this.
21037 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21038 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21039 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21040 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21041 %<iptr>1<round_scalar_mask_op3>}): ... this.
21042 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21043 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21044
21045 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21046
21047 PR target/84266
21048 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21049 Cast vec_cmpeq result to correct type.
21050 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21051 Cast vec_cmpgt result to correct type.
21052
21053 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21054
21055 * final.c (final_scan_insn_1): Renamed from...
21056 (final_scan_insn): ... this. New wrapper, to recover
21057 seen from the outermost call in recursive ones.
21058 * config/sparc/sparc.c (output_return): Drop seen from call.
21059 (output_sibcall): Likewise.
21060 * config/visium/visium.c (output_branch): Likewise.
21061
21062 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21063
21064 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21065 function label.
21066
21067 2018-02-10 Alan Modra <amodra@gmail.com>
21068
21069 PR target/84300
21070 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21071 Specify LR as an input.
21072
21073 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21074
21075 PR sanitizer/83987
21076 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21077 remove_member_access_dummy_vars): New functions.
21078 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21079 lower_omp_1, execute_lower_omp): Use them.
21080
21081 PR rtl-optimization/84308
21082 * shrink-wrap.c (spread_components): Release todo vector.
21083
21084 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21085
21086 PR rtl-optimization/57193
21087 * ira-color.c (struct allocno_color_data): Add member
21088 conflict_allocno_hard_prefs.
21089 (update_conflict_allocno_hard_prefs): New.
21090 (bucket_allocno_compare_func): Add a preference based on
21091 conflict_allocno_hard_prefs.
21092 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21093 (color_allocnos): Remove a dead code. Initiate
21094 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21095
21096 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21097
21098 PR target/84226
21099 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21100 constraint from =wa to wa. Avoid a subreg on the output operand,
21101 instead use a pseudo and subreg it in a move.
21102 (p9_xxbrd_<mode>): Changed to ...
21103 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21104 (p9_xxbrd_v2df): New expander.
21105 (p9_xxbrw_<mode>): Changed to ...
21106 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21107 (p9_xxbrw_v4sf): New expander.
21108
21109 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21110
21111 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21112
21113 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21114
21115 PR target/83926
21116 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21117 multiply in 32-bit mode.
21118 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21119 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21120 mode.
21121
21122 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21123
21124 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21125 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21126 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21127 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21128
21129 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21130
21131 PR lto/84213
21132 * dwarf2out.c (is_trivial_indirect_ref): New function.
21133 (dwarf2out_late_global_decl): Do not generate a location
21134 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21135 and that are not defined in the current unit.
21136
21137 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21138
21139 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21140 instead of a libcall for UNORDERED.
21141
21142 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21143
21144 PR target/82641
21145 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21146 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21147
21148 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21149
21150 PR target/PR84295
21151 * config/s390/s390.c (s390_set_current_function): Invoke
21152 s390_indirect_branch_settings also if fndecl didn't change.
21153
21154 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21155
21156 * config/rs6000/rs6000.md (blockage): Set length to zero.
21157
21158 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21159
21160 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21161
21162 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21163
21164 PR sanitizer/84285
21165 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21166 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21167 -static-lib*san.
21168
21169 PR debug/84252
21170 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21171 PARALLEL incoming that failed vt_get_decl_and_offset check.
21172
21173 PR middle-end/84237
21174 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21175 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21176 TREE_READONLY bit.
21177 (get_variable_section): For decls in named .bss* sections pass true as
21178 second argument to bss_initializer_p.
21179
21180 2018-02-09 Marek Polacek <polacek@redhat.com>
21181 Jakub Jelinek <jakub@redhat.com>
21182
21183 PR c++/83659
21184 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21185 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21186 Sync some changes from cxx_fold_indirect_ref.
21187
21188 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21189
21190 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21191 markers.
21192 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21193 (BLOCK_INLINE_ENTRY_LABEL): New.
21194 (dwarf2out_var_location): Disregard inline entry markers.
21195 (inline_entry_data): New struct.
21196 (inline_entry_data_hasher): New hashtable type.
21197 (inline_entry_data_hasher::hash): New.
21198 (inline_entry_data_hasher::equal): New.
21199 (inline_entry_data_table): New variable.
21200 (add_high_low_attributes): Add DW_AT_entry_pc and
21201 DW_AT_GNU_entry_view attributes if a pending entry is found
21202 in inline_entry_data_table. Add old entry_pc attribute only
21203 if debug nonbinding markers are disabled.
21204 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21205 markers are enabled.
21206 (block_within_block_p, dwarf2out_inline_entry): New.
21207 (dwarf2out_finish): Check that no entries remained in
21208 inline_entry_data_table.
21209 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21210 (final_scan_insn, notice_source_line): Likewise.
21211 (rest_of_clean_state): Skip inline entry markers.
21212 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21213 markers.
21214 * gimple.c (gimple_build_debug_inline_entry): New.
21215 * gimple.h (enum gimple_debug_subcode): Add
21216 GIMPLE_DEBUG_INLINE_ENTRY.
21217 (gimple_build_debug_inline_entry): Declare.
21218 (gimple_debug_inline_entry_p): New.
21219 (gimple_debug_nonbind_marker_p): Adjust.
21220 * insn-notes.def (INLINE_ENTRY): New.
21221 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21222 inline entry marker notes.
21223 (print_insn): Likewise.
21224 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21225 (INSN_DEBUG_MARKER_KIND): Likewise.
21226 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21227 * tree-inline.c (expand_call_inline): Build and insert
21228 debug_inline_entry stmt.
21229 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21230 inline entry blocks early, if nonbind markers are enabled.
21231 (dump_scope_block): Dump fragment info.
21232 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21233 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21234 (gimple_build_debug_inline_entry): New.
21235 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21236 Enable/disable inline entry points too.
21237 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21238 (DEBUG_INSN): Describe inline entry markers.
21239
21240 * common.opt (gvariable-location-views): New.
21241 (gvariable-location-views=incompat5): New.
21242 * config.in: Rebuilt.
21243 * configure: Rebuilt.
21244 * configure.ac: Test assembler for view support.
21245 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21246 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21247 * dwarf2out.c (var_loc_view): New typedef.
21248 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21249 (dwarf2out_locviews_in_attribute): New.
21250 (dwarf2out_locviews_in_loclist): New.
21251 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21252 (enum dw_line_info_opcode): Add LI_adv_address.
21253 (struct dw_line_info_table): Add view.
21254 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21255 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21256 (zero_view_p): New variable.
21257 (ZERO_VIEW_P): New macro.
21258 (output_asm_line_debug_info): New.
21259 (struct var_loc_node): Add view.
21260 (add_AT_view_list, AT_loc_list): New.
21261 (add_var_loc_to_decl): Add view param. Test it against last.
21262 (new_loc_list): Add view params. Record them.
21263 (AT_loc_list_ptr): Handle loc and view lists.
21264 (view_list_to_loc_list_val_node): New.
21265 (print_dw_val): Handle dw_val_class_view_list.
21266 (size_of_die): Likewise.
21267 (value_format): Likewise.
21268 (loc_list_has_views): New.
21269 (gen_llsym): Set vl_symbol too.
21270 (maybe_gen_llsym, skip_loc_list_entry): New.
21271 (dwarf2out_maybe_output_loclist_view_pair): New.
21272 (output_loc_list): Output view list or entries too.
21273 (output_view_list_offset): New.
21274 (output_die): Handle dw_val_class_view_list.
21275 (output_dwarf_version): New.
21276 (output_compilation_unit_header): Use it.
21277 (output_skeleton_debug_sections): Likewise.
21278 (output_rnglists, output_line_info): Likewise.
21279 (output_pubnames, output_aranges): Update version comments.
21280 (output_one_line_info_table): Output view numbers in asm comments.
21281 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21282 Call maybe_gen_llsym.
21283 (loc_list_from_tree_1): Adjust.
21284 (add_AT_location_description): Create view list attribute if
21285 needed, check it's absent otherwise.
21286 (convert_cfa_to_fb_loc_list): Adjust.
21287 (maybe_emit_file): Call output_asm_line_debug_info for test.
21288 (dwarf2out_var_location): Reset views as needed. Precompute
21289 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21290 attribute. Set view.
21291 (new_line_info_table): Reset next view.
21292 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21293 (dwarf2out_source_line): Likewise. Output view resets and labels to
21294 the assembler, or select appropriate line info opcodes.
21295 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21296 (optimize_string_length): Catch it. Adjust.
21297 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21298 dw_val_class_view_list, and remove it if no longer needed.
21299 (hash_loc_list): Hash view numbers.
21300 (loc_list_hasher::equal): Compare them.
21301 (optimize_location_lists): Check whether a view list symbol is
21302 needed, and whether the locview attribute is present, and
21303 whether they match. Remove the locview attribute if no longer
21304 needed.
21305 (index_location_lists): Call skip_loc_list_entry for test.
21306 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21307 Use output_dwarf_version.
21308 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21309 (struct dw_val_node): Add val_view_list.
21310 * final.c (SEEN_NEXT_VIEW): New.
21311 (set_next_view_needed): New.
21312 (clear_next_view_needed): New.
21313 (maybe_output_next_view): New.
21314 (final_start_function): Rename to...
21315 (final_start_function_1): ... this. Take pointer to FIRST,
21316 add SEEN parameter. Emit param bindings in the initial view.
21317 (final_start_function): Reintroduce SEEN-less interface.
21318 (final): Rename to...
21319 (final_1): ... this. Take SEEN parameter. Output final pending
21320 next view at the end.
21321 (final): Reintroduce seen-less interface.
21322 (final_scan_insn): Output pending next view before switching
21323 sections or ending a block. Mark the next view as needed when
21324 outputting variable locations. Notify debug backend of section
21325 changes, and of location view changes.
21326 (rest_of_handle_final): Adjust.
21327 * toplev.c (process_options): Autodetect value for debug variable
21328 location views option. Warn on incompat5 without -gdwarf-5.
21329 * doc/invoke.texi (gvariable-location-views): New.
21330 (gvariable-location-views=incompat5): New.
21331 (gno-variable-location-views): New.
21332
21333 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21334
21335 PR tree-optimization/84136
21336 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21337 that the result of find_edge is non-NULL.
21338
21339 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21340
21341 PR target/83008
21342 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21343 storing integer register in SImode. Fix cost of 256 and 512
21344 byte aligned SSE register store.
21345
21346 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21347
21348 * config/i386/i386.c (ix86_multiplication_cost): Fix
21349 multiplication cost for TARGET_AVX512DQ.
21350
21351 2018-02-08 Marek Polacek <polacek@redhat.com>
21352
21353 PR tree-optimization/84238
21354 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21355 get_range_strlen.
21356
21357 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21358
21359 PR tree-optimization/84265
21360 * tree-vect-stmts.c (vectorizable_store): Don't treat
21361 VMAT_CONTIGUOUS accesses as grouped.
21362 (vectorizable_load): Likewise.
21363
21364 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21365
21366 PR tree-optimization/81635
21367 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21368 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21369 (test_round_for_mask): New functions.
21370 (wide_int_cc_tests): Call test_round_for_mask.
21371 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21372 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21373 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21374 range returned by get_range_info.
21375
21376 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21377
21378 PR ipa/81360
21379 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21380 * symtab.c: Include builtins.h
21381 (symtab_node::output_to_lto_symbol_table_p): Move here
21382 from lto-streamer-out.c:output_symbol_p.
21383 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21384 (output_symbol_p): Move all logic to symtab.c
21385 (produce_symtab): Update.
21386
21387 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21388
21389 * config/s390/s390-opts.h (enum indirect_branch): Define.
21390 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21391 (s390_indirect_branch_via_thunk)
21392 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21393 (enum s390_indirect_branch_type): Define.
21394 * config/s390/s390.c (struct s390_frame_layout, struct
21395 machine_function): Remove.
21396 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21397 (indirect_branch_table_label_no, indirect_branch_table_name):
21398 Define variables.
21399 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21400 (enum s390_indirect_branch_option): Define.
21401 (s390_return_addr_from_memory): New function.
21402 (s390_handle_string_attribute): New function.
21403 (s390_attribute_table): Add new attribute handler.
21404 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21405 (s390_indirect_branch_via_thunk): New function.
21406 (s390_indirect_branch_via_inline_thunk): New function.
21407 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21408 sibling call optimization for non z10 compiles.
21409 (s390_emit_call): Force indirect branch target to be a single
21410 register. Add r1 clobber for non-z10 compiles.
21411 (s390_emit_epilogue): Emit return jump via return_use expander.
21412 (s390_reorg): Handle JUMP_INSNs as execute targets.
21413 (s390_option_override_internal): Perform validity checks for the
21414 new command line options.
21415 (s390_indirect_branch_attrvalue): New function.
21416 (s390_indirect_branch_settings): New function.
21417 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21418 (s390_output_indirect_thunk_function): New function.
21419 (s390_code_end): Implement target hook.
21420 (s390_case_values_threshold): Implement target hook.
21421 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21422 macros.
21423 * config/s390/s390.h (struct s390_frame_layout)
21424 (struct machine_function): Move here from s390.c.
21425 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21426 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21427 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21428 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21429 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21430 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21431 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21432 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21433 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21434 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21435 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21436 (mnemonic attribute): Add values which aren't recognized
21437 automatically.
21438 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21439 pattern for branch conversion. Fix mnemonic attribute.
21440 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21441 indirect branch via thunk if requested.
21442 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21443 ("*indirect_jump"): Disable for branch conversion using out of
21444 line thunks.
21445 ("indirect_jump_via_thunk<mode>_z10")
21446 ("indirect_jump_via_thunk<mode>")
21447 ("indirect_jump_via_inlinethunk<mode>_z10")
21448 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21449 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21450 ("casesi_jump_via_inlinethunk<mode>_z10")
21451 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21452 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21453 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21454 ("*indirect2_jump"): Disable for branch conversion.
21455 ("casesi_jump"): Turn into expander and expand patterns for branch
21456 conversion.
21457 ("return_use"): New expander.
21458 ("*return"): Emit return via thunk and rename it to ...
21459 ("*return<mode>"): ... this one.
21460 * config/s390/s390.opt: Add new options and and enum for the
21461 option values.
21462
21463 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21464
21465 * lra-constraints.c (match_reload): Unconditionally use
21466 gen_lowpart_SUBREG, rather than selecting between that
21467 and equivalent gen_rtx_SUBREG code.
21468
21469 2018-02-08 Richard Biener <rguenther@suse.de>
21470
21471 PR tree-optimization/84233
21472 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21473 changed flag instead of boguously re-using phi_inserted.
21474
21475 2018-02-08 Martin Jambor <mjambor@suse.cz>
21476
21477 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21478 static local variables.
21479
21480 2018-02-08 Richard Biener <rguenther@suse.de>
21481
21482 PR tree-optimization/84278
21483 * tree-vect-stmts.c (vectorizable_store): When looking for
21484 smaller vector types to perform grouped strided loads/stores
21485 make sure the mode is supported by the target.
21486 (vectorizable_load): Likewise.
21487
21488 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21489
21490 * config/aarch64/aarch64.c (aarch64_components_for_bb):
21491 Increase LDP/STP opportunities by adding adjacent callee-saves.
21492
21493 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21494
21495 PR rtl-optimization/84068
21496 PR rtl-optimization/83459
21497 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21498
21499 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
21500
21501 PR tree-optimization/84224
21502 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21503 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21504 non-zero arguments.
21505
21506 2018-02-07 Iain Sandoe <iain@codesourcery.com>
21507
21508 PR target/84113
21509 * config/rs6000/altivec.md (*restore_world): Remove LR use.
21510 * config/rs6000/predicates.md (restore_world_operation): Adjust op
21511 count, remove one USE.
21512
21513 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
21514
21515 * doc/install.texi (Configuration): Document the
21516 --with-long-double-format={ibm,ieee} PowerPC configuration
21517 options.
21518
21519 PR target/84154
21520 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21521 Convert from define_expand to be define_insn_and_split. Rework
21522 float/double/_Float128 conversions to QI/HI/SImode to work with
21523 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
21524 conversions to QI/HImode types did a store and then a load to
21525 truncate the value. For conversions to VSX registers, don't split
21526 the insn, instead emit the code directly. Use the code iterator
21527 any_fix to combine signed and unsigned conversions.
21528 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21529 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21530 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21531 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21532 (fix_<mode>di2_hw): Likewise.
21533 (fixuns_<mode>di2_hw): Likewise.
21534 (fix_<mode>si2_hw): Likewise.
21535 (fixuns_<mode>si2_hw): Likewise.
21536 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21537 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21538 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21539 fix<uns>_trunc<SFDF:mode>si2_p8.
21540 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21541 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21542 (fix<uns>_<mode>_mem): Likewise.
21543 (fctiw<u>z_<mode>_mem): Likewise.
21544 (fix<uns>_<mode>_mem): Likewise.
21545 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21546 the register allocator from doing a direct move to the GPRs to do
21547 a store, and instead use the ISA 3.0 store byte/half-word from
21548 vector register instruction. For IEEE 128-bit floating point,
21549 also optimize stores of 32-bit ints.
21550 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21551
21552 2018-02-07 Alan Hayward <alan.hayward@arm.com>
21553
21554 * genextract.c (push_pathstr_operand): New function to support
21555 [a-zA-Z].
21556 (walk_rtx): Call push_pathstr_operand.
21557 (print_path): Support [a-zA-Z].
21558
21559 2018-02-07 Richard Biener <rguenther@suse.de>
21560
21561 PR tree-optimization/84037
21562 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21563 (cse_and_gimplify_to_preheader): Declare.
21564 (vect_get_place_in_interleaving_chain): Likewise.
21565 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21566 ivexpr_map.
21567 (_loop_vec_info::~_loop_vec_info): Delete it.
21568 (cse_and_gimplify_to_preheader): New function.
21569 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21570 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21571 (vectorizable_load): Likewise. For grouped stores always base
21572 the IV on the first element.
21573 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21574 condition before gimplifying.
21575
21576 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21577
21578 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21579 *DIV_EXPR and *MOD_EXPR.
21580
21581 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
21582
21583 PR target/84248
21584 * config/i386/i386.c (ix86_option_override_internal): Mask out
21585 the CF_SET bit when checking -fcf-protection.
21586
21587 2018-02-07 Tom de Vries <tom@codesourcery.com>
21588
21589 PR libgomp/84217
21590 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21591 enough.
21592
21593 2018-02-07 Richard Biener <rguenther@suse.de>
21594
21595 PR tree-optimization/84204
21596 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21597 this place.
21598
21599 PR tree-optimization/84205
21600 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21601 special-case isl_ast_op_zdiv_r.
21602
21603 PR tree-optimization/84223
21604 * graphite-scop-detection.c (gather_bbs::before_dom_children):
21605 Only add conditions from within the region.
21606 (gather_bbs::after_dom_children): Adjust.
21607
21608 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
21609
21610 PR target/84209
21611 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21612 * config/avr/avr.md: Only post-reload split REG-REG moves if
21613 either register is GENERAL_REG_P.
21614
21615 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21616
21617 PR tree-optimization/84235
21618 * tree-ssa-scopedtables.c
21619 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21620 if the subtraction is performed in floating point type where NaNs are
21621 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21622 build 1. Formatting fix.
21623
21624 2018-02-06 Jakub Jelinek <jakub@redhat.com>
21625
21626 PR target/84146
21627 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21628 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21629 and skip it regardless of bb boundaries. Use CALL_P macro,
21630 don't test INSN_P (insn) together with CALL_P or JUMP_P check
21631 unnecessarily, formatting fix.
21632
21633 2018-02-06 Michael Collison <michael.collison@arm.com>
21634
21635 * config/arm/thumb2.md:
21636 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21637 (*thumb_mov_notscc): Ditto.
21638
21639 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
21640
21641 PR target/84154
21642 * config/rs6000/rs6000.md (su code attribute): Use "u" for
21643 unsigned_fix, not "s".
21644
21645 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21646
21647 * configure.ac (gcc_fn_eh_frame_ro): New function.
21648 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21649 correct .eh_frame permissions.
21650 * configure: Regenerate.
21651
21652 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
21653
21654 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21655 irrelevant options.
21656
21657 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21658
21659 * config/rs6000/rs6000.c (rs6000_option_override_internal):
21660 Display warning message for -mno-speculate-indirect-jumps.
21661
21662 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
21663
21664 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21665 Undocumented.
21666 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21667
21668 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
21669
21670 PR tree-optimization/84225
21671 * tree-eh.c (find_trapping_overflow): Only call
21672 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21673
21674 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21675
21676 PR target/84145
21677 * config/i386/i386.c: Reimplement the check of possible options
21678 -mibt/-mshstk conbination. Change error messages.
21679 * doc/invoke.texi: Fix a typo: remove extra '='.
21680
21681 2018-02-06 Marek Polacek <polacek@redhat.com>
21682
21683 PR tree-optimization/84228
21684 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21685
21686 2018-02-06 Tamar Christina <tamar.christina@arm.com>
21687
21688 PR target/82641
21689 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21690 emitted arch directives.
21691 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21692 __ARM_FEATURE_COPROC before changing architectures.
21693
21694 2018-02-06 Richard Biener <rguenther@suse.de>
21695
21696 * config/i386/i386.c (print_reg): Fix typo.
21697 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21698
21699 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
21700
21701 * configure: Regenerate.
21702
21703 2018-02-05 Martin Sebor <msebor@redhat.com>
21704
21705 PR tree-optimization/83369
21706 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21707 inlining context.
21708
21709 2018-02-05 Martin Liska <mliska@suse.cz>
21710
21711 * doc/invoke.texi: Cherry-pick upstream r323995.
21712
21713 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
21714
21715 * ira.c (ira_init_register_move_cost): Adjust comment.
21716
21717 2018-02-05 Martin Liska <mliska@suse.cz>
21718
21719 PR gcov-profile/84137
21720 * doc/gcov.texi: Fix typo in documentation.
21721
21722 2018-02-05 Martin Liska <mliska@suse.cz>
21723
21724 PR gcov-profile/83879
21725 * doc/gcov.texi: Document necessity of --dynamic-list-data when
21726 using dlopen functionality.
21727
21728 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
21729
21730 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21731 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21732 _mm_maskz_range_ss, _mm_mask_range_round_ss,
21733 _mm_maskz_range_round_ss): New intrinsics.
21734 (__builtin_ia32_rangesd128_round)
21735 (__builtin_ia32_rangess128_round): Remove.
21736 (__builtin_ia32_rangesd128_mask_round,
21737 __builtin_ia32_rangess128_mask_round): New builtins.
21738 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21739 __builtin_ia32_rangess128_round): Remove.
21740 (__builtin_ia32_rangesd128_mask_round,
21741 __builtin_ia32_rangess128_mask_round): New builtins.
21742 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21743 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21744 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21745 "<round_saeonly_constraint>")): Changed to ...
21746 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21747 "<round_saeonly_scalar_constraint>")): ... this.
21748 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21749 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21750 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21751 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21752 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21753
21754 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
21755
21756 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21757 options.
21758 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21759 Remove all values except native, 8540 and 8548.
21760
21761 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
21762
21763 * config/i386/i386.c (ix86_output_function_return): Pass
21764 INVALID_REGNUM, instead of -1, as invalid register number to
21765 indirect_thunk_name and output_indirect_thunk.
21766
21767 2018-02-02 Julia Koval <julia.koval@intel.com>
21768
21769 * config.gcc: Add -march=icelake.
21770 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21771 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21772 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21773 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21774 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21775 (processor_target_table): Add icelake.
21776 (ix86_option_override_internal): Handle new PTAs.
21777 (get_builtin_code_for_version): Handle icelake.
21778 (M_INTEL_COREI7_ICELAKE): New.
21779 (fold_builtin_cpu): Handle icelake.
21780 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21781 * doc/invoke.texi: Add -march=icelake.
21782
21783 2018-02-02 Julia Koval <julia.koval@intel.com>
21784
21785 * config/i386/i386.c (ix86_option_override_internal): Change flags type
21786 to wide_int_bitmask.
21787 * wide-int-bitmask.h: New.
21788
21789 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21790
21791 PR target/84066
21792 * config/i386/i386.md: Replace Pmode with word_mode in
21793 builtin_setjmp_setup and builtin_longjmp to support x32.
21794
21795 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
21796
21797 PR target/56010
21798 PR target/83743
21799 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
21800 #include "opts.h".
21801 (rs6000_supported_cpu_names): New static variable.
21802 (linux_cpu_translation_table): Likewise.
21803 (elf_platform) <cpu>: Define new static variable and use it.
21804 Translate kernel AT_PLATFORM name to canonical name if needed.
21805 Error if platform name is unknown.
21806
21807 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
21808
21809 PR target/84089
21810 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
21811
21812 2018-02-01 Jeff Law <law@redhat.com>
21813
21814 PR target/84128
21815 * config/i386/i386.c (release_scratch_register_on_entry): Add new
21816 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
21817 the scratch if RELEASE_VIA_POP is false.
21818 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
21819 If we have to save a temporary register, decrement SIZE appropriately.
21820 Pass new arguments to release_scratch_register_on_entry.
21821 (ix86_adjust_stack_and_probe): Likewise.
21822 (ix86_emit_probe_stack_range): Pass new arguments to
21823 release_scratch_register_on_entry.
21824
21825 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
21826
21827 PR rtl-optimization/84157
21828 * combine.c (change_zero_ext): Use REG_P predicate in
21829 front of HARD_REGISTER_P predicate.
21830
21831 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
21832
21833 * config/avr/avr.c (avr_option_override): Move disabling of
21834 -fdelete-null-pointer-checks to...
21835 * common/config/avr/avr-common.c (avr_option_optimization_table):
21836 ...here.
21837
21838 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21839
21840 PR tree-optimization/81635
21841 * tree-data-ref.c (split_constant_offset_1): For types that
21842 wrap on overflow, try to use range info to prove that wrapping
21843 cannot occur.
21844
21845 2018-02-01 Renlin Li <renlin.li@arm.com>
21846
21847 PR target/83370
21848 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
21849 TAILCALL_ADDR_REGS.
21850 (aarch64_register_move_cost): Likewise.
21851 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
21852 TAILCALL_ADDR_REGS.
21853 (REG_CLASS_NAMES): Likewise.
21854 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
21855 TAILCALL_ADDR_REGS. Remove IP registers.
21856 * config/aarch64/aarch64.md (Ucs): Update register constraint.
21857
21858 2018-02-01 Richard Biener <rguenther@suse.de>
21859
21860 * domwalk.h (dom_walker::dom_walker): Add additional constructor
21861 for specifying RPO order and allow NULL for that.
21862 * domwalk.c (dom_walker::dom_walker): Likewise.
21863 (dom_walker::walk): Handle NULL RPO order.
21864 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
21865 in RPO order.
21866 (rewrite_update_dom_walker): Likewise.
21867 (mark_def_dom_walker): Likewise.
21868
21869 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21870
21871 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
21872 (aarch64_maybe_expand_sve_subreg_move): Declare.
21873 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
21874 * config/aarch64/predicates.md (aarch64_any_register_operand): New
21875 predicate.
21876 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
21877 that are semantically a reverse operation.
21878 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
21879 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
21880 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
21881 functions.
21882 (aarch64_can_change_mode_class): For big-endian, forbid changes
21883 between two SVE modes if they have different element sizes.
21884
21885 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21886
21887 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
21888 the TImode handling for big-endian targets.
21889
21890 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21891
21892 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
21893 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
21894 not just bytes.
21895 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
21896 Remove BSWAP handing for big-endian targets and use the form of
21897 LD1RQ appropariate for the mode.
21898
21899 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21900
21901 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
21902 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
21903 duplicated element.
21904
21905 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21906
21907 PR tearget/83845
21908 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
21909 check for operands that need to go through aarch64_sve_reload_be.
21910
21911 2018-02-01 Jakub Jelinek <jakub@redhat.com>
21912
21913 PR tree-optimization/81661
21914 PR tree-optimization/84117
21915 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
21916 * tree-eh.c: Include gimplify.h.
21917 (find_trapping_overflow, replace_trapping_overflow,
21918 rewrite_to_non_trapping_overflow): New functions.
21919 * tree-vect-loop.c: Include tree-eh.h.
21920 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
21921 * tree-data-ref.c: Include tree-eh.h.
21922 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
21923
21924 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
21925
21926 PR rtl-optimization/84123
21927 * combine.c (change_zero_ext): Check if hard register satisfies
21928 can_change_dest_mode before calling gen_lowpart_SUBREG.
21929
21930 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
21931
21932 PR target/82444
21933 * ira.c (ira_init_register_move_cost): Remove assert.
21934
21935 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
21936
21937 PR rtl-optimization/84071
21938 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
21939 * doc/tm.texi: Regenerate.
21940
21941 2018-01-31 Richard Biener <rguenther@suse.de>
21942
21943 PR tree-optimization/84132
21944 * tree-data-ref.c (analyze_miv_subscript): Properly
21945 check whether evolution_function_is_affine_multivariate_p
21946 before calling gcd_of_steps_may_divide_p.
21947
21948 2018-01-31 Julia Koval <julia.koval@intel.com>
21949
21950 PR target/83618
21951 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
21952 * config/i386/i386.md (rdpid_rex64) New.
21953 (rdpid): Make 32bit only.
21954
21955 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
21956
21957 PR lto/84105
21958 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
21959 an IDENTIFIER_NODE for FUNCTION_TYPE's.
21960
21961 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
21962
21963 Revert
21964 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21965
21966 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21967
21968 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
21969
21970 PR rtl-optimization/84071
21971 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
21972 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
21973
21974 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
21975
21976 * config/arc/arc.c (arc_handle_aux_attribute): New function.
21977 (arc_attribute_table): Add 'aux' attribute.
21978 (arc_in_small_data_p): Consider aux like variables.
21979 (arc_is_aux_reg_p): New function.
21980 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
21981 (arc_get_aux_arg): New function.
21982 (prepare_move_operands): Handle aux-register access.
21983 (arc_handle_aux_attribute): New function.
21984 * doc/extend.texi (ARC Variable attributes): Add subsection.
21985
21986 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
21987
21988 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
21989 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
21990 (arc_attribute_table): Add 'uncached' attribute.
21991 (arc_print_operand): Print '.di' flag for uncached memory
21992 accesses.
21993 (arc_in_small_data_p): Do not consider for small data the uncached
21994 types.
21995 (arc_is_uncached_mem_p): New function.
21996 * config/arc/predicates.md (compact_store_memory_operand): Check
21997 for uncached memory accesses.
21998 (nonvol_nonimm_operand): Likewise.
21999 * doc/extend.texi (ARC Type Attribute): New subsection.
22000
22001 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22002
22003 PR c/84100
22004 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22005 falign-loops=): Add Optimization flag.
22006
22007 2018-01-30 Jeff Law <law@redhat.com>
22008
22009 PR target/84064
22010 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22011 INT_REGISTERS_SAVED. Check it prior to calling
22012 get_scratch_register_on_entry.
22013 (ix86_adjust_stack_and_probe): Similarly.
22014 (ix86_emit_probe_stack_range): Similarly.
22015 (ix86_expand_prologue): Corresponding changes.
22016
22017 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22018
22019 PR target/40411
22020 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22021 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22022
22023 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22024
22025 PR target/84112
22026 * lra-constraints.c (curr_insn_transform): Process AND in the
22027 address.
22028
22029 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22030
22031 PR rtl-optimization/83986
22032 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22033 dependence against last_pending_memory_flush in addition to
22034 pending_jump_insns.
22035
22036 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22037
22038 PR tree-optimization/81611
22039 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22040 copies.
22041
22042 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22043
22044 PR target/83758
22045 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22046 a reg rtx.
22047
22048 2018-01-30 Richard Biener <rguenther@suse.de>
22049 Jakub Jelinek <jakub@redhat.com>
22050
22051 PR tree-optimization/84111
22052 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22053 inner loops added during recursion, as they don't have up-to-date
22054 SSA form.
22055
22056 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22057
22058 PR ipa/81360
22059 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22060 (can_inline_edge_by_limits_p): ... here.
22061 (can_early_inline_edge_p, check_callers,
22062 update_caller_keys, update_callee_keys, recursive_inlining,
22063 add_new_edges_to_heap, speculation_useful_p,
22064 inline_small_functions,
22065 inline_small_functions, flatten_function,
22066 inline_to_all_callers_1): Update.
22067
22068 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22069
22070 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22071 zeros correctly.
22072
22073 2018-01-30 Richard Biener <rguenther@suse.de>
22074
22075 PR tree-optimization/83008
22076 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22077 invariant and constant vector uses in stmts when they need
22078 more than one stmt.
22079
22080 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22081
22082 PR bootstrap/84017
22083 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22084 * configure: Regenerate.
22085
22086 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22087
22088 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22089 pattern.
22090 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22091 Use gen_rtx_REG rather than gen_lowpart.
22092
22093 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22094
22095 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22096 rather than 0 when creating partial subregs.
22097
22098 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22099
22100 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22101 of usage.
22102
22103 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22104
22105 PR target/81550
22106 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22107 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22108 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22109 flags. This restores the settings used before the 2017-07-24.
22110 Turning off pre increment/decrement/modify allows IVOPTS to
22111 optimize DF/SF loops where the index is an int.
22112
22113 2018-01-29 Richard Biener <rguenther@suse.de>
22114 Kelvin Nilsen <kelvin@gcc.gnu.org>
22115
22116 PR bootstrap/80867
22117 * tree-vect-stmts.c (vectorizable_call): Don't call
22118 targetm.vectorize_builtin_md_vectorized_function if callee is
22119 NULL.
22120
22121 2018-01-22 Carl Love <cel@us.ibm.com>
22122
22123 * doc/extend.tex: Fix typo in second arg in
22124 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22125
22126 2018-01-29 Richard Biener <rguenther@suse.de>
22127
22128 PR tree-optimization/84086
22129 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22130 (flush_ssaname_freelist): When SSA names were released reset
22131 the SCEV hash table.
22132
22133 2018-01-29 Richard Biener <rguenther@suse.de>
22134
22135 PR tree-optimization/84057
22136 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22137 removed paths when removing edges.
22138
22139 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22140
22141 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22142 -mfunction-return=@var{choice}.
22143
22144 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22145
22146 PR diagnostic/84034
22147 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22148 Handle CR like TAB.
22149 (layout::print_source_line): Likewise.
22150 (test_get_line_width_without_trailing_whitespace): Add test cases.
22151
22152 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22153
22154 PR middle-end/84040
22155 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22156 debug insns.
22157
22158 2018-01-26 Jim Wilson <jimw@sifive.com>
22159
22160 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22161
22162 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22163 specified.
22164
22165 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22166
22167 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22168 and CMP + SUB-immediate -> SUBS.
22169
22170 2018-01-26 Martin Sebor <msebor@redhat.com>
22171
22172 PR tree-optimization/83896
22173 * tree-ssa-strlen.c (get_string_len): Rename...
22174 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22175 Avoid assuming length is constant.
22176 (handle_char_store): Use HOST_WIDE_INT for string length.
22177
22178 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22179
22180 PR target/81763
22181 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22182 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22183
22184 2018-01-26 Richard Biener <rguenther@suse.de>
22185
22186 PR rtl-optimization/84003
22187 * dse.c (record_store): Only record redundant stores when
22188 the earlier store aliases at least all accesses the later one does.
22189
22190 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22191
22192 PR rtl-optimization/83985
22193 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22194 REG_CFA_RESTORE insns.
22195 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22196 REG_CFA_RESTORE insns here.
22197
22198 PR c/83989
22199 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22200 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22201
22202 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22203
22204 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22205 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22206 (arc_init): Likewise.
22207 (arc_override_options): Likewise.
22208 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22209 value.
22210 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22211 support.
22212 * config/arc/arc.h (TARGET_DBNZ): Define.
22213 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22214 properly set the tune attribute.
22215 (dbnz): Use TARGET_DBNZ guard.
22216 * config/arc/arc.opt (mtune): Add core3 option.
22217
22218 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22219
22220 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22221 recognize new pic like addresses.
22222 (arc_delegitimize_address): Clean up.
22223
22224 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22225
22226 * config/arc/arc-arches.def: Option mrf16 valid for all
22227 architectures.
22228 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22229 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22230 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22231 * config/arc/arc-tables.opt: Regenerate.
22232 * config/arc/arc.c (arc_conditional_register_usage): Handle
22233 reduced register file case.
22234 (arc_file_start): Set must have build attributes.
22235 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22236 mrf16 option value.
22237 * config/arc/arc.opt (mrf16): Add new option.
22238 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22239 * config/arc/genmultilib.awk: Handle new mrf16 option.
22240 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22241 * config/arc/t-multilib: Regenerate.
22242 * doc/invoke.texi (ARC Options): Document mrf16 option.
22243
22244 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22245
22246 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22247 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22248 (arc_attribute_table): Add 'secure_call' attribute.
22249 (arc_print_operand): Print secure call operand.
22250 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22251 secure.
22252 (arc_is_secure_call_p): New function. * config/arc/arc.md
22253 (call_i): Add support for sjli instruction.
22254 (call_value_i): Likewise.
22255 * config/arc/constraints.md (Csc): New constraint.
22256
22257 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22258 John Eric Martin <John.Martin@emmicro-us.com>
22259
22260 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22261 * config/arc/arc.c (_arc_jli_section): New struct.
22262 (arc_jli_section): New type.
22263 (rc_jli_sections): New static variable.
22264 (arc_handle_jli_attribute): New function.
22265 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22266 (arc_file_end): New function.
22267 (TARGET_ASM_FILE_END): Define.
22268 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22269 (arc_add_jli_section): New function.
22270 (jli_call_scan): Likewise.
22271 (arc_reorg): Call jli_call_scan.
22272 (arc_output_addsi): Remove 'S' from printing asm operand.
22273 (arc_is_jli_call_p): New function.
22274 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22275 operand.
22276 (movhi_insn): Likewise.
22277 (movsi_insn): Likewise.
22278 (movsi_set_cc_insn): Likewise.
22279 (loadqi_update): Likewise.
22280 (load_zeroextendqisi_update): Likewise.
22281 (load_signextendqisi_update): Likewise.
22282 (loadhi_update): Likewise.
22283 (load_zeroextendhisi_update): Likewise.
22284 (load_signextendhisi_update): Likewise.
22285 (loadsi_update): Likewise.
22286 (loadsf_update): Likewise.
22287 (movsicc_insn): Likewise.
22288 (bset_insn): Likewise.
22289 (bxor_insn): Likewise.
22290 (bclr_insn): Likewise.
22291 (bmsk_insn): Likewise.
22292 (bicsi3_insn): Likewise.
22293 (cmpsi_cc_c_insn): Likewise.
22294 (movsi_ne): Likewise.
22295 (movsi_cond_exec): Likewise.
22296 (clrsbsi2): Likewise.
22297 (norm_f): Likewise.
22298 (normw): Likewise.
22299 (swap): Likewise.
22300 (divaw): Likewise.
22301 (flag): Likewise.
22302 (sr): Likewise.
22303 (kflag): Likewise.
22304 (ffs): Likewise.
22305 (ffs_f): Likewise.
22306 (fls): Likewise.
22307 (call_i): Remove 'S' asm letter, add jli instruction.
22308 (call_value_i): Likewise.
22309 * config/arc/arc.op (mjli-always): New option.
22310 * config/arc/constraints.md (Cji): New constraint.
22311 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22312 operand.
22313 (subsf3_fpx): Likewise.
22314 (mulsf3_fpx): Likewise.
22315 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22316 asm operand.
22317 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22318 function attrbutes.
22319 * doc/invoke.texi (ARC): Document mjli-always option.
22320
22321 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22322
22323 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22324 avoid addition with 0 and use incw and decw where possible.
22325
22326 2018-01-26 Richard Biener <rguenther@suse.de>
22327
22328 PR tree-optimization/81082
22329 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22330 association if it requires casting to unsigned.
22331 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22332 from fold_plusminus_mult_expr to catch important cases late when
22333 range info is available.
22334
22335 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22336
22337 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22338 * configure.ac (hidden_linkonce): New test.
22339 * configure: Regenerate.
22340 * config.in: Regenerate.
22341
22342 2018-01-26 Julia Koval <julia.koval@intel.com>
22343
22344 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22345 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22346 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22347 _mm_mask_bitshuffle_epi64_mask): Fix type.
22348 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22349 USI_FTYPE_V4DI_V4DI_USI): Remove.
22350 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22351 __builtin_ia32_vpshufbitqmb256_mask,
22352 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22353 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22354 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22355
22356 2018-01-26 Alan Modra <amodra@gmail.com>
22357
22358 PR target/84033
22359 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22360 UNSPEC_VBPERMQ. Sort other unspecs.
22361
22362 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22363
22364 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22365
22366 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22367
22368 PR middle-end/83055
22369 * predict.c (drop_profile): Do not push/pop cfun; update also
22370 node->count.
22371 (handle_missing_profiles): Fix logic looking for zero profiles.
22372
22373 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22374
22375 PR middle-end/83977
22376 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22377 on functions with #pragma omp declare simd or functions with simd
22378 attribute.
22379 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22380 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22381 Remove trailing \n from warning_at calls.
22382
22383 2018-01-25 Tom de Vries <tom@codesourcery.com>
22384
22385 PR target/84028
22386 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22387 for neutered workers.
22388
22389 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22390
22391 PR target/68467
22392 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22393 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22394
22395 2018-01-24 Jeff Law <law@redhat.com>
22396
22397 PR target/83994
22398 * i386.c (get_probe_interval): Move to earlier point.
22399 (ix86_compute_frame_layout): If -fstack-clash-protection and
22400 the frame is larger than the probe interval, then use pushes
22401 to save registers rather than reg->mem moves.
22402 (ix86_expand_prologue): Remove conditional for int_registers_saved
22403 assertion.
22404
22405 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22406
22407 PR target/84014
22408 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22409 min/max for never referenced object.
22410
22411 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22412
22413 PR middle-end/83977
22414 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22415 here.
22416 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22417 attributes from DECL_ATTRIBUTES (decl) without affecting
22418 DECL_ATTRIBUTES (current_function_decl).
22419 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22420 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22421
22422 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22423
22424 PR tree-optimization/83979
22425 * fold-const.c (fold_comparison): Use constant_boolean_node
22426 instead of boolean_{true,false}_node.
22427
22428 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22429
22430 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22431 with zero counts.
22432
22433 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22434
22435 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22436 Simplify the clause that sets the length attribute.
22437 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22438 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22439 clause that sets the length attribute.
22440 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22441
22442 2018-01-24 Tom de Vries <tom@codesourcery.com>
22443
22444 PR target/83589
22445 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22446 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22447 Add strict parameter.
22448 (prevent_branch_around_nothing): Insert dummy insn between branch to
22449 label and label with no ptx insn inbetween.
22450 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22451
22452 2018-01-24 Tom de Vries <tom@codesourcery.com>
22453
22454 PR target/81352
22455 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22456 for neutered threads in warp.
22457 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22458
22459 2018-01-24 Richard Biener <rguenther@suse.de>
22460
22461 PR tree-optimization/83176
22462 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22463 operands.
22464
22465 2018-01-24 Richard Biener <rguenther@suse.de>
22466
22467 PR tree-optimization/82819
22468 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22469 code generating pluses that are no-ops in the target precision.
22470
22471 2018-01-24 Richard Biener <rguenther@suse.de>
22472
22473 PR middle-end/84000
22474 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22475
22476 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22477
22478 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22479 to merge probabilities.
22480 * predict.c (probably_never_executed): Also mark as cold functions
22481 with global 0 profile and guessed local profile.
22482 * profile-count.c (profile_probability::combine_with_count): New
22483 member function.
22484 * profile-count.h (profile_probability::operator*,
22485 profile_probability::operator*=, profile_probability::operator/,
22486 profile_probability::operator/=): Reduce precision to adjusted
22487 and set value to guessed on contradictory divisions.
22488 (profile_probability::combine_with_freq): Remove.
22489 (profile_probability::combine_wiht_count): Declare.
22490 (profile_count::force_nonzero):: Set to adjusted.
22491 (profile_count::probability_in):: Set quality to adjusted.
22492 * tree-ssa-tail-merge.c (replace_block_by): Use
22493 combine_with_count.
22494
22495 2018-01-23 Andrew Waterman <andrew@sifive.com>
22496 Jim Wilson <jimw@sifive.com>
22497
22498 * config/riscv/riscv.c (riscv_stack_boundary): New.
22499 (riscv_option_override): Set riscv_stack_boundary. Handle
22500 riscv_preferred_stack_boundary_arg.
22501 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22502 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22503 (STACK_BOUNDARY): Set to riscv_stack_boundary.
22504 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22505 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22506 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22507
22508 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
22509
22510 PR target/83905
22511 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22512 of struct ix86_frame.
22513 (ix86_expand_epilogue): Likewise. Add a local variable for
22514 the reg_save_offset field in struct ix86_frame.
22515
22516 2018-01-23 Bin Cheng <bin.cheng@arm.com>
22517
22518 PR tree-optimization/82604
22519 * tree-loop-distribution.c (enum partition_kind): New enum item
22520 PKIND_PARTIAL_MEMSET.
22521 (partition_builtin_p): Support above new enum item.
22522 (generate_code_for_partition): Ditto.
22523 (compute_access_range): Differentiate cases that equality can be
22524 proven at all loops, the innermost loops or no loops.
22525 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22526 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
22527 (finalize_partitions, distribute_loop): Don't fuse partition of
22528 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22529 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22530 parloop is enabled.
22531
22532 2018-01-23 Martin Liska <mliska@suse.cz>
22533
22534 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22535 order to ignore the predictor.
22536 (PRED_POLYMORPHIC_CALL): Likewise.
22537 (PRED_RECURSIVE_CALL): Likewise.
22538
22539 2018-01-23 Martin Liska <mliska@suse.cz>
22540
22541 * tree-profile.c (tree_profiling): Print function header to
22542 aware reader which function we are working on.
22543 * value-prof.c (gimple_find_values_to_profile): Do not print
22544 not interesting value histograms.
22545
22546 2018-01-23 Martin Liska <mliska@suse.cz>
22547
22548 * profile-count.h (enum profile_quality): Add
22549 profile_uninitialized as the first value. Do not number values
22550 as they are zero based.
22551 (profile_count::verify): Update sanity check.
22552 (profile_probability::verify): Likewise.
22553
22554 2018-01-23 Nathan Sidwell <nathan@acm.org>
22555
22556 * doc/invoke.texi (ffor-scope): Deprecate.
22557
22558 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22559
22560 PR tree-optimization/83510
22561 * domwalk.c (set_all_edges_as_executable): New function.
22562 (dom_walker::dom_walker): Convert bool param
22563 "skip_unreachable_blocks" to enum reachability. Move setup of
22564 edge flags to set_all_edges_as_executable and only do it when
22565 reachability is REACHABLE_BLOCKS.
22566 * domwalk.h (enum dom_walker::reachability): New enum.
22567 (dom_walker::dom_walker): Convert bool param
22568 "skip_unreachable_blocks" to enum reachability.
22569 (set_all_edges_as_executable): New decl.
22570 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
22571 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22572 "reachability".
22573 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22574 but converting true to REACHABLE_BLOCKS.
22575 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22576 * tree-vrp.c
22577 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22578 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22579 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22580 REACHABLE_BLOCKS.
22581 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22582 if check_all_array_refs will be called.
22583
22584 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22585
22586 * tree.c (selftest::test_location_wrappers): Add more test
22587 coverage.
22588
22589 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22590
22591 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22592 (selftest::test_bit_in_range): Likewise.
22593
22594 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22595
22596 PR testsuite/83888
22597 * doc/sourcebuild.texi (vect_float): Say that the selector
22598 only describes the situation when -funsafe-math-optimizations is on.
22599 (vect_float_strict): Document.
22600
22601 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22602
22603 PR tree-optimization/83965
22604 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22605 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22606 instead of checking only for a reduction.
22607 (vect_recog_widen_sum_pattern): Likewise.
22608
22609 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22610
22611 * predict.c (probably_never_executed): Only use precise profile info.
22612 (compute_function_frequency): Skip after inlining hack since we now
22613 have quality checking.
22614
22615 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22616
22617 * profile-count.h (profile_probability::very_unlikely,
22618 profile_probability::unlikely, profile_probability::even): Set
22619 precision to guessed.
22620
22621 2018-01-23 Richard Biener <rguenther@suse.de>
22622
22623 PR tree-optimization/83963
22624 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22625 Properly terminate dominator walk when crossing the exit edge not
22626 when visiting its source block.
22627
22628 2018-01-23 Jakub Jelinek <jakub@redhat.com>
22629
22630 PR c++/83918
22631 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22632 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22633
22634 2018-01-22 Jakub Jelinek <jakub@redhat.com>
22635
22636 PR tree-optimization/83957
22637 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
22638 semicolon after for body surrounded by braces.
22639
22640 PR tree-optimization/83081
22641 * profile-count.h (profile_probability::split): New method.
22642 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22643 Use profile_probability::split.
22644 (do_compare_rtx_and_jump): Fix adjustment of probabilities
22645 when splitting a single conditional jump into 2.
22646
22647 2018-01-22 David Malcolm <dmalcolm@redhat.com>
22648
22649 PR tree-optimization/69452
22650 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22651 decl.
22652
22653 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22654
22655 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22656 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22657 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22658
22659 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22660
22661 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22662 declaration.
22663 * config/rl78/rl78.md (movdi): New define_expand.
22664 * config/rl78/rl78.c (rl78_split_movdi): New function.
22665
22666 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
22667
22668 PR target/83862
22669 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22670 no longer used.
22671 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22672 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22673 128-bit to produce an UNSPEC move to get the double word with the
22674 signbit and then a shift directly to do signbit.
22675 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22676 implementation with a new version that just does either a direct
22677 move or a regular move. Move memory interface to separate insns.
22678 Move insns so they are next to the expander.
22679 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22680 with signbit move. Split big and little endian case.
22681 (signbit<mode>2_dm_mem_le): Likewise.
22682 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22683 (signbit<mode>2_dm2): Likewise.
22684
22685 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22686
22687 * config/rl78/rl78.md (anddi3): New define_expand.
22688
22689 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22690
22691 * config/rl78/rl78.md (umindi3): New define_expand.
22692
22693 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22694
22695 * config/rl78/rl78.md (smindi3): New define_expand.
22696
22697 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22698
22699 * config/rl78/rl78.md (smaxdi3): New define_expand.
22700
22701 2018-01-22 Carl Love <cel@us.ibm.com>
22702
22703 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22704 LVX_V1TI): Add macro expansion.
22705 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22706 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22707 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22708 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22709 Change check to determine if the instruction is a byte reversing
22710 entry. Fix typo in comment.
22711 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22712 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22713 Add def_builtin calls for new builtins.
22714 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22715 Add define_insn expansion.
22716
22717 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22718
22719 * config/rl78/rl78.md (umaxdi3): New define_expand.
22720
22721 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22722
22723 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22724 for non-QImode registers.
22725
22726 2018-01-22 Richard Biener <rguenther@suse.de>
22727
22728 PR tree-optimization/83963
22729 * graphite-scop-detection.c (scop_detection::get_sese): Delay
22730 including the loop exit block.
22731 (scop_detection::merge_sese): Likewise.
22732 (scop_detection::add_scop): Do it here instead.
22733
22734 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22735
22736 * doc/sourcebuild.texi (arm_softfloat): Document.
22737
22738 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
22739
22740 PR gcc/77734
22741 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22742 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22743 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22744
22745 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22746 David Edelsohn <dje.gcc@gmail.com>
22747
22748 PR target/83946
22749 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22750 Change "crset eq" to "crset 2".
22751 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22752 (*call_indirect_aix<mode>_nospec): Likewise.
22753 (*call_value_indirect_aix<mode>_nospec): Likewise.
22754 (*call_indirect_elfv2<mode>_nospec): Likewise.
22755 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22756 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22757 change assembly output from . to $.
22758 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22759 (indirect_jump<mode>_nospec): Change assembly output from . to $.
22760 (*tablejump<mode>_internal1_nospec): Likewise.
22761
22762 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
22763
22764 PR target/80870
22765 * config/sh/sh_optimize_sett_clrt.cc:
22766 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22767
22768 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
22769
22770 PR tree-optimization/83940
22771 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22772 offset_dt to vect_constant_def rather than vect_unknown_def_type.
22773 (vect_check_load_store_mask): Add a mask_dt_out parameter and
22774 use it to pass back the definition type.
22775 (vect_check_store_rhs): Likewise rhs_dt_out.
22776 (vect_build_gather_load_calls): Add a mask_dt argument and use
22777 it instead of a call to vect_is_simple_use.
22778 (vectorizable_store): Update calls to vect_check_load_store_mask
22779 and vect_check_store_rhs. Use the dt returned by the latter instead
22780 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
22781 instead of calls to vect_is_simple_use. Pass the scalar rather
22782 than the vector operand to vect_is_simple_use when handling
22783 second and subsequent copies of an rhs value.
22784 (vectorizable_load): Update calls to vect_check_load_store_mask
22785 and vect_build_gather_load_calls. Use the cached mask_dt and
22786 gs_info.offset_dt instead of calls to vect_is_simple_use.
22787
22788 2018-01-20 Jakub Jelinek <jakub@redhat.com>
22789
22790 PR middle-end/83945
22791 * tree-emutls.c: Include gimplify.h.
22792 (lower_emutls_2): New function.
22793 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
22794 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
22795 it before further processing.
22796
22797 PR target/83930
22798 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
22799 UINTVAL (trueop1) instead of INTVAL (op1).
22800
22801 2018-01-19 Jakub Jelinek <jakub@redhat.com>
22802
22803 PR debug/81570
22804 PR debug/83728
22805 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
22806 INCOMING_FRAME_SP_OFFSET if not defined.
22807 (scan_trace): Add ENTRY argument. If true and
22808 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
22809 emit a note to adjust the CFA offset.
22810 (create_cfi_notes): Adjust scan_trace callers.
22811 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
22812 INCOMING_FRAME_SP_OFFSET in the CIE.
22813 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
22814 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
22815 Likewise.
22816 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
22817 * doc/tm.texi: Regenerated.
22818
22819 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22820
22821 PR rtl-optimization/83147
22822 * lra-constraints.c (remove_inheritance_pseudos): Use
22823 lra_substitute_pseudo_within_insn.
22824
22825 2018-01-19 Tom de Vries <tom@codesourcery.com>
22826 Cesar Philippidis <cesar@codesourcery.com>
22827
22828 PR target/83920
22829 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
22830
22831 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
22832
22833 PR target/83790
22834 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
22835 spaces for function labels.
22836
22837 2018-01-19 Martin Liska <mliska@suse.cz>
22838
22839 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
22840 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
22841 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
22842 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
22843 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
22844 (PRED_CONST_RETURN): Change from 69 to 65.
22845 (PRED_NULL_RETURN): Change from 91 to 71.
22846 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
22847 (PRED_LOOP_GUARD): Change from 66 to 73.
22848
22849 2018-01-19 Martin Liska <mliska@suse.cz>
22850
22851 * predict.c (predict_insn_def): Add new assert.
22852 (struct branch_predictor): Change type to signed integer.
22853 (test_prediction_value_range): Amend test to cover
22854 PROB_UNINITIALIZED.
22855 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
22856 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
22857 (PRED_LOOP_ITERATIONS_MAX): Likewise.
22858 (PRED_LOOP_IV_COMPARE): Likewise.
22859 * predict.h (PROB_UNINITIALIZED): Define new constant.
22860
22861 2018-01-19 Martin Liska <mliska@suse.cz>
22862
22863 * predict.c (dump_prediction): Add new format for
22864 analyze_brprob.py script which is enabled with -details
22865 suboption.
22866 * profile-count.h (precise_p): New function.
22867
22868 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
22869
22870 PR tree-optimization/83922
22871 * tree-vect-loop.c (vect_verify_full_masking): Return false if
22872 there are no statements that need masking.
22873 (vect_active_double_reduction_p): New function.
22874 (vect_analyze_loop_operations): Use it when handling phis that
22875 are not in the loop header.
22876
22877 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
22878
22879 PR tree-optimization/83914
22880 * tree-vect-loop.c (vectorizable_induction): Don't convert
22881 init_expr or apply the peeling adjustment for inductions
22882 that are nested within the vectorized loop.
22883
22884 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22885
22886 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
22887 instead of NEG.
22888
22889 2018-01-18 Jakub Jelinek <jakub@redhat.com>
22890
22891 PR sanitizer/81715
22892 PR testsuite/83882
22893 * function.h (gimplify_parameters): Add gimple_seq * argument.
22894 * function.c: Include gimple.h and options.h.
22895 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
22896 for the added local temporaries if needed.
22897 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
22898 if there are any parameter cleanups, wrap whole body into a
22899 try/finally with the cleanups.
22900
22901 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
22902
22903 PR target/82964
22904 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
22905 Use GET_MODE_CLASS for scalar floating point.
22906
22907 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
22908
22909 PR ipa/82256
22910 patch by PaX Team
22911 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
22912 Fix call of call_cgraph_insertion_hooks.
22913
22914 2018-01-18 Martin Sebor <msebor@redhat.com>
22915
22916 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
22917
22918 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
22919
22920 PR ipa/83619
22921 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
22922 frequencies.
22923
22924 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
22925
22926 PR other/70268
22927 * common.opt: (-ffile-prefix-map): New option.
22928 * opts.c (common_handle_option): Defer it.
22929 * opts-global.c (handle_common_deferred_options): Handle it.
22930 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
22931 * file-prefix-map.h: New file.
22932 (remap_debug_filename, add_debug_prefix_map): ...here.
22933 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
22934 * final.c (debug_prefix_map, add_debug_prefix_map
22935 remap_debug_filename): Move to...
22936 * file-prefix-map.c: New file.
22937 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
22938 generalize, get rid of alloca(), use strrchr() instead of strchr().
22939 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
22940 Implement in terms of add_prefix_map().
22941 (remap_macro_filename, remap_debug_filename): Implement in term of
22942 remap_filename().
22943 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
22944 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
22945 * dbxout.c: Include file-prefix-map.h.
22946 * varasm.c: Likewise.
22947 * vmsdbgout.c: Likewise.
22948 * xcoffout.c: Likewise.
22949 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
22950 * doc/cppopts.texi (-fmacro-prefix-map): Document.
22951 * doc/invoke.texi (-ffile-prefix-map): Document.
22952 (-fdebug-prefix-map): Update description.
22953
22954 2018-01-18 Martin Liska <mliska@suse.cz>
22955
22956 * config/i386/i386.c (indirect_thunk_name): Document that also
22957 lfence is emitted.
22958 (output_indirect_thunk): Document why both instructions
22959 (pause and lfence) are generated.
22960
22961 2018-01-18 Richard Biener <rguenther@suse.de>
22962
22963 PR tree-optimization/83887
22964 * graphite-scop-detection.c
22965 (scop_detection::get_nearest_dom_with_single_entry): Remove.
22966 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
22967 (scop_detection::merge_sese): Re-implement with a flood-fill
22968 algorithm that properly finds a SESE region if it exists.
22969
22970 2018-01-18 Jakub Jelinek <jakub@redhat.com>
22971
22972 PR c/61240
22973 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
22974 pointer_diff optimizations use view_convert instead of convert.
22975
22976 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22977
22978 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22979 Generate different code for -mno-speculate-indirect-jumps.
22980 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22981 (*call_indirect_aix<mode>): Disable for
22982 -mno-speculate-indirect-jumps.
22983 (*call_indirect_aix<mode>_nospec): New define_insn.
22984 (*call_value_indirect_aix<mode>): Disable for
22985 -mno-speculate-indirect-jumps.
22986 (*call_value_indirect_aix<mode>_nospec): New define_insn.
22987 (*sibcall_nonlocal_sysv<mode>): Generate different code for
22988 -mno-speculate-indirect-jumps.
22989 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22990
22991 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
22992
22993 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
22994 long double type, set the flags for noting the default long double
22995 type, even if we don't pass or return a long double type.
22996
22997 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
22998
22999 PR ipa/83051
23000 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23001 failure.
23002
23003 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23004
23005 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23006 support for merge[hl].
23007 (fold_mergehl_helper): New helper function.
23008 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23009 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23010 (altivec_vmrglw_direct): Add xxmrglw insn.
23011
23012 2018-01-17 Andrew Waterman <andrew@sifive.com>
23013
23014 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23015 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23016
23017 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23018
23019 PR lto/83121
23020 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23021 call the lto_location_cache before reading the
23022 DECL_SOURCE_LOCATION of the types.
23023
23024 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23025 Richard Sandiford <richard.sandiford@linaro.org>
23026
23027 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23028 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23029 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23030 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23031 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23032 Add declaration.
23033 * config/aarch64/constraints.md (aarch64_movti_operand):
23034 Limit immediates.
23035 * config/aarch64/predicates.md (Uti): Add new constraint.
23036
23037 2018-01-17 Carl Love <cel@us.ibm.com>
23038
23039 * config/rs6000/vsx.md (define_expand xl_len_r,
23040 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23041 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23042 lxvll.
23043 (define_expand, define_insn): Move the shift left from the
23044 define_insn to the define_expand for lxvl and stxvl instructions.
23045 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23046 and XL_LEN_R definitions to PURE.
23047
23048 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23049
23050 * config/i386/i386.c (indirect_thunk_name): Declare regno
23051 as unsigned int. Compare regno with INVALID_REGNUM.
23052 (output_indirect_thunk): Ditto.
23053 (output_indirect_thunk_function): Ditto.
23054 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23055 in the call to output_indirect_thunk_function.
23056
23057 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23058
23059 PR middle-end/83884
23060 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23061 rather than the size of inner_type to determine the stack slot size
23062 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23063
23064 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23065
23066 PR target/83546
23067 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23068 to PTA_SILVERMONT.
23069
23070 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23071
23072 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23073 endian Linux systems to optionally enable multilibs for selecting
23074 the long double type if the user configured an explicit type.
23075 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23076 have no long double multilibs if not defined.
23077 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23078 warn if the user used -mabi={ieee,ibm}longdouble and we built
23079 multilibs for long double.
23080 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23081 appropriate multilib option.
23082 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23083 multilib options.
23084 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23085 for building long double multilibs.
23086 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23087
23088 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23089
23090 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23091 copies.
23092
23093 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23094 64 bits.
23095 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23096 128 bits.
23097
23098 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23099 variables.
23100
23101 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23102 return value.
23103
23104 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23105
23106 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23107 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23108
23109 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23110
23111 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23112 different rtl trees depending on TARGET_64BIT.
23113 (rs6000_gen_lvx): Likewise.
23114
23115 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23116
23117 * config/visium/visium.md (nop): Tweak comment.
23118 (hazard_nop): Likewise.
23119
23120 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23121
23122 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23123 -mspeculate-indirect-jumps.
23124 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23125 for -mno-speculate-indirect-jumps.
23126 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23127 (*call_value_indirect_elfv2<mode>): Disable for
23128 -mno-speculate-indirect-jumps.
23129 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23130 (indirect_jump): Emit different RTL for
23131 -mno-speculate-indirect-jumps.
23132 (*indirect_jump<mode>): Disable for
23133 -mno-speculate-indirect-jumps.
23134 (*indirect_jump<mode>_nospec): New define_insn.
23135 (tablejump): Emit different RTL for
23136 -mno-speculate-indirect-jumps.
23137 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23138 (tablejumpsi_nospec): New define_expand.
23139 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23140 (tablejumpdi_nospec): New define_expand.
23141 (*tablejump<mode>_internal1): Disable for
23142 -mno-speculate-indirect-jumps.
23143 (*tablejump<mode>_internal1_nospec): New define_insn.
23144 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23145 option.
23146
23147 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23148
23149 * caller-save.c (insert_save): Drop unnecessary parameter. All
23150 callers updated.
23151
23152 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23153 Richard Biener <rguenth@suse.de>
23154
23155 PR libgomp/83590
23156 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23157 return early, inline manually is_gimple_sizepos. Make sure if we
23158 call gimplify_expr we don't end up with a gimple constant.
23159 * tree.c (variably_modified_type_p): Don't return true for
23160 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23161 * gimplify.h (is_gimple_sizepos): Remove.
23162
23163 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23164
23165 PR tree-optimization/83857
23166 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23167 vectorizable_live_operation for pure SLP statements.
23168 (vectorizable_live_operation): Handle PHIs.
23169
23170 2018-01-16 Richard Biener <rguenther@suse.de>
23171
23172 PR tree-optimization/83867
23173 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23174 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23175
23176 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23177
23178 PR c/83844
23179 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23180 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23181 If off is not INTEGER_CST, issue a may not be aligned warning
23182 rather than isn't aligned. Use isn%'t rather than isn't.
23183 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23184 into MULT_EXPR.
23185 <case MULT_EXPR>: Improve the case when bottom and one of the
23186 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23187 operand, in that case check if the other operand is multiple of
23188 bottom divided by the INTEGER_CST operand.
23189
23190 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23191
23192 PR target/83858
23193 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23194 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23195 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23196 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23197 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23198 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23199 (pa_function_arg_size): New function.
23200
23201 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23202
23203 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23204 in a separate statement.
23205
23206 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23207
23208 PR tree-optimization/83847
23209 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23210 group gathers and scatters.
23211
23212 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23213
23214 PR rtl-optimization/86620
23215 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23216
23217 PR rtl-optimization/83213
23218 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23219 to last if both are JUMP_INSNs.
23220
23221 PR tree-optimization/83843
23222 * gimple-ssa-store-merging.c
23223 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23224 store_immediate_info for bswap/nop orig_stores.
23225
23226 2018-01-15 Andrew Waterman <andrew@sifive.com>
23227
23228 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23229 !TARGET_MUL.
23230 <UDIV>: Increase cost if !TARGET_DIV.
23231
23232 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23233
23234 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23235 (define_attr "cr_logical_3op"): New.
23236 (cceq_ior_compare): Adjust.
23237 (cceq_ior_compare_complement): Adjust.
23238 (*cceq_rev_compare): Adjust.
23239 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23240 (is_cracked_insn): Adjust.
23241 (insn_must_be_first_in_group): Adjust.
23242 * config/rs6000/40x.md: Adjust.
23243 * config/rs6000/440.md: Adjust.
23244 * config/rs6000/476.md: Adjust.
23245 * config/rs6000/601.md: Adjust.
23246 * config/rs6000/603.md: Adjust.
23247 * config/rs6000/6xx.md: Adjust.
23248 * config/rs6000/7450.md: Adjust.
23249 * config/rs6000/7xx.md: Adjust.
23250 * config/rs6000/8540.md: Adjust.
23251 * config/rs6000/cell.md: Adjust.
23252 * config/rs6000/e300c2c3.md: Adjust.
23253 * config/rs6000/e500mc.md: Adjust.
23254 * config/rs6000/e500mc64.md: Adjust.
23255 * config/rs6000/e5500.md: Adjust.
23256 * config/rs6000/e6500.md: Adjust.
23257 * config/rs6000/mpc.md: Adjust.
23258 * config/rs6000/power4.md: Adjust.
23259 * config/rs6000/power5.md: Adjust.
23260 * config/rs6000/power6.md: Adjust.
23261 * config/rs6000/power7.md: Adjust.
23262 * config/rs6000/power8.md: Adjust.
23263 * config/rs6000/power9.md: Adjust.
23264 * config/rs6000/rs64.md: Adjust.
23265 * config/rs6000/titan.md: Adjust.
23266
23267 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23268
23269 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23270 ix86_indirect_branch_register logic.
23271
23272 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23273
23274 * config/i386/constraints.md (Bs): Update
23275 ix86_indirect_branch_register check. Don't check
23276 ix86_indirect_branch_register with GOT_memory_operand.
23277 (Bw): Likewise.
23278 * config/i386/predicates.md (GOT_memory_operand): Don't check
23279 ix86_indirect_branch_register here.
23280 (GOT32_symbol_operand): Likewise.
23281
23282 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23283
23284 * config/i386/predicates.md (constant_call_address_operand):
23285 Rewrite ix86_indirect_branch_register logic.
23286 (sibcall_insn_operand): Likewise.
23287
23288 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23289
23290 * config/i386/constraints.md (Bs): Replace
23291 ix86_indirect_branch_thunk_register with
23292 ix86_indirect_branch_register.
23293 (Bw): Likewise.
23294 * config/i386/i386.md (indirect_jump): Likewise.
23295 (tablejump): Likewise.
23296 (*sibcall_memory): Likewise.
23297 (*sibcall_value_memory): Likewise.
23298 Peepholes of indirect call and jump via memory: Likewise.
23299 * config/i386/i386.opt: Likewise.
23300 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23301 (GOT_memory_operand): Likewise.
23302 (call_insn_operand): Likewise.
23303 (sibcall_insn_operand): Likewise.
23304 (GOT32_symbol_operand): Likewise.
23305
23306 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23307
23308 PR middle-end/83837
23309 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23310 type rather than type addr's type points to.
23311 (expand_omp_atomic_mutex): Likewise.
23312 (expand_omp_atomic): Likewise.
23313
23314 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23315
23316 PR target/83839
23317 * config/i386/i386.c (output_indirect_thunk_function): Use
23318 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23319 for __x86_return_thunk.
23320
23321 2018-01-15 Richard Biener <rguenther@suse.de>
23322
23323 PR middle-end/83850
23324 * expmed.c (extract_bit_field_1): Fix typo.
23325
23326 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23327
23328 PR target/83687
23329 * config/arm/iterators.md (VF): New mode iterator.
23330 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23331 Remove integer-related logic from pattern.
23332 (neon_vabd<mode>_3): Likewise.
23333
23334 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23335
23336 PR middle-end/82694
23337 * common.opt (fstrict-overflow): No longer an alias.
23338 (fwrapv-pointer): New option.
23339 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23340 also for pointer types based on flag_wrapv_pointer.
23341 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23342 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23343 opts->x_flag_wrapv got set.
23344 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23345 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23346 POINTER_TYPE_OVERFLOW_UNDEFINED.
23347 * match.pd: Likewise in address comparison pattern.
23348 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23349
23350 2018-01-15 Richard Biener <rguenther@suse.de>
23351
23352 PR lto/83804
23353 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23354 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23355 Reset type names to their identifier if their TYPE_DECL doesn't
23356 have linkage (and thus is used for ODR and devirt).
23357 (save_debug_info_for_decl): Remove.
23358 (save_debug_info_for_type): Likewise.
23359 (add_tree_to_fld_list): Adjust.
23360 * tree-pretty-print.c (dump_generic_node): Make dumping of
23361 type names more robust.
23362
23363 2018-01-15 Richard Biener <rguenther@suse.de>
23364
23365 * BASE-VER: Bump to 8.0.1.
23366
23367 2018-01-14 Martin Sebor <msebor@redhat.com>
23368
23369 PR other/83508
23370 * builtins.c (check_access): Avoid warning when the no-warning bit
23371 is set.
23372
23373 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23374
23375 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23376 * ira-color (allocno_hard_regs_compare): Likewise.
23377
23378 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23379
23380 PR target/83013
23381 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23382 Use .pushsection/.popsection.
23383
23384 2018-01-14 Martin Sebor <msebor@redhat.com>
23385
23386 PR c++/81327
23387 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23388
23389 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23390
23391 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23392 entry from extra_headers.
23393 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23394 extra_headers, make the list bitwise identical to the i?86-*-* one.
23395
23396 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23397
23398 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23399 -mcmodel=large with -mindirect-branch=thunk,
23400 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23401 -mfunction-return=thunk-extern.
23402 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23403 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23404 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23405
23406 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23407
23408 * config/i386/i386.c (print_reg): Print the name of the full
23409 integer register without '%'.
23410 (ix86_print_operand): Handle 'V'.
23411 * doc/extend.texi: Document 'V' modifier.
23412
23413 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23414
23415 * config/i386/constraints.md (Bs): Disallow memory operand for
23416 -mindirect-branch-register.
23417 (Bw): Likewise.
23418 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23419 (GOT_memory_operand): Likewise.
23420 (call_insn_operand): Likewise.
23421 (sibcall_insn_operand): Likewise.
23422 (GOT32_symbol_operand): Likewise.
23423 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23424 for -mindirect-branch-register.
23425 (tablejump): Likewise.
23426 (*sibcall_memory): Likewise.
23427 (*sibcall_value_memory): Likewise.
23428 Disallow peepholes of indirect call and jump via memory for
23429 -mindirect-branch-register.
23430 (*call_pop): Replace m with Bw.
23431 (*call_value_pop): Likewise.
23432 (*sibcall_pop_memory): Replace m with Bs.
23433 * config/i386/i386.opt (mindirect-branch-register): New option.
23434 * doc/invoke.texi: Document -mindirect-branch-register option.
23435
23436 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23437
23438 * config/i386/i386-protos.h (ix86_output_function_return): New.
23439 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23440 set function_return_type.
23441 (indirect_thunk_name): Add ret_p to indicate thunk for function
23442 return.
23443 (output_indirect_thunk_function): Pass false to
23444 indirect_thunk_name.
23445 (ix86_output_indirect_branch_via_reg): Likewise.
23446 (ix86_output_indirect_branch_via_push): Likewise.
23447 (output_indirect_thunk_function): Create alias for function
23448 return thunk if regno < 0.
23449 (ix86_output_function_return): New function.
23450 (ix86_handle_fndecl_attribute): Handle function_return.
23451 (ix86_attribute_table): Add function_return.
23452 * config/i386/i386.h (machine_function): Add
23453 function_return_type.
23454 * config/i386/i386.md (simple_return_internal): Use
23455 ix86_output_function_return.
23456 (simple_return_internal_long): Likewise.
23457 * config/i386/i386.opt (mfunction-return=): New option.
23458 (indirect_branch): Mention -mfunction-return=.
23459 * doc/extend.texi: Document function_return function attribute.
23460 * doc/invoke.texi: Document -mfunction-return= option.
23461
23462 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23463
23464 * config/i386/i386-opts.h (indirect_branch): New.
23465 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23466 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23467 with local indirect jump when converting indirect call and jump.
23468 (ix86_set_indirect_branch_type): New.
23469 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23470 (indirectlabelno): New.
23471 (indirect_thunk_needed): Likewise.
23472 (indirect_thunk_bnd_needed): Likewise.
23473 (indirect_thunks_used): Likewise.
23474 (indirect_thunks_bnd_used): Likewise.
23475 (INDIRECT_LABEL): Likewise.
23476 (indirect_thunk_name): Likewise.
23477 (output_indirect_thunk): Likewise.
23478 (output_indirect_thunk_function): Likewise.
23479 (ix86_output_indirect_branch_via_reg): Likewise.
23480 (ix86_output_indirect_branch_via_push): Likewise.
23481 (ix86_output_indirect_branch): Likewise.
23482 (ix86_output_indirect_jmp): Likewise.
23483 (ix86_code_end): Call output_indirect_thunk_function if needed.
23484 (ix86_output_call_insn): Call ix86_output_indirect_branch if
23485 needed.
23486 (ix86_handle_fndecl_attribute): Handle indirect_branch.
23487 (ix86_attribute_table): Add indirect_branch.
23488 * config/i386/i386.h (machine_function): Add indirect_branch_type
23489 and has_local_indirect_jump.
23490 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23491 to true.
23492 (tablejump): Likewise.
23493 (*indirect_jump): Use ix86_output_indirect_jmp.
23494 (*tablejump_1): Likewise.
23495 (simple_return_indirect_internal): Likewise.
23496 * config/i386/i386.opt (mindirect-branch=): New option.
23497 (indirect_branch): New.
23498 (keep): Likewise.
23499 (thunk): Likewise.
23500 (thunk-inline): Likewise.
23501 (thunk-extern): Likewise.
23502 * doc/extend.texi: Document indirect_branch function attribute.
23503 * doc/invoke.texi: Document -mindirect-branch= option.
23504
23505 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
23506
23507 PR ipa/83051
23508 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23509
23510 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
23511
23512 * ipa-inline.c (want_inline_small_function_p): Return false if
23513 inlining has already failed with CIF_FINAL_ERROR.
23514 (update_caller_keys): Call want_inline_small_function_p before
23515 can_inline_edge_p.
23516 (update_callee_keys): Likewise.
23517
23518 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23519
23520 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23521 New function.
23522 (rs6000_quadword_masked_address_p): Likewise.
23523 (quad_aligned_load_p): Likewise.
23524 (quad_aligned_store_p): Likewise.
23525 (const_load_sequence_p): Add comment to describe the outer-most loop.
23526 (mimic_memory_attributes_and_flags): New function.
23527 (rs6000_gen_stvx): Likewise.
23528 (replace_swapped_aligned_store): Likewise.
23529 (rs6000_gen_lvx): Likewise.
23530 (replace_swapped_aligned_load): Likewise.
23531 (replace_swapped_load_constant): Capitalize argument name in
23532 comment describing this function.
23533 (rs6000_analyze_swaps): Add a third pass to search for vector loads
23534 and stores that access quad-word aligned addresses and replace
23535 with stvx or lvx instructions when appropriate.
23536 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23537 New function prototype.
23538 (rs6000_quadword_masked_address_p): Likewise.
23539 (rs6000_gen_lvx): Likewise.
23540 (rs6000_gen_stvx): Likewise.
23541 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23542 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23543 when memory address is aligned.
23544 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23545 this split to select lvx instruction when memory address is aligned.
23546 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23547 instruction when memory address is aligned.
23548 (*vsx_le_perm_load_v16qi): Likewise.
23549 (four unnamed splitters): Modify to select the stvx instruction
23550 when memory is aligned.
23551
23552 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
23553
23554 * predict.c (determine_unlikely_bbs): Handle correctly BBs
23555 which appears in the queue multiple times.
23556
23557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23558 Alan Hayward <alan.hayward@arm.com>
23559 David Sherwood <david.sherwood@arm.com>
23560
23561 * tree-vectorizer.h (vec_lower_bound): New structure.
23562 (_loop_vec_info): Add check_nonzero and lower_bounds.
23563 (LOOP_VINFO_CHECK_NONZERO): New macro.
23564 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23565 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23566 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23567 fields. Make seg_len the distance travelled, not including the
23568 access size.
23569 (dr_direction_indicator): Declare.
23570 (dr_zero_step_indicator): Likewise.
23571 (dr_known_forward_stride_p): Likewise.
23572 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23573 tree-ssanames.h.
23574 (runtime_alias_check_p): Allow runtime alias checks with
23575 variable strides.
23576 (operator ==): Compare access_size and align.
23577 (prune_runtime_alias_test_list): Rework for new distinction between
23578 the access_size and seg_len.
23579 (create_intersect_range_checks_index): Likewise. Cope with polynomial
23580 segment lengths.
23581 (get_segment_min_max): New function.
23582 (create_intersect_range_checks): Use it.
23583 (dr_step_indicator): New function.
23584 (dr_direction_indicator): Likewise.
23585 (dr_zero_step_indicator): Likewise.
23586 (dr_known_forward_stride_p): Likewise.
23587 * tree-loop-distribution.c (data_ref_segment_size): Return
23588 DR_STEP * (niters - 1).
23589 (compute_alias_check_pairs): Update call to the dr_with_seg_len
23590 constructor.
23591 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23592 (vect_preserves_scalar_order_p): New function, split out from...
23593 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
23594 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23595 (vect_vfa_access_size): New function.
23596 (vect_vfa_align): Likewise.
23597 (vect_compile_time_alias): Take access_size_a and access_b arguments.
23598 (dump_lower_bound): New function.
23599 (vect_check_lower_bound): Likewise.
23600 (vect_small_gap_p): Likewise.
23601 (vectorizable_with_step_bound_p): Likewise.
23602 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23603 depencies if the vectorization factor is 1. Convert the checks
23604 for nonzero steps into checks on the bounds of DR_STEP. Try using
23605 a bunds check for variable steps if the minimum required step is
23606 relatively small. Update calls to the dr_with_seg_len
23607 constructor and to vect_compile_time_alias.
23608 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23609 function.
23610 (vect_loop_versioning): Call it.
23611 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23612 when retrying.
23613 (vect_estimate_min_profitable_iters): Account for any bounds checks.
23614
23615 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23616 Alan Hayward <alan.hayward@arm.com>
23617 David Sherwood <david.sherwood@arm.com>
23618
23619 * doc/sourcebuild.texi (vect_scatter_store): Document.
23620 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23621 optabs.
23622 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23623 Document.
23624 * genopinit.c (main): Add supports_vec_scatter_store and
23625 supports_vec_scatter_store_cached to target_optabs.
23626 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23627 IFN_MASK_SCATTER_STORE.
23628 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23629 functions.
23630 * internal-fn.h (internal_store_fn_p): Declare.
23631 (internal_fn_stored_value_index): Likewise.
23632 * internal-fn.c (scatter_store_direct): New macro.
23633 (expand_scatter_store_optab_fn): New function.
23634 (direct_scatter_store_optab_supported_p): New macro.
23635 (internal_store_fn_p): New function.
23636 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23637 IFN_MASK_SCATTER_STORE.
23638 (internal_fn_mask_index): Likewise.
23639 (internal_fn_stored_value_index): New function.
23640 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23641 for scatter stores.
23642 * optabs-query.h (supports_vec_scatter_store_p): Declare.
23643 * optabs-query.c (supports_vec_scatter_store_p): New function.
23644 * tree-vectorizer.h (vect_get_store_rhs): Declare.
23645 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23646 true for scatter stores.
23647 (vect_gather_scatter_fn_p): Handle scatter stores too.
23648 (vect_check_gather_scatter): Consider using scatter stores if
23649 supports_vec_scatter_store_p.
23650 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23651 scatter stores too.
23652 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23653 internal_fn_stored_value_index.
23654 (check_load_store_masking): Handle scatter stores too.
23655 (vect_get_store_rhs): Make public.
23656 (vectorizable_call): Use internal_store_fn_p.
23657 (vectorizable_store): Handle scatter store internal functions.
23658 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23659 when deciding whether the end of the group has been reached.
23660 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23661 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23662 (mask_scatter_store<mode>): New insns.
23663
23664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23665 Alan Hayward <alan.hayward@arm.com>
23666 David Sherwood <david.sherwood@arm.com>
23667
23668 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23669 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23670 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23671 function.
23672 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23673 Use vect_truncate_gather_scatter_offset if we can't treat the
23674 operation as a normal gather load or scatter store.
23675 (get_group_load_store_type): Take the gather_scatter_info
23676 as argument. Try using a gather load or scatter store for
23677 single-element groups.
23678 (get_load_store_type): Update calls to get_group_load_store_type
23679 and vect_use_strided_gather_scatters_p.
23680
23681 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23682 Alan Hayward <alan.hayward@arm.com>
23683 David Sherwood <david.sherwood@arm.com>
23684
23685 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23686 optional tree argument.
23687 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23688 null target hooks.
23689 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23690 but continue to use the current value as a fallback.
23691 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23692 to compare the updates.
23693 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23694 (get_load_store_type): Use it when handling a strided access.
23695 (vect_get_strided_load_store_ops): New function.
23696 (vect_get_data_ptr_increment): Likewise.
23697 (vectorizable_load): Handle strided gather loads. Always pass
23698 a step to vect_create_data_ref_ptr and bump_vector_ptr.
23699
23700 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23701 Alan Hayward <alan.hayward@arm.com>
23702 David Sherwood <david.sherwood@arm.com>
23703
23704 * doc/md.texi (gather_load@var{m}): Document.
23705 (mask_gather_load@var{m}): Likewise.
23706 * genopinit.c (main): Add supports_vec_gather_load and
23707 supports_vec_gather_load_cached to target_optabs.
23708 * optabs-tree.c (init_tree_optimization_optabs): Use
23709 ggc_cleared_alloc to allocate target_optabs.
23710 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23711 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23712 functions.
23713 * internal-fn.h (internal_load_fn_p): Declare.
23714 (internal_gather_scatter_fn_p): Likewise.
23715 (internal_fn_mask_index): Likewise.
23716 (internal_gather_scatter_fn_supported_p): Likewise.
23717 * internal-fn.c (gather_load_direct): New macro.
23718 (expand_gather_load_optab_fn): New function.
23719 (direct_gather_load_optab_supported_p): New macro.
23720 (direct_internal_fn_optab): New function.
23721 (internal_load_fn_p): Likewise.
23722 (internal_gather_scatter_fn_p): Likewise.
23723 (internal_fn_mask_index): Likewise.
23724 (internal_gather_scatter_fn_supported_p): Likewise.
23725 * optabs-query.c (supports_at_least_one_mode_p): New function.
23726 (supports_vec_gather_load_p): Likewise.
23727 * optabs-query.h (supports_vec_gather_load_p): Declare.
23728 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23729 and memory_type field.
23730 (NUM_PATTERNS): Bump to 15.
23731 * tree-vect-data-refs.c: Include internal-fn.h.
23732 (vect_gather_scatter_fn_p): New function.
23733 (vect_describe_gather_scatter_call): Likewise.
23734 (vect_check_gather_scatter): Try using internal functions for
23735 gather loads. Recognize existing calls to a gather load function.
23736 (vect_analyze_data_refs): Consider using gather loads if
23737 supports_vec_gather_load_p.
23738 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23739 (vect_get_gather_scatter_offset_type): Likewise.
23740 (vect_convert_mask_for_vectype): Likewise.
23741 (vect_add_conversion_to_patterm): Likewise.
23742 (vect_try_gather_scatter_pattern): Likewise.
23743 (vect_recog_gather_scatter_pattern): New pattern recognizer.
23744 (vect_vect_recog_func_ptrs): Add it.
23745 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23746 internal_fn_mask_index and internal_gather_scatter_fn_p.
23747 (check_load_store_masking): Take the gather_scatter_info as an
23748 argument and handle gather loads.
23749 (vect_get_gather_scatter_ops): New function.
23750 (vectorizable_call): Check internal_load_fn_p.
23751 (vectorizable_load): Likewise. Handle gather load internal
23752 functions.
23753 (vectorizable_store): Update call to check_load_store_masking.
23754 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23755 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23756 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23757 (aarch64_gather_scale_operand_d): New predicates.
23758 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23759 (mask_gather_load<mode>): New insns.
23760
23761 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23762 Alan Hayward <alan.hayward@arm.com>
23763 David Sherwood <david.sherwood@arm.com>
23764
23765 * optabs.def (fold_left_plus_optab): New optab.
23766 * doc/md.texi (fold_left_plus_@var{m}): Document.
23767 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23768 * internal-fn.c (fold_left_direct): Define.
23769 (expand_fold_left_optab_fn): Likewise.
23770 (direct_fold_left_optab_supported_p): Likewise.
23771 * fold-const-call.c (fold_const_fold_left): New function.
23772 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23773 * tree-parloops.c (valid_reduction_p): New function.
23774 (gather_scalar_reductions): Use it.
23775 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23776 (vect_finish_replace_stmt): Declare.
23777 * tree-vect-loop.c (fold_left_reduction_fn): New function.
23778 (needs_fold_left_reduction_p): New function, split out from...
23779 (vect_is_simple_reduction): ...here. Accept reductions that
23780 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23781 (vect_force_simple_reduction): Also store the reduction type in
23782 the assignment's STMT_VINFO_REDUC_TYPE.
23783 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
23784 (merge_with_identity): New function.
23785 (vect_expand_fold_left): Likewise.
23786 (vectorize_fold_left_reduction): Likewise.
23787 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
23788 scalar phi in place for it. Check for target support and reject
23789 cases that would reassociate the operation. Defer the transform
23790 phase to vectorize_fold_left_reduction.
23791 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
23792 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
23793 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
23794
23795 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23796
23797 * tree-if-conv.c (predicate_mem_writes): Remove redundant
23798 call to ifc_temp_var.
23799
23800 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23801 Alan Hayward <alan.hayward@arm.com>
23802 David Sherwood <david.sherwood@arm.com>
23803
23804 * target.def (legitimize_address_displacement): Take the original
23805 offset as a poly_int.
23806 * targhooks.h (default_legitimize_address_displacement): Update
23807 accordingly.
23808 * targhooks.c (default_legitimize_address_displacement): Likewise.
23809 * doc/tm.texi: Regenerate.
23810 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
23811 as an argument, moving assert of ad->disp == ad->disp_term to...
23812 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
23813 Try calling targetm.legitimize_address_displacement before expanding
23814 the address rather than afterwards, and adjust for the new interface.
23815 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
23816 Match the new hook interface. Handle SVE addresses.
23817 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
23818 new hook interface.
23819
23820 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23821
23822 * Makefile.in (OBJS): Add early-remat.o.
23823 * target.def (select_early_remat_modes): New hook.
23824 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
23825 * doc/tm.texi: Regenerate.
23826 * targhooks.h (default_select_early_remat_modes): Declare.
23827 * targhooks.c (default_select_early_remat_modes): New function.
23828 * timevar.def (TV_EARLY_REMAT): New timevar.
23829 * passes.def (pass_early_remat): New pass.
23830 * tree-pass.h (make_pass_early_remat): Declare.
23831 * early-remat.c: New file.
23832 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
23833 function.
23834 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
23835
23836 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23837 Alan Hayward <alan.hayward@arm.com>
23838 David Sherwood <david.sherwood@arm.com>
23839
23840 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
23841 vfm1 with a bound_epilog parameter.
23842 (vect_do_peeling): Update calls accordingly, and move the prologue
23843 call earlier in the function. Treat the base bound_epilog as 0 for
23844 fully-masked loops and retain vf - 1 for other loops. Add 1 to
23845 this base when peeling for gaps.
23846 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
23847 with fully-masked loops.
23848 (vect_estimate_min_profitable_iters): Handle the single peeled
23849 iteration in that case.
23850
23851 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23852 Alan Hayward <alan.hayward@arm.com>
23853 David Sherwood <david.sherwood@arm.com>
23854
23855 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
23856 single-element interleaving even if the size is not a power of 2.
23857 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
23858 accesses for single-element interleaving if the group size is
23859 not a power of 2.
23860
23861 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23862 Alan Hayward <alan.hayward@arm.com>
23863 David Sherwood <david.sherwood@arm.com>
23864
23865 * doc/md.texi (fold_extract_last_@var{m}): Document.
23866 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
23867 * optabs.def (fold_extract_last_optab): New optab.
23868 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
23869 * internal-fn.c (fold_extract_direct): New macro.
23870 (expand_fold_extract_optab_fn): Likewise.
23871 (direct_fold_extract_optab_supported_p): Likewise.
23872 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
23873 * tree-vect-loop.c (vect_model_reduction_cost): Handle
23874 EXTRACT_LAST_REDUCTION.
23875 (get_initial_def_for_reduction): Do not create an initial vector
23876 for EXTRACT_LAST_REDUCTION reductions.
23877 (vectorizable_reduction): Leave the scalar phi in place for
23878 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
23879 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
23880 epilogue code for EXTRACT_LAST_REDUCTION and defer the
23881 transform phase to vectorizable_condition.
23882 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
23883 split out from...
23884 (vect_finish_stmt_generation): ...here.
23885 (vect_finish_replace_stmt): New function.
23886 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
23887 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
23888 pattern.
23889 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
23890
23891 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23892 Alan Hayward <alan.hayward@arm.com>
23893 David Sherwood <david.sherwood@arm.com>
23894
23895 * doc/md.texi (extract_last_@var{m}): Document.
23896 * optabs.def (extract_last_optab): New optab.
23897 * internal-fn.def (EXTRACT_LAST): New internal function.
23898 * internal-fn.c (cond_unary_direct): New macro.
23899 (expand_cond_unary_optab_fn): Likewise.
23900 (direct_cond_unary_optab_supported_p): Likewise.
23901 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
23902 loops using EXTRACT_LAST.
23903 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
23904 (extract_last_<mode>): ...this optab.
23905 (vec_extract<mode><Vel>): Update accordingly.
23906
23907 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23908 Alan Hayward <alan.hayward@arm.com>
23909 David Sherwood <david.sherwood@arm.com>
23910
23911 * target.def (empty_mask_is_expensive): New hook.
23912 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
23913 * doc/tm.texi: Regenerate.
23914 * targhooks.h (default_empty_mask_is_expensive): Declare.
23915 * targhooks.c (default_empty_mask_is_expensive): New function.
23916 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
23917 if the target says that empty masks are expensive.
23918 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
23919 New function.
23920 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
23921
23922 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23923 Alan Hayward <alan.hayward@arm.com>
23924 David Sherwood <david.sherwood@arm.com>
23925
23926 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
23927 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
23928 (vect_use_loop_mask_for_alignment_p): New function.
23929 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
23930 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
23931 niters_skip argument. Make sure that the first niters_skip elements
23932 of the first iteration are inactive.
23933 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
23934 Update call to vect_set_loop_masks_directly.
23935 (get_misalign_in_elems): New function, split out from...
23936 (vect_gen_prolog_loop_niters): ...here.
23937 (vect_update_init_of_dr): Take a code argument that specifies whether
23938 the adjustment should be added or subtracted.
23939 (vect_update_init_of_drs): Likewise.
23940 (vect_prepare_for_masked_peels): New function.
23941 (vect_do_peeling): Skip prologue peeling if we're using a mask
23942 instead. Update call to vect_update_inits_of_drs.
23943 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23944 mask_skip_niters.
23945 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
23946 alignment. Do not include the number of peeled iterations in
23947 the minimum threshold in that case.
23948 (vectorizable_induction): Adjust the start value down by
23949 LOOP_VINFO_MASK_SKIP_NITERS iterations.
23950 (vect_transform_loop): Call vect_prepare_for_masked_peels.
23951 Take the number of skipped iterations into account when calculating
23952 the loop bounds.
23953 * tree-vect-stmts.c (vect_gen_while_not): New function.
23954
23955 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23956 Alan Hayward <alan.hayward@arm.com>
23957 David Sherwood <david.sherwood@arm.com>
23958
23959 * doc/sourcebuild.texi (vect_fully_masked): Document.
23960 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
23961 default value to 0.
23962 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
23963 split out from...
23964 (vect_analyze_loop_2): ...here. Don't check the vectorization
23965 factor against the number of loop iterations if the loop is
23966 fully-masked.
23967
23968 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23969 Alan Hayward <alan.hayward@arm.com>
23970 David Sherwood <david.sherwood@arm.com>
23971
23972 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
23973 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
23974 (dump_groups): Update accordingly.
23975 (iv_use::mem_type): New member variable.
23976 (address_p): New function.
23977 (record_use): Add a mem_type argument and initialize the new
23978 mem_type field.
23979 (record_group_use): Add a mem_type argument. Use address_p.
23980 Remove obsolete null checks of base_object. Update call to record_use.
23981 (find_interesting_uses_op): Update call to record_group_use.
23982 (find_interesting_uses_cond): Likewise.
23983 (find_interesting_uses_address): Likewise.
23984 (get_mem_type_for_internal_fn): New function.
23985 (find_address_like_use): Likewise.
23986 (find_interesting_uses_stmt): Try find_address_like_use before
23987 calling find_interesting_uses_op.
23988 (addr_offset_valid_p): Use the iv mem_type field as the type
23989 of the addressed memory.
23990 (add_autoinc_candidates): Likewise.
23991 (get_address_cost): Likewise.
23992 (split_small_address_groups_p): Use address_p.
23993 (split_address_groups): Likewise.
23994 (add_iv_candidate_for_use): Likewise.
23995 (autoinc_possible_for_pair): Likewise.
23996 (rewrite_groups): Likewise.
23997 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
23998 (determine_group_iv_cost): Update after split of USE_ADDRESS.
23999 (get_alias_ptr_type_for_ptr_address): New function.
24000 (rewrite_use_address): Rewrite address uses in calls that were
24001 identified by find_address_like_use.
24002
24003 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24004 Alan Hayward <alan.hayward@arm.com>
24005 David Sherwood <david.sherwood@arm.com>
24006
24007 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24008 TARGET_MEM_REFs.
24009 * gimple-expr.h (is_gimple_addressable: Likewise.
24010 * gimple-expr.c (is_gimple_address): Likewise.
24011 * internal-fn.c (expand_call_mem_ref): New function.
24012 (expand_mask_load_optab_fn): Use it.
24013 (expand_mask_store_optab_fn): Likewise.
24014
24015 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24016 Alan Hayward <alan.hayward@arm.com>
24017 David Sherwood <david.sherwood@arm.com>
24018
24019 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24020 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24021 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24022 (cond_umax@var{mode}): Document.
24023 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24024 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24025 (cond_umin_optab, cond_umax_optab): New optabs.
24026 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24027 (COND_IOR, COND_XOR): New internal functions.
24028 * internal-fn.h (get_conditional_internal_fn): Declare.
24029 * internal-fn.c (cond_binary_direct): New macro.
24030 (expand_cond_binary_optab_fn): Likewise.
24031 (direct_cond_binary_optab_supported_p): Likewise.
24032 (get_conditional_internal_fn): New function.
24033 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24034 Cope with reduction statements that are vectorized as calls rather
24035 than assignments.
24036 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24037 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24038 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24039 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24040 (UNSPEC_COND_EOR): New unspecs.
24041 (optab): Add mappings for them.
24042 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24043 (sve_int_op, sve_fp_op): New int attributes.
24044
24045 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24046 Alan Hayward <alan.hayward@arm.com>
24047 David Sherwood <david.sherwood@arm.com>
24048
24049 * optabs.def (while_ult_optab): New optab.
24050 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24051 * internal-fn.def (WHILE_ULT): New internal function.
24052 * internal-fn.h (direct_internal_fn_supported_p): New override
24053 that takes two types as argument.
24054 * internal-fn.c (while_direct): New macro.
24055 (expand_while_optab_fn): New function.
24056 (convert_optab_supported_p): Likewise.
24057 (direct_while_optab_supported_p): New macro.
24058 * wide-int.h (wi::udiv_ceil): New function.
24059 * tree-vectorizer.h (rgroup_masks): New structure.
24060 (vec_loop_masks): New typedef.
24061 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24062 and fully_masked_p.
24063 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24064 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24065 (vect_max_vf): New function.
24066 (slpeel_make_loop_iterate_ntimes): Delete.
24067 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24068 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24069 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24070 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24071 internal-fn.h, stor-layout.h and optabs-query.h.
24072 (vect_set_loop_mask): New function.
24073 (add_preheader_seq): Likewise.
24074 (add_header_seq): Likewise.
24075 (interleave_supported_p): Likewise.
24076 (vect_maybe_permute_loop_masks): Likewise.
24077 (vect_set_loop_masks_directly): Likewise.
24078 (vect_set_loop_condition_masked): Likewise.
24079 (vect_set_loop_condition_unmasked): New function, split out from
24080 slpeel_make_loop_iterate_ntimes.
24081 (slpeel_make_loop_iterate_ntimes): Rename to..
24082 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24083 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24084 (vect_do_peeling): Update call accordingly.
24085 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24086 loops.
24087 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24088 mask_compare_type, can_fully_mask_p and fully_masked_p.
24089 (release_vec_loop_masks): New function.
24090 (_loop_vec_info): Use it to free the loop masks.
24091 (can_produce_all_loop_masks_p): New function.
24092 (vect_get_max_nscalars_per_iter): Likewise.
24093 (vect_verify_full_masking): Likewise.
24094 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24095 retries, and free the mask rgroups before retrying. Check loop-wide
24096 reasons for disallowing fully-masked loops. Make the final decision
24097 about whether use a fully-masked loop or not.
24098 (vect_estimate_min_profitable_iters): Do not assume that peeling
24099 for the number of iterations will be needed for fully-masked loops.
24100 (vectorizable_reduction): Disable fully-masked loops.
24101 (vectorizable_live_operation): Likewise.
24102 (vect_halve_mask_nunits): New function.
24103 (vect_double_mask_nunits): Likewise.
24104 (vect_record_loop_mask): Likewise.
24105 (vect_get_loop_mask): Likewise.
24106 (vect_transform_loop): Handle the case in which the final loop
24107 iteration might handle a partial vector. Call vect_set_loop_condition
24108 instead of slpeel_make_loop_iterate_ntimes.
24109 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24110 (check_load_store_masking): New function.
24111 (prepare_load_store_mask): Likewise.
24112 (vectorizable_store): Handle fully-masked loops.
24113 (vectorizable_load): Likewise.
24114 (supportable_widening_operation): Use vect_halve_mask_nunits for
24115 booleans.
24116 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24117 (vect_gen_while): New function.
24118 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24119 (aarch64_uqdec<mode>): New insn.
24120
24121 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24122 Alan Hayward <alan.hayward@arm.com>
24123 David Sherwood <david.sherwood@arm.com>
24124
24125 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24126 (reduc_xor_scal_optab): New optabs.
24127 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24128 (reduc_xor_scal_@var{m}): Document.
24129 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24130 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24131 internal functions.
24132 * fold-const-call.c (fold_const_call): Handle them.
24133 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24134 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24135 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24136 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24137 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24138 (UNSPEC_XORV): New unspecs.
24139 (optab): Add entries for them.
24140 (BITWISEV): New int iterator.
24141 (bit_reduc_op): New int attributes.
24142
24143 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24144 Alan Hayward <alan.hayward@arm.com>
24145 David Sherwood <david.sherwood@arm.com>
24146
24147 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24148 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24149 * optabs.def (vec_shl_insert_optab): New optab.
24150 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24151 (duplicate_and_interleave): Likewise.
24152 * tree-vect-loop.c: Include internal-fn.h.
24153 (neutral_op_for_slp_reduction): New function, split out from
24154 get_initial_defs_for_reduction.
24155 (get_initial_def_for_reduction): Handle option 2 for variable-length
24156 vectors by loading the neutral value into a vector and then shifting
24157 the initial value into element 0.
24158 (get_initial_defs_for_reduction): Replace the code argument with
24159 the neutral value calculated by neutral_op_for_slp_reduction.
24160 Use gimple_build_vector for constant-length vectors.
24161 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24162 but the first group_size elements have a neutral value.
24163 Use duplicate_and_interleave otherwise.
24164 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24165 Update call to get_initial_defs_for_reduction. Handle SLP
24166 reductions for variable-length vectors by creating one vector
24167 result for each scalar result, with the elements associated
24168 with other scalar results stubbed out with the neutral value.
24169 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24170 Require IFN_VEC_SHL_INSERT for double reductions on
24171 variable-length vectors, or SLP reductions that have
24172 a neutral value. Require can_duplicate_and_interleave_p
24173 support for variable-length unchained SLP reductions if there
24174 is no neutral value, such as for MIN/MAX reductions. Also require
24175 the number of vector elements to be a multiple of the number of
24176 SLP statements when doing variable-length unchained SLP reductions.
24177 Update call to vect_create_epilog_for_reduction.
24178 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24179 and remove initial values.
24180 (duplicate_and_interleave): Make public.
24181 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24182 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24183
24184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24185 Alan Hayward <alan.hayward@arm.com>
24186 David Sherwood <david.sherwood@arm.com>
24187
24188 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24189 (can_duplicate_and_interleave_p): New function.
24190 (vect_get_and_check_slp_defs): Take the vector of statements
24191 rather than just the current one. Remove excess parentheses.
24192 Restriction rejectinon of vect_constant_def and vect_external_def
24193 for variable-length vectors to boolean types, or types for which
24194 can_duplicate_and_interleave_p is false.
24195 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24196 (duplicate_and_interleave): New function.
24197 (vect_get_constant_vectors): Use gimple_build_vector for
24198 constant-length vectors and suitable variable-length constant
24199 vectors. Use duplicate_and_interleave for other variable-length
24200 vectors. Don't defer the update when inserting new statements.
24201
24202 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24203 Alan Hayward <alan.hayward@arm.com>
24204 David Sherwood <david.sherwood@arm.com>
24205
24206 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24207 min_profitable_iters doesn't go negative.
24208
24209 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24210 Alan Hayward <alan.hayward@arm.com>
24211 David Sherwood <david.sherwood@arm.com>
24212
24213 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24214 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24215 * optabs.def (vec_mask_load_lanes_optab): New optab.
24216 (vec_mask_store_lanes_optab): Likewise.
24217 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24218 (MASK_STORE_LANES): Likewise.
24219 * internal-fn.c (mask_load_lanes_direct): New macro.
24220 (mask_store_lanes_direct): Likewise.
24221 (expand_mask_load_optab_fn): Handle masked operations.
24222 (expand_mask_load_lanes_optab_fn): New macro.
24223 (expand_mask_store_optab_fn): Handle masked operations.
24224 (expand_mask_store_lanes_optab_fn): New macro.
24225 (direct_mask_load_lanes_optab_supported_p): Likewise.
24226 (direct_mask_store_lanes_optab_supported_p): Likewise.
24227 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24228 parameter.
24229 (vect_load_lanes_supported): Likewise.
24230 * tree-vect-data-refs.c (strip_conversion): New function.
24231 (can_group_stmts_p): Likewise.
24232 (vect_analyze_data_ref_accesses): Use it instead of checking
24233 for a pair of assignments.
24234 (vect_store_lanes_supported): Take a masked_p parameter.
24235 (vect_load_lanes_supported): Likewise.
24236 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24237 vect_store_lanes_supported and vect_load_lanes_supported.
24238 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24239 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24240 parameter. Don't allow gaps for masked accesses.
24241 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24242 and vect_load_lanes_supported.
24243 (get_load_store_type): Take a masked_p parameter and update
24244 call to get_group_load_store_type.
24245 (vectorizable_store): Update call to get_load_store_type.
24246 Handle IFN_MASK_STORE_LANES.
24247 (vectorizable_load): Update call to get_load_store_type.
24248 Handle IFN_MASK_LOAD_LANES.
24249
24250 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24251 Alan Hayward <alan.hayward@arm.com>
24252 David Sherwood <david.sherwood@arm.com>
24253
24254 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24255 modes for SVE.
24256 * config/aarch64/aarch64-protos.h
24257 (aarch64_sve_struct_memory_operand_p): Declare.
24258 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24259 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24260 (VPRED, vpred): Handle SVE structure modes.
24261 * config/aarch64/constraints.md (Utx): New constraint.
24262 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24263 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24264 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24265 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24266 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24267 structure modes. Split into pieces after RA.
24268 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24269 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24270 New patterns.
24271 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24272 SVE structure modes.
24273 (aarch64_classify_address): Likewise.
24274 (sizetochar): Move earlier in file.
24275 (aarch64_print_operand): Handle SVE register lists.
24276 (aarch64_array_mode): New function.
24277 (aarch64_sve_struct_memory_operand_p): Likewise.
24278 (TARGET_ARRAY_MODE): Redefine.
24279
24280 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24281 Alan Hayward <alan.hayward@arm.com>
24282 David Sherwood <david.sherwood@arm.com>
24283
24284 * target.def (array_mode): New target hook.
24285 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24286 * doc/tm.texi: Regenerate.
24287 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24288 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24289 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24290 targetm.array_mode.
24291 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24292 type sizes.
24293
24294 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24295 Alan Hayward <alan.hayward@arm.com>
24296 David Sherwood <david.sherwood@arm.com>
24297
24298 * fold-const.c (fold_binary_loc): Check the argument types
24299 rather than the result type when testing for a vector operation.
24300
24301 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24302
24303 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24304 * doc/tm.texi: Regenerate.
24305
24306 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24307 Alan Hayward <alan.hayward@arm.com>
24308 David Sherwood <david.sherwood@arm.com>
24309
24310 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24311 (sve): Document new AArch64 extension.
24312 * doc/md.texi (w): Extend the description of the AArch64
24313 constraint to include SVE vectors.
24314 (Upl, Upa): Document new AArch64 predicate constraints.
24315 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24316 enum.
24317 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24318 (msve-vector-bits=): New option.
24319 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24320 SVE when these are disabled.
24321 (sve): New extension.
24322 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24323 modes. Adjust their number of units based on aarch64_sve_vg.
24324 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24325 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24326 aarch64_addr_query_type.
24327 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24328 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24329 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24330 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24331 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24332 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24333 (aarch64_simd_imm_zero_p): Delete.
24334 (aarch64_check_zero_based_sve_index_immediate): Declare.
24335 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24336 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24337 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24338 (aarch64_sve_float_mul_immediate_p): Likewise.
24339 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24340 rather than an rtx.
24341 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24342 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24343 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24344 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24345 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24346 (aarch64_regmode_natural_size): Likewise.
24347 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24348 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24349 left one place.
24350 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24351 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24352 for VG and the SVE predicate registers.
24353 (V_ALIASES): Add a "z"-prefixed alias.
24354 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24355 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24356 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24357 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24358 (REG_CLASS_NAMES): Add entries for them.
24359 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24360 and the predicate registers.
24361 (aarch64_sve_vg): Declare.
24362 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24363 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24364 (REGMODE_NATURAL_SIZE): Define.
24365 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24366 SVE macros.
24367 * config/aarch64/aarch64.c: Include cfgrtl.h.
24368 (simd_immediate_info): Add a constructor for series vectors,
24369 and an associated step field.
24370 (aarch64_sve_vg): New variable.
24371 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24372 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24373 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24374 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24375 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24376 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24377 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24378 (aarch64_get_mask_mode): New functions.
24379 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24380 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24381 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24382 predicate modes and predicate registers. Explicitly restrict
24383 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24384 to store a vector mode if it is recognized by
24385 aarch64_classify_vector_mode.
24386 (aarch64_regmode_natural_size): New function.
24387 (aarch64_hard_regno_caller_save_mode): Return the original mode
24388 for predicates.
24389 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24390 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24391 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24392 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24393 functions.
24394 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24395 does not overlap dest if the function is frame-related. Handle
24396 SVE constants.
24397 (aarch64_split_add_offset): New function.
24398 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24399 them aarch64_add_offset.
24400 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24401 and update call to aarch64_sub_sp.
24402 (aarch64_add_cfa_expression): New function.
24403 (aarch64_expand_prologue): Pass extra temporary registers to the
24404 functions above. Handle the case in which we need to emit new
24405 DW_CFA_expressions for registers that were originally saved
24406 relative to the stack pointer, but now have to be expressed
24407 relative to the frame pointer.
24408 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24409 functions above.
24410 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24411 IP0 and IP1 values for SVE frames.
24412 (aarch64_expand_vec_series): New function.
24413 (aarch64_expand_sve_widened_duplicate): Likewise.
24414 (aarch64_expand_sve_const_vector): Likewise.
24415 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24416 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24417 into the register, rather than emitting a SET directly.
24418 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24419 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24420 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24421 (offset_9bit_signed_scaled_p): New functions.
24422 (aarch64_replicate_bitmask_imm): New function.
24423 (aarch64_bitmask_imm): Use it.
24424 (aarch64_cannot_force_const_mem): Reject expressions involving
24425 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24426 (aarch64_classify_index): Handle SVE indices, by requiring
24427 a plain register index with a scale that matches the element size.
24428 (aarch64_classify_address): Handle SVE addresses. Assert that
24429 the mode of the address is VOIDmode or an integer mode.
24430 Update call to aarch64_classify_symbol.
24431 (aarch64_classify_symbolic_expression): Update call to
24432 aarch64_classify_symbol.
24433 (aarch64_const_vec_all_in_range_p): New function.
24434 (aarch64_print_vector_float_operand): Likewise.
24435 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24436 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24437 and the FP immediates 1.0 and 0.5.
24438 (aarch64_print_address_internal): Handle SVE addresses.
24439 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24440 (aarch64_regno_regclass): Handle predicate registers.
24441 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24442 data modes.
24443 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24444 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24445 (aarch64_convert_sve_vector_bits): New function.
24446 (aarch64_override_options): Use it to handle -msve-vector-bits=.
24447 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24448 rather than an rtx.
24449 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24450 Handle SVE vector and predicate modes. Accept VL-based constants
24451 that need only one temporary register, and VL offsets that require
24452 no temporary registers.
24453 (aarch64_conditional_register_usage): Mark the predicate registers
24454 as fixed if SVE isn't available.
24455 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24456 Return true for SVE vector and predicate modes.
24457 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24458 rather than an unsigned int. Handle SVE modes.
24459 (aarch64_preferred_simd_mode): Update call accordingly. Handle
24460 SVE modes.
24461 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24462 if SVE is enabled.
24463 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24464 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24465 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24466 (aarch64_sve_float_mul_immediate_p): New functions.
24467 (aarch64_sve_valid_immediate): New function.
24468 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24469 Explicitly reject structure modes. Check for INDEX constants.
24470 Handle PTRUE and PFALSE constants.
24471 (aarch64_check_zero_based_sve_index_immediate): New function.
24472 (aarch64_simd_imm_zero_p): Delete.
24473 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24474 vector modes. Accept constants in the range of CNT[BHWD].
24475 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24476 ask for an Advanced SIMD mode.
24477 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24478 (aarch64_simd_vector_alignment): Handle SVE predicates.
24479 (aarch64_vectorize_preferred_vector_alignment): New function.
24480 (aarch64_simd_vector_alignment_reachable): Use it instead of
24481 the vector size.
24482 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24483 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24484 functions.
24485 (MAX_VECT_LEN): Delete.
24486 (expand_vec_perm_d): Add a vec_flags field.
24487 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24488 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24489 (aarch64_evpc_ext): Don't apply a big-endian lane correction
24490 for SVE modes.
24491 (aarch64_evpc_rev): Rename to...
24492 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
24493 (aarch64_evpc_rev_global): New function.
24494 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24495 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24496 MAX_VECT_LEN.
24497 (aarch64_evpc_sve_tbl): New function.
24498 (aarch64_expand_vec_perm_const_1): Update after rename of
24499 aarch64_evpc_rev. Handle SVE permutes too, trying
24500 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24501 than aarch64_evpc_tbl.
24502 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24503 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24504 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24505 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24506 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24507 (aarch64_expand_sve_vcond): New functions.
24508 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24509 of aarch64_vector_mode_p.
24510 (aarch64_dwarf_poly_indeterminate_value): New function.
24511 (aarch64_compute_pressure_classes): Likewise.
24512 (aarch64_can_change_mode_class): Likewise.
24513 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24514 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24515 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24516 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24517 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24518 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24519 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24520 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24521 constraints.
24522 (Dn, Dl, Dr): Accept const as well as const_vector.
24523 (Dz): Likewise. Compare against CONST0_RTX.
24524 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24525 of "vector" where appropriate.
24526 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24527 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24528 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24529 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24530 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24531 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24532 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24533 (v_int_equiv): Extend to SVE modes.
24534 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24535 mode attributes.
24536 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24537 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24538 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24539 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24540 (SVE_COND_FP_CMP): New int iterators.
24541 (perm_hilo): Handle the new unpack unspecs.
24542 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24543 attributes.
24544 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24545 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24546 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24547 (aarch64_equality_operator, aarch64_constant_vector_operand)
24548 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24549 (aarch64_sve_nonimmediate_operand): Likewise.
24550 (aarch64_sve_general_operand): Likewise.
24551 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24552 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24553 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24554 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24555 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24556 (aarch64_sve_float_arith_immediate): Likewise.
24557 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24558 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24559 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24560 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24561 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24562 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24563 (aarch64_sve_float_arith_operand): Likewise.
24564 (aarch64_sve_float_arith_with_sub_operand): Likewise.
24565 (aarch64_sve_float_mul_operand): Likewise.
24566 (aarch64_sve_vec_perm_operand): Likewise.
24567 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24568 (aarch64_mov_operand): Accept const_poly_int and const_vector.
24569 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24570 as well as const_vector.
24571 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24572 in file. Use CONST0_RTX and CONSTM1_RTX.
24573 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
24574 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24575 Use aarch64_simd_imm_zero.
24576 * config/aarch64/aarch64-sve.md: New file.
24577 * config/aarch64/aarch64.md: Include it.
24578 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24579 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24580 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24581 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24582 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24583 (sve): New attribute.
24584 (enabled): Disable instructions with the sve attribute unless
24585 TARGET_SVE.
24586 (movqi, movhi): Pass CONST_POLY_INT operaneds through
24587 aarch64_expand_mov_immediate.
24588 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24589 CNT[BHSD] immediates.
24590 (movti): Split CONST_POLY_INT moves into two halves.
24591 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24592 Split additions that need a temporary here if the destination
24593 is the stack pointer.
24594 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24595 (*add<mode>3_poly_1): New instruction.
24596 (set_clobber_cc): New expander.
24597
24598 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24599
24600 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24601 parameter and use it instead of GET_MODE_SIZE (innermode). Use
24602 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24603 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24604 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
24605 Change innermode from fixed_mode_size to machine_mode.
24606 (simplify_subreg): Update call accordingly. Handle a constant-sized
24607 subreg of a variable-length CONST_VECTOR.
24608
24609 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24610 Alan Hayward <alan.hayward@arm.com>
24611 David Sherwood <david.sherwood@arm.com>
24612
24613 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24614 (add_offset_to_base): New function, split out from...
24615 (create_mem_ref): ...here. When handling a scale other than 1,
24616 check first whether the address is valid without the offset.
24617 Add it into the base if so, leaving the index and scale as-is.
24618
24619 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24620
24621 PR c++/83778
24622 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24623 fold_for_warn before checking if arg2 is INTEGER_CST.
24624
24625 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
24626
24627 * config/rs6000/predicates.md (load_multiple_operation): Delete.
24628 (store_multiple_operation): Delete.
24629 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24630 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24631 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24632 guarded by TARGET_STRING.
24633 (rs6000_output_load_multiple): Delete.
24634 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24635 OPTION_MASK_STRING / TARGET_STRING handling.
24636 (print_operand) <'N', 'O'>: Add comment that these are unused now.
24637 (const rs6000_opt_masks) <"string">: Change mask to 0.
24638 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24639 (MASK_STRING): Delete.
24640 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24641 parts. Simplify.
24642 (load_multiple): Delete.
24643 (*ldmsi8): Delete.
24644 (*ldmsi7): Delete.
24645 (*ldmsi6): Delete.
24646 (*ldmsi5): Delete.
24647 (*ldmsi4): Delete.
24648 (*ldmsi3): Delete.
24649 (store_multiple): Delete.
24650 (*stmsi8): Delete.
24651 (*stmsi7): Delete.
24652 (*stmsi6): Delete.
24653 (*stmsi5): Delete.
24654 (*stmsi4): Delete.
24655 (*stmsi3): Delete.
24656 (movmemsi_8reg): Delete.
24657 (corresponding unnamed define_insn): Delete.
24658 (movmemsi_6reg): Delete.
24659 (corresponding unnamed define_insn): Delete.
24660 (movmemsi_4reg): Delete.
24661 (corresponding unnamed define_insn): Delete.
24662 (movmemsi_2reg): Delete.
24663 (corresponding unnamed define_insn): Delete.
24664 (movmemsi_1reg): Delete.
24665 (corresponding unnamed define_insn): Delete.
24666 * config/rs6000/rs6000.opt (mno-string): New.
24667 (mstring): Replace by deprecation warning stub.
24668 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24669
24670 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24671
24672 * regrename.c (regrename_do_replace): If replacing the same
24673 reg multiple times, try to reuse last created gen_raw_REG.
24674
24675 PR debug/81155
24676 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24677 main to workaround a bug in GDB.
24678
24679 2018-01-12 Tom de Vries <tom@codesourcery.com>
24680
24681 PR target/83737
24682 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24683
24684 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
24685
24686 PR rtl-optimization/80481
24687 * ira-color.c (get_cap_member): New function.
24688 (allocnos_conflict_by_live_ranges_p): Use it.
24689 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24690 (setup_slot_coalesced_allocno_live_ranges): Ditto.
24691
24692 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
24693
24694 PR target/83628
24695 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24696 (*saddl_se_1): Ditto.
24697 (*ssubsi_1): Ditto.
24698 (*ssubl_se_1): Ditto.
24699
24700 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24701
24702 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24703 rather than wi::to_widest for DR_INITs.
24704 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24705 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24706 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24707 INTEGER_CSTs.
24708 (vect_analyze_group_access_1): Note that here.
24709
24710 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24711
24712 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24713 polynomial type sizes.
24714
24715 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24716
24717 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24718 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24719 (gimple_add_tmp_var): Likewise.
24720
24721 2018-01-12 Martin Liska <mliska@suse.cz>
24722
24723 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24724 (gimple_alloc_sizes): Likewise.
24725 (dump_gimple_statistics): Use PRIu64 in printf format.
24726 * gimple.h: Change uint64_t to int.
24727
24728 2018-01-12 Martin Liska <mliska@suse.cz>
24729
24730 * tree-core.h: Use uint64_t instead of int.
24731 * tree.c (tree_node_counts): Likewise.
24732 (tree_node_sizes): Likewise.
24733 (dump_tree_statistics): Use PRIu64 in printf format.
24734
24735 2018-01-12 Martin Liska <mliska@suse.cz>
24736
24737 * Makefile.in: As qsort_chk is implemented in vec.c, add
24738 vec.o to linkage of gencfn-macros.
24739 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24740 passing the info to record_node_allocation_statistics.
24741 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24742 and pass the info.
24743 * ggc-common.c (struct ggc_usage): Add operator== and use
24744 it in operator< and compare function.
24745 * mem-stats.h (struct mem_usage): Likewise.
24746 * vec.c (struct vec_usage): Remove operator< and compare
24747 function. Can be simply inherited.
24748
24749 2018-01-12 Martin Jambor <mjambor@suse.cz>
24750
24751 PR target/81616
24752 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24753 * tree-ssa-math-opts.c: Include domwalk.h.
24754 (convert_mult_to_fma_1): New function.
24755 (fma_transformation_info): New type.
24756 (fma_deferring_state): Likewise.
24757 (cancel_fma_deferring): New function.
24758 (result_of_phi): Likewise.
24759 (last_fma_candidate_feeds_initial_phi): Likewise.
24760 (convert_mult_to_fma): Added deferring logic, split actual
24761 transformation to convert_mult_to_fma_1.
24762 (math_opts_dom_walker): New type.
24763 (math_opts_dom_walker::after_dom_children): New method, body moved
24764 here from pass_optimize_widening_mul::execute, added deferring logic
24765 bits.
24766 (pass_optimize_widening_mul::execute): Moved most of code to
24767 math_opts_dom_walker::after_dom_children.
24768 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24769 * config/i386/i386.c (ix86_option_override_internal): Added
24770 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24771
24772 2018-01-12 Richard Biener <rguenther@suse.de>
24773
24774 PR debug/83157
24775 * dwarf2out.c (gen_variable_die): Do not reset old_die for
24776 inline instance vars.
24777
24778 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
24779
24780 PR target/81819
24781 * config/rx/rx.c (rx_is_restricted_memory_address):
24782 Handle SUBREG case.
24783
24784 2018-01-12 Richard Biener <rguenther@suse.de>
24785
24786 PR tree-optimization/80846
24787 * target.def (split_reduction): New target hook.
24788 * targhooks.c (default_split_reduction): New function.
24789 * targhooks.h (default_split_reduction): Declare.
24790 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
24791 target requests first reduce vectors by combining low and high
24792 parts.
24793 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
24794 (get_vectype_for_scalar_type_and_size): Export.
24795 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
24796 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
24797 * doc/tm.texi: Regenerate.
24798 * config/i386/i386.c (ix86_split_reduction): Implement
24799 TARGET_VECTORIZE_SPLIT_REDUCTION.
24800
24801 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24802
24803 PR target/83368
24804 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
24805 in PIC mode except for TARGET_VXWORKS_RTP.
24806 * config/sparc/sparc.c: Include cfgrtl.h.
24807 (TARGET_INIT_PIC_REG): Define.
24808 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
24809 (sparc_pic_register_p): New predicate.
24810 (sparc_legitimate_address_p): Use it.
24811 (sparc_legitimize_pic_address): Likewise.
24812 (sparc_delegitimize_address): Likewise.
24813 (sparc_mode_dependent_address_p): Likewise.
24814 (gen_load_pcrel_sym): Remove 4th parameter.
24815 (load_got_register): Adjust call to above. Remove obsolete stuff.
24816 (sparc_expand_prologue): Do not call load_got_register here.
24817 (sparc_flat_expand_prologue): Likewise.
24818 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
24819 (sparc_use_pseudo_pic_reg): New function.
24820 (sparc_init_pic_reg): Likewise.
24821 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24822 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
24823
24824 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
24825
24826 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
24827 Add item for branch_cost.
24828
24829 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24830
24831 PR rtl-optimization/83565
24832 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
24833 not extend the result to a larger mode for rotate operations.
24834 (num_sign_bit_copies1): Likewise.
24835
24836 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24837
24838 PR target/40411
24839 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
24840 -symbolic.
24841 Use values-Xc.o for -pedantic.
24842 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
24843
24844 2018-01-12 Martin Liska <mliska@suse.cz>
24845
24846 PR ipa/83054
24847 * ipa-devirt.c (final_warning_record::grow_type_warnings):
24848 New function.
24849 (possible_polymorphic_call_targets): Use it.
24850 (ipa_devirt): Likewise.
24851
24852 2018-01-12 Martin Liska <mliska@suse.cz>
24853
24854 * profile-count.h (enum profile_quality): Use 0 as invalid
24855 enum value of profile_quality.
24856
24857 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
24858
24859 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
24860 -mext-string options.
24861
24862 2018-01-12 Richard Biener <rguenther@suse.de>
24863
24864 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
24865 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
24866 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
24867 Likewise.
24868 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
24869
24870 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
24871
24872 * configure.ac (--with-long-double-format): Add support for the
24873 configuration option to change the default long double format on
24874 PowerPC systems.
24875 * config.gcc (powerpc*-linux*-*): Likewise.
24876 * configure: Regenerate.
24877 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
24878 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
24879 used without modification.
24880
24881 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24882
24883 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
24884 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
24885 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
24886 MISC_BUILTIN_SPEC_BARRIER.
24887 (rs6000_init_builtins): Likewise.
24888 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
24889 enum value.
24890 (speculation_barrier): New define_insn.
24891 * doc/extend.texi: Document __builtin_speculation_barrier.
24892
24893 2018-01-11 Jakub Jelinek <jakub@redhat.com>
24894
24895 PR target/83203
24896 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
24897 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
24898 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
24899 iterators.
24900 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
24901 integral modes instead of "ss" and "sd".
24902 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
24903 vectors with 32-bit and 64-bit elements.
24904 (vecdupssescalarmodesuffix): New mode attribute.
24905 (vec_dup<mode>): Use it.
24906
24907 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
24908
24909 PR target/83330
24910 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
24911 frame if argument is passed on stack.
24912
24913 2018-01-11 Jakub Jelinek <jakub@redhat.com>
24914
24915 PR target/82682
24916 * ree.c (combine_reaching_defs): Optimize also
24917 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
24918 reg2=any_extend(exp); reg1=reg2;, formatting fix.
24919
24920 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
24921
24922 PR middle-end/83189
24923 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
24924
24925 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
24926
24927 PR middle-end/83718
24928 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
24929 after they are computed.
24930
24931 2018-01-11 Bin Cheng <bin.cheng@arm.com>
24932
24933 PR tree-optimization/83695
24934 * gimple-loop-linterchange.cc
24935 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
24936 reset cached scev information after interchange.
24937 (pass_linterchange::execute): Remove call to scev_reset_htab.
24938
24939 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24940
24941 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
24942 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
24943 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
24944 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
24945 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
24946 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
24947 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
24948 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
24949 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
24950 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
24951 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
24952 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
24953 (V_lane_reg): Likewise.
24954 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
24955 New define_expand.
24956 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
24957 (vfmal_lane_low<mode>_intrinsic,
24958 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
24959 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
24960 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
24961 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
24962 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
24963 vfmsl_lane_high<mode>_intrinsic): New define_insns.
24964
24965 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24966
24967 * config/arm/arm-cpus.in (fp16fml): New feature.
24968 (ALL_SIMD): Add fp16fml.
24969 (armv8.2-a): Add fp16fml as an option.
24970 (armv8.3-a): Likewise.
24971 (armv8.4-a): Add fp16fml as part of fp16.
24972 * config/arm/arm.h (TARGET_FP16FML): Define.
24973 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
24974 when appropriate.
24975 * config/arm/arm-modes.def (V2HF): Define.
24976 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
24977 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
24978 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
24979 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
24980 vfmsl_low, vfmsl_high): New set of builtins.
24981 * config/arm/iterators.md (PLUSMINUS): New code iterator.
24982 (vfml_op): New code attribute.
24983 (VFMLHALVES): New int iterator.
24984 (VFML, VFMLSEL): New mode attributes.
24985 (V_reg): Define mapping for V2HF.
24986 (V_hi, V_lo): New mode attributes.
24987 (VF_constraint): Likewise.
24988 (vfml_half, vfml_half_selector): New int attributes.
24989 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
24990 define_expand.
24991 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
24992 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
24993 New define_insn.
24994 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
24995 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
24996 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
24997 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
24998 documentation.
24999 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25000 Document new effective target and option set.
25001
25002 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25003
25004 * config/arm/arm-cpus.in (armv8_4): New feature.
25005 (ARMv8_4a): New fgroup.
25006 (armv8.4-a): New arch.
25007 * config/arm/arm-tables.opt: Regenerate.
25008 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25009 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25010 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25011 Add matching rules for -march=armv8.4-a and extensions.
25012 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25013
25014 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25015
25016 PR target/81821
25017 * config/rx/rx.md (BW): New mode attribute.
25018 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25019
25020 2018-01-11 Richard Biener <rguenther@suse.de>
25021
25022 PR tree-optimization/83435
25023 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25024 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25025 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25026
25027 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25028 Alan Hayward <alan.hayward@arm.com>
25029 David Sherwood <david.sherwood@arm.com>
25030
25031 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25032 field.
25033 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25034 (aarch64_print_address_internal): Use it to check for a zero offset.
25035
25036 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25037 Alan Hayward <alan.hayward@arm.com>
25038 David Sherwood <david.sherwood@arm.com>
25039
25040 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25041 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25042 Return a poly_int64 rather than a HOST_WIDE_INT.
25043 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25044 rather than a HOST_WIDE_INT.
25045 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25046 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25047 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25048 final_offset from HOST_WIDE_INT to poly_int64.
25049 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25050 to_constant when getting the number of units in an Advanced SIMD
25051 mode.
25052 (aarch64_builtin_vectorized_function): Check for a constant number
25053 of units.
25054 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25055 GET_MODE_SIZE.
25056 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25057 attribute instead of GET_MODE_NUNITS.
25058 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25059 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25060 GET_MODE_SIZE for fixed-size registers.
25061 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25062 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25063 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25064 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25065 (aarch64_print_operand, aarch64_print_address_internal)
25066 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25067 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25068 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25069 Handle polynomial GET_MODE_SIZE.
25070 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25071 wider than SImode without modification.
25072 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25073 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25074 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25075 passing and returning SVE modes.
25076 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25077 rather than GEN_INT.
25078 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25079 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25080 (aarch64_allocate_and_probe_stack_space): Likewise.
25081 (aarch64_layout_frame): Cope with polynomial offsets.
25082 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25083 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25084 polynomial offsets.
25085 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25086 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25087 poly_int64 rather than a HOST_WIDE_INT.
25088 (aarch64_get_separate_components, aarch64_process_components)
25089 (aarch64_expand_prologue, aarch64_expand_epilogue)
25090 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25091 (aarch64_anchor_offset): New function, split out from...
25092 (aarch64_legitimize_address): ...here.
25093 (aarch64_builtin_vectorization_cost): Handle polynomial
25094 TYPE_VECTOR_SUBPARTS.
25095 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25096 GET_MODE_NUNITS.
25097 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25098 number of elements from the PARALLEL rather than the mode.
25099 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25100 rather than GET_MODE_BITSIZE.
25101 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25102 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25103 (aarch64_expand_vec_perm_const_1): Handle polynomial
25104 d->perm.length () and d->perm elements.
25105 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25106 Apply to_constant to d->perm elements.
25107 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25108 polynomial CONST_VECTOR_NUNITS.
25109 (aarch64_move_pointer): Take amount as a poly_int64 rather
25110 than an int.
25111 (aarch64_progress_pointer): Avoid temporary variable.
25112 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25113 the mode attribute instead of GET_MODE.
25114
25115 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25116 Alan Hayward <alan.hayward@arm.com>
25117 David Sherwood <david.sherwood@arm.com>
25118
25119 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25120 x exists before using it.
25121 (aarch64_add_constant_internal): Rename to...
25122 (aarch64_add_offset_1): ...this. Replace regnum with separate
25123 src and dest rtxes. Handle the case in which they're different,
25124 including when the offset is zero. Replace scratchreg with an rtx.
25125 Use 2 additions if there is no spare register into which we can
25126 move a 16-bit constant.
25127 (aarch64_add_constant): Delete.
25128 (aarch64_add_offset): Replace reg with separate src and dest
25129 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25130 Use aarch64_add_offset_1.
25131 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25132 an rtx rather than an int. Take the delta as a poly_int64
25133 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25134 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25135 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25136 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25137 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25138 and aarch64_add_sp.
25139 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25140 aarch64_add_constant.
25141
25142 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25143
25144 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25145 Use scalar_float_mode.
25146
25147 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25148
25149 * config/aarch64/aarch64-simd.md
25150 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25151 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25152 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25153 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25154 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25155 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25156 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25157 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25158 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25159 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25160
25161 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25162
25163 PR target/83514
25164 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25165 targ_options->x_arm_arch_string is non NULL.
25166
25167 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25168
25169 * config/aarch64/aarch64.h
25170 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25171
25172 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25173
25174 PR target/82096
25175 * expmed.c (emit_store_flag_force): Swap if const op0
25176 and change VOIDmode to mode of op0.
25177
25178 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25179
25180 PR rtl-optimization/83761
25181 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25182 than bytes to mode_for_size.
25183
25184 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25185
25186 PR middle-end/83189
25187 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25188 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25189 profile.
25190
25191 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25192
25193 PR middle-end/83575
25194 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25195 when in layout mode.
25196 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25197 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25198 partition fixup.
25199
25200 2018-01-10 Michael Collison <michael.collison@arm.com>
25201
25202 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25203 * config/aarch64/aarch64-option-extension.def: Add
25204 AARCH64_OPT_EXTENSION of 'fp16fml'.
25205 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25206 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25207 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25208 * config/aarch64/constraints.md (Ui7): New constraint.
25209 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25210 (VFMLA_SEL_W): Ditto.
25211 (f16quad): Ditto.
25212 (f16mac1): Ditto.
25213 (VFMLA16_LOW): New int iterator.
25214 (VFMLA16_HIGH): Ditto.
25215 (UNSPEC_FMLAL): New unspec.
25216 (UNSPEC_FMLSL): Ditto.
25217 (UNSPEC_FMLAL2): Ditto.
25218 (UNSPEC_FMLSL2): Ditto.
25219 (f16mac): New code attribute.
25220 * config/aarch64/aarch64-simd-builtins.def
25221 (aarch64_fmlal_lowv2sf): Ditto.
25222 (aarch64_fmlsl_lowv2sf): Ditto.
25223 (aarch64_fmlalq_lowv4sf): Ditto.
25224 (aarch64_fmlslq_lowv4sf): Ditto.
25225 (aarch64_fmlal_highv2sf): Ditto.
25226 (aarch64_fmlsl_highv2sf): Ditto.
25227 (aarch64_fmlalq_highv4sf): Ditto.
25228 (aarch64_fmlslq_highv4sf): Ditto.
25229 (aarch64_fmlal_lane_lowv2sf): Ditto.
25230 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25231 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25232 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25233 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25234 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25235 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25236 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25237 (aarch64_fmlal_lane_highv2sf): Ditto.
25238 (aarch64_fmlsl_lane_highv2sf): Ditto.
25239 (aarch64_fmlal_laneq_highv2sf): Ditto.
25240 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25241 (aarch64_fmlalq_lane_highv4sf): Ditto.
25242 (aarch64_fmlsl_lane_highv4sf): Ditto.
25243 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25244 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25245 * config/aarch64/aarch64-simd.md:
25246 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25247 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25248 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25249 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25250 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25251 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25252 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25253 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25254 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25255 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25256 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25257 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25258 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25259 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25260 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25261 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25262 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25263 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25264 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25265 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25266 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25267 (vfmlsl_low_u32): Ditto.
25268 (vfmlalq_low_u32): Ditto.
25269 (vfmlslq_low_u32): Ditto.
25270 (vfmlal_high_u32): Ditto.
25271 (vfmlsl_high_u32): Ditto.
25272 (vfmlalq_high_u32): Ditto.
25273 (vfmlslq_high_u32): Ditto.
25274 (vfmlal_lane_low_u32): Ditto.
25275 (vfmlsl_lane_low_u32): Ditto.
25276 (vfmlal_laneq_low_u32): Ditto.
25277 (vfmlsl_laneq_low_u32): Ditto.
25278 (vfmlalq_lane_low_u32): Ditto.
25279 (vfmlslq_lane_low_u32): Ditto.
25280 (vfmlalq_laneq_low_u32): Ditto.
25281 (vfmlslq_laneq_low_u32): Ditto.
25282 (vfmlal_lane_high_u32): Ditto.
25283 (vfmlsl_lane_high_u32): Ditto.
25284 (vfmlal_laneq_high_u32): Ditto.
25285 (vfmlsl_laneq_high_u32): Ditto.
25286 (vfmlalq_lane_high_u32): Ditto.
25287 (vfmlslq_lane_high_u32): Ditto.
25288 (vfmlalq_laneq_high_u32): Ditto.
25289 (vfmlslq_laneq_high_u32): Ditto.
25290 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25291 (AARCH64_FL_FOR_ARCH8_4): New.
25292 (AARCH64_ISA_F16FML): New ISA flag.
25293 (TARGET_F16FML): New feature flag for fp16fml.
25294 (doc/invoke.texi): Document new fp16fml option.
25295
25296 2018-01-10 Michael Collison <michael.collison@arm.com>
25297
25298 * config/aarch64/aarch64-builtins.c:
25299 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25300 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25301 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25302 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25303 (AARCH64_ISA_SHA3): New ISA flag.
25304 (TARGET_SHA3): New feature flag for sha3.
25305 * config/aarch64/iterators.md (sha512_op): New int attribute.
25306 (CRYPTO_SHA512): New int iterator.
25307 (UNSPEC_SHA512H): New unspec.
25308 (UNSPEC_SHA512H2): Ditto.
25309 (UNSPEC_SHA512SU0): Ditto.
25310 (UNSPEC_SHA512SU1): Ditto.
25311 * config/aarch64/aarch64-simd-builtins.def
25312 (aarch64_crypto_sha512hqv2di): New builtin.
25313 (aarch64_crypto_sha512h2qv2di): Ditto.
25314 (aarch64_crypto_sha512su0qv2di): Ditto.
25315 (aarch64_crypto_sha512su1qv2di): Ditto.
25316 (aarch64_eor3qv8hi): Ditto.
25317 (aarch64_rax1qv2di): Ditto.
25318 (aarch64_xarqv2di): Ditto.
25319 (aarch64_bcaxqv8hi): Ditto.
25320 * config/aarch64/aarch64-simd.md:
25321 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25322 (aarch64_crypto_sha512su0qv2di): Ditto.
25323 (aarch64_crypto_sha512su1qv2di): Ditto.
25324 (aarch64_eor3qv8hi): Ditto.
25325 (aarch64_rax1qv2di): Ditto.
25326 (aarch64_xarqv2di): Ditto.
25327 (aarch64_bcaxqv8hi): Ditto.
25328 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25329 (vsha512h2q_u64): Ditto.
25330 (vsha512su0q_u64): Ditto.
25331 (vsha512su1q_u64): Ditto.
25332 (veor3q_u16): Ditto.
25333 (vrax1q_u64): Ditto.
25334 (vxarq_u64): Ditto.
25335 (vbcaxq_u16): Ditto.
25336 * config/arm/types.md (crypto_sha512): New type attribute.
25337 (crypto_sha3): Ditto.
25338 (doc/invoke.texi): Document new sha3 option.
25339
25340 2018-01-10 Michael Collison <michael.collison@arm.com>
25341
25342 * config/aarch64/aarch64-builtins.c:
25343 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25344 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25345 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25346 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25347 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25348 (AARCH64_ISA_SM4): New ISA flag.
25349 (TARGET_SM4): New feature flag for sm4.
25350 * config/aarch64/aarch64-simd-builtins.def
25351 (aarch64_sm3ss1qv4si): Ditto.
25352 (aarch64_sm3tt1aq4si): Ditto.
25353 (aarch64_sm3tt1bq4si): Ditto.
25354 (aarch64_sm3tt2aq4si): Ditto.
25355 (aarch64_sm3tt2bq4si): Ditto.
25356 (aarch64_sm3partw1qv4si): Ditto.
25357 (aarch64_sm3partw2qv4si): Ditto.
25358 (aarch64_sm4eqv4si): Ditto.
25359 (aarch64_sm4ekeyqv4si): Ditto.
25360 * config/aarch64/aarch64-simd.md:
25361 (aarch64_sm3ss1qv4si): Ditto.
25362 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25363 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25364 (aarch64_sm4eqv4si): Ditto.
25365 (aarch64_sm4ekeyqv4si): Ditto.
25366 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25367 (sm3part_op): Ditto.
25368 (CRYPTO_SM3TT): Ditto.
25369 (CRYPTO_SM3PART): Ditto.
25370 (UNSPEC_SM3SS1): New unspec.
25371 (UNSPEC_SM3TT1A): Ditto.
25372 (UNSPEC_SM3TT1B): Ditto.
25373 (UNSPEC_SM3TT2A): Ditto.
25374 (UNSPEC_SM3TT2B): Ditto.
25375 (UNSPEC_SM3PARTW1): Ditto.
25376 (UNSPEC_SM3PARTW2): Ditto.
25377 (UNSPEC_SM4E): Ditto.
25378 (UNSPEC_SM4EKEY): Ditto.
25379 * config/aarch64/constraints.md (Ui2): New constraint.
25380 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25381 * config/arm/types.md (crypto_sm3): New type attribute.
25382 (crypto_sm4): Ditto.
25383 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25384 (vsm3tt1aq_u32): Ditto.
25385 (vsm3tt1bq_u32): Ditto.
25386 (vsm3tt2aq_u32): Ditto.
25387 (vsm3tt2bq_u32): Ditto.
25388 (vsm3partw1q_u32): Ditto.
25389 (vsm3partw2q_u32): Ditto.
25390 (vsm4eq_u32): Ditto.
25391 (vsm4ekeyq_u32): Ditto.
25392 (doc/invoke.texi): Document new sm4 option.
25393
25394 2018-01-10 Michael Collison <michael.collison@arm.com>
25395
25396 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25397 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25398 (AARCH64_FL_FOR_ARCH8_4): New.
25399 (AARCH64_FL_V8_4): New flag.
25400 (doc/invoke.texi): Document new armv8.4-a option.
25401
25402 2018-01-10 Michael Collison <michael.collison@arm.com>
25403
25404 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25405 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25406 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25407 * config/aarch64/aarch64-option-extension.def: Add
25408 AARCH64_OPT_EXTENSION of 'sha2'.
25409 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25410 (crypto): Disable sha2 and aes if crypto disabled.
25411 (crypto): Enable aes and sha2 if enabled.
25412 (simd): Disable sha2 and aes if simd disabled.
25413 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25414 New flags.
25415 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25416 (TARGET_SHA2): New feature flag for sha2.
25417 (TARGET_AES): New feature flag for aes.
25418 * config/aarch64/aarch64-simd.md:
25419 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25420 conditional on TARGET_AES.
25421 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25422 (aarch64_crypto_sha1hsi): Make pattern conditional
25423 on TARGET_SHA2.
25424 (aarch64_crypto_sha1hv4si): Ditto.
25425 (aarch64_be_crypto_sha1hv4si): Ditto.
25426 (aarch64_crypto_sha1su1v4si): Ditto.
25427 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25428 (aarch64_crypto_sha1su0v4si): Ditto.
25429 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25430 (aarch64_crypto_sha256su0v4si): Ditto.
25431 (aarch64_crypto_sha256su1v4si): Ditto.
25432 (doc/invoke.texi): Document new aes and sha2 options.
25433
25434 2018-01-10 Martin Sebor <msebor@redhat.com>
25435
25436 PR tree-optimization/83781
25437 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25438 as string arrays.
25439
25440 2018-01-11 Martin Sebor <msebor@gmail.com>
25441 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25442
25443 PR tree-optimization/83501
25444 PR tree-optimization/81703
25445
25446 * tree-ssa-strlen.c (get_string_cst): Rename...
25447 (get_string_len): ...to this. Handle global constants.
25448 (handle_char_store): Adjust.
25449
25450 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
25451 Jim Wilson <jimw@sifive.com>
25452
25453 * config/riscv/riscv-protos.h (riscv_output_return): New.
25454 * config/riscv/riscv.c (struct machine_function): New naked_p field.
25455 (riscv_attribute_table, riscv_output_return),
25456 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25457 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25458 (riscv_compute_frame_info): Only compute frame->mask if not a naked
25459 function.
25460 (riscv_expand_prologue): Add early return for naked function.
25461 (riscv_expand_epilogue): Likewise.
25462 (riscv_function_ok_for_sibcall): Return false for naked function.
25463 (riscv_set_current_function): New.
25464 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25465 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25466 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25467 * doc/extend.texi (RISC-V Function Attributes): New.
25468
25469 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
25470
25471 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25472 check for 128-bit long double before checking TCmode.
25473 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25474 128-bit long doubles before checking TFmode or TCmode.
25475 (FLOAT128_IBM_P): Likewise.
25476
25477 2018-01-10 Martin Sebor <msebor@redhat.com>
25478
25479 PR tree-optimization/83671
25480 * builtins.c (c_strlen): Unconditionally return zero for the empty
25481 string.
25482 Use -Warray-bounds for warnings.
25483 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25484 for non-constant array indices with COMPONENT_REF, arrays of
25485 arrays, and pointers to arrays.
25486 (gimple_fold_builtin_strlen): Determine and set length range for
25487 non-constant character arrays.
25488
25489 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
25490
25491 PR middle-end/81897
25492 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25493 empty blocks.
25494
25495 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
25496
25497 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25498
25499 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25500
25501 PR target/83399
25502 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25503 VECTOR_MEM_ALTIVEC_OR_VSX_P.
25504 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25505 indexed_or_indirect_operand predicate.
25506 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25507 (*vsx_le_perm_load_v8hi): Likewise.
25508 (*vsx_le_perm_load_v16qi): Likewise.
25509 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25510 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25511 (*vsx_le_perm_store_v8hi): Likewise.
25512 (*vsx_le_perm_store_v16qi): Likewise.
25513 (eight unnamed splitters): Likewise.
25514
25515 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25516
25517 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25518 * config/rs6000/emmintrin.h: Likewise.
25519 * config/rs6000/mmintrin.h: Likewise.
25520 * config/rs6000/xmmintrin.h: Likewise.
25521
25522 2018-01-10 David Malcolm <dmalcolm@redhat.com>
25523
25524 PR c++/43486
25525 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25526 "public_flag".
25527 * tree.c (tree_nop_conversion): Return true for location wrapper
25528 nodes.
25529 (maybe_wrap_with_location): New function.
25530 (selftest::check_strip_nops): New function.
25531 (selftest::test_location_wrappers): New function.
25532 (selftest::tree_c_tests): Call it.
25533 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25534 (maybe_wrap_with_location): New decl.
25535 (EXPR_LOCATION_WRAPPER_P): New macro.
25536 (location_wrapper_p): New inline function.
25537 (tree_strip_any_location_wrapper): New inline function.
25538
25539 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
25540
25541 PR target/83735
25542 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25543 stack_realign_offset for the largest alignment of stack slot
25544 actually used.
25545 (ix86_find_max_used_stack_alignment): New function.
25546 (ix86_finalize_stack_frame_flags): Use it. Set
25547 max_used_stack_alignment if we don't realign stack.
25548 * config/i386/i386.h (machine_function): Add
25549 max_used_stack_alignment.
25550
25551 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
25552
25553 * config/arm/arm.opt (-mbranch-cost): New option.
25554 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25555 account.
25556
25557 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
25558
25559 PR target/83629
25560 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25561 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25562
25563 2018-01-10 Richard Biener <rguenther@suse.de>
25564
25565 PR debug/83765
25566 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25567 early out so it also covers the case where we have a non-NULL
25568 origin.
25569
25570 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25571
25572 PR tree-optimization/83753
25573 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25574 for non-strided grouped accesses if the number of elements is 1.
25575
25576 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25577
25578 PR target/81616
25579 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25580 * i386.h (TARGET_USE_GATHER): Define.
25581 * x86-tune.def (X86_TUNE_USE_GATHER): New.
25582
25583 2018-01-10 Martin Liska <mliska@suse.cz>
25584
25585 PR bootstrap/82831
25586 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25587 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25588 partitioning.
25589 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25590 CLEANUP_NO_PARTITIONING is not set.
25591
25592 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25593
25594 * doc/rtl.texi: Remove documentation of (const ...) wrappers
25595 for vectors, as a partial revert of r254296.
25596 * rtl.h (const_vec_p): Delete.
25597 (const_vec_duplicate_p): Don't test for vector CONSTs.
25598 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25599 * expmed.c (make_tree): Likewise.
25600
25601 Revert:
25602 * common.md (E, F): Use CONSTANT_P instead of checking for
25603 CONST_VECTOR.
25604 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25605 checking for CONST_VECTOR.
25606
25607 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25608
25609 PR middle-end/83575
25610 * predict.c (force_edge_cold): Handle in more sane way edges
25611 with no prediction.
25612
25613 2018-01-09 Carl Love <cel@us.ibm.com>
25614
25615 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25616 V4SI, V4SF types.
25617 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25618 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25619 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25620 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
25621 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25622 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
25623 * config/rs6000/rs6000-protos.h: Add extern defition for
25624 rs6000_generate_float2_double_code.
25625 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25626 function.
25627 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25628 (float2_v2df): Add define_expand.
25629
25630 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
25631
25632 PR target/83628
25633 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25634 op_mode in the force_to_mode call.
25635
25636 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25637
25638 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25639 instead of checking each element individually.
25640 (aarch64_evpc_uzp): Likewise.
25641 (aarch64_evpc_zip): Likewise.
25642 (aarch64_evpc_ext): Likewise.
25643 (aarch64_evpc_rev): Likewise.
25644 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25645 instead of checking each element individually. Return true without
25646 generating rtl if
25647 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25648 whether all selected elements come from the same input, instead of
25649 checking each element individually. Remove calls to gen_rtx_REG,
25650 start_sequence and end_sequence and instead assert that no rtl is
25651 generated.
25652
25653 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25654
25655 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25656 order of HIGH and CONST checks.
25657
25658 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25659
25660 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25661 if the destination isn't an SSA_NAME.
25662
25663 2018-01-09 Richard Biener <rguenther@suse.de>
25664
25665 PR tree-optimization/83668
25666 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25667 move prologue...
25668 (canonicalize_loop_form): ... here, renamed from ...
25669 (canonicalize_loop_closed_ssa_form): ... this and amended to
25670 swap successor edges for loop exit blocks to make us use
25671 the RPO order we need for initial schedule generation.
25672
25673 2018-01-09 Joseph Myers <joseph@codesourcery.com>
25674
25675 PR tree-optimization/64811
25676 * match.pd: When optimizing comparisons with Inf, avoid
25677 introducing or losing exceptions from comparisons with NaN.
25678
25679 2018-01-09 Martin Liska <mliska@suse.cz>
25680
25681 PR sanitizer/82517
25682 * asan.c (shadow_mem_size): Add gcc_assert.
25683
25684 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
25685
25686 Don't save registers in main().
25687
25688 PR target/83738
25689 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25690 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25691 * config/avr/avr.c (avr_set_current_function): Don't error if
25692 naked, OS_task or OS_main are specified at the same time.
25693 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25694 OS_main.
25695 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25696 attribute.
25697 * common/config/avr/avr-common.c (avr_option_optimization_table):
25698 Switch on -mmain-is-OS_task for optimizing compilations.
25699
25700 2018-01-09 Richard Biener <rguenther@suse.de>
25701
25702 PR tree-optimization/83572
25703 * graphite.c: Include cfganal.h.
25704 (graphite_transform_loops): Connect infinite loops to exit
25705 and remove fake edges at the end.
25706
25707 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25708
25709 * ipa-inline.c (edge_badness): Revert accidental checkin.
25710
25711 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25712
25713 PR ipa/80763
25714 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25715 symbols; not inline clones.
25716
25717 2018-01-09 Jakub Jelinek <jakub@redhat.com>
25718
25719 PR target/83507
25720 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25721 hard registers. Formatting fixes.
25722
25723 PR preprocessor/83722
25724 * gcc.c (try_generate_repro): Pass
25725 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25726 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25727 do_report_bug.
25728
25729 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
25730 Kito Cheng <kito.cheng@gmail.com>
25731
25732 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25733 (riscv_leaf_function_p): Delete.
25734 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25735
25736 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25737
25738 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25739 function.
25740 (do_ifelse): New function.
25741 (do_isel): New function.
25742 (do_sub3): New function.
25743 (do_add3): New function.
25744 (do_load_mask_compare): New function.
25745 (do_overlap_load_compare): New function.
25746 (expand_compare_loop): New function.
25747 (expand_block_compare): Call expand_compare_loop() when appropriate.
25748 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25749 option description.
25750 (-mblock-compare-inline-loop-limit): New option.
25751
25752 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25753
25754 PR target/83677
25755 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25756 Reverse order of second and third operands in first alternative.
25757 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25758 of first and second elements in UNSPEC_VPERMR vector.
25759 (altivec_expand_vec_perm_le): Likewise.
25760
25761 2018-01-08 Jeff Law <law@redhat.com>
25762
25763 PR rtl-optimizatin/81308
25764 * tree-switch-conversion.c (cfg_altered): New file scoped static.
25765 (process_switch): If group_case_labels makes a change, then set
25766 cfg_altered.
25767 (pass_convert_switch::execute): If a switch is converted, then
25768 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
25769
25770 PR rtl-optimization/81308
25771 * recog.c (split_all_insns): Conditionally cleanup the CFG after
25772 splitting insns.
25773
25774 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
25775
25776 PR target/83663 - Revert r255946
25777 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25778 generation for cases where splatting a value is not useful.
25779 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25780 across a vec_duplicate and a paradoxical subreg forming a vector
25781 mode to a vec_concat.
25782
25783 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25784
25785 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
25786 -march=armv8.3-a variants.
25787 * config/arm/t-multilib: Likewise.
25788 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
25789
25790 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25791
25792 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
25793 to generate rtl.
25794 (cceq_ior_compare_complement): Give it a name so I can use it, and
25795 change boolean_or_operator predicate to boolean_operator so it can
25796 be used to generate a crand.
25797 (eqne): New code iterator.
25798 (bd/bd_neg): New code_attrs.
25799 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
25800 a single define_insn.
25801 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
25802 decrement (bdnzt/bdnzf/bdzt/bdzf).
25803 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
25804 with the new names of the branch decrement patterns, and added the
25805 names of the branch decrement conditional patterns.
25806
25807 2018-01-08 Richard Biener <rguenther@suse.de>
25808
25809 PR tree-optimization/83563
25810 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
25811 cache.
25812
25813 2018-01-08 Richard Biener <rguenther@suse.de>
25814
25815 PR middle-end/83713
25816 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
25817
25818 2018-01-08 Richard Biener <rguenther@suse.de>
25819
25820 PR tree-optimization/83685
25821 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
25822 references to abnormals.
25823
25824 2018-01-08 Richard Biener <rguenther@suse.de>
25825
25826 PR lto/83719
25827 * dwarf2out.c (output_indirect_strings): Handle empty
25828 skeleton_debug_str_hash.
25829 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
25830
25831 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
25832
25833 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
25834 (emit_store_direct): Likewise.
25835 (arc_trampoline_adjust_address): Likewise.
25836 (arc_asm_trampoline_template): New function.
25837 (arc_initialize_trampoline): Use asm_trampoline_template.
25838 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
25839 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
25840 * config/arc/arc.md (flush_icache): Delete pattern.
25841
25842 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
25843
25844 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
25845 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
25846 munaligned-access.
25847
25848 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
25849
25850 PR target/83681
25851 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
25852 by not USED_FOR_TARGET.
25853 (make_pass_resolve_sw_modes): Likewise.
25854
25855 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
25856
25857 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
25858 USED_FOR_TARGET.
25859
25860 2018-01-08 Richard Biener <rguenther@suse.de>
25861
25862 PR middle-end/83580
25863 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
25864
25865 2018-01-08 Richard Biener <rguenther@suse.de>
25866
25867 PR middle-end/83517
25868 * match.pd ((t * 2) / 2) -> t): Add missing :c.
25869
25870 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
25871
25872 PR middle-end/81897
25873 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
25874 basic blocks with a small number of successors.
25875 (convert_control_dep_chain_into_preds): Improve handling of
25876 forwarder blocks.
25877 (dump_predicates): Split apart into...
25878 (dump_pred_chain): ...here...
25879 (dump_pred_info): ...and here.
25880 (can_one_predicate_be_invalidated_p): Add debugging printfs.
25881 (can_chain_union_be_invalidated_p): Improve check for invalidation
25882 of paths.
25883 (uninit_uses_cannot_happen): Avoid unnecessary if
25884 convert_control_dep_chain_into_preds yielded nothing.
25885
25886 2018-01-06 Martin Sebor <msebor@redhat.com>
25887
25888 PR tree-optimization/83640
25889 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
25890 subtracting negative offset from size.
25891 (builtin_access::overlap): Adjust offset bounds of the access to fall
25892 within the size of the object if possible.
25893
25894 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
25895
25896 PR rtl-optimization/83699
25897 * expmed.c (extract_bit_field_1): Restrict the vector usage of
25898 extract_bit_field_as_subreg to cases in which the extracted
25899 value is also a vector.
25900
25901 * lra-constraints.c (process_alt_operands): Test for the equivalence
25902 substitutions when detecting a possible reload cycle.
25903
25904 2018-01-06 Jakub Jelinek <jakub@redhat.com>
25905
25906 PR debug/83480
25907 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
25908 by default if flag_selective_schedling{,2}. Formatting fixes.
25909
25910 PR rtl-optimization/83682
25911 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
25912 if it has non-VECTOR_MODE element mode.
25913 (vec_duplicate_p): Likewise.
25914
25915 PR middle-end/83694
25916 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
25917 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
25918
25919 2018-01-05 Jakub Jelinek <jakub@redhat.com>
25920
25921 PR target/83604
25922 * config/i386/i386-builtin.def
25923 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
25924 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
25925 Require also OPTION_MASK_ISA_AVX512F in addition to
25926 OPTION_MASK_ISA_GFNI.
25927 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
25928 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
25929 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
25930 to OPTION_MASK_ISA_GFNI.
25931 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
25932 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
25933 OPTION_MASK_ISA_AVX512BW.
25934 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
25935 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
25936 addition to OPTION_MASK_ISA_GFNI.
25937 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
25938 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
25939 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
25940 to OPTION_MASK_ISA_GFNI.
25941 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
25942 a requirement for all ISAs rather than any of them with a few
25943 exceptions.
25944 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
25945 processing.
25946 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
25947 bitmasks to be enabled with 3 exceptions, instead of requiring any
25948 enabled ISA with lots of exceptions.
25949 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
25950 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
25951 Change avx512bw in isa attribute to avx512f.
25952 * config/i386/sgxintrin.h: Add license boilerplate.
25953 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
25954 to __AVX512F__ and __AVX512VL to __AVX512VL__.
25955 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
25956 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
25957 defined.
25958 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
25959 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
25960 temporarily sse2 rather than sse if not enabled already.
25961
25962 PR target/83604
25963 * config/i386/sse.md (VI248_VLBW): Rename to ...
25964 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
25965 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
25966 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
25967 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
25968 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
25969 mode iterator instead of VI248_VLBW.
25970
25971 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
25972
25973 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
25974 (record_modified): Skip clobbers; add debug output.
25975 (param_change_prob): Use sreal frequencies.
25976
25977 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
25978
25979 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
25980 punt for user-aligned variables.
25981
25982 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
25983
25984 * tree-chrec.c (chrec_contains_symbols): Return true for
25985 POLY_INT_CST.
25986
25987 2018-01-05 Sudakshina Das <sudi.das@arm.com>
25988
25989 PR target/82439
25990 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
25991 of (x|y) == x for BICS pattern.
25992
25993 2018-01-05 Jakub Jelinek <jakub@redhat.com>
25994
25995 PR tree-optimization/83605
25996 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
25997 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
25998 can throw.
25999
26000 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26001
26002 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26003 * config/epiphany/rtems.h: New file.
26004
26005 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26006 Uros Bizjak <ubizjak@gmail.com>
26007
26008 PR target/83554
26009 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26010 QIreg_operand instead of register_operand predicate.
26011 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26012 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26013 comments instead of -fmitigate[-_]rop.
26014
26015 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26016
26017 PR bootstrap/81926
26018 * cgraphunit.c (symbol_table::compile): Switch to text_section
26019 before calling assembly_start debug hook.
26020 * run-rtl-passes.c (run_rtl_passes): Likewise.
26021 Include output.h.
26022
26023 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26024
26025 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26026 range_int_cst_p rather than !symbolic_range_p before calling
26027 extract_range_from_multiplicative_op_1.
26028
26029 2018-01-04 Jeff Law <law@redhat.com>
26030
26031 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26032 redundant test in assertion.
26033
26034 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26035
26036 * doc/rtl.texi: Document machine_mode wrapper classes.
26037
26038 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26039
26040 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26041 using tree_to_uhwi.
26042
26043 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26044
26045 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26046 the VEC_PERM_EXPR fold to fail.
26047
26048 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26049
26050 PR debug/83585
26051 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26052 to switched_sections.
26053
26054 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26055
26056 PR target/83680
26057 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26058 test for d.testing.
26059
26060 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26061
26062 PR target/83387
26063 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26064 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26065
26066 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26067
26068 PR debug/83666
26069 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26070 is BLKmode and bitpos not zero or mode change is needed.
26071
26072 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26073
26074 PR target/83675
26075 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26076 TARGET_VIS2.
26077
26078 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26079
26080 PR target/83628
26081 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26082 instead of MULT rtx. Update all corresponding splitters.
26083 (*saddl_se): Ditto.
26084 (*ssub<modesuffix>): Ditto.
26085 (*ssubl_se): Ditto.
26086 (*cmp_sadd_di): Update split patterns.
26087 (*cmp_sadd_si): Ditto.
26088 (*cmp_sadd_sidi): Ditto.
26089 (*cmp_ssub_di): Ditto.
26090 (*cmp_ssub_si): Ditto.
26091 (*cmp_ssub_sidi): Ditto.
26092 * config/alpha/predicates.md (const23_operand): New predicate.
26093 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26094 Look for ASHIFT, not MULT inner operand.
26095 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26096
26097 2018-01-04 Martin Liska <mliska@suse.cz>
26098
26099 PR gcov-profile/83669
26100 * gcov.c (output_intermediate_file): Add version to intermediate
26101 gcov file.
26102 * doc/gcov.texi: Document new field 'version' in intermediate
26103 file format. Fix location of '-k' option of gcov command.
26104
26105 2018-01-04 Martin Liska <mliska@suse.cz>
26106
26107 PR ipa/82352
26108 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26109
26110 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26111
26112 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26113
26114 2018-01-03 Martin Sebor <msebor@redhat.com>
26115
26116 PR tree-optimization/83655
26117 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26118 checking calls with invalid arguments.
26119
26120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26121
26122 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26123 (vectorizable_mask_load_store): Delete.
26124 (vectorizable_call): Return false for masked loads and stores.
26125 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26126 instead of gimple_assign_rhs1.
26127 (vectorizable_load): Handle IFN_MASK_LOAD.
26128 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26129
26130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26131
26132 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26133 split out from..,
26134 (vectorizable_mask_load_store): ...here.
26135 (vectorizable_load): ...and here.
26136
26137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26138
26139 * tree-vect-stmts.c (vect_build_all_ones_mask)
26140 (vect_build_zero_merge_argument): New functions, split out from...
26141 (vectorizable_load): ...here.
26142
26143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26144
26145 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26146 split out from...
26147 (vectorizable_mask_load_store): ...here.
26148 (vectorizable_store): ...and here.
26149
26150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26151
26152 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26153 split out from...
26154 (vectorizable_mask_load_store): ...here.
26155
26156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26157
26158 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26159 (vect_model_store_cost): Take a vec_load_store_type instead of a
26160 vect_def_type.
26161 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26162 (vect_model_store_cost): Take a vec_load_store_type instead of a
26163 vect_def_type.
26164 (vectorizable_mask_load_store): Update accordingly.
26165 (vectorizable_store): Likewise.
26166 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26167
26168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26169
26170 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26171 IFN_MASK_LOAD calls here rather than...
26172 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26173
26174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26175 Alan Hayward <alan.hayward@arm.com>
26176 David Sherwood <david.sherwood@arm.com>
26177
26178 * expmed.c (extract_bit_field_1): For vector extracts,
26179 fall back to extract_bit_field_as_subreg if vec_extract
26180 isn't available.
26181
26182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26183 Alan Hayward <alan.hayward@arm.com>
26184 David Sherwood <david.sherwood@arm.com>
26185
26186 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26187 they are variable or constant sized.
26188 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26189 slots for constant-sized data.
26190
26191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26192 Alan Hayward <alan.hayward@arm.com>
26193 David Sherwood <david.sherwood@arm.com>
26194
26195 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26196 handling COND_EXPRs with boolean comparisons, try to find a better
26197 basis for the mask type than the boolean itself.
26198
26199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26200
26201 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26202 is calculated and how it can be overridden.
26203 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26204 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26205 if defined.
26206 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26207 if nonzero.
26208
26209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26210 Alan Hayward <alan.hayward@arm.com>
26211 David Sherwood <david.sherwood@arm.com>
26212
26213 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26214 Remove the mode argument.
26215 (aarch64_simd_valid_immediate): Remove the mode and inverse
26216 arguments.
26217 * config/aarch64/iterators.md (bitsize): New iterator.
26218 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26219 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26220 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26221 aarch64_simd_valid_immediate.
26222 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26223 (aarch64_reg_or_bic_imm): Likewise.
26224 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26225 with an insn_type enum and msl with a modifier_type enum.
26226 Replace element_width with a scalar_mode. Change the shift
26227 to unsigned int. Add constructors for scalar_float_mode and
26228 scalar_int_mode elements.
26229 (aarch64_vect_float_const_representable_p): Delete.
26230 (aarch64_can_const_movi_rtx_p)
26231 (aarch64_simd_scalar_immediate_valid_for_move)
26232 (aarch64_simd_make_constant): Update call to
26233 aarch64_simd_valid_immediate.
26234 (aarch64_advsimd_valid_immediate_hs): New function.
26235 (aarch64_advsimd_valid_immediate): Likewise.
26236 (aarch64_simd_valid_immediate): Remove mode and inverse
26237 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26238 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26239 and aarch64_float_const_representable_p on the result.
26240 (aarch64_output_simd_mov_immediate): Remove mode argument.
26241 Update call to aarch64_simd_valid_immediate and use of
26242 simd_immediate_info.
26243 (aarch64_output_scalar_simd_mov_immediate): Update call
26244 accordingly.
26245
26246 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26247 Alan Hayward <alan.hayward@arm.com>
26248 David Sherwood <david.sherwood@arm.com>
26249
26250 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26251 (mode_nunits): Likewise CONST_MODE_NUNITS.
26252 * machmode.def (ADJUST_NUNITS): Document.
26253 * genmodes.c (mode_data::need_nunits_adj): New field.
26254 (blank_mode): Update accordingly.
26255 (adj_nunits): New variable.
26256 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26257 parameter.
26258 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26259 listed in adj_nunits.
26260 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26261 listed in adj_nunits. Don't emit case statements for such modes.
26262 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26263 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26264 nothing if adj_nunits is nonnull.
26265 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26266 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26267 (emit_mode_fbit): Update use of print_maybe_const_decl.
26268 (emit_move_size): Likewise. Treat the array as non-const
26269 if adj_nunits.
26270 (emit_mode_adjustments): Handle adj_nunits.
26271
26272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26273
26274 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26275 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26276 (VECTOR_MODES): Use it.
26277 (make_vector_modes): Take the prefix as an argument.
26278
26279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26280 Alan Hayward <alan.hayward@arm.com>
26281 David Sherwood <david.sherwood@arm.com>
26282
26283 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26284 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26285 for MODE_VECTOR_BOOL.
26286 * machmode.def (VECTOR_BOOL_MODE): Document.
26287 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26288 (make_vector_bool_mode): New function.
26289 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26290 MODE_VECTOR_BOOL.
26291 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26292 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26293 Likewise.
26294 * stor-layout.c (int_mode_for_mode): Likewise.
26295 * tree.c (build_vector_type_for_mode): Likewise.
26296 * varasm.c (output_constant_pool_2): Likewise.
26297 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26298 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26299 for MODE_VECTOR_BOOL.
26300 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26301 of mode class checks.
26302 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26303 instead of a list of mode class checks.
26304 (expand_vector_scalar_condition): Likewise.
26305 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26306
26307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26308 Alan Hayward <alan.hayward@arm.com>
26309 David Sherwood <david.sherwood@arm.com>
26310
26311 * machmode.h (mode_size): Change from unsigned short to
26312 poly_uint16_pod.
26313 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26314 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26315 or if measurement_type is not polynomial.
26316 (fixed_size_mode::includes_p): Check for constant-sized modes.
26317 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26318 return a poly_uint16 rather than an unsigned short.
26319 (emit_mode_size): Change the type of mode_size from unsigned short
26320 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26321 (emit_mode_adjustments): Cope with polynomial vector sizes.
26322 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26323 for GET_MODE_SIZE.
26324 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26325 for GET_MODE_SIZE.
26326 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26327 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26328 * caller-save.c (setup_save_areas): Likewise.
26329 (replace_reg_with_saved_mem): Likewise.
26330 * calls.c (emit_library_call_value_1): Likewise.
26331 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26332 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26333 (gen_lowpart_for_combine): Likewise.
26334 * convert.c (convert_to_integer_1): Likewise.
26335 * cse.c (equiv_constant, cse_insn): Likewise.
26336 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26337 (cselib_subst_to_values): Likewise.
26338 * dce.c (word_dce_process_block): Likewise.
26339 * df-problems.c (df_word_lr_mark_ref): Likewise.
26340 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26341 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26342 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26343 (rtl_for_decl_location): Likewise.
26344 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26345 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26346 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26347 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26348 (expand_expr_real_1): Likewise.
26349 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26350 (pad_below): Likewise.
26351 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26352 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26353 * ira.c (get_subreg_tracking_sizes): Likewise.
26354 * ira-build.c (ira_create_allocno_objects): Likewise.
26355 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26356 (ira_sort_regnos_for_alter_reg): Likewise.
26357 * ira-costs.c (record_operand_costs): Likewise.
26358 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26359 (resolve_simple_move): Likewise.
26360 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26361 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26362 (lra_constraints): Likewise.
26363 (CONST_POOL_OK_P): Reject variable-sized modes.
26364 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26365 (add_pseudo_to_slot, lra_spill): Likewise.
26366 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26367 * optabs-query.c (get_best_extraction_insn): Likewise.
26368 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26369 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26370 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26371 * recog.c (offsettable_address_addr_space_p): Likewise.
26372 * regcprop.c (maybe_mode_change): Likewise.
26373 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26374 * regrename.c (build_def_use): Likewise.
26375 * regstat.c (dump_reg_info): Likewise.
26376 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26377 (find_reloads, find_reloads_subreg_address): Likewise.
26378 * reload1.c (eliminate_regs_1): Likewise.
26379 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26380 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26381 (simplify_binary_operation_1, simplify_subreg): Likewise.
26382 * targhooks.c (default_function_arg_padding): Likewise.
26383 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26384 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26385 (verify_gimple_assign_ternary): Likewise.
26386 * tree-inline.c (estimate_move_cost): Likewise.
26387 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26388 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26389 (get_address_cost_ainc): Likewise.
26390 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26391 (vect_supportable_dr_alignment): Likewise.
26392 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26393 (vectorizable_reduction): Likewise.
26394 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26395 (vectorizable_operation, vectorizable_load): Likewise.
26396 * tree.c (build_same_sized_truth_vector_type): Likewise.
26397 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26398 * var-tracking.c (emit_note_insn_var_location): Likewise.
26399 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26400 (ADDR_VEC_ALIGN): Likewise.
26401
26402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26403 Alan Hayward <alan.hayward@arm.com>
26404 David Sherwood <david.sherwood@arm.com>
26405
26406 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26407 unsigned short.
26408 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26409 or if measurement_type is polynomial.
26410 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26411 * combine.c (make_extraction): Likewise.
26412 * dse.c (find_shift_sequence): Likewise.
26413 * dwarf2out.c (mem_loc_descriptor): Likewise.
26414 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26415 (extract_bit_field, extract_low_bits): Likewise.
26416 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26417 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26418 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26419 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26420 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26421 * reload.c (find_reloads): Likewise.
26422 * reload1.c (alter_reg): Likewise.
26423 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26424 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26425 * tree-if-conv.c (predicate_mem_writes): Likewise.
26426 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26427 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26428 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26429 * valtrack.c (dead_debug_insert_temp): Likewise.
26430 * varasm.c (mergeable_constant_section): Likewise.
26431 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26432
26433 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26434 Alan Hayward <alan.hayward@arm.com>
26435 David Sherwood <david.sherwood@arm.com>
26436
26437 * expr.c (expand_assignment): Cope with polynomial mode sizes
26438 when assigning to a CONCAT.
26439
26440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26441 Alan Hayward <alan.hayward@arm.com>
26442 David Sherwood <david.sherwood@arm.com>
26443
26444 * machmode.h (mode_precision): Change from unsigned short to
26445 poly_uint16_pod.
26446 (mode_to_precision): Return a poly_uint16 rather than an unsigned
26447 short.
26448 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26449 or if measurement_type is not polynomial.
26450 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
26451 in which the mode is already known to be a scalar_int_mode.
26452 * genmodes.c (emit_mode_precision): Change the type of mode_precision
26453 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
26454 initializer.
26455 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26456 for GET_MODE_PRECISION.
26457 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26458 for GET_MODE_PRECISION.
26459 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26460 as polynomial.
26461 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26462 (expand_field_assignment, make_extraction): Likewise.
26463 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26464 (get_last_value): Likewise.
26465 * convert.c (convert_to_integer_1): Likewise.
26466 * cse.c (cse_insn): Likewise.
26467 * expr.c (expand_expr_real_1): Likewise.
26468 * lra-constraints.c (simplify_operand_subreg): Likewise.
26469 * optabs-query.c (can_atomic_load_p): Likewise.
26470 * optabs.c (expand_atomic_load): Likewise.
26471 (expand_atomic_store): Likewise.
26472 * ree.c (combine_reaching_defs): Likewise.
26473 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26474 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26475 * tree.h (type_has_mode_precision_p): Likewise.
26476 * ubsan.c (instrument_si_overflow): Likewise.
26477
26478 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26479 Alan Hayward <alan.hayward@arm.com>
26480 David Sherwood <david.sherwood@arm.com>
26481
26482 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26483 polynomial numbers of units.
26484 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26485 (valid_vector_subparts_p): New function.
26486 (build_vector_type): Remove temporary shim and take the number
26487 of units as a poly_uint64 rather than an int.
26488 (build_opaque_vector_type): Take the number of units as a
26489 poly_uint64 rather than an int.
26490 * tree.c (build_vector_from_ctor): Handle polynomial
26491 TYPE_VECTOR_SUBPARTS.
26492 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26493 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26494 (build_vector_from_val): If the number of units is variable,
26495 use build_vec_duplicate_cst for constant operands and
26496 VEC_DUPLICATE_EXPR otherwise.
26497 (make_vector_type): Remove temporary is_constant ().
26498 (build_vector_type, build_opaque_vector_type): Take the number of
26499 units as a poly_uint64 rather than an int.
26500 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26501 VECTOR_CST_NELTS.
26502 * cfgexpand.c (expand_debug_expr): Likewise.
26503 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26504 (store_constructor, expand_expr_real_1): Likewise.
26505 (const_scalar_mask_from_tree): Likewise.
26506 * fold-const-call.c (fold_const_reduction): Likewise.
26507 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26508 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26509 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26510 (fold_relational_const): Likewise.
26511 (native_interpret_vector): Likewise. Change the size from an
26512 int to an unsigned int.
26513 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26514 TYPE_VECTOR_SUBPARTS.
26515 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26516 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26517 duplicating a non-constant operand into a variable-length vector.
26518 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26519 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26520 * ipa-icf.c (sem_variable::equals): Likewise.
26521 * match.pd: Likewise.
26522 * omp-simd-clone.c (simd_clone_subparts): Likewise.
26523 * print-tree.c (print_node): Likewise.
26524 * stor-layout.c (layout_type): Likewise.
26525 * targhooks.c (default_builtin_vectorization_cost): Likewise.
26526 * tree-cfg.c (verify_gimple_comparison): Likewise.
26527 (verify_gimple_assign_binary): Likewise.
26528 (verify_gimple_assign_ternary): Likewise.
26529 (verify_gimple_assign_single): Likewise.
26530 * tree-pretty-print.c (dump_generic_node): Likewise.
26531 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26532 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26533 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26534 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26535 (vect_shift_permute_load_chain): Likewise.
26536 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26537 (expand_vector_condition, optimize_vector_constructor): Likewise.
26538 (lower_vec_perm, get_compute_type): Likewise.
26539 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26540 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26541 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26542 (vect_recog_mask_conversion_pattern): Likewise.
26543 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26544 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26545 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26546 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26547 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26548 (vectorizable_shift, vectorizable_operation, vectorizable_store)
26549 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26550 (supportable_widening_operation): Likewise.
26551 (supportable_narrowing_operation): Likewise.
26552 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26553 Likewise.
26554 * varasm.c (output_constant): Likewise.
26555
26556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26557 Alan Hayward <alan.hayward@arm.com>
26558 David Sherwood <david.sherwood@arm.com>
26559
26560 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26561 so that both the length == 3 and length != 3 cases set up their
26562 own permute vectors. Add comments explaining why we know the
26563 number of elements is constant.
26564 (vect_permute_load_chain): Likewise.
26565
26566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26567 Alan Hayward <alan.hayward@arm.com>
26568 David Sherwood <david.sherwood@arm.com>
26569
26570 * machmode.h (mode_nunits): Change from unsigned char to
26571 poly_uint16_pod.
26572 (ONLY_FIXED_SIZE_MODES): New macro.
26573 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26574 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26575 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26576 New typedefs.
26577 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26578 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26579 or if measurement_type is not polynomial.
26580 * genmodes.c (ZERO_COEFFS): New macro.
26581 (emit_mode_nunits_inline): Make mode_nunits_inline return a
26582 poly_uint16.
26583 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26584 Use ZERO_COEFFS when emitting initializers.
26585 * data-streamer.h (bp_pack_poly_value): New function.
26586 (bp_unpack_poly_value): Likewise.
26587 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26588 for GET_MODE_NUNITS.
26589 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26590 for GET_MODE_NUNITS.
26591 * tree.c (make_vector_type): Remove temporary shim and make
26592 the real function take the number of units as a poly_uint64
26593 rather than an int.
26594 (build_vector_type_for_mode): Handle polynomial nunits.
26595 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26596 * emit-rtl.c (const_vec_series_p_1): Likewise.
26597 (gen_rtx_CONST_VECTOR): Likewise.
26598 * fold-const.c (test_vec_duplicate_folding): Likewise.
26599 * genrecog.c (validate_pattern): Likewise.
26600 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26601 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26602 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26603 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26604 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26605 * rtlanal.c (subreg_get_info): Likewise.
26606 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26607 (vect_grouped_load_supported): Likewise.
26608 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26609 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26610 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26611 (simplify_const_unary_operation, simplify_binary_operation_1)
26612 (simplify_const_binary_operation, simplify_ternary_operation)
26613 (test_vector_ops_duplicate, test_vector_ops): Likewise.
26614 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26615 instead of CONST_VECTOR_NUNITS.
26616 * varasm.c (output_constant_pool_2): Likewise.
26617 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26618 explicit-encoded elements in the XVEC for variable-length vectors.
26619
26620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26621
26622 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26623
26624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26625 Alan Hayward <alan.hayward@arm.com>
26626 David Sherwood <david.sherwood@arm.com>
26627
26628 * coretypes.h (fixed_size_mode): Declare.
26629 (fixed_size_mode_pod): New typedef.
26630 * builtins.h (target_builtins::x_apply_args_mode)
26631 (target_builtins::x_apply_result_mode): Change type to
26632 fixed_size_mode_pod.
26633 * builtins.c (apply_args_size, apply_result_size, result_vector)
26634 (expand_builtin_apply_args_1, expand_builtin_apply)
26635 (expand_builtin_return): Update accordingly.
26636
26637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26638
26639 * cse.c (hash_rtx_cb): Hash only the encoded elements.
26640 * cselib.c (cselib_hash_rtx): Likewise.
26641 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26642 CONST_VECTOR encoding.
26643
26644 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26645 Jeff Law <law@redhat.com>
26646
26647 PR target/83641
26648 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26649 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26650 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26651 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26652
26653 PR target/83641
26654 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26655 explicitly probe *sp in a noreturn function if there were any callee
26656 register saves or frame pointer is needed.
26657
26658 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26659
26660 PR debug/83621
26661 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26662 BLKmode for ternary, binary or unary expressions.
26663
26664 PR debug/83645
26665 * var-tracking.c (delete_vta_debug_insn): New inline function.
26666 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26667 insns from get_insns () to NULL instead of each bb separately.
26668 Use delete_vta_debug_insn. No longer static.
26669 (vt_debug_insns_local, variable_tracking_main_1): Adjust
26670 delete_vta_debug_insns callers.
26671 * rtl.h (delete_vta_debug_insns): Declare.
26672 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26673 instead of variable_tracking_main.
26674
26675 2018-01-03 Martin Sebor <msebor@redhat.com>
26676
26677 PR tree-optimization/83603
26678 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26679 arguments past the endof the argument list in functions declared
26680 without a prototype.
26681 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26682 Avoid checking when arguments are null.
26683
26684 2018-01-03 Martin Sebor <msebor@redhat.com>
26685
26686 PR c/83559
26687 * doc/extend.texi (attribute const): Fix a typo.
26688 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26689 issuing -Wsuggest-attribute for void functions.
26690
26691 2018-01-03 Martin Sebor <msebor@redhat.com>
26692
26693 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26694 offset_int::from instead of wide_int::to_shwi.
26695 (maybe_diag_overlap): Remove assertion.
26696 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26697 * gimple-ssa-sprintf.c (format_directive): Same.
26698 (parse_directive): Same.
26699 (sprintf_dom_walker::compute_format_length): Same.
26700 (try_substitute_return_value): Same.
26701
26702 2018-01-03 Jeff Law <law@redhat.com>
26703
26704 PR middle-end/83654
26705 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26706 non-constant residual for zero at runtime and avoid probing in
26707 that case. Reorganize code for trailing problem to mirror handling
26708 of the residual.
26709
26710 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26711
26712 PR tree-optimization/83501
26713 * tree-ssa-strlen.c (get_string_cst): New.
26714 (handle_char_store): Call get_string_cst.
26715
26716 2018-01-03 Martin Liska <mliska@suse.cz>
26717
26718 PR tree-optimization/83593
26719 * tree-ssa-strlen.c: Include tree-cfg.h.
26720 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26721 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26722 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26723 to false.
26724 (strlen_dom_walker::before_dom_children): Call
26725 gimple_purge_dead_eh_edges. Dump tranformation with details
26726 dump flags.
26727 (strlen_dom_walker::before_dom_children): Update call by adding
26728 new argument cleanup_eh.
26729 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26730
26731 2018-01-03 Martin Liska <mliska@suse.cz>
26732
26733 PR ipa/83549
26734 * cif-code.def (VARIADIC_THUNK): New enum value.
26735 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26736 thunks.
26737
26738 2018-01-03 Jan Beulich <jbeulich@suse.com>
26739
26740 * sse.md (mov<mode>_internal): Tighten condition for when to use
26741 vmovdqu<ssescalarsize> for TI and OI modes.
26742
26743 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26744
26745 Update copyright years.
26746
26747 2018-01-03 Martin Liska <mliska@suse.cz>
26748
26749 PR ipa/83594
26750 * ipa-visibility.c (function_and_variable_visibility): Skip
26751 functions with noipa attribure.
26752
26753 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26754
26755 * gcc.c (process_command): Update copyright notice dates.
26756 * gcov-dump.c (print_version): Ditto.
26757 * gcov.c (print_version): Ditto.
26758 * gcov-tool.c (print_version): Ditto.
26759 * gengtype.c (create_file): Ditto.
26760 * doc/cpp.texi: Bump @copying's copyright year.
26761 * doc/cppinternals.texi: Ditto.
26762 * doc/gcc.texi: Ditto.
26763 * doc/gccint.texi: Ditto.
26764 * doc/gcov.texi: Ditto.
26765 * doc/install.texi: Ditto.
26766 * doc/invoke.texi: Ditto.
26767
26768 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26769
26770 * vector-builder.h (vector_builder::m_full_nelts): Change from
26771 unsigned int to poly_uint64.
26772 (vector_builder::full_nelts): Update prototype accordingly.
26773 (vector_builder::new_vector): Likewise.
26774 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26775 (vector_builder::operator ==): Likewise.
26776 (vector_builder::finalize): Likewise.
26777 * int-vector-builder.h (int_vector_builder::int_vector_builder):
26778 Take the number of elements as a poly_uint64 rather than an
26779 unsigned int.
26780 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26781 from unsigned int to poly_uint64.
26782 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
26783 (vec_perm_indices::new_vector): Likewise.
26784 (vec_perm_indices::length): Likewise.
26785 (vec_perm_indices::nelts_per_input): Likewise.
26786 (vec_perm_indices::input_nelts): Likewise.
26787 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
26788 number of elements per input as a poly_uint64 rather than an
26789 unsigned int. Use the original encoding for variable-length
26790 vectors, rather than clamping each individual element.
26791 For the second and subsequent elements in each pattern,
26792 clamp the step and base before clamping their sum.
26793 (vec_perm_indices::series_p): Handle polynomial element counts.
26794 (vec_perm_indices::all_in_range_p): Likewise.
26795 (vec_perm_indices_to_tree): Likewise.
26796 (vec_perm_indices_to_rtx): Likewise.
26797 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
26798 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
26799 (tree_vector_builder::new_binary_operation): Handle polynomial
26800 element counts. Return false if we need to know the number
26801 of elements at compile time.
26802 * fold-const.c (fold_vec_perm): Punt if the number of elements
26803 isn't known at compile time.
26804
26805 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26806
26807 * vec-perm-indices.h (vec_perm_builder): Change element type
26808 from HOST_WIDE_INT to poly_int64.
26809 (vec_perm_indices::element_type): Update accordingly.
26810 (vec_perm_indices::clamp): Handle polynomial element_types.
26811 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26812 (vec_perm_indices::all_in_range_p): Likewise.
26813 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
26814 than shwi trees.
26815 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
26816 polynomial vec_perm_indices element types.
26817 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
26818 * fold-const.c (fold_vec_perm): Likewise.
26819 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
26820 * tree-vect-generic.c (lower_vec_perm): Likewise.
26821 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26822 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
26823 element type to HOST_WIDE_INT.
26824
26825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26826 Alan Hayward <alan.hayward@arm.com>
26827 David Sherwood <david.sherwood@arm.com>
26828
26829 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
26830 rather than an int. Use plus_constant.
26831 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
26832 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
26833
26834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26835 Alan Hayward <alan.hayward@arm.com>
26836 David Sherwood <david.sherwood@arm.com>
26837
26838 * calls.c (emit_call_1, expand_call): Change struct_value_size from
26839 a HOST_WIDE_INT to a poly_int64.
26840
26841 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26842 Alan Hayward <alan.hayward@arm.com>
26843 David Sherwood <david.sherwood@arm.com>
26844
26845 * calls.c (load_register_parameters): Cope with polynomial
26846 mode sizes. Require a constant size for BLKmode parameters
26847 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
26848 forces a parameter to be padded at the lsb end in order to
26849 fill a complete number of words, require the parameter size
26850 to be ordered wrt UNITS_PER_WORD.
26851
26852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26853 Alan Hayward <alan.hayward@arm.com>
26854 David Sherwood <david.sherwood@arm.com>
26855
26856 * reload1.c (spill_stack_slot_width): Change element type
26857 from unsigned int to poly_uint64_pod.
26858 (alter_reg): Treat mode sizes as polynomial.
26859
26860 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26861 Alan Hayward <alan.hayward@arm.com>
26862 David Sherwood <david.sherwood@arm.com>
26863
26864 * reload.c (complex_word_subreg_p): New function.
26865 (reload_inner_reg_of_subreg, push_reload): Use it.
26866
26867 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26868 Alan Hayward <alan.hayward@arm.com>
26869 David Sherwood <david.sherwood@arm.com>
26870
26871 * lra-constraints.c (process_alt_operands): Reject matched
26872 operands whose sizes aren't ordered.
26873 (match_reload): Refer to this check here.
26874
26875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26876 Alan Hayward <alan.hayward@arm.com>
26877 David Sherwood <david.sherwood@arm.com>
26878
26879 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
26880 that the mode size is in the set {1, 2, 4, 8, 16}.
26881
26882 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26883 Alan Hayward <alan.hayward@arm.com>
26884 David Sherwood <david.sherwood@arm.com>
26885
26886 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
26887 Use plus_constant instead of gen_rtx_PLUS.
26888
26889 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26890 Alan Hayward <alan.hayward@arm.com>
26891 David Sherwood <david.sherwood@arm.com>
26892
26893 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
26894 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
26895 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
26896 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
26897 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
26898 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
26899 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
26900 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
26901 * config/i386/i386.c (ix86_push_rounding): ...this new function.
26902 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
26903 a poly_int64.
26904 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
26905 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
26906 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
26907 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
26908 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
26909 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
26910 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
26911 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
26912 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
26913 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
26914 function.
26915 * expr.c (emit_move_resolve_push): Treat the input and result
26916 of PUSH_ROUNDING as a poly_int64.
26917 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
26918 (emit_push_insn): Likewise.
26919 * lra-eliminations.c (mark_not_eliminable): Likewise.
26920 * recog.c (push_operand): Likewise.
26921 * reload1.c (elimination_effects): Likewise.
26922 * rtlanal.c (nonzero_bits1): Likewise.
26923 * calls.c (store_one_arg): Likewise. Require the padding to be
26924 known at compile time.
26925
26926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26927 Alan Hayward <alan.hayward@arm.com>
26928 David Sherwood <david.sherwood@arm.com>
26929
26930 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
26931 Use plus_constant instead of gen_rtx_PLUS.
26932
26933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26934 Alan Hayward <alan.hayward@arm.com>
26935 David Sherwood <david.sherwood@arm.com>
26936
26937 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
26938 rather than an int.
26939
26940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26941 Alan Hayward <alan.hayward@arm.com>
26942 David Sherwood <david.sherwood@arm.com>
26943
26944 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
26945 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
26946 via stack temporaries. Treat the mode size as polynomial too.
26947
26948 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26949 Alan Hayward <alan.hayward@arm.com>
26950 David Sherwood <david.sherwood@arm.com>
26951
26952 * expr.c (expand_expr_real_2): When handling conversions involving
26953 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
26954 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
26955 as a poly_uint64 too.
26956
26957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26958 Alan Hayward <alan.hayward@arm.com>
26959 David Sherwood <david.sherwood@arm.com>
26960
26961 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
26962
26963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26964 Alan Hayward <alan.hayward@arm.com>
26965 David Sherwood <david.sherwood@arm.com>
26966
26967 * combine.c (can_change_dest_mode): Handle polynomial
26968 REGMODE_NATURAL_SIZE.
26969 * expmed.c (store_bit_field_1): Likewise.
26970 * expr.c (store_constructor): Likewise.
26971 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
26972 and polynomial REGMODE_NATURAL_SIZE.
26973 (gen_lowpart_common): Likewise.
26974 * reginfo.c (record_subregs_of_mode): Likewise.
26975 * rtlanal.c (read_modify_subreg_p): Likewise.
26976
26977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26978 Alan Hayward <alan.hayward@arm.com>
26979 David Sherwood <david.sherwood@arm.com>
26980
26981 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
26982 numbers of elements.
26983
26984 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26985 Alan Hayward <alan.hayward@arm.com>
26986 David Sherwood <david.sherwood@arm.com>
26987
26988 * match.pd: Cope with polynomial numbers of vector elements.
26989
26990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26991 Alan Hayward <alan.hayward@arm.com>
26992 David Sherwood <david.sherwood@arm.com>
26993
26994 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
26995 in a POINTER_PLUS_EXPR.
26996
26997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26998 Alan Hayward <alan.hayward@arm.com>
26999 David Sherwood <david.sherwood@arm.com>
27000
27001 * omp-simd-clone.c (simd_clone_subparts): New function.
27002 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27003 (ipa_simd_modify_function_body): Likewise.
27004
27005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27006 Alan Hayward <alan.hayward@arm.com>
27007 David Sherwood <david.sherwood@arm.com>
27008
27009 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27010 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27011 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27012 (expand_vector_condition, vector_element): Likewise.
27013 (subparts_gt): New function.
27014 (get_compute_type): Use subparts_gt.
27015 (count_type_subparts): Delete.
27016 (expand_vector_operations_1): Use subparts_gt instead of
27017 count_type_subparts.
27018
27019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27020 Alan Hayward <alan.hayward@arm.com>
27021 David Sherwood <david.sherwood@arm.com>
27022
27023 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27024 (vect_compile_time_alias): ...this new function. Do the calculation
27025 on poly_ints rather than trees.
27026 (vect_prune_runtime_alias_test_list): Update call accordingly.
27027
27028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27029 Alan Hayward <alan.hayward@arm.com>
27030 David Sherwood <david.sherwood@arm.com>
27031
27032 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27033 numbers of units.
27034 (vect_schedule_slp_instance): Likewise.
27035
27036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27037 Alan Hayward <alan.hayward@arm.com>
27038 David Sherwood <david.sherwood@arm.com>
27039
27040 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27041 constant and extern definitions for variable-length vectors.
27042 (vect_get_constant_vectors): Note that the number of units
27043 is known to be constant.
27044
27045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27046 Alan Hayward <alan.hayward@arm.com>
27047 David Sherwood <david.sherwood@arm.com>
27048
27049 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27050 of units as polynomial. Choose between WIDE and NARROW based
27051 on multiple_p.
27052
27053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27054 Alan Hayward <alan.hayward@arm.com>
27055 David Sherwood <david.sherwood@arm.com>
27056
27057 * tree-vect-stmts.c (simd_clone_subparts): New function.
27058 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27059
27060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27061 Alan Hayward <alan.hayward@arm.com>
27062 David Sherwood <david.sherwood@arm.com>
27063
27064 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27065 vectors as polynomial. Use build_index_vector for
27066 IFN_GOMP_SIMD_LANE.
27067
27068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27069 Alan Hayward <alan.hayward@arm.com>
27070 David Sherwood <david.sherwood@arm.com>
27071
27072 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27073 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27074 for variable-length vectors.
27075 (vectorizable_mask_load_store): Treat the number of units as
27076 polynomial, asserting that it is constant if the condition has
27077 already been enforced.
27078 (vectorizable_store, vectorizable_load): Likewise.
27079
27080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27081 Alan Hayward <alan.hayward@arm.com>
27082 David Sherwood <david.sherwood@arm.com>
27083
27084 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27085 of units as polynomial. Punt if we can't tell at compile time
27086 which vector contains the final result.
27087
27088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27089 Alan Hayward <alan.hayward@arm.com>
27090 David Sherwood <david.sherwood@arm.com>
27091
27092 * tree-vect-loop.c (vectorizable_induction): Treat the number
27093 of units as polynomial. Punt on SLP inductions. Use an integer
27094 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27095 cast of such a series for variable-length floating-point
27096 reductions.
27097
27098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27099 Alan Hayward <alan.hayward@arm.com>
27100 David Sherwood <david.sherwood@arm.com>
27101
27102 * tree.h (build_index_vector): Declare.
27103 * tree.c (build_index_vector): New function.
27104 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27105 of units as polynomial, forcibly converting it to a constant if
27106 vectorizable_reduction has already enforced the condition.
27107 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27108 to create a {1,2,3,...} vector.
27109 (vectorizable_reduction): Treat the number of units as polynomial.
27110 Choose vectype_in based on the largest scalar element size rather
27111 than the smallest number of units. Enforce the restrictions
27112 relied on above.
27113
27114 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27115 Alan Hayward <alan.hayward@arm.com>
27116 David Sherwood <david.sherwood@arm.com>
27117
27118 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27119 number of units as polynomial.
27120
27121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27122 Alan Hayward <alan.hayward@arm.com>
27123 David Sherwood <david.sherwood@arm.com>
27124
27125 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27126 * target.def (autovectorize_vector_sizes): Return the vector sizes
27127 by pointer, using vector_sizes rather than a bitmask.
27128 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27129 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27130 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27131 Likewise.
27132 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27133 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27134 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27135 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27136 * omp-general.c (omp_max_vf): Likewise.
27137 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27138 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27139 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27140 * tree-vect-slp.c (vect_slp_bb): Likewise.
27141 * doc/tm.texi: Regenerate.
27142 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27143 to a poly_uint64.
27144 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27145 the vector size as a poly_uint64 rather than an unsigned int.
27146 (current_vector_size): Change from an unsigned int to a poly_uint64.
27147 (get_vectype_for_scalar_type): Update accordingly.
27148 * tree.h (build_truth_vector_type): Take the size and number of
27149 units as a poly_uint64 rather than an unsigned int.
27150 (build_vector_type): Add a temporary overload that takes
27151 the number of units as a poly_uint64 rather than an unsigned int.
27152 * tree.c (make_vector_type): Likewise.
27153 (build_truth_vector_type): Take the number of units as a poly_uint64
27154 rather than an unsigned int.
27155
27156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27157 Alan Hayward <alan.hayward@arm.com>
27158 David Sherwood <david.sherwood@arm.com>
27159
27160 * target.def (get_mask_mode): Take the number of units and length
27161 as poly_uint64s rather than unsigned ints.
27162 * targhooks.h (default_get_mask_mode): Update accordingly.
27163 * targhooks.c (default_get_mask_mode): Likewise.
27164 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27165 * doc/tm.texi: Regenerate.
27166
27167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27168 Alan Hayward <alan.hayward@arm.com>
27169 David Sherwood <david.sherwood@arm.com>
27170
27171 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27172 * omp-general.c (omp_max_vf): Likewise.
27173 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27174 (expand_omp_simd): Handle polynomial safelen.
27175 * omp-low.c (omplow_simd_context): Add a default constructor.
27176 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27177 (lower_rec_simd_input_clauses): Update accordingly.
27178 (lower_rec_input_clauses): Likewise.
27179
27180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27181 Alan Hayward <alan.hayward@arm.com>
27182 David Sherwood <david.sherwood@arm.com>
27183
27184 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27185 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27186 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27187 (vect_analyze_slp_cost): Likewise.
27188 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27189 (vect_model_load_cost): Likewise.
27190
27191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27192 Alan Hayward <alan.hayward@arm.com>
27193 David Sherwood <david.sherwood@arm.com>
27194
27195 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27196 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27197 from an unsigned int * to a poly_uint64_pod *.
27198 (calculate_unrolling_factor): New function.
27199 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27200
27201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27202 Alan Hayward <alan.hayward@arm.com>
27203 David Sherwood <david.sherwood@arm.com>
27204
27205 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27206 from an unsigned int to a poly_uint64.
27207 (_loop_vec_info::slp_unrolling_factor): Likewise.
27208 (_loop_vec_info::vectorization_factor): Change from an int
27209 to a poly_uint64.
27210 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27211 (vect_get_num_vectors): New function.
27212 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27213 (vect_get_num_copies): Use vect_get_num_vectors.
27214 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27215 to an unsigned int *.
27216 (vect_analyze_data_refs): Change min_vf from an int * to a
27217 poly_uint64 *.
27218 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27219 than an unsigned HOST_WIDE_INT.
27220 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27221 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27222 to an unsigned int *.
27223 (vect_analyze_data_ref_dependences): Likewise.
27224 (vect_compute_data_ref_alignment): Handle polynomial vf.
27225 (vect_enhance_data_refs_alignment): Likewise.
27226 (vect_prune_runtime_alias_test_list): Likewise.
27227 (vect_shift_permute_load_chain): Likewise.
27228 (vect_supportable_dr_alignment): Likewise.
27229 (dependence_distance_ge_vf): Take the vectorization factor as a
27230 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27231 (vect_analyze_data_refs): Change min_vf from an int * to a
27232 poly_uint64 *.
27233 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27234 vfm1 as a poly_uint64 rather than an int. Make the same change
27235 for the returned bound_scalar.
27236 (vect_gen_vector_loop_niters): Handle polynomial vf.
27237 (vect_do_peeling): Likewise. Update call to
27238 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27239 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27240 be constant.
27241 * tree-vect-loop.c (vect_determine_vectorization_factor)
27242 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27243 (vect_get_known_peeling_cost): Likewise.
27244 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27245 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27246 (vect_transform_loop): Likewise. Use the lowest possible VF when
27247 updating the upper bounds of the loop.
27248 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27249 rather than an int.
27250 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27251 polynomial unroll factors.
27252 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27253 (vect_make_slp_decision): Likewise.
27254 (vect_supported_load_permutation_p): Likewise, and polynomial
27255 vf too.
27256 (vect_analyze_slp_cost): Handle polynomial vf.
27257 (vect_slp_analyze_node_operations): Likewise.
27258 (vect_slp_analyze_bb_1): Likewise.
27259 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27260 than an unsigned HOST_WIDE_INT.
27261 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27262 (vectorizable_load): Handle polynomial vf.
27263 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27264 a poly_uint64.
27265 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27266
27267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27268 Alan Hayward <alan.hayward@arm.com>
27269 David Sherwood <david.sherwood@arm.com>
27270
27271 * match.pd: Handle bit operations involving three constants
27272 and try to fold one pair.
27273
27274 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27275
27276 * tree-vect-loop-manip.c: Include gimple-fold.h.
27277 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27278 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27279 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27280 Add a path that uses a step of VF instead of 1, but disable it
27281 for now.
27282 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27283 and niters_no_overflow parameters. Update calls to
27284 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27285 Create a new SSA name if the latter choses to use a ste other
27286 than zero, and return it via niters_vector_mult_vf_var.
27287 * tree-vect-loop.c (vect_transform_loop): Update calls to
27288 vect_do_peeling, vect_gen_vector_loop_niters and
27289 slpeel_make_loop_iterate_ntimes.
27290 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27291 (vect_gen_vector_loop_niters): Update declarations after above changes.
27292
27293 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27294
27295 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27296 128-bit round to integer instructions.
27297 (ceil<mode>2): Likewise.
27298 (btrunc<mode>2): Likewise.
27299 (round<mode>2): Likewise.
27300
27301 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27302
27303 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27304 unaligned VSX load/store on P8/P9.
27305 (expand_block_clear): Allow the use of unaligned VSX
27306 load/store on P8/P9.
27307
27308 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27309
27310 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27311 New function.
27312 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27313 swap associated with both a load and a store.
27314
27315 2018-01-02 Andrew Waterman <andrew@sifive.com>
27316
27317 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27318 * config/riscv/riscv.md (clear_cache): Use it.
27319
27320 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27321
27322 * web.c: Remove out-of-date comment.
27323
27324 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27325
27326 * expr.c (fixup_args_size_notes): Check that any existing
27327 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27328 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27329 (emit_single_push_insn): ...here.
27330
27331 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27332
27333 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27334 (const_vector_encoded_nelts): New function.
27335 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27336 (const_vector_int_elt, const_vector_elt): Declare.
27337 * emit-rtl.c (const_vector_int_elt_1): New function.
27338 (const_vector_elt): Likewise.
27339 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27340 of CONST_VECTOR_ELT.
27341
27342 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27343
27344 * expr.c: Include rtx-vector-builder.h.
27345 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27346 directly on the tree encoding.
27347 (const_vector_from_tree): Likewise.
27348 * optabs.c: Include rtx-vector-builder.h.
27349 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27350 sequence of "u" values.
27351 * vec-perm-indices.c: Include rtx-vector-builder.h.
27352 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27353 directly on the vec_perm_indices encoding.
27354
27355 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27356
27357 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27358 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27359 * rtx-vector-builder.h: New file.
27360 * rtx-vector-builder.c: Likewise.
27361 * rtl.h (rtx_def::u2): Add a const_vector field.
27362 (CONST_VECTOR_NPATTERNS): New macro.
27363 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27364 (CONST_VECTOR_DUPLICATE_P): Likewise.
27365 (CONST_VECTOR_STEPPED_P): Likewise.
27366 (CONST_VECTOR_ENCODED_ELT): Likewise.
27367 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27368 (unwrap_const_vec_duplicate): Likewise.
27369 (const_vec_series_p): Check for a non-duplicated vector encoding.
27370 Say that the function only returns true for integer vectors.
27371 * emit-rtl.c: Include rtx-vector-builder.h.
27372 (gen_const_vec_duplicate_1): Delete.
27373 (gen_const_vector): Call gen_const_vec_duplicate instead of
27374 gen_const_vec_duplicate_1.
27375 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27376 (gen_const_vec_duplicate): Use rtx_vector_builder.
27377 (gen_const_vec_series): Likewise.
27378 (gen_rtx_CONST_VECTOR): Likewise.
27379 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27380 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27381 Build a new vector rather than modifying a CONST_VECTOR in-place.
27382 (handle_special_swappables): Update call accordingly.
27383 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27384 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27385 Build a new vector rather than modifying a CONST_VECTOR in-place.
27386 (handle_special_swappables): Update call accordingly.
27387
27388 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27389
27390 * simplify-rtx.c (simplify_const_binary_operation): Use
27391 CONST_VECTOR_ELT instead of XVECEXP.
27392
27393 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27394
27395 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27396 the selector elements to be different from the data elements
27397 if the selector is a VECTOR_CST.
27398 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27399 ssizetype for the selector.
27400
27401 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27402
27403 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27404 before testing each element individually.
27405 * tree-vect-generic.c (lower_vec_perm): Likewise.
27406
27407 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27408
27409 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27410 * selftest-run-tests.c (selftest::run_tests): Call it.
27411 * vector-builder.h (vector_builder::operator ==): New function.
27412 (vector_builder::operator !=): Likewise.
27413 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27414 (vec_perm_indices::all_from_input_p): New function.
27415 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27416 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27417 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27418 instead of reading the VECTOR_CST directly. Detect whether both
27419 vector inputs are the same before constructing the vec_perm_indices,
27420 and update the number of inputs argument accordingly. Use the
27421 utility functions added above. Only construct sel2 if we need to.
27422
27423 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27424
27425 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27426 the broadcast of the low byte.
27427 (expand_mult_highpart): Use an explicit encoding for the permutes.
27428 * optabs-query.c (can_mult_highpart_p): Likewise.
27429 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27430 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27431 (vectorizable_bswap): Likewise.
27432 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27433 explicit encoding for the power-of-2 permutes.
27434 (vect_permute_store_chain): Likewise.
27435 (vect_grouped_load_supported): Likewise.
27436 (vect_permute_load_chain): Likewise.
27437
27438 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27439
27440 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27441 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27442 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27443 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27444 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27445 (vect_gen_perm_mask_any): Likewise.
27446
27447 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27448
27449 * int-vector-builder.h: New file.
27450 * vec-perm-indices.h: Include int-vector-builder.h.
27451 (vec_perm_indices): Redefine as an int_vector_builder.
27452 (auto_vec_perm_indices): Delete.
27453 (vec_perm_builder): Redefine as a stand-alone class.
27454 (vec_perm_indices::vec_perm_indices): New function.
27455 (vec_perm_indices::clamp): Likewise.
27456 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27457 (vec_perm_indices::new_vector): New function.
27458 (vec_perm_indices::new_expanded_vector): Update for new
27459 vec_perm_indices class.
27460 (vec_perm_indices::rotate_inputs): New function.
27461 (vec_perm_indices::all_in_range_p): Operate directly on the
27462 encoded form, without computing elided elements.
27463 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27464 encoding. Update for new vec_perm_indices class.
27465 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27466 the given vec_perm_builder.
27467 (expand_vec_perm_var): Update vec_perm_builder constructor.
27468 (expand_mult_highpart): Use vec_perm_builder instead of
27469 auto_vec_perm_indices.
27470 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27471 vec_perm_indices instead of auto_vec_perm_indices. Use a single
27472 or double series encoding as appropriate.
27473 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27474 vec_perm_indices instead of auto_vec_perm_indices.
27475 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27476 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27477 (vect_permute_store_chain): Likewise.
27478 (vect_grouped_load_supported): Likewise.
27479 (vect_permute_load_chain): Likewise.
27480 (vect_shift_permute_load_chain): Likewise.
27481 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27482 (vect_transform_slp_perm_load): Likewise.
27483 (vect_schedule_slp_instance): Likewise.
27484 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27485 (vectorizable_mask_load_store): Likewise.
27486 (vectorizable_bswap): Likewise.
27487 (vectorizable_store): Likewise.
27488 (vectorizable_load): Likewise.
27489 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27490 vec_perm_indices instead of auto_vec_perm_indices. Use
27491 tree_to_vec_perm_builder to read the vector from a tree.
27492 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27493 vec_perm_builder instead of a vec_perm_indices.
27494 (have_whole_vector_shift): Use vec_perm_builder and
27495 vec_perm_indices instead of auto_vec_perm_indices. Leave the
27496 truncation to calc_vec_perm_mask_for_shift.
27497 (vect_create_epilog_for_reduction): Likewise.
27498 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27499 from auto_vec_perm_indices to vec_perm_indices.
27500 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27501 instead of changing individual elements.
27502 (aarch64_vectorize_vec_perm_const): Use new_vector to install
27503 the vector in d.perm.
27504 * config/arm/arm.c (expand_vec_perm_d::perm): Change
27505 from auto_vec_perm_indices to vec_perm_indices.
27506 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27507 instead of changing individual elements.
27508 (arm_vectorize_vec_perm_const): Use new_vector to install
27509 the vector in d.perm.
27510 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27511 Update vec_perm_builder constructor.
27512 (rs6000_expand_interleave): Likewise.
27513 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27514 (rs6000_expand_interleave): Likewise.
27515
27516 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27517
27518 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27519 to qimode could truncate the indices.
27520 * optabs.c (expand_vec_perm_var): Likewise.
27521
27522 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27523
27524 * Makefile.in (OBJS): Add vec-perm-indices.o.
27525 * vec-perm-indices.h: New file.
27526 * vec-perm-indices.c: Likewise.
27527 * target.h (vec_perm_indices): Replace with a forward class
27528 declaration.
27529 (auto_vec_perm_indices): Move to vec-perm-indices.h.
27530 * optabs.h: Include vec-perm-indices.h.
27531 (expand_vec_perm): Delete.
27532 (selector_fits_mode_p, expand_vec_perm_var): Declare.
27533 (expand_vec_perm_const): Declare.
27534 * target.def (vec_perm_const_ok): Replace with...
27535 (vec_perm_const): ...this new hook.
27536 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27537 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27538 * doc/tm.texi: Regenerate.
27539 * optabs.def (vec_perm_const): Delete.
27540 * doc/md.texi (vec_perm_const): Likewise.
27541 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27542 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27543 expand_vec_perm for constant permutation vectors. Assert that
27544 the mode of variable permutation vectors is the integer equivalent
27545 of the mode that is being permuted.
27546 * optabs-query.h (selector_fits_mode_p): Declare.
27547 * optabs-query.c: Include vec-perm-indices.h.
27548 (selector_fits_mode_p): New function.
27549 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27550 is defined, instead of checking whether the vec_perm_const_optab
27551 exists. Use targetm.vectorize.vec_perm_const instead of
27552 targetm.vectorize.vec_perm_const_ok. Check whether the indices
27553 fit in the vector mode before using a variable permute.
27554 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27555 vec_perm_indices instead of an rtx.
27556 (expand_vec_perm): Replace with...
27557 (expand_vec_perm_const): ...this new function. Take the selector
27558 as a vec_perm_indices rather than an rtx. Also take the mode of
27559 the selector. Update call to shift_amt_for_vec_perm_mask.
27560 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27561 Use vec_perm_indices::new_expanded_vector to expand the original
27562 selector into bytes. Check whether the indices fit in the vector
27563 mode before using a variable permute.
27564 (expand_vec_perm_var): Make global.
27565 (expand_mult_highpart): Use expand_vec_perm_const.
27566 * fold-const.c: Includes vec-perm-indices.h.
27567 * tree-ssa-forwprop.c: Likewise.
27568 * tree-vect-data-refs.c: Likewise.
27569 * tree-vect-generic.c: Likewise.
27570 * tree-vect-loop.c: Likewise.
27571 * tree-vect-slp.c: Likewise.
27572 * tree-vect-stmts.c: Likewise.
27573 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27574 Delete.
27575 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27576 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27577 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27578 (aarch64_vectorize_vec_perm_const): ...this new function.
27579 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27580 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27581 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27582 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27583 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27584 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27585 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27586 into...
27587 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
27588 check for NEON modes.
27589 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27590 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27591 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27592 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27593 into...
27594 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
27595 the old VEC_PERM_CONST conditions.
27596 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27597 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27598 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27599 (ia64_vectorize_vec_perm_const_ok): Merge into...
27600 (ia64_vectorize_vec_perm_const): ...this new function.
27601 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27602 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27603 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27604 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27605 * config/mips/mips.c (mips_expand_vec_perm_const)
27606 (mips_vectorize_vec_perm_const_ok): Merge into...
27607 (mips_vectorize_vec_perm_const): ...this new function.
27608 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27609 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27610 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27611 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27612 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27613 (rs6000_expand_vec_perm_const): Delete.
27614 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27615 Delete.
27616 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27617 (altivec_expand_vec_perm_const_le): Take each operand individually.
27618 Operate on constant selectors rather than rtxes.
27619 (altivec_expand_vec_perm_const): Likewise. Update call to
27620 altivec_expand_vec_perm_const_le.
27621 (rs6000_expand_vec_perm_const): Delete.
27622 (rs6000_vectorize_vec_perm_const_ok): Delete.
27623 (rs6000_vectorize_vec_perm_const): New function.
27624 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27625 an element count and rtx array.
27626 (rs6000_expand_extract_even): Update call accordingly.
27627 (rs6000_expand_interleave): Likewise.
27628 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27629 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27630 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27631 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27632 (rs6000_expand_vec_perm_const): Delete.
27633 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27634 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27635 (altivec_expand_vec_perm_const_le): Take each operand individually.
27636 Operate on constant selectors rather than rtxes.
27637 (altivec_expand_vec_perm_const): Likewise. Update call to
27638 altivec_expand_vec_perm_const_le.
27639 (rs6000_expand_vec_perm_const): Delete.
27640 (rs6000_vectorize_vec_perm_const_ok): Delete.
27641 (rs6000_vectorize_vec_perm_const): New function. Remove stray
27642 reference to the SPE evmerge intructions.
27643 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27644 an element count and rtx array.
27645 (rs6000_expand_extract_even): Update call accordingly.
27646 (rs6000_expand_interleave): Likewise.
27647 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27648 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27649 new function.
27650 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27651
27652 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27653
27654 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27655 vector mode and that that mode matches the mode of the data
27656 being permuted.
27657 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27658 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
27659 directly using expand_vec_perm_1 when forcing selectors into
27660 registers.
27661 (expand_vec_perm_var): New function, split out from expand_vec_perm.
27662
27663 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27664
27665 * optabs-query.h (can_vec_perm_p): Delete.
27666 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27667 * optabs-query.c (can_vec_perm_p): Split into...
27668 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27669 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27670 particular selector is valid.
27671 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27672 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27673 (vect_grouped_load_supported): Likewise.
27674 (vect_shift_permute_load_chain): Likewise.
27675 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27676 (vect_transform_slp_perm_load): Likewise.
27677 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27678 (vectorizable_bswap): Likewise.
27679 (vect_gen_perm_mask_checked): Likewise.
27680 * fold-const.c (fold_ternary_loc): Likewise. Don't take
27681 implementations of variable permutation vectors into account
27682 when deciding which selector to use.
27683 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27684 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27685 with a false third argument.
27686 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27687 to test whether the constant selector is valid and can_vec_perm_var_p
27688 to test whether a variable selector is valid.
27689
27690 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27691
27692 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27693 * optabs-query.c (can_vec_perm_p): Likewise.
27694 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27695 instead of vec_perm_indices.
27696 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27697 (vect_gen_perm_mask_checked): Likewise,
27698 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27699 (vect_gen_perm_mask_checked): Likewise,
27700
27701 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27702
27703 * optabs-query.h (qimode_for_vec_perm): Declare.
27704 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27705 (qimode_for_vec_perm): ...this new function.
27706 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27707
27708 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27709
27710 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27711 does not have a conditional at the top.
27712
27713 2018-01-02 Richard Biener <rguenther@suse.de>
27714
27715 * ipa-inline.c (big_speedup_p): Fix expression.
27716
27717 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
27718
27719 PR target/81616
27720 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27721 for generic 4->6.
27722
27723 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
27724
27725 PR target/81616
27726 Generic tuning.
27727 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27728 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27729 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27730 cond_taken_branch_cost 3->4.
27731
27732 2018-01-01 Jakub Jelinek <jakub@redhat.com>
27733
27734 PR tree-optimization/83581
27735 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27736 TODO_cleanup_cfg if any changes have been made.
27737
27738 PR middle-end/83608
27739 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27740 convert_modes if target mode has the right side, but different mode
27741 class.
27742
27743 PR middle-end/83609
27744 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27745 last argument when extracting from CONCAT. If either from_real or
27746 from_imag is NULL, use expansion through memory. If result is not
27747 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27748 the parts directly to inner mode, if even that fails, use expansion
27749 through memory.
27750
27751 PR middle-end/83623
27752 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27753 check for bswap in mode rather than HImode and use that in expand_unop
27754 too.
27755 \f
27756 Copyright (C) 2018 Free Software Foundation, Inc.
27757
27758 Copying and distribution of this file, with or without modification,
27759 are permitted in any medium without royalty provided the copyright
27760 notice and this notice are preserved.