]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
3c9aea6c52f4b28dc12b6b053b5c14348d7853ed
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2
3 * config/aarch64/aarch64-cores.def: Add phecda core.
4 * config/aarch64/aarch64-tune.md: Regenerate.
5 * doc/invoke.texi: Add phecda core.
6
7 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8
9 PR target/85295
10 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
11 definitions.
12 * config/s390/s390.md ("movti"): Add more alternatives for
13 constant to GPR copies.
14
15 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
16
17 * config/s390/s390.c: Fix whitespace damage throughout the file.
18 * config/s390/s390.h: Likewise.
19 * config/s390/tpf.h: Likewise.
20
21 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
22
23 * config/s390/s390.c (s390_loadrelative_operand_p):
24 Remove TARGET_CPU_ZARCH usages.
25 (s390_rtx_costs): Likewise.
26 (s390_legitimate_constant_p): Likewise.
27 (s390_cannot_force_const_mem): Likewise.
28 (legitimate_reload_constant_p): Likewise.
29 (s390_preferred_reload_class): Likewise.
30 (legitimize_pic_address): Likewise.
31 (legitimize_tls_address): Likewise.
32 (s390_split_branches): Removed.
33 (s390_add_execute): Removed.
34 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
35 (s390_mainpool_start): Likewise.
36 (s390_mainpool_finish): Likewise.
37 (s390_mainpool_cancel): Removed.
38 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
39 (s390_chunkify_cancel): Likewise.
40 (s390_return_addr_rtx): Likewise.
41 (s390_register_info): Remove split_branches_pending_p uages.
42 (s390_optimize_register_info): Likewise.
43 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
44 split_branches_pending_p usages.
45 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
46 (s390_load_got): Likewise.
47 (s390_expand_split_stack_prologue): Likewise.
48 (output_asm_nops): Likewise.
49 (s390_function_profiler): Likewise.
50 (s390_emit_call): Likewise.
51 (s390_conditional_register_usage): Likewise.
52 (s390_optimize_prologue): Likewise.
53 (s390_reorg): Remove TARGET_CPU_ZARCH and
54 split_branches_pending_p usages.
55 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
56 usages.
57 (s390_output_indirect_thunk_function): Likewise.
58 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
59 (TARGET_CPU_ZARCH_P): Removed.
60 (struct machine_function): Remove split_branches_pending_p.
61 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
62
63 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
64
65 * common/config/s390/s390-common.c (processor_flags_table):
66 Remove flags.
67 * config.gcc: Remove with_arch/with_tune support.
68 * config/s390/2064.md: Remove cpu attribute comparisons.
69 * config/s390/driver-native.c (s390_host_detect_local_cpu):
70 Remove MTN.
71 * config/s390/linux.h (ASM_SPEC):
72 Remove -march support.
73 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
74 Use a table to get an arch level.
75 * config/s390/s390-opts.h (enum processor_type):
76 Remove enum values.
77 * config/s390/s390.c
78 (processor_table): Remove entries, add arch_level values.
79 (s390_issue_rate): Remove cases.
80 (s390_option_override): Adjust
81 s390_option_override_internal() call.
82 (s390_option_override_internal): Remove deprecation warning.
83 (s390_valid_target_attribute_tree): Adjust
84 s390_option_override_internal() call.
85 * config/s390/s390.h (struct s390_processor):
86 Share with s390-c.c, add arch_level field.
87 * config/s390/s390.md:
88 Remove occurrences in cpu attribute.
89 * config/s390/s390.opt: Remove -march/-mtune support.
90 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
91 * doc/invoke.texi: Remove deprecation warning.
92
93 2018-08-08 Luis Machado <luis.machado@linaro.org>
94
95 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
96 global.
97 (qdf24xx_tunings): Set vector cost structure to
98 qdf24xx_vector_cost.
99
100 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
101 <register_sextend>: Set to 3.
102
103 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
104
105 PR target/86838
106 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
107 * config/aarch64/aarch64-simd.md
108 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
109 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
110 (aarch64_frecpx<mode>): ...this new pattern.
111 * config/aarch64/aarch64-simd-builtins.def: Remove comment
112 about aarch64_frecp<FRECP:frecp_suffix><mode>.
113
114 2018-08-07 Martin Liska <mliska@suse.cz>
115
116 PR middle-end/83023
117 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
118 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
119 * predict.def (PRED_MALLOC_NONNULL): New predictor.
120 * doc/extend.texi: Document that malloc attribute adds
121 hit to compiler.
122
123 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
124
125 PR target/86785
126 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
127 Define to speculation_safe_value_not_needed.
128
129 2018-08-06 Jeff Law <law@redhat.com>
130
131 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
132 the vr_values instance to cprop_into_stmt.
133 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
134 (cprop_operand): Also query EVRP to determine if OP is a constant.
135
136 2018-08-06 Nathan Sidwell <nathan@acm.org>
137
138 * diagnostic.c (diagnostic_report_current_module): Reroll
139 included-at loop. Translate text.
140
141 2018-08-06 David Malcolm <dmalcolm@redhat.com>
142
143 * function-tests.c (selftest::test_expansion_to_rtl): Call
144 free_after_compilation.
145
146 2018-08-06 Alan Hayward <alan.hayward@arm.com>
147
148 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
149
150 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
151
152 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
153 loops with memory block operations from getting unrolled.
154
155 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
156
157 PR target/86807
158 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
159 Define to speculation_safe_value_not_needed.
160
161 2018-08-06 Jeff Law <law@redhat.com>
162
163 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
164 assert.
165
166 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
167
168 PR target/86662
169 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
170 with all enabled __intN types.
171
172 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
173
174 2018-08-06 Alan Hayward <alan.hayward@arm.com>
175
176 * alias.c (record_set): Check for clobber high.
177 * cfgexpand.c (expand_gimple_stmt): Likewise.
178 * combine-stack-adj.c (single_set_for_csa): Likewise.
179 * combine.c (find_single_use_1): Likewise.
180 (set_nonzero_bits_and_sign_copies): Likewise.
181 (get_combine_src_dest): Likewise.
182 (is_parallel_of_n_reg_sets): Likewise.
183 (try_combine): Likewise.
184 (record_dead_and_set_regs_1): Likewise.
185 (reg_dead_at_p_1): Likewise.
186 (reg_dead_at_p): Likewise.
187 * dce.c (deletable_insn_p): Likewise.
188 (mark_nonreg_stores_1): Likewise.
189 (mark_nonreg_stores_2): Likewise.
190 * df-scan.c (df_find_hard_reg_defs): Likewise.
191 (df_uses_record): Likewise.
192 (df_get_call_refs): Likewise.
193 * dwarf2out.c (mem_loc_descriptor): Likewise.
194 * haifa-sched.c (haifa_classify_rtx): Likewise.
195 * ira-build.c (create_insn_allocnos): Likewise.
196 * ira-costs.c (scan_one_insn): Likewise.
197 * ira.c (equiv_init_movable_p): Likewise.
198 (rtx_moveable_p): Likewise.
199 (interesting_dest_for_shprep): Likewise.
200 * jump.c (mark_jump_label_1): Likewise.
201 * postreload-gcse.c (record_opr_changes): Likewise.
202 * postreload.c (reload_cse_simplify): Likewise.
203 (struct reg_use): Add source expr.
204 (reload_combine): Check for clobber high.
205 (reload_combine_note_use): Likewise.
206 (reload_cse_move2add): Likewise.
207 (move2add_note_store): Likewise.
208 * print-rtl.c (print_pattern): Likewise.
209 * recog.c (decode_asm_operands): Likewise.
210 (store_data_bypass_p): Likewise.
211 (if_test_bypass_p): Likewise.
212 * regcprop.c (kill_clobbered_value): Likewise.
213 (kill_set_value): Likewise.
214 * reginfo.c (reg_scan_mark_refs): Likewise.
215 * reload1.c (maybe_fix_stack_asms): Likewise.
216 (eliminate_regs_1): Likewise.
217 (elimination_effects): Likewise.
218 (mark_not_eliminable): Likewise.
219 (scan_paradoxical_subregs): Likewise.
220 (forget_old_reloads_1): Likewise.
221 * reorg.c (find_end_label): Likewise.
222 (try_merge_delay_insns): Likewise.
223 (redundant_insn): Likewise.
224 (own_thread_p): Likewise.
225 (fill_simple_delay_slots): Likewise.
226 (fill_slots_from_thread): Likewise.
227 (dbr_schedule): Likewise.
228 * resource.c (update_live_status): Likewise.
229 (mark_referenced_resources): Likewise.
230 (mark_set_resources): Likewise.
231 * rtl.c (copy_rtx): Likewise.
232 * rtlanal.c (reg_referenced_p): Likewise.
233 (single_set_2): Likewise.
234 (noop_move_p): Likewise.
235 (note_stores): Likewise.
236 * sched-deps.c (sched_analyze_reg): Likewise.
237 (sched_analyze_insn): Likewise.
238
239 2018-08-06 Alan Hayward <alan.hayward@arm.com>
240
241 * cse.c (invalidate_reg): New function extracted from...
242 (invalidate): ...here.
243 (canonicalize_insn): Check for clobber high.
244 (invalidate_from_clobbers): invalidate clobber highs.
245 (invalidate_from_sets_and_clobbers): Likewise.
246 (count_reg_usage): Check for clobber high.
247 (insn_live_p): Likewise.
248 * cselib.c (cselib_expand_value_rtx_1):Likewise.
249 (cselib_invalidate_regno): Check for clobber in setter.
250 (cselib_invalidate_rtx): Pass through setter.
251 (cselib_invalidate_rtx_note_stores):
252 (cselib_process_insn): Check for clobber high.
253 * cselib.h (cselib_invalidate_rtx): Add operand.
254
255 2018-08-06 Alan Hayward <alan.hayward@arm.com>
256
257 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
258 (mark_not_eliminable): Likewise.
259 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
260 * lra-lives.c (process_bb_lives): Check for clobber high.
261 * lra.c (new_insn_reg): Remember clobber highs.
262 (collect_non_operand_hard_regs): Check for clobber high.
263 (lra_set_insn_recog_data): Likewise.
264 (add_regs_to_insn_regno_info): Likewise.
265 (lra_update_insn_regno_info): Likewise.
266
267 2018-08-06 Alan Hayward <alan.hayward@arm.com>
268
269 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
270 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
271
272 2018-08-06 Alan Hayward <alan.hayward@arm.com>
273
274 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
275 (copy_insn_1): Likewise.
276 (gen_hard_reg_clobber_high): New gen function.
277 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
278 * genemit.c (gen_exp): Likewise.
279 (gen_emit_seq): Pass through info.
280 (gen_insn): Check for CLOBBER_HIGH.
281 (gen_expand): Pass through info.
282 (gen_split): Likewise.
283 (output_add_clobbers): Likewise.
284 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
285 (remove_clobbers): Likewise.
286 * rtl.h (gen_hard_reg_clobber_high): New declaration.
287
288 2018-08-06 Alan Hayward <alan.hayward@arm.com>
289
290 * doc/rtl.texi (clobber_high): Add.
291 (parallel): Add in clobber high
292 * rtl.c (rtl_check_failed_code3): Add function.
293 * rtl.def (CLOBBER_HIGH): Add expression.
294 * rtl.h (RTL_CHECKC3): Add macro.
295 (rtl_check_failed_code3): Add declaration.
296 (XC3EXP): Add macro.
297
298 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
299
300 PR target/86386
301 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
302 cfun->machine->max_used_stack_alignment if needed.
303
304 2018-08-04 Martin Sebor <msebor@redhat.com>
305
306 PR tree-optimization/86571
307 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
308 NaN output to 4.
309
310 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
311
312 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
313 Define.
314
315 2018-08-03 Jeff Law <law@redhat.com>
316
317 PR target/86795
318 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
319 Define to speculation_safe_value_not_needed.
320
321 2018-08-03 David Malcolm <dmalcolm@redhat.com>
322
323 * doc/gcov.texi (-x): Remove duplicate "to".
324 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
325 (-Wif-not-aligned): Remove duplicate "is".
326 (-flto): Remove duplicate "the".
327 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
328 duplicate "v5.00.b".
329 (MSP430 Options): Remove duplicate "and" from the description
330 of "-mgprel-sec=regexp".
331 (x86 Options): Remove duplicate copies of "vmldLog102" and
332 vmlsLog104 from description of "-mveclibabi=type".
333
334 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
335
336 * internal-fn.h (first_commutative_argument): Declare.
337 * internal-fn.c (first_commutative_argument): New function.
338 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
339 restrictions for pattern statements. Use first_commutative_argument
340 to look for commutative operands in calls to internal functions.
341
342 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
343
344 * Makefile.in (wide-int-range.o): New.
345 * tree-vrp.c: Move all the wide_int_* functions to...
346 * wide-int-range.cc: ...here.
347 * tree-vrp.h: Move all the wide_int_* prototypes to...
348 * wide-int-range.h: ...here.
349
350 2018-08-03 Tom de Vries <tdevries@suse.de>
351
352 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
353 UI_NONE.
354 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
355 * except.c (output_function_exception_table): Do early exit if
356 targetm_common.except_unwind_info (&global_options) == UI_NONE.
357
358 2018-08-03 Martin Liska <mliska@suse.cz>
359
360 * predict.c (dump_prediction): Change to 2 digits
361 in fraction part.
362
363 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
364
365 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
366 neon_dup_q to...
367 (falkor_am_1_gtov_gtov): ... a new insn reservation.
368
369 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
370
371 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
372 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
373 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
374 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
375 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
376
377 2018-08-02 David Malcolm <dmalcolm@redhat.com>
378
379 * diagnostic-show-locus.c (diagnostic_show_locus): Use
380 pp_take_prefix when saving the existing prefix.
381 * diagnostic.c (diagnostic_append_note): Likewise.
382 * langhooks.c (lhd_print_error_function): Likewise.
383 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
384 param's type. Free the existing prefix.
385 (pp_take_prefix): New function.
386 (pretty_printer::pretty_printer): Drop the prefix parameter.
387 Rename the length parameter to match the comment.
388 (pretty_printer::~pretty_printer): Free the prefix.
389 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
390 parameter.
391 (struct pretty_printer): Drop the "const" from "prefix" field's
392 type and clarify memory management.
393 (pp_set_prefix): Drop the "const" from the 2nd param.
394 (pp_take_prefix): New decl.
395
396 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
397
398 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
399 for word_mode_ok here instead of passing as argument.
400 (expand_block_compare): Change select_block_compare_mode() call.
401 (expand_strncmp_gpr_sequence): New function.
402 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
403
404 2018-08-02 Jeff Law <law@redhat.com>
405
406 PR target/86790
407 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
408 Define to speculation_safe_value_not_needed.
409
410 PR target/86784
411 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
412 Define to speculation_safe_value_not_needed.
413
414 2018-08-02 Tom de Vries <tdevries@suse.de>
415
416 PR target/86660
417 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
418 function. Return UI_TARGET unconditionally.
419 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
420 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
421
422 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
423
424 * genemit.c (print_overload_test): Fix typo.
425
426 2018-08-02 Richard Biener <rguenther@suse.de>
427
428 PR tree-optimization/86816
429 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
430 which checks for value availability before querying it.
431 (gvn_uses_equal): Use it.
432 (same_succ_hash): Likewise.
433 (gimple_equal_p): Likewise.
434
435 2018-08-02 Nick Clifton <nickc@redhat.com>
436
437 PR target/86813
438 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
439 Define to speculation_safe_value_not_needed.
440
441 PR target/86810
442 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
443 Define to speculation_safe_value_not_needed.
444
445 PR target/86810
446 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
447 Define to speculation_safe_value_not_needed.
448
449 PR target/86803
450 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
451 Define to speculation_safe_value_not_needed.
452
453 PR target/86797
454 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
455 Define to speculation_safe_value_not_needed.
456
457 PR target/86791
458 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
459 Define to speculation_safe_value_not_needed.
460
461 PR target/86789
462 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
463 Define to speculation_safe_value_not_needed.
464
465 PR target/86787
466 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
467 Define to speculation_safe_value_not_needed.
468
469 PR target/86782
470 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
471 speculation_safe_value_not_needed.
472
473 PR target/86781
474 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
475 to speculation_safe_value_not_needed.
476
477 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
478
479 * doc/md.texi: Expand the documentation of instruction names
480 to mention port-local uses. Document '@' in pattern names.
481 * read-md.h (overloaded_instance, overloaded_name): New structs.
482 (mapping): Declare.
483 (md_reader::handle_overloaded_name): New member function.
484 (md_reader::get_overloads): Likewise.
485 (md_reader::m_first_overload): New member variable.
486 (md_reader::m_next_overload_ptr): Likewise.
487 (md_reader::m_overloads_htab): Likewise.
488 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
489 m_next_overload_ptr and m_overloads_htab.
490 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
491 (get_mode_token, get_code_token, get_int_token): New functions.
492 (map_attr_string): Add an optional argument that passes back
493 the associated iterator.
494 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
495 (md_reader::handle_overloaded_name, add_overload_instance): New
496 functions.
497 (apply_iterators): Handle '@' names. Report an error if '@'
498 is used without iterators.
499 (initialize_iterators): Initialize the new iterator_group fields.
500 * genopinit.c (handle_overloaded_code_for)
501 (handle_overloaded_gen): New functions.
502 (main): Use them to print declarations of maybe_code_for_* and
503 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
504 * genemit.c (print_overload_arguments, print_overload_test)
505 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
506 (main): Use it to print definitions of maybe_code_for_* and
507 maybe_gen_* functions.
508 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
509 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
510 instead of explicit mode checks.
511 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
512 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
513 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
514 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
515 (aarch64_expand_compare_and_swap): Likewise
516 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
517 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
518 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
519 (aarch64_constant_pool_reload_icode): Delete.
520 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
521 instead of aarch64_constant_pool_reload_icode. Use
522 code_for_aarch64_reload_mov instead of explicit mode checks.
523 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
524 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
525 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
526 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
527 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
528 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
529 (aarch64_atomic_load_op_code): Delete.
530 (aarch64_emit_atomic_load_op): Likewise.
531 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
532 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
533 instead of aarch64_emit_atomic_load_op.
534 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
535 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
536 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
537 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
538 character before the pattern name.
539 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
540 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
541 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
542 (aarch64_frecps<mode>): Likewise.
543 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
544 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
545 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
546 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
547 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
548
549 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
550
551 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
552 Allow HFmode constants if TARGET_FP_F16INST.
553
554 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
555
556 PR target/86014
557 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
558 No longer check last store for clobber of address register.
559
560 2018-08-02 Martin Liska <mliska@suse.cz>
561
562 PR gcov-profile/86817
563 * gcov.c (process_all_functions): New function.
564 (main): Call it.
565 (process_file): Move functions processing to
566 process_all_functions.
567
568 2018-08-02 David Malcolm <dmalcolm@redhat.com>
569
570 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
571 "const" to the "gimple *" and "rtx_insn *" parameters.
572 * dumpfile.h (dump_user_location_t::dump_user_location_t):
573 Likewise.
574 (dump_location_t::dump_location_t): Likewise.
575
576 2018-08-01 Martin Sebor <msebor@redhat.com>
577
578 PR tree-optimization/86650
579 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
580 rather than a "gcall *". Directly pass the data of interest
581 to percent_K_format, rather than building a temporary CALL_EXPR
582 to hold it.
583 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
584 (gimple_fold_builtin_strncat): Adjust.
585 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
586 gcall* argument with gimple*.
587 * gimple-ssa-warn-restrict.c (check_call): Same.
588 (wrestrict_dom_walker::before_dom_children): Same.
589 (builtin_access::builtin_access): Same.
590 (check_bounds_or_overlap): Same
591 (maybe_diag_overlap): Same.
592 (maybe_diag_offset_bounds): Same.
593 * tree-diagnostic.c (default_tree_printer): Move usage of
594 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
595 to this callsite.
596 * tree-pretty-print.c (percent_K_format): Add argument.
597 * tree-pretty-print.h: Add argument.
598 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
599 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
600 (maybe_diag_stxncpy_trunc): Same.
601 (handle_builtin_stxncpy): Same.
602 (handle_builtin_strcat): Same.
603
604 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
605
606 * match.pd: Optimise pointer range checks.
607
608 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
609
610 PR tree-optimization/86758
611 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
612 to remove pattern statements.
613
614 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
615
616 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
617 result of dfs_enumerate_from when constructing stmt_vec_infos,
618 instead of additionally calling get_loop_body.
619
620 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
621
622 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
623 parameter.
624 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
625 When creating an iv, assert that the step is not known to be zero.
626 (vect_setup_realignment): Update call accordingly.
627 * tree-vect-stmts.c (vectorizable_store): Likewise.
628 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
629
630 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
631
632 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
633 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
634 (vectorizable_reduction): Likewise.
635 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
636 (vect_detect_hybrid_slp_stmts): Likewise.
637 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
638
639 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
640
641 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
642 (wide_int_set_zero_nonzero_bits): ...this.
643 (zero_nonzero_bits_from_vr): Rename to...
644 (vrp_set_zero_nonzero_bits): ...this.
645 (extract_range_from_multiplicative_op_1): Abstract wide int
646 code...
647 (wide_int_range_multiplicative_op): ...here.
648 (extract_range_from_binary_expr_1): Extract wide int binary
649 operations into their own functions.
650 (wide_int_range_lshift): New.
651 (wide_int_range_can_optimize_bit_op): New.
652 (wide_int_range_shift_undefined_p): New.
653 (wide_int_range_bit_xor): New.
654 (wide_int_range_bit_ior): New.
655 (wide_int_range_bit_and): New.
656 (wide_int_range_trunc_mod): New.
657 (extract_range_into_wide_ints): New.
658 (vrp_shift_undefined_p): New.
659 (extract_range_from_multiplicative_op): New.
660 (vrp_can_optimize_bit_op): New.
661 * tree-vrp.h (value_range::dump): New.
662 (wide_int_range_multiplicative_op): New.
663 (wide_int_range_lshift):New.
664 (wide_int_range_shift_undefined_p): New.
665 (wide_int_range_bit_xor): New.
666 (wide_int_range_bit_ior): New.
667 (wide_int_range_bit_and): New.
668 (wide_int_range_trunc_mod): New.
669 (zero_nonzero_bits_from_bounds): Rename to...
670 (wide_int_set_zero_nonzero_bits): ...this.
671 (zero_nonzero_bits_from_vr): Rename to...
672 (vrp_set_zero_nonzero_bits): ...this.
673 (range_easy_mask_min_max): Rename to...
674 (wide_int_range_can_optimize_bit_op): this.
675 * vr-values.c (simplify_bit_ops_using_ranges): Rename
676 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
677
678 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
679
680 * tree-vectorizer.h (vect_orig_stmt): New function.
681 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
682 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
683 (vect_create_epilog_for_reduction): Likewise.
684 (vectorizable_live_operation): Likewise.
685 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
686 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
687 * tree-vect-stmts.c (vectorizable_call): Likewise.
688 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
689
690 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
691
692 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
693 argument.
694 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
695 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
696 (vect_transform_loop): Likewise.
697 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
698
699 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
700
701 * tree-vectorizer.h (vect_schedule_slp): Return void.
702 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
703 (vect_schedule_slp): Likewise.
704
705 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
706
707 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
708 argument.
709 (vect_transform_loop): Update calls accordingly. Schedule SLP
710 instances before the main loop, if any exist.
711
712 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
713
714 PR tree-optimization/86749
715 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
716 If the lhs is used in a COND_EXPR, check that it is being used
717 as the "then" or "else" value.
718
719 2018-08-01 Tom de Vries <tdevries@suse.de>
720
721 PR target/86800
722 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
723 speculation_safe_value_not_needed.
724
725 2018-08-01 Richard Biener <rguenther@suse.de>
726
727 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
728 as base and offset.
729
730 2018-08-01 Martin Liska <mliska@suse.cz>
731
732 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
733 format how successful transformation is dumped.
734 (gimple_mod_pow2_value_transform): Likewise.
735 (gimple_mod_subtract_transform): Likewise.
736 (gimple_stringops_transform): Likewise.
737
738 2018-08-01 Martin Liska <mliska@suse.cz>
739
740 PR value-prof/35543
741 * value-prof.c (interesting_stringop_to_profile_p):
742 Simplify the code and add BUILT_IN_MEMMOVE.
743 (gimple_stringops_transform): Likewise.
744
745 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
746
747 * config/aarch64/aarch64-simd.md
748 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
749 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
750 use GPI iterator instead of SI mode.
751
752 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
753
754 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
755 rs6000_speculation_barrier.
756 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
757 new barrier pattern name.
758
759 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
760
761 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
762 (speculation_barrier): New insn.
763
764 2018-08-01 Richard Biener <rguenther@suse.de>
765
766 PR bootstrap/86724
767 * graphite.h: Include isl/id.h and isl/space.h to allow build
768 with ISL 0.20.
769
770 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
771
772 PR target/86651
773 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
774 mode for COFF targets.
775 * defaults.h (TARGET_COFF): Define.
776 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
777 TARGET_COFF): Define.
778 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
779 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
780 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
781
782 2018-07-31 Alexandre Oliva <oliva@adacore.com>
783
784 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
785 * gimple-streamer-out.c (output_bb): Save it.
786 * lto-streamer-in.c (input_struct_function_base): Restore
787 instance discriminator if available. Create map on demand.
788 * lto-streamer-out.c (output_struct_function_base): Save it if
789 available.
790 * final.c (decl_to_instance_map): Document LTO strategy.
791
792 2018-07-31 Alexandre Oliva <oliva@adacore.com>
793 Olivier Hainque <hainque@adacore.com>
794
795 * debug.h (decl_to_instance_map_t): New type.
796 (decl_to_instance_map): Declare.
797 (maybe_create_decl_to_instance_map): New inline function.
798 * final.c (bb_discriminator, last_bb_discriminator): New statics,
799 to track basic block discriminators.
800 (final_start_function_1): Initialize them.
801 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
802 bb_discriminator.
803 (decl_to_instance_map): New variable.
804 (map_decl_to_instance, maybe_set_discriminator): New functions.
805 (notice_source_line): Set discriminator.
806
807 2018-07-31 Ian Lance Taylor <iant@golang.org>
808
809 * targhooks.c (default_have_speculation_safe_value): Add
810 ATTRIBUTE_UNUSED.
811
812 2018-07-31 David Malcolm <dmalcolm@redhat.com>
813
814 * dump-context.h: Include "pretty-print.h".
815 (dump_context::refresh_dumps_are_enabled): New decl.
816 (dump_context::emit_item): New decl.
817 (class dump_context): Add fields "m_test_pp" and
818 "m_test_pp_flags".
819 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
820 (temp_dump_context::get_dumped_text): New decl.
821 (class temp_dump_context): Add field "m_pp".
822 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
823 (dump_context::refresh_dumps_are_enabled): ...and add a test for
824 m_test_pp.
825 (set_dump_file): Update for above change.
826 (set_alt_dump_file): Likewise.
827 (dump_loc): New overload, taking a pretty_printer *.
828 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
829 to any test pretty-printer.
830 (make_item_for_dump_gimple_stmt): New function, adapted from
831 optinfo::add_gimple_stmt.
832 (dump_context::dump_gimple_stmt): Call it, and use the result,
833 eliminating the direct usage of dump_file and alt_dump_file in
834 favor of indirectly using them via emit_item.
835 (make_item_for_dump_gimple_expr): New function, adapted from
836 optinfo::add_gimple_expr.
837 (dump_context::dump_gimple_expr): Call it, and use the result,
838 eliminating the direct usage of dump_file and alt_dump_file in
839 favor of indirectly using them via emit_item.
840 (make_item_for_dump_generic_expr): New function, adapted from
841 optinfo::add_tree.
842 (dump_context::dump_generic_expr): Call it, and use the result,
843 eliminating the direct usage of dump_file and alt_dump_file in
844 favor of indirectly using them via emit_item.
845 (make_item_for_dump_printf_va): New function, adapted from
846 optinfo::add_printf_va.
847 (make_item_for_dump_printf): New function.
848 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
849 and use the result, eliminating the direct usage of dump_file and
850 alt_dump_file in favor of indirectly using them via emit_item.
851 (make_item_for_dump_dec): New function.
852 (dump_context::dump_dec): Call it, and use the result,
853 eliminating the direct usage of dump_file and alt_dump_file in
854 favor of indirectly using them via emit_item.
855 (make_item_for_dump_symtab_node): New function, adapted from
856 optinfo::add_symtab_node.
857 (dump_context::dump_symtab_node): Call it, and use the result,
858 eliminating the direct usage of dump_file and alt_dump_file in
859 favor of indirectly using them via emit_item.
860 (dump_context::begin_scope): Reimplement, avoiding direct usage
861 of dump_file and alt_dump_file in favor of indirectly using them
862 via emit_item.
863 (dump_context::emit_item): New member function.
864 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
865 Set up test pretty-printer on the underlying context. Call
866 refresh_dumps_are_enabled.
867 (temp_dump_context::~temp_dump_context): Call
868 refresh_dumps_are_enabled.
869 (temp_dump_context::get_dumped_text): New member function.
870 (selftest::verify_dumped_text): New function.
871 (ASSERT_DUMPED_TEXT_EQ): New macro.
872 (selftest::test_capture_of_dump_calls): Run all tests twice, with
873 and then without optinfo enabled. Add uses of
874 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
875 * dumpfile.h: Update comment for the dump_* API.
876 * optinfo-emit-json.cc
877 (selftest::test_building_json_from_dump_calls): Update for new
878 param for temp_dump_context ctor.
879 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
880 and "m_owned" field.
881 (optinfo_item::~optinfo_item): Likewise.
882 (optinfo::add_item): New member function.
883 (optinfo::emit): Update comment.
884 (optinfo::add_string): Delete.
885 (optinfo::add_printf): Delete.
886 (optinfo::add_printf_va): Delete.
887 (optinfo::add_gimple_stmt): Delete.
888 (optinfo::add_gimple_expr): Delete.
889 (optinfo::add_tree): Delete.
890 (optinfo::add_symtab_node): Delete.
891 (optinfo::add_dec): Delete.
892 * optinfo.h (class dump_context): New forward decl.
893 (optinfo::add_item): New decl.
894 (optinfo::add_string): Delete.
895 (optinfo::add_printf): Delete.
896 (optinfo::add_printf_va): Delete.
897 (optinfo::add_gimple_stmt): Delete.
898 (optinfo::add_gimple_expr): Delete.
899 (optinfo::add_tree): Delete.
900 (optinfo::add_symtab_node): Delete.
901 (optinfo::add_dec): Delete.
902 (optinfo::add_poly_int): Delete.
903 (optinfo_item::optinfo_item): Remove "owned" param.
904 (class optinfo_item): Remove field "m_owned".
905
906 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
907
908 PR middle-end/86705
909 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
910 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
911 requested variable alignment.
912 (expand_one_ssa_partition): Likewise.
913 (expand_one_var): Likewise.
914
915 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
916
917 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
918 to speculation_safe_value_not_needed.
919
920 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
921
922 * targhooks.h (speculation_safe_value_not_needed): New prototype.
923 * targhooks.c (speculation_safe_value_not_needed): New function.
924 * target.def (have_speculation_safe_value): Update documentation.
925 * doc/tm.texi: Regenerated.
926
927 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
928
929 * config/aarch64/iterators.md (ALLI_TI): New iterator.
930 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
931 expand.
932 (despeculate_copy<ALLI:mode>_insn): New insn.
933 (despeculate_copyti_insn): New insn.
934 (despeculate_simple<ALLI:mode>): New insn
935 (despeculate_simpleti): New insn.
936 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
937 function.
938 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
939 aarch64_speculation_safe_value.
940 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
941
942 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
943
944 * config/aarch64/aarch64-speculation.cc: New file.
945 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
946 before pass_reorder_blocks.
947 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
948 prototype.
949 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
950 X14 and X15 when tracking speculation.
951 * config/aarch64/aarch64.md (register name constants): Add
952 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
953 (unspec): Add UNSPEC_SPECULATION_TRACKER.
954 (speculation_barrier): New insn attribute.
955 (cmp<mode>): Allow SP in comparisons.
956 (speculation_tracker): New insn.
957 (speculation_barrier): Add speculation_barrier attribute.
958 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
959 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
960 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
961
962 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
963
964 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
965 aarch64_track_speculation is true.
966 (tb<optab><mode>1): Likewise.
967 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
968 generate CB[N]Z when tracking speculation.
969 (aarch64_split_compare_and_swap): Likewise.
970 (aarch64_split_atomic_op): Likewise.
971
972 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
973
974 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
975
976 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
977
978 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
979 (speculation_barrier): New insn.
980
981 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
982
983 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
984 * config/arm/arm.md (speculation_barrier): New expand.
985 (speculation_barrier_insn): New pattern.
986
987 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
988
989 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
990 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
991 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
992 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
993 list.
994 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
995 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
996 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
997 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
998 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
999 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1000 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1001 * builtins.c (expand_speculation_safe_value): New function.
1002 (expand_builtin): Call it.
1003 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1004 * doc/extend.texi: Document __builtin_speculation_safe_value.
1005 * doc/md.texi: Document "speculation_barrier" pattern.
1006 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1007 TARGET_HAVE_SPECULATION_SAFE_VALUE.
1008 * doc/tm.texi: Regenerated.
1009 * target.def (have_speculation_safe_value, speculation_safe_value): New
1010 hooks.
1011 * targhooks.c (default_have_speculation_safe_value): New function.
1012 (default_speculation_safe_value): New function.
1013 * targhooks.h (default_have_speculation_safe_value): Add prototype.
1014 (default_speculation_safe_value): Add prototype.
1015
1016 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1017
1018 * dump-context.h (dump_context::dump_loc): New decl.
1019 * dumpfile.c (dump_context::dump_loc): New member function.
1020 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1021 and dump_gimple_stmt.
1022 (dump_context::dump_gimple_expr_loc): Likewise, using
1023 dump_gimple_expr.
1024 (dump_context::dump_generic_expr_loc): Likewise, using
1025 dump_generic_expr.
1026 (dump_context::dump_printf_loc_va): Likewise, using
1027 dump_printf_va.
1028 (dump_context::begin_scope): Explicitly using the global function
1029 "dump_loc", rather than the member function.
1030
1031 2018-07-31 Martin Sebor <msebor@redhat.com>
1032
1033 PR tree-optimization/86741
1034 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1035
1036 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
1037
1038 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1039 depend on whether prefetch instructions will be emitted or not.
1040 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1041 will be emitted or not.
1042 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1043 (TARGET_SETMEM_PFD): New macros.
1044
1045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1046
1047 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1048 (NULL_STMT_VEC_INFO): Delete.
1049 (stmt_vec_info::operator*): Likewise.
1050 (stmt_vec_info::operator gimple *): Likewise.
1051 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1052 of NULL_STMT_VEC_INFO.
1053 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1054 (vect_reassociating_reduction_p): Likewise.
1055 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1056 (vectorizable_store): Likewise.
1057 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1058 (vec_info::free_stmt_vec_infos): Likewise.
1059
1060 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1061
1062 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1063 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1064
1065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1066
1067 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1068 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1069 (vec_info::free_stmt_vec_info): New private member functions.
1070 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1071 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1072 * tree-parloops.c (gather_scalar_reductions): Remove calls to
1073 set_stmt_vec_info_vec and free_stmt_vec_infos.
1074 * tree-vect-loop.c (_loop_vec_info): Remove call to
1075 set_stmt_vec_info_vec.
1076 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1077 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1078 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1079 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1080 (vec_info::free_stmt_vec_info): ...these new functions. Remove
1081 assignments in {vec_info::,}new_stmt_vec_info that are redundant
1082 with the clearing in the xcalloc.
1083 (stmt_vec_info_vec): Delete.
1084 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1085 (vectorize_loops): Likewise.
1086 (vec_info::~vec_info): Remove argument from call to
1087 free_stmt_vec_infos.
1088 (vec_info::add_stmt): Remove vinfo argument from call to
1089 new_stmt_vec_info.
1090
1091 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1092
1093 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1094 rather than a gimple stmt.
1095 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
1096 information for pattern statements when passed the original
1097 statement; instead wait to be passed the pattern statement itself.
1098 Don't call set_vinfo_for_stmt here.
1099 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1100 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1101 stmt_vec_infos here.
1102 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1103 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1104 stmt_vec_infos entry.
1105
1106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1107
1108 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1109 * tree-vectorizer.c (vec_info::replace_stmt): New function.
1110 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1111 * tree-vect-stmts.c (vectorizable_call): Likewise.
1112 (vectorizable_simd_clone_call): Likewise.
1113
1114 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1115
1116 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1117 * tree-vectorizer.c (vec_info::remove_stmt): New function.
1118 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1119 * tree-vect-loop.c (vect_transform_loop): Likewise.
1120 * tree-vect-slp.c (vect_schedule_slp): Likewise.
1121 * tree-vect-stmts.c (vect_remove_stores): Likewise.
1122
1123 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1124
1125 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1126 (vect_dr_stmt): Delete.
1127 * tree-vectorizer.c (vec_info::lookup_dr): New function.
1128 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1129 of DR_VECT_AUX.
1130 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1131 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1132 (vect_verify_datarefs_alignment, vect_peeling_supportable)
1133 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1134 (vect_analyze_data_refs): Likewise.
1135 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
1136 argument.
1137 (vect_find_same_alignment_drs): Likewise.
1138 (vect_slp_analyze_node_dependences): Update calls accordingly.
1139 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
1140 instead of DR_VECT_AUX.
1141 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1142 of a vector data references. Use vec_info::lookup_dr instead of
1143 DR_VECT_AUX.
1144 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1145 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
1146 instead of DR_VECT_AUX.
1147
1148 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1149
1150 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1151 dr_vec_info.
1152 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1153 accordingly.
1154 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1155 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1156 (vect_gen_prolog_loop_niters): Likewise.
1157
1158 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1159
1160 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1161 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1162 (vect_known_alignment_in_bytes, vect_dr_behavior)
1163 (vect_get_scalar_dr_size): Take references as dr_vec_infos
1164 instead of data_references. Update calls to other routines for
1165 which the same change has been made.
1166 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1167 dr_vec_infos instead of stmt_vec_infos.
1168 (vect_analyze_data_ref_dependence): Update call accordingly.
1169 (vect_slp_analyze_data_ref_dependence)
1170 (vect_record_base_alignments): Use DR_VECT_AUX.
1171 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1172 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1173 (vector_alignment_reachable_p, vect_get_data_access_cost)
1174 (vect_peeling_supportable, vect_analyze_group_access_1)
1175 (vect_analyze_group_access, vect_analyze_data_ref_access)
1176 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1177 (vect_compile_time_alias, vect_small_gap_p)
1178 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1179 (vect_supportable_dr_alignment): Take references as dr_vec_infos
1180 instead of data_references. Update calls to other routines for
1181 which the same change has been made.
1182 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1183 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1184 (vect_slp_analyze_and_verify_node_alignment)
1185 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1186 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1187 (vect_setup_realignment): Use dr_vec_infos. Update calls after
1188 above changes.
1189 (_vect_peel_info::dr): Replace with...
1190 (_vect_peel_info::dr_info): ...this new field.
1191 (vect_peeling_hash_get_most_frequent)
1192 (vect_peeling_hash_choose_best_peeling): Update accordingly.
1193 (vect_peeling_hash_get_lowest_cost):
1194 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
1195 routines for which the same change has been made.
1196 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
1197 data_reference.
1198 * tree-vect-loop-manip.c (get_misalign_in_elems)
1199 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
1200 above changes.
1201 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1202 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1203 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1204 (get_group_load_store_type, get_negative_load_store_type)
1205 (vect_get_data_ptr_increment, vectorizable_store)
1206 (vectorizable_load): Likewise.
1207 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1208 Update calls to other routines for which the same change has been made.
1209
1210 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1211
1212 * tree-vectorizer.h (vec_info::move_dr): New member function.
1213 (dataref_aux): Rename to...
1214 (dr_vec_info): ...this and add "dr" and "stmt" fields.
1215 (_stmt_vec_info::dr_aux): Update accordingly.
1216 (_stmt_vec_info::data_ref_info): Delete.
1217 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1218 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1219 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1220 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1221 of data_ref.
1222 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
1223 (STMT_VINFO_DR_INFO): New macro.
1224 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1225 (set_dr_misalignment): Update after rename of dataref_aux.
1226 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
1227 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1228 initialization of STMT_VINFO_DATA_REF.
1229 * tree-vectorizer.c (vec_info::move_dr): New function.
1230 * tree-vect-patterns.c (vect_recog_bool_pattern)
1231 (vect_recog_mask_conversion_pattern)
1232 (vect_recog_gather_scatter_pattern): Use it.
1233 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1234 the "dr" and "stmt" fields of dr_vec_info instead of
1235 STMT_VINFO_DATA_REF.
1236
1237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1238
1239 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1240 (is_pattern_stmt_p): Use it.
1241 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1242 on pattern statements.
1243
1244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1245
1246 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1247 original stmt as a stmt_vec_info rather than a gimple stmt.
1248 (vect_pattern_recog_1): Take the statement directly as a
1249 stmt_vec_info, rather than via a gimple_stmt_iterator.
1250 Update call to vect_mark_pattern_stmts.
1251 (vect_pattern_recog): Update calls accordingly.
1252
1253 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1254
1255 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1256 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1257 a vect_def_type for the first argument.
1258 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1259 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
1260 operand if it isn't defined by a vectorized statement.
1261 (vect_build_gather_load_calls): Remove the mask_dt argument and
1262 update calls to vect_get_vec_def_for_stmt_copy.
1263 (vectorizable_bswap): Likewise the dt argument.
1264 (vectorizable_call): Update calls to vectorizable_bswap and
1265 vect_get_vec_def_for_stmt_copy.
1266 (vectorizable_simd_clone_call, vectorizable_assignment)
1267 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1268 (vectorizable_comparison): Update calls to
1269 vect_get_vec_def_for_stmt_copy.
1270 (vectorizable_store): Likewise. Remove now-unnecessary calls to
1271 vect_is_simple_use.
1272 (vect_get_loop_based_defs): Remove dt argument and update call
1273 to vect_get_vec_def_for_stmt_copy.
1274 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1275 and vect_get_vec_def_for_stmt_copy.
1276 (vectorizable_load): Update calls to vect_build_gather_load_calls
1277 and vect_get_vec_def_for_stmt_copy.
1278 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1279 (vectorizable_reduction, vectorizable_live_operation): Update calls
1280 to vect_get_vec_def_for_stmt_copy.
1281
1282 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1283
1284 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1285 and gimple stmt arguments with a stmt_vec_info.
1286 (vect_record_base_alignments): Update calls accordingly.
1287 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1288 and gimple stmt arguments with a stmt_vec_info.
1289 (vect_build_slp_tree_1): Remove vinfo argument and update call
1290 to vect_record_max_nunits.
1291 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1292 and vect_record_max_nunits.
1293
1294 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1295
1296 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1297 file and take a stmt_vec_info instead of a gimple stmt.
1298 (supportable_widening_operation, vect_finish_replace_stmt)
1299 (vect_finish_stmt_generation, vect_get_store_rhs)
1300 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1301 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1302 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1303 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1304 (vect_create_data_ref_ptr, bump_vector_ptr)
1305 (vect_permute_store_chain, vect_setup_realignment)
1306 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1307 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1308 (vectorizable_reduction, vectorizable_induction)
1309 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1310 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1311 than gimple stmts as arguments.
1312 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1313 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1314 (can_group_stmts_p, vect_check_gather_scatter)
1315 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1316 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1317 (vect_permute_load_chain, vect_shift_permute_load_chain)
1318 (vect_transform_grouped_load)
1319 (vect_record_grouped_load_vectors): Likewise.
1320 * tree-vect-loop.c (vect_fixup_reduc_chain)
1321 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1322 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1323 (vectorizable_reduction, vectorizable_induction)
1324 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1325 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1326 (vect_get_load_store_mask): Likewise.
1327 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1328 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1329 * tree-vect-stmts.c (vect_mark_relevant)
1330 (is_simple_and_all_uses_invariant)
1331 (exist_non_indexing_operands_for_use_p, process_use)
1332 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1333 (vect_get_vec_def_for_operand, vect_get_vec_defs)
1334 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1335 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1336 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1337 (get_negative_load_store_type, get_load_store_type)
1338 (vect_check_load_store_mask, vect_check_store_rhs)
1339 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1340 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1341 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1342 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1343 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1344 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1345 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1346 (supportable_widening_operation): Likewise.
1347
1348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1349
1350 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1351 a stmt_vec_info instead of a gcall.
1352 (vect_check_gather_scatter): Update call accordingly.
1353 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1354 of a gphi.
1355 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1356 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1357 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1358 instead of a gimple stmt.
1359 (vect_transform_loop): Update calls accordingly.
1360 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1361 stmt_vec_infos instead of gimple stmts.
1362 (vect_analyze_slp_instance): Update use accordingly.
1363 * tree-vect-stmts.c (read_vector_array, write_vector_array)
1364 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1365 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1366 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1367 (vect_gen_widened_results_half, vect_get_loop_based_defs)
1368 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1369 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1370 down to subroutines.
1371
1372 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1373
1374 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1375 of the worklist from a vector of gimple stmts to a vector of
1376 stmt_vec_infos.
1377 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1378 (vect_mark_stmts_to_be_vectorized): Likewise
1379
1380 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1381
1382 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1383 statement before passing it to vect_analyze_stmt.
1384 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1385 the chain of phi vector definitions. Track the exit phi via its
1386 stmt_vec_info.
1387 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1388 STMT_VINFO_REDUC_DEF.
1389 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1390 stmt_vec_infos to handle the statement chains.
1391 (vect_get_slp_defs): Record the first statement in the node
1392 using a stmt_vec_info.
1393 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1394 statements here and pass their stmt_vec_info down to subroutines.
1395 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1396 down to vect_finish_stmt_generation.
1397 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1398 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1399 stmt_vec_infos to subroutines.
1400 (vect_remove_stores): Use stmt_vec_infos to handle the statement
1401 chains.
1402
1403 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1404
1405 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1406 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1407 (vect_permute_store_chain, vect_setup_realignment)
1408 (vect_permute_load_chain, vect_shift_permute_load_chain)
1409 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1410 stmts internally, and when passing values to other vectorizer routines.
1411 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1412 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1413 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1414 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1415 (vectorizable_reduction, vectorizable_induction)
1416 (vectorizable_live_operation, vect_transform_loop_stmt)
1417 (vect_transform_loop): Likewise.
1418 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1419 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1420 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1421 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1422 (vect_slp_analyze_node_operations_1): Likewise.
1423 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1424 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1425 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1426 (vect_finish_stmt_generation_1, get_group_load_store_type)
1427 (get_load_store_type, vect_build_gather_load_calls)
1428 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1429 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1430 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1431 (vectorizable_store, vectorizable_load, vectorizable_condition)
1432 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1433 (supportable_widening_operation): Likewise.
1434 (vect_get_vector_types_for_stmt): Likewise.
1435 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1436
1437 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1438
1439 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1440 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1441 (vect_permute_store_chain, vect_permute_load_chain)
1442 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1443 repeated stmt_vec_info lookups.
1444 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1445 (vect_update_ivs_after_vectorizer): Likewise.
1446 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1447 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1448 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1449 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1450 (vect_bb_slp_scalar_cost): Likewise.
1451 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1452
1453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1454
1455 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1456 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1457 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1458 to get gassigns and gcalls, rather than operating on generc gimple
1459 stmts.
1460 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1461 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1462 (vectorizable_load, vect_analyze_stmt): Likewise.
1463 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1464
1465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1466
1467 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1468 return stmt_vec_infos rather than gimple stmts. Do not accept
1469 null arguments.
1470 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1471 of a gimple stmt.
1472 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1473 Update use of get_later_stmt.
1474 (vect_get_constant_vectors): Update call accordingly.
1475 (vect_schedule_slp_instance): Likewise
1476 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1477 (vect_slp_analyze_instance_dependence): Likewise.
1478 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1479
1480 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1481
1482 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1483 (stmt_info_for_cost::stmt_info): ...this new field.
1484 (add_stmt_costs): Update accordingly.
1485 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1486 (vect_get_known_peeling_cost): Likewise.
1487 (vect_estimate_min_profitable_iters): Likewise.
1488 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1489
1490 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1491
1492 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1493 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1494 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1495 accordingly.
1496 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1497
1498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1499
1500 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1501 a gimple stmt to a stmt_vec_info.
1502 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1503
1504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1505
1506 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1507 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1508 (_loop_vec_info::reduction_chains): Likewise.
1509 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1510 accordingly.
1511 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1512
1513 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1514
1515 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1516 a gimple stmt to a stmt_vec_info.
1517 (_stmt_vec_info::next_element): Likewise.
1518 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1519 (vect_slp_analyze_and_verify_node_alignment)
1520 (vect_analyze_group_access_1, vect_analyze_group_access)
1521 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1522 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1523 (vect_supportable_dr_alignment): Update accordingly.
1524 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1525 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1526 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1527 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1528 * tree-vect-slp.c (vect_build_slp_tree_1)
1529 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1530 (vect_split_slp_store_group, vect_analyze_slp_instance)
1531 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1532 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1533 (get_group_load_store_type, get_load_store_type)
1534 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1535 (vect_transform_stmt, vect_remove_stores): Likewise.
1536
1537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1538
1539 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1540 than a gimple stmt.
1541 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1542 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1543 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1544 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1545 (vector_alignment_reachable_p, vect_get_data_access_cost)
1546 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1547 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1548 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1549 (vect_analyze_group_access_1, vect_analyze_group_access)
1550 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1551 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1552 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1553 result of vect_dr_stmt and use the stmt_vec_info instead of
1554 the associated gimple stmt.
1555 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1556 (vect_gen_prolog_loop_niters): Likewise.
1557 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1558
1559 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1560
1561 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1562 to a vec<stmt_vec_info>.
1563 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1564 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1565 vec<stmt_vec_info>.
1566 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1567 to a vec<stmt_vec_info>.
1568 (bst_traits::value_type, bst_traits::value_type): Likewise.
1569 (bst_traits::hash): Update accordingly.
1570 (vect_get_and_check_slp_defs): Change the stmts parameter from
1571 a vec<gimple *> to a vec<stmt_vec_info>.
1572 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1573 (vect_build_slp_tree): Likewise.
1574 (vect_build_slp_tree_2): Likewise. Update uses of
1575 SLP_TREE_SCALAR_STMTS.
1576 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1577 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1578 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1579 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1580 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1581 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1582 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1583 (vect_get_constant_vectors, vect_get_slp_defs)
1584 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1585 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1586 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1587 instead of gimple stmts.
1588 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1589 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1590 (vect_slp_analyze_instance_dependence): Update uses of
1591 SLP_TREE_SCALAR_STMTS.
1592 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1593 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1594 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1595 (get_initial_defs_for_reduction): Likewise.
1596 (vect_create_epilog_for_reduction): Likewise.
1597 (vectorize_fold_left_reduction): Likewise.
1598 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1599 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1600 (can_vectorize_live_stmts): Likewise.
1601
1602 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1603
1604 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1605 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1606 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1607 than gimple stmts.
1608 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1609 of a gimple stmt.
1610 (gather_scalar_reductions): Update after above interface changes.
1611 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1612 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1613 than gimple stmts.
1614 (vect_force_simple_reduction): Likewise.
1615 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1616 LOOP_VINFO_REDUCTIONS.
1617 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1618
1619 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1620
1621 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1622 a gimple stmt to a stmt_vec_info.
1623 * tree-vect-loop.c (vect_active_double_reduction_p)
1624 (vect_force_simple_reduction, vectorizable_reduction): Update
1625 accordingly.
1626
1627 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1628
1629 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1630 vec<gimple *> to a vec<stmt_vec_info>.
1631 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1632 the reduction_phis argument from a vec<gimple *> to a
1633 vec<stmt_vec_info>.
1634 (vectorizable_reduction): Likewise the phis local variable that
1635 is passed to vect_create_epilog_for_reduction. Update for new type
1636 of SLP_TREE_VEC_STMTS.
1637 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1638 (vectorizable_live_operation): Likewise.
1639 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1640 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1641
1642 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1643
1644 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1645 a gimple stmt to a stmt_vec_info.
1646 (vectorizable_condition, vectorizable_live_operation)
1647 (vectorizable_reduction, vectorizable_induction): Pass back the
1648 vectorized statement as a stmt_vec_info.
1649 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1650 use of STMT_VINFO_VEC_STMT.
1651 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1652 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1653 as stmt_vec_infos rather than gimple stmts.
1654 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1655 to a stmt_vec_info.
1656 (vectorizable_live_operation): Likewise.
1657 (vectorizable_reduction, vectorizable_induction): Likewise,
1658 updating use of STMT_VINFO_VEC_STMT.
1659 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1660 of STMT_VINFO_VEC_STMT.
1661 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1662 (vectorizable_simd_clone_call, vectorizable_conversion)
1663 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1664 (vectorizable_store, vectorizable_load, vectorizable_condition)
1665 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1666 from a gimple stmt to a stmt_vec_info.
1667 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1668 pointer to a stmt_vec_info to the vectorizable_* routines.
1669
1670 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1671
1672 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1673 a gimple stmt to a stmt_vec_info.
1674 (is_pattern_stmt_p): Update accordingly.
1675 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1676 (vect_record_grouped_load_vectors): Likewise.
1677 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1678 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1679 (vect_model_reduction_cost): Likewise.
1680 (vect_create_epilog_for_reduction): Likewise.
1681 (vectorizable_reduction, vectorizable_induction): Likewise.
1682 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1683 Return the stmt_vec_info for the pattern statement.
1684 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1685 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1686 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1687 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1688 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1689 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1690 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1691 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1692
1693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1694
1695 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1696 (vect_finish_stmt_generation): Likewise.
1697 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1698 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1699 (vect_build_gather_load_calls): Use the return value of the above
1700 functions instead of a separate call to vinfo_for_stmt. Use narrow
1701 scopes for the input gimple stmt and wider scopes for the associated
1702 stmt_vec_info. Use vec_info::lookup_def when setting these
1703 stmt_vec_infos from an SSA_NAME definition.
1704 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1705 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1706 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1707 (vectorizable_store, vectorizable_load, vectorizable_condition)
1708 (vectorizable_comparison): Likewise.
1709 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1710 (vectorizable_reduction): Likewise.
1711
1712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1713
1714 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1715 stmt_vec_info * parameter before the optional gimple **.
1716 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1717 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1718 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1719 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1720 (vectorizable_live_operation): Likewise.
1721 * tree-vect-patterns.c (type_conversion_p): Likewise.
1722 (vect_look_through_possible_promotion): Likewise.
1723 (vect_recog_rotate_pattern): Likewise.
1724 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1725
1726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1727
1728 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1729 a typedef to a wrapper class.
1730 (NULL_STMT_VEC_INFO): New macro.
1731 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1732 (stmt_vec_info::operator*): New function.
1733 (stmt_vec_info::operator gimple *): Likewise.
1734 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1735 (add_stmt_costs): Likewise.
1736 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1737 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1738 (vect_get_known_peeling_cost): Likewise.
1739 (vect_estimate_min_profitable_iters): Likewise.
1740 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1741 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1742 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1743 (vectorizable_store, free_stmt_vec_infos): Likewise.
1744 (new_stmt_vec_info): Change return type of xcalloc to
1745 _stmt_vec_info *.
1746
1747 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1748
1749 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1750 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1751 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1752 a single_imm_use-based sequence.
1753 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1754
1755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1756
1757 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1758 * tree-vectorizer.c (vec_info::lookup_def): New function.
1759 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1760 (vect_widened_op_tree): Likewise.
1761 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1762 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1763 (vectorizable_reduction): Likewise.
1764 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1765 of a gimple *.
1766 (vect_is_slp_reduction): Update calls accordingly. Use
1767 vec_info::lookup_def.
1768 (vect_is_simple_reduction): Likewise
1769 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1770
1771 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1772
1773 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1774 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1775 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1776 of vinfo_for_stmt.
1777 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1778 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1779 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1780 (vect_is_slp_reduction, vectorizable_induction)
1781 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1782 * tree-vect-patterns.c (vect_init_pattern_stmt):
1783 (vect_determine_min_output_precision_1, vect_determine_precisions)
1784 (vect_pattern_recog): Likewise.
1785 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1786 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1787 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1788 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1789 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1790 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1791 info field from a loop to a loop_vec_info.
1792
1793 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1794
1795 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1796 (vec_info::add_stmt): Declare.
1797 * tree-vectorizer.c (vec_info::add_stmt): New function.
1798 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1799 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1800 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1801 (vectorizable_induction): Likewise.
1802 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1803 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1804 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1805 (vectorizable_load): Likewise.
1806 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1807 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1808 (vect_recog_gather_scatter_pattern): Likewise.
1809 (append_pattern_def_seq): Likewise. Remove a check that is
1810 performed by add_stmt itself.
1811
1812 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1813
1814 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1815 which make_ssa_name was called with new_stmt before new_stmt
1816 had been created.
1817
1818 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1819
1820 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1821 split out from...
1822 (vect_is_slp_reduction): ...here...
1823 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1824 that are already known to be false.
1825
1826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1827
1828 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1829 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1830 STMT_VINFO_NUM_SLP_USES when it's true.
1831 (vect_free_slp_instance): Add a final_p parameter and pass it to
1832 vect_free_slp_tree.
1833 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1834 (vect_analyze_slp_instance): Likewise.
1835 (vect_slp_analyze_operations): Likewise.
1836 (vect_slp_analyze_bb_1): Likewise.
1837 * tree-vectorizer.c (vec_info): Likewise.
1838 * tree-vect-loop.c (vect_transform_loop): Likewise.
1839
1840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1841
1842 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1843 function is not called for second and subsequent members of
1844 a reduction group.
1845
1846 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1847
1848 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1849 cases for nested loops from here to ...
1850 (vect_create_epilog_for_reduction): ...here. Only call
1851 vect_is_simple_use for inner-loop reductions.
1852
1853 2018-07-31 Martin Liska <mliska@suse.cz>
1854
1855 PR gcov-profile/85338
1856 PR gcov-profile/85350
1857 PR gcov-profile/85372
1858 * profile.c (struct location_triplet): New.
1859 (struct location_triplet_hash): Likewise.
1860 (output_location): Do not output a BB that
1861 is already recorded for a line.
1862 (branch_prob): Use streamed_locations.
1863
1864 2018-07-31 Martin Liska <mliska@suse.cz>
1865
1866 PR gcov-profile/85370
1867 * coverage.c (coverage_begin_function): Do not mark target
1868 clones as artificial functions.
1869
1870 2018-07-31 Martin Liska <mliska@suse.cz>
1871
1872 PR gcov-profile/83813
1873 PR gcov-profile/84758
1874 PR gcov-profile/85217
1875 PR gcov-profile/85332
1876 * profile.c (branch_prob): Do not record GOTO expressions
1877 for GIMPLE statements which locations are already streamed.
1878
1879 2018-07-31 Olivier Hainque <hainque@adacore.com>
1880
1881 * gcc.c (handle_spec_function): Accept a soft_matched_part
1882 argument, as do_spec_1. Pass it down to ...
1883 (eval_spec_function): Accept a soft_matched_part argument,
1884 and pass it down to ...
1885 (do_spec_2): Accept a soft_matched_part argument, and pass
1886 it down to do_spec_1.
1887 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1888 (handle_braces): Update call to handle_spec_function.
1889 (driver::set_up_specs): Update calls to do_spec_2.
1890 (compare_debug_dump_opt_spec_function): Likewise.
1891 (compare_debug_self_opt_spec_function): Likewise.
1892
1893 2018-07-31 Olivier Hainque <hainque@adacore.com>
1894
1895 * common.opt (nolibc): New option.
1896 * doc/invoke.texi (Link Options): Document it.
1897 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1898 * config/alpha/linux.h: Likewise.
1899 * config/arc/elf.h: Likewise.
1900 * config/arm/uclinux-elf.h: Likewise.
1901 * config/arm/unknown-elf.h: Likewise.
1902 * config/avr/avrlibc.h: Likewise.
1903 * config/bfin/bfin.h: Likewise.
1904 * config/bfin/linux.h: Likewise.
1905 * config/bfin/uclinux.h: Likewise.
1906 * config/darwin.h: Likewise.
1907 * config/darwin10.h: Likewise.
1908 * config/darwin12.h: Likewise.
1909 * config/gnu-user.h: Likewise.
1910 * config/lm32/uclinux-elf.h: Likewise.
1911 * config/pa/pa-hpux11.h: Likewise.
1912 * config/pa/pa64-hpux.h: Likewise.
1913 * config/sparc/sparc.h: Likewise.
1914
1915 2018-07-31 Olivier Hainque <hainque@adacore.com>
1916
1917 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1918 undefined variables.
1919
1920 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1921
1922 PR target/86640
1923 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1924 instead of GEN_INT.
1925
1926 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1927
1928 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1929 terminated string literal.
1930
1931 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1932
1933 PR rtl-optimization/85160
1934 * combine.c (is_just_move): New function.
1935 (try_combine): Allow combining two instructions into two if neither of
1936 the original instructions was a move.
1937
1938 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1939
1940 PR target/86673
1941 * doc/extend.texi (Global Register Variables): Discourage use of type
1942 qualifiers.
1943 (Local Register Variables): Likewise.
1944
1945 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1946
1947 PR tree-optimization/86506
1948 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1949
1950 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1951
1952 PR target/86547
1953 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1954 hard_regno, make sure no insn between `from` and `to` clobbers it.
1955
1956 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1957 Tom de Vries <tdevries@suse.de>
1958
1959 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1960 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1961 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1962 PTX_DEFAULT_RUNTIME_DIM.
1963 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1964
1965 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1966
1967 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1968 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1969 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1970
1971 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1972
1973 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1974 used.
1975 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1976 predicate to reflect toc fusion has been deleted.
1977 (toc_fusion_mem_raw): Delete, no longer used.
1978 (toc_fusion_mem_wrapped): Likewise.
1979 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1980 fusion mask bit.
1981 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1982 Delete, no longer used.
1983 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1984 meant to be used for toc fusion.
1985 (rs6000_debug_print_mode): Delete toc fusion debugging.
1986 (rs6000_debug_reg_global): Likewise.
1987 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1988 fusion and secondary reload support that were never used.
1989 (rs6000_option_override_internal): Delete TOC fusion, that was only
1990 partially defined, and it did not work unless you also used the
1991 -mcmodel= switch.
1992 (rs6000_legitimate_address_p): Delete TOC fusion support.
1993 (rs6000_opt_masks): Likewise.
1994 (fusion_wrap_memory_address): Delete function, no longer used.
1995 (fusion_split_address); Delete TOC fusion support.
1996 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1997 longer used with toc fusion being deleted.
1998 (TARGET_TOC_FUSION_FP): Likewise.
1999 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2000 UNSPEC.
2001 (toc fusion spliter): Delete TOC fusion support.
2002 (toc_fusionload_<mode>): Likewise.
2003 (toc_fusionload_di): Likewise.
2004 (fusion_gpr_load_<mode>): Delete generator function, this insn no
2005 longer needs to be named. Rename predicate to delete TOC fusion.
2006 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2007 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2008 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2009 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2010 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2011
2012 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
2013
2014 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2015 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
2016 __int128 in built-in function prototypes.
2017 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2018 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2019
2020 2018-07-27 Martin Sebor <msebor@redhat.com>
2021
2022 PR tree-optimization/86696
2023 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2024 types, including enums.
2025 (handle_char_store): Be prepared for the above function to fail.
2026
2027 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
2028
2029 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2030 when optimization level is lower than 2 or optimize for size.
2031
2032 2018-07-26 Martin Sebor <msebor@redhat.com>
2033
2034 PR tree-optimization/86043
2035 PR tree-optimization/86042
2036 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2037 (get_string_cst_length): Rename...
2038 (get_min_string_length): ...to this. Add argument.
2039 (handle_char_store): Extend to handle multi-character stores by
2040 MEM_REF.
2041 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
2042 * tree.h (initializer_zerop): Add argument.
2043
2044 2018-07-26 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR middle-end/86660
2047 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2048 declare target to variables if they have always,{to,from,tofrom} map
2049 kinds.
2050
2051 2018-07-26 Martin Liska <mliska@suse.cz>
2052
2053 PR lto/86548
2054 * lto-wrapper.c: Add linker_output as prefix
2055 for ltrans_output_file.
2056
2057 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
2058
2059 PR rtl-optimization/85805
2060 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2061 value for hard registers if that was written in the same mode.
2062
2063 2018-07-26 Martin Liska <mliska@suse.cz>
2064
2065 PR gcov-profile/86536
2066 * gcov.c (format_gcov): Use printf format %.*f directly
2067 and do not handle special values.
2068
2069 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2070
2071 * common/config/arc/arc-common.c (arc_option_optimization_table):
2072 Update default optimizations for size.
2073
2074 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2075
2076 * config/arc/arc.md (movsf_insn): Add short instruction selection.
2077 * config/arc/constraints.md (CfZ): New constraint.
2078 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2079 (subsf3_fpu): Likewise.
2080 (cmpsf_fpu): Likewise.
2081 (cmpsf_fpu_uneq): Likewise.
2082
2083 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2084
2085 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2086 accesses as well.
2087 (arc_is_uncached_mem_p): uncached applies to both the variable and
2088 the pointer.
2089
2090 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2091
2092 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2093 register names.
2094
2095 2018-07-25 David Malcolm <dmalcolm@redhat.com>
2096
2097 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2098 field "m_scopes" from vec to auto_vec.
2099
2100 2018-07-25 Martin Liska <mliska@suse.cz>
2101
2102 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2103 return type.
2104
2105 2018-07-25 Richard Biener <rguenther@suse.de>
2106
2107 PR debug/86654
2108 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2109 special wrt context_die late.
2110 (gen_subprogram_die): Re-use DIEs in local scope.
2111
2112 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
2113
2114 PR tree-optimization/86644
2115 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
2116
2117 2018-07-25 Martin Liska <mliska@suse.cz>
2118
2119 PR middle-end/86645
2120 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2121 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2122
2123 2018-07-25 Martin Liska <mliska@suse.cz>
2124
2125 PR sanitizer/79635
2126 * params.def: Explain ASan abbreviation and provide
2127 a documentation link.
2128
2129 2018-07-24 Martin Sebor <msebor@redhat.com>
2130
2131 PR tree-optimization/86622
2132 PR tree-optimization/86532
2133 * builtins.h (string_length): Declare.
2134 * builtins.c (c_strlen): Correct handling of non-constant offsets.
2135 (check_access): Be prepared for non-constant length ranges.
2136 (string_length): Make extern.
2137 * expr.c (string_constant): Only handle the minor non-constant
2138 array index. Use string_constant to compute the length of
2139 a generic string constant.
2140
2141 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
2142
2143 PR tree-optimization/86618
2144 * tree-vect-stmts.c (vectorizable_call): Don't take the address
2145 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2146
2147 2018-07-24 David Malcolm <dmalcolm@redhat.com>
2148
2149 PR tree-optimization/86636
2150 * json.cc (json::object::set): Fix comment. Add assertions.
2151 (json::array::append): Move here from json.h. Add comment and an
2152 assertion.
2153 (json::string::string): Likewise.
2154 * json.h (json::array::append): Move to json.cc.
2155 (json::string::string): Likewise.
2156 * optinfo-emit-json.cc
2157 (optrecord_json_writer::impl_location_to_json): Assert that we
2158 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2159 wrapper around it. Expand the location once, rather than three
2160 times.
2161 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2162 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2163 wrappers.
2164 (optrecord_json_writer::optinfo_to_json): Likewise, in four
2165 places. Fix some overlong lines.
2166
2167 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
2168
2169 * config/aarch64/aarch64-simd.md
2170 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2171 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2172 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2173 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2174 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2175 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2176 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2177 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2178 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2179
2180 2018-07-24 Jakub Jelinek <jakub@redhat.com>
2181
2182 PR middle-end/86627
2183 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2184 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
2185 and abs_d == d, do the power of two handling if profitable.
2186
2187 2018-07-24 Richard Biener <rguenther@suse.de>
2188
2189 * match.pd: Add BIT_FIELD_REF canonicalizations.
2190
2191 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2192
2193 PR c/86617
2194 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2195
2196 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2197
2198 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2199 terminated STRING_CST object.
2200
2201 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2202
2203 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2204
2205 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
2206
2207 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2208 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2209 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2210 the elements into a register.
2211 (rs6000_split_v4si_init_di_reg): Delete.
2212 (rs6000_split_v4si_init): Delete.
2213 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2214 (vsx_init_v4si): Rewrite as a define_expand.
2215
2216 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
2217
2218 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2219 zero_extend argument from memory): New.
2220
2221 2018-07-22 Martin Sebor <msebor@redhat.com>
2222
2223 PR bootstrap/86621
2224 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2225 diagnosing calls with unknown arguments unless -Walloca-larger-than
2226 is restricted to less than PTRDIFF_MAX bytes.
2227
2228 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
2229
2230 * doc/gcov.texi (Invoking Gcov): Editorial changes.
2231
2232 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2233
2234 * pretty-print.c (text_info::set_location): Remove redundant
2235 "line_table" parameter from call to rich_location::set_range.
2236
2237 2018-07-20 Martin Sebor <msebor@redhat.com>
2238
2239 PR middle-end/82063
2240 * builtins.c (expand_builtin_alloca): Adjust.
2241 * calls.c (alloc_max_size): Simplify.
2242 * cgraphunit.c (cgraph_node::expand): Adjust.
2243 * common.opt (larger_than_size, warn_frame_larger_than): Remove
2244 variables.
2245 (frame_larger_than_size): Same.
2246 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2247 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2248 Initialize.
2249 * doc/invoke.texi (GCC Command Options): Document option arguments.
2250 Explain byte-size arguments and suffixes.
2251 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2252 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2253 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2254 * doc/options.texi (UInteger): Expand.
2255 (Host_Wide_Int, ByteSize): Document new properties.
2256 * final.c (final_start_function_1): Include sizes in an error message.
2257 * function.c (frame_offset_overflow): Same.
2258 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2259 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2260 Diagnose unbounded alloca calls only for limits of less than
2261 PTRDIFF_MAX.
2262 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
2263 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
2264 for alloca(0).
2265 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
2266 only for limits of less than PTRDIFF_MAX.
2267 * langhooks-def.h (lhd_handle_option): Change function argument
2268 to HOST_WIDE_INT.
2269 * langhooks.c (lhd_handle_option): Same.
2270 * langhooks.h (handle_option): Same.
2271 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2272 ByteSize flags.
2273 (var_type, var_type_struct): Same.
2274 (var_set): Handle ByteSize flag.
2275 * optc-gen.awk: Add comments to output to ease debugging. Make
2276 use of HOST_WIDE_INT where appropriate.
2277 * opts-gen-save.awk: Use %lx to format unsigned long.
2278 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2279 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2280 arguments. Parse bytes-size suffixes.
2281 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2282 (enum_value_to_arg): Same.
2283 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
2284 (handle_option): Adjust.
2285 (generate_option): Change function argument to HOST_WIDE_INT.
2286 (cmdline_handle_error): Adjust.
2287 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2288 (set_option): Change function argument to HOST_WIDE_INT.
2289 (option_enabled): Handle cl_host_wide_int.
2290 (get_option_state): Handle CLVC_SIZE.
2291 (control_warning_option): Same.
2292 * opts.c (common_handle_option): Change function argument to
2293 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
2294 OPT_Wvla_larger_than_.
2295 * opts.h (enum cl_var_type): Add an enumerator.
2296 * stor-layout.c (layout_decl): Print a more meaningful warning.
2297 * toplev.c (output_stack_usage): Adjust.
2298
2299 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
2300
2301 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2302 call to inline_expand_builtin_string_cmp.
2303 (expand_builtin_strcmp): Likewise.
2304 (expand_builtin_strncmp): Likewise.
2305 (inline_string_cmp): Delete the last parameter, change char_type_node
2306 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2307 two operands.
2308 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2309 the inlining expansion on target where the type of the call has same or
2310 narrower precision than unsigned char.
2311
2312 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2313
2314 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2315 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2316 * common.opt (fsave-optimization-record): New option.
2317 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2318 * doc/invoke.texi (-fsave-optimization-record): New option.
2319 * dumpfile.c: Include "optinfo-emit-json.h".
2320 (struct kv_pair): Move to coretypes.h.
2321 (optgroup_options): Make non-static.
2322 (dump_context::end_scope): Call
2323 optimization_records_maybe_pop_dump_scope.
2324 * dumpfile.h (optgroup_options): New decl.
2325 * json.cc: New file.
2326 * json.h: New file.
2327 * optinfo-emit-json.cc: New file.
2328 * optinfo-emit-json.h: New file.
2329 * optinfo.cc: Include "optinfo-emit-json.h".
2330 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2331 (optinfo_enabled_p): Check optimization_records_enabled_p.
2332 (optinfo_wants_inlining_info_p): Likewise.
2333 * optinfo.h: Update comment.
2334 * profile-count.c (profile_quality_as_string): New function.
2335 * profile-count.h (profile_quality_as_string): New decl.
2336 (profile_count::quality): New accessor.
2337 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2338 and optinfo_emit_json_cc_tests.
2339 * selftest.h (selftest::json_cc_tests): New decl.
2340 (selftest::optinfo_emit_json_cc_tests): New decl.
2341 * toplev.c: Include "optinfo-emit-json.h".
2342 (compile_file): Call optimization_records_finish.
2343 (do_compile): Call optimization_records_start.
2344 * tree-ssa-live.c: Include optinfo.h.
2345 (remove_unused_scope_block_p): Retain inlining information if
2346 optinfo_wants_inlining_info_p returns true.
2347
2348 2018-07-20 Richard Biener <rguenther@suse.de>
2349
2350 PR debug/86585
2351 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2352 to cover -flto-partition=none.
2353
2354 2018-07-20 Martin Liska <mliska@suse.cz>
2355
2356 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2357 (get_decl_source_range): Remove unused function.
2358
2359 2018-07-20 Richard Biener <rguenther@suse.de>
2360
2361 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2362 (struct vn_phi_s): Likewise.
2363 (struct vn_reference_s): Likewise.
2364 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2365 for searching the slot of an entry known to be in the hash itself.
2366 (vn_phi_hasher::equal): Likewise.
2367 (vn_reference_hasher::equal): Likewise.
2368 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2369 globals.
2370 (optimistic_info, current_info): Remove, keeping only valid_info.
2371 (vn_reference_lookup_1): Remove fallback lookup.
2372 (vn_reference_lookup_2): Likewise.
2373 (vn_nary_op_lookup_1): Likewise.
2374 (vn_phi_lookup): Likewise.
2375 (vn_nary_build_or_lookup_1): Make sure to not chain the built
2376 hash element.
2377 (vn_reference_insert): Adjust, chain the inserted hash element
2378 at last_inserted_ref.
2379 (vn_reference_insert_pieces): Likewise.
2380 (visit_reference_op_call): Likewise.
2381 (vn_nary_op_insert_into): Chain the inserted hash element at
2382 last_inserted_nary.
2383 (vn_nary_op_insert_pieces): Adjust.
2384 (vn_nary_op_insert): Likewise.
2385 (vn_nary_op_insert_stmt): Likewise.
2386 (vn_phi_insert): Adjust, chain the inserted hash element at
2387 last_inserted_phi.
2388 (process_scc): Remove clearing and copying the optimistic
2389 table. Instead remove elements inserted during an optimistic
2390 iteration from the single table we maintain.
2391 (init_scc_vn): Adjust.
2392 (free_scc_vn): Likewise.
2393 (sccvn_dom_walker::record_cond): Likewise.
2394 (sccvn_dom_walker::after_dom_children): Likewise.
2395
2396 2018-07-19 Martin Sebor <msebor@redhat.com>
2397
2398 PR tree-optimization/84047
2399 PR tree-optimization/83776
2400 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2401 (check_array_bounds): Call it.
2402
2403 2018-07-19 Martin Sebor <msebor@redhat.com>
2404
2405 * align.h (align_flags): Use member initialization.
2406
2407 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2408
2409 * Makefile.in (OBJS): Add optinfo.o.
2410 * coretypes.h (class symtab_node): New forward decl.
2411 (struct cgraph_node): New forward decl.
2412 (class varpool_node): New forward decl.
2413 * dump-context.h: New file.
2414 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2415 "tree-pass.h".
2416 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2417 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2418 (set_alt_dump_file): Likewise.
2419 (dump_context::~dump_context): New dtor.
2420 (dump_gimple_stmt): Move implementation to...
2421 (dump_context::dump_gimple_stmt): ...this new member function.
2422 Add the stmt to any pending optinfo, creating one if need be.
2423 (dump_gimple_stmt_loc): Move implementation to...
2424 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2425 Start a new optinfo and add the stmt to it.
2426 (dump_gimple_expr): Move implementation to...
2427 (dump_context::dump_gimple_expr): ...this new member function.
2428 Add the stmt to any pending optinfo, creating one if need be.
2429 (dump_gimple_expr_loc): Move implementation to...
2430 (dump_context::dump_gimple_expr_loc): ...this new member function.
2431 Start a new optinfo and add the stmt to it.
2432 (dump_generic_expr): Move implementation to...
2433 (dump_context::dump_generic_expr): ...this new member function.
2434 Add the tree to any pending optinfo, creating one if need be.
2435 (dump_generic_expr_loc): Move implementation to...
2436 (dump_context::dump_generic_expr_loc): ...this new member
2437 function. Add the tree to any pending optinfo, creating one if
2438 need be.
2439 (dump_printf): Move implementation to...
2440 (dump_context::dump_printf_va): ...this new member function. Add
2441 the text to any pending optinfo, creating one if need be.
2442 (dump_printf_loc): Move implementation to...
2443 (dump_context::dump_printf_loc_va): ...this new member function.
2444 Start a new optinfo and add the stmt to it.
2445 (dump_dec): Move implementation to...
2446 (dump_context::dump_dec): ...this new member function. Add the
2447 value to any pending optinfo, creating one if need be.
2448 (dump_context::dump_symtab_node): New member function.
2449 (dump_context::get_scope_depth): New member function.
2450 (dump_context::begin_scope): New member function.
2451 (dump_context::end_scope): New member function.
2452 (dump_context::ensure_pending_optinfo): New member function.
2453 (dump_context::begin_next_optinfo): New member function.
2454 (dump_context::end_any_optinfo): New member function.
2455 (dump_context::s_current): New global.
2456 (dump_context::s_default): New global.
2457 (dump_scope_depth): Delete global.
2458 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2459 (dump_symtab_node): New function.
2460 (get_dump_scope_depth): Reimplement in terms of dump_context.
2461 (dump_begin_scope): Likewise.
2462 (dump_end_scope): Likewise.
2463 (selftest::temp_dump_context::temp_dump_context): New ctor.
2464 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2465 (selftest::verify_item): New function.
2466 (ASSERT_IS_TEXT): New macro.
2467 (ASSERT_IS_TREE): New macro.
2468 (ASSERT_IS_GIMPLE): New macro.
2469 (selftest::test_capture_of_dump_calls): New test.
2470 (selftest::dumpfile_c_tests): Call it.
2471 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2472 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2473 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2474 descriptive comment.
2475 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2476 (dump_node, dump_bb): Move these unrelated decls.
2477 (class dump_manager): Add leading comment.
2478 * optinfo.cc: New file.
2479 * optinfo.h: New file.
2480
2481 2018-07-19 Michael Collison <michael.collison@arm.com>
2482 Richard Henderson <rth@redhat.com>
2483
2484 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2485 (subti): Handle op1 zero.
2486 (subvti4, usub4ti4): New.
2487 (*sub<GPI>3_compare1_imm): New.
2488 (sub<GPI>3_carryinCV): New.
2489 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2490 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2491
2492 2018-07-19 Michael Collison <michael.collison@arm.com>
2493 Richard Henderson <rth@redhat.com>
2494
2495 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2496 (addti3): Create simpler code if low part is already known to be 0.
2497 (addvti4, uaddvti4): New.
2498 (*add<GPI>3_compareC_cconly_imm): New.
2499 (*add<GPI>3_compareC_cconly): New.
2500 (*add<GPI>3_compareC_imm): New.
2501 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2502 handle constants within this pattern..
2503 (*add<GPI>3_compareV_cconly_imm): New.
2504 (*add<GPI>3_compareV_cconly): New.
2505 (*add<GPI>3_compareV_imm): New.
2506 (add<GPI>3_compareV): New.
2507 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2508 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2509 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2510 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2511 with 'comparison' operator.
2512 (*add<GPI>3_compareV_cconly_imm): Ditto.
2513 (*add<GPI>3_compareV_cconly): Ditto.
2514 (*add<GPI>3_compareV_imm): Ditto.
2515 (add<GPI>3_compareV): Ditto.
2516 (add<mode>3_carryinC): Ditto.
2517 (*add<mode>3_carryinC_zero): Ditto.
2518 (*add<mode>3_carryinC): Ditto.
2519 (add<mode>3_carryinV): Ditto.
2520 (*add<mode>3_carryinV_zero): Ditto.
2521 (*add<mode>3_carryinV): Ditto.
2522
2523 2018-07-19 Michael Collison <michael.collison@arm.com>
2524 Richard Henderson <rth@redhat.com>
2525
2526 * config/aarch64/aarch64-modes.def (CC_V): New.
2527 * config/aarch64/aarch64-protos.h
2528 (aarch64_addti_scratch_regs): Declare
2529 (aarch64_subvti_scratch_regs): Declare.
2530 (aarch64_expand_subvti): Declare.
2531 (aarch64_gen_unlikely_cbranch): Declare
2532 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2533 for signed overflow using CC_Vmode.
2534 (aarch64_get_condition_code_1): Handle CC_Vmode.
2535 (aarch64_gen_unlikely_cbranch): New function.
2536 (aarch64_addti_scratch_regs): New function.
2537 (aarch64_subvti_scratch_regs): New function.
2538 (aarch64_expand_subvti): New function.
2539
2540 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2541
2542 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2543 extension.
2544 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2545 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2546 extension.
2547
2548 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2549
2550 PR target/83009
2551 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2552 address check not strict.
2553
2554 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2555
2556 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2557 Umq with Umn.
2558 (store_pair_lanes<mode>): Likewise.
2559 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2560 enum value 'ADDR_QUERY_LDP_STP_N'.
2561 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2562 (aarch64_print_address_internal): Add declaration.
2563 (aarch64_print_ldpstp_address): Remove.
2564 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2565 (aarch64_print_operand): Change printing of 'y'.
2566 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2567 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2568 'true' rather than '1'.
2569 * config/aarch64/constraints.md (Uml): Likewise.
2570 (Uml): Rename to Umn.
2571 (Umq): Remove.
2572
2573 2018-07-19 Richard Biener <rguenther@suse.de>
2574
2575 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2576 a trailing array.
2577 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2578 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2579 (vn_reference_hasher): Likewise.
2580 (struct vn_tables_s): Remove obstack and alloc-pool members.
2581 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2582 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2583 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2584 (vn_reference_insert_pieces): Likewise.
2585 (alloc_vn_nary_op_noinit): Adjust.
2586 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2587 (vn_phi_eq): Adjust.
2588 (shared_lookup_phiargs): Remove.
2589 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2590 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2591 (visit_reference_op_call): Likewise.
2592 (copy_nary, copy_phi, copy_reference): Remove.
2593 (process_scc): Rewind the obstack when iterating. Do not
2594 copy the elements to valid_info but just move them from one
2595 hashtable to the other.
2596 (allocate_vn_table): Adjust.
2597 (free_vn_table): Likewise.
2598 (init_scc_vn): Likewise.
2599 (free_scc_vn): Likewise.
2600
2601 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2602
2603 PR target/86560
2604 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2605 indirect_return as function type attribute.
2606 (ix86_attribute_table): Change indirect_return to function
2607 type attribute.
2608 * doc/extend.texi: Update indirect_return attribute.
2609
2610 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2611
2612 * wide-int.h (widest2_int): New.
2613 * gimple-fold.c (arith_overflowed_p): Use it.
2614 * tree.h (widest2_int_cst): New.
2615 * tree-vrp.c (wide_int_binop_overflow): Rename from
2616 vrp_int_const_binop.
2617 Rewrite to work on trees.
2618 (extract_range_from_multiplicative_op_1): Abstract code to...
2619 (wide_int_range_min_max): ...here.
2620 (wide_int_range_cross_product): ...and here.
2621 (extract_range_from_binary_expr_1): Abstract overflow code to...
2622 (wide_int_range_mult_wrapping): ...here.
2623 * tree-vrp.h (wide_int_range_cross_product): New.
2624 (wide_int_range_mult_wrapping): New.
2625
2626 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2627 Julia Koval <julia.koval@intel.com>
2628
2629 * config/i386/x86-tune-costs.h (skylake_memcpy,
2630 skylake_memset): Replace rep_prefix with unrolling for size 512.
2631
2632 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2633
2634 PR middle-end/86544
2635 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2636 in last stmt.
2637
2638 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2639
2640 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2641 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2642 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2643 previously known as "PowerPC AltiVec Built-in Functions". Move
2644 some material to new subsubsections "PowerPC AltiVec Built-in
2645 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2646 ISA 2.07".
2647 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2648 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2649 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2650 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2651
2652 2018-07-18 Richard Biener <rguenther@suse.de>
2653
2654 PR tree-optimization/86557
2655 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2656 EXACT_DIV_EXPR.
2657
2658 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2659
2660 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2661
2662 2018-07-17 Jeff Law <law@redhat.com>
2663
2664 * config/arm/arm.c (get_label_padding): Update for recent
2665 changes to label_to_alignment.
2666
2667 PR tree-optimization/86010
2668 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2669
2670 * config/mips/mips.c (vr4130_align_insns): Update for recent
2671 changes to label_to_alignment.
2672
2673 * config/frv/frv.c (frv_label_align): Update for recent changes
2674 to label_to_alignment.
2675
2676 * config/nios2/nios2.c (nios2_label_align): Update for recent
2677 changes which dropped ALIGN_LABELS_LOG.
2678
2679 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2680
2681 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2682 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2683
2684 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2685
2686 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2687 deprecated align_labels_log.
2688
2689 2018-07-17 Richard Biener <rguenther@suse.de>
2690
2691 PR lto/86456
2692 * dwarf2out.c (init_sections_and_labels): Always generate
2693 a debug_line_str_section for early LTO debug.
2694 (dwarf2out_finish): Reset debug_line_str_hash output early.
2695 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2696 with fat LTO part.
2697 (dwarf2out_early_finish): Output debug_line_str.
2698
2699 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2700
2701 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2702 index register on z196 or later.
2703
2704 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2705
2706 * config/s390/s390.c (s390_default_align): Set default function
2707 alignment to 16.
2708 (s390_override_options_after_change): Call s390_default align.
2709 (s390_option_override_internal): Call s390_default_align.
2710 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2711
2712 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2713
2714 PR middle-end/86542
2715 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2716 to _looptemp_ clauses, other than the first two.
2717
2718 2018-07-17 Martin Liska <mliska@suse.cz>
2719
2720 * opts.c: Do not enable OPT_falign_* for -Os.
2721
2722 2018-07-17 Martin Liska <mliska@suse.cz>
2723
2724 * align.h (MAX_CODE_ALIGN): New.
2725 (MAX_CODE_ALIGN_VALUE): New.
2726 * common/config/i386/i386-common.c (ix86_handle_option):
2727 (MAX_CODE_ALIGN): Moved to align.h.
2728 * final.c (MAX_CODE_ALIGN): Likewise.
2729 * opts.c (parse_and_check_align_values):
2730 (MAX_CODE_ALIGN): Likewise.
2731 (MAX_CODE_ALIGN_VALUE): Likewise.
2732
2733 2018-07-17 Martin Liska <mliska@suse.cz>
2734
2735 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2736 in order to fulfil coding style.
2737 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2738 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2739 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2740 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2741 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2742 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2743 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2744 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2745 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2746
2747 2018-07-17 Martin Liska <mliska@suse.cz>
2748
2749 * align.h: New file.
2750 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2751 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2752 align_flags of label_to_alignment.
2753 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2754 class.
2755 * config/m68k/m68k.c: Do not use removed align_labels_value and
2756 align_loops_value.
2757 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2758 (LOOP_ALIGN): Likewise.
2759 (LABEL_ALIGN): Likewise.
2760 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2761 Remove not used macro.
2762 (rs6000_loop_align): Change return type to align_flags.
2763 (rs6000_loop_align_max_skip): Remove.
2764 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2765 Change return type to align_flags.
2766 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2767 Remove not used macro.
2768 (rs6000_loop_align): Change return type to align_flags.
2769 (rs6000_loop_align_max_skip): Remove.
2770 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2771 * config/rx/rx-protos.h (rx_align_for_label): Make it
2772 static function.
2773 * config/rx/rx.c (rx_align_for_label): Change return type
2774 to align_flags.
2775 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2776 macro definitions.
2777 into align_flags class.
2778 (LABEL_ALIGN): Likewise.
2779 (LOOP_ALIGN): Likewise.
2780 * config/s390/s390.c (s390_label_align): Use align_flags
2781 class member.
2782 (s390_asm_output_function_label): Likewise.
2783 * config/sh/sh.c (sh_override_options_after_change):
2784 Use align_flags class directly without macros.
2785 (find_barrier): Likewise.
2786 (barrier_align): Likewise.
2787 (sh_loop_align): Likewise.
2788 * config/spu/spu.c (spu_option_override):
2789 Use align_flags_tuple::get_value instead of removed macros.
2790 (spu_sched_init): Likewise.
2791 * config/spu/spu.h (GTY): Likewise.
2792 * config/visium/visium.c (visium_option_override):
2793 Set "8" as default secondary alignment.
2794 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2795 in order to guarantee secondary alignment of 8.
2796 * coretypes.h: Include align.h header file.
2797 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2798 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2799 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2800 * doc/tm.texi.in: Likewise.
2801 * final.c (struct label_alignment): Remove not used structure.
2802 (LABEL_ALIGN): Change type to align_flags.
2803 (LOOP_ALIGN): Likewise.
2804 (JUMP_ALIGN): Likewise.
2805 (default_loop_align_max_skip): Remove.
2806 (default_label_align_max_skip): Likewise.
2807 (default_jump_align_max_skip): Likewise.
2808 (default_label_align_after_barrier_max_skip):
2809 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2810 (LABEL_TO_MAX_SKIP): Remove.
2811 (label_to_alignment): Return align_flags type instead of integer.
2812 (label_to_max_skip): Remove.
2813 (align_fuzz): Use align_flags type.
2814 (compute_alignments): Use align_flags type and use align_flags::max
2815 to combine multiple alignments.
2816 (grow_label_align): Grow vec instead of C array.
2817 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2818 (shorten_branches): Use align_flags type and use align_flags::max
2819 to combine multiple alignments.
2820 (final_scan_insn_1): Remove usage of secondary alignment that comes
2821 from label alignment, but instead use proper secondary alignment
2822 which is computed in grow_label_align.
2823 * flags.h (struct align_flags_tuple): Move to align.h.
2824 (struct align_flags): Likewise.
2825 (state_align_loops): Rename to align_loops.
2826 (state_align_jumps): Rename to align_jumps.
2827 (state_align_labels): Rename to align_labels.
2828 (state_align_functions): Rename to align_functions.
2829 (align_loops_log): Remove.
2830 (align_jumps_log): Remove.
2831 (align_labels_log): Remove.
2832 (align_functions_log): Remove.
2833 (align_loops_max_skip): Remove.
2834 (align_jumps_max_skip): Remove.
2835 (align_labels_max_skip): Remove.
2836 (align_functions_max_skip): Remove.
2837 (align_loops_value): Remove.
2838 (align_jumps_value): Remove.
2839 (align_labels_value): Remove.
2840 (align_functions_value): Remove.
2841 * output.h (label_to_alignment): Change return type to align_flags.
2842 (label_to_max_skip): Remove.
2843 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2844 jump_align_max_skip macros.
2845 * targhooks.h (default_loop_align_max_skip): Remove.
2846 (default_label_align_max_skip): Likewise.
2847 (default_jump_align_max_skip): Likewise.
2848 (default_label_align_after_barrier_max_skip): Remove.
2849 * toplev.c (read_log_maxskip): Use ::normalize function.
2850 (parse_N_M): Remove not used argument and also call ::normalize.
2851 (parse_alignment_opts): Do not pass unused arguments.
2852 * varasm.c (assemble_start_function): Use directly align_functions
2853 instead of removed macros.
2854 * system.h: Do not poison removed macros.
2855
2856 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2857
2858 PR middle-end/86539
2859 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2860 and cond temporaries don't have reference type if iterator has
2861 pointer type. For init use &for_pre_body instead of pre_p if
2862 for_pre_body is non-empty.
2863
2864 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2865
2866 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2867 double-double modes to SFmode directly directly.
2868 (trunc<mode>sf2_fprs): Delete.
2869
2870 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2871
2872 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2873 for conversions between IFmode and the decimal floating point modes.
2874 (init_float128_ieee): Use the correct names for conversions between
2875 KFmode and the decimal floating point modes.
2876
2877 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2878
2879 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2880 for the conversions between TDmode and IFmode.
2881 (init_float128_ieee): Use more correct names for the conversions
2882 between TDmode and KFmode.
2883
2884 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2885
2886 PR tree-optimization/86526
2887 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2888 (inline_expand_builtin_string_cmp): Likewise.
2889 (inline_string_cmp): Likewise. Use c_readstr instead of
2890 builtin_memcpy_read_str. Add unit_mode temporary.
2891
2892 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2893
2894 PR middle-end/86528
2895 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2896 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2897
2898 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2899
2900 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2901 Alphabetize prototypes of built-in functions, separating out
2902 built-in functions that are listed in this section but should be
2903 described elsewhere.
2904
2905 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2906
2907 PR target/86511
2908 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2909 conditional move when trapping comparison was split to a
2910 non-trapping one (and vice versa).
2911
2912 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2913
2914 * config/s390/s390.c (s390_function_profiler): Generate nops
2915 instead of profiler call sequences.
2916 * config/s390/s390.opt: Add the new option.
2917
2918 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2919
2920 * config/s390/s390.c (s390_function_profiler): Generate
2921 __mcount_loc section.
2922 * config/s390/s390.opt: Add the new option.
2923
2924 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2925
2926 * common.opt: Add the new warning.
2927 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2928 %r0,__fentry__" when -mfentry is specified.
2929 (s390_option_override_internal): Disallow -mfentry for 31-bit
2930 CPUs.
2931 * config/s390/s390.opt: Add the new option.
2932
2933 2018-07-16 Richard Biener <rguenther@suse.de>
2934
2935 PR lto/86523
2936 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2937 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2938
2939 2018-07-16 Martin Liska <mliska@suse.cz>
2940
2941 PR ipa/86529
2942 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2943 to ::get_create.
2944
2945 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2946
2947 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2948
2949 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2950
2951 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2952 for ARCHS4x.
2953 * config/arc/arc-cpus.def (hs4x): New cpu.
2954 (hs4xd): Likewise.
2955 * config/arc/arc-tables.opt: Regenerate.
2956 * config/arc/arc.c (arc_sched_issue_rate): New function.
2957 (TARGET_SCHED_ISSUE_RATE): Define.
2958 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2959 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2960 fpu_cvt.
2961 (attr tune): Add ARCHS4x tune values.
2962 (attr tune_dspmpy): Define.
2963 (*tst): Correct instruction type.
2964 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2965 * config/arc/arcHS4x.md: New file.
2966 * config/arc/fpu.md: Update instruction type attributes.
2967 * config/arc/t-multilib: Regenerate.
2968
2969 2018-07-16 Tom de Vries <tdevries@suse.de>
2970
2971 PR debug/86455
2972 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2973
2974 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2975
2976 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2977 early clobber.
2978
2979 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2980
2981 PR tree-optimization/86514
2982 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2983 conversion to a boolean type from a type with greater precision.
2984
2985 2018-07-16 Tom de Vries <tdevries@suse.de>
2986
2987 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2988 dump_flags request TDF_SLIM.
2989
2990 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2991
2992 * fold-const.c (int_const_binop_1): Abstract...
2993 (wide_int_binop): ...wide int code here.
2994 (poly_int_binop): ...poly int code here.
2995 Abstract the rest of int_const_binop_1 into int_const_binop.
2996 * fold-const.h (wide_int_binop): New.
2997 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2998 Remove useless PLUS/MINUS_EXPR case.
2999 (zero_nonzero_bits_from_vr): Move wide int code...
3000 (zero_nonzero_bits_from_bounds): ...here.
3001 (extract_range_from_binary_expr_1): Move mask optimization code...
3002 (range_easy_mask_min_max): ...here.
3003 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3004 (range_easy_mask_min_max): New.
3005
3006 2018-07-15 Jeff Law <law@redhat.com>
3007
3008 PR target/85993
3009 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3010 block.
3011
3012 2018-07-14 Jim Wilson <jimw@sifive.com>
3013
3014 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3015
3016 2018-07-14 Paul Koning <ni1d@arrl.net>
3017
3018 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3019
3020 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
3021
3022 * lto-streamer-out.c (copy_function_or_variable): Dump info about
3023 copying section.
3024
3025 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3026 Steve Munroe <munroesj52@gmail.com>
3027
3028 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3029 (_mm_andnot_si128): Likewise.
3030 (_mm_or_si128): Likewise.
3031 (_mm_xor_si128): Likewise.
3032
3033 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
3034
3035 PR middle-end/78809
3036 * builtins.c (expand_builtin_memcmp): Inline the calls first
3037 when result_eq is false.
3038 (expand_builtin_strcmp): Inline the calls first.
3039 (expand_builtin_strncmp): Likewise.
3040 (inline_string_cmp): New routine. Expand a string compare
3041 call by using a sequence of char comparison.
3042 (inline_expand_builtin_string_cmp): New routine. Inline expansion
3043 a call to str(n)cmp/memcmp.
3044 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3045 New option.
3046 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3047
3048 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
3049
3050 * config/arm/driver-arm.c: Include arm-native.h.
3051 (host_detect_local_cpu): Use auto-generated data tables.
3052 (vendors, arm_cpu_table): Delete. Move part information to ...
3053 * config/arm/arm-cpus.in: ... here.
3054 * config/arm/parsecpu.awk (gen_native): New function.
3055 (vendor, part): New CPU fields.
3056 (END): Add support for building the native CPU detection tables.
3057 * config/arm/t-arm (arm-native.h): Add build rule.
3058 (driver-arm.o): Add dependency on arm-native.h.
3059
3060 2018-07-13 Richard Biener <rguenther@suse.de>
3061
3062 PR middle-end/85974
3063 * match.pd (addr1 - addr2): Allow either of the operand to
3064 have a conversion.
3065
3066 2018-07-13 Tom de Vries <tdevries@suse.de>
3067
3068 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3069 in remap_ssa_name.
3070
3071 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
3072
3073 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3074 arrays instead of numbered variables.
3075
3076 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
3077
3078 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3079 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3080
3081 2018-07-13 Richard Biener <rguenther@suse.de>
3082
3083 PR debug/86452
3084 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3085 instead of get_context_die.
3086
3087 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
3088 Richard Biener <rguenther@suse.de>
3089
3090 PR middle-end/86489
3091 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3092 that the loop latch destination where phi is defined.
3093
3094 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
3095
3096 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3097 (riscv_expand_epilogue): Add assertion to check interrupt mode.
3098 (riscv_set_current_function): Extract getting interrupt type to new
3099 function.
3100 (riscv_get_interrupt_type): New function.
3101 (riscv_merge_decl_attributes): New function, checking interrupt type is
3102 same.
3103 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3104
3105 2018-07-12 Paul Koning <ni1d@arrl.net>
3106
3107 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3108 directive.
3109
3110 2018-07-12 Paul Koning <ni1d@arrl.net>
3111
3112 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3113 zero reference, add doloop_end instead.
3114 * doc/md.texi (decrement_and_branch_until_zero): Remove.
3115 (Looping patterns): Remove decrement_and_branch_until_zero. Add
3116 detail for doloop_end.
3117
3118 2018-07-12 Martin Sebor <msebor@redhat.com>
3119
3120 PR c/86453
3121 * attribs.c (decl_attributes): Reject conflicting attributes before
3122 calling attribute handlers.
3123
3124 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
3125
3126 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3127 parameter.
3128 (gcc::dump_manager::get_dump_file_name): likewise.
3129 (dump_begin): Likewise.
3130 * dumpfile.h (dump_begin): Update prototype.
3131 (gcc::dump_manager::get_dump_file_name,
3132 gcc::dump_manager::get_dump_file_name): Update prototype.
3133
3134 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3135
3136 * internal-fn.h (vectorizable_internal_fn_p): New function.
3137 * tree-vect-slp.c (compatible_calls_p): Likewise.
3138 (vect_build_slp_tree_1): Remove nops argument. Handle calls
3139 to internal functions.
3140 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3141
3142 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3143
3144 * fold-const.h (inverse_conditions_p): Declare.
3145 * fold-const.c (inverse_conditions_p): New function.
3146 * match.pd: Use inverse_conditions_p. Add folds of view_converts
3147 that test the inverse condition of a conditional internal function.
3148 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3149 * internal-fn.c (internal_fn_mask_index): Handle conditional
3150 internal functions.
3151 (vectorized_internal_fn_supported_p): New function.
3152 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3153 (any_pred_load_store): Replace with...
3154 (need_to_predicate): ...this new variable.
3155 (redundant_ssa_names): New variable.
3156 (ifcvt_can_use_mask_load_store): Move initial checks to...
3157 (ifcvt_can_predicate): ...this new function. Handle tree codes
3158 for which a conditional internal function exists.
3159 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3160 instead of ifcvt_can_use_mask_load_store. Update after variable
3161 name change.
3162 (predicate_load_or_store): New function, split out from
3163 predicate_mem_writes.
3164 (check_redundant_cond_expr): New function.
3165 (value_available_p): Likewise.
3166 (predicate_rhs_code): Likewise.
3167 (predicate_mem_writes): Rename to...
3168 (predicate_statements): ...this. Use predicate_load_or_store
3169 and predicate_rhs_code.
3170 (combine_blocks, tree_if_conversion): Update after above name changes.
3171 (ifcvt_local_dce): Handle redundant_ssa_names.
3172 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3173 general conditional functions.
3174 * tree-vect-stmts.c (vectorizable_call): Likewise.
3175
3176 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3177 Alan Hayward <alan.hayward@arm.com>
3178 David Sherwood <david.sherwood@arm.com>
3179
3180 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3181 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3182 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3183 plus and minus and convert them into IFN_COND_FMA-based sequences.
3184 (convert_mult_to_fma): Handle conditional plus and minus.
3185
3186 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3187
3188 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3189 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3190 (cond_fnms_optab): New optabs.
3191 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3192 internal functions.
3193 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3194 * internal-fn.h (get_conditional_internal_fn): Declare.
3195 (get_unconditional_internal_fn): Likewise.
3196 * internal-fn.c (cond_ternary_direct): New macro.
3197 (expand_cond_ternary_optab_fn): Likewise.
3198 (direct_cond_ternary_optab_supported_p): Likewise.
3199 (FOR_EACH_COND_FN_PAIR): Likewise.
3200 (get_conditional_internal_fn): New function.
3201 (get_unconditional_internal_fn): Likewise.
3202 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3203 (gimple_match_op::gimple_match_op): Add a new overload for 5
3204 operands.
3205 (gimple_match_op::set_op): Likewise.
3206 (gimple_resimplify5): Declare.
3207 * genmatch.c (decision_tree::gen): Generate simplifications for
3208 5 operands.
3209 * gimple-match-head.c (gimple_simplify): Define an overload for
3210 5 operands. Handle calls with 5 arguments in the top-level overload.
3211 (convert_conditional_op): Handle conversions from unconditional
3212 internal functions to conditional ones.
3213 (gimple_resimplify5): New function.
3214 (build_call_internal): Pass a fifth operand.
3215 (maybe_push_res_to_seq): Likewise.
3216 (try_conditional_simplification): Try converting conditional
3217 internal functions to unconditional internal functions.
3218 Handle 3-operand unconditional forms.
3219 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3220 Define ternary equivalents of the current rules for binary conditional
3221 internal functions.
3222 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3223 ternary operations.
3224 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3225 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3226 (optab): Handle them.
3227 (SVE_COND_FP_TERNARY): New int iterator.
3228 (sve_fmla_op, sve_fmad_op): New int attributes.
3229 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3230 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3231 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3232
3233 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3234
3235 * target.def (preferred_else_value): New target hook.
3236 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3237 * doc/tm.texi: Regenerate.
3238 * targhooks.h (default_preferred_else_value): Declare.
3239 * targhooks.c (default_preferred_else_value): New function.
3240 * internal-fn.h (conditional_internal_fn_code): Declare.
3241 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3242 (get_conditional_internal_fn): Use it.
3243 (conditional_internal_fn_code): New function.
3244 * gimple-match.h (gimple_match_cond): New struct.
3245 (gimple_match_op): Add a cond member function.
3246 (gimple_match_op::gimple_match_op): Update all forms to take a
3247 gimple_match_cond.
3248 * genmatch.c (expr::gen_transform): Use the same condition as res_op
3249 for the suboperation, but don't specify a particular else_value.
3250 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3251 (visit_nary_op, visit_reference_op_load): Pass
3252 gimple_match_cond::UNCOND to the gimple_match_op constructor.
3253 * gimple-match-head.c: Include tree-eh.h
3254 (convert_conditional_op): New function.
3255 (maybe_resimplify_conditional_op): Likewise.
3256 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3257 (gimple_resimplify2): Likewise.
3258 (gimple_resimplify3): Likewise.
3259 (gimple_resimplify4): Likewise.
3260 (maybe_push_res_to_seq): Return null for conditional operations.
3261 (try_conditional_simplification): New function.
3262 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
3263 constructor.
3264 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3265 IFN_COND_* call.
3266 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3267 function.
3268 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3269
3270 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
3271
3272 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3273 DECL_FCONTEXT
3274 (hash_tree): Do not hash DECL_FCONTEXT
3275 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3276 Do not stream DECL_FCONTEXT.
3277 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3278 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3279
3280 2018-07-12 Richard Biener <rguenther@suse.de>
3281
3282 PR debug/86462
3283 * dwarf2out.c (gen_block_die): Only output blocks when they have
3284 at least one !DECL_IGNORED_P variable.
3285
3286 2018-07-12 Richard Biener <rguenther@suse.de>
3287
3288 PR target/84829
3289 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3290 Remove -mieee-fp handling.
3291
3292 2018-07-12 Richard Biener <rguenther@suse.de>
3293
3294 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3295 left-over from last patch.
3296
3297 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3298
3299 PR tree-optimization/86492
3300 * gimple-ssa-store-merging.c
3301 (imm_store_chain_info::coalesce_immediate_stores): Call
3302 check_no_overlap even for the merge_overlapping case. Formatting fix.
3303
3304 2018-07-12 Richard Biener <rguenther@suse.de>
3305
3306 PR middle-end/86479
3307 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3308 move possibly trapping operations into the conditional.
3309
3310 2018-07-12 Richard Biener <rguenther@suse.de>
3311
3312 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3313 (vn_lookup_simplify_result): Remove recursion limit applied
3314 here.
3315 (vn_nary_build_or_lookup_1): Adjust.
3316 (try_to_simplify): Likewise.
3317 * gimple-match-head.c (gimple_resimplify1): Instead apply one
3318 here.
3319 (gimple_resimplify2): Likewise.
3320 (gimple_resimplify3): Likewise.
3321 (gimple_resimplify4): Likewise.
3322
3323 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3324
3325 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3326 Use __mmask64 type instead of __mmask8 for __M argument.
3327 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3328 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3329 __U argument.
3330 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3331 __mmask16 for __M argument.
3332 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3333 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3334 to __mmask16 instead of __mmask8.
3335 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3336 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3337 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3338 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3339 instead of __mmask16 for __U argument.
3340 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3341 __mmask16 instead of __mmask8 for __U argument.
3342 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3343 __U argument.
3344 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3345 __mmask16.
3346 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3347 argument.
3348 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3349 __U argument.
3350 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3351 __mmask16.
3352 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3353 of __mmask16.
3354 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3355 __U argument.
3356 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3357 __U argument.
3358 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3359 __U argument.
3360 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3361 __U argument.
3362 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3363 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3364 return type as well as __M argument type and all casts from __mmask8
3365 to __mmask32.
3366 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3367 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3368 return type as well as __M argument type and all casts from __mmask8
3369 to __mmask16.
3370 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3371 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3372 return type as well as __M argument type and all casts from __mmask8
3373 to __mmask32.
3374 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3375 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3376 return type as well as __M argument type and all casts from __mmask8
3377 to __mmask16.
3378 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3379 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3380 __mmask16.
3381
3382 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3383
3384 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3385 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3386 for __U argument.
3387
3388 2018-07-11 Paul Koning <ni1d@arrl.net>
3389
3390 * doc/md.texi (define_subst): Document how multiple occurrences of
3391 the same argument in the replacement pattern are handled.
3392
3393 2018-07-11 Paul Koning <ni1d@arrl.net>
3394
3395 * doc/extend.texi (Common Variable Attributes): Move "mode" into
3396 alphabetical order.
3397 (Common Type Attributes): Add "mode" attribute.
3398
3399 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
3400
3401 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3402 stream DECL_ORIGINAL_TYPE.
3403 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3404 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3405 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3406 Do not walk original type.
3407 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3408 external decls.
3409 (write_ts_decl_non_common_tree_pointers): Do not stream
3410 DECL_ORIGINAL_TYPE
3411 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3412 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3413
3414 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3415
3416 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3417 thread twice from the same starting edge.
3418
3419 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3420
3421 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3422 * gimple.c (gimple_call_nonnull_result_p): ...here...
3423 (gimple_call_nonnull_arg): ...and here.
3424 * gimple.h (gimple_call_nonnull_result_p): New.
3425 (gimple_call_nonnull_arg): New.
3426
3427 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3428
3429 * config/arm/arm-cpus.in: Move information from fpu field of each
3430 cpu definition to the isa field.
3431 * config/arm/parsecpu.awk (fpu): Delete match rule.
3432 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3433
3434 2018-07-11 Richard Biener <rguenther@suse.de>
3435
3436 PR debug/86457
3437 * dwarf2out.c (init_sections_and_labels): Use
3438 output_asm_line_debug_info consistently.
3439 (dwarf2out_early_finish): Likewise.
3440 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3441 type units.
3442
3443 2018-07-11 Richard Biener <rguenther@suse.de>
3444
3445 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3446 Rework father_bb setting in a way to avoid propagating constants
3447 multiple times on a loop body.
3448
3449 2018-07-10 Mark Wielaard <mark@klomp.org>
3450
3451 PR debug/86459
3452 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3453
3454 2018-07-10 Richard Biener <rguenther@suse.de>
3455
3456 * hash-map.h (hash_map::iterator::operator*): Return
3457 references to key and value.
3458
3459 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3460
3461 PR c++/86443
3462 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3463 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3464 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3465 (gimplify_omp_for): For composite loops, move outer
3466 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3467 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3468 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3469 TREE_LIST for both the original class iterator and the "last" helper
3470 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3471 loop, remember has_decl_expr from outer composite loops for the
3472 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3473
3474 2018-07-09 Martin Sebor <msebor@redhat.com>
3475
3476 PR middle-end/77357
3477 PR middle-end/86428
3478 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3479 accessing implicitly initialized array elements.
3480 * expr.c (string_constant): Handle string initializers of
3481 character arrays within aggregates.
3482 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3483 Store element offset. As a special case, handle zero size.
3484 (fold_nonarray_ctor_reference): Same.
3485 (fold_ctor_reference): Add argument. Store subobject offset.
3486 * gimple-fold.h (fold_ctor_reference): Add argument.
3487
3488 2018-07-09 Paul Koning <ni1d@arrl.net>
3489
3490 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3491 (pdp11_insn_cost): New function.
3492 (pdp11_md_asm_adjust): New function.
3493 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3494 (pdp11_rtx_costs): Update to match machine better.
3495 (output_addr_const_pdp11): Correct format mismatch warnings.
3496 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3497 * config/pdp11/pdp11.md: General change to add base_cost and/or
3498 length attributes for use by new pdp11_insn_cost function.
3499 (MIN_BRANCH): Correct definition.
3500 (MIN_SOB): Ditto.
3501 (doloop_end): Use standard pattern name for looping pattern.
3502 (doloop_end_nocc): New.
3503 (movsf): Add another constraint alternative.
3504 (zero_extendqihi2): Add constraint alternatives for not in place
3505 extend.
3506 (zero_extendhisi2): Remove.
3507 (shift patterns): Add CC handling variants.
3508 (bswaphi2): New.
3509 (bswapsi2): New.
3510 (rothi3): New.
3511 (define_peephole2): New peephole to recognize mov that sets CC for
3512 subsequent test.
3513
3514 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3515
3516 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3517 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3518 wi::add.
3519
3520 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3521
3522 PR c/86420
3523 * real.c (real_nextafter): Return true if result is denormal.
3524
3525 2018-07-09 Martin Liska <mliska@suse.cz>
3526
3527 * common.opt: Add back wrongly removed attribute.
3528
3529 2018-07-09 Richard Biener <rguenther@suse.de>
3530
3531 PR debug/86413
3532 * dwarf2out.c (gen_block_die): For an early generated DIE
3533 always output high/low PC attributes.
3534
3535 2018-07-09 Tom de Vries <tdevries@suse.de>
3536
3537 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3538 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3539 onto VAR_DECL with abstract origin.
3540
3541 2018-07-07 Jim Wilson <jimw@sifive.com>
3542
3543 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3544
3545 2018-07-07 Tom de Vries <tdevries@suse.de>
3546
3547 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3548
3549 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3550
3551 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3552 overflow_type.
3553 (combine_bound): Use wide-int overflow calculation instead of
3554 rolling our own.
3555 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3556 overflow_type.
3557 * fold-const.c (int_const_binop_2): Same.
3558 (extract_muldiv_1): Same.
3559 (fold_div_compare): Same.
3560 (fold_abs_const): Same.
3561 * match.pd: Same.
3562 * poly-int.h (add): Same.
3563 (sub): Same.
3564 (neg): Same.
3565 (mul): Same.
3566 * predict.c (predict_iv_comparison): Same.
3567 * profile-count.c (slow_safe_scale_64bit): Same.
3568 * simplify-rtx.c (simplify_const_binary_operation): Same.
3569 * tree-chrec.c (tree_fold_binomial): Same.
3570 * tree-data-ref.c (split_constant_offset_1): Same.
3571 * tree-if-conv.c (idx_within_array_bound): Same.
3572 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3573 * tree-ssa-phiopt.c (minmax_replacement): Same.
3574 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3575 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3576 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3577 * wide-int.cc (wi::add_large): Same.
3578 (wi::mul_internal): Same.
3579 (wi::sub_large): Same.
3580 (wi::divmod_internal): Same.
3581 * wide-int.h: Change overflow type to overflow_type for neg, add,
3582 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3583 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3584 mul_internal, divmod_internal.
3585 (overflow_type): New enum.
3586 (accumulate_overflow): New.
3587
3588 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3589
3590 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3591 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3592
3593 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3594
3595 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3596 argument is checked for zero before entering loop, avoid checking again.
3597
3598 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3599
3600 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3601 * gimplify.h (generic_expr_could_trap_p): Likwise.
3602 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3603
3604 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR tree-optimization/86401
3607 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3608 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3609 (fold_bit_and_mask): ... here. New helper function for match.pd.
3610 * fold-const.h (fold_bit_and_mask): Declare.
3611 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3612
3613 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3614
3615 PR target/86324
3616 * target.def (translate_mode_attribute): New hook.
3617 * targhooks.h (default_translate_mode_attribute): Declare.
3618 * targhooks.c (default_translate_mode_attribute): New function.
3619 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3620 * doc/tm.texi: Regenerate.
3621 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3622 (rs6000_translate_mode_attribute): New function.
3623
3624 2018-07-06 Paul Koning <ni1d@arrl.net>
3625
3626 * doc/md.texi (define_split): Document DONE and FAIL.
3627 (define_peephole2): Ditto.
3628
3629 2018-07-05 Jeff Law <law@redhat.com>
3630
3631 PR tree-optimization/86010
3632 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3633 both the head and tail of mem* and str* calls.
3634
3635 2018-07-05 Jim Wilson <jimw@sifive.com>
3636
3637 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3638
3639 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3640
3641 * config/aarch64/aarch64-simd.md: correct flags text for
3642 MIN_EXPR replacement.
3643
3644 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3645
3646 * configure: Regenerated.
3647
3648 2018-07-05 Carl Love <cel@us.ibm.com>
3649
3650 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3651 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3652 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3653 VSX_BUILTIN_DOUBLEL_V4SF.
3654
3655 2018-07-05 Martin Sebor <msebor@redhat.com>
3656
3657 PR c++/86400
3658 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3659 than its domain to compute its the upper bound of a char array.
3660
3661 2018-07-05 Nathan Sidwell <nathan@acm.org>
3662
3663 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3664 * doc/cpp.texi: Update comment.
3665 * doc/tm.texi: Rebuilt.
3666 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3667 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3668 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3669 headers affected by extern "C".
3670 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3671 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3672 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3673 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3674 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3675 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3676 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3677 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3678 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3679 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3680 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3681 config/sparc/sp64-elf.h, config/spu/spu.h,
3682 config/stormy16/stormy16.h, config/v850/v850.h,
3683 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3684 define NO_IMPLICIT_EXTERN_C.
3685 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3686
3687 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3688
3689 PR target/84711
3690 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3691 instead of GET_MODE_SIZE when comparing Units.
3692
3693 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3694
3695 PR target/84711
3696 * rtlanal.c (set_noop_p): Constrain on mode change,
3697 include hard-reg-set.h
3698
3699 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3700
3701 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3702
3703 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3704
3705 Revert
3706 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3707
3708 PR sanitizer/84250
3709 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3710 libasan.
3711 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3712
3713 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3714
3715 PR sanitizer/84250
3716 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3717 libasan.
3718 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3719
3720 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3721
3722 PR middle-end/86380
3723 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3724
3725 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3726
3727 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3728 neg_*_op* variables.
3729
3730 2018-07-04 Martin Liska <mliska@suse.cz>
3731
3732 * tree-switch-conversion.c: Define
3733 max_ratio_for_speed and max_ratio_for_size constants.
3734
3735 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3736 Martin Liska <mliska@suse.cz>
3737
3738 PR middle-end/66240
3739 PR target/45996
3740 PR c/84100
3741 * common.opt: Rename align options with 'str_' prefix.
3742 * common/config/i386/i386-common.c (set_malign_value): New
3743 function.
3744 (ix86_handle_option): Use it to set -falign-* options/
3745 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3746 type from int to string.
3747 * config/aarch64/aarch64.c: Update default values from int
3748 to string.
3749 * config/alpha/alpha.c (alpha_override_options_after_change):
3750 Likewise.
3751 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3752 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3753 max skip conditionally.
3754 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3755 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3756 max skip conditionally.
3757 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3758 max skip conditionally.
3759 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3760 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3761 max skip conditionally.
3762 * config/i386/i386.c (struct ptt): Change type from int to
3763 string.
3764 (ix86_default_align): Set default values.
3765 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3766 max skip conditionally.
3767 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3768 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3769 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3770 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3771 max skip conditionally.
3772 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3773 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3774 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3775 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3776 max skip conditionally.
3777 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3778 * config/ia64/ia64.c (ia64_option_override): Set default values
3779 for alignment options.
3780 * config/m68k/m68k.c: Handle new str_align_* options.
3781 * config/mips/mips.c (mips_set_compression_mode): Change
3782 type of constants.
3783 (mips_option_override): Set default values for options.
3784 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3785 Likewise.
3786 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3787 Likewise.
3788 * config/rx/rx.c (rx_option_override): Likewise.
3789 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3790 (LABEL_ALIGN): Use align_labels_log.
3791 (LOOP_ALIGN): Use align_loops_align.
3792 * config/s390/s390.c (s390_asm_output_function_label): Use new
3793 macros.
3794 * config/sh/sh.c (sh_override_options_after_change):
3795 Change type of constants.
3796 * config/spu/spu.c (spu_sched_init): Likewise.
3797 * config/sparc/sparc.c (sparc_option_override): Set default
3798 values for options.
3799 * config/visium/visium.c (visium_option_override): Likewise.
3800 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3801 emit p2align format with last argument if it's not needed.
3802 * doc/invoke.texi: Document extended format of -falign-*.
3803 * final.c: Use align_labels alignment.
3804 * flags.h (struct target_flag_state): Change type to use
3805 align_flags.
3806 (struct align_flags_tuple): New.
3807 (struct align_flags): Likewise.
3808 (align_loops_log): Redefine macro to use new types.
3809 (align_loops_max_skip): Redefine macro to use new types.
3810 (align_jumps_log): Redefine macro to use new types.
3811 (align_jumps_max_skip): Redefine macro to use new types.
3812 (align_labels_log): Redefine macro to use new types.
3813 (align_labels_max_skip): Redefine macro to use new types.
3814 (align_functions_log): Redefine macro to use new types.
3815 (align_loops): Redefine macro to use new types.
3816 (align_jumps): Redefine macro to use new types.
3817 (align_labels): Redefine macro to use new types.
3818 (align_functions): Redefine macro to use new types.
3819 (align_functions_max_skip): Redefine macro to use new types.
3820 (align_loops_value): New macro.
3821 (align_jumps_value): New macro.
3822 (align_labels_value): New macro.
3823 (align_functions_value): New macro.
3824 * function.c (invoke_set_current_function_hook): Propagate
3825 alignment values from flags to global variables default in
3826 topleev.h.
3827 * ipa-icf.c (sem_function::equals_wpa): Use
3828 cl_optimization_option_eq instead of memcmp.
3829 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3830 of string types.
3831 (cl_optimization_stream_in): Likewise.
3832 * optc-save-gen.awk: Support strings in cl_optimization.
3833 * opth-gen.awk: Likewise.
3834 * opts.c (finish_options): Remove error checking of invalid
3835 value ranges.
3836 (MAX_CODE_ALIGN): Remove.
3837 (MAX_CODE_ALIGN_VALUE): Likewise.
3838 (parse_and_check_align_values): New function.
3839 (check_alignment_argument): Likewise.
3840 (common_handle_option): Use check_alignment_argument.
3841 * opts.h (parse_and_check_align_values): Declare.
3842 * toplev.c (init_alignments): Remove.
3843 (read_log_maxskip): New.
3844 (parse_N_M): Likewise.
3845 (parse_alignment_opts): Likewise.
3846 (backend_init_target): Remove usage of init_alignments.
3847 * toplev.h (parse_alignment_opts): Declare.
3848 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3849 argument.
3850 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3851 * tree.c (cl_option_hasher::equal): New.
3852 * varasm.c: Use new global macros.
3853
3854 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3855
3856 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3857 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3858 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3859 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3860 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3861 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3862 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3863 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3864 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3865 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3866 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3867 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3868 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3869
3870 2018-07-04 Martin Liska <mliska@suse.cz>
3871 Jonathan Wakely <jwakely@redhat.com>
3872
3873 * coverage.c: Use correct type.
3874 * doc/invoke.texi: Language correction.
3875
3876 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3877
3878 PR target/85620
3879 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3880 ENDBRANCH for non-tail call which may return via indirect branch.
3881 * doc/extend.texi: Document indirect_return attribute.
3882
3883 2018-07-03 Martin Sebor <msebor@redhat.com>
3884
3885 PR tree-optimization/86274
3886 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3887 precondition.
3888 (format_floating): Correct handling of infinities and NaNs.
3889
3890 2018-07-03 Martin Sebor <msebor@redhat.com>
3891
3892 * print-tree.c (print_real_cst): New function.
3893 (print_node_brief): Call it.
3894 (print_node): Ditto.
3895
3896 2018-07-03 Jeff Law <law@redhat.com>
3897
3898 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3899 into a single pattern.
3900
3901 * config/h8300/h8300.md (ors code_iterator): New.
3902 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3903 a single pattern and single splitter.
3904 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3905 (iorqi3_1, xorqi3_1): Likewise.
3906 (iorqi3, xorqi3 expanders): Similarly.
3907
3908 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3909 (movmd_internal) into a single pattern using the P mode iterator.
3910 (movmd splitters): Similarly.
3911 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3912 (movsd splitters): Similarly.
3913
3914 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3915 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3916 right table based on the size of the operand.
3917 * config/h8300/h8300.md (length_table): Corresponding changes. All
3918 references to "addb", "addw" and "addl" changed to "add".
3919 (btst patterns): Merge two variants into a single pattern.
3920 (tstqi, tsthi): Likewise.
3921 (addhi3_incdec, addsi3_incdec): Likewise.
3922 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3923 (mulhi3, mulsi3): Likewise.
3924 (udivhi3, udivsi3): Likewise.
3925 (divhi3, divsi3): Likewise.
3926 (andorqi3, andorhi3, andorsi3): Likewise.
3927
3928 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3929
3930 PR target/85694
3931 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3932 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3933
3934 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3935
3936 PR tree-optimization/85694
3937 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3938 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3939 UNSPEC_URHADD.
3940 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3941 (<u>avg<mode>3_ceil): New patterns.
3942
3943 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3944
3945 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3946 scan-tree-dump directive.
3947 * gcc.dg/vect/slp-perm-2.c: Likewise.
3948 * gcc.dg/vect/slp-perm-3.c: Likewise.
3949 * gcc.dg/vect/slp-perm-5.c: Likewise.
3950 * gcc.dg/vect/slp-perm-6.c: Likewise.
3951 * gcc.dg/vect/slp-perm-7.c: Likewise.
3952 * gcc.dg/vect/slp-perm-8.c: Likewise.
3953
3954 2018-07-03 Marek Polacek <polacek@redhat.com>
3955
3956 PR middle-end/86202
3957 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3958
3959 2018-07-03 Richard Biener <rguenther@suse.de>
3960
3961 PR ipa/86389
3962 * tree-ssa-structalias.c (find_func_clobbers): Properly
3963 handle indirect calls.
3964
3965 2018-07-03 Jeff Law <law@redhat.com>
3966
3967 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3968 (shifts): New code iterator.
3969 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3970 expander. Fix HImode handling on H8/SX.
3971 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3972 (subqi3, subhi3, subsi3 expanders): Likewise.
3973 (andqi3, andhi3, andsi3 expanders): Likewise.
3974 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3975 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3976 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3977 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3978 (zero_extendqihi2, zero_extendqisi2): Likewise.
3979 (extendqihi2, extendqisi2): Likewise.
3980 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3981 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3982 (rotlqi3_1, rotlhi3_1): Likewise.
3983 (logicalhi3_sn, logicalsi3_sn): Likewise.
3984 (logicalhi3, logicalsi3): Likewise.
3985
3986 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3987
3988 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3989 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3990 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3991 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3992 type to append_pattern_def_seq instead of creating a stmt_vec_info
3993 directly.
3994 (build_mask_conversion): Likewise. Remove vinfo argument.
3995 (vect_add_conversion_to_patterm): Likewise, renaming to...
3996 (vect_add_conversion_to_pattern): ...this.
3997 (vect_recog_mask_conversion_pattern): Update call to
3998 build_mask_conversion. Pass the vector type to
3999 append_pattern_def_seq here too.
4000 (vect_recog_gather_scatter_pattern): Update call to
4001 vect_add_conversion_to_pattern.
4002
4003 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4004
4005 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4006 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4007 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4008 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4009 STMT_VINFO_PATTERN_DEF_SEQ to null here.
4010 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4011 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4012 append_pattern_def_seq instead of new_pattern_def_seq.
4013 (vect_recog_divmod_pattern): Do both of the above.
4014 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4015 is null.
4016
4017 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4018
4019 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4020 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4021 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4022 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4023 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4024 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4025 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4026 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4027 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4028 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4029 parameter with a single stmt_vec_info.
4030 (vect_recog_func_ptr): Likewise.
4031 (vect_recog_gather_scatter_pattern): Likewise, folding in...
4032 (vect_try_gather_scatter_pattern): ...this.
4033 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4034 the stmt_vec_info of the statement to be matched. Don't clear
4035 STMT_VINFO_RELATED_STMT.
4036 (vect_pattern_recog): Update call accordingly.
4037
4038 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4039
4040 PR tree-optimization/85694
4041 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4042 (uavgM3_ceil): Document new optabs.
4043 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4044 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4045 functions.
4046 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4047 (savg_ceil_optab): New optabs.
4048 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4049 (vect_vect_recog_func_ptrs): Add it.
4050 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4051 constant directly from the associated lhs.
4052
4053 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4054
4055 * tree-vect-patterns.c (vect_split_statement): New function.
4056 (vect_convert_input): Use it to try to split an existing cast.
4057
4058 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4059
4060 * poly-int.h (print_hex): New function.
4061 * dumpfile.h (dump_dec, dump_hex): Declare.
4062 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4063 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4064 min_input_precision, operation_precision and operation_sign.
4065 * tree-vect-patterns.c (vect_get_range_info): New function.
4066 (vect_same_loop_or_bb_p, vect_single_imm_use)
4067 (vect_operation_fits_smaller_type): Delete.
4068 (vect_look_through_possible_promotion): Add an optional
4069 single_use_p parameter.
4070 (vect_recog_over_widening_pattern): Rewrite to use new
4071 stmt_vec_info infomration. Handle one operation at a time.
4072 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4073 (vect_truncatable_operation_p, vect_set_operation_type)
4074 (vect_set_min_input_precision): New functions.
4075 (vect_determine_min_output_precision_1): Likewise.
4076 (vect_determine_min_output_precision): Likewise.
4077 (vect_determine_precisions_from_range): Likewise.
4078 (vect_determine_precisions_from_users): Likewise.
4079 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4080 (vect_vect_recog_func_ptrs): Put over_widening first.
4081 Add cast_forwprop.
4082 (vect_pattern_recog): Call vect_determine_precisions.
4083
4084 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4085
4086 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4087 statements that have been replaced by further pattern statements.
4088 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4089
4090 2018-07-03 Richard Biener <rguenther@suse.de>
4091
4092 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4093 always set *dt. Dump vectype in vectype overload.
4094 * dumpfile.h (dump_gimple_expr): New function.
4095 (dump_gimple_expr_loc): Likewise.
4096 * dumpfile.c (dump_gimple_expr): New function.
4097 (dump_gimple_expr_loc): Likewise.
4098
4099 2018-07-02 Jeff Law <law@redhat.com>
4100
4101 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4102 the H8/300, H8/300H and H8/S variants into a single pattern.
4103 (movhi_h8300, movqi_h8300hs): Similarly.
4104 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4105 (QHI mode iterator): New.
4106
4107 * config/h8300/h8300.md: Remove trailing whitespace.
4108
4109 2018-07-02 Jim Wilson <jimw@sifive.com>
4110
4111 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4112 instead of emit_insn for interrupt returns.
4113 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4114 (riscv_sret, riscv_uret): Likewise.
4115
4116 2018-07-02 David Malcolm <dmalcolm@redhat.com>
4117
4118 * pretty-print.c (selftest::test_pp_format): Move save and restore
4119 of quotes to class auto_fix_quotes, and add an instance.
4120 * selftest.c: Include "intl.h".
4121 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4122 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4123 * selftest.h (selftest::auto_fix_quotes): New class.
4124
4125 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
4126
4127 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4128 (aarch64_sve_prepare_conditional_op): Remove.
4129 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4130 Allow aarch64_simd_reg_or_zero as select operand; remove
4131 the aarch64_sve_prepare_conditional_op call.
4132 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4133 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4134 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4135 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4136 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4137 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4138 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4139 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4140 and a splitters to match all of the *_any patterns.
4141 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4142
4143 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4144 (SVE_COND_FP_BINARY_REV): Remove.
4145 (sve_int_op_rev, sve_fp_op_rev): New.
4146 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4147 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4148 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4149 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4150 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4151 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4152 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4153 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4154 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4155
4156 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4157 Remove match_dup 1 from the inner unspec.
4158 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4159
4160 * config/aarch64/aarch64.md (movprfx): New attr.
4161 (length): Default movprfx to 8.
4162 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4163 (*madd<SVE_I>, *msub<SVE_I): Likewise.
4164 (*<su>mul<SVE_I>3_highpart): Likewise.
4165 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4166 (*v<ASHIFT><SVE_I>3): Likewise.
4167 (*<su><MAXMIN><SVE_I>3): Likewise.
4168 (*<su><MAXMIN><SVE_F>3): Likewise.
4169 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4170 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4171 (*div<SVE_F>4): Likewise.
4172
4173 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
4174
4175 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4176 in dump string.
4177
4178 2018-07-02 Richard Biener <rguenther@suse.de>
4179
4180 PR tree-optimization/86363
4181 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4182 memset argument refers to a non-variable address.
4183
4184 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
4185
4186 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4187 {PLUS,MINUS}_EXPR code to...
4188 (adjust_symbolic_bound): ...here,
4189 (combine_bound): ...here,
4190 (set_value_range_with_overflow): ...and here.
4191
4192 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
4193
4194 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4195 code...
4196 (extract_range_from_abs_expr): ...here.
4197
4198 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
4199
4200 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4201 -fno-omit-frame-pointer when not optimizing.
4202
4203 2018-07-02 Martin Liska <mliska@suse.cz>
4204
4205 PR ipa/86279
4206 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4207 (propagate_nothrow): Likewise.
4208
4209 2018-07-02 Martin Liska <mliska@suse.cz>
4210
4211 PR ipa/86323
4212 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4213
4214 2018-07-02 David Malcolm <dmalcolm@redhat.com>
4215
4216 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4217 function in r262149, changing "loc" param from source_location to
4218 const dump_location_t &.
4219 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4220 declaration, as above.
4221
4222 2018-07-01 Paul Koning <ni1d@arrl.net>
4223
4224 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4225 -munit-asm, -mgnu-asm, -mdec-asm.
4226 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4227 (pdp11_output_labelref): New.
4228 (pdp11_output_def): New.
4229 (pdp11_output_addr_vec_elt): New.
4230 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
4231 %# and %@ format codes.
4232 (pdp11_option_override): New.
4233 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4234 (pdp11_output_ident): New.
4235 (pdp11_asm_named_section): New.
4236 (pdp11_asm_init_sections): New.
4237 (pdp11_file_start): New.
4238 (pdp11_file_end): New.
4239 (output_ascii): Use .ascii/.asciz for -mdec-asm.
4240 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
4241 %o, like %c but octal.
4242 (pdp11_option_override): New.
4243 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4244 -mdec-asm.
4245 (DATA_SECTION_ASM_OP): Ditto.
4246 (READONLY_DATA_SECTION_ASM_OP): New.
4247 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4248 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4249 (ASM_OUTPUT_LABELREF): Ditto.
4250 (ASM_OUTPUT_DEF): Ditto.
4251 (ASM_OUTPUT_EXTERNAL): New.
4252 (ASM_OUTPUT_SOURCE_FILENAME): New.
4253 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4254 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4255 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
4256 %# and %@ format codes.
4257 * config/pdp11/pdp11.opt (mgnu-asm): New.
4258 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4259 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4260 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4261
4262 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
4263
4264 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4265 dereferencing path[] beyond its length.
4266 (debug_path): New.
4267 (debug_all_paths): New.
4268 (rewire_first_differing_edge): New.
4269 (adjust_paths_after_duplication): New.
4270 (duplicate_thread_path): Call adjust_paths_after_duplication.
4271 Add new argument.
4272 (thread_through_all_blocks): Add new argument to
4273 duplicate_thread_path.
4274
4275 2018-06-30 Jim Wilson <jimw@sifive.com>
4276
4277 * config/riscv/predicates.md (p2m1_shift_operand): New.
4278 (high_mask_shift_operand): New.
4279 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4280 pattern using p2m1_shift_operand.
4281 (lshsi3_zero_extend_3+2): New combiner pattern using
4282 high_mask_shift_operand.
4283
4284 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4285
4286 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4287 split out from...
4288 (vect_recog_rotate_pattern): ...here.
4289 (vect_convert_input): Try to insert casts of invariants in the
4290 preheader.
4291 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4292 preheader to be empty.
4293
4294 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4295
4296 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4297 vector type. If given, install it in the new statement's
4298 STMT_VINFO_VECTYPE.
4299 (vect_element_precision): New function.
4300 (vect_unpromoted_value): New struct.
4301 (vect_unpromoted_value::vect_unpromoted_value): New function.
4302 (vect_unpromoted_value::set_op): Likewise.
4303 (vect_look_through_possible_promotion): Likewise.
4304 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4305 (vect_widened_op_tree, vect_convert_input): Likewise.
4306 (vect_convert_inputs, vect_convert_output): Likewise.
4307 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4308 to handle the optional cast of the multiplication result and
4309 vect_widened_op_tree to detect the widened multiplication itself.
4310 Do not require the input and output of promotion casts to have
4311 the same sign, but base the signedness of the operation on the
4312 input rather than the result. If the pattern includes two
4313 promotions, check that those promotions have the same sign.
4314 Do not restrict the MULT_EXPR handling to a double-width result;
4315 handle quadruple-width results and wider. Use vect_convert_inputs
4316 to convert the inputs to the common type.
4317 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
4318 to handle the optional cast of the ABS result. Also allow a sign
4319 change or a sign extension between the ABS and MINUS.
4320 Use vect_widened_op_tree to detect the widened subtraction and use
4321 vect_convert_inputs to convert the inputs to the common type.
4322 (vect_handle_widen_op_by_const): Delete.
4323 (vect_recog_widen_op_pattern): New function.
4324 (vect_recog_widen_mult_pattern): Use it.
4325 (vect_recog_widen_shift_pattern): Likewise.
4326 (vect_recog_widen_sum_pattern): Use
4327 vect_look_through_possible_promotion to handle the promoted
4328 PLUS_EXPR operand.
4329
4330 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4331
4332 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4333 the containing gimple_seq *.
4334 * gimple-iterator.h (gsi_for_stmt): Declare it.
4335 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4336 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4337 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4338 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4339 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4340 checks.
4341 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4342 split out from...
4343 (vect_mark_pattern_stmts): ...here. Handle cases in which the
4344 statement being replaced is part of an existing pattern
4345 definition sequence, inserting the new pattern statements before
4346 the original one.
4347 (vect_pattern_recog_1): Don't return a bool. If the statement
4348 is already part of a pattern, instead apply pattern matching
4349 to the pattern definition statements. Don't clear the
4350 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4351 (vect_pattern_recog): Don't break after the first match;
4352 continue processing the pattern definition statements instead.
4353 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4354
4355 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4356
4357 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4358 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4359 (vect_recog_widen_sum_pattern): Use it.
4360
4361 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4362
4363 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4364 phi is not a pattern statement and has not been replaced by
4365 a pattern statement.
4366 * tree-vect-patterns.c (type_conversion_p): Don't check
4367 STMT_VINFO_IN_PATTERN_P.
4368 (vect_recog_vector_vector_shift_pattern): Likewise.
4369 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4370 the pattern statement rather than the original statement; check
4371 directly for a WIDEN_MULT_EXPR here.
4372 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4373 vect_is_simple_use to return the pattern statement rather
4374 than the original statement; use is_pattern_stmt_p to check
4375 for such a pattern statement.
4376 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4377 to return the pattern statement rather than the original statement;
4378 don't do the same transformation here.
4379 (vect_is_simple_use): If the defining statement has been replaced
4380 by a pattern statement, return the pattern statement instead.
4381 Remove the corresponding (local) transformation from the vectype
4382 overload.
4383
4384 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4385
4386 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4387 end and default to null.
4388 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4389 (vectorizable_reduction): Update calls accordingly, dropping the
4390 gimple ** argument if the passed-back statement isn't needed.
4391 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4392 (vect_recog_rotate_pattern): Likewise.
4393 (vect_recog_mask_conversion_pattern): Likewise.
4394 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4395 (vect_mask_constant_operand_p): Likewise.
4396 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4397 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4398 (get_group_load_store_type, get_load_store_type): Likewise.
4399 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4400 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4401 (vectorizable_conversion, vectorizable_assignment): Likewise.
4402 (vectorizable_shift, vectorizable_operation): Likewise.
4403 (vectorizable_store, vect_is_simple_cond): Likewise.
4404 (vectorizable_condition, vectorizable_comparison): Likewise.
4405 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4406 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4407 and move it to the end. Cope with null def_stmt_outs.
4408
4409 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4410
4411 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4412
4413 2018-06-29 Jeff Law <law@redhat.com>
4414
4415 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4416 displacements for TARGET_V850E2V3 and newer.
4417 (TARGET_LRA_P): Remove. Defaults to LRA now.
4418 * config/v850/v850.md (sign23byte_load): Remove.
4419 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4420 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4421
4422 2018-06-29 Martin Liska <mliska@suse.cz>
4423
4424 PR lto/85759
4425 * coverage.c (coverage_init): Mangle full path name.
4426 * doc/invoke.texi: Document the change.
4427 * gcov-io.c (mangle_path): New.
4428 * gcov-io.h (mangle_path): Likewise.
4429 * gcov.c (mangle_name): Use mangle_path for path mangling.
4430
4431 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4432
4433 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4434 if starting source register is not even.
4435
4436 2018-06-29 Martin Liska <mliska@suse.cz>
4437
4438 PR tree-optimization/86263
4439 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4440 Make edge redirection.
4441
4442 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4443
4444 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4445 (dump_scope_depth): New variable.
4446 (get_dump_scope_depth): New function.
4447 (dump_begin_scope): New function.
4448 (dump_end_scope): New function.
4449 * dumpfile.h (get_dump_scope_depth): New declaration.
4450 (dump_begin_scope): New declaration.
4451 (dump_end_scope): New declaration.
4452 (class auto_dump_scope): New class.
4453 (AUTO_DUMP_SCOPE): New macro.
4454 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4455 AUTO_DUMP_SCOPE.
4456
4457 2018-06-29 Richard Biener <rguenther@suse.de>
4458
4459 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4460 compute_all_dependences succeeds.
4461 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4462 exceed --param loop-max-datarefs-for-datadeps.
4463
4464 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4465
4466 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4467
4468 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4469
4470 PR target/86348
4471 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4472 alternative 0 in preferred_for_speed attribute.
4473
4474 2018-06-28 Paul Koning <ni1d@arrl.net>
4475
4476 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4477 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4478 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4479 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4480 for shift insn patterns.
4481
4482 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4483
4484 * cgraph.c (cgraph_node::get_body): Replace assignments to
4485 "dump_file" with calls to set_dump_file.
4486 * dumpfile.c (alt_dump_file): Make static, and group with...
4487 (alt_flags): ...this definition.
4488 (dumps_are_enabled): New variable.
4489 (refresh_dumps_are_enabled): New function.
4490 (set_dump_file): New function.
4491 (set_alt_dump_file): New function.
4492 (gcc::dump_manager::dump_start): Replace assignments to
4493 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4494 set_alt_dump_file.
4495 (gcc::dump_manager::dump_finish): Likewise.
4496 * dumpfile.h (alt_dump_file): Delete decl.
4497 (dumps_are_enabled): New variable decl.
4498 (set_dump_file): New function decl.
4499 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4500 global.
4501 * tree-nested.c (lower_nested_functions): Replace assignments to
4502 "dump_file" with calls to set_dump_file.
4503
4504 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4505
4506 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4507 goto_locus of each outgoing edge of each basic block.
4508
4509 2018-06-28 Richard Biener <rguenther@suse.de>
4510
4511 * dwarf2out.c (decl_scope_table): Remove.
4512 (push_decl_scope): Likewise.
4513 (pop_decl_scope): Likewise.
4514 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4515 (gen_struct_or_union_type_die): Likewise.
4516 (gen_tagged_type_die): Likewise.
4517 (dwarf2out_init): Do not initialize decl_scope_table.
4518 (dwarf2out_c_finalize): Do not free it.
4519
4520 2018-06-28 Richard Biener <rguenther@suse.de>
4521
4522 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4523 deciding whether to not re-use a DIE.
4524
4525 2018-06-28 Richard Biener <rguenther@suse.de>
4526
4527 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4528 DW_AT_abstract_origin attribute.
4529
4530 2018-06-28 Martin Liska <mliska@suse.cz>
4531
4532 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4533 Use newly introduced constants.
4534 * tree-switch-conversion.h (struct jump_table_cluster):
4535 Define max_ratio_for_size and max_ratio_for_speed.
4536
4537 2018-06-28 Martin Liska <mliska@suse.cz>
4538
4539 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4540 Add new checking assert to catch invalid state.
4541 (jump_table_cluster::can_be_handled): Handle single case
4542 clusters.
4543 (jump_table_cluster::is_beneficial): Bail out for such case.
4544 (bit_test_cluster::find_bit_tests):
4545 Add new checking assert to catch invalid state.
4546 (bit_test_cluster::can_be_handled): Handle single case
4547 clusters.
4548 (bit_test_cluster::is_beneficial): Bail out for such case.
4549 (switch_decision_tree::analyze_switch_statement):
4550 Fix comment.
4551
4552 2018-06-28 Martin Liska <mliska@suse.cz>
4553
4554 * common.opt: Introduce -completion option.
4555 * gcc.c (driver_handle_option): Handle it.
4556 (driver::main): Print completions if completion
4557 is set.
4558 * opt-suggestions.c (option_proposer::get_completions):
4559 New function.
4560 (option_proposer::suggest_completion): Likewise.
4561 (option_proposer::find_param_completions): Likewise.
4562 (verify_autocompletions): Likewise.
4563 (test_completion_valid_options): Likewise.
4564 (test_completion_valid_params): Likewise.
4565 (in_completion_p): Likewise.
4566 (empty_completion_p): Likewise.
4567 (test_completion_partial_match): Likewise.
4568 (test_completion_garbage): Likewise.
4569 (opt_proposer_c_tests): Likewise.
4570 * opt-suggestions.h: Declare new functions.
4571 * opts.c (common_handle_option): Handle OPT__completion_.
4572 * selftest-run-tests.c (selftest::run_tests): Add
4573 opt_proposer_c_tests.
4574 * selftest.c (assert_str_startswith): New.
4575 * selftest.h (assert_str_startswith): Likewise.
4576 (opt_proposer_c_tests): New.
4577 (ASSERT_STR_STARTSWITH): Likewise.
4578
4579 2018-06-28 Martin Liska <mliska@suse.cz>
4580
4581 * Makefile.in: Add opt-suggestions.o.
4582 * gcc-main.c: Include opt-suggestions.h.
4583 * gcc.c (driver::driver): Likewise.
4584 (driver::~driver): Remove m_option_suggestions.
4585 (driver::build_option_suggestions): Moved to option_proposer.
4586 (driver::suggest_option): Likewise.
4587 (driver::handle_unrecognized_options): Use option_proposer.
4588 * gcc.h (class driver): Add new memver m_option_proposer.
4589 * opt-suggestions.c: New file.
4590 * opt-suggestions.h: New file.
4591
4592 2018-06-28 Martin Liska <mliska@suse.cz>
4593
4594 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4595 (auto_string_vec::~auto_string_vec): Likewise.
4596
4597 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4598
4599 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4600 prevent_decl_creation_for_types fields up and add reset_location field.
4601 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4602 statement if id->reset_location is true.
4603 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4604 id->reset_location is true.
4605 (copy_phis_for_bb): Force input_location on the arguments if
4606 id->reset_location is true.
4607 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4608 is set on the function to be inlined.
4609
4610 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4611
4612 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4613
4614 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4615
4616 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4617 registers for Pmode.
4618 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4619 hard registers for the clobbered pseudo.
4620
4621 2018-06-27 Paul Koning <ni1d@arrl.net>
4622
4623 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4624 mutually exclusive options.
4625 * config/pdp11/constraints.md (h): New constraint.
4626 (O): Update definition to match shift code generation.
4627 (D): New constraint.
4628 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4629 (CCFP): Remove.
4630 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4631 function.
4632 (output_jump): Change arguments.
4633 (pdp11_fixed_cc_regs): New function.
4634 (pdp11_cc_mode): Ditto.
4635 (pdp11_expand_shift): Ditto.
4636 (pdp11_assemble_shift): Ditto.
4637 (pdp11_small_shift): Ditto.
4638 (pdp11_branch_cost): Remove.
4639 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4640 from output.
4641 (pdp11_register_move_cost): Update for CC registers.
4642 (pdp11_rtx_costs): Add case for LSHIFTRT.
4643 (pdp11_output_jump): Add CCNZ mode conditional branches.
4644 (notice_update_cc_on_set): Remove.
4645 (pdp11_cc_mode): New function.
4646 (simple_memory_operand): Correct pre/post decrement case.
4647 (no_side_effect_operand): New function.
4648 (pdp11_regno_reg_class): Add CC_REGS class.
4649 (pdp11_fixed_cc_regs): New function.
4650 (pdp11_small_shift): New function.
4651 (pdp11_expand_shift): New function to expand shift insns.
4652 (pdp11_assemble_shift): New function to output shifts.
4653 (pdp11_branch_cost): Remove.
4654 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4655 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4656 (WCHAR_TYPE): Ditto.
4657 (PTRDIFF_TYPE): Ditto.
4658 (ADJUST_INSN_LENGTH): New macro.
4659 (FIXED_REGISTERS): Add CC registers.
4660 (CALL_USED_REGISTERS): Ditto.
4661 (reg_class): Ditto.
4662 (REG_CLASS_NAMES): Ditto.
4663 (REG_CLASS_CONTENTS): Ditto.
4664 (SELECT_CC_MODE): Use new function.
4665 (TARGET_FLAGS_REGNUM): New macro.
4666 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4667 (cc0_reg_rtx): Remove.
4668 (CC_STATUS_MDEP): Remove.
4669 (CC_STATUS_MDEFP_INIT): Remove.
4670 (CC_IN_FPU): Remove.
4671 (NOTICE_UPDATE_CC): Remove.
4672 (REGISTER_NAMES): Add CC registers.
4673 (BRANCH_COST): Change to constant 1.
4674 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4675 handling.
4676 * config/pdp11/pdp11.opt (mbcopy): Remove.
4677 (mbcopy-builtin): Remove.
4678 (mbranch-cheap): Remove.
4679 (mbranch-expensive): Remove.
4680 * config/pdp11/predicates.md (expand_shift_operand): Update to
4681 match shift code generation.
4682 (ccnz_operator): New predicate.
4683 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4684 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4685 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4686 exclusive options.
4687 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4688 description of O constraint.
4689
4690 2018-06-27 Jeff Law <law@redhat.com>
4691 Austin Law <austinklaw@gmail.com>
4692
4693 * config/v850/v850.md (addsi3_set_flags): New pattern.
4694 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4695 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4696 (zero_extendhisi2_v850_set_flags): Likewise.
4697 (zero_extendqisi2_v850_set_flags): Likewise.
4698 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4699 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4700 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4701
4702 * config/v850/v850-protos.h (notice_update_cc): Remove.
4703 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4704 (v850_print_operand): Handle 'D' and "d".
4705 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4706 Add handling of arithmetic/logical operations compared against zero.
4707 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4708 Do not look at v850_compare_op, instead get mode from last argument.
4709 (v850_gen_compare): Remove
4710 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4711 after reload for prologue insns.
4712 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4713 patterns.
4714 (construct_save_jarl): Likewise.
4715 (TARGET_FLAGS_REGNUM): Define.
4716 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4717 (NOTICE_UPDATE_CC): Remove.
4718 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4719 than cc0. Conditionalize on reload_completed.
4720 (cmpsi_insn, setfcc_insn): Likewise.
4721 (tst1 splitter): Turn into define_and_split which sets the flags
4722 after reload.
4723 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4724 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4725 (cstoresf4, cstoredf4): Clobber the flags.
4726 (cmpsi, cmpsf, cmpdf): Remove expanders.
4727 (setf_insn): Remove pattern.
4728 (addsi3): Turn into define_and_split which clobbers the flags after
4729 reload and a suitable pattern (addsi3_clobber_flags) for use after
4730 reload.
4731 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4732 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4733 (ashrsi3, ashrsi3_v850e2): Likewise.
4734 (bins): Clobber the flags.
4735 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4736 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4737 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4738 (call_value_internal_short, call_value_internal_long): Likewise.
4739 (callt_save_interrupt, callt_return_interrupt): Likewise.
4740 (save_interrupt, return_interrupt): Likewise.
4741 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4742 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4743 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4744 (All FP comparisons): Only allow after reload has completed.
4745 (trfsr): Likewise.
4746 (divh, divhu): Tweak output template.
4747 (branch_z_normal, branch_z_invert): Remove
4748 (branch_nz_normal, branch_nz_invert): Likewise.
4749 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4750
4751 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4752 * config/v850/v850.c (notice_update_cc): Remove.
4753 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4754 (CC_NO_CARRY): Likewise.
4755 (NOTICE_UPDATE_CC): Define to nothing.
4756 * config/v850/v850.md: Remove block comment on cc0 handling
4757 Remove "cc" attribute from all patterns. Remove cc_status handling
4758 from all patterns. Minor formatting fixes.
4759
4760 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4761
4762 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4763 (cortex-a76.cortex-a55): Likewise.
4764 * config/aarch64/aarch64-tune.md: Regenerate.
4765 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4766 cortex-a76.cortex-a55.
4767
4768 2018-06-27 Jeff Law <law@redhat.com>
4769
4770 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4771 (MULTILIB_DIRNAMES): Similarly.
4772
4773 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4774
4775 * gimple.h (gimple_return_retbnd): Delete.
4776 (gimple_return_set_retbnd): Likewise.
4777 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4778 gimple_return_set_retbnd.
4779 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4780 gimple_return_retbnd and adjust.
4781 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4782 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4783 Explicitly return NULL in a couple more cases. Move assertion
4784 on debug statements and remove unreachable code.
4785 (reset_debug_binding): Do not test id->retbnd.
4786 (expand_call_inline): Do not set it.
4787
4788 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4789
4790 * configure.ac: Add --disable-gcov option.
4791 * configure: Regenerate.
4792 * Makefile.in: Honour @enable_gcov@.
4793 * doc/install.texi: Document --disable-gcov.
4794
4795 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4796
4797 * config/arm/arm-cpus.in (cortex-a76): New entry.
4798 (cortex-a76.cortex-a55): Likewise.
4799 * config/arm/arm-tables.opt: Regenerate.
4800 * config/arm/arm-tune.md: Likewise.
4801 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4802 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4803 cortex-a76.cortex-a55.
4804
4805 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4806
4807 PR target/85769
4808 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4809
4810 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4811
4812 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4813 comment.
4814 (EPILOGUE_USES): Likewise.
4815
4816 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4817
4818 * tree-inline.c (remap_location): New function extracted from...
4819 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4820 (copy_phis_for_bb): ...here. Call remap_location.
4821 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4822
4823 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4824
4825 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4826 unaligned vsx for 16B memset.
4827
4828 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4829
4830 PR target/86285
4831 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4832 ieee128_float_type_node to long_double_type_node unless
4833 TARGET_LONG_DOUBLE_128 is set.
4834
4835 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4836
4837 * cfgloop.c (get_loop_location): Convert return type from
4838 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4839 by implicit construction from rtx_insn *, and using
4840 dump_user_location_t::from_function_decl for the fallback case.
4841 * cfgloop.h (get_loop_location): Convert return type from
4842 location_t to dump_user_location_t.
4843 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4844 dump_printf_loc to pass in a dump_location_t rather than a
4845 location_t, via the gimple stmt.
4846 * coverage.c (get_coverage_counts): Update calls to
4847 dump_printf_loc to pass in dump_location_t rather than a
4848 location_t.
4849 * doc/optinfo.texi (Dump types): Convert example of
4850 dump_printf_loc from taking "locus" to taking "insn". Update
4851 description of the "_loc" calls to cover dump_location_t.
4852 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4853 "selftest.h".
4854 (dump_user_location_t::dump_user_location_t): New constructors,
4855 from gimple *stmt and rtx_insn *.
4856 (dump_user_location_t::from_function_decl): New function.
4857 (dump_loc): Make static.
4858 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4859 const dump_location_t &.
4860 (dump_generic_expr_loc): Delete.
4861 (dump_printf_loc): Convert param "loc" from location_t to
4862 const dump_location_t &.
4863 (selftest::test_impl_location): New function.
4864 (selftest::dumpfile_c_tests): New function.
4865 * dumpfile.h: Include "profile-count.h".
4866 (class dump_user_location_t): New class.
4867 (struct dump_impl_location_t): New struct.
4868 (class dump_location_t): New class.
4869 (dump_printf_loc): Convert 2nd param from source_location to
4870 const dump_location_t &.
4871 (dump_generic_expr_loc): Delete.
4872 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4873 const dump_location_t &.
4874 * gimple-fold.c (fold_gimple_assign): Update call to
4875 dump_printf_loc to pass in a dump_location_t rather than a
4876 location_t, via the gimple stmt.
4877 (gimple_fold_call): Likewise.
4878 * gimple-loop-interchange.cc
4879 (loop_cand::analyze_iloop_reduction_var): Update for change to
4880 check_reduction_path.
4881 (tree_loop_interchange::interchange): Update for change to
4882 find_loop_location.
4883 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4884 change in return-type of find_loop_location.
4885 (graphite_regenerate_ast_isl): Likewise.
4886 * graphite-optimize-isl.c (optimize_isl): Likewise.
4887 * graphite.c (graphite_transform_loops): Likewise.
4888 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4889 pass in a dump_location_t rather than a location_t, via the
4890 gimple stmt.
4891 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4892 * ipa.c (walk_polymorphic_call_targets): Likewise.
4893 * loop-unroll.c (report_unroll): Convert "locus" param from
4894 location_t to dump_location_t.
4895 (decide_unrolling): Update for change to get_loop_location's
4896 return type.
4897 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4898 location_t to dump_user_location_t.
4899 (grid_find_single_omp_among_assignments_1): Updates calls to
4900 dump_printf_loc to pass in a dump_location_t rather than a
4901 location_t, via the gimple stmt.
4902 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4903 location_t to dump_location_t. Updates calls to dump_printf_loc
4904 to pass in a dump_location_t rather than a location_t, via the
4905 gimple stmt.
4906 (grid_inner_loop_gridifiable_p): Likewise.
4907 (grid_dist_follows_simple_pattern): Likewise.
4908 (grid_gfor_follows_tiling_pattern): Likewise.
4909 (grid_target_follows_gridifiable_pattern): Likewise.
4910 (grid_attempt_target_gridification): Convert initialization
4911 of local "grid" from memset to zero-initialization; FIXME: does
4912 this require C++11? Update call to dump_printf_loc to pass in a
4913 optinfo_location rather than a location_t, via the gimple stmt.
4914 * profile.c (read_profile_edge_counts): Updates call to
4915 dump_printf_loc to pass in a dump_location_t rather than a
4916 location_t
4917 (compute_branch_probabilities): Likewise.
4918 * selftest-run-tests.c (selftest::run_tests): Call
4919 dumpfile_c_tests.
4920 * selftest.h (dumpfile_c_tests): New decl.
4921 * tree-loop-distribution.c (pass_loop_distribution::execute):
4922 Update for change in return type of find_loop_location.
4923 * tree-parloops.c (parallelize_loops): Likewise.
4924 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4925 "locus" from location_t to dump_user_location_t.
4926 (canonicalize_loop_induction_variables): Likewise.
4927 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4928 for change in return type of find_loop_location.
4929 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4930 to dump_printf_loc to pass in a dump_location_t rather than a
4931 location_t, via the stmt.
4932 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4933 Likewise.
4934 * tree-vect-loop-manip.c (find_loop_location): Convert return
4935 type from source_location to dump_user_location_t.
4936 (vect_do_peeling): Update for above change.
4937 (vect_loop_versioning): Update for change in type of
4938 vect_location.
4939 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4940 from location_t to dump_user_location_t.
4941 (vect_estimate_min_profitable_iters): Update for change in type
4942 of vect_location.
4943 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4944 location_t to dump_location_t.
4945 (vect_slp_bb): Update for change in type of vect_location.
4946 * tree-vectorizer.c (vect_location): Convert from source_location
4947 to dump_user_location_t.
4948 (try_vectorize_loop_1): Update for change in vect_location's type.
4949 (vectorize_loops): Likewise.
4950 (increase_alignment): Likewise.
4951 * tree-vectorizer.h (vect_location): Convert from source_location
4952 to dump_user_location_t.
4953 (find_loop_location): Convert return type from source_location to
4954 dump_user_location_t.
4955 (check_reduction_path): Convert 1st param from location_t to
4956 dump_user_location_t.
4957 * value-prof.c (check_counter): Update call to dump_printf_loc to
4958 pass in a dump_user_location_t rather than a location_t; update
4959 call to error_at for change in type of "locus".
4960 (check_ic_target): Update call to dump_printf_loc to
4961 pass in a dump_user_location_t rather than a location_t, via the
4962 call_stmt.
4963
4964 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4965
4966 * config/s390/s390.h (enum processor_flags): Do not use
4967 default tune parameter when -march was specified.
4968
4969 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4970
4971 PR target/86314
4972 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4973 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4974 operands.
4975
4976 2018-06-26 Richard Biener <rguenther@suse.de>
4977
4978 PR tree-optimization/86287
4979 PR bootstrap/86316
4980 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4981 (vect_analyze_loop): Initialize n_stmts.
4982
4983 2018-06-26 Richard Biener <rguenther@suse.de>
4984
4985 PR middle-end/86271
4986 * fold-const.c (fold_convertible_p): Pointer extension
4987 isn't valid.
4988
4989 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4990
4991 PR debug/86064
4992 * dwarf2out.c (loc_list_has_views): Adjust comments.
4993 (dw_loc_list): Split single cross-partition range with
4994 nonzero locview.
4995
4996 2018-06-25 Jeff Law <law@redhat.com>
4997
4998 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4999 on -mbig-switch by default.
5000
5001 * config/v850/predicates.md (const_float_1_operand): Fix match_code
5002 test.
5003 (const_float_0_operand): Remove unused predicate.
5004 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5005 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5006 (recipsf2): New expander. Original pattern now called
5007 (recipsf2_insn).
5008 (recipdf2, recipdf2_insn): Similarly.
5009 (rsqrtsf2, rsqrtsf2_insn): Similarly
5010 (rsqrtdf2, rsqrtdf2_insn): Similarly
5011
5012 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
5013
5014 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5015 Simplify logic for FreeBSD (twice).
5016
5017 2018-06-25 Martin Sebor <msebor@redhat.com>
5018
5019 PR tree-optimization/86204
5020 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5021 a strnlen result if it's less than the length of the string.
5022
5023 2018-06-25 Martin Sebor <msebor@redhat.com>
5024
5025 PR tree-optimization/85700
5026 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5027 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5028 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5029
5030 2018-06-25 Martin Sebor <msebor@redhat.com>
5031
5032 * doc/extend.texi (Zero-length arrays): Update and clarify.
5033
5034 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
5035
5036 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5037 added IEEE/IBM long double multilib support on PowerPC little
5038 endian Linux systems.
5039 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5040 (MULTILIB_DEFAULTS): Likewise.
5041 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5042 Likewise.
5043 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5044 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5045 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5046
5047 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
5048
5049 PR middle-end/86311
5050 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5051 (REORDER_45): Likewise.
5052
5053 2018-06-25 Jeff Law <law@redhat.com>
5054
5055 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5056 dividend to 32 bits. Adjust length.
5057 (udivmodhi4): Cleanup output template. Fix length.
5058
5059 2018-06-25 Carl Love <cel@us.ibm.com>
5060
5061 * config/rs6000/vsx.md: Change word selector to prefered location.
5062
5063 2018-06-25 Richard Biener <rguenther@suse.de>
5064
5065 PR tree-optimization/86304
5066 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5067 epilogue-if-converted loops as well.
5068
5069 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
5070
5071 * lto-section-out.c (lto_begin_section): Do not print section
5072 name for noaddr and unnumbered dumps.
5073
5074 2018-06-25 Richard Biener <rguenther@suse.de>
5075
5076 * tree-vectorizer.h (struct vec_info_shared): New structure
5077 with parts split out from struct vec_info and loop_nest from
5078 struct _loop_vec_info.
5079 (struct vec_info): Adjust accordingly.
5080 (struct _loop_vec_info): Likewise.
5081 (LOOP_VINFO_LOOP_NEST): Adjust.
5082 (LOOP_VINFO_DATAREFS): Likewise.
5083 (LOOP_VINFO_DDRS): Likewise.
5084 (struct _bb_vec_info): Likewise.
5085 (BB_VINFO_DATAREFS): Likewise.
5086 (BB_VINFO_DDRS): Likewise.
5087 (struct _stmt_vec_info): Add dr_aux member.
5088 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5089 (DR_MISALIGNMENT_UNINITIALIZED): New.
5090 (set_dr_misalignment): Adjust.
5091 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5092 (vect_analyze_loop): Adjust prototype.
5093 (vect_analyze_loop_form): Likewise.
5094 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5095 Compute dependences lazily.
5096 (vect_record_base_alignments): Use shared datarefs/ddrs.
5097 (vect_verify_datarefs_alignment): Likewise.
5098 (vect_analyze_data_refs_alignment): Likewise.
5099 (vect_analyze_data_ref_accesses): Likewise.
5100 (vect_analyze_data_refs): Likewise.
5101 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5102 constructor parameter for shared part.
5103 (vect_analyze_loop_form): Pass in shared part and adjust.
5104 (vect_analyze_loop_2): Pass in storage for the number of
5105 stmts. Move loop nest finding to the caller. Compute
5106 datarefs lazily.
5107 (vect_analyze_loop): Pass in shared part.
5108 (vect_transform_loop): Verify shared datarefs are unchanged.
5109 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5110 constructor parameter for shared part.
5111 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5112 (vect_slp_bb): Verify shared datarefs are unchanged before
5113 transform.
5114 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5115 change.
5116 (new_stmt_vec_info): Initialize DR_AUX misalignment to
5117 DR_MISALIGNMENT_UNINITIALIZED.
5118 * tree-vectorizer.c (vec_info::vec_info): Add constructor
5119 parameter for shared part.
5120 (vec_info::~vec_info): Adjust.
5121 (vec_info_shared::vec_info_shared): New.
5122 (vec_info_shared::~vec_info_shared): Likewise.
5123 (vec_info_shared::save_datarefs): Likewise.
5124 (vec_info_shared::check_datarefs): Likewise.
5125 (try_vectorize_loop_1): Construct shared part live for analyses
5126 of a single loop for multiple vector sizes.
5127 * tree-parloops.c (gather_scalar_reductions): Adjust.
5128
5129 2018-06-25 Richard Biener <rguenther@suse.de>
5130
5131 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5132 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5133 (vect_analyze_data_refs): Remove similar code from here and
5134 simplify accordingly.
5135
5136 2018-06-25 Richard Biener <rguenther@suse.de>
5137
5138 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5139 for reverse storage order accesses rather than asserting
5140 they cannot happen here.
5141
5142 2018-06-25 Tom de Vries <tdevries@suse.de>
5143
5144 PR debug/86257
5145 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5146 Use data16 instead of .byte for insn prefix.
5147
5148 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
5149
5150 PR C++/86082
5151 * parser.c (make_char_string_pack): Pass this literal chars
5152 through cpp_interpret_string.
5153 (cp_parser_userdef_numeric_literal): Check the result of
5154 make_char_string_pack.
5155
5156 2018-06-24 Maya Rashish <coypu@sdf.org>
5157
5158 * ginclude/stddef.h: Simplify conditions around avoiding
5159 re-definition of __size_t.
5160
5161 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5162
5163 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5164 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5165
5166 2018-06-22 Maya Rashish <coypu@sdf.org>
5167
5168 * doc/invoke.texi (mno-fancy-math-387): Update for changes
5169 made to OpenBSD and NetBSD through the years.
5170
5171 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5172
5173 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5174 behavior of vec_pack (vector double, vector double) to match
5175 behavior of vec_float2 (vector double, vector double).
5176
5177 2018-06-22 Olivier Hainque <hainque@adacore.com>
5178
5179 * gimplify.c (gimplify_function_tree): Prevent creation
5180 of a trampoline for the address of the current function
5181 passed to entry/exit instrumentation hooks.
5182
5183 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
5184
5185 PR target/86222
5186 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5187 correctly.
5188
5189 2018-06-22 Martin Liska <mliska@suse.cz>
5190
5191 PR tree-optimization/86263
5192 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5193 Bail out if is_enabled is false.
5194 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5195 New declaration.
5196 (jump_table_cluster::is_enabled): New function.
5197
5198 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5199
5200 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5201 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5202 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5203 (lto_input_ts_binfo_tree_pointers): Likewise.
5204 * tree-streamer-out.c (streamer_write_tree_bitfields,
5205 write_ts_binfo_tree_pointers): Likewise.
5206 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5207
5208 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5209
5210 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5211
5212 2018-06-22 Martin Liska <mliska@suse.cz>
5213
5214 * symbol-summary.h (get): Make it pure and inline move
5215 functionality from ::get function.
5216 (get): Remove and inline into ::get and ::get_create.
5217 (get_create): Move code from ::get function.
5218
5219 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5220
5221 PR target/85994
5222 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5223 -x assembler-with-cpp.
5224
5225 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5226
5227 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5228 _FILE_OFFSET_BITS=64 for C++.
5229
5230 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
5231
5232 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5233 conversion insn that shows up when pr85657-3.c is compiled using
5234 IEEE 128-bit long double.
5235 (neg<mode>2_internal): Use the correct mode to check whether the
5236 mode is IBM extended.
5237 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5238 multiply and divide external functions from being created more
5239 than once.
5240
5241 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5242
5243 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5244 functions.
5245 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
5246 the edge can be forwarded.
5247 (cfg_layout_merge_blocks): Likewise.
5248
5249 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5250
5251 * except.c (finish_eh_generation): Commit edge insertions only after
5252 the EH edges have been redirected from post-landing to landing pads.
5253
5254 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5255
5256 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5257 create_tmp_var_for to create the FRAME decl.
5258 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5259
5260 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5261
5262 * tree-inline.c (copy_edges_for_bb): Minor tweak.
5263 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5264 debug statement when resetting its value.
5265 (expand_call_inline): Copy the locus of the call onto the assignment
5266 of the return value, if any. Use local variable in more cases.
5267
5268 2018-06-21 Martin Liska <mliska@suse.cz>
5269
5270 * ipa-pure-const.c (propagate_nothrow): Use
5271 funct_state_summaries->get.
5272 (dump_malloc_lattice): Likewise.
5273 (propagate_malloc): Likewise.
5274
5275 2018-06-21 Richard Biener <rguenther@suse.de>
5276
5277 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5278 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5279 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5280 comment.
5281 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5282 BLOCK_ABSTRACT_ORIGIN unconditionally.
5283
5284 2018-06-21 David Malcolm <dmalcolm@redhat.com>
5285
5286 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5287 deleting it.
5288 * ipa-reference.c (ipa_reference_c_finalize): Delete
5289 ipa_ref_opt_sum_summaries and set it to NULL.
5290
5291 2018-06-21 Tom de Vries <tdevries@suse.de>
5292
5293 PR tree-optimization/85859
5294 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5295 test with comment from bb_no_side_effects_p.
5296
5297 2018-06-21 Richard Biener <rguenther@suse.de>
5298
5299 PR tree-optimization/86232
5300 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5301 max for constant niter.
5302
5303 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5304
5305 * config/aarch64/aarch64-simd.md
5306 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5307
5308 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5309
5310 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5311 Make opernads of the unspec commutative.
5312
5313 2018-06-21 Richard Biener <rguenther@suse.de>
5314
5315 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5316 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5317 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5318 (vect_analyze_data_ref_dependence): Re-order checks to deal with
5319 NULL DR_STEP.
5320 (vect_record_base_alignments): Do not record base alignment
5321 for gathers or scatters.
5322 (vect_compute_data_ref_alignment): Drop return value that is always
5323 true. Bail out early for gathers or scatters.
5324 (vect_enhance_data_refs_alignment): Bail out early for gathers
5325 or scatters.
5326 (vect_find_same_alignment_drs): Likewise.
5327 (vect_analyze_data_refs_alignment): Remove dead code.
5328 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5329 (vect_analyze_data_refs): For possible gathers or scatters do
5330 not create an alternate DR, just check their possible validity
5331 and mark them. Adjust DECL_NONALIASED handling to not rely
5332 on DR_BASE_ADDRESS.
5333 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5334 update inits of gathers or scatters.
5335 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5336 Also copy gather/scatter flag to pattern vinfo.
5337
5338 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
5339
5340 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5341 behavior of vec_packsu (vector unsigned long long, vector unsigned
5342 long long) to match behavior of vec_packs with same signature.
5343
5344 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5345 Thomas Schwinge <thomas@codesourcery.com>
5346 Cesar Philippidis <cesar@codesourcery.com>
5347
5348 * gimplify.c (gimplify_scan_omp_clauses): Add support for
5349 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5350 (gimplify_adjust_omp_clauses): Likewise.
5351 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5352 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5353 (gimplify_omp_target_update): Update handling of acc update and
5354 enter/exit data.
5355 * omp-low.c (install_var_field): Remove unused parameter
5356 base_pointers_restrict.
5357 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5358 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5359 FINALIZE}
5360 (omp_target_base_pointers_restrict_p): Delete.
5361 (scan_omp_target): Update call to scan_sharing_clauses.
5362 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5363 FINALIZE}.
5364 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5365 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5366 (convert_local_omp_clauses): Likewise.
5367 * tree-pretty-print.c (dump_omp_clause): Likewise.
5368 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
5369 FINALIZE}.
5370 (omp_clause_code_name): Likewise.
5371
5372 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5373
5374 PR debug/86194
5375 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5376 be narrowed.
5377
5378 PR tree-optimization/86231
5379 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
5380 anti-range don't overwrite *vr0min before using it to compute *vr0max.
5381
5382 2018-06-20 Tom de Vries <tdevries@suse.de>
5383
5384 PR tree-optimization/86097
5385 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5386 iv type if signedness of iv type is not the same as that of *nit.
5387
5388 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5389
5390 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
5391 EDGE_EH edges, verify they are all EDGE_EH.
5392
5393 2018-06-20 Maya Rashish <coypu@sdf.org>
5394
5395 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5396
5397 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5398
5399 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5400 * config/aarch64/aarch64.c (xgene1_tunings): Add
5401 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5402 (aarch64_mode_valid_for_sched_fusion_p):
5403 Allow 16-byte modes.
5404 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5405 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5406 128-bit modes.
5407 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5408 New pattern.
5409 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5410 * config/aarch64/iterators.md (VQ2): New mode iterator.
5411
5412 2018-06-20 Martin Liska <mliska@suse.cz>
5413
5414 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5415 Change default ratio from 10 to 8.
5416
5417 2018-06-20 Martin Liska <mliska@suse.cz>
5418
5419 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5420 New.
5421 (bit_test_cluster::find_bit_tests): Likewise.
5422 (switch_decision_tree::analyze_switch_statement): Find clusters.
5423 * tree-switch-conversion.h (struct jump_table_cluster): Document
5424 hierarchy.
5425
5426 2018-06-20 Martin Liska <mliska@suse.cz>
5427
5428 * tree-switch-conversion.c (switch_conversion::collect):
5429 Record m_uniq property.
5430 (switch_conversion::expand): Bail out for special conditions.
5431 (group_cluster::~group_cluster): New.
5432 (group_cluster::group_cluster): Likewise.
5433 (group_cluster::dump): Likewise.
5434 (jump_table_cluster::emit): New.
5435 (switch_decision_tree::fix_phi_operands_for_edges): New.
5436 (struct case_node): Remove struct.
5437 (jump_table_cluster::can_be_handled): New.
5438 (case_values_threshold): Moved to header.
5439 (reset_out_edges_aux): Likewise.
5440 (jump_table_cluster::is_beneficial): New.
5441 (bit_test_cluster::can_be_handled): Likewise.
5442 (add_case_node): Remove.
5443 (bit_test_cluster::is_beneficial): New.
5444 (case_bit_test::cmp): New.
5445 (bit_test_cluster::emit): New.
5446 (expand_switch_as_decision_tree_p): Remove.
5447 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5448 (fix_phi_operands_for_edge): Likewise.
5449 (switch_decision_tree::analyze_switch_statement): New.
5450 (compute_cases_per_edge): Move ...
5451 (switch_decision_tree::compute_cases_per_edge): ... here.
5452 (try_switch_expansion): Likewise.
5453 (switch_decision_tree::try_switch_expansion): Likewise.
5454 (record_phi_operand_mapping): Likewise.
5455 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5456 (emit_case_decision_tree): Likewise.
5457 (switch_decision_tree::emit): Likewise.
5458 (balance_case_nodes): Likewise.
5459 (switch_decision_tree::balance_case_nodes): Likewise.
5460 (dump_case_nodes): Likewise.
5461 (switch_decision_tree::dump_case_nodes): Likewise.
5462 (emit_jump): Likewise.
5463 (switch_decision_tree::emit_jump): Likewise.
5464 (emit_cmp_and_jump_insns): Likewise.
5465 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5466 (emit_case_nodes): Likewise.
5467 (switch_decision_tree::emit_case_nodes): Likewise.
5468 (conditional_probability): Remove.
5469 * tree-switch-conversion.h (enum cluster_type): New.
5470 (PRINT_CASE): New.
5471 (struct cluster): Likewise.
5472 (cluster::cluster): Likewise.
5473 (struct simple_cluster): Likewise.
5474 (simple_cluster::simple_cluster): Likewise.
5475 (struct group_cluster): Likewise.
5476 (struct jump_table_cluster): Likewise.
5477 (struct bit_test_cluster): Likewise.
5478 (struct min_cluster_item): Likewise.
5479 (struct case_tree_node): Likewise.
5480 (case_tree_node::case_tree_node): Likewise.
5481 (jump_table_cluster::case_values_threshold): Likewise.
5482 (struct case_bit_test): Likewise.
5483 (struct switch_decision_tree): Likewise.
5484 (struct switch_conversion): Likewise.
5485 (switch_decision_tree::reset_out_edges_aux): Likewise.
5486
5487 2018-06-20 Martin Liska <mliska@suse.cz>
5488
5489 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5490 (hoist_edge_and_branch_if_true): Likewise.
5491 (expand_switch_using_bit_tests_p): Likewise.
5492 (struct case_bit_test): Likewise.
5493 (case_bit_test_cmp): Likewise.
5494 (emit_case_bit_tests): Likewise.
5495 (switch_conversion::switch_conversion): New class.
5496 (struct switch_conv_info): Remove old struct.
5497 (collect_switch_conv_info): More to ...
5498 (switch_conversion::collect): ... this.
5499 (check_range): Likewise.
5500 (switch_conversion::check_range): Likewise.
5501 (check_all_empty_except_final): Likewise.
5502 (switch_conversion::check_all_empty_except_final): Likewise.
5503 (check_final_bb): Likewise.
5504 (switch_conversion::check_final_bb): Likewise.
5505 (create_temp_arrays): Likewise.
5506 (switch_conversion::create_temp_arrays): Likewise.
5507 (free_temp_arrays): Likewise.
5508 (gather_default_values): Likewise.
5509 (switch_conversion::gather_default_values): Likewise.
5510 (build_constructors): Likewise.
5511 (switch_conversion::build_constructors): Likewise.
5512 (constructor_contains_same_values_p): Likewise.
5513 (switch_conversion::contains_same_values_p): Likewise.
5514 (array_value_type): Likewise.
5515 (switch_conversion::array_value_type): Likewise.
5516 (build_one_array): Likewise.
5517 (switch_conversion::build_one_array): Likewise.
5518 (build_arrays): Likewise.
5519 (switch_conversion::build_arrays): Likewise.
5520 (gen_def_assigns): Likewise.
5521 (switch_conversion::gen_def_assigns): Likewise.
5522 (prune_bbs): Likewise.
5523 (switch_conversion::prune_bbs): Likewise.
5524 (fix_phi_nodes): Likewise.
5525 (switch_conversion::fix_phi_nodes): Likewise.
5526 (gen_inbound_check): Likewise.
5527 (switch_conversion::gen_inbound_check): Likewise.
5528 (process_switch): Use the newly created class.
5529 (switch_conversion::expand): New.
5530 (switch_conversion::~switch_conversion): New.
5531 * tree-switch-conversion.h: New file.
5532
5533 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5534
5535 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5536 tree-vect-patterns.c.
5537 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5538 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5539 (vect_recog_sad_pattern): Likewise.
5540 (vect_recog_widen_sum_pattern): Likewise.
5541 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5542 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5543 (vect_recog_rotate_pattern): Likewise.
5544 (vect_recog_mult_pattern): Likewise.
5545 (vect_recog_vector_vector_shift_pattern): Likewise.
5546 (vect_recog_divmod_pattern): Likewise.
5547 (vect_recog_mixed_size_cond_pattern): Likewise.
5548 (vect_recog_bool_pattern): Likewise.
5549 (vect_recog_mask_conversion_pattern): Likewise.
5550 (vect_try_gather_scatter_pattern): Likewise.
5551 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5552 (vect_recog_over_widening_pattern): Likewise.
5553 (vect_recog_gather_scatter_pattern): Likewise.
5554 (vect_recog_func_ptr): Move from tree-vectorizer.h
5555 (vect_vect_recog_func_ptrs): Move further down the file.
5556 (vect_recog_func): Likewise. Remove the third argument.
5557 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5558 (vect_pattern_recog_1): Expect the pattern function to do any
5559 necessary target tests. Also expect it to provide a vector type.
5560 Remove the type_in handling.
5561
5562 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5563
5564 * tree-vect-patterns.c (vect_pattern_detected): New function.
5565 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5566 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5567 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5568 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5569 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5570 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5571 (vect_recog_mask_conversion_pattern)
5572 (vect_try_gather_scatter_pattern): Likewise.
5573
5574 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5575
5576 * tree-vect-patterns.c (vect_get_internal_def): New function.
5577 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5578 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5579 (search_type_for_mask_1): Use it.
5580
5581 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5582
5583 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5584 redundant WIDEN_SUM_EXPR handling.
5585 (vect_recog_sad_pattern): Likewise.
5586
5587 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5588
5589 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5590 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5591 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5592 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5593 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5594
5595 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5596
5597 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5598 use the stmt_vec_info of the original bb statement for the
5599 new zero assignment, even if the call is part of a pattern.
5600
5601 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5602
5603 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5604 that the sequence is attached to the original statement rather
5605 than the pattern statement.
5606 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5607 PATTERN_DEF_SEQ from the original statement rather than
5608 the main pattern statement.
5609 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5610 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5611 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5612
5613 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5614
5615 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5616 definition statements before the early exit for statements that aren't
5617 live or relevant.
5618 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5619 split out from...
5620 (vect_transform_loop): ...here. Process pattern definition
5621 statements without first checking whether the main pattern
5622 statement is live or relevant.
5623
5624 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5625
5626 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5627 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5628
5629 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5630
5631 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5632 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5633 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5634 (expand_block_compare): Change select_block_compare_mode call.
5635 (expand_strncmp_align_check): Use new functions, fix comment.
5636 (emit_final_str_compare_gpr): New function.
5637 (expand_strn_compare): Refactor and clean up code.
5638 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5639
5640 2018-06-19 Tony Reix <tony.reix@atos.com>
5641 Damien Bergamini <damien.bergamini@atos.com>
5642 David Edelsohn <dje.gcc@gmail.com>
5643
5644 * collect2.c (static_obj): New variable.
5645 (static_libs): New variable.
5646 (is_in_list): Uncomment declaration.
5647 (main): Track AIX libraries linked statically.
5648 (is_in_list): Uncomment definition.
5649 (scan_prog_file): Don't add AIX shared libraries initializer
5650 to constructor list if linking statically.
5651
5652 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5653
5654 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5655 constant.
5656 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5657
5658 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5659
5660 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5661 blocks.
5662
5663 2018-06-19 Martin Liska <mliska@suse.cz>
5664
5665 * config/i386/i386.c (ix86_can_inline_p): Do not use
5666 ipa_fn_summaries::get_create.
5667 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5668 get.
5669 (devirtualization_time_bonus): Likewise.
5670 (ipcp_propagate_stage): Likewise.
5671 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5672 (edge_set_predicate): Likewise.
5673 (evaluate_conditions_for_known_args): Likewise.
5674 (evaluate_properties_for_edge): Likewise.
5675 (ipa_call_summary::reset): Tranform to ...
5676 (ipa_call_summary::~ipa_call_summary): ... this.
5677 (ipa_fn_summary::reset): Transform to ...
5678 (ipa_fn_summary::~ipa_fn_summary): ... this.
5679 (ipa_fn_summary_t::remove): Rename to ...
5680 (ipa_fn_summary_t::remove_callees): ... this.
5681 (ipa_fn_summary_t::duplicate): Use placement new
5682 instead of memory copy.
5683 (ipa_call_summary_t::duplicate): Likewise.
5684 (ipa_call_summary_t::remove): Remove.
5685 (dump_ipa_call_summary): Change get_create to get.
5686 (ipa_dump_fn_summary): Dump only when summary exists.
5687 (analyze_function_body): Use symbol_summary::get instead
5688 of get_create.
5689 (compute_fn_summary): Likewise.
5690 (estimate_edge_devirt_benefit): Likewise.
5691 (estimate_edge_size_and_time): Likewise.
5692 (inline_update_callee_summaries): Likewise.
5693 (remap_edge_change_prob): Likewise.
5694 (remap_edge_summaries): Likewise.
5695 (ipa_merge_fn_summary_after_inlining): Likewise.
5696 (write_ipa_call_summary): Likewise.
5697 (ipa_fn_summary_write): Likewise.
5698 (ipa_free_fn_summary): Likewise.
5699 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5700 (struct ipa_call_summary): Likewise.
5701 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5702 of get_create.
5703 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5704 (estimate_size_after_inlining): Likewise.
5705 (estimate_growth): Likewise.
5706 (growth_likely_positive): Likewise.
5707 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5708 (inline_call): Likewise.
5709 * ipa-inline.c (caller_growth_limits): Likewise.
5710 (can_inline_edge_p): Likewise.
5711 (can_inline_edge_by_limits_p): Likewise.
5712 (compute_uninlined_call_time): Likewise.
5713 (compute_inlined_call_time): Likewise.
5714 (want_inline_small_function_p): Likewise.
5715 (edge_badness): Likewise.
5716 (update_caller_keys): Likewise.
5717 (update_callee_keys): Likewise.
5718 (inline_small_functions): Likewise.
5719 (inline_to_all_callers_1): Likewise.
5720 (dump_overall_stats): Likewise.
5721 (early_inline_small_functions): Likewise.
5722 (early_inliner): Likewise.
5723 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5724 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5725 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5726 * ipa-split.c (execute_split_functions): Likewise.
5727 * symbol-summary.h: Likewise.
5728 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5729
5730 2018-06-19 Richard Biener <rguenther@suse.de>
5731
5732 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5733 (vectorize_loops): ... here. Fix dbgcnt handling.
5734 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5735
5736 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5737
5738 PR target/86197
5739 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5740 ieee128 argument takes up only one (vector) register, not two (floating
5741 point) registers.
5742
5743 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5744
5745 * gimplify.c (gimplify_init_constructor): Really never clear for an
5746 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5747
5748 2018-06-19 Richard Biener <rguenther@suse.de>
5749
5750 PR tree-optimization/86179
5751 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5752 after failed recognition.
5753
5754 2018-06-18 Martin Sebor <msebor@redhat.com>
5755
5756 PR middle-end/85602
5757 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5758 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5759 Handle integer subtraction.
5760 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5761 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5762
5763 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5764
5765 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5766 param from rtx to rtx_insn *.
5767 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5768 param.
5769 (frv_ifcvt_modify_insn): Likwise.
5770 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5771 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5772 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5773 as_a <rtx_insn *> cast to local "unprotected_region" once
5774 it's been established that it's not NULL or pc_rtx.
5775 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5776 param "sethi" from rtx to rtx_insn *.
5777 (nds32_group_float_insns): Likewise for param "insn".
5778 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5779 param.
5780 (vax_output_int_subtract): Likewise.
5781 * config/vax/vax.c (vax_output_int_add): Likewise for param
5782 "insn".
5783 (vax_output_int_subtract): Likewise.
5784 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5785 (emit_pattern_after): Likewise for param "after".
5786 (emit_insn_after): Likewise.
5787 (emit_jump_insn_after): Likewise.
5788 (emit_call_insn_after): Likewise.
5789 (emit_debug_insn_after): Likewise.
5790 (emit_pattern_before): Likewise for param "before".
5791 (emit_insn_before): Likewise.
5792 (emit_jump_insn_before): Likewise.
5793 * final.c (get_insn_template): Likewise for param "insn", removing
5794 a cast.
5795 * output.h (get_insn_template): Likewise for 2nd param.
5796 * rtl.h (emit_insn_before): Likewise.
5797 (emit_jump_insn_before): Likewise.
5798 (emit_debug_insn_before_noloc): Likewise.
5799 (emit_insn_after): Likewise.
5800 (emit_jump_insn_after): Likewise.
5801 (emit_call_insn_after): Likewise.
5802 (emit_debug_insn_after): Likewise.
5803 (set_insn_deleted): Likewise for param.
5804
5805 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5806
5807 PR target/85358
5808 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5809 floating point modes, so that IFmode is numerically greater than
5810 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5811 to declare the ordering. This prevents IFmode from being
5812 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5813 machine. Include rs6000-modes.h to share the fractional values
5814 between genmodes* and the rest of the compiler.
5815 (IFmode): Likewise.
5816 (KFmode): Likewise.
5817 (TFmode): Likewise.
5818 * config/rs6000/rs6000-modes.h: New file.
5819 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5820 meaning of rs6000_long_double_size so that 126..128 selects an
5821 appropriate 128-bit floating point type.
5822 (rs6000_option_override_internal): Likewise.
5823 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5824 (TARGET_LONG_DOUBLE_128): Change the meaning of
5825 rs6000_long_double_size so that 126..128 selects an appropriate
5826 128-bit floating point type.
5827 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5828 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5829 source and destination to match the standard usage.
5830 (truncifkf2): Likewise.
5831 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5832 ISA 2.07 to use an explicit clobber, instead of passing in a
5833 temporary.
5834 (copysign<mode>3_soft): Likewise.
5835
5836 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5837
5838 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5839 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5840 (vect_slp_analyze_instance_dependence): Likewise.
5841 (vect_enhance_data_refs_alignment): Likewise.
5842 (vect_analyze_data_refs_alignment): Likewise.
5843 (vect_slp_analyze_and_verify_instance_alignment
5844 (vect_analyze_data_ref_accesses): Likewise.
5845 (vect_prune_runtime_alias_test_list): Likewise.
5846 (vect_analyze_data_refs): Likewise.
5847 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5848 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5849 (vect_analyze_scalar_cycles_1): Likewise.
5850 (vect_get_loop_niters): Likewise.
5851 (vect_analyze_loop_form_1): Likewise.
5852 (vect_update_vf_for_slp): Likewise.
5853 (vect_analyze_loop_operations): Likewise.
5854 (vect_analyze_loop): Likewise.
5855 (vectorizable_induction): Likewise.
5856 (vect_transform_loop): Likewise.
5857 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5858 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5859 (vect_make_slp_decision): Likewise.
5860 (vect_detect_hybrid_slp): Likewise.
5861 (vect_slp_analyze_operations): Likewise.
5862 (vect_slp_bb): Likewise.
5863 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5864 (vectorizable_bswap): Likewise.
5865 (vectorizable_call): Likewise.
5866 (vectorizable_simd_clone_call): Likewise.
5867 (vectorizable_conversion): Likewise.
5868 (vectorizable_assignment): Likewise.
5869 (vectorizable_shift): Likewise.
5870 (vectorizable_operation): Likewise.
5871 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5872
5873 2018-06-18 Martin Sebor <msebor@redhat.com>
5874
5875 PR tree-optimization/81384
5876 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5877 * builtins.c (expand_builtin_strnlen): New function.
5878 (expand_builtin): Call it.
5879 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5880 * builtins.def (BUILT_IN_STRNLEN): New.
5881 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5882 Warn for bounds in excess of maximum object size.
5883 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5884 single-value ranges. Handle strnlen.
5885 (handle_builtin_strlen): Handle strnlen.
5886 (strlen_check_and_optimize_stmt): Same.
5887 * doc/extend.texi (Other Builtins): Document strnlen.
5888
5889 2018-06-18 Maya Rashish <coypu@sdf.org>
5890
5891 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5892 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5893 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5894
5895 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5896 here to ...
5897 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5898
5899 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5900
5901 * tree.c (escaped_string::escape): Replace cast to char * by
5902 const_cast<char *> (unescaped).
5903
5904 2018-06-18 Nick Clifton <nickc@redhat.com>
5905
5906 PR 84195
5907 * tree.c (escaped_string): New class. Converts an unescaped
5908 string into its escaped equivalent.
5909 (warn_deprecated_use): Use the new class to convert the
5910 deprecation message, if present.
5911 (test_escaped_strings): New self test.
5912 (test_c_tests): Add test_escaped_strings.
5913 * doc/extend.texi (deprecated): Add a note that the
5914 deprecation message is affected by the -fmessage-length
5915 option, and that control characters will be escaped.
5916 (#pragma GCC error): Document this pragma.
5917 (#pragma GCC warning): Likewise.
5918 * doc/invoke.texi (-fmessage-length): Document this option's
5919 effect on the #warning and #error preprocessor directives and
5920 the deprecated attribute.
5921
5922 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5923
5924 * tree.c (decl_value_expr_lookup): Revert latest change.
5925 (decl_value_expr_insert): Likewise.
5926
5927 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5928
5929 * gimplify.c (nonlocal_vlas): Delete.
5930 (nonlocal_vla_vars): Likewise.
5931 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5932 referenced VLAs.
5933 (gimplify_body): Do not create and destroy nonlocal_vlas.
5934 * tree-nested.c: Include diagnostic.h.
5935 (use_pointer_in_frame): Tweak.
5936 (lookup_field_for_decl): Add assertion and declare the transformation.
5937 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5938 internal error when the reference is in a wrong context. Do not
5939 create a debug decl by default.
5940 (note_nonlocal_block_vlas): Delete.
5941 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5942 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5943 create a debug decl by default.
5944 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5945 call is in a wrong context.
5946 (fixup_vla_decls): New function.
5947 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5948 debug variables were created.
5949 * tree.c (decl_value_expr_lookup): Add checking assertion.
5950 (decl_value_expr_insert): Likewise.
5951
5952 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5953
5954 PR middle-end/82479
5955 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5956 * tree-scalar-evolution.c (interpret_expr): Likewise.
5957 (expression_expensive_p): Likewise.
5958 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5959 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5960 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5961 (ssa_defined_by_minus_one_stmt_p): New.
5962
5963 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5964
5965 PR middle-end/64946
5966 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5967 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5968 * dojump.c (do_jump): Likewise.
5969 * expr.c (expand_expr_real_2): Check operand type's sign.
5970 * fold-const.c (const_unop): Handle ABSU_EXPR.
5971 (fold_abs_const): Likewise.
5972 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5973 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5974 (strip_sign_op_1): Likesise.
5975 * match.pd: Add new pattern to generate ABSU_EXPR.
5976 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5977 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5978 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5979 * tree-inline.c (estimate_operator_cost): Likewise.
5980 * tree-pretty-print.c (dump_generic_node): Likewise.
5981 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5982 * tree.def (ABSU_EXPR): New.
5983
5984 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5985
5986 PR middle-end/86095
5987 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5988 documented as preserved for backward compatibility only.
5989 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5990
5991 PR rtl-optimization/86108
5992 * bb-reorder.c (create_forwarder_block): Renamed to ...
5993 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5994 jump from new landing pad to the second part.
5995 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5996 Adjust callers.
5997
5998 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5999
6000 PR middle-end/85878
6001 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6002 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6003 Only call store_expr for halves if the mode is the same.
6004
6005 PR middle-end/86123
6006 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6007 Fix up comment formatting.
6008
6009 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
6010
6011 * typed-splay-tree.h (typed_splay_tree::remove): New function.
6012 (typed_splay_tree::closure,
6013 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6014 (typed_splay_tree::typed_splay_tree,
6015 typed_splay_tree::operator =): Declared private.
6016 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6017 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6018 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6019 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6020 typed_splay_tree::splay_tree_splay,
6021 typed_splay_tree::splay_tree_foreach_helper,
6022 typed_splay_tree::splay_tree_insert,
6023 typed_splay_tree::splay_tree_remove,
6024 typed_splay_tree::splay_tree_lookup,
6025 typed_splay_tree::splay_tree_predecessor,
6026 typed_splay_tree::splay_tree_successor,
6027 typed_splay_tree::splay_tree_min,
6028 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6029 (typed_splay_tree::root, typed_splay_tree::comp,
6030 typed_splay_tree::delete_key,
6031 typed_splay_tree::delete_value): New data members.
6032 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6033 typed_splay_tree::remove.
6034
6035 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
6036
6037 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6038 -mginv and -mno-ginv to the assembler.
6039 * config/mips/mips.opt (-mcrc): New option.
6040 (-mginv): Likewise.
6041 * doc/invoke.text (-mcrc): Document.
6042 (-mginv): Likewise.
6043
6044 2018-06-15 Nick Clifton <nickc@redhat.com>
6045
6046 PR 84195
6047 * tree.c (escaped_string): New class. Converts an unescaped
6048 string into its escaped equivalent.
6049 (warn_deprecated_use): Use the new class to convert the
6050 deprecation message, if present.
6051 (test_escaped_strings): New self test.
6052 (test_c_tests): Add test_escaped_strings.
6053 * doc/extend.texi (deprecated): Add a note that the
6054 deprecation message is affected by the -fmessage-length
6055 option, and that control characters will be escaped.
6056 (#pragma GCC error): Document this pragma.
6057 (#pragma GCC warning): Likewise.
6058 * doc/invoke.texi (-fmessage-length): Document this option's
6059 effect on the #warning and #error preprocessor directives and
6060 the deprecated attribute.
6061
6062 2018-06-15 Richard Biener <rguenther@suse.de>
6063
6064 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6065 here, also noting vector size used.
6066 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
6067 size used in MSG_OPTIMIZED_LOCATIONS dump.
6068 (pass_slp_vectorize::execute): Adjust.
6069
6070 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
6071
6072 PR target/85968
6073 * config/arc/arc.c (arc_return_address_register): Fix
6074 if-condition.
6075
6076 2018-06-15 Richard Biener <rguenther@suse.de>
6077
6078 PR middle-end/86159
6079 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6080 leave useless conversion stripping to force_gimple_operand_gsi.
6081 (gimplify_build2): Likewise.
6082 (gimplify_build1): Likewise.
6083
6084 2018-06-15 Richard Biener <rguenther@suse.de>
6085
6086 PR middle-end/86076
6087 * tree-cfg.c (move_stmt_op): unshare invariant addresses
6088 before adjusting their block.
6089
6090 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
6091
6092 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6093 multilibs for *-*-rtems*.
6094 * config/riscv/t-rtems: New file.
6095
6096 2018-06-14 Jakub Jelinek <jakub@redhat.com>
6097
6098 PR middle-end/86122
6099 * match.pd ((A +- CST1) +- CST2): Punt if last resort
6100 unsigned_type_for returns NULL.
6101
6102 PR target/85945
6103 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6104 subregs of multi-word pseudos unless the float mode has word size.
6105
6106 2018-06-14 Richard Biener <rguenther@suse.de>
6107
6108 PR middle-end/86139
6109 * tree-vect-generic.c (build_word_mode_vector_type): Remove
6110 duplicate and harmful type_hash_canon.
6111 * tree.c (type_hash_canon): Assert we didn't find ourselves.
6112
6113 2018-06-14 Richard Biener <rguenther@suse.de>
6114
6115 PR ipa/86124
6116 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6117 NULL cgraph_node.
6118
6119 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
6120
6121 * config/rtems.h (STDINT_LONG32): Define.
6122
6123 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
6124 Prachi Godbole <prachi.godbole@imgtec.com>
6125
6126 * config/mips/mips-cpus.def: Define P6600.
6127 * config/mips/mips-tables.opt: Regenerate.
6128 * config/mips/mips.c (mips_ucbranch_type): New enum.
6129 (mips_rtx_cost_data): Add support for P6600.
6130 (mips_issue_rate): Likewise.
6131 (mips_multipass_dfa_lookahead): Likewise.
6132 (mips_avoid_hazard): Likewise.
6133 (mips_reorg_process_insns): Likewise.
6134 (mips_classify_branch_p6600): New function.
6135 * config/mips/mips.h (TUNE_P6600): New define.
6136 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6137 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6138 * config/mips/mips.md: Include p6600.md.
6139 (processor): Add p6600.
6140 * config/mips/p6600.md: New file.
6141 * doc/invoke.texi: Add p6600 to supported architectures.
6142
6143 2018-06-13 Martin Sebor <msebor@redhat.com>
6144
6145 PR tree-optimization/86114
6146 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6147 of integer types.
6148 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6149
6150 2018-06-13 Richard Biener <rguenther@suse.de>
6151
6152 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6153 Properly set vector type of the intermediate stmt.
6154 * tree-vect-stmts.c (vectorizable_operation): The destination
6155 var always has vectype_out type.
6156
6157 2018-06-13 Jeff Law <law@redhat.com>
6158
6159 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6160 integer 0 for argument to print_rtl_with_bb.
6161 (rl78_reorg): Likewise.
6162
6163 2018-06-13 David Malcolm <dmalcolm@redhat.com>
6164
6165 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6166 from rtx to rtx_insn *.
6167 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6168 "label".
6169 (add_sched_insns_for_speculation): Likewise for local "target",
6170 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6171 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6172 from rtx_insn ** to rtx_code_label **.
6173 (reorg_emit_nops): Likewise.
6174 (c6x_reorg): Likewise for local "call_labels".
6175 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6176 rtx to rtx_insn *.
6177 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6178 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6179 the loops over LABEL_REFS.
6180 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6181 braf_label.
6182 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6183 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6184 (split_branches): Strengthen local "olabel" from rtx to
6185 rtx_insn *, adding a safe_as_a cast.
6186 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6187 to "rtx_insn *".
6188 (add_insn_after): Likewise for first two params.
6189 (add_insn_before): Likewise.
6190 (remove_insn): Likewise for param.
6191 (emit_pattern_before_noloc): Likewise for second and third params.
6192 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6193 (emit_call_insn_before_noloc): Likewise.
6194 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6195 to "rtx_insn *".
6196 (emit_barrier_before): Likewise.
6197 (emit_label_before): Strengthen "label" param from "rtx" to
6198 "rtx_code_label *". Strengthen "before" param from "rtx" to
6199 "rtx_insn *".
6200 (emit_insn_after_1): Strengthen "after" param from "rtx" to
6201 "rtx_insn *".
6202 (emit_pattern_after_noloc): Likewise.
6203 (emit_insn_after_noloc): Likewise.
6204 (emit_jump_insn_after_noloc): Likewise.
6205 (emit_call_insn_after_noloc): Likewise.
6206 (emit_debug_insn_after_noloc): Likewise.
6207 (emit_barrier_after): Likewise.
6208 (emit_label_after): Likewise for both params.
6209 (emit_pattern_after_setloc): Likewise for "after" param. Convert
6210 "loc" param from "int" to "location_t".
6211 (emit_insn_after_setloc): Likewise.
6212 (emit_jump_insn_after_setloc): Likewise.
6213 (emit_call_insn_after_setloc): Likewise.
6214 (emit_debug_insn_after_setloc): Likewise.
6215 (emit_pattern_before_setloc): Likewise for "before" param. Convert
6216 "loc" param from "int" to "location_t".
6217 (emit_pattern_before): Convert NULL_RTX to NULL.
6218 (emit_insn_before_setloc): Convert "loc" param from "int" to
6219 "location_t".
6220 (emit_jump_insn_before_setloc): Likewise.
6221 (emit_call_insn_before_setloc): Likewise.
6222 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6223 rtx_insn *. Convert "loc" param from "int" to "location_t".
6224 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6225 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6226 Convert 3rd param from "int" to "location_t".
6227 (emit_barrier_before, emit_barrier_after, next_real_insn):
6228 Strengthen param from rtx to rtx_insn *.
6229 (emit_label_before): Strengthen 1st param from "rtx" to
6230 "rtx_code_label *". Strengthen 2nd param from "rtx" to
6231 "rtx_insn *".
6232 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6233 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6234 Strengthen 2nd param from "rtx" to "rtx_insn *".
6235 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6236 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6237 Likewise. Convert 3rd param from "int" to "location_t".
6238 (emit_label_after): Strengthen 1st param from "rtx" to
6239 "rtx_code_label *".
6240 (next_real_insn, remove_insn): Strengthen param from "rtx" to
6241 "rtx_insn *".
6242 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6243 from "rtx" to "rtx_insn *".
6244
6245 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
6246
6247 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6248 bodies streamed in with -Q.
6249 * dumpfile.c (dump_files): Add lto-stream-out dump file.
6250 * dumpfile.h (tree_dump_index): Add lto_stream_out.
6251 * gimple-streamer-out.c: Include gimple-pretty-print.h
6252 (output_bb): Dump stmts streamed.
6253 * lto-section-out.c: Include print-tree.h
6254 (lto_begin_section): Dump sections created.
6255 (lto_output_decl_index): Dump decl encoded.
6256 * lto-streamer-out.c: Include print-tree.h
6257 (create_output_block): Dump output block created.
6258 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6259 (output_function): Dump function output.
6260 (output_constructor): Dump constructor streamed.
6261 (write_global_stream): Output indexes encoded.
6262 (produce_asm_for_decls): Dump streams encoded.
6263 * lto-streamer.c (streamer_dump_file): New global var.
6264 * lto-streamer.h (streamer_dump_file): Declare.
6265 * passes.c (ipa_write_summaries): Initialize streamer dump.
6266 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6267 in.
6268
6269 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
6270
6271 PR target/86048
6272 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6273 offsets for register save directives. Emit a second batch of save
6274 directives, if need be, when the function accesses prior frames.
6275
6276 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6277
6278 * config/arc/fpu.md (fmasf4): Force operand to register.
6279 (fnmasf4): Likewise.
6280
6281 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6282
6283 * config/arc/arc-protos.h (arc_pad_return): Remove.
6284 * config/arc/arc.c (machine_function): Remove force_short_suffix
6285 and size_reason.
6286 (arc_print_operand): Adjust printing of '&'.
6287 (arc_verify_short): Remove conditional printing of short suffix.
6288 (arc_final_prescan_insn): Remove reference to size_reason.
6289 (pad_return): New function.
6290 (arc_reorg): Call pad_return.
6291 (arc_pad_return): Remove.
6292 (arc_init_machine_status): Remove reference to force_short_suffix.
6293 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6294 (attr length): When attribute iscompact is true force to 2
6295 regardless; in the case of maybe check if we want to force the
6296 instruction to have 4 bytes length.
6297 (nopv): Change it to generate 4 byte long nop as well.
6298 (blockage): New pattern.
6299 (simple_return): Remove call to arc_pad_return.
6300 (p_return_i): Likewise.
6301
6302 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6303
6304 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6305
6306 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6307
6308 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6309 ARC cores.
6310
6311 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6312
6313 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6314 for ARC700 and ARCv2.
6315
6316 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
6317
6318 PR target/86076
6319 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6320 operands[2] instead of operands[1].
6321
6322
6323 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6324
6325 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6326 case, check whether the outer register overlaps an unallocatable
6327 register, not just whether it fits the required class.
6328
6329 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6330
6331 * poly-int.h (can_div_trunc_p): Add new overload in which all values
6332 are poly_ints.
6333 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6334 (memrefs_conflict_p): Likewise.
6335 (init_alias_analysis): Likewise.
6336 * cfgexpand.c (expand_debug_expr): Likewise.
6337 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6338 * cse.c (fold_rtx): Likewise.
6339 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6340 * expr.c (emit_block_move_hints): Likewise.
6341 (clear_storage_hints, push_block, emit_push_insn): Likewise.
6342 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6343 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6344 (emit_group_store): Likewise.
6345 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
6346 to read the PRE/POST_MODIFY increment.
6347 * calls.c (store_one_arg): Use strip_offset.
6348 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6349 poly_int_rtx_p.
6350 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6351 by a VEC_SELECT.
6352 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6353 (simplify_binary_operation_1): Extend CONST_INT handling to
6354 poly_int_rtx_p.
6355 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6356 than a HOST_WIDE_INT.
6357 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6358 poly_int64.
6359 (adjust_mems, add_stores): Update accodingly.
6360 (vt_canonicalize_addr): Track polynomial offsets.
6361 (emit_note_insn_var_location): Likewise.
6362 (vt_add_function_parameter): Likewise.
6363 (vt_initialize): Likewise.
6364
6365 2018-06-12 Jeff Law <law@redhat.com>
6366
6367 * config.gcc (alpha*-*-freebsd*): Remove.
6368 * config/alpha/freebsd.h: Remove.
6369
6370 2018-06-12 David Malcolm <dmalcolm@redhat.com>
6371
6372 PR other/69968
6373 * spellcheck-tree.c (levenshtein_distance): Rename to...
6374 (get_edit_distance): ...this, and update for underlying renaming.
6375 * spellcheck-tree.h (levenshtein_distance): Rename to...
6376 (get_edit_distance): ...this.
6377 * spellcheck.c (levenshtein_distance): Rename to...
6378 (get_edit_distance): ...this. Convert from Levenshtein distance
6379 to Damerau-Levenshtein distance by supporting transpositions of
6380 adjacent characters. Rename "v1" to "v_next" and "v0" to
6381 "v_one_ago".
6382 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6383 (selftest::test_edit_distance_unit_test_oneway): ...this, and
6384 update for underlying renaming.
6385 (selftest::levenshtein_distance_unit_test): Rename to...
6386 (selftest::test_get_edit_distance_unit): ...this, and update for
6387 underlying renaming.
6388 (selftest::test_find_closest_string): Add example from PR 69968
6389 where transposition helps
6390 (selftest::test_metric_conditions): Update for renaming.
6391 (selftest::test_metric_conditions): Likewise.
6392 (selftest::spellcheck_c_tests): Likewise.
6393 * spellcheck.h (levenshtein_distance): Rename both overloads to...
6394 (get_edit_distance): ...this.
6395 (best_match::consider): Update for renaming.
6396
6397 2018-06-12 Martin Sebor <msebor@redhat.com>
6398
6399 PR tree-optimization/85259
6400 * builtins.c (compute_objsize): Handle constant offsets.
6401 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6402 true iff a warning has been issued.
6403 * gimple.h (gimple_nonartificial_location): New function.
6404 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6405 gimple_nonartificial_location and handle -Wno-system-headers.
6406 (handle_builtin_stxncpy): Same.
6407
6408 2018-06-12 Martin Sebor <msebor@redhat.com>
6409
6410 PR c/85931
6411 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6412
6413 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6414
6415 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6416 BUILTIN_VEC_XST entries for pointer to double and long long.
6417
6418 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6419
6420 PR target/85990
6421 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6422 Update comments.
6423 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6424 Likewise.
6425
6426 2018-06-12 Martin Liska <mliska@suse.cz>
6427
6428 * doc/options.texi: Document IntegerRange.
6429
6430 2018-06-12 Martin Liska <mliska@suse.cz>
6431
6432 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6433 * opt-functions.awk: Handle Deprecated flag.
6434 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6435 and report error.
6436 (read_cmdline_option): Report warning for a deprecated option.
6437 * opts.h (struct cl_option): Add new field cl_deprecated.
6438 (CL_ERR_DEPRECATED): New.
6439
6440 2018-06-12 Martin Liska <mliska@suse.cz>
6441
6442 * doc/options.texi: Document Deprecated option flag.
6443
6444 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6445
6446 * config/arc/arc-arch.h (arc_extras): New enum.
6447 (arc_cpu_t):Add field extra.
6448 (arc_cpu_types): Consider the extras.
6449 * config/arc/arc-cpus.def: Add extras info.
6450 * config/arc/arc-opts.h (processor_type): Consider extra field.
6451 * config/arc/arc.c (arc_override_options): Handle extra field.
6452
6453 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6454
6455 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6456 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6457 field.
6458 * config/arc/arc.c (arc_init): Update pic warning.
6459 (irq_range): Update irq range parsing warnings.
6460 (arc_override_options): Update various warning messages.
6461 (arc_handle_aux_attribute): Likewise.
6462
6463 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6464
6465 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6466
6467 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6468
6469 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6470 compiler messages directives.
6471
6472 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6473
6474 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6475 * config/mips/mips-tables.opt: Regenerate.
6476 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6477 mips64r6.
6478 * doc/invoke.texi: Document -march=i6500.
6479
6480 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6481
6482 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6483 (i6400_gpmul): Add cpu_unit.
6484 (i6400_gpdiv): Likewise.
6485 (i6400_msa_add_d): Update reservations.
6486 (i6400_msa_int_add) Likewise.
6487 (i6400_msa_short_logic3) Likewise.
6488 (i6400_msa_short_logic2) Likewise.
6489 (i6400_msa_short_logic) Likewise.
6490 (i6400_msa_move) Likewise.
6491 (i6400_msa_cmp) Likewise.
6492 (i6400_msa_short_float2) Likewise.
6493 (i6400_msa_div_d) Likewise.
6494 (i6400_msa_long_logic1) Likewise.
6495 (i6400_msa_long_logic2) Likewise.
6496 (i6400_msa_mult) Likewise.
6497 (i6400_msa_long_float2) Likewise.
6498 (i6400_msa_long_float4) Likewise.
6499 (i6400_msa_long_float5) Likewise.
6500 (i6400_msa_long_float8) Likewise.
6501 (i6400_fpu_fadd): Include frint type.
6502 (i6400_fpu_store): New define_insn_reservation.
6503 (i6400_fpu_load): Likewise.
6504 (i6400_fpu_move): Likewise.
6505 (i6400_fpu_fcmp): Likewise.
6506 (i6400_fpu_fmadd): Likewise.
6507 (i6400_int_mult): Include imul3nc type and update reservation.
6508 (i6400_int_div): Include idiv3 type and update reservation.
6509 (i6400_int_load): Update to check type not move_type.
6510 (i6400_int_store): Likewise.
6511 (i6400_int_prefetch): Set zero latency.
6512
6513 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6514
6515 * gcc.c: Document new %@{...} sequence.
6516 (LINK_COMMAND_SPEC): Use it for the -L switches.
6517 (cpp_unique_options): Use it for the -I switches.
6518 (at_file_argbuf): New global variable.
6519 (in_at_file): Likewise.
6520 (alloc_args): Create at_file_argbuf.
6521 (clear_args): Truncate at_file_argbuf.
6522 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6523 (open_at_file): New function.
6524 (close_at_file): Likewise.
6525 (create_at_file): Delete.
6526 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6527 <'o'>: Likewise.
6528 <'@'>: New case.
6529 (validate_switches_from_spec): Deal with %@{...} sequence.
6530 (validate_switches): Likewise.
6531 (driver::finalize): Call clear_args.
6532
6533 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6534
6535 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6536
6537 2018-06-11 Martin Sebor <msebor@redhat.com>
6538
6539 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6540 (Wno-class-memaccess): Add @opindex.
6541 (Wno-templates, Wno-multiple-inheritance): Same.
6542 (Wno-virtual-inheritance, Wno-namespaces): Same.
6543 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6544 (Wno-format-overflow, Wno-format-truncation): Same.
6545 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6546 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6547 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6548 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6549 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6550 (Wno-misspelled-isr): Same.
6551
6552 2018-06-11 Martin Sebor <msebor@redhat.com>
6553
6554 * PR tree-optimization/86083
6555 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6556
6557 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6558
6559 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6560
6561 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6562
6563 PR target/85755
6564 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6565 on the correct operand.
6566 (*movdi_internal64): Ditto.
6567
6568 2018-06-11 Martin Liska <mliska@suse.cz>
6569
6570 PR tree-optimization/86089
6571 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6572
6573 2018-06-11 Julia Koval <julia.koval@intel.com>
6574
6575 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6576 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6577 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6578
6579 2018-06-11 Olivier Hainque <hainque@adacore.com>
6580
6581 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6582 for Ada with strict dwarf2.
6583
6584 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6585
6586 PR target/85755
6587 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6588 addresses.
6589
6590 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6591
6592 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6593
6594 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6595
6596 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6597 TARGET_ELF.
6598
6599 2018-06-08 Martin Liska <mliska@suse.cz>
6600
6601 * tree-cfg.h (debug_function): Fix argument type to match
6602 implementation.
6603
6604 2018-06-08 Martin Liska <mliska@suse.cz>
6605
6606 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6607 Remove usage of MPX-related (and removed) fields.
6608 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6609
6610 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6611
6612 * cfg.c (debug): Use TDF_NONE rather than 0.
6613 * cfghooks.c (debug): Likewise.
6614 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6615 (struct dump_option_value_info): Convert to...
6616 (struct kv_pair): ...this template type.
6617 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6618 rather than 0.
6619 (optinfo_verbosity_options): Likewise.
6620 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6621 OPTGROUP_NONE.
6622 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6623 than int for "optgroup_flags" param.
6624 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6625 "dump_kind" param.
6626 (dump_dec): Likewise.
6627 (dump_finish): Use TDF_NONE rather than 0.
6628 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6629 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6630 than 0. Update for change to option_ptr.
6631 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6632 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6633 0. Update for changes to optinfo_verbosity_options and
6634 optgroup_options.
6635 (opt_info_switch_p): Convert optgroup_flags from int to
6636 optgroup_flags_t.
6637 (dump_basic_block): Use dump_flags_t rather than int
6638 for "dump_kind" param.
6639 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6640 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6641 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6642 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6643 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6644 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6645 TDF_NONE): Convert from macros to...
6646 (enum dump_flag): ...this new enum.
6647 (dump_flags_t): Update to use enum.
6648 (operator|, operator&, operator~, operator|=, operator&=):
6649 Implement for dump_flags_t.
6650 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6651 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6652 Convert from macros to...
6653 (enum optgroup_flag): ...this new enum.
6654 (optgroup_flags_t): New typedef.
6655 (operator|, operator|=): Implement for optgroup_flags_t.
6656 (struct dump_file_info): Convert field "alt_flags" to
6657 dump_flags_t. Convert field "optgroup_flags" to
6658 optgroup_flags_t.
6659 (dump_basic_block): Use dump_flags_t rather than int for param.
6660 (dump_generic_expr_loc): Likewise.
6661 (dump_dec): Likewise.
6662 (dump_register): Convert param "optgroup_flags" to
6663 optgroup_flags_t.
6664 (opt_info_enable_passes): Likewise.
6665 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6666 than 0.
6667 * gimple-pretty-print.c (debug): Likewise.
6668 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6669 (merged_store_group::apply_stores): Likewise.
6670 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6671 * gimple.c (verify_gimple_pp): Likewise.
6672 * graphite-poly.c (print_pbb_body): Likewise.
6673 * passes.c (pass_manager::register_one_dump_file): Convert
6674 local "optgroup_flags" to optgroup_flags_t.
6675 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6676 (debug): Likewise.
6677 (debug_body): Likewise.
6678 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6679 to optgroup_flags_t.
6680 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6681 than 0.
6682 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6683 (convert_mult_to_fma): Likewise.
6684 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6685 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6686 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6687 "dump_kind" to dump_flags_t.
6688
6689 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6690
6691 * config/rs6000/rs6000.c (min, max): Delete.
6692
6693 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6694
6695 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6696 -mabi=spe and -mabi=no-spe.
6697
6698 2018-06-08 Martin Liska <mliska@suse.cz>
6699
6700 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6701 where we expect an existing summary.
6702
6703 2018-06-08 Martin Liska <mliska@suse.cz>
6704
6705 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6706 * ipa-inline.h (estimate_edge_growth): Likewise.
6707
6708 2018-06-08 Martin Liska <mliska@suse.cz>
6709
6710 * cgraph.c (function_version_hasher::hash): Use
6711 cgraph_node::get_uid ().
6712 (function_version_hasher::equal):
6713 * cgraph.h (cgraph_node::get_uid): New method.
6714 * ipa-inline.c (update_caller_keys): Use
6715 cgraph_node::get_uid ().
6716 (update_callee_keys): Likewise.
6717 * ipa-utils.c (searchc): Likewise.
6718 (ipa_reduced_postorder): Likewise.
6719 * lto-cgraph.c (input_node): Likewise.
6720 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6721 * symbol-summary.h (symtab_insertion): Likewise.
6722 (symtab_removal): Likewise.
6723 (symtab_duplication): Likewise.
6724 * tree-pretty-print.c (dump_function_header): Likewise.
6725 * tree-sra.c (convert_callers_for_node): Likewise.
6726
6727 2018-06-08 Martin Liska <mliska@suse.cz>
6728
6729 * cgraph.c (symbol_table::create_edge): Always assign a new
6730 unique number.
6731 (symbol_table::free_edge): Do not recycle numbers.
6732 * cgraph.h (cgraph_edge::get): New method.
6733 * symbol-summary.h (symtab_removal): Use it.
6734 (symtab_duplication): Likewise.
6735 (call_summary::hashable_uid): Remove.
6736
6737 2018-06-08 Martin Liska <mliska@suse.cz>
6738
6739 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6740 (initialize_growth_caches): Remove.
6741 (free_growth_caches): Likewise.
6742 (do_estimate_edge_time): Use edge_growth_cache.
6743 (do_estimate_edge_size): Likewise.
6744 (do_estimate_edge_hints): Likewise.
6745 * ipa-inline.c (reset_edge_caches): Likewise.
6746 (recursive_inlining): Likewise.
6747 (inline_small_functions): Likewise.
6748 * ipa-inline.h (initialize_growth_caches): Remove.
6749 (estimate_edge_size): Likewise.
6750 (estimate_edge_time): Likewise.
6751 (estimate_edge_hints): Likewise.
6752 (reset_edge_growth_cache): Likewise.
6753 * symbol-summary.h (call_summary::remove): New method.
6754
6755 2018-06-08 Martin Liska <mliska@suse.cz>
6756
6757 * ipa-cp.c (class edge_clone_summary): New summary.
6758 (grow_edge_clone_vectors): Remove.
6759 (ipcp_edge_duplication_hook): Remove.
6760 (class edge_clone_summary_t): New call_summary class.
6761 (ipcp_edge_removal_hook): Remove.
6762 (edge_clone_summary_t::duplicate): New function.
6763 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6764 (create_specialized_node): Likewise.
6765 (ipcp_driver): Initialize edge_clone_summaries and do not
6766 register hooks.
6767
6768 2018-06-08 Martin Liska <mliska@suse.cz>
6769
6770 * symbol-summary.h (get): New function.
6771 (call_summary::m_initialize_when_cloning): New class member.
6772
6773 2018-06-08 Martin Liska <mliska@suse.cz>
6774
6775 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6776 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6777 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6778 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6779 (remove_cgraph_node_from_order): Use the removed_nodes set.
6780 (do_per_function_toporder): Likwise.
6781 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6782 instead of summary_uid.
6783 (symtab_removal): Likewise.
6784 (symtab_duplication): Likewise.
6785
6786 2018-06-08 Martin Liska <mliska@suse.cz>
6787
6788 * ipa-cp.c (ipcp_store_bits_results): Use
6789 ipcp_transformation_sum.
6790 (ipcp_store_vr_results): Likewise.
6791 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6792 to ...
6793 (ipcp_transformation_initialize): ... this.
6794 (ipa_set_node_agg_value_chain):
6795 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6796 (write_ipcp_transformation_info): Likewise.
6797 (read_ipcp_transformation_info): Likewise.
6798 (ipcp_update_bits): Likewise.
6799 (ipcp_update_vr): Likewise.
6800 (ipcp_transform_function): Likewise.
6801 * ipa-prop.h: Rename ipcp_transformation_summary to
6802 ipcp_transformation.
6803 (class ipcp_transformation_t): New function summary.
6804 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6805 (ipa_get_agg_replacements_for_node): Likewise.
6806
6807 2018-06-08 Martin Liska <mliska@suse.cz>
6808
6809 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6810 of struct.
6811 (class funct_state_summary_t): New function_summary class.
6812 (has_function_state): Remove.
6813 (get_function_state): Likewise.
6814 (set_function_state): Likewise.
6815 (add_new_function): Likewise.
6816 (funct_state_summary_t::insert): New function.
6817 (duplicate_node_data): Remove.
6818 (remove_node_data): Remove.
6819 (funct_state_summary_t::duplicate): New function.
6820 (register_hooks): Create new funct_state_summaries.
6821 (pure_const_generate_summary): Use it.
6822 (pure_const_write_summary): Likewise.
6823 (pure_const_read_summary): Likewise.
6824 (propagate_pure_const): Likewise.
6825 (propagate_nothrow): Likewise.
6826 (dump_malloc_lattice): Likewise.
6827 (propagate_malloc): Likewise.
6828 (execute): Do not register hooks, just remove summary
6829 instead.
6830 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6831 constructor.
6832
6833 2018-06-08 Martin Liska <mliska@suse.cz>
6834
6835 * ipa-reference.c (remove_node_data): Remove.
6836 (duplicate_node_data): Likewise.
6837 (class ipa_ref_var_info_summary_t): New class.
6838 (class ipa_ref_opt_summary_t): Likewise.
6839 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6840 (get_reference_optimization_summary): Use
6841 ipa_ref_opt_sum_summaries.
6842 (set_reference_vars_info): Remove.
6843 (set_reference_optimization_summary): Likewise.
6844 (ipa_init): Create summaries.
6845 (init_function_info): Use function summary.
6846 (ipa_ref_opt_summary_t::duplicate): New function.
6847 (ipa_ref_opt_summary_t::remove): New function.
6848 (get_read_write_all_from_node): Fix GNU coding style.
6849 (propagate): Use function summary.
6850 (write_node_summary_p): Fix GNU coding style.
6851 (stream_out_bitmap): Likewise.
6852 (ipa_reference_read_optimization_summary): Use function summary.
6853 (ipa_reference_c_finalize): Do not release hooks.
6854
6855 2018-06-08 Martin Liska <mliska@suse.cz>
6856
6857 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6858 (analyze_function_body): Extract multiple calls of get_create.
6859 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6860 * ipa-inline.c (recursive_inlining): Use ::get method.
6861 * ipa-inline.h (estimate_edge_growth): Likewise.
6862
6863 2018-06-08 Martin Liska <mliska@suse.cz>
6864
6865 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6866 HSA_INVALID.
6867 (hsa_function_summary::hsa_function_summary): Use the new enum
6868 value.
6869 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6870 * hsa-gen.c (hsa_get_host_function): Likewise.
6871 (get_brig_function_name): Likewise.
6872 * ipa-hsa.c (process_hsa_functions): Likewise.
6873 (ipa_hsa_write_summary): Likewise.
6874 * symbol-summary.h (symtab_duplication): Use ::get function/
6875 (get): New function.
6876
6877 2018-06-08 Martin Liska <mliska@suse.cz>
6878
6879 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6880 of get.
6881 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6882 (hsa_register_kernel): Likewise.
6883 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6884 * hsa-gen.c (hsa_get_host_function): Likewise.
6885 (get_brig_function_name): Likewise.
6886 (generate_hsa): Likewise.
6887 (pass_gen_hsail::execute): Likewise.
6888 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6889 (devirtualization_time_bonus): Likewise.
6890 (ipcp_propagate_stage): Likewise.
6891 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6892 (edge_set_predicate): Likewise.
6893 (evaluate_conditions_for_known_args): Likewise.
6894 (evaluate_properties_for_edge): Likewise.
6895 (ipa_fn_summary::reset): Likewise.
6896 (ipa_fn_summary_t::duplicate): Likewise.
6897 (dump_ipa_call_summary): Likewise.
6898 (ipa_dump_fn_summary): Likewise.
6899 (analyze_function_body): Likewise.
6900 (compute_fn_summary): Likewise.
6901 (estimate_edge_devirt_benefit): Likewise.
6902 (estimate_edge_size_and_time): Likewise.
6903 (estimate_calls_size_and_time): Likewise.
6904 (estimate_node_size_and_time): Likewise.
6905 (inline_update_callee_summaries): Likewise.
6906 (remap_edge_change_prob): Likewise.
6907 (remap_edge_summaries): Likewise.
6908 (ipa_merge_fn_summary_after_inlining): Likewise.
6909 (ipa_update_overall_fn_summary): Likewise.
6910 (read_ipa_call_summary): Likewise.
6911 (inline_read_section): Likewise.
6912 (write_ipa_call_summary): Likewise.
6913 (ipa_fn_summary_write): Likewise.
6914 (ipa_free_fn_summary): Likewise.
6915 * ipa-hsa.c (process_hsa_functions): Likewise.
6916 (ipa_hsa_write_summary): Likewise.
6917 (ipa_hsa_read_section): Likewise.
6918 * ipa-icf.c (sem_function::merge): Likewise.
6919 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6920 (do_estimate_edge_time): Likewise.
6921 (estimate_size_after_inlining): Likewise.
6922 (estimate_growth): Likewise.
6923 (growth_likely_positive): Likewise.
6924 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6925 (inline_call): Likewise.
6926 * ipa-inline.c (caller_growth_limits): Likewise.
6927 (can_inline_edge_p): Likewise.
6928 (can_inline_edge_by_limits_p): Likewise.
6929 (compute_uninlined_call_time): Likewise.
6930 (compute_inlined_call_time): Likewise.
6931 (want_inline_small_function_p): Likewise.
6932 (edge_badness): Likewise.
6933 (update_caller_keys): Likewise.
6934 (update_callee_keys): Likewise.
6935 (recursive_inlining): Likewise.
6936 (inline_small_functions): Likewise.
6937 (inline_to_all_callers_1): Likewise.
6938 (dump_overall_stats): Likewise.
6939 (early_inline_small_functions): Likewise.
6940 (early_inliner): Likewise.
6941 * ipa-inline.h (estimate_edge_growth): Likewise.
6942 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6943 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6944 * ipa-prop.h (IPA_NODE_REF): Likewise.
6945 (IPA_EDGE_REF): Likewise.
6946 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6947 (propagate_malloc): Likewise.
6948 * ipa-split.c (execute_split_functions): Likewise.
6949 * symbol-summary.h: Rename get to get_create.
6950 (get): Likewise.
6951 (get_create): Likewise.
6952 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6953
6954 2018-06-08 Martin Liska <mliska@suse.cz>
6955
6956 * symbol-summary.h (release): Move definition out of class
6957 declaration.
6958 (symtab_removal): Likewise.
6959 (symtab_duplication): Likewise.
6960
6961 2018-06-08 Martin Liska <mliska@suse.cz>
6962
6963 * symbol-summary.h (function_summary): Move constructor
6964 implementation out of class declaration.
6965 (release): Likewise.
6966 (symtab_insertion): Likewise.
6967 (symtab_removal): Likewise.
6968 (symtab_duplication): Likewise.
6969 (get): Likewise.
6970
6971 2018-06-08 Martin Liska <mliska@suse.cz>
6972
6973 * Makefile.in: Remove support for MPX (macros, related functions,
6974 fields in cgraph_node, ...).
6975 * builtin-types.def (BT_BND): Likewise.
6976 (BT_FN_BND_CONST_PTR): Likewise.
6977 (BT_FN_CONST_PTR_BND): Likewise.
6978 (BT_FN_VOID_PTR_BND): Likewise.
6979 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6980 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6981 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6982 (expand_builtin_mempcpy_with_bounds): Likewise.
6983 (expand_builtin_memset_with_bounds): Likewise.
6984 (expand_builtin_memset_args): Likewise.
6985 (std_expand_builtin_va_start): Likewise.
6986 (expand_builtin): Likewise.
6987 (expand_builtin_with_bounds): Likewise.
6988 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6989 (DEF_LIB_BUILTIN_CHKP): Likewise.
6990 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6991 (DEF_CHKP_BUILTIN): Likewise.
6992 (BUILT_IN_MEMCPY): Likewise.
6993 (BUILT_IN_MEMMOVE): Likewise.
6994 (BUILT_IN_MEMPCPY): Likewise.
6995 (BUILT_IN_MEMSET): Likewise.
6996 (BUILT_IN_STPCPY): Likewise.
6997 (BUILT_IN_STRCAT): Likewise.
6998 (BUILT_IN_STRCHR): Likewise.
6999 (BUILT_IN_STRCPY): Likewise.
7000 (BUILT_IN_STRLEN): Likewise.
7001 (BUILT_IN_MEMCPY_CHK): Likewise.
7002 (BUILT_IN_MEMMOVE_CHK): Likewise.
7003 (BUILT_IN_MEMPCPY_CHK): Likewise.
7004 (BUILT_IN_MEMSET_CHK): Likewise.
7005 (BUILT_IN_STPCPY_CHK): Likewise.
7006 (BUILT_IN_STRCAT_CHK): Likewise.
7007 (BUILT_IN_STRCPY_CHK): Likewise.
7008 * calls.c (store_bounds): Likewise.
7009 (emit_call_1): Likewise.
7010 (special_function_p): Likewise.
7011 (maybe_warn_nonstring_arg): Likewise.
7012 (initialize_argument_information): Likewise.
7013 (finalize_must_preallocate): Likewise.
7014 (compute_argument_addresses): Likewise.
7015 (expand_call): Likewise.
7016 * cfgexpand.c (expand_call_stmt): Likewise.
7017 (expand_return): Likewise.
7018 (expand_gimple_stmt_1): Likewise.
7019 (pass_expand::execute): Likewise.
7020 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7021 (cgraph_node::remove): Likewise.
7022 (cgraph_node::dump): Likewise.
7023 (cgraph_node::verify_node): Likewise.
7024 * cgraph.h (chkp_function_instrumented_p): Likewise.
7025 (symtab_node::get_alias_target): Likewise.
7026 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7027 (cgraph_local_p): Likewise.
7028 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7029 (cgraph_edge::rebuild_references): Likewise.
7030 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7031 (walk_polymorphic_call_targets): Likewise.
7032 (cgraph_node::expand_thunk): Likewise.
7033 (symbol_table::output_weakrefs): Likewise.
7034 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7035 (ix86_handle_option): Likewise.
7036 * config/i386/constraints.md: Likewise.
7037 * config/i386/i386-builtin-types.def (BND): Likewise.
7038 (VOID): Likewise.
7039 (PVOID): Likewise.
7040 (ULONG): Likewise.
7041 * config/i386/i386-builtin.def (BDESC_END): Likewise.
7042 (BDESC_FIRST): Likewise.
7043 (BDESC): Likewise.
7044 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7045 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7046 * config/i386/i386.c (enum reg_class): Likewise.
7047 (ix86_target_string): Likewise.
7048 (ix86_option_override_internal): Likewise.
7049 (ix86_conditional_register_usage): Likewise.
7050 (ix86_valid_target_attribute_inner_p): Likewise.
7051 (ix86_set_indirect_branch_type): Likewise.
7052 (ix86_set_current_function): Likewise.
7053 (ix86_function_arg_regno_p): Likewise.
7054 (init_cumulative_args): Likewise.
7055 (ix86_function_arg_advance): Likewise.
7056 (ix86_function_arg): Likewise.
7057 (ix86_pass_by_reference): Likewise.
7058 (ix86_function_value_regno_p): Likewise.
7059 (ix86_function_value_1): Likewise.
7060 (ix86_function_value_bounds): Likewise.
7061 (ix86_return_in_memory): Likewise.
7062 (ix86_setup_incoming_vararg_bounds): Likewise.
7063 (ix86_va_start): Likewise.
7064 (indirect_thunk_need_prefix): Likewise.
7065 (print_reg): Likewise.
7066 (ix86_print_operand): Likewise.
7067 (ix86_expand_call): Likewise.
7068 (ix86_output_function_return): Likewise.
7069 (reg_encoded_number): Likewise.
7070 (BDESC_VERIFYS): Likewise.
7071 (ix86_init_mpx_builtins): Likewise.
7072 (ix86_init_builtins): Likewise.
7073 (ix86_emit_cmove): Likewise.
7074 (ix86_emit_move_max): Likewise.
7075 (ix86_expand_builtin): Likewise.
7076 (ix86_builtin_mpx_function): Likewise.
7077 (ix86_get_arg_address_for_bt): Likewise.
7078 (ix86_load_bounds): Likewise.
7079 (ix86_store_bounds): Likewise.
7080 (ix86_load_returned_bounds): Likewise.
7081 (ix86_store_returned_bounds): Likewise.
7082 (ix86_class_likely_spilled_p): Likewise.
7083 (ix86_hard_regno_mode_ok): Likewise.
7084 (x86_order_regs_for_local_alloc): Likewise.
7085 (ix86_mitigate_rop): Likewise.
7086 (ix86_bnd_prefixed_insn_p): Likewise.
7087 (ix86_mpx_bound_mode): Likewise.
7088 (ix86_make_bounds_constant): Likewise.
7089 (ix86_initialize_bounds): Likewise.
7090 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7091 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7092 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7093 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7094 (TARGET_CHKP_BOUND_MODE): Likewise.
7095 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7096 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7097 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7098 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7099 * config/i386/i386.h (TARGET_MPX): Likewise.
7100 (TARGET_MPX_P): Likewise.
7101 (VALID_BND_REG_MODE): Likewise.
7102 (FIRST_BND_REG): Likewise.
7103 (LAST_BND_REG): Likewise.
7104 (enum reg_class): Likewise.
7105 (BND_REG_P): Likewise.
7106 (BND_REGNO_P): Likewise.
7107 (BNDmode): Likewise.
7108 (ADJUST_INSN_LENGTH): Likewise.
7109 * config/i386/i386.md: Likewise.
7110 * config/i386/i386.opt: Likewise.
7111 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7112 (defined): Likewise.
7113 (LINK_MPX): Likewise.
7114 (MPX_SPEC): Likewise.
7115 (LIBMPX_SPEC): Likewise.
7116 (LIBMPXWRAPPERS_SPEC): Likewise.
7117 (CHKP_SPEC): Likewise.
7118 * config/i386/predicates.md: Likewise.
7119 * dbxout.c (dbxout_type): Likewise.
7120 * doc/extend.texi: Likewise.
7121 * doc/invoke.texi: Likewise.
7122 * doc/md.texi: Likewise.
7123 * doc/tm.texi: Likewise.
7124 * doc/tm.texi.in: Likewise.
7125 * dwarf2out.c (is_base_type): Likewise.
7126 (gen_formal_types_die): Likewise.
7127 (gen_subprogram_die): Likewise.
7128 (gen_type_die_with_usage): Likewise.
7129 (gen_decl_die): Likewise.
7130 (dwarf2out_late_global_decl): Likewise.
7131 * expr.c (expand_assignment): Likewise.
7132 (emit_storent_insn): Likewise.
7133 (store_expr_with_bounds): Likewise.
7134 (store_expr): Likewise.
7135 (expand_expr_real_1): Likewise.
7136 * expr.h (store_expr_with_bounds): Likewise.
7137 * function.c (use_register_for_decl): Likewise.
7138 (struct bounds_parm_data): Likewise.
7139 (assign_parms_augmented_arg_list): Likewise.
7140 (assign_parm_find_entry_rtl): Likewise.
7141 (assign_parm_is_stack_parm): Likewise.
7142 (assign_parm_load_bounds): Likewise.
7143 (assign_bounds): Likewise.
7144 (assign_parms): Likewise.
7145 (expand_function_start): Likewise.
7146 * gcc.c (CHKP_SPEC): Likewise.
7147 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7148 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7149 (wrestrict_dom_walker::check_call): Likewise.
7150 * gimple.c (gimple_build_call_from_tree): Likewise.
7151 * gimple.h (enum gf_mask): Likewise.
7152 (gimple_call_with_bounds_p): Likewise.
7153 (gimple_call_set_with_bounds): Likewise.
7154 * gimplify.c (gimplify_init_constructor): Likewise.
7155 * ipa-cp.c (initialize_node_lattices): Likewise.
7156 (propagate_constants_across_call): Likewise.
7157 (find_more_scalar_values_for_callers_subset): Likewise.
7158 * ipa-hsa.c (process_hsa_functions): Likewise.
7159 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7160 * ipa-icf.c (sem_function::merge): Likewise.
7161 * ipa-inline.c (early_inliner): Likewise.
7162 * ipa-pure-const.c (warn_function_noreturn): Likewise.
7163 (warn_function_cold): Likewise.
7164 (propagate_pure_const): Likewise.
7165 * ipa-ref.h (enum GTY): Likewise.
7166 * ipa-split.c (find_retbnd): Likewise.
7167 (consider_split): Likewise.
7168 (split_function): Likewise.
7169 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7170 * ipa.c (walk_polymorphic_call_targets): Likewise.
7171 (symbol_table::remove_unreachable_nodes): Likewise.
7172 (process_references): Likewise.
7173 (cgraph_build_static_cdtor_1): Likewise.
7174 * lto-cgraph.c (lto_output_node): Likewise.
7175 (output_refs): Likewise.
7176 (compute_ltrans_boundary): Likewise.
7177 (input_overwrite_node): Likewise.
7178 (input_node): Likewise.
7179 (input_cgraph_1): Likewise.
7180 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7181 * passes.c (pass_manager::execute_early_local_passes): Likewise.
7182 (class pass_chkp_instrumentation_passes): Likewise.
7183 (make_pass_chkp_instrumentation_passes): Likewise.
7184 * passes.def: Likewise.
7185 * rtl.h (struct GTY): Likewise.
7186 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7187 * stor-layout.c (layout_type): Likewise.
7188 * symtab.c: Likewise.
7189 * target.def: Likewise.
7190 * targhooks.c (default_chkp_bound_type): Likewise.
7191 (default_chkp_bound_mode): Likewise.
7192 (default_builtin_chkp_function): Likewise.
7193 (default_chkp_function_value_bounds): Likewise.
7194 (default_chkp_make_bounds_constant): Likewise.
7195 (default_chkp_initialize_bounds): Likewise.
7196 * targhooks.h (default_chkp_bound_type): Likewise.
7197 (default_chkp_bound_mode): Likewise.
7198 (default_builtin_chkp_function): Likewise.
7199 (default_chkp_function_value_bounds): Likewise.
7200 (default_chkp_make_bounds_constant): Likewise.
7201 (default_chkp_initialize_bounds): Likewise.
7202 * toplev.c (compile_file): Likewise.
7203 (process_options): Likewise.
7204 * tree-core.h (DEF_BUILTIN): Likewise.
7205 (DEF_BUILTIN_CHKP): Likewise.
7206 * tree-inline.c (declare_return_variable): Likewise.
7207 (remap_gimple_stmt): Likewise.
7208 (copy_bb): Likewise.
7209 (initialize_inlined_parameters): Likewise.
7210 (expand_call_inline): Likewise.
7211 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7212 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7213 (make_pass_ipa_chkp_produce_thunks): Likewise.
7214 (make_pass_chkp): Likewise.
7215 (make_pass_chkp_opt): Likewise.
7216 (make_pass_chkp_instrumentation_passes): Likewise.
7217 * tree-pretty-print.c (dump_generic_node): Likewise.
7218 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7219 * tree-ssa-dce.c (propagate_necessity): Likewise.
7220 (eliminate_unnecessary_stmts): Likewise.
7221 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7222 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7223 * tree-ssa-sccvn.h: Likewise.
7224 * tree-ssa-strlen.c (get_string_length): Likewise.
7225 (valid_builtin_call): Likewise.
7226 (adjust_last_stmt): Likewise.
7227 (handle_builtin_strchr): Likewise.
7228 (handle_builtin_strcpy): Likewise.
7229 (handle_builtin_stxncpy): Likewise.
7230 (handle_builtin_memcpy): Likewise.
7231 (handle_builtin_strcat): Likewise.
7232 (strlen_check_and_optimize_stmt): Likewise.
7233 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7234 * tree-streamer-in.c: Likewise.
7235 * tree-streamer.c (record_common_node): Likewise.
7236 * tree.c (tree_code_size): Likewise.
7237 (wide_int_to_tree_1): Likewise.
7238 (type_contains_placeholder_1): Likewise.
7239 (build_common_tree_nodes): Likewise.
7240 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7241 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7242 (POINTER_BOUNDS_P): Likewise.
7243 (BOUNDED_TYPE_P): Likewise.
7244 (BOUNDED_P): Likewise.
7245 (CALL_WITH_BOUNDS_P): Likewise.
7246 (pointer_bounds_type_node): Likewise.
7247 * value-prof.c (gimple_ic): Likewise.
7248 * var-tracking.c (vt_add_function_parameters): Likewise.
7249 * varasm.c (make_decl_rtl): Likewise.
7250 (assemble_start_function): Likewise.
7251 (output_constant): Likewise.
7252 (maybe_assemble_visibility): Likewise.
7253 * varpool.c (ctor_for_folding): Likewise.
7254 * chkp-builtins.def: Remove.
7255 * ipa-chkp.c: Remove.
7256 * ipa-chkp.h: Remove.
7257 * rtl-chkp.c: Remove.
7258 * rtl-chkp.h: Remove.
7259 * tree-chkp-opt.c: Remove.
7260 * tree-chkp.c: Remove.
7261 * tree-chkp.h: Remove.
7262
7263 2018-06-07 Carl Love <cel@us.ibm.com>
7264
7265 * config/rs6000/vsx.md (vextract_fp_from_shorth,
7266 vextract_fp_from_shortl): Add BE support.
7267
7268 2018-06-07 Paul Koning <ni1d@arrl.net>
7269
7270 * compare-elim.c (try_merge_compare): Don't merge compare if
7271 address contains a side effect.
7272 (try_eliminate_compare): Likewise.
7273
7274 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
7275
7276 * config.gcc: Support "tremont".
7277 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7278 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7279 PROCESSOR_TREMONT.
7280 * config/i386/i386.c (m_TREMONT): Define.
7281 (processor_target_table): Add "tremont".
7282 (PTA_TREMONT): Define.
7283 (ix86_lea_outperforms): Add TARGET_TREMONT.
7284 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7285 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7286 and M_INTEL_GOLDMONT_PLUS.
7287 (fold_builtin_cpu): Add "tremont".
7288 (ix86_add_stmt_cost): Add TARGET_TREMONT.
7289 (ix86_option_override_internal): Add "tremont".
7290 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7291 (processor_type): Add PROCESSOR_TREMONT.
7292 * config/i386/x86-tune.def: Add m_TREMONT.
7293 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7294
7295 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7296
7297 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7298 symbol defined for msp430i* devices to be lower case.
7299
7300 2018-06-07 Richard Biener <rguenther@suse.de>
7301
7302 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7303 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
7304 Properly wrap signed arithmetic if overflow wraps.
7305
7306 2018-06-07 Jakub Jelinek <jakub@redhat.com>
7307
7308 PR tree-optimization/69615
7309 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7310 of a cast from a same precision integral SSA_NAME in a bb dominated
7311 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
7312 cast to utype if rhs2 has already a compatible type.
7313
7314 2018-06-07 Richard Biener <rguenther@suse.de>
7315
7316 PR tree-optimization/85935
7317 * graphite-scop-detection.c (find_params_in_bb): Analyze
7318 condition operands with respect to the correct loop. Assert
7319 the analysis doesn't fail.
7320
7321 2018-06-04 Carl Love <cel@us.ibm.com>
7322
7323 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7324 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
7325 as it is slightly cheaper.
7326 (first_match_or_eos_index_<mode>):
7327 Calculate index using natural element order.
7328 (first_match_index_<mode>):
7329 Calculate index using natural element order.
7330 (first_match_or_eos_index_<mode>):
7331 Calculate index using natural order.
7332 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7333 for BE and LE modes.
7334 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7335 P9V_BUILTIN_VCLZLSBB_V16QI.
7336 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7337 specific.
7338
7339 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7340
7341 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7342 indentation and line wrap for many prototypes. Add missing
7343 @smallexample directives around block of prototypes for vec_xl and
7344 vec_xst.
7345
7346 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
7347
7348 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7349 track if we pass or return IEEE 128-bit floating point.
7350 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7351 C++ mangling that is compatible with GCC 8.1.
7352 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7353 (init_cumulative_args): Note if we pass or return IEEE 128-bit
7354 floating point types.
7355 (rs6000_function_arg_advance_1): Likewise.
7356 (rs6000_mangle_type): Optionally generate mangled names that match
7357 what GCC 8.1 generated for IEEE 128-bit floating point types.
7358 (rs6000_globalize_decl_name): If we have an external function that
7359 passes or returns IEEE 128-bit types, generate a weak reference
7360 from the mangled name used in GCC 8.1 to the current mangled
7361 name.
7362 (rs6000_init_builtins): Make __ibm128 use the long double type if
7363 long double is IBM extended double. Make __float128 use the long
7364 double type if long double is IEEE 128-bit.
7365
7366 PR target/85657
7367 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7368 macro for __ibm128 built-in functions.
7369 (PACK_IF): Add __ibm128 pack/unpack functions.
7370 (UNPACK_IF): Likewise.
7371 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7372 enable long double built-in functions if long double is IEEE
7373 128-bit floating point.
7374 (rs6000_invalid_builtin): Update long double built-in function
7375 error message.
7376 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7377 functions, adjust the built-in function to use the long double
7378 built-in function if __ibm128 and long double are the same type.
7379 * doc/extend.texi (PowerPC builtins): Update documention for
7380 __builtin_{,un}pack_longdouble. Add documentation for
7381 __builtin_{,un}pack_ibm128.
7382
7383 2018-06-06 Jim Wilson <jimw@sifive.com>
7384
7385 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7386 (struct machine_function): New field interrupt_mode.
7387 (riscv_handle_type_attribute): New function. Add forward declaration.
7388 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7389 (riscv_expand_epilogue): Check interrupt_mode field.
7390 (riscv_set_current_function): Check interrupt attribute args and
7391 set interrupt_mode field.
7392 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7393 (riscv_sret, riscv_uret): New.
7394 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7395 new arguments to interrupt attribute.
7396
7397 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
7398
7399 PR target/63177
7400 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7401 Don't handle -mcpu=power8 if -mpower9-vector is also used.
7402
7403 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7404
7405 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7406 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7407 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7408 several redundant entries.
7409
7410 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7411
7412 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7413 type from "rtx" to "rtx_insn *".
7414 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7415 for local "call_insn", removing cast.
7416 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7417
7418 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7419
7420 PR tree-optimization/86066
7421 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7422 for BIT_INSERT_EXPR stores.
7423
7424 2018-06-06 Richard Biener <rguenther@suse.de>
7425
7426 PR tree-optimization/86062
7427 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7428 component refs ontop
7429 of to be offsetted base.
7430
7431 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7432
7433 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7434 to be static and remove check on interrupt attribute name.
7435
7436 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7437
7438 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7439 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7440
7441 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7442
7443 PR target/79924
7444 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7445 second argument.
7446 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7447 Remove second argument, change how error is called.
7448 (aarch64_layout_arg): Remove second argument from
7449 aarch64_err_no_fpadvsimd call.
7450 (aarch64_init_cumulative_args): Ditto.
7451 (aarch64_gimplify_va_arg_expr): Ditto.
7452 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7453
7454 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7455
7456 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7457 (*simple_return_indirect_internal<mode>): Rename from
7458 simple_return_indirect_internal. Use W mode iterator.
7459 (rstorssp): New expander.
7460 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7461 (clrssbsy): New expander.
7462 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7463
7464 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7465
7466 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7467 __typeof__.
7468 (cmse_check_pointed_object): Likewise.
7469
7470 2018-06-05 Martin Liska <mliska@suse.cz>
7471
7472 PR gcov-profile/47618
7473 * doc/invoke.texi: Document how -fprofile-dir format
7474 is extended.
7475
7476 2018-06-05 Richard Biener <rguenther@suse.de>
7477
7478 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7479 removal pretend DOM info isn't available so we do not update
7480 it and only remove edges, not dominated blocks. Actually free
7481 DOM info in case we removed something. Remove unreachable blocks.
7482 (mfb_keep_latches): Work with either DOM info or marked backedges.
7483 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7484 first. Mark backedges if DOM info isn't available.
7485 (Re-)compute DOM info after cleanup_control_flow_pre.
7486
7487 2018-06-05 Richard Biener <rguenther@suse.de>
7488
7489 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7490 (locus_discrim_hasher::hash): Adjust.
7491 (locus_discrim_hasher::equal): Likewise.
7492 (next_discriminator_for_locus): Work on line directly.
7493 (same_line_p): Pass in expanded locus1 as well.
7494 (assign_discriminators): Avoid redundant location expansions.
7495
7496 2018-06-05 Richard Biener <rguenther@suse.de>
7497
7498 PR tree-optimization/86046
7499 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7500 if required after clearing TREE_ADDRESSABLE.
7501
7502 2018-06-05 Richard Biener <rguenther@suse.de>
7503
7504 PR tree-optimization/86047
7505 * tree-ssa-loop.c (for_each_index): Glob handling of all
7506 decls and constants and really handle all of them.
7507
7508 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7509
7510 PR target/81497
7511 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7512 qualifier_void_pointer and qualifier_const_void_pointer.
7513 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7514 (arm_init_builtins): Handle the above.
7515 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7516 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7517 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7518 void intrinsics.
7519
7520 2018-06-05 Martin Liska <mliska@suse.cz>
7521
7522 * auto-profile.c (read_autofdo_file): Do not use
7523 gcov_ctr_summary struct.
7524 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7525 * coverage.c (struct counts_entry): Likewise.
7526 (read_counts_file): Read just single summary entry.
7527 (get_coverage_counts): Use gcov_summary struct.
7528 * coverage.h (get_coverage_counts): Likewise.
7529 * gcov-dump.c (dump_working_sets): Likewise.
7530 (tag_summary): Dump just single summary.
7531 * gcov-io.c (gcov_write_summary): Write just histogram
7532 summary.
7533 (gcov_read_summary): Read just single summary.
7534 (compute_working_sets): Use gcov_summary struct.
7535 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7536 of GCOV_COUNTERS_SUMMABLE.
7537 (GCOV_COUNTERS_SUMMABLE): Remove.
7538 (GCOV_FIRST_VALUE_COUNTER): Replace with
7539 GCOV_COUNTER_V_INTERVAL.
7540 (struct gcov_ctr_summary): Remove.
7541 (struct gcov_summary): Directly use fields of former
7542 gcov_ctr_summary.
7543 (compute_working_sets): Use gcov_summary struct.
7544 * gcov.c (read_count_file): Do not use ctrs fields.
7545 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7546 struct.
7547 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7548 struct.
7549 * profile.c: Likewise.
7550 * profile.h: Likewise.
7551
7552 2018-06-05 Martin Liska <mliska@suse.cz>
7553
7554 PR gcov-profile/84846
7555 * gcov.c (output_lines): Print working directory only
7556 in intermediate format.
7557
7558 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7559
7560 * config/s390/s390-builtin-types.def: Add void function type.
7561 * config/s390/s390-builtins.def: Use the function type for the
7562 tbeginc builtin.
7563
7564 2018-06-04 Jim Wilson <jimw@sifive.com>
7565
7566 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7567 to int.
7568 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7569 and maybe_eh_return. Change regno to unsigned int. Use new args to
7570 handle EH_RETURN_DATA_REGNO registers properly.
7571 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7572 (riscv_expand_epilogue): Update comment. Change argument name and
7573 type. Update code to use new name and type. Pass new args to
7574 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7575 EXCEPTION_RETURN.
7576 * config/riscv/riscv.md (NORMAL_RETURN): New.
7577 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7578 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7579 (eh_return): Call gen_eh_return_internal and emit barrier.
7580 (eh_return_internal): Call riscv_expand_epilogue.
7581
7582 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7583
7584 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7585 bit_insertion field and declare can_be_merged_into method.
7586 (merged_store_group::can_be_merged_into): New method.
7587 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7588 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7589 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7590
7591 2018-06-04 Richard Biener <rguenther@suse.de>
7592
7593 PR tree-optimization/85955
7594 * builtins.c (fold_builtin_sincos): Convert pointers to
7595 destination to appropriate type before dereferencing.
7596
7597 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7598
7599 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7600
7601 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7602
7603 * expr.c (expand_expr_real_1): Force the operand into memory if
7604 its TYPE_MODE is BLKmode and if there is no integer mode for
7605 the number of bits being extracted.
7606
7607 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7608
7609 PR target/85832
7610 PR target/86036
7611 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7612 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7613
7614 2018-06-04 Richard Biener <rguenther@suse.de>
7615
7616 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7617 (cleanup_tree_cfg_noloop): ... single caller. Do
7618 start_recording_case_labels later.
7619
7620 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7621
7622 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7623 to _IMMINTRIN_H_INCLUDED.
7624 * config/i386/pconfigintrin.h: Ditto.
7625 * config/i386/waitpkgintrin.h: Ditto.
7626 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7627 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7628 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7629 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7630 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7631 waitpkgintrin.h and cldemoteintrin.h.
7632
7633 2018-06-04 Richard Biener <rguenther@suse.de>
7634
7635 PR tree-optimization/86038
7636 * tracer.c (find_best_successor): Check probability for
7637 being initialized, bail out if not.
7638
7639 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7640
7641 PR target/86003
7642 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7643 of bits to ignore when comparing architectures.
7644
7645 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7646
7647 PR tree-optimization/69615
7648 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7649 maximum or minimum of the type, try to merge it also as if
7650 range1 is + [-, x - 1] or + [x + 1, -].
7651
7652 PR c++/86025
7653 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7654
7655 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7656
7657 PR tree-optimization/86034
7658 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7659 the unsigned bitfield type in a bit insertion sequence if it does not
7660 have a larger precision than the bitfield size.
7661 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7662
7663 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7664
7665 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7666
7667 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7668
7669 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7670 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7671 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7672 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7673
7674 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7675
7676 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7677 Disable -fdelete-null-pointer-checks for ELF toolchain.
7678
7679 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7680 Kito Cheng <kito.cheng@gmail.com>
7681
7682 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7683 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7684 (nds32*-*-*): Add glibc and uclibc conditions.
7685 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7686 (TARGET_EXCEPT_UNWIND_INFO): Define.
7687 * config/nds32/elf.h: New file.
7688 * config/nds32/linux.h: New file.
7689 * config/nds32/nds32-elf.opt: New file.
7690 * config/nds32/nds32-linux.opt: New file.
7691 * config/nds32/nds32-fp-as-gp.c
7692 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7693 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7694 TARGET_LINUX_ABI.
7695 (nds32_asm_file_end): Ditto.
7696 (nds32_print_operand): Ditto.
7697 (nds32_insert_attributes): Ditto.
7698 (nds32_init_libfuncs): New function.
7699 (TARGET_HAVE_TLS): Define.
7700 (TARGET_INIT_LIBFUNCS): Define.
7701 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7702 spec content.
7703 (TARGET_ELF): Apply different mcmodel setting.
7704 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7705 been migrated into elf.h and linux.h files.
7706 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7707 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7708 (mcmodel): The content has been migrated into nds32-elf.opt and
7709 nds32-linux.opt files.
7710 * config/nds32/t-elf: New file.
7711 * config/nds32/t-linux: New file.
7712
7713 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7714 Shiva Chen <shiva0217@gmail.com>
7715
7716 * config/nds32/constants.md (unspec_volatile_element): Add
7717 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7718 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7719 optimization.
7720 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7721 (make_pass_nds32_fp_as_gp): Declare.
7722 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7723 optmization pass.
7724 (nds32_asm_function_end_prologue): Remove unused asm output.
7725 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7726 (nds32_asm_file_start): Output necessary fp_as_gp information.
7727 (nds32_option_override): Adjust register usage.
7728 (nds32_expand_prologue): Consider fp_as_gp situation.
7729 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7730 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7731 (epilogue): Ditto.
7732 (return): Ditto.
7733 (simple_return): Ditto.
7734 (omit_fp_begin): Output special directive for fp_as_gp.
7735 (omit_fp_end): Output special directive for fp_as_gp.
7736 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7737 mforbid-fp-as-gp): New options.
7738
7739 2018-06-01 Mark Wielaard <mark@klomp.org>
7740
7741 * dwarf2out.c (dwarf2out_finish): Remove generation of
7742 DW_AT_loclists_base.
7743
7744 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7745
7746 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7747 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7748 (struct merged_store_group): Add bit_insertion field.
7749 (dump_char_array): Use standard hexadecimal format.
7750 (merged_store_group::merged_store_group): Set bit_insertion to false.
7751 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7752 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7753 also print the mask in the dump file.
7754 (pass_store_merging::gate): Minor tweak.
7755 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7756 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7757 stores with INTEGER_CST stores.
7758 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7759 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7760 and use it throughout. Generate bit insertion sequences if need be.
7761 (pass_store_merging::process_store): Remove redundant condition.
7762 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7763
7764 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7765
7766 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7767 the 128-bit floating point types. Fix function comment.
7768
7769 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7770
7771 * config/aarch64/aarch64-simd.md
7772 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7773 mnemonics.
7774 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7775 mnemonics.
7776
7777 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7778
7779 PR tree-optimization/85989
7780 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7781 variable.
7782 (backprop::intersect_uses): Check it when deciding whether this
7783 is a backedge reference.
7784 (backprop::process_block): Add each phi to m_visited_phis
7785 after visiting it, then clear it at the end.
7786
7787 2018-06-01 Richard Biener <rguenther@suse.de>
7788
7789 * tree-vectorizer.h (vect_dr_stmt): New function.
7790 (vect_get_load_cost): Adjust.
7791 (vect_get_store_cost): Likewise.
7792 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7793 Use vect_dr_stmt instead of DR_SMTT.
7794 (vect_record_base_alignments): Likewise.
7795 (vect_calculate_target_alignment): Likewise.
7796 (vect_compute_data_ref_alignment): Likewise and make static.
7797 (vect_update_misalignment_for_peel): Likewise.
7798 (vect_verify_datarefs_alignment): Likewise.
7799 (vector_alignment_reachable_p): Likewise.
7800 (vect_get_data_access_cost): Likewise. Pass down
7801 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7802 (vect_get_peeling_costs_all_drs): Likewise.
7803 (vect_peeling_hash_get_lowest_cost): Likewise.
7804 (vect_enhance_data_refs_alignment): Likewise.
7805 (vect_find_same_alignment_drs): Likewise.
7806 (vect_analyze_data_refs_alignment): Likewise.
7807 (vect_analyze_group_access_1): Likewise.
7808 (vect_analyze_group_access): Likewise.
7809 (vect_analyze_data_ref_access): Likewise.
7810 (vect_analyze_data_ref_accesses): Likewise.
7811 (vect_vfa_segment_size): Likewise.
7812 (vect_small_gap_p): Likewise.
7813 (vectorizable_with_step_bound_p): Likewise.
7814 (vect_prune_runtime_alias_test_list): Likewise.
7815 (vect_analyze_data_refs): Likewise.
7816 (vect_supportable_dr_alignment): Likewise.
7817 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7818 (vect_gen_prolog_loop_niters): Likewise.
7819 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7820 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7821 modify DR_STMT.
7822 (vect_recog_mask_conversion_pattern): Likewise.
7823 (vect_try_gather_scatter_pattern): Likewise.
7824 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7825 to vect_get_store_cost.
7826 (vect_get_store_cost): Get stmt_info instead of DR.
7827 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7828 (vect_get_load_cost): Get stmt_info instead of DR.
7829
7830 2018-06-01 Richard Biener <rguenther@suse.de>
7831
7832 PR middle-end/86017
7833 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7834 vars wrapped in MEM_REFs.
7835
7836 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7837
7838 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7839 Fix subreg tests so that we only return a choice between
7840 GENERAL_REGS and FP_REGS if the original classes included both.
7841
7842 2018-06-01 Richard Biener <rguenther@suse.de>
7843
7844 PR ipa/85960
7845 * tree-ssa-structalias.c (get_function_part_constraint):
7846 Handle NULL fi->decl.
7847 (find_func_aliases_for_call): Properly handle indirect
7848 fi from direct call.
7849 (find_func_clobbers): Likewise.
7850 (ipa_pta_execute): Likewise.
7851 (create_variable_info_for): For functions that are ifunc_resolver
7852 resolve to a varinfo that contains the result of the resolver call.
7853 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7854 aliases.
7855
7856 2018-05-31 Michael Collison <michael.collison@arm.com>
7857
7858 * config/aarch64/aarch64.md:
7859 (*fix_to_zero_extenddfdi2): New pattern.
7860 * gcc.target/aarch64/fix_extend1.c: New testcase.
7861
7862 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7863
7864 PR middle-end/78809
7865 PR middle-end/83026
7866 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7867 and BUILT_IN_STRNCMP_EQ.
7868 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7869 BUILT_IN_STRNCMP_EQ.
7870 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7871 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7872 (gimple_fold_builtin): Likewise.
7873 * tree-ssa-strlen.c (compute_string_length): New function.
7874 (determine_min_obsize): New function.
7875 (handle_builtin_string_cmp): New function to handle calls to
7876 string compare functions.
7877 (strlen_optimize_stmt): Add handling to builtin string compare
7878 calls.
7879 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7880 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7881 * tree.c (build_common_builtin_nodes): Add new defines of
7882 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7883
7884 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7885
7886 PR target/85984
7887 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7888 functions with naked attribute.
7889
7890 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7891
7892 * config/i386/sse.md (avx_vec_concat<mode>):
7893 Substitute concat_tg_mode mode attribute with xtg_mode.
7894 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7895 (concat_tg_mode): Remove mode attribute.
7896
7897 2018-05-31 Martin Sebor <msebor@redhat.com>
7898
7899 PR c/82063
7900 * calls.c (alloc_max_size): Correct a logic error/typo.
7901 Treat excessive arguments as infinite. Warn for invalid arguments.
7902 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7903
7904 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7905
7906 PR target/85829
7907 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7908 and movx for Haswell.
7909
7910 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7911 Cesar Philippidis <cesar@codesourcery.com>
7912
7913 PR middle-end/85879
7914 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7915 when emitting error on private/firstprivate reductions.
7916 * omp-low.c (lower_omp_target): Avoid reference-type processing
7917 on pointers for firstprivate clause.
7918
7919 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7920
7921 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7922 (st1x2): Likewise.
7923 (st1x3): Likewise.
7924 * config/aarch64/aarch64-simd.md
7925 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7926 (aarch64_ld1_x3_<mode>): Likewise
7927 (aarch64_st1x2<VALLDIF:mode>): Likewise
7928 (aarch64_st1_x2_<mode>): Likewise
7929 (aarch64_st1x3<VALLDIF:mode>): Likewise
7930 (aarch64_st1_x3_<mode>): Likewise
7931 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7932 (vld1_s8_x3): Likewise.
7933 (vld1_u16_x3): Likewise.
7934 (vld1_s16_x3): Likewise.
7935 (vld1_u32_x3): Likewise.
7936 (vld1_s32_x3): Likewise.
7937 (vld1_u64_x3): Likewise.
7938 (vld1_s64_x3): Likewise.
7939 (vld1_f16_x3): Likewise.
7940 (vld1_f32_x3): Likewise.
7941 (vld1_f64_x3): Likewise.
7942 (vld1_p8_x3): Likewise.
7943 (vld1_p16_x3): Likewise.
7944 (vld1_p64_x3): Likewise.
7945 (vld1q_u8_x3): Likewise.
7946 (vld1q_s8_x3): Likewise.
7947 (vld1q_u16_x3): Likewise.
7948 (vld1q_s16_x3): Likewise.
7949 (vld1q_u32_x3): Likewise.
7950 (vld1q_s32_x3): Likewise.
7951 (vld1q_u64_x3): Likewise.
7952 (vld1q_s64_x3): Likewise.
7953 (vld1q_f16_x3): Likewise.
7954 (vld1q_f32_x3): Likewise.
7955 (vld1q_f64_x3): Likewise.
7956 (vld1q_p8_x3): Likewise.
7957 (vld1q_p16_x3): Likewise.
7958 (vld1q_p64_x3): Likewise.
7959 (vst1_s64_x2): Likewise.
7960 (vst1_u64_x2): Likewise.
7961 (vst1_f64_x2): Likewise.
7962 (vst1_s8_x2): Likewise.
7963 (vst1_p8_x2): Likewise.
7964 (vst1_s16_x2): Likewise.
7965 (vst1_p16_x2): Likewise.
7966 (vst1_s32_x2): Likewise.
7967 (vst1_u8_x2): Likewise.
7968 (vst1_u16_x2): Likewise.
7969 (vst1_u32_x2): Likewise.
7970 (vst1_f16_x2): Likewise.
7971 (vst1_f32_x2): Likewise.
7972 (vst1_p64_x2): Likewise.
7973 (vst1q_s8_x2): Likewise.
7974 (vst1q_p8_x2): Likewise.
7975 (vst1q_s16_x2): Likewise.
7976 (vst1q_p16_x2): Likewise.
7977 (vst1q_s32_x2): Likewise.
7978 (vst1q_s64_x2): Likewise.
7979 (vst1q_u8_x2): Likewise.
7980 (vst1q_u16_x2): Likewise.
7981 (vst1q_u32_x2): Likewise.
7982 (vst1q_u64_x2): Likewise.
7983 (vst1q_f16_x2): Likewise.
7984 (vst1q_f32_x2): Likewise.
7985 (vst1q_f64_x2): Likewise.
7986 (vst1q_p64_x2): Likewise.
7987 (vst1_s64_x3): Likewise.
7988 (vst1_u64_x3): Likewise.
7989 (vst1_f64_x3): Likewise.
7990 (vst1_s8_x3): Likewise.
7991 (vst1_p8_x3): Likewise.
7992 (vst1_s16_x3): Likewise.
7993 (vst1_p16_x3): Likewise.
7994 (vst1_s32_x3): Likewise.
7995 (vst1_u8_x3): Likewise.
7996 (vst1_u16_x3): Likewise.
7997 (vst1_u32_x3): Likewise.
7998 (vst1_f16_x3): Likewise.
7999 (vst1_f32_x3): Likewise.
8000 (vst1_p64_x3): Likewise.
8001 (vst1q_s8_x3): Likewise.
8002 (vst1q_p8_x3): Likewise.
8003 (vst1q_s16_x3): Likewise.
8004 (vst1q_p16_x3): Likewise.
8005 (vst1q_s32_x3): Likewise.
8006 (vst1q_s64_x3): Likewise.
8007 (vst1q_u8_x3): Likewise.
8008 (vst1q_u16_x3): Likewise.
8009 (vst1q_u32_x3): Likewise.
8010 (vst1q_u64_x3): Likewise.
8011 (vst1q_f16_x3): Likewise.
8012 (vst1q_f32_x3): Likewise.
8013 (vst1q_f64_x3): Likewise.
8014 (vst1q_p64_x3): Likewise.
8015
8016 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8017
8018 * config/msp430/msp430.c (msp430_output_labelref): Prepend
8019 user_label_prefix to name.
8020
8021 * tree-core.h: Update comment about the format of NAME string
8022 passed to handler in attribute_spec.
8023
8024 * config/msp430/msp430.md: Remove erroneous subreg expression from
8025 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8026 zero_extend{q,h}isi2.
8027
8028 2018-05-30 Borislav Petkov <bp@suse.de>
8029
8030 * doc/extend.texi: Document some architecture specific
8031 constraints and sort entries.
8032
8033 2018-05-30 Martin Sebor <msebor@redhat.com>
8034
8035 PR middle-end/85369
8036 * builtins.c (expand_builtin_stpcpy_1): New function.
8037 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8038 only if the former succeeds.
8039
8040 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8041
8042 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8043 in saphira.
8044
8045 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8046
8047 * doc/invoke.texi (-flinker-output): Document
8048
8049 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8050
8051 * passes.c (ipa_write_summaries): Only modify statements if body
8052 is in memory.
8053 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8054 incrementally linking.
8055 (ipa_passes): Likewise.
8056 * lto-cgraph.c (lto_output_node): When incrementally linking do not
8057 pass down resolution info.
8058 * common.opt (flag_incremental_link): Update info.
8059 * gcc.c (plugin specs): Turn flinker-output=* to
8060 -plugin-opt=-linker-output-known
8061 * toplev.c (compile_file): Also cut compilation when doing incremental
8062 link.
8063 * flag-types. (enum lto_partition_model): Add
8064 LTO_LINKER_OUTPUT_NOLTOREL.
8065 (invoke.texi): Add -flinker-output docs.
8066 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8067 link same way as WPA; do not stream in dead initializers.
8068
8069 * dwarf2out.c (dwarf2out_die_ref_for_decl,
8070 darf2out_register_external_decl): Support incremental link.
8071
8072 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8073
8074 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8075
8076 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8077
8078 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8079 it down to simple_object_copy_lto_debug_sections.
8080 (run_gcc): Determine incremental LTO link time and configure
8081 lto1 into non-wpa mode, disable renaming of debug sections.
8082
8083 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
8084
8085 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8086 descriptions of various incorrectly documented functions.
8087
8088 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
8089
8090 Revert:
8091 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8092 address check not strict.
8093
8094 2018-05-30 Richard Biener <rguenther@suse.de>
8095
8096 PR tree-optimization/85964
8097 * tracer.c (better_p): Drop initialized count check, we only
8098 call the function with initialized counts now.
8099 (find_best_successor): Do find a best edge if one
8100 has uninitialized count.
8101 (find_best_predecessor): Likewise. Do BB frequency check only
8102 if count is initialized.
8103
8104 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
8105
8106 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8107 (aarch64_ldrstr_offset_compare): New.
8108 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8109 load/store orderings.
8110 (aarch64_gen_adjusted_ldpstp): Likewise.
8111
8112 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
8113
8114 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8115 Check for subset of GENERAL_REGS and FP_REGS.
8116 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8117 r=w alternative.
8118
8119 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
8120
8121 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8122 and wi::to_poly_offset. Add the current offset and then check
8123 whether the sum fits, rather than using an unchecked addition of
8124 a checked term. Check for a shwi rather than a uhwi.
8125 * expr.c (get_bit_range): Use tree_to_poly_uint64.
8126 (store_constructor): Use poly_int_tree_p.
8127 (expand_expr_real_1): Likewise.
8128 * function.c (assign_temp): Likewise.
8129 * fold-const.c (const_binop): Use poly_int_tree_p and
8130 wi::to_poly_offset.
8131 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
8132 division.
8133 * ipa-icf-gimple.c (func_checker::compare_operand): Use
8134 to_poly_offset for MEM offsets.
8135 * ipa-icf.c (sem_variable::equals): Likewise.
8136 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8137 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8138 wi::to_poly_offset for BIT_FIELD_REF offsets.
8139 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8140 wi::to_poly_offset.
8141 * var-tracking.c (emit_note_insn_var_location): Use
8142 tree_to_poly_uint64.
8143
8144 2018-05-29 Jim Wilson <jimw@sifive.com>
8145
8146 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8147
8148 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
8149
8150 PR target/85950
8151 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8152 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8153 sequence.
8154 (sse4_1_round<mode>2): Use nonimmediate_operand
8155 for operand 1 predicate.
8156
8157 2018-05-29 Martin Sebor <msebor@redhat.com>
8158 Richard Biener <rguenther@suse.de>
8159
8160 PR testsuite/85888
8161 * calls.c (get_size_range): Call determine_value_range instead
8162 of get_value_range..
8163 * tree-vrp.h (determine_value_range): Declared new function.
8164 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8165
8166 2018-05-29 Richard Biener <rguenther@suse.de>
8167
8168 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8169 sure to use non-pattern stmts for get_earlier_stmt arguments.
8170 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8171 called on pattern stmts.
8172 (get_later_stmt): Likewise.
8173
8174 2018-05-29 Martin Liska <mliska@suse.cz>
8175
8176 PR gcov-profile/85759
8177 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8178 env variables.
8179
8180 2018-05-29 Jakub Jelinek <jakub@redhat.com>
8181
8182 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8183 VEC_UNPACK_*_EXPR.
8184 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8185 VEC_PACK_*_EXPR.
8186
8187 PR target/85918
8188 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8189 VEC_PACK_FLOAT_EXPR): New tree codes.
8190 * tree-pretty-print.c (op_code_prio): Handle
8191 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8192 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8193 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8194 * tree-inline.c (estimate_operator_cost): Likewise.
8195 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8196 * fold-const.c (const_binop): Likewise.
8197 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8198 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8199 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8200 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8201 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8202 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8203 * expr.c (expand_expr_real_2): Likewise.
8204 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8205 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8206 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8207 optabs.
8208 * optabs.c (expand_widen_pattern_expr): For
8209 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8210 sign from result type rather than operand's type.
8211 (expand_binop_directly): For vec_packu_float_optab and
8212 vec_packs_float_optab allow result type to be different from operand's
8213 type.
8214 * optabs-tree.c (optab_for_tree_code): Handle
8215 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8216 VEC_PACK_FLOAT_EXPR. Formatting fixes.
8217 * tree-vect-generic.c (expand_vector_operations_1): Handle
8218 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8219 VEC_PACK_FLOAT_EXPR.
8220 * tree-vect-stmts.c (supportable_widening_operation): Handle
8221 FIX_TRUNC_EXPR.
8222 (supportable_narrowing_operation): Handle FLOAT_EXPR.
8223 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8224 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8225 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
8226 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8227 mode attributes.
8228 (vec_pack<floatprefix>_float_<mode>): New expander.
8229 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8230 attributes.
8231 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8232 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8233 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8234 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8235 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8236 Document.
8237 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8238 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8239 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8240 VEC_PACK_FLOAT_EXPR): Document.
8241
8242 2018-05-29 Richard Biener <rguenther@suse.de>
8243
8244 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8245 member.
8246 (stmt_vec_info_vec): Make pointer.
8247 (init_stmt_vec_info_vec): Remove.
8248 (free_stmt_vec_info_vec): Likewise.
8249 (set_stmt_vec_info_vec): New function.
8250 (free_stmt_vec_infos): Likewise.
8251 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8252 (set_vinfo_for_stmt): Likewise.
8253 (get_earlier_stmt): Likewise.
8254 (get_later_stmt): Likewise.
8255 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8256 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8257 (vec_info::~vec_info): Free stmt_vec_infos.
8258 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8259 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8260 (pass_slp_vectorize::execute): Likewise.
8261 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8262 (free_stmt_vec_info_vec): Likewise.
8263 (set_stmt_vec_info_vec): New function.
8264 (free_stmt_vec_infos): Likewise.
8265 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8266 the global stmt_vec_info_vec.
8267 * tree-parloops.c (gather_scalar_reductions): Use
8268 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8269 vector.
8270
8271 2018-05-29 Richard Biener <rguenther@suse.de>
8272
8273 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8274
8275 2018-05-29 Martin Liska <mliska@suse.cz>
8276 David Malcolm <dmalcolm@redhat.com>
8277
8278 * vec.c (test_reverse): New.
8279 (vec_c_tests): Add new test.
8280 * vec.h (vl_ptr>::reverse): New function.
8281
8282 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
8283
8284 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8285
8286 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8287 and later.
8288
8289 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
8290
8291 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8292
8293 2018-05-28 Richard Biener <rguenther@suse.de>
8294
8295 PR tree-optimization/85933
8296 * tree-vect-data-refs.c (vect_record_base_alignments): Only
8297 look at stmts marked as vectorizable.
8298
8299 2018-05-28 Richard Biener <rguenther@suse.de>
8300
8301 PR tree-optimization/85934
8302 * tree-vect-generic.c (expand_vector_operations_1): Hoist
8303 vector boolean check before scalar optimization.
8304
8305 2018-05-28 Jakub Jelinek <jakub@redhat.com>
8306
8307 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8308 for armv5te.
8309
8310 2018-05-28 Mark Wielaard <mark@klomp.org>
8311
8312 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8313 if it is an expression containing a minus sign.
8314
8315 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
8316
8317 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8318
8319 2018-05-27 Paul Koning <ni1d@arrl.net>
8320
8321 * config/pdp11/pdp11.md (truncsihi2): Remove.
8322
8323 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
8324 Chung-Ju Wu <jasonwucj@gmail.com>
8325
8326 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8327 implementation.
8328 (unaligned_store_dw): Ditto.
8329 * config/nds32/nds32-memory-manipulation.c
8330 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8331 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8332 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8333 (emit_setmem_word_loop): Rename to ...
8334 (emit_setmem_doubleword_loop): ... this.
8335 (nds32_gen_dup_4_byte_to_word_value): New function.
8336 (nds32_gen_dup_8_byte_to_double_word_value): New function.
8337 (nds32_expand_setmem_loop): Refine implementation.
8338 (nds32_expand_setmem_loop_v3m): Ditto.
8339 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8340 pattern.
8341
8342 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8343
8344 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8345
8346 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8347
8348 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8349 (nds32_init_machine_status): Initialize machine->attr_naked_p and
8350 machine->attr_no_prologue_p.
8351 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8352 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8353 (nds32_expand_epilogue): Consider attr_naked_p.
8354 (nds32_expand_epilogue_v3pop): Likewise.
8355 (nds32_can_use_return_insn): Likewise.
8356 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8357 attr_no_prologue_p fields.
8358 * config/nds32/nds32.opt (mret-in-naked-func): New option.
8359
8360 2018-05-27 Jakub Jelinek <jakub@redhat.com>
8361
8362 PR target/85918
8363 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8364 attributes.
8365 * config/i386/sse.md
8366 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8367 Rename to ...
8368 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8369 ... this.
8370 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8371 Rename to ...
8372 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8373 ... this.
8374 (*<floatsuffix>floatv2div2sf2): Rename to ...
8375 (*float<floatunssuffix>v2div2sf2): ... this.
8376 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8377 (float<floatunssuffix>v2div2sf2_mask): ... this.
8378 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8379 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8380 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8381 to ...
8382 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8383 ... this.
8384 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8385 Rename to ...
8386 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8387 ... this.
8388 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8389 Rename to ...
8390 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8391 ... this.
8392 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8393 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8394 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8395 gen_ufix_truncv8dfv8si2.
8396 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8397 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8398 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8399 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8400 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8401 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8402 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8403 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8404
8405 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8406
8407 PR target/85900
8408 PR target/85345
8409 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8410
8411 2018-05-25 Jim Wilson <jimw@sifive.com>
8412
8413 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8414 * config/riscv/riscv.c (struct machine_function): Add
8415 interrupt_handler_p and attribute_checked_p fields.
8416 (riscv_attribute_table): Add interrupt.
8417 (riscv_interrupt_type_p): New.
8418 (riscv_save_reg_p): Save extra regs for interrupt handler.
8419 (riscv_use_save_libcall): Return false for interrupt handler.
8420 (riscv_first_stack_step): Add forward declaration.
8421 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8422 for interrupt handler with large frame. Use it for saved reg list.
8423 (riscv_expand_prologue): Move flag_stack_usage_info support to
8424 eliminate duplication.
8425 (riscv_expand_epilogue): Generate mret for interrupt handler.
8426 (riscv_epilogue_uses): New.
8427 (riscv_can_use_return_insn): Return false for interrupt handler.
8428 (riscv_function_ok_for_sibcall): Likewise.
8429 (riscv_set_current_function): Add interrupt handler support.
8430 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8431 * config/riscv/riscv.md (UNSPECV_MRET): New.
8432 (GP_REGNUM): New.
8433 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8434 (riscv_mret): New.
8435 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8436
8437 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8438
8439 PR tree-optimization/85712
8440 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8441 this candidate has already been replaced in-situ by a copy.
8442
8443 2018-05-25 Jason Merrill <jason@redhat.com>
8444
8445 PR c++/80485 - inline function non-zero address.
8446 * symtab.c (nonzero_address): Check DECL_COMDAT.
8447
8448 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8449
8450 PR target/83628
8451 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8452 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8453 extension of SImode operation. Use const123_operand predicate.
8454 (*saddsi_1): Remove.
8455 (*saddl_se_1): Ditto.
8456 (*ssubsi_1): Ditto.
8457 (*ssubl_se_1): Ditto.
8458 * config/alpha/predicates.md (const123_operand): New predicate.
8459 * config/alpha/constraints.md (P): Use IN_RANGE.
8460
8461 2018-05-25 Richard Biener <rguenther@suse.de>
8462
8463 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8464 defaulted to true.
8465 (ref_maybe_used_by_stmt_p): Likewise.
8466 (stmt_may_clobber_ref_p): Likewise.
8467 (stmt_may_clobber_ref_p_1): Likewise.
8468 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8469 and pass it along.
8470 (ref_maybe_used_by_stmt_p): Likewise.
8471 (stmt_may_clobber_ref_p): Likewise.
8472 (stmt_may_clobber_ref_p_1): Likewise.
8473 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8474 the alias oracle to disambiguate DRs with stmts DR analysis
8475 couldn't handle.
8476 (vect_analyze_data_refs): Do not give up on not analyzable
8477 DRs for BB vectorization. Remove code truncating the dataref
8478 vector.
8479
8480 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8481
8482 PR target/85832
8483 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8484 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8485 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8486
8487 2018-05-25 Richard Biener <rguenther@suse.de>
8488
8489 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8490 function, combining stmt data ref gathering and fatal analysis
8491 parts.
8492 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8493 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8494 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8495 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8496 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8497
8498 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8499
8500 PR tree-optimization/85720
8501 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8502 SCC if all partitions are builtins.
8503 (version_loop_by_alias_check): New parameter. Generate cancelable
8504 runtime alias check if all partitions are builtins.
8505 (distribute_loop): Update call to above function.
8506
8507 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8508
8509 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8510 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8511 (parm_default_def_partition_arg): Ditto.
8512 (set_parm_default_def_partition): Ditto.
8513 (get_parm_default_def_partitions): Ditto and make it static.
8514 (get_undefined_value_partitions): Ditto and make it static.
8515 (remove_ssa_form): Refactor call to init_var_map here.
8516 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8517 computation for loop region.
8518 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8519 (register_default_def): Delete.
8520 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8521 (parm_default_def_partition_arg): Ditto.
8522 (set_parm_default_def_partition): Ditto.
8523 (get_parm_default_def_partitions): Ditto and make it static.
8524 (get_undefined_value_partitions): Ditto and make it static.
8525 (coalesce_with_default, coalesce_with_default): Update comment.
8526 (create_coalesce_list_for_region): New func factored out from
8527 create_outofssa_var_map.
8528 (populate_coalesce_list_for_outofssa): New func factored out from
8529 create_outofssa_var_map and coalesce_ssa_name.
8530 (create_outofssa_var_map): Delete.
8531 (coalesce_ssa_name): Refactor to support live range computation.
8532 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8533 (get_parm_default_def_partitions): Delete.
8534 (get_undefined_value_partitions): Ditto.
8535 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8536 computation for loop region.
8537 (new_tree_live_info, loe_visit_block): Ditto.
8538 (live_worklist, set_var_live_on_entry): Ditto.
8539 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8540 * tree-ssa-live.h (struct _var_map): New fields.
8541 (init_var_map): Change decl.
8542 (region_contains_p): New.
8543
8544 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8545
8546 * tree-ssa-live.h (live_merge_and_clear): Delete.
8547
8548 2018-05-25 Richard Biener <rguenther@suse.de>
8549
8550 PR c++/85912
8551 * tree-dump.c (dequeue_and_dump): Remove access to removed
8552 operand 2 of a SWITCH_EXPR.
8553
8554 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8555
8556 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8557 multiplication and division.
8558 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8559 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8560 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8561 (cond_udiv_optab, cond_umod_optab): New optabs.
8562 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8563 (IFN_COND_RDIV): New internal functions.
8564 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8565 TRUNC_MOD_EXPR and RDIV_EXPR.
8566 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8567 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8568 New unspecs.
8569 (SVE_INT_BINARY): Include mult.
8570 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8571 (optab, sve_int_op): Handle mult.
8572 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8573 UNSPEC_COND_DIV.
8574 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8575 for SVE_INT_BINARY_SD.
8576
8577 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8578
8579 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8580 (optab, sve_int_op): Handle div and udiv.
8581 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8582 for SVE_INT_BINARY_SD.
8583 (*<optab><mode>3): New insn for the same.
8584
8585 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8586
8587 * tree-vect-patterns.c: Include predict.h.
8588 (vect_recog_divmod_pattern): Restrict check for division support
8589 to when optimizing for size.
8590
8591 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8592
8593 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8594 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8595 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8596 (gimple_match_op::set_op): Likewise.
8597 (gimple_resimplify4): Declare.
8598 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8599 (expr::gen_transform): Likewise.
8600 (decision_tree::gen): Generate a simplification routine for 4 operands.
8601 * gimple-match-head.c (gimple_simplify): Add an overload for
8602 4 operands. In the top-level function, handle up to 4 call
8603 arguments and call gimple_resimplify4.
8604 (gimple_resimplify4): New function.
8605 (build_call_internal): Pass a fourth operand.
8606 (maybe_push_to_seq): Likewise.
8607 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8608 Fold VEC_COND_EXPRs of an operation and a default value into
8609 an IFN_COND_* function if possible.
8610 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8611 New unspecs.
8612 (SVE_COND_FP_BINARY): Include them.
8613 (optab, sve_fp_op): Handle them.
8614 (SVE_INT_BINARY_REV): New code iterator.
8615 (SVE_COND_FP_BINARY_REV): New int iterator.
8616 (commutative): New int attribute.
8617 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8618 Declare.
8619 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8620 function.
8621 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8622 (*cond_<optab><mode>): New patterns for reversed operands.
8623
8624 2018-05-25 Richard Biener <rguenther@suse.de>
8625
8626 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8627 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8628 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8629 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8630 * tree-vect-data-refs.c (everywhere): Adjust users.
8631 * tree-vect-loop.c (everywhere): Likewise.
8632 * tree-vect-slp.c (everywhere): Likewise.
8633 * tree-vect-stmts.c (everywhere): Likewise.
8634 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8635
8636 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8637
8638 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8639 Rename to...
8640 (gcc_cv_as_section_exclude): ... this.
8641 Try Solaris as #exclude syntax.
8642 * configure: Regenerate.
8643 * config.in: Regenerate.
8644 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8645 SECTION_EXCLUDE.
8646 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8647 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8648
8649 * varasm.c (default_elf_asm_named_section): Don't check if
8650 HAVE_GAS_SECTION_EXCLUDE is defined.
8651
8652 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8653
8654 * doc/md.texi: Update the documentation of the cond_* optabs
8655 to mention the new final operand. Fix GET_MODE_NUNITS call.
8656 Describe the scalar case too.
8657 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8658 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8659 instead of 2.
8660 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8661 (get_conditional_internal_fn): Update comment.
8662 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8663 accumulator value as a final argument to conditional functions.
8664 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8665 a define_expand and add an "else" operand. Assert for now that
8666 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8667 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8668 (*cond_<optab><mode>): New patterns.
8669 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8670 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8671 (UNSPEC_COND_EOR): Delete.
8672 (optab): Remove associated mappings.
8673 (SVE_INT_BINARY): New code iterator.
8674 (sve_int_op): Remove int attribute and add "minus" to the code
8675 attribute.
8676 (SVE_COND_INT_OP): Delete.
8677 (SVE_COND_FP_OP): Rename to...
8678 (SVE_COND_FP_BINARY): ...this.
8679
8680 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8681
8682 * optabs.c (can_reuse_operands_p): New function.
8683 (maybe_legitimize_operands): Try to reuse the results for
8684 earlier operands.
8685
8686 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8687
8688 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8689 Add {q} suffix to insn mnemonic.
8690
8691 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8692
8693 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8694 (msp430_warn_func_return): New.
8695
8696 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8697
8698 * fold-const.c (tree_nonzero_bits): New function.
8699 * fold-const.h (tree_nonzero_bits): Likewise.
8700 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8701 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8702
8703 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8704
8705 PR target/85900
8706 PR target/85345
8707 * varasm.c (assemble_alias): Check ifunc_resolver only on
8708 FUNCTION_DECL.
8709
8710 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8711
8712 PR target/85903
8713 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8714 when memory input operand is handled.
8715
8716 2018-05-24 Luis Machado <luis.machado@linaro.org>
8717
8718 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8719 global.
8720 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8721
8722 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8723
8724 * match.pd: Delay FMA folds until after vectorization.
8725
8726 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8727
8728 PR target/83009
8729 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8730 address check not strict.
8731
8732 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8733
8734 * gimple-match.h (gimple_match_op): New class.
8735 (mprts_hook): Replace parameters with a gimple_match_op *.
8736 (maybe_build_generic_op): Likewise.
8737 (gimple_simplified_result_is_gimple_val): Replace parameters with
8738 a const gimple_match_op *.
8739 (gimple_simplify): Replace code_helper * and tree * parameters with
8740 a gimple_match_op * parameter.
8741 (gimple_resimplify1): Replace code_helper *, tree and tree *
8742 parameters with a gimple_match_op * parameter.
8743 (gimple_resimplify2): Likewise.
8744 (gimple_resimplify3): Likewise.
8745 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8746 parameters with a gimple_match_op * parameter.
8747 * gimple-match-head.c (gimple_simplify): Change prototypes of
8748 auto-generated functions to take a gimple_match_op * instead of
8749 separate code_helper * and tree * parameters. Make the same
8750 change in the top-level overload and update calls to the
8751 gimple_resimplify routines. Update calls to the auto-generated
8752 functions and to maybe_push_res_to_seq in the publicly-facing
8753 operation-specific gimple_simplify overloads.
8754 (gimple_match_op::MAX_NUM_OPS): Define.
8755 (gimple_resimplify1): Replace rcode and ops with a single res_op
8756 parameter. Update call to gimple_simplify.
8757 (gimple_resimplify2): Likewise.
8758 (gimple_resimplify3): Likewise.
8759 (mprts_hook): Replace parameters with a gimple_match_op *.
8760 (maybe_build_generic_op): Likewise.
8761 (build_call_internal): Replace type, nargs and ops with
8762 a gimple_match_op *.
8763 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8764 with a single gimple_match_op *. Update calls to mprts_hook,
8765 build_call_internal and gimple_simplified_result_is_gimple_val.
8766 Factor out code that is common to the tree_code and combined_fn cases.
8767 * genmatch.c (expr::gen_transform): Replace tem_code and
8768 tem_ops with a gimple_match_op called tem_op. Update calls
8769 to the gimple_resimplify functions and maybe_push_res_to_seq.
8770 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8771 res_ops. Update call to the gimple_resimplify functions.
8772 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8773 (decision_tree::gen): Make the functions take a gimple_match_op *
8774 called res_op instead of separate res_code and res_ops parameters.
8775 Update call accordingly.
8776 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8777 and ops with a single res_op parameter. Update calls to
8778 maybe_build_generic_op and maybe_push_res_to_seq.
8779 (fold_stmt_1): Update calls to gimple_simplify and
8780 replace_stmt_with_simplification.
8781 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8782 and gimple_simplified_result_is_gimple_val.
8783 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8784 gimple_simplify.
8785 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8786 with a gimple_match_op *.
8787 (vn_nary_build_or_lookup): Likewise. Update call to
8788 vn_nary_build_or_lookup_1.
8789 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8790 gimple_match_op *. Update calls to the gimple_resimplify routines
8791 and to gimple_simplified_result_is_gimple_val.
8792 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8793 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8794 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8795 (visit_nary_op): Likewise.
8796 (visit_reference_op_load): Likewise.
8797
8798 2018-05-23 Luis Machado <luis.machado@linaro.org>
8799
8800 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8801 modifier for printing the step amount.
8802
8803 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8804
8805 PR target/78849
8806 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8807 types.
8808
8809 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8810
8811 * doc/sourcebuild.texi (Endianness): New subsubsection.
8812
8813 2018-05-23 Luis Machado <luis.machado@linaro.org>
8814
8815 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8816 <prefetch_dynamic_strides>: New const bool field.
8817 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8818 prefetch_dynamic_strides.
8819 (exynosm1_prefetch_tune): Likewise.
8820 (thunderxt88_prefetch_tune): Likewise.
8821 (thunderx_prefetch_tune): Likewise.
8822 (thunderx2t99_prefetch_tune): Likewise.
8823 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8824 false.
8825 (aarch64_override_options_internal): Update to set
8826 PARAM_PREFETCH_DYNAMIC_STRIDES.
8827 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8828 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8829 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8830 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8831 prefetch-dynamic-strides setting.
8832
8833 2018-05-23 Luis Machado <luis.machado@linaro.org>
8834
8835 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8836 <minimum_stride>: New const int field.
8837 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8838 minimum_stride field defaulting to -1.
8839 (exynosm1_prefetch_tune): Likewise.
8840 (thunderxt88_prefetch_tune): Likewise.
8841 (thunderx_prefetch_tune): Likewise.
8842 (thunderx2t99_prefetch_tune): Likewise.
8843 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8844 <default_opt_level>: Set to 3.
8845 (aarch64_override_options_internal): Update to set
8846 PARAM_PREFETCH_MINIMUM_STRIDE.
8847 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8848 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8849 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8850 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8851 stride is constant and is below the minimum stride threshold.
8852
8853 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8854
8855 * config/arm/arm-cpus.in (mode26): Delete.
8856 (armv4): Delete mode26 reference.
8857 * config/arm/arm.c (arm_configure_build_target): Delete use of
8858 isa_bit_mode26.
8859
8860 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8861
8862 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8863 New insn pattern.
8864 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8865 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8866 for non-SSE modes.
8867 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8868 (floatunsdidf2): Ditto.
8869
8870 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8871
8872 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8873 (fixuns_trunc<mode>si2_avx512f): Ditto.
8874 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8875 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8876 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8877
8878 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8879
8880 PR rtl-optimization/79985
8881 * df-scan.c (df_insn_refs_collect): Remove special case for
8882 global registers and asm statements.
8883
8884 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8885
8886 * extend.texi (Global Register Variables): Rewrite the bullet list.
8887 Note that the register is available for allocation. Note that access
8888 via inline asm must use constraints. Add note about async-signal
8889 handlers. Remove paragraph about automagic register selection.
8890
8891 2018-05-23 Richard Biener <rguenther@suse.de>
8892
8893 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8894 of fixed offset from memset VN.
8895
8896 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8897
8898 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8899 first_interp field.
8900 (alloc_cand_and_find_basis): Initialize first_interp field.
8901 (slsr_process_mul): Modify first_interp field.
8902 (slsr_process_add): Likewise.
8903 (slsr_process_cast): Modify first_interp field for each new
8904 interpretation.
8905 (slsr_process_copy): Likewise.
8906 (dump_candidate): Dump first_interp field.
8907 (replace_mult_candidate): Process all interpretations, not just
8908 subsequent ones.
8909 (replace_rhs_if_not_dup): Likewise.
8910 (replace_one_candidate): Likewise.
8911
8912 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8913
8914 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8915 Add new boolean.
8916 (aarch64_needs_frame_chain): New function.
8917 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8918
8919 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8920
8921 PR target/84882
8922 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8923 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8924 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8925 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8926 as true for strict-align.
8927 (aarch64_can_inline_p): Perform checks even when callee has no
8928 attributes to check for strict alignment.
8929 * doc/extend.texi (AArch64 Function Attributes): Document
8930 no-strict-align.
8931 * doc/invoke.texi: (AArch64 Options): Likewise.
8932
8933 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8934
8935 PR tree-optimization/85853
8936 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8937 the handling of the root of the node to...
8938 (vect_slp_analyze_node_operations_1): ...this new function,
8939 and run the whole thing with the child nodes' def types
8940 set according to their SLP node's def type.
8941
8942 2018-05-23 Richard Biener <rguenther@suse.de>
8943
8944 PR middle-end/85874
8945 * tree-data-ref.c (create_runtime_alias_checks): Defer
8946 and ignore overflow warnings.
8947
8948 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8949
8950 PR tree-optimization/85822
8951 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8952 constants.
8953
8954 2018-05-23 Richard Biener <rguenther@suse.de>
8955
8956 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8957 memset constants via native_interpret_expr.
8958
8959 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8960
8961 PR target/85345
8962 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8963 attribute.
8964 (cgraph_node::create_alias): Likewise.
8965 (cgraph_node::get_availability): Check ifunc_resolver instead
8966 of looking up ifunc attribute.
8967 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8968 * varasm.c (do_assemble_alias): Likewise.
8969 (assemble_alias): Likewise.
8970 (default_binds_local_p_3): Likewise.
8971 * cgraph.h (cgraph_node): Add ifunc_resolver.
8972 (cgraph_node::only_called_directly_or_aliased_p): Return false
8973 for IFUNC resolver.
8974 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8975 attribute.
8976 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8977 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8978 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8979 instead of looking up ifunc attribute.
8980
8981 2018-05-22 Luis Machado <luis.machado@linaro.org>
8982
8983 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8984
8985 2018-05-22 Martin Sebor <msebor@redhat.com>
8986
8987 PR middle-end/85359
8988 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8989 only when expasion succeeds.
8990 (expand_builtin_strcmp): Same.
8991 (expand_builtin_strncmp): Same.
8992
8993 2018-05-22 Martin Sebor <msebor@redhat.com>
8994
8995 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8996
8997 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8998 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8999
9000 * config/aarch64/aarch64-ldpstp.md: Replace uses of
9001 aarch64_mem_pair_operand with memory_operand and delete operand swapping
9002 code.
9003 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9004 Add check for legitimate_address.
9005 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9006 (aarch64_swap_ldrstr_operands): New.
9007 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9008 Define prototype.
9009
9010 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9011 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9012
9013 * config/aarch64/aarch64.md: New patterns to generate stp
9014 and ldp.
9015 (store_pair_sw, store_pair_dw): New patterns to generate stp for
9016 single words and double words.
9017 (load_pair_sw, load_pair_dw): Likewise.
9018 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9019 Delete.
9020 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9021 Delete.
9022 * config/aarch64/aarch64-ldpstp.md: Modify peephole
9023 for different mode ldpstp and add peephole for merged zero stores.
9024 Likewise for loads.
9025 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9026 Add size check.
9027 (aarch64_gen_store_pair): Rename calls to match new patterns.
9028 (aarch64_gen_load_pair): Rename calls to match new patterns.
9029 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9030 (load_pair<DREG:mode><DREG2:mode>): ... This.
9031 (store_pair<mode>): Rename to...
9032 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9033 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9034 New mode iterators.
9035 (V_INT_EQUIV): Handle SImode.
9036 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9037 New predicate.
9038
9039 2018-05-22 Martin Sebor <msebor@redhat.com>
9040
9041 PR c/85623
9042 * calls.c (maybe_warn_nonstring_arg): Use string length to set
9043 or ajust the presumed bound on an operation to avoid unnecessary
9044 warnings.
9045
9046 2018-05-22 Martin Sebor <msebor@redhat.com>
9047
9048 PR tree-optimization/85826
9049 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9050 assuming that a DECL necesarily has a constant size.
9051
9052 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
9053
9054 PR middle-end/85862
9055 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9056
9057 2018-05-22 Richard Biener <rguenther@suse.de>
9058
9059 PR tree-optimization/85834
9060 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9061 non-constant and non-zero memset arguments.
9062
9063 2018-05-22 Martin Liska <mliska@suse.cz>
9064
9065 PR ipa/85607
9066 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9067
9068 2018-05-22 Richard Biener <rguenther@suse.de>
9069
9070 PR tree-optimization/85863
9071 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9072 comparisons when vectype is specified.
9073 (vectorizable_condition): Do not specify vectype for
9074 vect_is_simple_cond when SLP vectorizing.
9075
9076 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
9077
9078 PR target/85657
9079 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9080 define __ibm128 as long double.
9081 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9082 as a distinct type when IEEE 128-bit support is enabled.
9083 (init_float128_ieee): Fix up conversions between IFmode and IEEE
9084 128-bit types to use the correct functions.
9085 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9086 convert between 128-bit floating point types that have different
9087 modes but the same representation, instead of using gen_lowpart to
9088 makean alias.
9089 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9090 KFmode.
9091 (IFKF_reg): New attributes to give the register constraints for
9092 IFmode and KFmode.
9093 (extend<mode>tf2_internal): New insns to mark an explicit
9094 conversion between 128-bit floating point types that have a
9095 different mode but share the same representation.
9096
9097 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
9098
9099 PR tree-optimization/85814
9100 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9101 a null return from get_strinfo when unsharing the next
9102 strinfo in the chain.
9103
9104 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9105
9106 PR gcc/84923
9107 * varasm.c (weak_finish): Clean up weak_decls.
9108
9109 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9110
9111 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9112 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9113 UNSPEC_UADALP values.
9114 * config/aarch64/iterators.md (ABAL): New int iterator.
9115 (ABDL2): Likewise.
9116 (ADALP): Likewise.
9117 (sur): Add mappings for the above.
9118 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9119 New define_insn.
9120 (aarch64_<sur>abal<mode>_4): Likewise.
9121 (aarch64_<sur>adalp<mode>_3): Likewise.
9122 (<sur>sadv16qi): New define_expand.
9123
9124 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
9125
9126 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9127 (*movdf_internal): Ditto.
9128 (*rcpsf2_sse): Ditto.
9129 (*rsqrtsf2_sse): Ditto.
9130 (*sqrt<mode>2_sse): Ditto.
9131
9132 2018-05-21 Tamar Christina <tamar.christina@arm.com>
9133
9134 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9135 eor3q<mode>4.
9136 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9137 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9138 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9139 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9140 vbcaxq_s64): New.
9141 * config/aarch64/arm_neon.h: Likewise.
9142 * config/aarch64/iterators.md (VQ_I): New.
9143
9144 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
9145
9146 * config.gcc: Add arc/t-multilib-linux to tmake_file for
9147 arc*-*-linux*.
9148 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9149 MULTILIB_DIRNAMES
9150
9151 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
9152
9153 * config/nds32/constraints.md (S): New constraint.
9154 * config/nds32/nds32.md (call_internal): Use constraint S.
9155 (call_value_internal): Likewise.
9156 (sibcall_internal): Likewise.
9157 (sibcall_value_internal): Likewise.
9158
9159 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
9160 Chung-Ju Wu <jasonwucj@gmail.com>
9161
9162 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9163 into consideration.
9164
9165 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
9166 Chung-Ju Wu <jasonwucj@gmail.com>
9167
9168 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9169 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9170 (nds32_rtx_costs_impl): Simplify.
9171 (nds32_address_cost_impl): Simplify.
9172 (nds32_init_rtx_costs): New function.
9173 (nds32_rtx_costs_speed_prefer): Likewise.
9174 (nds32_rtx_costs_size_prefer): Likewise.
9175 (nds32_address_cost_speed_prefer): Likewise.
9176 (nds32_address_cost_speed_fwprop): Likewise.
9177 (nds32_address_cost_size_prefer): Likewise.
9178 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9179 * config/nds32/nds32.c (nds32_option_override): Use
9180 nds32_init_rtx_costs function.
9181
9182 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
9183
9184 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9185 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9186 (TARGET_PIPELINE_N8): Likewise.
9187 (TARGET_PIPELINE_N10): Likewise.
9188 (TARGET_PIPELINE_N13): Likewise.
9189 (TARGET_PIPELINE_GRAYWOLF): Likewise.
9190
9191 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
9192
9193 * config/nds32/nds32-fpu.md: Update copyright year.
9194
9195 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9196
9197 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9198
9199 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9200
9201 * config/nds32/nds32.c
9202 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9203 * config/nds32/nds32.opt (minline-asm-r15): New option.
9204
9205 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9206
9207 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9208 MASK_HW_ABS.
9209 * config/nds32/nds32.md (abssi2): New pattern.
9210
9211 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
9212
9213 * config/i386/i386.md (rex64namesuffix): New mode attribute.
9214 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9215 Merge insn pattern from sse_cvtsi2ss<round_name> and
9216 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9217 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9218 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9219 using SWI48 mode iterator.
9220 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9221 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9222 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9223 pattern from sse_cvttss2si<round_saeonly_name>
9224 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9225 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9226 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9227 using SWI48 mode iterator.
9228 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9229 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9230 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9231 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9232 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9233 using SWI48 mode iterator.
9234 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9235 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9236 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9237 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9238 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9239 SWI48 mode iterator.
9240 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9241 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9242 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9243 pattern from sse_cvttsd2si<round_saeonly_name>
9244 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9245
9246 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9247
9248 * config/nds32/nds32-md-auxiliary.c
9249 (nds32_valid_smw_lwm_base_p): Refine.
9250 (nds32_output_smw_single_word): Refine.
9251 (nds32_output_smw_double_word): New.
9252 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9253
9254 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9255
9256 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9257 (nds32_output_stack_pop): Refine.
9258 (nds32_expand_unaligned_load): Refine.
9259 (nds32_expand_unaligned_store): Refine.
9260
9261 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9262 Chung-Ju Wu <jasonwucj@gmail.com>
9263
9264 * config/nds32/constants.md: Add TP_REGNUM constant.
9265 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9266 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9267 UNSPEC_ADD32.
9268 * config/nds32/nds32-doubleword.md: Consider flag_pic.
9269 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9270 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9271 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9272 and PIC code generation.
9273 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9274 code generation.
9275 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9276 optimization.
9277 * config/nds32/nds32.md: Support TLS and PIC.
9278 * config/nds32/nds32.c: Support TLS and PIC.
9279 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9280 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9281 predicate.
9282
9283 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9284
9285 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9286 mode with E_ prefix.
9287
9288 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9289 Chung-Ju Wu <jasonwucj@gmail.com>
9290
9291 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9292 * config/nds32/nds32-md-auxiliary.c
9293 (symbolic_reference_mentioned_p): New.
9294 (nds32_legitimize_ict_address): New.
9295 (nds32_expand_ict_move): New.
9296 (nds32_indirect_call_referenced_p): New.
9297 (nds32_symbol_binds_local_p): Delete.
9298 (nds32_long_call_p): Modify.
9299 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9300 * config/nds32/nds32-protos.h
9301 (symbolic_reference_mentioned_p): Declare.
9302 (nds32_legitimize_ict_address): Declare.
9303 (nds32_expand_ict_move): Declare.
9304 (nds32_indirect_call_referenced_p): Declare.
9305 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9306 (nds32_relax_group): Use nds32_ict_const_p as condition.
9307 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9308 (nds32_asm_file_start): Output ict_model directive in asm code.
9309 (nds32_legitimate_address_p): Consider indirect call.
9310 (nds32_print_operand): Consider indirect call.
9311 (nds32_print_operand_address): Consider indirect call.
9312 (nds32_insert_attributes): Handle "indirect_call" attribute.
9313 (TARGET_LEGITIMATE_ADDRESS_P): Define.
9314 (TARGET_LEGITIMATE_CONSTANT_P): Define.
9315 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9316 (TARGET_DELEGITIMIZE_ADDRESS): Define.
9317 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9318 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9319 (TARGET_ICT_MODEL_SMALL): Define.
9320 (TARGET_ICT_MODEL_LARGE): Define.
9321 * config/nds32/nds32.md (movsi): Consider ict model.
9322 (call, call_value): Consider ict model.
9323 (sibcall, sibcall_value): Consider ict model.
9324 * config/nds32/nds32.opt (mict-model): New option.
9325 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9326 model.
9327
9328 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
9329 Monk Chiang <sh.chiang04@gmail.com>
9330 Jim Wilson <jimw@sifive.com>
9331
9332 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9333 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
9334 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9335 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9336 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
9337 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9338 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9339 compute save_libcall_adjustment properly.
9340 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9341 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9342 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9343 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9344 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9345 (ABI_SPEC): Handle mabi=ilp32e.
9346 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9347 (RVE): Add RVE mask.
9348 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9349 <-march>: Add rv32e as an example.
9350
9351 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
9352
9353 PR c++/82899
9354 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9355 (intra_create_variable_infos): Handle C++ constructors.
9356
9357 2018-05-18 Martin Liska <mliska@suse.cz>
9358
9359 * passes.def: Remove a redundant pass.
9360
9361 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
9362
9363 PR bootstrap/85838
9364 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9365
9366 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9367
9368 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9369 (ARMv4): Update.
9370 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9371 (ARMv6m): Update.
9372 (armv2, armv2a, armv3, armv3m): Delete architectures.
9373 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9374 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9375 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9376 Delete cpus.
9377 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9378 (*mulsidi3adddi): Likewise.
9379 (mulsidi3): Likewise.
9380 (*mulsidi3_nov6): Likewise.
9381 (umulsidi3): Likewise.
9382 (umulsidi3_nov6): Likewise.
9383 (umaddsidi4): Likewise.
9384 (*umulsidi3adddi): Likewise.
9385 (smulsi3_highpart): Likewise.
9386 (*smulsi3_highpart_nov6): Likewise.
9387 (umulsi3_highpart): Likewise.
9388 (*umulsi3_highpart_nov6): Likewise.
9389 * config/arm/arm.h (arm_arch3m): Delete.
9390 * config/arm/arm.c (arm_arch3m): Delete.
9391 (arm_option_override_internal): Update armv3-related comment.
9392 (arm_configure_build_target): Delete use of isa_bit_mode32.
9393 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9394 (arm_rtx_costs_internal): Delete check of arm_arch3m.
9395 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9396 (mulsa3): Likewise.
9397 (mulusa3): Likewise.
9398 * config/arm/arm-protos.h (arm_arch3m): Delete.
9399 * config/arm/arm-tables.opt: Regenerate.
9400 * config/arm/arm-tune.md: Likewise.
9401 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9402 deleted architectures.
9403
9404 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9405
9406 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9407 (armv5t, armv5te): New features.
9408 (ARMv5, ARMv5e): Delete fgroups.
9409 (ARMv5t, ARMv5te): Adjust for above changes.
9410 (ARMv6m): Likewise.
9411 (armv5, armv5e): Delete arches.
9412 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9413 arm_arch5.
9414 (*call_reg_arm): Likewise.
9415 (*call_value_reg_armv5): Likewise.
9416 (*call_value_reg_arm): Likewise.
9417 (*call_symbol): Likewise.
9418 (*call_value_symbol): Likewise.
9419 (*sibcall_insn): Likewise.
9420 (*sibcall_value_insn): Likewise.
9421 (clzsi2): Likewise.
9422 (prefetch): Likewise.
9423 (define_split and define_peephole2 dependent on arm_arch5):
9424 Likewise.
9425 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9426 arm_arch5e.
9427 (TARGET_ARM_QBIT): Likewise.
9428 (TARGET_DSP_MULTIPLY): Likewise.
9429 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9430 (arm_arch5, arm_arch5e): Delete.
9431 (arm_arch5t, arm_arch5te): Declare.
9432 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9433 (arm_arch5t): Declare.
9434 (arm_option_reconfigure_globals): Update for the above.
9435 (arm_options_perform_arch_sanity_checks): Update comment, replace
9436 use of arm_arch5 with arm_arch5t.
9437 (use_return_insn): Likewise.
9438 (arm_emit_call_insn): Likewise.
9439 (output_return_instruction): Likewise.
9440 (arm_final_prescan_insn): Likewise.
9441 (arm_coproc_builtin_available): Likewise.
9442 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9443 arm_arch5e with arm_arch5t and arm_arch5te.
9444 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9445 (arm_arch5t, arm_arch5te): Declare.
9446 * config/arm/arm-tables.opt: Regenerate.
9447 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9448 * config/arm/t-multilib: Likewise.
9449 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9450 instead of arm_arch5.
9451 (*call_reg_thumb1): Likewise.
9452 (*call_value_reg_thumb1_v5): Likewise.
9453 (*call_value_reg_thumb1): Likewise.
9454 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9455 unreachable path.
9456 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9457
9458 2018-05-18 Martin Liska <mliska@suse.cz>
9459
9460 PR gcov-profile/84846
9461 * doc/gcov.texi: Document -t option of gcov tool.
9462
9463 2018-05-18 Martin Liska <mliska@suse.cz>
9464
9465 PR gcov-profile/84846
9466 * gcov.c (print_usage): Add new -t option.
9467 (process_args): Handle the option.
9468 (generate_results): Use stdout as output when requested by
9469 the option.
9470
9471 2018-05-18 Martin Liska <mliska@suse.cz>
9472
9473 PR gcov-profile/84846
9474 * coverage.c (coverage_init): Write PWD to .gcno file.
9475 * doc/gcov.texi: Document how working directory is printed.
9476 * gcov-dump.c (dump_gcov_file): Print PWD.
9477 * gcov.c (output_intermediate_file): Likewise.
9478 (read_graph_file): Read PWD string.
9479 (output_lines): Print PWD.
9480
9481 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9482
9483 PR middle-end/85817
9484 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9485 for retval and return false if all args to phi are zero.
9486
9487 2018-05-18 Richard Biener <rguenther@suse.de>
9488
9489 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9490 method.
9491 (evrp_dom_walker::before_dom_children): Call it.
9492
9493 2018-05-18 Richard Biener <rguenther@suse.de>
9494
9495 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9496 results when processing array refs with variable index.
9497
9498 2018-05-18 Toon Moene <toon@moene.org>
9499
9500 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9501 directly after that of -floop-interchange. Indicate that both
9502 options are enabled by default when specifying -O3.
9503
9504 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9505
9506 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9507 iterator. Delete separate integer-mode vec_set<mode> expander.
9508 (aarch64_simd_vec_setv2di): Delete.
9509 (vec_setv2di): Delete.
9510 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9511 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9512 the "w, r" alternative.
9513
9514 2018-05-18 Martin Liska <mliska@suse.cz>
9515
9516 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9517 * tree-pass.h (make_pass_lower_switch_O0): New function.
9518 * tree-switch-conversion.c (node_has_low_bound): Remove.
9519 (node_has_high_bound): Likewise.
9520 (node_is_bounded): Likewise.
9521 (class pass_lower_switch): Make it a template type and create
9522 two instances.
9523 (pass_lower_switch::execute): Add template argument.
9524 (make_pass_lower_switch): New function.
9525 (make_pass_lower_switch_O0): New function.
9526 (do_jump_if_equal): Remove.
9527 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9528 all the hard work to tree optimization passes.
9529
9530 2018-05-18 Martin Liska <mliska@suse.cz>
9531
9532 * dbgcnt.c (limit_low): Renamed from limit.
9533 (limit_high): New variable.
9534 (dbg_cnt_is_enabled): Check for upper limit.
9535 (dbg_cnt): Adjust dumping.
9536 (dbg_cnt_set_limit_by_index): Add new argument for high
9537 value.
9538 (dbg_cnt_set_limit_by_name): Likewise.
9539 (dbg_cnt_process_single_pair): Parse new format.
9540 (dbg_cnt_process_opt): Use strtok.
9541 (dbg_cnt_list_all_counters): Remove 'value' and add
9542 'limit_high'.
9543 * doc/invoke.texi: Document changes.
9544
9545 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9546
9547 * doc/sourcebuild.texi (scalar_all_fma): Document.
9548 * tree.def (FMA_EXPR): Delete.
9549 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9550 * internal-fn.c (ternary_direct): New macro.
9551 (expand_ternary_optab_fn): Likewise.
9552 (direct_ternary_optab_supported_p): Likewise.
9553 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9554 * builtins.c (fold_builtin_fma): Delete.
9555 (fold_builtin_3): Don't call it.
9556 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9557 * expr.c (expand_expr_real_2): Likewise.
9558 * fold-const.c (operand_equal_p): Likewise.
9559 (fold_ternary_loc): Likewise.
9560 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9561 * gimple.c (DEFTREECODE): Likewise.
9562 * gimplify.c (gimplify_expr): Likewise.
9563 * optabs-tree.c (optab_for_tree_code): Likewise.
9564 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9565 * tree-eh.c (operation_could_trap_p): Likewise.
9566 (stmt_could_throw_1_p): Likewise.
9567 * tree-inline.c (estimate_operator_cost): Likewise.
9568 * tree-pretty-print.c (dump_generic_node): Likewise.
9569 (op_code_prio): Likewise.
9570 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9571 * tree-ssa-operands.c (get_expr_operands): Likewise.
9572 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9573 * fold-const-call.h (fold_fma): Delete.
9574 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9575 CFN_FNMA and CFN_FNMS.
9576 (fold_fma): Delete.
9577 * genmatch.c (combined_fn): New enum.
9578 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9579 (commutative_op): New function.
9580 (commutate): Use it. Handle more than 2 operands.
9581 (dt_operand::gen_gimple_expr): Use commutative_op.
9582 (parser::parse_expr): Allow :c to be used with non-binary
9583 operators if the commutative operand is known.
9584 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9585 CFN_FMS, CFN_FNMA and CFN_FNMS.
9586 (backprop::process_assign_use): Remove FMA_EXPR handling.
9587 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9588 (gen_hsa_fma): New function.
9589 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9590 IFN_FNMA and IFN_FNMS.
9591 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9592 * gimple-fold.h (follow_all_ssa_edges): Declare.
9593 * gimple-fold.c (follow_all_ssa_edges): New function.
9594 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9595 gimple_build interface and use follow_all_ssa_edges to fold the result.
9596 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9597 instead of checking for optabs directly.
9598 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9599 rather than FMA_EXPRs.
9600 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9601 call to IFN_FMA instead of an FMA_EXPR.
9602
9603 2018-05-17 Jim Wilson <jimw@sifive.com>
9604
9605 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9606 sign extended promoted subreg, and the range does not have the sign bit
9607 set, then do a sign extend.
9608
9609 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9610 test, check for sign extended subreg and/or constant operands, and
9611 do a sign extend in that case.
9612
9613 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9614
9615 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9616 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9617 Add untyped.
9618 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9619 Change logics_shift_reg to logics_shift_imm.
9620 (thunderx2t99_fp_loadpair_basic): Delete.
9621 (thunderx2t99_fp_storepair_basic): Delete.
9622 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9623 (thunderx2t99_asimd_polynomial): Delete.
9624 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9625 and neon_fp_mul_d_scalar_q.
9626 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9627 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9628 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9629 (thunderx2t99_asimd_lut): Add missing tbl types.
9630 (thunderx2t99_asimd_ext): Delete.
9631 (thunderx2t99_asimd_load1_1_mult): Delete.
9632 (thunderx2t99_asimd_load1_2_mult): Delete.
9633 (thunderx2t99_asimd_load1_ldp): New.
9634 (thunderx2t99_asimd_load1): New.
9635 (thunderx2t99_asimd_load2): Add missing *load2* types.
9636 (thunderx2t99_asimd_load3): New.
9637 (thunderx2t99_asimd_load4): New.
9638 (thunderx2t99_asimd_store1_1_mult): Delete.
9639 (thunderx2t99_asimd_store1_2_mult): Delete.
9640 (thunderx2t99_asimd_store2_mult): Delete.
9641 (thunderx2t99_asimd_store2_onelane): Delete.
9642 (thunderx2t99_asimd_store_stp): New.
9643 (thunderx2t99_asimd_store1): New.
9644 (thunderx2t99_asimd_store2): New.
9645 (thunderx2t99_asimd_store3): New.
9646 (thunderx2t99_asimd_store4): New.
9647
9648 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9649
9650 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9651 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9652
9653 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9654 Segher Boessenkool <segher@kernel.crashing.org>
9655
9656 PR target/85698
9657 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9658 operand.
9659
9660 2018-05-17 Richard Biener <rguenther@suse.de>
9661
9662 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9663 for pruning loop and prune defs feeding only already visited PHIs.
9664
9665 2018-05-17 Richard Biener <rguenther@suse.de>
9666
9667 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9668
9669 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9670 Richard Biener <rguenther@suse.de>
9671
9672 PR tree-optimization/85793
9673 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9674 for VMAT_ELEMENTWISE.
9675
9676 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9677
9678 * internal-fn.h (lookup_internal_fn): Declare
9679 * internal-fn.c (lookup_internal_fn): New function.
9680 * gimple.c (gimple_build_call_from_tree): Handle calls to
9681 internal functions.
9682 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9683 internal function names.
9684 * tree-pretty-print.c (dump_generic_node): Likewise.
9685 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9686
9687 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9688
9689 * gimple-fold.h (gimple_build): Make the function forms take
9690 combined_fn rather than built_in_function.
9691 (gimple_simplify): Likewise.
9692 * gimple-match-head.c (gimple_simplify): Likewise.
9693 * gimple-fold.c (gimple_build): Likewise.
9694 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9695 rather than gimple_build_call_internal.
9696 (get_initial_defs_for_reduction): Likewise.
9697 (vect_create_epilog_for_reduction): Likewise.
9698 (vectorizable_live_operation): Likewise.
9699
9700 2018-05-17 Martin Liska <mliska@suse.cz>
9701
9702 * gimple-ssa-sprintf.c (format_directive): Do not use
9703 space in between 'G_' and '('.
9704
9705 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9706
9707 PR target/85323
9708 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9709 even if the mask is not all ones.
9710
9711 PR target/85323
9712 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9713 vector.
9714 (ix86_gimple_fold_builtin): Likewise.
9715
9716 PR target/85323
9717 * config/i386/i386.c: Include tree-vector-builder.h.
9718 (ix86_vector_shift_count): New function.
9719 (ix86_fold_builtin): Fold shift builtins by scalar count.
9720 (ix86_gimple_fold_builtin): Likewise.
9721
9722 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9723 _mm512_setzero): New intrinsics.
9724
9725 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9726 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9727
9728 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9729 code generation for cases where splatting a value is not useful.
9730 * simplify-rtx.c (simplify_ternary_operation): Simplify
9731 vec_merge across a vec_duplicate and a paradoxical subreg forming
9732 a vector mode to a vec_concat.
9733
9734 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9735
9736 * config.gcc: Support "goldmont-plus".
9737 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9738 "goldmont-plus".
9739 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9740 PROCESSOR_GOLDMONT_PLUS.
9741 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9742 (processor_target_table): Add "goldmont-plus".
9743 (PTA_GOLDMONT_PLUS): Define.
9744 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9745 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9746 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9747 (fold_builtin_cpu): Add "goldmont-plus".
9748 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9749 (ix86_option_override_internal): Add "goldmont-plus".
9750 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9751 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9752 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9753 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9754
9755 2018-05-17 Richard Biener <rguenther@suse.de>
9756
9757 PR tree-optimization/85757
9758 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9759 remove defs that only feed that PHI from further processing.
9760
9761 2018-05-16 Jim Wilson <jimw@sifive.com>
9762
9763 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9764 asterisk to name.
9765 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9766
9767 2018-05-16 Mark Wielaard <mark@klomp.org>
9768
9769 * dwarf2out.c (count_index_strings): New function.
9770 (output_indirect_strings): Call count_index_strings and generate
9771 header for dwarf_version >= 5.
9772
9773 2018-05-16 Mark Wielaard <mark@klomp.org>
9774
9775 * dwarf2out.c (dwarf_FORM): New function.
9776 (set_indirect_string): Use dwarf_FORM.
9777 (reset_indirect_string): Likewise.
9778 (size_of_die): Likewise.
9779 (value_format): Likewise.
9780 (output_die): Likewise.
9781 (add_skeleton_AT_string): Likewise.
9782 (output_macinfo_op): Likewise.
9783 (index_string): Likewise.
9784 (output_index_string_offset): Likewise.
9785 (output_index_string): Likewise.
9786 (count_index_strings): Likewise.
9787
9788 2018-05-16 Carl Love <cel@us.ibm.com>
9789
9790 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9791 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9792
9793 2018-05-16 Martin Jambor <mjambor@suse.cz>
9794
9795 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9796 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9797
9798 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9799
9800 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9801 (fnma<mode>4): Likewise.
9802 (fms<mode>4): Likewise.
9803 (fnms<mode>4): Likewise.
9804 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9805 (aarch64_fnma<mode>4): Likewise.
9806 (aarch64_fms<mode>4): Likewise.
9807 (aarch64_fnms<mode>4): Likewise.
9808 (aarch64_fnmadd<mode>4): Likewise.
9809
9810 2018-05-16 Jason Merrill <jason@redhat.com>
9811
9812 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9813
9814 2018-05-16 Richard Biener <rguenther@suse.de>
9815
9816 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9817 (dump_stmt_cost): Declare.
9818 (add_stmt_cost): Dump cost we add.
9819 (add_stmt_costs): New function.
9820 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9821 No longer exported.
9822 (vect_analyze_stmt): Adjust prototype.
9823 (vectorizable_condition): Likewise.
9824 (vectorizable_live_operation): Likewise.
9825 (vectorizable_reduction): Likewise.
9826 (vectorizable_induction): Likewise.
9827 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9828 cost vector to pass to vectorizable_ and record afterwards.
9829 (vect_model_reduction_cost): Take cost vector argument and adjust.
9830 (vect_model_induction_cost): Likewise.
9831 (vectorizable_reduction): Likewise.
9832 (vectorizable_induction): Likewise.
9833 (vectorizable_live_operation): Likewise.
9834 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9835 SLP_TREE_NUMBER_OF_VEC_STMTS.
9836 (vect_analyze_slp_cost_1): Remove.
9837 (vect_analyze_slp_cost): Likewise.
9838 (vect_slp_analyze_node_operations): Take visited args and
9839 a target cost vector. Avoid processing already visited stmt sets.
9840 (vect_slp_analyze_operations): Use a local cost vector to gather
9841 costs and register those of non-discarded instances.
9842 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9843 (vect_schedule_slp_instance): Remove copying of
9844 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9845 zero.
9846 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9847 adding cost. Record cost entry location.
9848 (vect_prologue_cost_for_slp_op): Function to compute cost of
9849 a constant or invariant generated for SLP vect in the prologue,
9850 split out from vect_analyze_slp_cost_1.
9851 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9852 (vect_model_promotion_demotion_cost): Likewise.
9853 (vect_model_store_cost): Likewise, make static.
9854 (vect_model_load_cost): Likewise.
9855 (vectorizable_bswap): Add cost vector arg and adjust.
9856 (vectorizable_call): Likewise.
9857 (vectorizable_simd_clone_call): Likewise.
9858 (vectorizable_conversion): Likewise.
9859 (vectorizable_assignment): Likewise.
9860 (vectorizable_shift): Likewise.
9861 (vectorizable_operation): Likewise.
9862 (vectorizable_store): Likewise.
9863 (vectorizable_load): Likewise.
9864 (vectorizable_condition): Likewise.
9865 (vectorizable_comparison): Likewise.
9866 (can_vectorize_live_stmts): Likewise.
9867 (vect_analyze_stmt): Likewise.
9868 (vect_transform_stmt): Adjust calls to vectorizable_*.
9869 * tree-vectorizer.c: Include gimple-pretty-print.h.
9870 (dump_stmt_cost): New function.
9871
9872 2018-05-16 Richard Biener <rguenther@suse.de>
9873
9874 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9875 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9876 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9877 (check_name): New callback.
9878 (dse_classify_store): Track cycles via a visited bitmap of PHI
9879 defs and simplify handling of in-loop and across loop dead stores
9880 and properly fail for loop-variant refs. Handle byte-tracking with
9881 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9882 limiting the walk.
9883
9884 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9885
9886 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9887 (vect_get_mask_type_for_stmt): Likewise.
9888 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9889 split out from...
9890 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9891 to determine the statement's vector type and the vector type that
9892 should be used for calculating nunits. Deal with cases in which
9893 the type has to be deferred.
9894 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9895 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9896 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9897 (vect_determine_vf_for_stmt): New functions, split out from...
9898 (vect_determine_vectorization_factor): ...here.
9899 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9900 (vect_get_mask_type_for_stmt): New functions, split out from
9901 vect_determine_vectorization_factor.
9902
9903 2018-05-16 Richard Biener <rguenther@suse.de>
9904
9905 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9906 verify the [VEC_]COND_EXPR embedded comparison.
9907
9908 2018-05-15 Martin Sebor <msebor@redhat.com>
9909
9910 PR tree-optimization/85753
9911 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9912 RECORD_TYPE in addition to ARRAY_TYPE.
9913
9914 2018-05-15 Martin Sebor <msebor@redhat.com>
9915
9916 PR middle-end/85643
9917 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9918
9919 2018-05-15 Richard Biener <rguenther@suse.de>
9920
9921 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9922 add by_clobber_p one. Change algorithm to collect all defs
9923 representing uses we need to walk and try reducing them to
9924 a single one before failing.
9925 (dse_dom_walker::dse_optimize_stmt): Adjust.
9926
9927 2018-05-13 Mark Wielaard <mark@klomp.org>
9928
9929 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9930 (size_of_loc_descr): Likewise.
9931 (output_loc_operands): Likewise.
9932 (output_loc_operands_raw): Likewise.
9933 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9934 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9935 (hash_loc_operands): Likewise.
9936 (compare_loc_operands): Likewise.
9937
9938 2018-05-14 Mark Wielaard <mark@klomp.org>
9939
9940 * dwarf2out.c (count_index_addrs): New function.
9941 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9942
9943 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9944
9945 PR tree-optimization/83648
9946 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9947 return value as malloc candidate.
9948
9949 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9950
9951 PR ipa/85734
9952 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9953 param as true in call to suggest_attribute.
9954
9955 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9956
9957 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9958 -mreadonly-in-sdata.
9959
9960 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9961
9962 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9963 New pattern.
9964 (aarch64_crypto_aesd_fused): Likewise.
9965
9966 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9967
9968 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9969 (movsi_aarch64): Likewise.
9970 (load_pairsi): Likewise.
9971 (load_pairdi): Likewise.
9972 (store_pairsi): Likewise.
9973 (store_pairdi): Likewise.
9974 (load_pairsf): Likewise.
9975 (load_pairdf): Likewise.
9976 (store_pairsf): Likewise.
9977 (store_pairdf): Likewise.
9978 (zero_extend): Likewise.
9979 (trunc): Swap alternatives.
9980 (fcvt_target): Add '?' to prefer w over r.
9981
9982 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9983
9984 PR target/85756
9985 * config/i386/i386.md: Disallow non-commutative arithmetics in
9986 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9987 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9988 in the peephole2 before it.
9989
9990 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9991
9992 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9993 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9994 (ix86_handle_option): Handle -mcldemote.
9995 * config.gcc: New header.
9996 * config/i386/cldemoteintrin.h: New file.
9997 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9998 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9999 -mcldemote.
10000 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10001 OPTION_MASK_ISA_CLDEMOTE.
10002 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10003 (ix86_valid_target_attribute_inner_p): Ditto.
10004 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10005 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10006 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10007 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10008 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10009 (cldemote): New.
10010 * config/i386/i386.opt: Add -mcldemote.
10011 * config/i386/x86intrin.h: New header.
10012 * doc/invoke.texi: Add -mcldemote.
10013
10014 2018-05-14 Richard Biener <rguenther@suse.de>
10015
10016 * doc/match-and-simplify.texi: Adjust :s documentation.
10017
10018 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
10019
10020 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10021 intended memcpy size.
10022 (REORDER_45): Likewise.
10023
10024 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
10025
10026 * sort.cc: New file.
10027 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10028 * vec.c (qsort_chk): Use gcc_qsort.
10029 * Makefile.in (OBJS-libcommon): Add sort.o.
10030 (build/sort.o): New target. Use it...
10031 (BUILD_RTL): ... here, and...
10032 (build/gencfn-macros): ... here, and...
10033 (build/genmatch): ... here.
10034
10035 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10036 Chung-Ju Wu <jasonwucj@gmail.com>
10037
10038 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10039 * config/nds32/nds32-graywolf.md: New file.
10040 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10041 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10042 pipeline.
10043 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10044 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10045 * config/nds32/nds32.md (pipeline_model): Add graywolf.
10046 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10047 * config/nds32/pipelines.md: Include n15 settings.
10048
10049 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10050 Chung-Ju Wu <jasonwucj@gmail.com>
10051
10052 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10053 * config/nds32/nds32-n13.md: New file.
10054 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10055 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10056 pipeline.
10057 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10058 * config/nds32/nds32.md (pipeline_model): Add n13.
10059 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10060 * config/nds32/pipelines.md: Include n13 settings.
10061
10062 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10063 Chung-Ju Wu <jasonwucj@gmail.com>
10064
10065 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10066 * config/nds32/nds32-n10.md: New file.
10067 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10068 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10069 pipeline.
10070 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10071 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10072 * config/nds32/nds32.md (pipeline_model): Add n10.
10073 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10074 * config/nds32/pipelines.md: Include n10 settings.
10075
10076 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
10077 Kito Cheng <kito.cheng@gmail.com>
10078 Chung-Ju Wu <jasonwucj@gmail.com>
10079
10080 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10081 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10082 Add enum values for DSP extension instructions.
10083 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10084 New constraints.
10085 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10086 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10087 New code iterators.
10088 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10089 * config/nds32/nds32-dspext.md: New file for DSP implementation.
10090 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10091 * config/nds32/nds32-intrinsic.md: Likewise.
10092 * config/nds32/nds32_intrinsic.h: Likewise.
10093 * config/nds32/nds32-md-auxiliary.c: Likewise.
10094 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10095 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10096 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10097 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10098 * config/nds32/nds32-protos.h: New declarations for DSP extension.
10099 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10100 TYPE_DMAC in switch statement.
10101 * config/nds32/nds32.c: New checking and implementation for DSP
10102 extension instructions.
10103 * config/nds32/nds32.h: Likewise.
10104 * config/nds32/nds32.md: Likewise.
10105 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10106 * config/nds32/predicates.md: Implement new predicates for DSP
10107 extension.
10108
10109 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10110
10111 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10112 Reformat alternatives and attributes so it is easier to identify
10113 which constraints/attributes go with which instruction.
10114 (mov<mode>_hardfloat32, FMOVE64): Likewise.
10115 (mov<mode>_softfloat32, FMOVE64): Likewise.
10116 (mov<mode>_hardfloat64, FMOVE64): Likewise.
10117 (mov<mode>_softfloat64, FMOVE64): Likewise.
10118
10119 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
10120
10121 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10122 subsection.
10123 (Basic PowerPC Built-in Functions): The new name of the
10124 subsection previously known as "PowerPC Built-in Functions".
10125 (Basic PowerPC Built-in Functions Available on all Configurations):
10126 New subsubsection.
10127 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10128 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10129 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10130 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10131
10132 2018-05-11 Martin Jambor <mjambor@suse.cz>
10133
10134 PR ipa/85655
10135 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10136 single const.
10137
10138 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
10139
10140 PR target/85733
10141 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10142
10143 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
10144
10145 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10146 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10147 (ix86_handle_option): Handle -mwaitpkg.
10148 * config.gcc: New header.
10149 * config/i386/cpuid.h (bit_WAITPKG): New bit.
10150 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10151 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10152 function type.
10153 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10154 OPTION_MASK_ISA_WAITPKG.
10155 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10156 (ix86_option_override_internal): Add PTA_WAITPKG.
10157 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10158 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10159 IX86_BUILTIN_TPAUSE.
10160 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10161 __builtin_ia32_umwait and __builtin_ia32_tpause.
10162 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10163 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10164 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10165 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10166 UNSPECV_TPAUSE): New.
10167 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10168 * config/i386/i386.opt: Add -mwaitpkg.
10169 * config/i386/waitpkgintrin.h: New file.
10170 * config/i386/x86intrin.h: New header.
10171 * doc/invoke.texi: Add -mwaitpkg.
10172
10173 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
10174
10175 PR target/85606
10176 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10177 equivalent.
10178 (cortex-m0): Use armv6s-m isa.
10179 (cortex-m0plus): Likewise.
10180 (cortex-m1): Likewise.
10181 (cortex-m0.small-multiply): Likewise.
10182 (cortex-m0plus.small-multiply): Likewise.
10183 (cortex-m1.small-multiply): Likewise.
10184
10185 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
10186 Jakub Jelinek <jakub@redhat.com>
10187
10188 PR tree-optimization/85692
10189 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10190 source permute as well.
10191
10192 2018-05-11 Martin Liska <mliska@suse.cz>
10193
10194 PR sanitizer/85556
10195 * doc/extend.texi: Document LLVM style format for no_sanitize
10196 attribute.
10197
10198 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
10199
10200 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10201 mode_supports_vsx_dform_quad to mode_supports_dq_form.
10202 (mode_supports_vsx_dform_quad): Likewise.
10203 (mode_supports_vmx_dform): Move these functions to be next to the
10204 other mode_supports functions.
10205 (mode_supports_dq_form): Likewise.
10206 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10207 mode_supports_dq_form.
10208 (reg_offset_addressing_ok_p): Likewise.
10209 (offsettable_ok_by_alignment): Likewise.
10210 (rs6000_legitimate_offset_address_p): Likewise.
10211 (legitimate_lo_sum_address_p): Likewise.
10212 (rs6000_legitimize_address): Likewise.
10213 (rs6000_legitimize_reload_address): Likewise.
10214 (rs6000_secondary_reload_inner): Likewise.
10215 (rs6000_preferred_reload_class): Likewise.
10216 (rs6000_output_move_128bit): Likewise.
10217
10218 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
10219
10220 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10221 Generate SImode target register for null target.
10222 <case IX86_BUILTIN_XGETBV>: Ditto.
10223 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10224 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10225
10226 2018-05-10 Carl Love <cel@us.ibm.com>
10227
10228 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10229 dcbtt and dcbtstt if operands[2] is 0.
10230
10231 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
10232
10233 PR target/85693
10234 * config/i386/sse.md (usadv64qi): New expander.
10235
10236 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
10237
10238 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10239 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10240 -maltivec=be support.
10241 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10242 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10243 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10244 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10245 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10246 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10247 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10248 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10249 altivec_vsumsws): Adjust.
10250 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10251 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10252 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10253 support.
10254 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10255 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10256 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10257 (altivec_lve<VI_char>x): Delete expand.
10258 (*altivec_lve<VI_char>x_internal): Rename to...
10259 (altivec_lve<VI_char>x): ... this.
10260 (altivec_lvxl_<mode>): Delete expand.
10261 (*altivec_lvxl_<mode>_internal): Rename to ...
10262 (altivec_lvxl_<mode>): ... this.
10263 (altivec_stvxl_<mode>): Delete expand.
10264 (*altivec_stvxl_<mode>_internal): Rename to ...
10265 (altivec_stvxl_<mode>): ... this.
10266 (altivec_stve<VI_char>x): Delete expand.
10267 (*altivec_stve<VI_char>x_internal): Rename to ...
10268 (altivec_stve<VI_char>x): ... this.
10269 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10270 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10271 reduc_plus_scal_<mode>): Adjust.
10272 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10273 comment.
10274 (rs6000_cpu_cpp_builtins): Adjust.
10275 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10276 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10277 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10278 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10279 -maltivec=be support.
10280 (rs6000_split_vec_extract_var): Adjust.
10281 (rs6000_split_v4si_init): Adjust.
10282 (swap_selector_for_mode): Delete.
10283 (altivec_expand_lvx_be, altivec_expand_stvx_be,
10284 altivec_expand_stvex_be): Delete.
10285 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10286 -maltivec=be support.
10287 (rs6000_gimple_fold_builtin): Ditto.
10288 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10289 Adjust.
10290 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10291 (TARGET_DIRECT_MOVE_64BIT): Adjust.
10292 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10293 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10294 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10295 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10296 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10297 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10298 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10299 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10300 anonymous split): Adjust.
10301 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10302 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10303
10304 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
10305
10306 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10307 when --with-gxx-include-dir is also specified.
10308 * configure: Regenerate.
10309
10310 2018-05-09 Jim Wilson <jimw@sifive.com>
10311
10312 PR target/84797
10313 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10314 * config/riscv/t-withmultilib: New.
10315 * config/riscv/withmultilib.h: New.
10316 * doc/install.texi: Document RISC-V --with-multilib-list support.
10317
10318 2018-05-09 Richard Biener <rguenther@suse.de>
10319
10320 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10321 vector.
10322 (vect_bb_vectorization_profitable_p): Adjust. Compute
10323 actual scalar cost using the cost vector and the add_stmt_cost
10324 machinery.
10325
10326 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10327
10328 PR rtl-optimization/85645
10329 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10330 in the REG_CFA_REGISTER note for LR, don't leave it empty.
10331
10332 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10333
10334 PR rtl-optimization/85645
10335 * shrink-wrap.c (spread_components): Return a boolean saying if
10336 anything was changed.
10337 (try_shrink_wrapping_separate): Iterate spread_components until
10338 nothing changes anymore.
10339
10340 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10341
10342 PR rtl-optimization/85645
10343 * regrename.c (build_def_use): Also kill the chains that include the
10344 destination of a REG_CFA_REGISTER note.
10345
10346 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10347
10348 PR rtl-optimization/85645
10349 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10350 insn that has a REG_CFA_REGISTER note.
10351
10352 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
10353
10354 * cfgexpand.c (expand_clobber): New function.
10355 (expand_gimple_stmt_1): Use it.
10356 * tree-vect-stmts.c (vect_clobber_variable): New function,
10357 split out from...
10358 (vectorizable_simd_clone_call): ...here.
10359 (vectorizable_store): Emit a clobber either side of an
10360 IFN_STORE_LANES sequence.
10361 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10362
10363 2018-05-09 Tom de Vries <tom@codesourcery.com>
10364
10365 PR target/85626
10366 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10367 (define_insn "trap_if_false"): Add exit after trap.
10368
10369 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
10370
10371 PR rtl-optimization/85638
10372 * bb-reorder.c: Include common/common-target.h.
10373 (create_forwarder_block): New function extracted from...
10374 (fix_up_crossing_landing_pad): ...here. Rename into...
10375 (dw2_fix_up_crossing_landing_pad): ...this.
10376 (sjlj_fix_up_crossing_landing_pad): New function.
10377 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10378 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10379 from both partitions and exit the loop after one iteration.
10380
10381 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10382
10383 Revert:
10384 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10385 subsection.
10386 (Basic PowerPC Built-in Functions): The new name of the
10387 subsection previously known as "PowerPC Built-in Functions".
10388 (Basic PowerPC Built-in Functions Available on all Configurations):
10389 New subsubsection.
10390 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10391 subsubsection.
10392 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10393 subsubsection.
10394 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10395 subsubsection.
10396 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10397 subsubsection.
10398
10399 2018-05-08 Jim Wilson <jimw@sifive.com>
10400
10401 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10402 (LD_EMUL_SUFFIX): New.
10403 (LINK_SPEC): Use it.
10404
10405 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10406
10407 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10408 subsection.
10409 (Basic PowerPC Built-in Functions): The new name of the
10410 subsection previously known as "PowerPC Built-in Functions".
10411 (Basic PowerPC Built-in Functions Available on all Configurations):
10412 New subsubsection.
10413 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10414 subsubsection.
10415 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10416 subsubsection.
10417 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10418 subsubsection.
10419 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10420 subsubsection.
10421
10422 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10423
10424 PR target/85683
10425 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10426 after cmpelim optimization.
10427
10428 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10429
10430 * config.gcc: Support "goldmont".
10431 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10432 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10433 PROCESSOR_GOLDMONT.
10434 * config/i386/i386.c (m_GOLDMONT): Define.
10435 (processor_target_table): Add "goldmont".
10436 (PTA_GOLDMONT): Define.
10437 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10438 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10439 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10440 (fold_builtin_cpu): Add "goldmont".
10441 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10442 (ix86_option_override_internal): Add "goldmont".
10443 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10444 (processor_type): Add PROCESSOR_GOLDMONT.
10445 * config/i386/i386.md: Add CPU "glm".
10446 * config/i386/glm.md: New file.
10447 * config/i386/x86-tune.def: Add m_GOLDMONT.
10448 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10449
10450 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10451
10452 PR target/85572
10453 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10454 E_V4DImode.
10455 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10456 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10457 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10458
10459 PR target/85317
10460 * config/i386/i386.c (ix86_fold_builtin): Handle
10461 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10462
10463 PR target/85480
10464 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10465 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10466
10467 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10468
10469 PR target/85658
10470 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10471 (check_arch): Likewise.
10472 (check_fpu): Return the result rather than printing it.
10473 (end arch): Fix operator precedence.
10474 (end cpu): Likewise.
10475 (END): Print the result from check_fpu.
10476
10477 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10478 Alan Hayward <alan.hayward@arm.com>
10479 David Sherwood <david.sherwood@arm.com>
10480
10481 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10482 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10483 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10484 (*fcmuo<mode>_and): New patterns.
10485
10486 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10487
10488 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10489 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10490 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10491 (cmp_op, sve_imm_con): New code attributes.
10492 (SVE_COND_INT_CMP, imm_con): Delete.
10493 (cmp_op): Remove above unspecs from int attribute.
10494 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10495 to...
10496 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10497 comparison-specific unspecs.
10498 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10499 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10500 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10501 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10502 (*vec_fcm<cmp_op><mode>): Rename to...
10503 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10504 (*vec_fcmuo<mode>): Rename to...
10505 (*fcmuo<mode>): ...this and adjust likewise.
10506 (*pred_fcm<cmp_op><mode>): New pattern.
10507 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10508 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10509 functions.
10510 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10511 and UNORDERED.
10512 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10513 (aarch64_emit_sve_predicated_cond): New function.
10514 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10515 (aarch64_emit_unspec_cond_or): Replace with...
10516 (aarch64_emit_sve_or_conds): ...this new function. Use
10517 aarch64_emit_sve_ptrue_op for the individual comparisons and
10518 aarch64_emit_binop to OR them together.
10519 (aarch64_emit_inverted_unspec_cond): Replace with...
10520 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10521 aarch64_emit_sve_ptrue_op for the comparison and
10522 aarch64_emit_unop to invert the result.
10523 (aarch64_expand_sve_vec_cmp_float): Update after the above
10524 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10525
10526 2018-05-07 Nathan Sidwell <nathan@acm.org>
10527
10528 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10529 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10530 (Backwards Compatibility): Likewise.
10531
10532 2018-05-07 Luis Machado <luis.machado@linaro.org>
10533
10534 PR bootstrap/85681
10535 Revert:
10536 2018-05-07 Luis Machado <luis.machado@linaro.org>
10537
10538 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10539 <prefetch_dynamic_strides>: New const bool field.
10540 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10541 prefetch_dynamic_strides.
10542 (exynosm1_prefetch_tune): Likewise.
10543 (thunderxt88_prefetch_tune): Likewise.
10544 (thunderx_prefetch_tune): Likewise.
10545 (thunderx2t99_prefetch_tune): Likewise.
10546 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10547 to false.
10548 (aarch64_override_options_internal): Update to set
10549 PARAM_PREFETCH_DYNAMIC_STRIDES.
10550 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10551 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10552 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10553 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10554 prefetch-dynamic-strides setting.
10555
10556 2018-05-07 Luis Machado <luis.machado@linaro.org>
10557
10558 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10559 <minimum_stride>: New const int field.
10560 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10561 minimum_stride field.
10562 (exynosm1_prefetch_tune): Likewise.
10563 (thunderxt88_prefetch_tune): Likewise.
10564 (thunderx_prefetch_tune): Likewise.
10565 (thunderx2t99_prefetch_tune): Likewise.
10566 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10567 (aarch64_override_options_internal): Update to set
10568 PARAM_PREFETCH_MINIMUM_STRIDE.
10569 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10570 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10571 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10572 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10573 stride is constant and is below the minimum stride threshold.
10574
10575 2018-05-07 Luis Machado <luis.machado@linaro.org>
10576
10577 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10578 to 512.
10579
10580 2018-05-07 Luis Machado <luis.machado@linaro.org>
10581
10582 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10583 <prefetch_dynamic_strides>: New const bool field.
10584 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10585 prefetch_dynamic_strides.
10586 (exynosm1_prefetch_tune): Likewise.
10587 (thunderxt88_prefetch_tune): Likewise.
10588 (thunderx_prefetch_tune): Likewise.
10589 (thunderx2t99_prefetch_tune): Likewise.
10590 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10591 to false.
10592 (aarch64_override_options_internal): Update to set
10593 PARAM_PREFETCH_DYNAMIC_STRIDES.
10594 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10595 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10596 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10597 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10598 prefetch-dynamic-strides setting.
10599
10600 2018-05-07 Luis Machado <luis.machado@linaro.org>
10601
10602 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10603 <minimum_stride>: New const int field.
10604 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10605 minimum_stride field.
10606 (exynosm1_prefetch_tune): Likewise.
10607 (thunderxt88_prefetch_tune): Likewise.
10608 (thunderx_prefetch_tune): Likewise.
10609 (thunderx2t99_prefetch_tune): Likewise.
10610 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10611 (aarch64_override_options_internal): Update to set
10612 PARAM_PREFETCH_MINIMUM_STRIDE.
10613 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10614 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10615 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10616 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10617 stride is constant and is below the minimum stride threshold.
10618
10619 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10620
10621 PR c++/85659
10622 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10623 the type is addressable. Don't force op into register if it has
10624 BLKmode.
10625
10626 2018-05-05 Roland McGrath <mcgrathr@google.com>
10627
10628 PR other/77609
10629 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10630 any section for which we don't know a specific type it should have,
10631 regardless of name. Previously this was done only for the exact
10632 names ".init_array", ".fini_array", and ".preinit_array".
10633 (default_elf_asm_named_section): Add comment about
10634 relationship with default_section_type_flags and SECTION_NOTYPE.
10635 (get_section): Don't consider it a type conflict if one side has
10636 SECTION_NOTYPE and the other doesn't, as long as neither has the
10637 SECTION_BSS et al used in the default_section_type_flags logic.
10638
10639 2018-05-05 Tom de Vries <tom@codesourcery.com>
10640
10641 PR target/85653
10642 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10643 (workaround_barsyncs): New function.
10644 (nvptx_reorg): Use workaround_barsyncs.
10645 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10646 (define_expand "nvptx_membar_cta"): New define_expand.
10647 (define_insn "*nvptx_membar_cta"): New insn.
10648
10649 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10650
10651 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10652 To improve optimization opportunities.
10653 * builtin-types.def: The new needed builtin types for the above.
10654
10655 2018-05-04 Richard Biener <rguenther@suse.de>
10656
10657 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10658 * gimple-ssa-store-merging.c
10659 (imm_store_chain_info::output_merged_store): Remove redundant create,
10660 release split_store vector contents on failure.
10661 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10662 scalar stmt vector on cache hit.
10663
10664 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10665
10666 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10667 Xilinx FP support.
10668 * config.gcc (powerpc-xilinx-eabi*): Remove.
10669 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10670 support.
10671 (fusion_addis_mem_combo_load): Ditto.
10672 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10673 FP support.
10674 (rs6000_cpu_cpp_builtins): Ditto.
10675 * config/rs6000/rs6000-linux.c
10676 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10677 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10678 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10679 support.
10680 (rs6000_setup_reg_addr_masks): Ditto.
10681 (rs6000_init_hard_regno_mode_ok): Ditto.
10682 (rs6000_option_override_internal): Ditto.
10683 (legitimate_lo_sum_address_p): Ditto.
10684 (rs6000_legitimize_address): Ditto.
10685 (rs6000_legitimize_reload_address): Ditto.
10686 (rs6000_legitimate_address_p): Ditto.
10687 (abi_v4_pass_in_fpr): Ditto.
10688 (setup_incoming_varargs): Ditto.
10689 (rs6000_gimplify_va_arg): Ditto.
10690 (rs6000_split_multireg_move): Ditto.
10691 (rs6000_savres_strategy): Ditto.
10692 (rs6000_emit_prologue_components): Ditto.
10693 (rs6000_emit_epilogue_components): Ditto.
10694 (rs6000_emit_prologue): Ditto.
10695 (rs6000_emit_epilogue): Ditto.
10696 (rs6000_elf_file_end): Ditto.
10697 (rs6000_function_value): Ditto.
10698 (rs6000_libcall_value): Ditto.
10699 * config/rs6000/rs6000.h: Ditto.
10700 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10701 (TARGET_MINMAX): ... this. New.
10702 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10703 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10704 (*movsi_internal1_single): Delete.
10705 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10706 mfpu=, mxilinx-fpu): Delete.
10707 * config/rs6000/singlefp.h: Delete.
10708 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10709 * config/rs6000/t-rs6000: Ditto.
10710 * config/rs6000/t-xilinx: Delete.
10711 * config/rs6000/titan.md: Adjust for fp_type removal.
10712 * config/rs6000/vsx.md: Remove Xilinx FP support.
10713 (VStype_simple): Delete.
10714 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10715 * config/rs6000/xfpu.h: Delete.
10716 * config/rs6000/xfpu.md: Delete.
10717 * config/rs6000/xilinx.h: Delete.
10718 * config/rs6000/xilinx.opt: Delete.
10719 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10720 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10721
10722 2018-05-04 Tom de Vries <tom@codesourcery.com>
10723
10724 PR libgomp/85639
10725 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10726 if ignore == 0.
10727
10728 2018-05-04 Richard Biener <rguenther@suse.de>
10729
10730 PR middle-end/85627
10731 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10732 (expand_complex_div_wide): Likewise.
10733 (expand_complex_operations_1): Likewise.
10734 (expand_complex_libcall): Preserve EH info of the original stmt.
10735 (tree_lower_complex): Handle removed blocks.
10736 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10737 on complex multiplication and division libcall builtins.
10738
10739 2018-05-04 Richard Biener <rguenther@suse.de>
10740
10741 PR middle-end/85574
10742 * fold-const.c (negate_expr_p): Restrict negation of operand
10743 zero of a division to when we know that can happen without
10744 overflow.
10745 (fold_negate_expr_1): Likewise.
10746
10747 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10748
10749 PR libstdc++/85466
10750 * real.h (real_nextafter): Declare.
10751 * real.c (real_nextafter): New function.
10752 * fold-const-call.c (fold_const_nextafter): New function.
10753 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10754 CASE_CFN_NEXTTOWARD.
10755 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10756 even when arg1_mode is different from arg0_mode.
10757
10758 2018-05-03 Nathan Sidwell <nathan@acm.org>
10759
10760 * doc/extend.texi (Deprecated Features): Remove
10761 -ffriend-injection.
10762 (Backwards Compatibility): Likewise.
10763 * doc/invoke.texi (C++ Language Options): Likewise.
10764 (C++ Dialect Options): Likewise.
10765
10766 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10767
10768 PR target/85530
10769 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10770 _mm512_mask_mullox_epi64): New intrinsics.
10771
10772 2018-05-03 Tom de Vries <tom@codesourcery.com>
10773
10774 PR testsuite/85106
10775 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10776 dump files): Add offload-tree.
10777
10778 2018-05-03 Richard Biener <rguenther@suse.de>
10779
10780 PR tree-optimization/85615
10781 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10782 to loops not nested in BBs loop father to avoid creating multi-entry
10783 loops.
10784
10785 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10786
10787 PR tree-optimization/70291
10788 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10789 arguments. Change return type to tree. Emit libcall as a new
10790 statement rather than replacing existing one when inplace_p is true.
10791 (expand_complex_multiplication_components): New function.
10792 (expand_complex_multiplication): Expand floating-point complex
10793 multiplication using the above.
10794 (expand_complex_division): Rename inner_type parameter to type.
10795 Update expand_complex_libcall call-site.
10796 (expand_complex_operations_1): Update expand_complex_multiplication
10797 and expand_complex_division call-sites.
10798
10799 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10800
10801 PR target/85582
10802 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10803 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10804 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10805 the highest significant bit of the shift count mask is clear. In
10806 check whether and[sq]i3 is needed verify that all significant bits
10807 of the shift count other than the highest are set.
10808
10809 2018-05-02 Tom de Vries <tom@codesourcery.com>
10810
10811 PR libgomp/82428
10812 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10813 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10814 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10815 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10816 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10817 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10818 __builtin_goacc_parlevel_size.
10819
10820 2018-05-02 Richard Biener <rguenther@suse.de>
10821
10822 PR tree-optimization/85597
10823 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10824 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10825 directly.
10826
10827 2018-05-02 Tom de Vries <tom@codesourcery.com>
10828
10829 PR testsuite/85106
10830 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10831 dump files): Add ltrans-tree.
10832
10833 2018-05-02 Tom de Vries <tom@codesourcery.com>
10834
10835 PR testsuite/85106
10836 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10837 dump files): Add wpa-ipa.
10838
10839 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10840
10841 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10842 powerpc*-*-linux*paired* target.
10843 * config/rs6000/750cl.h: Delete.
10844 * config/rs6000/paired.h: Delete.
10845 * config/rs6000/paired.md: Delete.
10846 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10847 float support.
10848 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10849 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10850 comment. Remove paired float support.
10851 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10852 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10853 VECTOR_PAIRED.
10854 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10855 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10856 declarations.
10857 * config/rs6000/rs6000.c: Remove paired float support.
10858 (paired_expand_vector_init, paired_expand_vector_move,
10859 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10860 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10861 paired_expand_builtin, paired_expand_predicate_builtin,
10862 paired_init_builtins): Delete.
10863 * config/rs6000/rs6000.h: Remove paired float support.
10864 * config/rs6000/rs6000.md: Remove paired float support.
10865 (move_from_CR_ov_bit): Delete.
10866 * config/rs6000/rs6000.opt (mpaired): Delete.
10867 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10868 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10869
10870 2018-05-02 Richard Biener <rguenther@suse.de>
10871
10872 PR middle-end/85567
10873 * gimplify.c (gimplify_save_expr): When in SSA form allow
10874 SAVE_EXPRs to compute to SSA vars.
10875
10876 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10877
10878 PR target/85582
10879 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10880 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10881 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10882 clobber operands[2], instead use a new pseudo. Formatting fixes.
10883
10884 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10885
10886 PR tree-optimization/85586
10887 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10888 exit early for statements in the same group if the accesses are
10889 not strided.
10890
10891 2018-05-02 Tom de Vries <tom@codesourcery.com>
10892
10893 PR lto/85451
10894 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10895 error message.
10896
10897 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10898
10899 PR tree-optimization/85143
10900 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10901
10902 2018-05-01 Tom de Vries <tom@codesourcery.com>
10903
10904 PR lto/85451
10905 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10906 not found" error message.
10907
10908 2018-05-01 Tom de Vries <tom@codesourcery.com>
10909
10910 PR other/83786
10911 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10912 * vec.c (test_ordered_remove_if): New function.
10913 (vec_c_tests): Call test_ordered_remove_if.
10914 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10915 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10916 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10917 VEC_ORDERED_REMOVE_IF.
10918
10919 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10920
10921 PR tree-optimization/82665
10922 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10923 pointer subtraction where arguments come from a memchr call.
10924
10925 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10926
10927 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10928 --push-state --as-needed and --pop-state instead of --as-needed and
10929 --no-as-needed if ld supports it.
10930 * configure: Regenerated.
10931
10932 PR web/85578
10933 * doc/install.texi2html: Replace _002d with - and _002a with * in
10934 generated html files using sed.
10935
10936 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10937
10938 PR c++/85523
10939 * gcc-rich-location.c (blank_line_before_p): New function.
10940 (use_new_line): New function.
10941 (gcc_rich_location::add_fixit_insert_formatted): New function.
10942 * gcc-rich-location.h
10943 (gcc_rich_location::add_fixit_insert_formatted): New function.
10944
10945 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10946
10947 * selftest.c (assert_streq): Rename "expected" and "actual" to
10948 "val1" and "val2". Extend NULL-handling to cover both inputs
10949 symmetrically, while still requiring both to be non-NULL for a pass.
10950 * selftest.h (assert_streq): Rename "expected" and "actual" to
10951 "val1" and "val2".
10952 (ASSERT_EQ): Likewise.
10953 (ASSERT_EQ_AT): Likewise.
10954 (ASSERT_KNOWN_EQ): Likewise.
10955 (ASSERT_KNOWN_EQ_AT): Likewise.
10956 (ASSERT_NE): Likewise.
10957 (ASSERT_MAYBE_NE): Likewise.
10958 (ASSERT_MAYBE_NE_AT): Likewise.
10959 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10960 the assertion to pass.
10961 (ASSERT_STREQ_AT): Likewise.
10962
10963 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10964
10965 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10966 interaction with -pie.
10967
10968 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10969
10970 * selftest.h: Fix alphabetization of per-source-file selftest
10971 declarations.
10972
10973 2018-04-30 Jason Merrill <jason@redhat.com>
10974
10975 PR c++/61982 - dead stores to destroyed objects.
10976 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10977 of clobber.
10978
10979 2018-04-30 Jason Merrill <jason@redhat.com>
10980
10981 * tree.c (build_clobber): New.
10982 * tree.h: Declare it.
10983 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10984
10985 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10986
10987 * diagnostic-show-locus.c (layout::layout): Update for
10988 location_get_source_line returning a char_span.
10989 (struct char_span): Move to input.h.
10990 (struct correction): Update for fields in char_span becoming
10991 private.
10992 (struct source_line): Update for location_get_source_line
10993 returning a char_span.
10994 (layout::print_line): Likewise.
10995 * edit-context.c (edited_file::print_content): Likewise.
10996 (edited_file::print_diff_hunk): Likewise.
10997 (edited_file::print_run_of_changed_lines): Likewise.
10998 (edited_file::get_num_lines): Likewise.
10999 (edited_line::edited_line): Likewise.
11000 * final.c (asm_show_source): Likewise.
11001 * input.c (location_get_source_line): Convert return type
11002 from const char * to char_span, losing the final "line_len"
11003 param.
11004 (dump_location_info): Update for the above.
11005 (get_substring_ranges_for_loc): Likewise. Use a char_span
11006 when handling the literal within the line.
11007 (test_reading_source_line): Update for location_get_source_line
11008 returning a char_span.
11009 * input.h (class char_span): Move here from
11010 diagnostic-show-locus.c, converting from a struct to a class.
11011 Make data members private.
11012 (char_span::operator bool): New.
11013 (char_span::length): New.
11014 (char_span::get_buffer): New.
11015 (char_span::operator[]): New.
11016 (char_span::subspan): Make const.
11017 (char_span::xstrdup): New.
11018 (location_get_source_line): Convert return type from const char *
11019 to char_span, losing the final "line_size" param.
11020
11021 2018-04-30 Jan Hubicka <jh@suse.cz>
11022
11023 * lto-wrapper.c (ltrans_priorities): New static var.
11024 (cmp_priority): New.
11025 (run_gcc): Read priorities and if doing parallel build order
11026 the Makefile by them.
11027
11028 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11029
11030 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11031
11032 2018-04-30 Richard Biener <rguenther@suse.de>
11033
11034 * tree-cfg.c (verify_address): Remove base argument, add
11035 flag whether to check TREE_ADDRESSABLE and do that.
11036 (verify_expr): Remove.
11037 (verify_types_in_gimple_reference): Add pieces from verify_expr.
11038 (verify_gimple_assign_single): Likewise.
11039 (verify_gimple_switch): Likewise.
11040 (verify_expr_location_1): Dereference tp once. Add (disabled)
11041 piece from verify_expr.
11042 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11043
11044 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11045
11046 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11047
11048 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11049
11050 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11051 (small_data_pattern): Likewise.
11052 (arc_rewrite_small_data): Likewise.
11053 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11054 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11055 (get_symbol_alignment): New function.
11056 (legitimate_small_data_address_p): Likewise.
11057 (legitimate_scaled_address): Update, call
11058 legitimate_small_data_address_p.
11059 (output_sdata): New static variable.
11060 (arc_print_operand): Update how we handle small data operands.
11061 (arc_print_operand_address): Likewise.
11062 (arc_legitimate_address_p): Update, use
11063 legitimate_small_data_address_p.
11064 (arc_rewrite_small_data_p): Remove.
11065 (arc_rewrite_small_data_1): Likewise.
11066 (arc_rewrite_small_data): Likewise.
11067 (small_data_pattern): Likewise.
11068 (compact_sda_memory_operand): Update to use
11069 legitimate_small_data_address_p and get_symbol_alignment.
11070 (prepare_move_operands): Don't rewite sdata pattern.
11071 (prepare_extend_operands): Remove.
11072 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11073 pattern.
11074 (zero_extendqisi2): Likewise.
11075 (zero_extendhisi2): Likewise.
11076 (extendqihi2): Likewise.
11077 (extendqisi2): Likewise.
11078 (extendhisi2): Likewise.
11079 (addsi3): Likewise.
11080 (subsi3): Likewise.
11081 (andsi3): Likewise.
11082 * config/arc/constraints.md (Usd): Change it to memory constraint.
11083
11084 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11085
11086 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11087 as source of std instructions.
11088 * config/arc/arc.md (movsi_insn): Update pattern predicate to
11089 allow 6-bit constants as source for store instructions.
11090 (movdi_insn): Update instruction pattern to allow 6-bit constants
11091 as source for store instructions.
11092
11093 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
11094
11095 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11096
11097 2018-04-30 Nathan Sidwell <nathan@acm.org>
11098 Sandra Loosemore <sandra@codesourcery.com>
11099
11100 * dumpfile.c (dump_open): Allow '-' for stdout.
11101 * doc/invoke.texi (Developer Options): Document dump filename
11102 determination early. Document stdin/stdout selection.
11103
11104 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
11105
11106 Microblaze Target: PIC data text relative
11107
11108 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11109 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11110 Add declaration.
11111 * config/microblaze/microblaze.h (microblaze_constant_address_p):
11112 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11113 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11114 New addressing mode for data-text relative position indepenedent code.
11115 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11116 'ADDRESS_SYMBOLIC_TXT_REL'.
11117 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11118 (microblaze_legitimate_pic_operand): Exclude function calls from
11119 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11120 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11121 addresses cases.
11122 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11123 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11124 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11125 for 'address + offset'.
11126 (microblaze_expand_prologue): Add new function prologue call for
11127 'r20' assignation.
11128 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11129 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11130 table in case of TARGET_PIC_DATA_TEXT_REL.
11131 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11132 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11133 Add new macros 'UNSPEC_TEXT',
11134 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11135 + exclude function calls from 'UNSPEC_PLT' in case of data text
11136 relative mode.
11137 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11138 new target hook for generating address diff vector tables in case of
11139 flag_pic.
11140 * doc/tm.texi : Regenerate.
11141 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11142 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11143 of addr diff vector generation.
11144 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11145 target hook definition.
11146 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11147 Add default function for generate_pic_addr_diff_vec -> flag_pic.
11148 * doc/invoke.texi (Add new pic option): Add new microblaze pic
11149 option for data text relative.
11150
11151 2018-04-30 Richard Biener <rguenther@suse.de>
11152
11153 * tree-chrec.h (evolution_function_is_constant_p): Remove
11154 redundant check.
11155 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11156
11157 2018-04-30 Richard Biener <rguenther@suse.de>
11158
11159 PR bootstrap/85571
11160 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11161
11162 2018-04-30 Richard Biener <rguenther@suse.de>
11163
11164 PR tree-optimization/28364
11165 PR tree-optimization/85275
11166 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11167 copying first exit test.
11168
11169 2018-04-28 Mark Wielaard <mark@klomp.org>
11170
11171 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11172 dwarf_version >= 5.
11173 (dwarf_AT): Handle DW_AT_addr_base.
11174 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11175
11176 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
11177
11178 PR target/84431
11179 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11180 (*ashl<dwi>3_doubleword_mask_1): Ditto.
11181 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11182 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11183
11184 2018-04-28 Richard Biener <rguenther@suse.de>
11185
11186 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11187 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11188 to reflect use. Only add interesting stmts.
11189
11190 2018-04-27 Martin Jambor <mjambor@suse.cz>
11191
11192 PR ipa/85549
11193 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11194 the jump function allows for passing through aggregate values.
11195
11196 2018-04-27 David Malcolm <dmalcolm@redhat.com>
11197
11198 * input.h (in_system_header_at): Convert from macro to inline
11199 function.
11200 (from_macro_expansion_at): Likewise.
11201 (from_macro_definition_at): Likewise.
11202
11203 2018-04-27 Jeff Law <law@redhat.com>
11204
11205 * config.gcc: Mark tile* targets as deprecated/obsolete.
11206
11207 2018-04-27 Richard Biener <rguenther@suse.de>
11208
11209 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11210 fix for ILP32.
11211
11212 2018-04-27 Richard Biener <rguenther@suse.de>
11213
11214 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11215
11216 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
11217
11218 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11219 with Yd constraint. Set "preferred_for_speed" attribute from
11220 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11221 with Yd constraint.
11222 (*movdi_internal): Ditto.
11223 (movti_interunit splitters): Remove
11224 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11225 (movdi_interunit splitters): Ditto.
11226 * config/i386/constraints.md (Ye): Remove.
11227 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11228
11229 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11230
11231 PR target/85512
11232 * config/aarch64/constraints.md (Usg): Limit to 31.
11233 (Usj): Limit to 63.
11234
11235 2018-04-27 Jakub Jelinek <jakub@redhat.com>
11236
11237 PR tree-optimization/85529
11238 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11239 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11240 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11241 zero extension or masking of the MSB bit.
11242 (optimize_range_tests): Add FIRST_BB argument, pass it through
11243 to optimize_range_tests_var_bound.
11244 (maybe_optimize_range_tests, reassociate_bb): Adjust
11245 optimize_range_tests callers.
11246
11247 2018-04-26 Richard Biener <rguenther@suse.de>
11248 Jakub Jelinek <jakub@redhat.com>
11249
11250 * cgraph.h (symbol_table): Just declare debug method here.
11251 * symtab.c (symbol_table::debug): Define.
11252
11253 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
11254
11255 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11256
11257 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
11258
11259 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11260 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11261 (*movdi_internal): Substitute Yi and Yj constraint with x
11262 and Ym and Yn constraint with y constraint. Update "isa"
11263 attribute and set "preferred_for_speed" attribute from
11264 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11265 (*movsi_internal): Ditto.
11266 (*movdf_internal): Ditto.
11267 (*movsf_internal): Ditto.
11268 (*zero_extendsidi2): Ditto.
11269 * config/i386/sse.md (vec_set<mode>_0): Ditto.
11270 (sse2_loadld): Ditto.
11271 (*vec_extract<ssevecmodelower>_0): Ditto.
11272 (*vec_extractv4si_0_zext_sse4): Ditto.
11273 (vec_concatv2di): Ditto.
11274 (*vec_dup<mode>): Ditto.
11275 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11276 * config/i386/constraints.md (Yi): Remove.
11277 (Yj): Remove.
11278 (Ym): Remove.
11279 (Yn): Remove.
11280
11281 2018-04-26 Nathan Sidwell <nathan@acm.org>
11282
11283 * dumpfile.c (dump_open): New.
11284 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11285 (dump_finish): Detect stdio/stderr by value not name.
11286
11287 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
11288
11289 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11290
11291 2018-04-26 Tom de Vries <tom@codesourcery.com>
11292
11293 PR target/84952
11294 * config/nvptx/nvptx.c (verify_neutering_jumps)
11295 (verify_neutering_labels): New function
11296 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11297
11298 2018-04-26 Tom de Vries <tom@codesourcery.com>
11299
11300 PR target/84025
11301 * config/nvptx/nvptx.c (needs_neutering_p): New function.
11302 (nvptx_single): Use needs_neutering_p to skip over insns that do not
11303 need neutering.
11304
11305 2018-04-26 Richard Biener <rguenther@suse.de>
11306 Tom de Vries <tom@codesourcery.com>
11307
11308 PR lto/85422
11309 * lto-streamer-out.c (output_function): Fixup loops if required to match
11310 discovery done in the reader.
11311
11312 2018-04-26 Richard Biener <rguenther@suse.de>
11313
11314 PR tree-optimization/85116
11315 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11316 have a loop exit from the single latch predecessor. Remove
11317 case of header with just condition.
11318 (ch_base::copy_headers): Exclude infinite loops from any
11319 processing.
11320 (pass_ch::execute): Record exits.
11321
11322 2018-04-26 Richard Biener <rguenther@suse.de>
11323
11324 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11325 prologue cost vector and pass it to vect_get_load_cost.
11326 (vect_get_peeling_costs_all_drs): Likewise.
11327 (vect_peeling_hash_get_lowest_cost): Likewise.
11328 (vect_enhance_data_refs_alignment): Likewise.
11329
11330 2018-04-26 Richard Biener <rguenther@suse.de>
11331
11332 PR middle-end/85450
11333 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11334 checking of integer<->pointer conversions.
11335 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11336 sign-/zero-extending pointer types.
11337 (expand_omp_for_static_chunk): Likewise.
11338
11339 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
11340 Jean Lee <xiaoyur347@gmail.com>
11341
11342 * config/mips/mips.c (mips_asan_shadow_offset): New function.
11343 (TARGET_ASAN_SHADOW_OFFSET): Define.
11344 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11345 true for -fsanitize=address.
11346
11347 2018-04-25 Mark Wielaard <mark@klomp.org>
11348
11349 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11350 shorter ones.
11351
11352 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11353
11354 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11355 than "alu", remove explicit "memory" and "imm_disp" attributes.
11356 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11357
11358 PR middle-end/85414
11359 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11360 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11361 gen_lowpart_no_emit.
11362
11363 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
11364
11365 PR target/85473
11366 * config/i386/i386.c (ix86_expand_builtin): Change memory
11367 operand to XI, extend p0 to Pmode.
11368 * config/i386/i386.md: Change unspec volatile and operand
11369 1 mode to XI, change operand 0 mode to P.
11370
11371 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11372
11373 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11374 GET_MODE_MASK before any checking.
11375 (nds32_can_use_bset_p): Likewise.
11376 (nds32_can_use_btgl_p): Likewise.
11377
11378 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11379
11380 * config/nds32/nds32-doubleword.md: New define_split pattern for
11381 illegal register number.
11382
11383 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11384
11385 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11386
11387 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11388
11389 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11390
11391 2018-04-25 Richard Biener <rguenther@suse.de>
11392
11393 * lto-streamer.h (LTO_major_version): Bump to 8.
11394
11395 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11396
11397 * BASE-VER: Set to 9.0.0.
11398
11399 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
11400
11401 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11402 in __abskf2 and __powikf2.
11403
11404 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11405
11406 PR target/85512
11407 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11408 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11409 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11410 Use the above on operand 2. Reindent.
11411 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11412
11413 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11414
11415 PR target/85485
11416 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11417 handle OPT_mcet.
11418 * config/i386/i386.opt (mcet): Removed.
11419 * doc/install.texi: Remove -mcet documentation.
11420 * doc/invoke.texi: Likewise.
11421
11422 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11423
11424 PR target/85485
11425 * doc/install.texi: Remove -mcet from bootstrap-cet.
11426
11427 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11428
11429 PR target/85511
11430 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11431 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11432 if TARGET_64BIT.
11433
11434 PR target/85503
11435 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11436 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11437 containing a CONST_VECTOR.
11438
11439 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11440
11441 * doc/install.texi: Update newlib dependency for nvptx.
11442
11443 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11444
11445 PR target/85508
11446 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11447 instead of INTVAL when shifting x left.
11448
11449 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11450
11451 PR tree-optimization/85478
11452 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11453 vect_grouped_store_supported for single element vectors.
11454
11455 2018-04-24 Richard Biener <rguenther@suse.de>
11456
11457 PR target/85491
11458 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11459 load cost increase to the case of non-constant step.
11460
11461 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11462
11463 PR target/84828
11464 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11465 destination if any_malformed_asm.
11466
11467 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11468
11469 PR middle-end/85496
11470 * expr.c (store_field): In the bitfield case, if the value comes from
11471 a function call and is returned in registers by means of a PARALLEL,
11472 do not change the mode of the temporary unless BLKmode and VOIDmode.
11473
11474 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11475
11476 PR rtl-optimization/85423
11477 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11478 dependencies to debug insns when the previous insn is non-debug.
11479
11480 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11481
11482 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11483 enums into a single definition.
11484 (fls): Fix predicates and printing.
11485 (seti): Likewise.
11486
11487 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11488
11489 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11490 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11491 and short u6 immediate.
11492 (check_if_valid_sleep_operand): Remove.
11493 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11494
11495 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11496
11497 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11498 flag_always_save_lp condition.
11499 * config/nds32/nds32.opt (malways-save-lp): New option.
11500
11501 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11502
11503 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11504 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11505 * config/nds32/nds32.h
11506 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11507 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11508
11509 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11510
11511 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11512 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11513
11514 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11515 Chung-Ju Wu <jasonwucj@gmail.com>
11516
11517 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11518 Declare.
11519 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11520 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11521
11522 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11523
11524 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11525
11526 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11527
11528 * config/nds32/nds32-protos.h (nds32_data_alignment,
11529 nds32_local_alignment): Declare.
11530 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11531 nds32_local_alignment): New functions.
11532 (TARGET_CONSTANT_ALIGNMENT): Define.
11533 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11534
11535 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11536
11537 * config/nds32/nds32.c
11538 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11539 (TARGET_MODES_TIEABLE_P): Likewise.
11540
11541 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11542
11543 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11544 level Ofast and Og.
11545
11546 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11547 Chung-Ju Wu <jasonwucj@gmail.com>
11548
11549 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11550 for unaligned access.
11551 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11552 unaligned access.
11553 * config/nds32/nds32-intrinsic.md: Likewise.
11554 * config/nds32/nds32_intrinsic.h: Likewise.
11555 * config/nds32/nds32.h (nds32_builtins): Likewise.
11556 * config/nds32/nds32.opt (munaligned-access): New option.
11557 * config/nds32/nds32.c (nds32_asm_file_start): Display
11558 flag_unaligned_access status.
11559
11560 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11561
11562 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11563 -mno-relax is present.
11564 * config/riscv/linux.h (LINK_SPEC): Ditto.
11565
11566 2018-04-20 Martin Sebor <msebor@redhat.com>
11567
11568 PR c/85365
11569 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11570 for null pointers.
11571 (gimple_fold_builtin_stxcpy_chk): Same.
11572 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11573
11574 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11575
11576 PR target/85456
11577 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11578 __powikf2 when long double is IEEE 128-bit.
11579
11580 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11581
11582 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11583 step to make sure stack always aligned.
11584
11585 2018-04-20 Carl Love <cel@us.ibm.com>
11586
11587 PR target/83402
11588 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11589 size check for arg0.
11590
11591 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11592 Tom de Vries <tom@codesourcery.com>
11593
11594 PR target/85445
11595 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11596 Emit insns for calls too.
11597 (nvptx_find_par): Always look for worker-level predecessor insn.
11598 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11599 calls.
11600 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11601 (nvptx_process_pars): Propagate frames for calls.
11602
11603 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11604
11605 PR target/85469
11606 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11607 Removed.
11608 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11609 (ix86_handle_option): Don't handle OPT_mibt.
11610 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11611 __SHSTK__.
11612 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11613 has_ibt and ibt.
11614 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11615 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11616 (ix86_target_macros): Define __CET__ with flag_cf_protection
11617 for -fcf-protection.
11618 * config/i386/i386.c (isa2_opts): Remove -mibt.
11619 * config/i386/i386.h (TARGET_IBT): Removed.
11620 (TARGET_IBT_P): Likewise.
11621 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11622 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11623 * config/i386/i386.opt (mcet): Update help message.
11624 (mshstk): Likewise.
11625 (mibt): Removed.
11626 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11627 -mcet as an alias for -mshstk.
11628
11629 2018-04-20 Richard Biener <rguenther@suse.de>
11630
11631 PR middle-end/85475
11632 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11633 complexity by forcing a single use of the multiply operand.
11634
11635 2018-04-20 Martin Jambor <mjambor@suse.cz>
11636
11637 ipa/85449
11638 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11639 recursion dependency to only apply to non-clones.
11640
11641 2018-04-20 Martin Jambor <mjambor@suse.cz>
11642
11643 ipa/85447
11644 * ipa-cp.c (create_specialized_node): Check that clones of
11645 self-recursive edges exist during IPA-CP.
11646
11647 2018-04-19 Toon Moene <toon@moene.org>
11648
11649 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11650 by -O3.
11651
11652 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11653
11654 PR tree-optimization/85467
11655 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11656 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11657 VECTOR_CST element to type.
11658
11659 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11660
11661 PR target/85397
11662 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11663 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11664 (builtin_longjmp): Likewise.
11665 (save_stack_nonlocal): New pattern.
11666 (restore_stack_nonlocal): Likewise.
11667
11668 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11669
11670 PR target/85404
11671 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11672 Replace ASM_OUTPUT_LABEL with fprintf.
11673
11674 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11675
11676 PR target/85417
11677 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11678 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11679 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11680 define __IBT__ and __SHSTK__ for -fcf-protection.
11681 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11682 TARGET_IBT.
11683 (ix86_trampoline_init): Likewise.
11684 (x86_output_mi_thunk): Likewise.
11685 (ix86_notrack_prefixed_insn_p): Likewise.
11686 (ix86_option_override_internal): Don't disallow -fcf-protection.
11687 * config/i386/i386.md (rdssp<mode>): Also enable for
11688 -fcf-protection.
11689 (incssp<mode>): Likewise.
11690 (nop_endbr): Likewise.
11691 * config/i386/i386.opt (mcet): Change help message to built-in
11692 functions only.
11693 (mibt): Likewise.
11694 (mshstk): Likewise.
11695 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11696 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11697 enable CET built-in functions.
11698
11699 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11700
11701 * common/config/i386/i386-common.c
11702 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11703 OPTION_MASK_ISA_MOVDIRI_UNSET,
11704 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11705 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11706 * config.gcc (movdirintrin.h): New header.
11707 * config/i386/cpuid.h (bit_MOVDIRI,
11708 bit_MOVDIR64B): New bits.
11709 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11710 and -mmvodir64b.
11711 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11712 (VOID, PVOID, PCVOID)): New function types.
11713 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11714 __builtin_ia32_directstoreu_u64,
11715 __builtin_ia32_movdir64b): New builtins.
11716 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11717 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11718 and -mmovdiri.
11719 (ix86_valid_target_attribute_inner_p): Ditto.
11720 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11721 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11722 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11723 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11724 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11725 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11726 (movdiri<mode>, movdir64b_<mode>): New.
11727 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11728 * config/i386/immintrin.h: Include movdirintrin.h.
11729 * config/i386/movdirintrin.h: New file.
11730 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11731
11732 2018-04-19 Richard Biener <rguenther@suse.de>
11733
11734 PR middle-end/85455
11735 * cfg.c (clear_bb_flags): When loop state says we have
11736 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11737
11738 2018-04-19 Richard Biener <rguenther@suse.de>
11739
11740 PR tree-optimization/84737
11741 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11742 copying restrict info.
11743 (vect_setup_realignment): Use it.
11744 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11745 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11746 the first DR to all generated stores.
11747 (vectorizable_load): Likewise for loads.
11748
11749 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11750
11751 PR tree-optimization/85446
11752 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11753 the integral and pointer types to have the same precision.
11754
11755 * doc/install.texi: Document --disable-cet being the default and
11756 --enable-cet=auto.
11757
11758 2018-04-18 Martin Liska <mliska@suse.cz>
11759
11760 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11761 style.
11762
11763 2018-04-18 Martin Liska <mliska@suse.cz>
11764
11765 Revert
11766 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11767
11768 PR ipa/83983
11769 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11770 arguments if they are comparable.
11771
11772 2018-04-18 Martin Liska <mliska@suse.cz>
11773
11774 Revert
11775 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11776
11777 PR lto/84805
11778 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11779 incomplete types.
11780
11781 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11782
11783 PR target/85388
11784 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11785 ENDBR after calling __morestack.
11786
11787 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11788
11789 PR jit/85384
11790 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11791 by using gcc_base_ver to generate a gcc_driver_version, and use
11792 it when generating GCC_DRIVER_NAME.
11793 * configure: Regenerate.
11794
11795 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11796
11797 PR target/81084
11798 * config.gcc: Obsolete powerpc*-*-*spe*.
11799
11800 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11801
11802 PR debug/84637
11803 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11804 (stabstr_D): Change type of unum from unsigned int to
11805 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11806 type.
11807
11808 2018-04-17 Jim Wilson <jimw@sifive.com>
11809
11810 PR 84856
11811 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11812 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11813 Set arg_pointer_offset after using pretend_args_size.
11814
11815 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11816
11817 PR rtl-optimization/85431
11818 * dse.c (record_store): Ignore zero width stores.
11819
11820 PR sanitizer/85230
11821 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11822 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11823 __builtin_stack_restore rather than after it.
11824 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11825 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11826 argument instead of virtual_dynamic_stack_rtx.
11827
11828 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11829
11830 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11831 New prototype.
11832 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11833 Add note to error message to explain internal mapping of overloaded
11834 built-in function name to non-overloaded built-in function name.
11835 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11836 function.
11837
11838 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11839
11840 PR target/85424
11841 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11842 where the inputs overlap with the output.
11843
11844 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11845
11846 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11847 (=v, v) alternative and explicit "memory" attribute.
11848 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11849 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11850 attributes.
11851 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11852 "sselog1" type instead of "sselog".
11853 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11854 "sselog". Remove explicit "memory" attribute.
11855 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11856 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11857 attributes.
11858 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11859 "sselog1" type instead of "sselog". Remove explicit "memory"
11860 attribute.
11861 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11862 use "sselog1" type instead of "sselog". Remove explicit "memory"
11863 attribute.
11864 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11865 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11866 attributes.
11867 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11868 "sselog1" type instead of "sselog". Remove explicit "memory"
11869 attribute.
11870 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11871 use "sselog1" type instead of "sselog". Remove explicit "memory"
11872 attribute.
11873
11874 PR target/85430
11875 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11876
11877 PR middle-end/85414
11878 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11879 on a SUBREG.
11880
11881 2018-04-17 Martin Jambor <mjambor@suse.cz>
11882
11883 PR ipa/85421
11884 * ipa-cp.c (create_specialized_node): Call
11885 expand_all_artificial_thunks if necessary.
11886
11887 2018-04-17 Martin Liska <mliska@suse.cz>
11888
11889 PR lto/85405
11890 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11891 in message, remote space in between '_G' and '('.
11892
11893 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11894
11895 PR target/85281
11896 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11897 avx512f_vmcmp<mode>3<round_saeonly_name>,
11898 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11899 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11900 avx512f_rndscale<mode><round_saeonly_name>,
11901 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11902 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11903 Use %<iptr>2 instead of %2 for -masm=intel.
11904 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11905 avx512f_vcvttss2usi<round_saeonly_name>,
11906 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11907 -masm=intel.
11908 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11909 avx512f_vcvttsd2usi<round_saeonly_name>,
11910 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11911 Use %q1 instead of %1 for -masm=intel.
11912 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11913 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11914 of %3 for -masm=intel.
11915 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11916 -masm=intel.
11917 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11918 -masm=intel.
11919 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11920 -masm=intel.
11921 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11922 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11923 %g1.
11924 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11925 -masm=intel.
11926 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11927 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11928 %g1 and one with %0 and %1.
11929 (avx512er_vmrcp28<mode><round_saeonly_name>,
11930 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11931 %1 for -masm=intel.
11932 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11933 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11934 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11935 of %0 and %{%4%} for -masm=intel.
11936 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11937 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11938 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11939 order of %0 and %{%5%}%{z%} for -masm=intel.
11940
11941 2018-04-17 Jan Hubicka <jh@suse.cz>
11942
11943 PR lto/85405
11944 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11945
11946 2018-04-17 Martin Liska <mliska@suse.cz>
11947
11948 PR ipa/85329
11949 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11950 for target_clone error message. Make default implementation
11951 clone to be a local declaration.
11952 (separate_attrs): Add new argument and check for an empty
11953 string.
11954 (expand_target_clones): Handle it.
11955 (ipa_target_clone): Make redirection just for target_clones
11956 functions.
11957
11958 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11959 Tom de Vries <tom@codesourcery.com>
11960
11961 PR middle-end/84955
11962 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11963 tiled basic blocks without omp continue statements.
11964
11965 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11966
11967 PR target/83660
11968 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11969 vec_extract expression as having side effects to make sure it gets
11970 a cleanup point.
11971
11972 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11973
11974 PR target/85403
11975 * config/i386/i386.c (get_builtin_code_for_version): Check
11976 error_mark_node.
11977
11978 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11979
11980 PR target/84331
11981 * config.gcc: Support "skylake".
11982 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11983 PROCESSOR_SKYLAKE.
11984 * config/i386/i386.c (m_SKYLAKE): Define.
11985 (processor_target_table): Add "skylake".
11986 (ix86_option_override_internal): Add "skylake".
11987 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11988 PROCESSOR_CANNONLAKE.
11989 (get_builtin_code_for_version): Fix priority for
11990 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11991 PROCESSOR_SKYLAKE-AVX512.
11992 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11993 (processor_type): Add PROCESSOR_SKYLAKE.
11994
11995 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11996 Jason Merrill <jason@redhat.com>
11997
11998 PR c++/85112
11999 * convert.c (convert_to_integer_1): Use direct recursion for
12000 enumeral types and types with a precision less than the number
12001 of bits in their mode.
12002
12003 2018-04-16 Julia Koval <julia.koval@intel.com>
12004
12005 PR target/84413
12006 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12007 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12008
12009 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
12010
12011 PR target/85293
12012 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12013 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12014 and -mno-direct-move.
12015
12016 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
12017
12018 PR target/83402
12019 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12020 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12021 Ensure negative shifts result in {0}.
12022
12023 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
12024
12025 PR rtl-optimization/79916
12026 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12027 regs (if any) to define how to gnerate SD moves when LRA is in
12028 progress.
12029
12030 2018-04-13 Jakub Jelinek <jakub@redhat.com>
12031
12032 PR rtl-optimization/85393
12033 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12034 * except.c (expand_dw2_landing_pad_for_region): Make static.
12035 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12036 a label and unconditional jump to old_bb, rather than
12037 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12038 basic block.
12039
12040 PR rtl-optimization/85376
12041 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12042 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12043 instead of a specific value.
12044
12045 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12046 Bin Cheng <bin.cheng@arm.com>
12047
12048 PR tree-optimization/82965
12049 PR tree-optimization/83991
12050 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12051 by_profile_only parameter.
12052 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12053 information if the loop was predicted to iterate too many times.
12054 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12055
12056 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12057
12058 PR lto/71991
12059 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12060 always inline.
12061
12062 2018-04-13 Martin Liska <mliska@suse.cz>
12063 Jakub Jelinek <jakub@redhat.com>
12064
12065 PR middle-end/81657
12066 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12067 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12068 * builtins.c (expand_builtin_memory_copy_args): Use
12069 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12070 handle dest_addr == pc_rtx.
12071
12072 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
12073
12074 PR target/85291
12075 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12076 asked to not generate direct moves.
12077 (fix_trunc<mode>si2_stfiwx): Similar.
12078 (fix_trunc<mode>si2_internal): Similar.
12079
12080 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12081
12082 PR debug/83157
12083 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12084 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12085 lookup if dest in some wider mode is known to be const0_rtx and
12086 if so, record permanent equivalence for it to be ZERO_EXTEND of
12087 the narrower mode destination.
12088
12089 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
12090
12091 * lto-streamer-out.c (output_function): Revert 259346.
12092 * omp-expand.c (expand_oacc_for): Likewise.
12093
12094 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
12095
12096 PR rtl-optimization/85354
12097 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12098 * sel-sched.c (sel_global_init): ... here.
12099
12100 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
12101
12102 PR target/85238
12103 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12104 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12105 mode for PE-COFF targets.
12106 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12107 (i386_pe_asm_lto_end): Likewise.
12108 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12109 (TARGET_ASM_LTO_END): Likewise.
12110 * config/i386/winnt.c (saved_debug_info_level): New static variable.
12111 (i386_pe_asm_lto_start): New function.
12112 (i386_pe_asm_lto_end): Likewise.
12113
12114 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
12115 Richard Biener <rguenther@suse.de>
12116
12117 PR middle-end/84955
12118 * lto-streamer-out.c (output_function): Fix CFG loop state before
12119 streaming out.
12120 * omp-expand.c (expand_oacc_for): Handle calls to internal
12121 functions like regular functions.
12122
12123 2018-04-12 Richard Biener <rguenther@suse.de>
12124
12125 PR lto/85371
12126 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12127 for the early LTO debug to properly generate references to it
12128 during DIE emission. Do not re-use that for the skeleton for
12129 split-dwarf.
12130 (dwarf2out_early_finish): Likewise.
12131
12132 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12133
12134 PR target/85328
12135 * config/i386/sse.md
12136 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12137 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12138 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12139 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12140 and output is a reg, avoid creating invalid lowpart subreg, but
12141 instead split into a 512-bit move. Don't split if not AVX512VL,
12142 input is xmm16+ reg and output is a mem.
12143 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12144 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12145 xmm16+ reg and output is a mem.
12146
12147 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12148
12149 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12150 also for flag_dwarf2_cfi_asm.
12151
12152 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12153
12154 PR rtl-optimization/85342
12155 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12156 a bool scalar var inside of the loop instead. Don't try to update
12157 recog_data.operand after failed apply_change_group.
12158
12159 2018-04-12 Tom de Vries <tom@codesourcery.com>
12160
12161 PR target/85296
12162 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12163 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
12164 array with flexible array member as array without given dimension.
12165 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12166 argument for undefined param to true.
12167
12168 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
12169
12170 PR target/85321
12171 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12172 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12173 from PowerPC section.
12174 * config/rs6000/sysv4.opt (mcall-): Improve help text.
12175 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12176 help text that is too long.
12177 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12178 help text that is too long.
12179 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12180 help text that is too long.
12181
12182 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
12183
12184 * config/alpha/alpha.md (stack_probe_internal): Rename
12185 from "probe_stack". Update all callers.
12186
12187 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12188
12189 PR rtl-optimization/84566
12190 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12191 sched_macro_fuse_insns.
12192
12193 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12194
12195 PR target/84301
12196 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12197 (compute_block_dependences): ... from here.
12198
12199 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12200
12201 PR tree-optimization/85331
12202 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12203 from int to HOST_WIDE_INT.
12204
12205 2018-04-11 Martin Jambor <mjambor@suse.cz>
12206
12207 PR ipa/84149
12208 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12209 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12210 not the same as the source val.
12211 (cgraph_edge_brings_value_p): New parameter.
12212 (gather_edges_for_value): Pass destination value to
12213 cgraph_edge_brings_value_p.
12214 (perhaps_add_new_callers): Likewise.
12215 (get_info_about_necessary_edges): Likewise and exclude values brought
12216 only by self-recursive edges.
12217 (create_specialized_node): Redirect only clones of self-calling edges.
12218 (+self_recursive_pass_through_p): New function.
12219 (find_more_scalar_values_for_callers_subset): Use it.
12220 (find_aggregate_values_for_callers_subset): Likewise.
12221 (known_aggs_to_agg_replacement_list): Removed.
12222 (decide_whether_version_node): Re-calculate known constants for all
12223 remaining context clones.
12224
12225 2018-04-11 Richard Biener <rguenther@suse.de>
12226
12227 PR lto/85339
12228 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12229 from early DWARF output.
12230 (dwarf2out_early_finish): Output line info unconditionally into
12231 early DWARF and add reference to it.
12232
12233 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12234
12235 PR target/85281
12236 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12237 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12238 other than V2DFmode using iptr mode attribute.
12239 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12240
12241 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12242
12243 PR rtl-optimization/84659
12244 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12245
12246 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12247
12248 PR debug/85302
12249 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12250 SIZEP is NULL.
12251 (output_loc_list): Pass address of a dummy size variable even in the
12252 locview handling loop.
12253 (index_location_lists): Add comment on why skip_loc_list_entry can't
12254 call size_of_locs.
12255
12256 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
12257
12258 PR target/85261
12259 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12260 into register.
12261
12262 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
12263
12264 PR target/85321
12265 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12266 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12267 and -mstring-compare-inline-limit.
12268
12269 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12270
12271 PR target/85287
12272 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12273 for stack clash protection in a register whenever we need it to be in
12274 a register.
12275
12276 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12277
12278 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12279 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12280
12281 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12282
12283 PR target/85321
12284 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12285 the help text.
12286 (mlong-double-): Ditto.
12287 * config/rs6000/sysv4.opt (msdata=): Ditto.
12288 (mtls-size=): Ditto.
12289
12290 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
12291
12292 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12293 erroneous entries for
12294 "vector int vec_ldl (int, long int *)", and
12295 "vector unsigned int vec_ldl (int, unsigned long int *)".
12296 Add comments and entries for
12297 "vector bool char vec_ldl (int, bool char *)",
12298 "vector bool short vec_ldl (int, bool short *)",
12299 "vector bool int vec_ldl (int, bool int *)",
12300 "vector bool long long vec_ldl (int, bool long long *)",
12301 "vector pixel vec_ldl (int, pixel *)",
12302 "vector long long vec_ldl (int, long long *)",
12303 "vector unsigned long long vec_ldl (int, unsigned long long *)".
12304 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12305 type tree bool_long_long_type_node and correct definition of
12306 bool_V2DI_type_node to make reference to this new type tree.
12307 (rs6000_mangle_type): Replace erroneous reference to
12308 bool_long_type_node with bool_long_long_type_node.
12309 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12310 comments to emphasize sign distinctions for char and int types and
12311 replace RS6000_BTI_bool_long constant with
12312 RS6000_BTI_bool_long_long constant. Also add comment to restrict
12313 use of RS6000_BTI_pixel.
12314 (bool_long_type_node): Remove this macro definition.
12315 (bool_long_long_type_node): New macro definition
12316
12317 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12318
12319 PR rtl-optimization/85300
12320 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12321 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12322 simplify_unary_operation fails.
12323
12324 2018-04-10 Martin Liska <mliska@suse.cz>
12325
12326 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12327 cgraph_edge and ipa_ref.
12328
12329 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12330
12331 PR target/85177
12332 PR target/85255
12333 * config/i386/sse.md
12334 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12335 computation of the VEC_MERGE selector from mask.
12336 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12337 Fix decoding of the VEC_MERGE selector into mask.
12338
12339 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12340
12341 PR tree-optimization/85286
12342 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12343
12344 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12345
12346 * final.c (final_1): Set insn_last_address as well as
12347 insn_current_address.
12348
12349 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12350
12351 PR target/85173
12352 * explow.c (emit_stack_probe): Call validize_mem on memory location
12353 before passing it to gen_probe_stack. Create address operand and
12354 legitimize it for the probe_stack_address case.
12355
12356 2018-04-09 Jan Hubicka <jh@suse.cz>
12357
12358 PR lto/85078
12359 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12360 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12361 * tree.c (free_lang_data_in_type): Fix handling of binfos;
12362 walk basetypes.
12363 (free_lang_data): Rebuild type inheritance graph.
12364
12365 2018-04-09 Martin Sebor <msebor@redhat.com>
12366
12367 * invoke.texi (-finline-small-functions): Mention other optimization
12368 options.
12369 (-findirect-inlining, -fpartial-inlining): Same.
12370 (-finline-functions-called-once): Same.
12371 (-freorder-blocks-and-partition): Same.
12372
12373 2018-04-09 Jan Hubicka <jh@suse.cz>
12374
12375 PR rtl/84058
12376 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12377 jumps; choose last target that matches the criteria (i.e.
12378 no partition changes for non-crossing jumps).
12379 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12380 support for redirecting crossing jumps to non-crossing.
12381
12382 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
12383
12384 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12385 also for naked functions.
12386
12387 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
12388
12389 * config/arc/arc.md (add_shift): New pattern.
12390 (add_shift2): Likewise.
12391 (sub_shift): Likewise.
12392 (sub_shift_cmp0_noout): Likewise.
12393 (compare_si_ashiftsi): Likewise.
12394 (xbfu_cmp0_noout): New combine pattern.
12395 (xbfu_cmp0"): Likewise.
12396 (movsi_set_cc_insn): Place the predicable variant first.
12397 (commutative_binary_cmp0_noout): Remove clobber.
12398 (commutative_binary_cmp0): New pattern.
12399 (noncommutative_binary_cmp0): Likewise.
12400 (noncommutative_binary_cmp0_noout): Likewise.
12401 (noncommutative_binary_comparison_result_used): Removed.
12402 (rsub_cmp0): New pattern.
12403 (rsub_cmp0_noout): Likewise.
12404 (extzvsi): Changed, keep only meaningful variants.
12405 (SQH, SEZ): New iterators.
12406 (SQH_postfix): New mode attribute.
12407 (SEZ_prefix): New code attribute.
12408 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12409 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12410 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12411 of numerical value.
12412 (noncommutative_operator): Check the availability of barrel
12413 shifter option.
12414
12415 2018-04-09 Richard Biener <rguenther@suse.de>
12416
12417 PR tree-optimization/85284
12418 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12419 Only use the niter constraining form of simple_iv when the exit
12420 is always executed.
12421
12422 2018-04-09 Tom de Vries <tom@codesourcery.com>
12423
12424 PR target/84041
12425 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12426 (define_expand "*memory_barrier"): New define_expand.
12427 (define_insn "memory_barrier"): New insn.
12428
12429 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12430
12431 PR rtl-optimization/80463
12432 PR rtl-optimization/83972
12433 PR rtl-optimization/83480
12434
12435 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12436 correct producer for the insn.
12437 (tidy_control_flow): Fixup seqnos in case of debug insns.
12438
12439 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12440
12441 PR rtl-optimization/83913
12442
12443 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12444 different sched-times when merging exprs.
12445
12446 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12447
12448 PR rtl-optimization/83962
12449
12450 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12451 tidy_fallthru_edge and tidy_control_flow.
12452
12453 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12454
12455 PR rtl-optimization/83530
12456
12457 * sel-sched.c (force_next_insn): New global variable.
12458 (remove_insn_for_debug): When force_next_insn is true, also leave only
12459 next insn in the ready list.
12460 (sel_sched_region): When the region wasn't scheduled, make another pass
12461 over it with force_next_insn set to 1.
12462
12463 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12464
12465 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12466 into tm_file.
12467 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12468 for interrupt control.
12469 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12470 functions for interrupt control.
12471 * config/nds32/nds32-intrinsic.md: Likewise.
12472 * config/nds32/nds32_intrinsic.h: Likewise.
12473 * config/nds32/nds32.h (nds32_builtins): Likewise.
12474
12475 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12476
12477 * config/nds32/nds32.c (nds32_init_machine_status,
12478 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12479 strict_aligned_p field.
12480 (nds32_expand_to_rtl_hook): New function.
12481 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12482 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12483
12484 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12485 Chung-Ju Wu <jasonwucj@gmail.com>
12486
12487 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12488 * config/nds32/nds32-n7.md: New file.
12489 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12490 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12491 pipeline.
12492 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12493 * config/nds32/nds32.md (pipeline_model): Add n7.
12494 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12495 * config/nds32/pipelines.md: Include n7 settings.
12496
12497 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12498 Chung-Ju Wu <jasonwucj@gmail.com>
12499
12500 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12501 * config/nds32/nds32-e8.md: New file.
12502 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12503 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12504 pipeline.
12505 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12506 * config/nds32/nds32.md (pipeline_model): Add e8.
12507 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12508 * config/nds32/pipelines.md: Include e8 settings.
12509
12510 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12511 Chung-Ju Wu <jasonwucj@gmail.com>
12512
12513 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12514 * config/nds32/nds32-n8.md: New file.
12515 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12516 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12517 pipeline.
12518 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12519 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12520 * config/nds32/nds32.md (pipeline_model): Add n8.
12521 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12522 * config/nds32/pipelines.md: Include n8 settings.
12523
12524 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12525 Chung-Ju Wu <jasonwucj@gmail.com>
12526
12527 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12528 * config/nds32/nds32-n9-2r1w.md: New file.
12529 * config/nds32/nds32-n9-3r2w.md: New file.
12530 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12531 nds32_register_ports): New or modify for cpu n9.
12532 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12533 pipeline.
12534 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12535 * config/nds32/nds32-utils.c: New file.
12536 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12537 TARGET_MUL_SLOW): Define.
12538 * config/nds32/nds32.md (pipeline_model): New attribute.
12539 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12540 New options that support cpu n9.
12541 * config/nds32/pipelines.md: Include n9 settings.
12542 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12543
12544 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12545
12546 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12547 information if necessary.
12548 (output_cond_branch_compare_zero): Likewise.
12549 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12550 (nds32_target_alignment): Refine for alignment.
12551 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12552 (FUNCTION_BOUNDARY): Modify.
12553 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12554 align case.
12555 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12556
12557 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12558
12559 * config/nds32/constants.md (unspec_volatile_element): Add values for
12560 TLB operation and data prefetch.
12561 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12562 functions for TLB operation and data prefetch.
12563 * config/nds32/nds32-intrinsic.md: Likewise.
12564 * config/nds32/nds32_intrinsic.h: Likewise.
12565 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12566 (nds32_print_operand): Likewise.
12567 * config/nds32/nds32.h (nds32_builtins): Likewise.
12568
12569 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12570 Andrew Pinski <pinsika@gcc.gnu.org>
12571
12572 PR middle-end/82976
12573 * match.pd: Use constant_boolean_node of correct type instead of
12574 boolean_true_node or boolean_false_node for simplifying
12575 pointer comparisons to zero.
12576
12577 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12578
12579 PR tree-optimization/80021
12580 * tree.c (verify_type_variant): Make error call in verify_variant_match
12581 translatable and remove final full stop.
12582
12583 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12584
12585 * config/nds32/constants.md (unspec_volatile_element): Add
12586 UNSPEC_VOLATILE_EH_RETURN.
12587 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12588 nds32_output_stack_pop): Support dwarf exception handling process.
12589 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12590 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12591 exception handling process.
12592 (nds32_compute_stack_frame): Likewise.
12593 (nds32_return_addr_rtx): Likewise.
12594 (nds32_initial_elimination_offset): Likewise.
12595 (nds32_expand_prologue): Likewise.
12596 (nds32_expand_epilogue): Likewise.
12597 (nds32_dynamic_chain_address): New function.
12598 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12599 exception handling.
12600 (DYNAMIC_CHAIN_ADDRESS): Define.
12601 (EH_RETURN_DATA_REGNO): Define.
12602 (EH_RETURN_STACKADJ_RTX): Define.
12603 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12604 patterns for dwarf exception handling.
12605
12606 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12607
12608 * config/nds32/nds32.h: Clean up obsolete macros.
12609
12610 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12611
12612 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12613 Add enum values for particular instructions.
12614 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12615 particular intrinsic functions.
12616 * config/nds32/nds32-intrinsic.md: Likewise.
12617 * config/nds32/nds32_intrinsic.h: Likewise.
12618 * config/nds32/nds32.h (nds32_builtins): Likewise.
12619 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12620 (btst, ave): New patterns for particular instructions.
12621
12622 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12623
12624 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12625 Add enum values for atomic load/store and memory sync.
12626 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12627 and memory sync.
12628 * config/nds32/nds32-intrinsic.md: Likewise.
12629 * config/nds32/nds32_intrinsic.h: Likewise.
12630 * config/nds32/nds32.h (nds32_builtins): Likewise.
12631
12632 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12633
12634 PR tree-optimization/85257
12635 * fold-const.c (native_encode_vector): If not all elts could fit
12636 and off is -1, return 0 rather than offset.
12637 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12638 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12639 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12640 adjust buffer in native_interpret_expr call.
12641
12642 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12643
12644 * config/nds32/constants.md (unspec_volatile_element): Add cache
12645 control enum values.
12646 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12647 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12648 * config/nds32/nds32.c (nds32_cctl_names): New.
12649 (nds32_print_operand): Handle cache control register names.
12650 * config/nds32/nds32.h (nds32_builtins): New enum values.
12651 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12652 macros.
12653 * config/nds32/nds32.md (type): Add mmu.
12654 * config/nds32/pipelines.md (simple_insn): Add mmu.
12655
12656 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12657
12658 * config/nds32/nds32.md (type): Remove call.
12659 * config/nds32/pipelines.md (simple_insn): Likewise.
12660
12661 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12662
12663 * config/nds32/constants.md (unspec_volatile_element): Add
12664 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12665 UNSPEC_VOLATILE_FMFCFG.
12666 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12667 description for fmfcfg and fmfcsr.
12668 (bdesc_1arg): Add fmtcsr.
12669 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12670 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12671 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12672 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12673 unspec_fmfcfg): New patterns.
12674 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12675 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12676 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12677 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12678 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12679 __nds32__fmfcfg): Define.
12680
12681 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12682
12683 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12684 intrinsic register names.
12685 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12686 intrinsic register enum values and macros.
12687
12688 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12689
12690 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12691 for load/store addressing form.
12692 (nds32_print_operand_address): Likewise.
12693
12694 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12695
12696 PR target/85196
12697 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12698 based on LABEL_REF. Remove useless assertion.
12699 (pic_address_needs_scratch): Fix formatting.
12700 (sparc_legitimize_pic_address): Minor tweaks.
12701 (sparc_delegitimize_address): Adjust assertion accordingly.
12702 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12703 into symbolic_operand.
12704 (movsi_high_pic_label_ref): Likewise.
12705 (movsi_lo_sum_pic_label_ref): Likewise.
12706 (movdi_pic_label_ref): Likewise.
12707 (movdi_high_pic_label_ref): Likewise.
12708 (movdi_lo_sum_pic_label_ref): Likewise.
12709
12710 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12711
12712 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12713 custom LIB_SPEC setup.
12714
12715 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12716 Kito Cheng <kito.cheng@gmail.com>
12717
12718 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12719 * config/riscv/freebsd.h: New.
12720
12721 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12722
12723 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12724 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12725 file.
12726
12727 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12728 Kito Cheng <kito.cheng@gmail.com>
12729
12730 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12731 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12732 * config/nds32/nds32-protos.h (nds32_output_call,
12733 nds32_output_return): Declare.
12734 * config/nds32/nds32.md: Refine all the call and return patterns.
12735
12736 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12737
12738 PR debug/85252
12739 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12740 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12741
12742 PR rtl-optimization/84872
12743 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12744 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12745 EDGE_CROSSING edge.
12746
12747 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12748
12749 * expr.c (copy_blkmode_to_reg): Revert 254862.
12750 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12751
12752 2018-04-06 Richard Biener <rguenther@suse.de>
12753
12754 PR middle-end/85244
12755 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12756 after seeing a component reference with an adjacent field. Treat
12757 refs to arrays at struct end of external decls similar to
12758 refs to unconstrained commons.
12759
12760 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12761
12762 PR sanitizer/85213
12763 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12764 look through SAVE_EXPRs with non-side-effects argument. Adjust
12765 recursive calls.
12766 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12767 save_p here.
12768
12769 2018-04-06 Richard Biener <rguenther@suse.de>
12770
12771 PR middle-end/85180
12772 * alias.c (find_base_term): New wrapper around find_base_term
12773 unwinding CSELIB_VAL_PTR changes.
12774 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12775 recursion.
12776
12777 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12778
12779 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12780 instructions.
12781 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12782 constant definitions.
12783 ("nop"): lr 0,0 -> nopr r0
12784 ("nop_lr0", "nop_lr1"): New insn definitions.
12785
12786 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12787
12788 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12789 NDS32_V3PUSH_AVAILABLE_P macro.
12790
12791 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12792 Chung-Ju Wu <jasonwucj@gmail.com>
12793
12794 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12795 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12796 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12797 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12798 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12799 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12800 * config/nds32/constraints.md: New constraints and checking for hard
12801 float configuration.
12802 * config/nds32/iterators.md: New mode iterator and attribute for hard
12803 float configuration.
12804 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12805 patterns.
12806 * config/nds32/nds32-fpu.md: New file.
12807 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12808 deal with hard float code generation.
12809 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12810 ARCH_V3S.
12811 (abi_type, float_reg_number): New enum type.
12812 * config/nds32/nds32-predicates.c: New predicates for hard float.
12813 * config/nds32/nds32-protos.h: Declare functions for hard float.
12814 * config/nds32/nds32.c: Implementation for hard float configuration.
12815 * config/nds32/nds32.h: Definitions for hard float configuration.
12816 * config/nds32/nds32.md: Include hard float machine description and
12817 modify patterns for hard float configuration.
12818 * config/nds32/nds32.opt: New options for hard float configuration.
12819 * config/nds32/predicates.md: New predicates for hard float
12820 configuration.
12821
12822 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12823
12824 * common/config/nds32/nds32-common.c
12825 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12826
12827 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12828
12829 PR middle-end/85195
12830 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12831 CONSTRUCTOR_ELT (ctor, ...)->value.
12832
12833 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12834
12835 PR target/85193
12836 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12837
12838 2018-04-05 Tom de Vries <tom@codesourcery.com>
12839
12840 PR target/85204
12841 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12842 cond jump.
12843
12844 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12845 Kito Cheng <kito.cheng@gmail.com>
12846
12847 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12848 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12849 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12850 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12851
12852 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12853 Kito Cheng <kito.cheng@gmail.com>
12854
12855 * config/nds32/constraints.md (Ufe): New memory constraint.
12856 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12857 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12858 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12859 operands.
12860 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12861 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12862
12863 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12864
12865 * config/nds32/nds32.md: Use optimize_size in the condition for
12866 alu-shift instructions.
12867
12868 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12869
12870 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12871
12872 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12873
12874 * config/nds32/nds32.md (negsi2): Refine pattern.
12875
12876 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12877 Chung-Ju Wu <jasonwucj@gmail.com>
12878
12879 * config/nds32/iterators.md (shift_rotate): New code iterator.
12880 (shift): New code attribute.
12881 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12882 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12883 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12884 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12885 bit-wise operations.
12886 (andsi3, *andsi3): Ditto.
12887 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12888 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12889 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12890 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12891 nds32_ior_operand, nds32_xor_operand): New predicates.
12892
12893 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12894
12895 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12896 (addsi3, subsi3): ... this.
12897
12898 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12899
12900 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12901
12902 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12903
12904 * config/nds32/nds32.md: Adjust indention.
12905
12906 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12907
12908 * config/nds32/nds32.md (feature): New attribute.
12909
12910 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12911
12912 * config/nds32/nds32.md (subtype): New attribute.
12913
12914 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12915
12916 PR target/85203
12917 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12918 expansion to perform a bitwise AND of the argument followed by a
12919 boolean negation of the result.
12920
12921 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12922
12923 PR rtl-optimization/84878
12924 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12925 the basic block. Assert the use reference is not artificial and that
12926 it has an associated insn.
12927
12928 2018-04-04 Michael Matz <matz@suse.de>
12929
12930 * builtins.c (compute_objsize): Pass correct operand
12931 to array_at_struct_end_p.
12932
12933 2018-04-04 Richard Biener <rguenther@suse.de>
12934
12935 PR lto/85176
12936 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12937 from contexts for DINFO_LEVEL_TERSE and below.
12938
12939 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12940
12941 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12942 resiter_operand condition.
12943 * config/nds32/nds32.md (*move<mode>): Ditto.
12944
12945 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12946 Monk Chiang <sh.chiang04@gmail.com>
12947
12948 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12949
12950 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12951
12952 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12953
12954 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12955 Kito Cheng <kito.cheng@gmail.com>
12956
12957 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12958 nds32_cond_code_str, output_cond_branch,
12959 output_cond_branch_compare_zero, nds32_expand_cbranch,
12960 nds32_expand_cstore, nds32_expand_movcc,
12961 nds32_output_cbranchsi4_equality_zero,
12962 nds32_output_cbranchsi4_equality_reg,
12963 nds32_output_cbranchsi4_equality_reg_or_const_int,
12964 nds32_output_cbranchsi4_greater_less_zero: New functions.
12965 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12966 nds32_expand_cstore, nds32_expand_movcc,
12967 nds32_output_cbranchsi4_equality_zero,
12968 nds32_output_cbranchsi4_equality_reg,
12969 nds32_output_cbranchsi4_equality_reg_or_const_int,
12970 nds32_output_cbranchsi4_greater_less_zero): Declare.
12971 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12972 nds32_rimm11s_operand): New predicates.
12973 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12974 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12975 patterns.
12976
12977 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12978
12979 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12980 * config/nds32/nds32.md: Ditto.
12981 * config/nds32/pipelines.md: Ditto.
12982
12983 2018-04-04 Richard Biener <rguenther@suse.de>
12984
12985 PR tree-optimization/85168
12986 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12987 propagating abnormals.
12988
12989 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12990
12991 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12992
12993 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12994 Kito Cheng <kito.cheng@gmail.com>
12995
12996 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12997 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12998 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12999 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13000 * config/nds32/nds32.md (sibcall_internal): New.
13001 (sibcall_register): Remove.
13002 (sibcall_immediate): Remove.
13003 (sibcall_value_internal): New.
13004 (sibcall_value_register): Remove.
13005 (sibcall_value_immediate): Remove.
13006 * config/nds32/predicates.md (nds32_general_register_operand): New.
13007 (nds32_call_address_operand): New.
13008
13009 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13010
13011 PR rtl-optimization/85167
13012 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13013 bb_defs if *split_p, instead preinitialize it to NULL.
13014
13015 PR tree-optimization/85156
13016 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13017 evaluating the argument multiple times.
13018
13019 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
13020
13021 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13022 than vector.
13023 (_mm_cvtpd_ps): Likewise.
13024 (_mm_cvttpd_epi32): Likewise.
13025 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13026 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13027 vector, pixel, and bool following altivec.h include.
13028
13029 2018-04-03 Martin Sebor <msebor@redhat.com>
13030
13031 * doc/extend.texi (Common Function Attributes): Clarify.
13032 (const attribute): Likewise.
13033 (pure attribute): Likewise.
13034
13035 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13036
13037 PR target/85169
13038 * config/i386/i386.c (ix86_expand_vector_set): Use
13039 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
13040
13041 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
13042
13043 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13044 instructions when changing rounding bits to preserve precision bits
13045 in the x87 control word.
13046
13047 2018-04-03 Martin Liska <mliska@suse.cz>
13048
13049 PR tree-optimization/82491
13050 * rtl.h (strip_offset_and_add): Replace += suboffset with
13051 poly_uint64 () + suboffset.
13052
13053 2018-03-29 Martin Liska <mliska@suse.cz>
13054 Martin Jambor <mjambor@suse.cz>
13055
13056 PR ipa/84947
13057 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13058 param_type is not an integral or pointer type.
13059
13060 2018-04-03 Richard Biener <rguenther@suse.de>
13061
13062 * sese.h (recompute_all_dominators): Remove.
13063
13064 2018-04-02 Martin Sebor <msebor@redhat.com>
13065
13066 * doc/invoke.texi (-Wrestrict): Fix typos.
13067
13068 2018-04-02 Jim Wilson <jimw@sifive.com>
13069
13070 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13071 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13072 (<optab>di3, <optab>si3_extend): Likewise.
13073 (<optab>si3_mask, <optab>si3_mask_1): New.
13074 (<optab>di3_mask, <optab>di3_mask_1): New.
13075 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13076 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13077 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13078
13079 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
13080
13081 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13082 example.
13083
13084 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
13085
13086 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13087 (nds32_canonicalize_comparison): New function.
13088
13089 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13090 Kito Cheng <kito.cheng@gmail.com>
13091 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13092
13093 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13094 * config/nds32/constants.md (unspec_volatile_element): Add
13095 UNSPEC_VOLATILE_RELAX_GROUP.
13096 * config/nds32/nds32-relax-opt.c: New file.
13097 * config/nds32/nds32-predicates.c
13098 (nds32_symbol_load_store_p): New function.
13099 * config/nds32/nds32-protos.h
13100 (nds32_symbol_load_store_p): Declare function.
13101 (make_pass_nds32_relax_opt): Declare new rtl pass function.
13102 * config/nds32/nds32.c
13103 (nds32_register_pass): New function to register pass.
13104 (nds32_register_passes): New function to register passes.
13105 * config/nds32/nds32.md (relax_group): New pattern.
13106 * config/nds32/nds32.opt (mrelax-hint): New option.
13107 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13108
13109 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
13110
13111 * config/nds32/t-nds32: Modify files dependency.
13112
13113 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13114
13115 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13116 (PROFILE_HOOK): Define its implementation.
13117
13118 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13119
13120 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13121 type and 32-bit size.
13122
13123 2018-04-01 Jakub Jelinek <jakub@redhat.com>
13124
13125 PR middle-end/85090
13126 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13127 (V_128_256): New mode iterator.
13128 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13129 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13130 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13131 of V.
13132 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13133 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13134
13135 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
13136
13137 PR target/83315
13138 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13139 NaN inputs correctly.
13140
13141 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
13142
13143 PR target/80546
13144 * config/rs6000/vsx.md (??r): New mode attribute.
13145 (*vsx_mov<mode>_64bit): Use it.
13146 (*vsx_mov<mode>_32bit): Likewise.
13147
13148 2018-03-30 Martin Sebor <msebor@redhat.com>
13149
13150 PR tree-optimization/84818
13151 * builtins.c (check_access): Use warning_n.
13152
13153 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13154
13155 PR target/83822
13156 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13157 condition.
13158 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13159 condition.
13160
13161 2018-03-30 Julia Koval <julia.koval@intel.com>
13162
13163 PR target/84413
13164 * x86-tune.def (movx, partial_reg_dependency): Enable for
13165 m_SKYLAKE_AVX512.
13166
13167 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
13168
13169 PR inline-asm/84985
13170 * lra-constraints.c (process_alt_operands): Move setting
13171 this_alternative_matches below.
13172
13173 2018-03-29 Martin Liska <mliska@suse.cz>
13174
13175 PR lto/84995.
13176 * doc/invoke.texi: Document how LTO works with debug info.
13177 Describe auto-load support of binutils. Mention 'x86-64'
13178 as valid option value of -march option.
13179
13180 2018-03-29 Jakub Jelinek <jakub@redhat.com>
13181
13182 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13183
13184 PR c/85094
13185 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13186 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13187 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13188 checking.
13189
13190 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
13191
13192 PR target/84912
13193 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13194 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13195 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13196 for RS6000_BTM_POWERPC64.
13197 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13198 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13199 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13200 definition.
13201 (DIVDE): Use it.
13202 (DIVDEU): Likewise.
13203
13204 2018-03-28 Carl Love <cel@us.ibm.com>
13205
13206 Revert
13207 2017-09-27 Carl Love <cel@us.ibm.com>
13208
13209 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13210 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13211 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13212 fctiw instruction.
13213
13214 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13215
13216 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13217 instead of __vector bool.
13218 (_mm_max_pu8): Likewise.
13219 (_mm_min_pi16): Likewise.
13220
13221 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
13222
13223 PR target/84912
13224 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13225 (DIVWEUO): Likewise.
13226 (DIVDEO): Likewise.
13227 (DIVDEUO): Likewise.
13228 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13229 DIVWEUO and DIVDEUO.
13230 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13231 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13232 (div_extend): Likewise.
13233 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13234 builtin function.
13235 (__builtin_divweuo): Likewise.
13236 (__builtin_divdeo): Likewise.
13237 (__builtin_divdeuo): Likewise.
13238
13239 2018-03-28 Jakub Jelinek <jakub@redhat.com>
13240
13241 PR target/85095
13242 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13243 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13244
13245 PR tree-optimization/82004
13246 * gimple-match-head.c (optimize_pow_to_exp): New function.
13247 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13248 Don't fold to exp if optimize_pow_to_exp is false.
13249
13250 2018-03-28 Martin Liska <mliska@suse.cz>
13251
13252 PR other/84819
13253 * calls.c (initialize_argument_information): Fix trailing space.
13254 * common.opt: Fix typo and provide better explanation for
13255 -fsanitize-coverage option.
13256 * config/i386/i386.opt: Fix typo.
13257
13258 2018-03-28 Jakub Jelinek <jakub@redhat.com>
13259 Martin Liska <mliska@suse.cz>
13260
13261 PR sanitizer/85081
13262 * gimplify.c (asan_poison_variable): Don't do the check for
13263 gimplify_omp_ctxp here.
13264 (gimplify_decl_expr): Do it here.
13265 (gimplify_target_expr): Likewise.
13266
13267 2018-03-28 Martin Liska <mliska@suse.cz>
13268
13269 PR target/84988
13270 * config/i386/i386.c (ix86_function_arg_advance): Do not call
13271 chkp_type_bounds_count if MPX is not enabled.
13272
13273 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
13274
13275 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13276
13277 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
13278
13279 PR target/84914
13280 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13281 function to create the function decl for complex long double
13282 multiply and divide for -mabi=ieeelongdouble.
13283 (init_float128_ieee): Call it.
13284
13285 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
13286
13287 PR target/85044
13288 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13289 -fcf-protection=branch -mibt.
13290 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13291
13292 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13293
13294 PR target/81863
13295 * config/arm/arm.c (arm_valid_symbolic_address): Handle
13296 arm_word_relocations.
13297
13298 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
13299
13300 PR target/85056
13301 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13302 extern array declarations.
13303
13304 2018-03-27 Richard Biener <rguenther@suse.de>
13305
13306 PR middle-end/84067
13307 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13308 explicit single_use checks.
13309
13310 2018-03-27 Richard Biener <rguenther@suse.de>
13311
13312 PR tree-optimization/85082
13313 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13314 Valueize the VUSE.
13315
13316 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13317
13318 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13319 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13320 Turn on fasynchronous-unwind-tables and funwind-tables.
13321
13322 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
13323
13324 PR target/85073
13325 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13326 (*bmi_blsr_<mode>_ccz): Ditto.
13327
13328 2018-03-26 Tom de Vries <tom@codesourcery.com>
13329
13330 PR tree-optimization/85063
13331 * omp-general.c (offloading_function_p): New function. Factor out
13332 of ...
13333 * omp-offload.c (pass_omp_target_link::gate): ... here.
13334 * omp-general.h (offloading_function_p): Declare.
13335 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13336 with attribute omp declare target for offloading functions.
13337
13338 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
13339
13340 PR tree-optimization/84005
13341 * tree-data-ref.h (get_base_for_alignment): Declare.
13342 * tree-data-ref.c (get_base_for_alignment_1): New function.
13343 (get_base_for_alignment): Likewise.
13344 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13345 get_base_for_alignment to find a suitable base object, instead
13346 of always using drb->base_address.
13347
13348 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13349
13350 PR inline-asm/85022
13351 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13352 known size by default.
13353
13354 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
13355
13356 PR inline-asm/85030
13357 * lra-constraints.c (process_alt_operands): Don't match BLKmode
13358 and non BLKmode operands.
13359
13360 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13361
13362 PR target/85026
13363 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13364 Clean up attributes.
13365
13366 2018-03-23 Richard Biener <rguenther@suse.de>
13367
13368 PR debug/85020
13369 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13370 we are going to emit early debug for LTO.
13371
13372 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13373
13374 PR inline-asm/85034
13375 * function.c (match_asm_constraints_1): Don't optimize if input
13376 doesn't satisfy general_operand predicate for output's mode.
13377
13378 PR inline-asm/85022
13379 * alias.c (write_dependence_p): Don't require for x_canonicalized
13380 non-VOIDmode if x has VOIDmode.
13381
13382 PR sanitizer/85029
13383 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13384 just don't try to optimize it rather than assert it never happens.
13385
13386 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13387
13388 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13389 macro expansions for definition of ST_INTERNAL_<mode> and
13390 LD_INTERNAL_<mode> builtins.
13391 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13392 Remove prototype.
13393 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13394 function.
13395 (altivec_expand_st_builtin): Likewise.
13396 (altivec_expand_builtin): Remove calls to deleted functions.
13397 (rs6000_address_for_altivec): Delete this function.
13398 * config/rs6000/vector.md: Remove expands for
13399 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13400
13401 2018-03-22 Sudakshina Das <sudi.das@arm.com>
13402
13403 PR target/84826
13404 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13405 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13406 re-computing once computed.
13407 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13408 (arm_init_machine_status): Initialize
13409 machine->static_chain_stack_bytes.
13410
13411 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13412
13413 PR target/84760
13414 * doc/extend.texi: Add four new prototypes for vec_ld.
13415 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13416 definitions for more logical presentation.
13417 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13418 entries for V1TI variants of __builtin_altivec_ld builtin.
13419 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13420 handling of V1TI variant of LVX icode pattern.
13421 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13422 (rs6000_gimple_fold_builtin): Likewise.
13423 (altivec_init_builtins): Add code to define
13424 __builtin_altivec_lvx_v1ti function.
13425
13426 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13427
13428 PR inline-asm/84941
13429 * function.c (match_asm_constraints_1): Don't do the optimization
13430 if input isn't a REG, SUBREG, MEM or constant.
13431
13432 2018-03-22 Tom de Vries <tom@codesourcery.com>
13433
13434 PR tree-optimization/84956
13435 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13436 bb_has_abnormal_pred.
13437
13438 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13439
13440 PR sanitizer/85018
13441 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13442 DECL_INITIAL (decl) to decl at the end.
13443 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13444 adjust the comment.
13445
13446 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13447
13448 * doc/extend.texi (__builtin_tgmath): Document when complex
13449 integer types are treated as _Complex _Float64.
13450
13451 2018-03-21 Tom de Vries <tom@codesourcery.com>
13452
13453 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13454
13455 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13456
13457 PR tree-optimization/84960
13458 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13459 if it is ENTRY block, move them into single succ of ENTRY in that case.
13460
13461 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13462
13463 PR tree-optimization/84811
13464 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13465 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13466 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13467 (known_subrange_p): Update accordingly. Cast each value involved
13468 in the size comparison, rather than casting the result of the
13469 subtraction.
13470
13471 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13472
13473 PR tree-optimization/84982
13474 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13475 by flipping the least significant bit rather than all bits from
13476 bitpos to bitpos + bitsize - 1.
13477
13478 2018-03-21 Nathan Sidwell <nathan@acm.org>
13479
13480 * doc/extend.texi (Deprecated Features): Remove mention of
13481 long-deleted deprecations.
13482
13483 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13484
13485 PR jit/84288
13486 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13487 * configure: Regenerate.
13488
13489 2018-03-21 Tom de Vries <tom@codesourcery.com>
13490
13491 PR tree-optimization/83126
13492 * tree-parloops.c (num_phis): New function.
13493 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13494
13495 2018-03-21 Nathan Sidwell <nathan@acm.org>
13496
13497 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13498 mention anon-struct/union members and trailing attributes.
13499
13500 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13501
13502 PR tree-optimization/84969
13503 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13504 builtin memset partitions if they set different rhs values.
13505
13506 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13507
13508 PR rtl-optimization/84989
13509 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13510 VEC_DUPLICATE with scalar result mode.
13511
13512 2018-03-21 Martin Liska <mliska@suse.cz>
13513
13514 PR ipa/84963
13515 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13516 not intended return statement.
13517
13518 2018-03-21 Martin Liska <mliska@suse.cz>
13519
13520 PR target/84988
13521 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13522 (chkp_find_bound_slots_1): Limit number of iterations.
13523
13524 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13525
13526 PR target/84838
13527 * Minor grammar fixes for x86 options.
13528
13529 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13530
13531 PR debug/84875
13532 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13533 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13534
13535 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13536
13537 PR target/83789
13538 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13539 (altivec_lvx_<mode>_1op): Likewise.
13540 (altivec_stvx_<mode>_2op): Likewise.
13541 (altivec_stvx_<mode>_1op): Likewise.
13542 (altivec_lvx_<VM2:mode>): New define_expand.
13543 (altivec_stvx_<VM2:mode>): Likewise.
13544 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13545 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13546 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13547 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13548 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13549 (rs6000_gen_lvx): Likewise.
13550 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13551 (altivec_expand_stv_builtin): Likewise.
13552 (altivec_expand_builtin): Likewise.
13553 * config/rs6000/vector.md: Likewise.
13554
13555 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13556
13557 PR target/82518
13558 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13559 BYTES_BIG_ENDIAN.
13560
13561 2018-03-20 Richard Biener <rguenther@suse.de>
13562
13563 PR target/84986
13564 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13565 sign-conversions as zero, fall back to standard scalar_stmt
13566 cost for the rest.
13567
13568 2018-03-20 Martin Liska <mliska@suse.cz>
13569
13570 PR ipa/84825
13571 * predict.c (rebuild_frequencies): Handle case when we have
13572 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13573
13574 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13575
13576 PR target/84990
13577 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13578 flag_section_anchors.
13579 * varasm.c (use_blocks_for_decl_p): Remove hack for
13580 dw2_force_const_mem.
13581
13582 PR target/84845
13583 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13584 to ...
13585 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13586 be created, use lowpart_subreg of operands[0] rather than operands[0]
13587 itself.
13588 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13589 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13590 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13591 and n constraint instead of aarch64_shift_imm_di and Usd.
13592 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13593 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13594
13595 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13596
13597 PR target/82989
13598 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13599 to favor GPR over NEON registers.
13600 (<shift>di3_neon): Likewise.
13601
13602 2018-03-20 Tom de Vries <tom@codesourcery.com>
13603
13604 PR target/84952
13605 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13606 (nvptx_process_pars): Emit bar.sync asap and alap.
13607
13608 2018-03-20 Tom de Vries <tom@codesourcery.com>
13609
13610 PR target/84954
13611 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13612 seen_label if seen_label is already set.
13613
13614 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13615
13616 PR target/84945
13617 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13618 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13619 Use 1U instead of 1. Formatting fixes.
13620
13621 PR c/84953
13622 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13623 instead of TREE_TYPE (s1) for the return value.
13624
13625 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13626
13627 PR tree-optimization/84946
13628 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13629 bitsize + bitsize in poly_uint64 rather than poly_int64.
13630
13631 PR sanitizer/78651
13632 * dwarf2asm.c: Include fold-const.c.
13633 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13634 of decl rather than decl itself.
13635
13636 PR rtl-optimization/84643
13637 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13638
13639 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13640
13641 PR sanitizer/78651
13642 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13643 calling assemble_variable.
13644
13645 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13646
13647 PR target/81647
13648 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13649 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13650
13651 2018-03-19 Jim Wilson <jimw@sifive.com>
13652
13653 PR bootstrap/84856
13654 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13655 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13656 (riscv_first_stack_step): Likewise.
13657 (riscv_option_override): Use STACK_BOUNDARY instead of
13658 MIN_STACK_BOUNDARY.
13659 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13660 MIN_STACK_BOUNDARY.
13661 (BIGGEST_ALIGNMENT): Set to 128.
13662 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13663 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13664 STACK_BOUNDARY.
13665
13666 2018-03-19 Richard Biener <rguenther@suse.de>
13667
13668 PR tree-optimization/84933
13669 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13670 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13671
13672 2018-03-19 Richard Biener <rguenther@suse.de>
13673
13674 PR tree-optimization/84859
13675 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13676 (cond_if_else_store_replacement): Perform sinking operation on
13677 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13678 Generalize what a BB with a single eligible store is.
13679
13680 2018-03-19 Richard Biener <rguenther@suse.de>
13681
13682 PR tree-optimization/84929
13683 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13684 chrec_is_positive against non-chrec arg.
13685
13686 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13687
13688 PR target/84711
13689 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13690
13691 2018-03-18 Martin Liska <mliska@suse.cz>
13692
13693 PR rtl-optimization/84635
13694 * regrename.c (build_def_use): Use matches_mode only when
13695 matches >= 0.
13696
13697 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13698
13699 PR tree-optimization/84913
13700 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13701 vectorize chains of COND_EXPRs.
13702
13703 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13704
13705 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13706
13707 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13708
13709 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13710
13711 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13712
13713 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13714
13715 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13716 Kito Cheng <kito.cheng@gmail.com>
13717
13718 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13719 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13720 (nds32_adjust_reg_alloc_order): New function.
13721 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13722
13723 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13724
13725 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13726 nds32_print_operand, nds32_print_operand_address): Use
13727 HOST_WIDE_INT_PRINT_DEC instead.
13728
13729 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13730
13731 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13732
13733 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13734
13735 PR target/84902
13736 * config/i386/i386.c (initial_ix86_tune_features,
13737 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13738 unsigned long long.
13739 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13740 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13741 rather than 1u << ix86_tune. Formatting fix.
13742 (ix86_option_override_internal): Change ix86_arch_mask from
13743 unsigned int to unsigned HOST_WIDE_INT, initialize to
13744 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13745 (ix86_function_specific_restore): Likewise.
13746
13747 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13748
13749 PR target/84899
13750 * postreload.c (reload_combine_recognize_pattern): Perform
13751 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13752 truncate_int_for_mode the result for the destination's mode.
13753
13754 PR c/84909
13755 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13756 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13757 Likewise.
13758 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13759 Likewise.
13760
13761 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13762
13763 PR target/84876
13764 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13765 regno_allocno_class_array and sorted_pseudos.
13766 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13767 insns where regno is used.
13768
13769 2018-03-16 Martin Liska <mliska@suse.cz>
13770
13771 PR ipa/84833
13772 * multiple_target.c (create_dispatcher_calls): Redirect
13773 reference in the symbol table.
13774
13775 2018-03-16 Martin Liska <mliska@suse.cz>
13776
13777 PR ipa/84722
13778 * multiple_target.c (create_dispatcher_calls): Redirect also
13779 an alias.
13780
13781 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13782
13783 PR c++/79937
13784 PR c++/82410
13785 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13786 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13787 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13788
13789 2018-03-16 Julia Koval <julia.koval@intel.com>
13790
13791 * doc/invoke.texi (Skylake Server): Add CLWB.
13792 Cannonlake): Remove CLWB.
13793
13794 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13795
13796 PR tree-optimization/84841
13797 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13798 1 << 3.
13799 (FLOAT_ONE_CONST_TYPE): Define.
13800 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13801 (sort_by_operand_rank): Put entries with higher constant_type last
13802 rather than first to match comments.
13803
13804 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13805
13806 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13807 split predicate.
13808
13809 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13810
13811 PR c++/79085
13812 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13813 check and use address of target always.
13814
13815 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13816
13817 PR target/84574
13818 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13819 (indirect_thunk_bnd_needed): Likewise.
13820 (indirect_thunks_used): Likewise.
13821 (indirect_thunks_bnd_used): Likewise.
13822 (indirect_return_needed): New.
13823 (indirect_return_bnd_needed): Likewise.
13824 (output_indirect_thunk_function): Add a bool argument for
13825 function return.
13826 (output_indirect_thunk_function): Don't generate alias for
13827 function return thunk.
13828 (ix86_code_end): Call output_indirect_thunk_function to generate
13829 function return thunks.
13830 (ix86_output_function_return): Set indirect_return_bnd_needed
13831 and indirect_return_needed instead of indirect_thunk_bnd_needed
13832 and indirect_thunk_needed.
13833
13834 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13835
13836 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13837 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13838 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13839
13840 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13841 Paul Hua <paul.hua.gm@gmail.com>
13842
13843 PR c/84852
13844 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13845
13846 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13847
13848 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13849 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13850 resp. SFmode cases.
13851
13852 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13853
13854 PR target/84711
13855 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13856 instead of GET_MODE_SIZE when comparing Units.
13857
13858 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13859
13860 PR target/68256
13861 * varasm.c (hash_section): Return an unchangeble hash value
13862 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13863 Return !aarch64_can_use_per_function_literal_pools_p ().
13864
13865 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13866
13867 PR target/84860
13868 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13869 rather than address of cmode as last argument to prepare_cmp_insn.
13870
13871 2018-03-15 Julia Koval <julia.koval@intel.com>
13872
13873 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13874 F_AVX512VNNI, F_AVX512BITALG): New.
13875
13876 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13877
13878 PR target/83451
13879 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13880 insn for floating-point loads and stores.
13881
13882 2018-03-14 Carl Love <cel@us.ibm.com>
13883
13884 * config/rs6000/rs6000-c.c: Add macro definitions for
13885 ALTIVEC_BUILTIN_VEC_PERMXOR.
13886 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13887 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13888 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13889 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13890 UNSPEC_VPERMXOR.
13891 * config/doc/extend.texi: Add prototypes for vec_permxor.
13892
13893 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13894
13895 PR c/84852
13896 * diagnostic-show-locus.c (class layout_point): Convert m_line
13897 from int to linenum_type.
13898 (line_span::comparator): Use linenum "compare" function when
13899 comparing line numbers.
13900 (test_line_span): New function.
13901 (layout_range::contains_point): Convert param "row" from int to
13902 linenum_type.
13903 (layout_range::intersects_line_p): Likewise.
13904 (layout::will_show_line_p): Likewise.
13905 (layout::print_source_line): Likewise.
13906 (layout::should_print_annotation_line_p): Likewise.
13907 (layout::print_annotation_line): Likewise.
13908 (layout::print_leading_fixits): Likewise.
13909 (layout::annotation_line_showed_range_p): Likewise.
13910 (struct line_corrections): Likewise for field m_row.
13911 (line_corrections::line_corrections): Likewise for param "row".
13912 (layout::print_trailing_fixits): Likewise.
13913 (layout::get_state_at_point): Likewise.
13914 (layout::get_x_bound_for_row): Likewise.
13915 (layout::print_line): Likewise.
13916 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13917 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13918 * input.c (selftest::test_linenum_comparisons): New function.
13919 (selftest::input_c_tests): Call it.
13920 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13921 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13922 * selftest.h (ASSERT_GT): New macro.
13923 (ASSERT_GT_AT): New macro.
13924 (ASSERT_LT): New macro.
13925 (ASSERT_LT_AT): New macro.
13926
13927 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13928
13929 PR rtl-optimization/84780
13930 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13931
13932 2018-03-14 Martin Liska <mliska@suse.cz>
13933
13934 * tree.c (record_node_allocation_statistics): Use
13935 get_stats_node_kind.
13936 (get_stats_node_kind): New function extracted from
13937 record_node_allocation_statistics.
13938 (free_node): Use get_stats_node_kind.
13939
13940 2018-03-14 Richard Biener <rguenther@suse.de>
13941
13942 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13943 that the value-set of ANTIC_IN doesn't grow.
13944
13945 Revert
13946 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13947 member.
13948 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13949 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13950
13951 2018-03-14 Julia Koval <julia.koval@intel.com>
13952
13953 * config.gcc (icelake-client, icelake-server): New.
13954 (icelake): Remove.
13955 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13956 (initial_ix86_arch_features): Ditto.
13957 (PTA_SKYLAKE): Add SGX.
13958 (PTA_ICELAKE): Remove.
13959 (PTA_ICELAKE_CLIENT): New.
13960 (PTA_ICELAKE_SERVER): New.
13961 (ix86_option_override_internal): Split up icelake on icelake client and
13962 icelake server.
13963 (get_builtin_code_for_version): Ditto.
13964 (fold_builtin_cpu): Ditto.
13965 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13966 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13967 * config/i386/i386.h (processor_type): Ditto.
13968 * doc/invoke.texi: Ditto.
13969
13970 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13971
13972 PR sanitizer/83392
13973 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13974 INTEGER_CST offset, add it together with bitpos / 8 and
13975 sign extend based on POINTER_SIZE.
13976
13977 PR target/84844
13978 Revert
13979 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13980
13981 PR target/78090
13982 * config/i386/constraints.md (Yc): New register constraint.
13983 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13984 Use Yc constraint for alternative 2 of operand 0. Remove
13985 preferred_for_speed attribute.
13986
13987 2018-03-14 Richard Biener <rguenther@suse.de>
13988
13989 PR tree-optimization/84830
13990 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13991 with the old one to avoid oscillations.
13992
13993 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13994
13995 PR target/83712
13996 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13997 pseudos.
13998 (assign_by_spills): Return a flag of reload assignment failure.
13999 Do not process the reload assignment failures. Do not spill other
14000 reload pseudos if they has the same reg class. Update n if
14001 necessary.
14002 (lra_assign): Add a return arg. Set up from the result of
14003 assign_by_spills call.
14004 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14005 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14006 usage_insns if it is not NULL.
14007 (spill_hard_reg_in_range): New function.
14008 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14009 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14010 function prototypes.
14011 (lra_assign): Change prototype.
14012 * lra.c (lra): Add code to deal with fails by splitting hard reg
14013 live ranges.
14014
14015 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
14016
14017 * config/riscv/riscv.opt (mrelax): New option.
14018 * config/riscv/riscv.c (riscv_file_start): Emit ".option
14019 "norelax" when riscv_mrelax is disabled.
14020 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14021
14022 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14023
14024 PR target/84743
14025 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14026 reassociation for int modes.
14027
14028 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14029
14030 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14031 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14032 for big-endian.
14033 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14034 * config/aarch64/aarch64-sve.md
14035 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14036 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14037 (*extend<mode><Vwide>2): Rename to...
14038 (aarch64_sve_extend<mode><Vwide>2): ...this.
14039 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14040 renaming the old pattern to...
14041 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
14042 unsigned packs.
14043 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14044 define_expand, renaming the old pattern to...
14045 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14046 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14047 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14048 account when deciding which SVE instruction the optab should use.
14049 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14050
14051 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14052
14053 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14054 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14055 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14056 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14057 (tlsdesc_small_<mode>): Turn a define_expand and use
14058 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
14059 (tlsdesc_small_advsimd_<mode>): ...this.
14060 (tlsdesc_small_sve_<mode>): New pattern.
14061
14062 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14063
14064 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14065 (UNSPEC_UMUL_HIGHPART): New constants.
14066 (MUL_HIGHPART): New int iteraor.
14067 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14068 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14069 define_expand.
14070 (*<su>mul<mode>3_highpart): New define_insn.
14071
14072 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14073
14074 PR lto/84805
14075 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14076 incomplete types.
14077
14078 2018-03-13 Martin Liska <mliska@suse.cz>
14079
14080 PR ipa/84658.
14081 * (sem_item_optimizer::sem_item_optimizer): Initialize new
14082 vector.
14083 (sem_item_optimizer::~sem_item_optimizer): Release it.
14084 (sem_item_optimizer::merge_classes): Register variable aliases.
14085 (sem_item_optimizer::fixup_pt_set): New function.
14086 (sem_item_optimizer::fixup_points_to_sets): Likewise.
14087 * ipa-icf.h: Declare new variables and functions.
14088
14089 2018-03-13 Jakub Jelinek <jakub@redhat.com>
14090
14091 PR middle-end/84834
14092 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14093 integer_pow2p@2 and test integer_pow2p in condition.
14094 (A < 0 ? C : 0): Similarly for @1.
14095
14096 PR middle-end/84831
14097 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14098 characters starting at p contain '\0' character, don't look beyond
14099 that.
14100
14101 PR target/84827
14102 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14103 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14104
14105 PR target/84828
14106 * reg-stack.c (change_stack): Change update_end var from int to
14107 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14108 also call set_block_for_insn on the newly added insns and rescan.
14109
14110 PR target/84786
14111 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14112 on the last operand.
14113
14114 PR c++/84704
14115 * tree.c (stabilize_reference_1): Return save_expr (e) for
14116 STATEMENT_LIST even if it doesn't have side-effects.
14117
14118 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
14119
14120 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14121
14122 2018-03-12 Renlin Li <renlin.li@arm.com>
14123
14124 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14125 aarch64_output_scalar_simd_mov_immediate.
14126
14127 2018-03-12 Martin Sebor <msebor@redhat.com>
14128
14129 PR tree-optimization/83456
14130 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14131 for perfectly overlapping calls to memcpy.
14132 (gimple_fold_builtin_memory_chk): Same.
14133 (gimple_fold_builtin_strcpy): Handle no-warning.
14134 (gimple_fold_builtin_stxcpy_chk): Same.
14135 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14136
14137 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
14138
14139 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14140 parameter. Use it for SFmode.
14141 (rs6000_function_arg_advance_1): Adjust.
14142 (rs6000_function_arg): Adjust.
14143 (rs6000_gimplify_va_arg): Pass false for that new parameter.
14144
14145 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
14146
14147 PR rtl-optimization/84169
14148 PR rtl-optimization/84780
14149 * combine.c (can_combine_p): Check for a 2-insn combination whether
14150 the destination register is used between the two insns, too.
14151
14152 2018-03-12 Richard Biener <rguenther@suse.de>
14153
14154 PR tree-optimization/84803
14155 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14156 for refs DR analysis didn't process.
14157
14158 2018-03-12 Richard Biener <rguenther@suse.de>
14159
14160 PR tree-optimization/84777
14161 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14162 force-vectorize loops ignore whether we are optimizing for size.
14163
14164 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
14165
14166 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14167 (TARGET_MD_ASM_ADJUST): Define.
14168
14169 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
14170 Kito Cheng <kito.cheng@gmail.com>
14171 Chung-Ju Wu <jasonwucj@gmail.com>
14172
14173 * config/nds32/nds32.c (nds32_compute_stack_frame,
14174 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14175 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14176 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14177 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14178 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14179 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14180 * config/nds32/nds32.md (prologue, epilogue): Use macro
14181 NDS32_V3PUSH_AVAILABLE_P to do checking.
14182
14183 2018-03-11 Jakub Jelinek <jakub@redhat.com>
14184
14185 PR debug/58150
14186 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14187 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14188 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
14189 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
14190 addition of most attributes on !orig_type_die or the attribute not
14191 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14192
14193 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14194 Chung-Ju Wu <jasonwucj@gmail.com>
14195
14196 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14197 __NDS32_VH__ macro.
14198 * config/nds32/nds32.opt (mvh): New option.
14199
14200 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14201 Chung-Ju Wu <jasonwucj@gmail.com>
14202
14203 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14204 function.
14205 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14206 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14207 definition.
14208
14209 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14210 Chung-Ju Wu <jasonwucj@gmail.com>
14211
14212 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14213 function.
14214 * config/nds32/nds32-multiple.md (strlensi): New pattern.
14215 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14216
14217 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
14218 Kito Cheng <kito.cheng@gmail.com>
14219 Chung-Ju Wu <jasonwucj@gmail.com>
14220
14221 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14222 UNSPEC_FFMISM and UNSPEC_FLMISM.
14223 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14224 for ffb, ffmism and flmism.
14225 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14226 (unspec_ffmism): Ditto.
14227 (unspec_flmism): Ditto.
14228 (nds32_expand_builtin_impl): Check if string extension is available.
14229 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14230 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14231
14232 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
14233
14234 Reverting patch:
14235 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14236
14237 PR target/83712
14238 * lra-assigns.c (assign_by_spills): Return a flag of reload
14239 assignment failure. Do not process the reload assignment
14240 failures. Do not spill other reload pseudos if they has the same
14241 reg class.
14242 (lra_assign): Add a return arg. Set up from the result of
14243 assign_by_spills call.
14244 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14245 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14246 usage_insns if it is not NULL.
14247 (spill_hard_reg_in_range): New function.
14248 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14249 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14250 function prototypes.
14251 (lra_assign): Change prototype.
14252 * lra.c (lra): Add code to deal with fails by splitting hard reg
14253 live ranges.
14254
14255 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
14256
14257 PR target/84807
14258 * config/i386/i386.opt: Replace Enforcment with Enforcement.
14259
14260 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
14261
14262 PR debug/84620
14263 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14264 (dw_val_node): Add val_symbolic_view.
14265 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14266 (symview_upper_bound): New.
14267 (new_line_info_table): Initialize symviews_since_reset.
14268 (dwarf2out_source_line): Count symviews_since_reset and set
14269 symview_upper_bound.
14270 (dw_val_equal_p): Handle symview.
14271 (add_AT_symview): New.
14272 (print_dw_val): Handle symview.
14273 (attr_checksum, attr_checksum_ordered): Likewise.
14274 (same_dw_val_p, size_of_die): Likewise.
14275 (value_format, output_die): Likewise.
14276 (add_high_low_attributes): Use add_AT_symview for entry_view.
14277 (dwarf2out_finish): Reset symview_upper_bound, clear
14278 zero_view_p.
14279
14280 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
14281
14282 PR target/83969
14283 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14284 Add strict argument and use it.
14285 (rs6000_split_multireg_move): Update for new strict argument.
14286 (mem_operand_gpr): Disallow all non-offsettable addresses.
14287 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14288
14289 2018-03-09 Jakub Jelinek <jakub@redhat.com>
14290
14291 PR target/84772
14292 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14293 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14294 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14295
14296 PR c++/84767
14297 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14298 decl, use remap_type if we want to use the type.
14299
14300 2018-03-09 Martin Sebor <msebor@redhat.com>
14301
14302 PR tree-optimization/84526
14303 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14304 Remove dead code.
14305 (builtin_access::generic_overlap): Be prepared to handle non-array
14306 base objects.
14307
14308 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
14309
14310 PR rtl-optimization/84682
14311 * lra-constraints.c (process_address_1): Check is_address flag
14312 for address constraints.
14313 (process_alt_operands): Likewise.
14314 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14315 preprocess_constraints.
14316 * recog.h (preprocess_constraints): Add oploc parameter.
14317 Adjust callers.
14318 * recog.c (preprocess_constraints): Test address_operand for
14319 CT_ADDRESS constraints.
14320
14321 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14322
14323 PR target/83712
14324 * lra-assigns.c (assign_by_spills): Return a flag of reload
14325 assignment failure. Do not process the reload assignment
14326 failures. Do not spill other reload pseudos if they has the same
14327 reg class.
14328 (lra_assign): Add a return arg. Set up from the result of
14329 assign_by_spills call.
14330 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14331 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14332 usage_insns if it is not NULL.
14333 (spill_hard_reg_in_range): New function.
14334 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14335 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14336 function prototypes.
14337 (lra_assign): Change prototype.
14338 * lra.c (lra): Add code to deal with fails by splitting hard reg
14339 live ranges.
14340
14341 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14342
14343 PR target/83193
14344 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14345 Accept complain bool parameter. Only emit errors if it is true.
14346 (arm_parse_cpu_option_name): Likewise.
14347 (arm_target_thumb_only): Adjust callers of the above.
14348 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14349 prototype to take a default true bool parameter.
14350 (arm_parse_arch_option_name): Likewise.
14351
14352 2018-03-09 David Malcolm <dmalcolm@redhat.com>
14353 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14354
14355 PR jit/64089
14356 PR jit/84288
14357 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14358 * configure: Regenerate.
14359 * configure.ac ("linker --version-script option"): New.
14360 ("linker soname option"): New.
14361
14362 2018-03-09 Richard Biener <rguenther@suse.de>
14363
14364 PR tree-optimization/84775
14365 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14366 immediate uses of predicate stmts and mark them modified.
14367
14368 Revert
14369 PR tree-optimization/84178
14370 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14371 to caller.
14372 (version_loop_for_if_conversion): Delay update_ssa call.
14373 (tree_if_conversion): Delay update_ssa until after predicate
14374 insertion.
14375
14376 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
14377
14378 PR target/84763
14379 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14380 when the function accesses prior frames.
14381
14382 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14383
14384 PR debug/84456
14385 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14386 gen_llsym, otherwise call maybe_gen_llsym.
14387
14388 PR inline-asm/84742
14389 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14390 has ',' character inside of it.
14391
14392 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14393
14394 PR target/84748
14395 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14396 as clobbering CC_REGNUM.
14397
14398 2018-03-08 Richard Biener <rguenther@suse.de>
14399
14400 PR middle-end/84552
14401 * tree-scalar-evolution.c: Include tree-into-ssa.h.
14402 (follow_copies_to_constant): Do not follow SSA names registered
14403 for update.
14404
14405 2018-03-08 Richard Biener <rguenther@suse.de>
14406
14407 PR tree-optimization/84178
14408 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14409 to caller.
14410 (version_loop_for_if_conversion): Delay update_ssa call.
14411 (tree_if_conversion): Delay update_ssa until after predicate
14412 insertion.
14413
14414 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14415
14416 PR tree-optimization/84178
14417 * tree-if-conv.c (release_bb_predicate): Remove the
14418 the assertion that the stmts have NULL use_ops.
14419 Discard the statements, asserting that they haven't
14420 yet been added to a BB.
14421
14422 2018-03-08 Richard Biener <rguenther@suse.de>
14423
14424 PR tree-optimization/84746
14425 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14426 (phi_translate): Pass in destination ANTIC_OUT set.
14427 (phi_translate_1): Likewise. For a simplified result lookup
14428 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14429 (phi_translate_set): Adjust.
14430 (do_pre_regular_insertion): Likewise.
14431 (do_pre_partial_partial_insertion): Likewise.
14432
14433 2018-03-08 Martin Liska <mliska@suse.cz>
14434
14435 PR gcov-profile/84735
14436 * doc/gcov.texi: Document usage of profile files.
14437 * gcov-io.h: Document changes in the format.
14438
14439 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14440
14441 PR debug/84404
14442 PR debug/84408
14443 * dwarf2out.c (struct dw_line_info_table): Update comments for
14444 view == -1.
14445 (FORCE_RESET_NEXT_VIEW): New.
14446 (FORCE_RESETTING_VIEW_P): New.
14447 (RESETTING_VIEW_P): Check for -1 too.
14448 (ZERO_VIEW_P): Likewise.
14449 (new_line_info_table): Force-reset next view.
14450 (dwarf2out_begin_function): Likewise.
14451 (dwarf2out_source_line): Simplify zero_view_p initialization.
14452 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14453 view directly. Omit view when omitting .loc at line 0.
14454
14455 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14456
14457 PR tree-optimization/84740
14458 * tree-switch-conversion.c (process_switch): Call build_constructors
14459 only if info.phi_count is non-zero.
14460
14461 PR tree-optimization/84739
14462 * tree-tailcall.c (find_tail_calls): Check call arguments against
14463 DECL_ARGUMENTS (current_function_decl) rather than
14464 DECL_ARGUMENTS (func) when checking for tail recursion.
14465
14466 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14467
14468 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14469 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14470 Volker Reichelt's entry and add entries for people that perform
14471 GCC fuzzy testing and report numerous bugs.
14472
14473 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14474
14475 PR target/82411
14476 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14477 readonly data in sdata, if that is disabled.
14478 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14479 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14480 -mreadonly-in-sdata option.
14481
14482 2018-03-07 Martin Sebor <msebor@redhat.com>
14483
14484 PR tree-optimization/84468
14485 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14486 basic block when looking for nul assignment.
14487
14488 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14489
14490 PR target/84277
14491 * except.h (output_function_exception_table): Adjust prototype.
14492 * except.c (output_function_exception_table): Remove FNNAME parameter
14493 and add SECTION parameter. Ouput one part of the table at a time.
14494 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14495 the first part of the exception table and emit unwind directives.
14496 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14497 (i386_pe_seh_cold_init): Likewise.
14498 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14499 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14500 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14501 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14502 * config/i386/winnt.c: Include except.h.
14503 (struct seh_frame_state): Add reg_offset, after_prologue and
14504 in_cold_section fields.
14505 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14506 (i386_pe_seh_cold_init): New function.
14507 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14508 to seh->in_cold_section.
14509 (seh_emit_push): Record the offset of the push.
14510 (seh_emit_save): Record the offet of the save.
14511 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14512 Test seh->after_prologue to disregard the epilogue.
14513 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14514 (i386_pe_end_cold_function): New function.
14515
14516 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14517
14518 PR fortran/84565
14519 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14520 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14521
14522 PR c++/84704
14523 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14524 on tmp_var.
14525 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14526 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14527
14528 PR middle-end/84723
14529 * multiple_target.c: Include tree-inline.h and intl.h.
14530 (expand_target_clones): Diagnose and fail if node->definition and
14531 !tree_versionable_function_p (node->decl).
14532
14533 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14534
14535 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14536 sprint_ul.
14537 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14538 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14539 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14540
14541 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14542
14543 PR target/84710
14544 * combine.c (try_combine): Use reg_or_subregno instead of handling
14545 just paradoxical SUBREGs and REGs.
14546
14547 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14548
14549 * config/arc/arc.c (arc_finalize_pic): Remove function.
14550 (arc_must_save_register): We use single base PIC register, remove
14551 checks to save/restore the PIC register.
14552 (arc_expand_prologue): Likewise.
14553 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14554 Remove.
14555 (arc_verify_short): Likewise.
14556 (arc_attr_type): Likewise.
14557 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14558 (walk_stores): Likewise.
14559 (arc_address_cost): Make it static.
14560 (arc_verify_short): Likewise.
14561 (branch_dest): Likewise.
14562 (arc_attr_type): Likewise.
14563 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14564 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14565 (arc_final_prescan_insn): Remove inserting the nops due to
14566 hardware hazards. It is done in reorg step.
14567 (insn_length_variant_t): Remove.
14568 (insn_length_parameters_t): Likewise.
14569 (arc_insn_length_parameters): Likewise.
14570 (arc_get_insn_variants): Likewise.
14571 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14572
14573 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14574
14575 PR inline-asm/84683
14576 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14577 assertion failure.
14578
14579 PR tree-optimization/84687
14580 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14581 on new_node->decl.
14582 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14583
14584 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14585
14586 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14587 Rename to ppc_speculation_barrier.
14588 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14589 __builtin_ppc_speculation_barrier.
14590
14591 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14592
14593 PR target/84700
14594 * combine.c (combine_simplify_rtx): Don't try to simplify if
14595 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14596 are equal to x.
14597
14598 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14599
14600 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14601 to 32 bytes when compiling for POWER9.
14602
14603 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14604
14605 PR target/84564
14606 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14607 regparm >= 3 with no arg reg available also for calls with
14608 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14609
14610 PR target/84524
14611 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14612 orig,vex.
14613 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14614
14615 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14616
14617 PR target/84264
14618 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14619
14620 2018-03-05 Richard Biener <rguenther@suse.de>
14621
14622 PR tree-optimization/84486
14623 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14624 When inserting a __builtin_assume_aligned call set the LHS
14625 SSA name alignment info accordingly.
14626
14627 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14628
14629 PR tree-optimization/84114
14630 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14631 Avoid reassociation of FLOAT_MODE addition.
14632
14633 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14634
14635 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14636 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14637 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14638 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14639 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14640 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14641 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14642 and -mwbnoinvd.
14643 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14644 __builtin_ia32_wbinvd): New builtins.
14645 (SPECIAL_ARGS2): New.
14646 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14647 (SPECIAL_ARGS2): New.
14648 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14649 (ix86_valid_target_attribute_inner_p): Ditto.
14650 (ix86_init_mmx_sse_builtins): Add special_args2.
14651 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14652 TARGET_WBNOINVD_P): New.
14653 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14654 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14655 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14656 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14657 * config/i386/pconfigintrin.h: New file.
14658 * config/i386/wbnoinvdintrin.h: Ditto.
14659 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14660 wbnoinvdintrin.h.
14661 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14662
14663 2018-03-05 Richard Biener <rguenther@suse.de>
14664
14665 PR tree-optimization/84670
14666 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14667 member.
14668 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14669 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14670 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14671 doesn't grow if all successors (recursively) were visited at least
14672 once.
14673
14674 2018-03-05 Richard Biener <rguenther@suse.de>
14675
14676 PR tree-optimization/84650
14677 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14678 if executed in the loop pipeline.
14679
14680 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14681
14682 * doc/configfiles.texi (Configuration Files): Move info about
14683 conditionalizing $target-protos.h to...
14684 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14685 differs from $target-protos.h.
14686
14687 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14688 Chung-Ju Wu <jasonwucj@gmail.com>
14689
14690 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14691 * config/nds32/nds32-multiple.md (setmemsi): Define.
14692 * config/nds32/nds32-memory-manipulation.c
14693 (nds32_gen_dup_4_byte_to_word_value): New.
14694 (emit_setmem_word_loop): New.
14695 (emit_setmem_byte_loop): New.
14696 (nds32_expand_setmem_loop): New.
14697 (nds32_expand_setmem_loop_v3m): New.
14698 (nds32_expand_setmem_unroll): New.
14699 (nds32_expand_setmem): New.
14700
14701 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14702 Chung-Ju Wu <jasonwucj@gmail.com>
14703
14704 * config/nds32/nds32-memory-manipulation.c
14705 (nds32_emit_load_store): New.
14706 (nds32_emit_post_inc_load_store): New.
14707 (nds32_emit_mem_move): New.
14708 (nds32_emit_mem_move_block): New.
14709 (nds32_expand_movmemsi_loop_unknown_size): New.
14710 (nds32_expand_movmemsi_loop_known_size): New.
14711 (nds32_expand_movmemsi_loop): New.
14712 (nds32_expand_movmemsi_unroll): New.
14713 (nds32_expand_movmemqi): Rename ...
14714 (nds32_expand_movmemsi): ... to this.
14715 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14716 (movmemsi): ... to this.
14717 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14718 (nds32_expand_movmemsi): ... to this.
14719
14720 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14721 Monk Chiang <sh.chiang04@gmail.com>
14722 Chung-Ju Wu <jasonwucj@gmail.com>
14723
14724 * config/nds32/nds32-protos.h
14725 (nds32_expand_load_multiple): New arguments.
14726 (nds32_expand_store_multiple): Ditto.
14727 (nds32_valid_multiple_load_store): Rename ...
14728 (nds32_valid_multiple_load_store_p): ... to this.
14729 * config/nds32/nds32-memory-manipulation.c
14730 (nds32_expand_load_multiple): Refine implementation.
14731 (nds32_expand_store_multiple): Ditto.
14732 * config/nds32/nds32-multiple.md
14733 (load_multiple): Update nds32_expand_load_multiple interface.
14734 (store_multiple): Update nds32_expand_store_multiple interface.
14735 * config/nds32/nds32-predicates.c
14736 (nds32_valid_multiple_load_store): Rename ...
14737 (nds32_valid_multiple_load_store_p): ... to this and refine
14738 implementation.
14739 * config/nds32/predicates.md
14740 (nds32_load_multiple_and_update_address_operation): New predicate.
14741 (nds32_store_multiple_and_update_address_operation): New predicate.
14742
14743 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14744 Chung-Ju Wu <jasonwucj@gmail.com>
14745
14746 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14747 (combo): New attribute.
14748 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14749
14750 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14751
14752 * config/nds32/nds32.opt: Change -mcmodel= default value.
14753
14754 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14755 Monk Chiang <sh.chiang04@gmail.com>
14756 Chung-Ju Wu <jasonwucj@gmail.com>
14757
14758 * config/nds32/constants.md (unspec_element): New enum.
14759 * config/nds32/constraints.md (Umw): New constraint.
14760 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14761 * config/nds32/nds32-intrinsic.md: Likewise.
14762 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14763 (nds32_valid_smw_lwm_base_p): New.
14764 (nds32_output_smw_single_word): New.
14765 (nds32_output_lmw_single_word): New.
14766 (nds32_expand_unaligned_load): New.
14767 (nds32_expand_unaligned_store): New.
14768 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14769 (nds32_output_smw_single_word): Declare.
14770 (nds32_output_lmw_single_word): Declare.
14771 (nds32_expand_unaligned_load): Declare.
14772 (nds32_expand_unaligned_store): Declare.
14773 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14774 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14775 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14776 NDS32_BUILTIN_UASTORE_DW.
14777 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14778 predicate.
14779
14780 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14781 Kito Cheng <kito.cheng@gmail.com>
14782 Chung-Ju Wu <jasonwucj@gmail.com>
14783
14784 * config/nds32/nds32-intrinsic.c
14785 (nds32_expand_builtin_null_ftype_reg): Delete.
14786 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14787 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14788 (nds32_read_argument): New.
14789 (nds32_legitimize_target): Ditto.
14790 (nds32_legitimize_argument): Ditto.
14791 (nds32_check_constant_argument): Ditto.
14792 (nds32_expand_unop_builtin): Ditto.
14793 (nds32_expand_unopimm_builtin): Ditto.
14794 (nds32_expand_binop_builtin): Ditto.
14795 (nds32_builtin_decl_impl): Ditto.
14796 (builtin_description): Ditto.
14797 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14798 (nds32_init_builtins_impl): Ditto.
14799 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14800 (nds32_builtin_decl): New.
14801 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14802 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14803
14804 2018-03-02 Jeff Law <law@redhat.com>
14805
14806 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14807 (redundant_insn, fill_simple_delay_slots): Likewise.
14808 (fill_slots_from_thread): Likewise.
14809 * resource.c (mark_referenced_resources): Likewise.
14810 (mark_set_resources, find_dead_or_set_registers): Likewise.
14811
14812 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14813
14814 * substring-locations.h (format_warning_va): Formatting fix for
14815 ATTRIBUTE_GCC_DIAG.
14816 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14817 argument.
14818 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14819 * substring-locations.c: Include intl.h.
14820 (format_warning_va): Turned into small wrapper around
14821 format_warning_n_va, renamed to ...
14822 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14823 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14824 use ngettext.
14825 (format_warning_at_substring_n): New function.
14826 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14827 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14828 format_warning_at_substring with just a shorter name instead of
14829 const function pointer.
14830 (fmtwarn_n): New function.
14831 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14832 appropriate, get rid of all the fmtstr temporaries, move conditionals
14833 with G_() wrapped string literals directly into fmtwarn arguments,
14834 cast dir.len to (int), formatting fixes.
14835
14836 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14837
14838 * doc/invoke.texi: Remove "Cilk Plus" references.
14839
14840 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14841 Richard Biener <rguenther@suse.de>
14842
14843 PR ipa/84628
14844 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14845 for error or warning attributes if CALL_FROM_THUNK_P is set.
14846 Formatting fixes.
14847
14848 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14849
14850 PR target/56540
14851 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14852 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14853
14854 PR target/56540
14855 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14856 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14857
14858 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14859 instead of -1U in last predictors element's probability member.
14860
14861 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14862
14863 PR ipa/83983
14864 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14865 arguments if they are comparable.
14866
14867 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14868
14869 PR tree-optimization/84634
14870 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14871 masks and masked_loop_p with a single loop_masks, making sure it's
14872 null for bb vectorization.
14873
14874 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14875
14876 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14877 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14878 loop->force_vectorize to check whether there is no alias.
14879
14880 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14881
14882 PR target/84614
14883 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14884 prototypes.
14885 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14886 comments.
14887 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14888 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14889 instead of a loop around prev_real_insn.
14890 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14891 prev_real_insn.
14892
14893 PR inline-asm/84625
14894 * config/i386/i386.c (ix86_print_operand): Use conditional
14895 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14896 zero vector.
14897
14898 2018-03-02 Richard Biener <rguenther@suse.de>
14899
14900 PR tree-optimization/84427
14901 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14902 (bitmap_set_subtract_values): Rewrite to handle multiple
14903 exprs per value.
14904 (clean): Likewise.
14905 (prune_clobbered_mems): Likewise.
14906 (phi_translate): Take edge instead of pred/phiblock.
14907 (phi_translate_1): Likewise.
14908 (phi_translate_set): Likewise. Insert all translated
14909 exprs for a value into the set, keeping possibly multiple
14910 expressions per value.
14911 (compute_antic_aux): Adjust for phi_translate changes.
14912 When intersecting union the expressions and prune those
14913 not in the final value set, keeping possibly multiple
14914 expressions per value. Do not use value-insertion
14915 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14916 all expressions. Add verification that the value-sets
14917 only shrink during iteration.
14918 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14919 (do_pre_regular_insertion): Likewise.
14920 (do_pre_partial_partial_insertion): Likewise.
14921
14922 2018-03-02 Richard Biener <rguenther@suse.de>
14923
14924 PR target/82005
14925 * config/darwin.c (saved_debug_info_level): New static global.
14926 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14927 (darwin_asm_lto_end): Restore debug info generation settings.
14928
14929 2018-03-01 Martin Liska <mliska@suse.cz>
14930
14931 PR sanitizer/82484
14932 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14933 volatile arguments.
14934
14935 2018-03-01 Richard Biener <rguenther@suse.de>
14936
14937 PR debug/84645
14938 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14939 type annotation with LTO when debug was disabled at compile-time.
14940
14941 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14942
14943 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14944 XINT with INTVAL.
14945 (mips_final_postscan_insn): Likewise.
14946
14947 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14948
14949 PR rtl-optimization/84528
14950 * alias.c (init_alias_target): Add commentary.
14951 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14952 a unique base value if the frame pointer is not eliminated
14953 to the stack pointer.
14954
14955 2018-03-01 Tom de Vries <tom@codesourcery.com>
14956
14957 PR rtl-optimization/83327
14958 * lra-int.h (hard_regs_spilled_into): Declare.
14959 * lra.c (hard_regs_spilled_into): Define.
14960 (init_reg_info): Init hard_regs_spilled_into.
14961 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14962 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14963 (process_bb_lives): Handle hard_regs_spilled_into.
14964 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14965 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14966
14967 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14968
14969 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14970 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14971 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14972 * config/rs6000/aix72.h: New file.
14973
14974 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14975
14976 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14977 instead of warning_at with conditional singular and plural messages
14978 where possible.
14979
14980 PR target/52991
14981 * stor-layout.c (update_alignment_for_field): For
14982 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14983 && !DECL_PACKED (field), do the alignment update, just use
14984 only desired_align instead of MAX (type_align, desired_align)
14985 as the alignment.
14986 (place_field): Don't do known_align < desired_align handling
14987 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14988 is non-NULL, instead do it after rli->prev_field handling and
14989 only if not within a bitfield word. For DECL_PACKED (field)
14990 use type_align of BITS_PER_UNIT.
14991
14992 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14993
14994 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14995 superfluous parentheses and trailing spaces.
14996
14997 2018-02-28 Richard Biener <rguenther@suse.de>
14998
14999 PR tree-optimization/84584
15000 * graphite-scop-detection.c (scop_detection::add_scop): Discard
15001 SCoPs with fake exit edge.
15002
15003 2018-02-28 Martin Liska <mliska@suse.cz>
15004
15005 PR testsuite/84597
15006 * timevar.c (timer::print): Fix format to properly print 100%
15007 values.
15008
15009 2018-02-28 Richard Biener <rguenther@suse.de>
15010
15011 PR middle-end/84607
15012 * genmatch.c (capture_info::walk_match): Do not mark
15013 captured expressions without operands as expr_p given
15014 they act more like predicates and should be subject to
15015 "lost tail" side-effect preserving.
15016
15017 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
15018
15019 PR rtl-optimization/81611
15020 * auto-inc-dec.c (attempt_change): Move dead note from
15021 mem_insn if it's the next use of regno
15022 (find_address): Take address use of reg holding
15023 non-incremented value. Add parm to limit search to the named
15024 reg only.
15025 (merge_in_block): Attempt to use a mem insn that is the next
15026 use of the original regno.
15027
15028 2018-02-27 Martin Sebor <msebor@redhat.com>
15029
15030 PR c++/83871
15031 * doc/invoke.texi (-Wmissing-attributes): New option.
15032 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15033
15034 2018-02-27 Martin Sebor <msebor@redhat.com>
15035
15036 PR translation/84207
15037 * diagnostic-core.h (warning_n, error_n, inform_n): Change
15038 n argument to unsigned HOST_WIDE_INT.
15039 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15040 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
15041 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15042 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15043
15044 2018-02-27 Richard Biener <rguenther@suse.de>
15045
15046 PR tree-optimization/84512
15047 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15048 Do not use the estimate returned from record_stmt_cost for
15049 the scalar iteration cost but sum properly using add_stmt_cost.
15050
15051 2018-02-27 Richard Biener <rguenther@suse.de>
15052
15053 PR tree-optimization/84466
15054 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15055 Adjust last change to less strictly validate use operands.
15056
15057 2018-02-27 Martin Liska <mliska@suse.cz>
15058
15059 PR gcov-profile/84548
15060 * gcov.c (process_file): Allow partial overlap and consider it
15061 also as group functions.
15062 (output_lines): Properly calculate range of lines for a group.
15063
15064 2018-02-27 Martin Liska <mliska@suse.cz>
15065
15066 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15067 'ggc' suffixes. Change first column width.
15068 (timer::print): Fix formatting of the column.
15069
15070 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
15071
15072 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15073 preserve inline entry blocks for the sake of debug inline
15074 entry point markers alone.
15075 (remove_unused_locals): Suggest in comments a better place to
15076 force the preservation of inline entry blocks that are
15077 otherwise unused, but do not preserve them.
15078
15079 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15080
15081 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15082
15083 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15084
15085 PR target/84039
15086 * config/i386/constraints.md (Bs): Replace
15087 ix86_indirect_branch_register with
15088 TARGET_INDIRECT_BRANCH_REGISTER.
15089 (Bw): Likewise.
15090 * config/i386/i386.md (indirect_jump): Likewise.
15091 (tablejump): Likewise.
15092 (*sibcall_memory): Likewise.
15093 (*sibcall_value_memory): Likewise.
15094 Peepholes of indirect call and jump via memory: Likewise.
15095 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15096 (*sibcall_value_GOT_32): Likewise.
15097 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15098 (GOT_memory_operand): Likewise.
15099 (call_insn_operand): Likewise.
15100 (sibcall_insn_operand): Likewise.
15101 (GOT32_symbol_operand): Likewise.
15102 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15103
15104 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
15105
15106 PR rtl-optimization/83496
15107 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15108 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
15109 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15110 redundant insn, if any.
15111 (relax_delay_slots): Likewise.
15112 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15113
15114 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
15115
15116 PR tree-optimization/83965
15117 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15118 that grouped statements are part of a reduction chain. Return
15119 true if the statement is not marked as a reduction itself but
15120 is part of a group.
15121 (vect_recog_dot_prod_pattern): Don't check whether the statement
15122 is part of a group here.
15123 (vect_recog_sad_pattern): Likewise.
15124 (vect_recog_widen_sum_pattern): Likewise.
15125
15126 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
15127
15128 PR debug/84545
15129 * final.c (rest_of_clean_state): Also look for calls inside sequences.
15130
15131 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15132
15133 PR target/84530
15134 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15135 the bool argument.
15136 (ix86_output_indirect_function_return): New prototype.
15137 (ix86_split_simple_return_pop_internal): Likewise.
15138 * config/i386/i386.c (indirect_return_via_cx): New.
15139 (indirect_return_via_cx_bnd): Likewise.
15140 (indirect_thunk_name): Handle return va CX_REG.
15141 (output_indirect_thunk_function): Create alias for
15142 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15143 (ix86_output_indirect_jmp): Remove the bool argument.
15144 (ix86_output_indirect_function_return): New function.
15145 (ix86_split_simple_return_pop_internal): Likewise.
15146 * config/i386/i386.md (*indirect_jump): Don't pass false
15147 to ix86_output_indirect_jmp.
15148 (*tablejump_1): Likewise.
15149 (simple_return_pop_internal): Change it to define_insn_and_split.
15150 Call ix86_split_simple_return_pop_internal to split it for
15151 -mfunction-return=.
15152 (simple_return_indirect_internal): Call
15153 ix86_output_indirect_function_return instead of
15154 ix86_output_indirect_jmp.
15155
15156 2018-02-26 Jakub Jelinek <jakub@redhat.com>
15157
15158 PR bootstrap/84405
15159 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15160 memset and value initialization afterwards.
15161
15162 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
15163
15164 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15165
15166 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15167
15168 PR target/84521
15169 * common/config/aarch64/aarch64-common.c
15170 (aarch_option_optimization_table[]): Switch
15171 off fomit-frame-pointer
15172
15173 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
15174 Chung-Ju Wu <jasonwucj@gmail.com>
15175
15176 * config/nds32/nds32-multiple.md (load_multiple): Disallow
15177 volatile memory.
15178 (store_multiple): Ditto.
15179
15180 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
15181
15182 * config.gcc: Add --with-cpu support for nds32 target.
15183 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15184 * config/nds32/nds32.opt: Add -mcpu= option.
15185
15186 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
15187
15188 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15189 isel=yes): Warn for these deprecated options.
15190
15191 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
15192
15193 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15194 ISA_2_5_MASKS_EMBEDDED.
15195
15196 2018-02-23 Jakub Jelinek <jakub@redhat.com>
15197
15198 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15199 p->max as pointers rather than using iterative_hash_expr.
15200
15201 2018-02-23 Carl Love <cel@us.ibm.com>
15202
15203 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15204 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15205 BU_P8V_OVERLOAD_2.
15206 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15207 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15208 P8V_BUILTIN_VEC_VUNSIGNED2.
15209
15210 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
15211
15212 PR target/81572
15213 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15214 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15215 LRA_UNKNOWN_ALT.
15216 * lra-constraints.c (curr_insn_transform): Set up
15217 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
15218 LRA_UNKNOWN_ALT.
15219 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15220 * lra-eliminations.c (spill_pseudos): Ditto.
15221 (process_insn_for_elimination): Ditto.
15222 * lra-lives.c (reg_early_clobber_p): Use the new macros.
15223 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15224 LRA_NON_CLOBBERED_ALT.
15225
15226 2018-02-22 Martin Sebor <msebor@redhat.com>
15227
15228 PR tree-optimization/84480
15229 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15230 to maybe_diag_stxncpy_trunc. Call it.
15231 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15232 from gimple_fold_builtin_strcpy. Print inlining stack.
15233 (handle_builtin_stxncpy): Print inlining stack.
15234 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15235
15236 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
15237
15238 PR target/84176
15239 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15240 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15241 and -fcheck-pointer-bounds are used together.
15242 (indirect_thunk_prefix): New enum.
15243 (indirect_thunk_need_prefix): New function.
15244 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
15245 "_nt" instead of "_bnd" for NOTRACK prefix.
15246 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15247 (output_indirect_thunk_function): Likewise.
15248 (): Likewise.
15249 (ix86_code_end): Update output_indirect_thunk_function calls.
15250 (ix86_output_indirect_branch_via_reg): Replace
15251 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15252 (ix86_output_indirect_branch_via_push): Likewise.
15253 (ix86_output_function_return): Likewise.
15254 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15255 incompatible with -fcf-protection=branch and
15256 -fcheck-pointer-bounds.
15257
15258 2018-02-22 Steve Ellcey <sellcey@cavium.com>
15259
15260 PR target/83335
15261 * config/aarch64/aarch64.c (aarch64_print_address_internal):
15262 Change gcc_assert call to output_operand_lossage.
15263
15264 2018-02-22 Steve Ellcey <sellcey@cavium.com>
15265
15266 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15267
15268 2018-02-22 DJ Delorie <dj@redhat.com>
15269 Sebastian Perta <sebastian.perta@renesas.com>
15270 Oleg Endo <olegendo@gcc.gnu.org>
15271
15272 * config/rx/rx.c (rx_rtx_costs): New function.
15273 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15274
15275 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
15276
15277 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15278
15279 2018-02-22 Martin Liska <mliska@suse.cz>
15280
15281 PR driver/83193
15282 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15283 Add "native" as a possible value.
15284
15285 2018-02-22 Martin Liska <mliska@suse.cz>
15286
15287 PR driver/83193
15288 * config/i386/i386.c (ix86_option_override_internal):
15289 Add "native" as a possible value for -march and -mtune.
15290
15291 2018-02-22 Jakub Jelinek <jakub@redhat.com>
15292
15293 PR target/84502
15294 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15295 to all type variants.
15296
15297 PR tree-optimization/84503
15298 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15299 width as info->bitpos + info->bitsize - start.
15300 (merged_store_group::merge_overlapping): Simplify width computation.
15301 (check_no_overlap): New function.
15302 (imm_store_chain_info::try_coalesce_bswap): Compute expected
15303 start + width and last_order of the group, fail if check_no_overlap
15304 fails.
15305 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15306 to group if check_no_overlap fails.
15307
15308 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15309
15310 * config/rs6000/altivec.md: Delete contraint arguments to
15311 define_expand, define_split, and define_peephole2, and in
15312 define_insn_and_split if always unused.
15313 * config/rs6000/darwin.md: Ditto.
15314 * config/rs6000/dfp.md: Ditto.
15315 * config/rs6000/rs6000.md: Ditto.
15316 * config/rs6000/sync.md: Ditto.
15317 * config/rs6000/vector.md: Ditto.
15318 * config/rs6000/vsx.md: Ditto.
15319
15320 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15321
15322 * config/rs6000/altivec.md: Write output control strings as braced
15323 blocks instead of double-quoted strings.
15324 * config/rs6000/darwin.md: Ditto.
15325 * config/rs6000/rs6000.md: Ditto.
15326 * config/rs6000/vector.md: Ditto.
15327 * config/rs6000/vsx.md: Ditto.
15328
15329 2018-02-21 Jason Merrill <jason@redhat.com>
15330
15331 PR c++/84314 - ICE with templates and fastcall attribute.
15332 * attribs.c (build_type_attribute_qual_variant): Remove assert.
15333
15334 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15335
15336 * ipa-cp.c (determine_versionability): Fix comment typos.
15337
15338 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15339
15340 PR c/84229
15341 * ipa-cp.c (determine_versionability): Do not version functions caling
15342 va_arg_pack.
15343
15344 2018-02-21 Martin Liska <mliska@suse.cz>
15345
15346 PR driver/83193
15347 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15348 Add "native" as a possible value.
15349 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
15350 the macro when native cpu detection is available.
15351
15352 2018-02-21 Martin Liska <mliska@suse.cz>
15353
15354 PR driver/83193
15355 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15356 Add "native" as a possible value.
15357 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15358 when native cpu detection is available.
15359
15360 2018-02-21 Jakub Jelinek <jakub@redhat.com>
15361 Martin Sebor <msebor@redhat.com>
15362
15363 PR tree-optimization/84478
15364 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15365 false.
15366 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15367 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15368 support which is conservatively correct, for 2 only stay conservative
15369 for maxlen. Formatting and comment capitalization fixes. Add STRICT
15370 argument to the 2 argument get_range_strlen, adjust 6 arg
15371 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15372 false.
15373 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15374 (gimple_fold_builtin_strlen): Pass true as last argument to
15375 get_range_strlen.
15376
15377 2018-02-20 Martin Sebor <msebor@redhat.com>
15378
15379 PR middle-end/84095
15380 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15381 (builtin_memref::set_base_and_offset): Same. Handle inner references.
15382 (builtin_memref::builtin_memref): Factor out parts into
15383 set_base_and_offset and call it.
15384
15385 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15386
15387 PR middle-end/84406
15388 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15389 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15390 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
15391 search at the associated MODE_INT.
15392
15393 2018-02-20 Jeff Law <law@redhat.com>
15394
15395 PR middle-end/82123
15396 PR tree-optimization/81592
15397 PR middle-end/79257
15398 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15399 for range data rather than using global data.
15400 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15401 range data rather than using global data.
15402 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15403 pass it to children as needed.
15404 (struct directive::fmtresult): Similarly.
15405 (struct directive::set_width): Similarly.
15406 (struct directive::set_precision): Similarly.
15407 (format_integer, format_directive, parse_directive): Similarly.
15408 (format_none): Accept unnamed vr_values parameter.
15409 (format_percent, format_floating, format_character): Similarly.
15410 (format_string, format_plain): Similarly.
15411 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15412 the EVRP range analyzer for range data rather than using global data.
15413 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15414 gimple-ssa-evrp-analyze.h
15415 (class sprintf_dom_walker): Add after_dom_children member function.
15416 Add evrp_range_analyzer member.
15417 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15418 range analyzer as needed.
15419 (sprintf_dom_walker::after_dom_children): New member function.
15420 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15421 if not optimizing.
15422 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15423 (evrp_range_analyzer::pop_to_marker): Likewise.
15424
15425 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15426
15427 PR tree-optimization/84419
15428 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15429 with the required type if its current type is compatible but
15430 different.
15431
15432 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15433
15434 PR middle-end/82004
15435 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15436 after vectorization.
15437
15438 2018-02-20 Martin Liska <mliska@suse.cz>
15439
15440 PR driver/83193
15441 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15442 possible values if we don't have a hint.
15443
15444 2018-02-20 Martin Liska <mliska@suse.cz>
15445
15446 PR c/84310
15447 PR target/79747
15448 * final.c (shorten_branches): Build align_tab array with one
15449 more element.
15450 * opts.c (finish_options): Add alignment option limit check.
15451 (MAX_CODE_ALIGN): Likewise.
15452 (MAX_CODE_ALIGN_VALUE): Likewise.
15453 * doc/invoke.texi: Document maximum allowed option value for
15454 all -falign-* options.
15455
15456 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15457
15458 PR target/84146
15459 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15460 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15461 * var-tracking.c (emit_note_insn_var_location): Remove all references
15462 to NOTE_INSN_CALL_ARG_LOCATION.
15463 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15464 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15465 Use copy_rtx_if_shared.
15466 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15467 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15468 (dwarf2out_var_location): Remove handling of
15469 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15470 on call_insn.
15471 * final.c (final_scan_insn): Remove all references to
15472 NOTE_INSN_CALL_ARG_LOCATION.
15473 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15474 before dumping final insns.
15475 * except.c (emit_note_eh_region_end): Remove all references to
15476 NOTE_INSN_CALL_ARG_LOCATION.
15477 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15478 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15479 * config/arc/arc.c (hwloop_optimize): Likewise.
15480 * config/arm/arm.c (create_fix_barrier): Likewise.
15481 * config/s390/s390.c (s390_chunkify_start): Likewise.
15482 * config/sh/sh.c (find_barrier): Likewise.
15483 * config/i386/i386.c (rest_of_insert_endbranch,
15484 ix86_seh_fixup_eh_fallthru): Likewise.
15485 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15486 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15487 * config/frv/frv.c (frv_function_prologue): Likewise.
15488 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15489 reg note.
15490 (note_outside_basic_block_p): Remove all references to
15491 NOTE_INSN_CALL_ARG_LOCATION.
15492 * gengtype.c (adjust_field_rtx_def): Likewise.
15493 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15494 Likewise.
15495 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15496 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15497
15498 PR c++/84444
15499 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15500 is ADDR_EXPR.
15501
15502 PR tree-optimization/84452
15503 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15504 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15505 is NULL.
15506
15507 2018-02-19 Martin Liska <mliska@suse.cz>
15508
15509 PR sanitizer/82183
15510 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15511
15512 2018-02-19 Martin Liska <mliska@suse.cz>
15513 Richard Sandiford <richard.sandiford@linaro.org>
15514
15515 PR tree-optimization/82491
15516 * gimple-fold.c (get_base_constructor): Make earlier bail out
15517 to prevent ubsan.
15518
15519 2018-02-19 Carl Love <cel@us.ibm.com>
15520
15521 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15522 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15523 BU_P8V_OVERLOAD_1.
15524 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15525 P8V_BUILTIN_VEC_NEG.
15526
15527 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15528
15529 * config/rl78/rl78.md (movdf): New define expand.
15530
15531 2018-02-19 Martin Liska <mliska@suse.cz>
15532
15533 PR other/80589
15534 * doc/invoke.texi: Fix typo.
15535 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15536
15537 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15538
15539 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15540 handle rs6000_single_float and rs6000_double_float specially for
15541 e500 family CPUs.
15542
15543 2018-02-16 Jeff Law <law@redhat.com>
15544
15545 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15546 (pop_regs): Use it.
15547
15548 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15549
15550 PR ipa/84425
15551 * ipa-inline.c (inline_small_functions): Fix a typo.
15552
15553 2018-02-16 Nathan Sidwell <nathan@acm.org>
15554
15555 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15556
15557 2018-02-16 Carl Love <cel@us.ibm.com>
15558
15559 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15560 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15561 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15562 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15563 expansion to P8V_BUILTIN_VEC_FLOAT2.
15564
15565 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15566
15567 PR rtl-optimization/70023
15568 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15569 src_regno into account.
15570
15571 2018-02-16 Carl Love <cel@us.ibm.com>
15572
15573 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15574 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15575 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15576 * config/rs6000/rs6000.c: Remove case statements for
15577 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15578 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15579 and P9V_BUILTIN_VEC_VINSERT4B.
15580 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15581 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15582 * config/rs6000/vsx.md:
15583 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15584 vec_insert4b.
15585
15586 2018-02-16 Carl Love <cel@us.ibm.com>
15587
15588 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15589 vec_insert4b.
15590 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15591 definitions.
15592 * config/rs6000/rs6000-c.c: Add the definitions for
15593 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15594 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15595 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15596 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15597 definition for insert4b and define insn *insert3b_internal.
15598 * doc/extend.texi: Add documentation for vec_extract4b.
15599
15600 2018-02-16 Nathan Sidwell <nathan@acm.org>
15601
15602 * doc/extend.texi (Backwards Compatibility): Mention friend
15603 injection. Note for-scope is deprecated.
15604 * doc/invoke.texi (-ffriend-injection): Deprecate.
15605
15606 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15607
15608 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15609 that moved to I2, also allow destinations that are a paradoxical
15610 subreg (instead of a normal reg).
15611
15612 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15613
15614 PR target/83831
15615 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15616 to QImode.
15617
15618 2018-02-16 Richard Biener <rguenther@suse.de>
15619
15620 PR tree-optimization/84037
15621 PR tree-optimization/84016
15622 PR target/82862
15623 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15624 Adjust vec_construct for the fact we need additional higher latency
15625 128bit inserts for AVX256 and AVX512 vector builds.
15626 (ix86_add_stmt_cost): Scale vector construction cost for
15627 elementwise loads.
15628
15629 2018-02-16 Richard Biener <rguenther@suse.de>
15630
15631 PR tree-optimization/84417
15632 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15633 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15634 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15635
15636 2018-02-16 Martin Liska <mliska@suse.cz>
15637
15638 PR sanitizer/84307
15639 * internal-fn.def (ASAN_CHECK): Set proper flags.
15640 (ASAN_MARK): Likewise.
15641
15642 2018-02-16 Julia Koval <julia.koval@intel.com>
15643
15644 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15645 from PTA_CANNONLAKE.
15646
15647 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15648
15649 PR target/84272
15650 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15651 Use ++iter rather than iter++ for std::list iterators.
15652 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15653 defer deleting them until all nodes in the forest are processed. Do
15654 free even leaf nodes. Change to_process into auto_vec.
15655
15656 PR bootstrap/84405
15657 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15658 * vec.h (vec_default_construct): Use memset instead of placement new
15659 if BROKEN_VALUE_INITIALIZATION is defined.
15660 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15661 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15662 is defined.
15663
15664 PR rtl-optimization/83723
15665 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15666 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15667 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15668 recursive calls.
15669 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15670 callers.
15671 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15672
15673 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15674
15675 PR rtl-optimization/81443
15676 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15677 from inner REGs to paradoxical SUBREGs.
15678
15679 2018-02-16 Richard Biener <rguenther@suse.de>
15680
15681 PR tree-optimization/84399
15682 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15683 For operands we can analyze at their definition make sure we can
15684 analyze them at each use as well.
15685
15686 2018-02-16 Richard Biener <rguenther@suse.de>
15687
15688 PR tree-optimization/84190
15689 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15690 volatile accesses if the decl isn't volatile.
15691
15692 2018-02-15 Jason Merrill <jason@redhat.com>
15693
15694 PR c++/84314 - ICE with templates and fastcall attribute.
15695 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15696 TYPE_CANONICAL on an existing type.
15697
15698 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15699
15700 PR tree-optimization/84383
15701 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15702 dstoff nor call operand_equal_p if dstbase is NULL.
15703
15704 PR tree-optimization/84334
15705 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15706 also a CONSTANT_CLASS_P, punt.
15707
15708 2018-02-14 Jim Wilson <jimw@sifive.com>
15709
15710 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15711 first SMALL_OPERAND check. New local min_second_step. Move assert
15712 to where locals are set. Add TARGET_RVC support.
15713 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15714
15715 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15716
15717 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15718
15719 2018-02-14 Martin Sebor <msebor@redhat.com>
15720
15721 PR tree-optimization/83698
15722 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15723 arrays constrain the offset range to their bounds.
15724 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15725 (builtin_access::overlap): Avoid setting the size of overlap if it's
15726 already been set.
15727 (maybe_diag_overlap): Also consider arrays when deciding what values
15728 of offsets to include in diagnostics.
15729
15730 2018-02-14 Martin Sebor <msebor@redhat.com>
15731
15732 PR c/84108
15733 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15734 that correspond to the kind of a declaration.
15735
15736 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15737
15738 PR target/83984
15739 * config/pa/pa.md: Load address of PIC label using the linkage table
15740 if the label is nonlocal.
15741
15742 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15743
15744 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15745 warning message if user requests -maltivec=be.
15746 * doc/invoke.texi: Document deprecation of -maltivec=be.
15747
15748 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15749
15750 PR target/84220
15751 * config/rs6000/rs6000-c.c: Update definitions for
15752 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15753 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15754
15755 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15756
15757 PR target/84239
15758 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15759 add _get_ssp intrinsics. Remove argument from
15760 __builtin_ia32_rdssp[d|q].
15761 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15762 * config/i386/i386-builtin.def: Remove argument from
15763 __builtin_ia32_rdssp[d|q].
15764 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15765 ix86_expand_special_args_builtin for _rdssp[d|q].
15766 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15767 Clear register before usage.
15768 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15769 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15770
15771 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15772
15773 PR tree-optimization/84357
15774 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15775 operand 1 of an ARRAY_REF too.
15776
15777 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15778
15779 PR target/83831
15780 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15781 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15782 declarations.
15783 (set_of_reg): New struct.
15784 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15785 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15786 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15787 functions.
15788 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15789 Split into bitclr, bitset, bitinvert patterns if appropriate.
15790 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15791 use rx_fuse_in_memory_bitop.
15792 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15793 to named insn, correct maximum insn length.
15794
15795 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15796
15797 PR target/79242
15798 * machmode.def: Define a complex mode for PARTIAL_INT.
15799 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15800 MODE_PARTIAL_INT.
15801 * doc/rtl.texi: Document CSPImode.
15802 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15803 handling.
15804 (msp430_hard_regno_nregs_with_padding): Likewise.
15805
15806 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15807
15808 PR target/84279
15809 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15810
15811 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15812
15813 PR rtl-optimization/84169
15814 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15815 we generated a parallel as new i3 and we split that to new i2 and i3
15816 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15817 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15818 those to i2, not i1. Partially rewrite this scan code.
15819
15820 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15821
15822 PR c/82210
15823 * stor-layout.c (place_field): For variable length fields, adjust
15824 offset_align afterwards not just based on the field's alignment,
15825 but also on the size.
15826
15827 PR middle-end/84309
15828 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15829 of exps and logs in the use_exp2 case.
15830
15831 2018-02-13 Jeff Law <law@redhat.com>
15832
15833 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15834 entry for "vector".
15835
15836 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15837 ARGS as unused.
15838
15839 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15840
15841 PR debug/84342
15842 PR debug/84319
15843 * common.opt (gas-loc-support, gas-locview-support): New.
15844 (ginline-points, ginternal-reset-location-views): New.
15845 * doc/invoke.texi: Document them. Use @itemx where intended.
15846 (gvariable-location-views): Adjust.
15847 * target.def (reset_location_view): New.
15848 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15849 (TARGET_RESET_LOCATION_VIEW): New.
15850 * doc/tm.texi: Rebuilt.
15851 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15852 (dwarf2out_default_as_locview_support): New.
15853 (output_asm_line_debug_info): Use option variables.
15854 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15855 (output_loc_list): Likewise.
15856 (add_high_low_attributes): Check option variables.
15857 Don't output entry view attribute in strict mode.
15858 (gen_inlined_subroutine_die): Check option variables.
15859 (dwarf2out_inline_entry): Likewise.
15860 (init_sections_and_labels): Likewise.
15861 (dwarf2out_early_finish): Likewise.
15862 (maybe_reset_location_view): New, from...
15863 (dwarf2out_var_location): ... here. Call it.
15864 * debug.h (dwarf2out_default_as_loc_support): Declare.
15865 (dwarf2out_default_as_locview_support): Declare.
15866 * hooks.c (hook_int_rtx_insn_0): New.
15867 * hooks.h (hook_int_rtx_insn_0): Declare.
15868 * toplev.c (process_options): Take -gas-loc-support and
15869 -gas-locview-support from dwarf2out. Enable
15870 -gvariable-location-views by default only with locview
15871 assembler support. Enable -ginternal-reset-location-views by
15872 default only if the target defines the corresponding hook.
15873 Enable -ginline-points by default if location views are
15874 enabled; force it disabled if statement frontiers are
15875 disabled.
15876 * tree-inline.c (expand_call_inline): Check option variables.
15877 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15878
15879 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15880
15881 PR tree-optimization/84321
15882 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15883 handling. Also check whether the anti-range contains any values
15884 that satisfy the mask; switch to a VR_RANGE if not.
15885
15886 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15887
15888 PR sanitizer/84340
15889 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15890
15891 2018-02-13 Martin Jambor <mjambor@suse.cz>
15892
15893 PR c++/83990
15894 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15895 of call statements, also set location of a load to a temporary.
15896
15897 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15898
15899 * config/rl78/rl78.c (add_vector_labels): New function.
15900 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15901 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15902 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15903 which checks that no arguments are passed.
15904 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15905 * doc/extend.texi: Documentation for the new attribute.
15906
15907 2018-02-13 Andreas Schwab <schwab@suse.de>
15908
15909 * config/riscv/linux.h (CPP_SPEC): Define.
15910
15911 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15912
15913 PR target/84335
15914 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15915 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15916 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15917 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15918 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15919 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15920 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15921 temporarily for AES and PCLMUL builtins.
15922
15923 PR tree-optimization/84339
15924 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15925 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15926 Formatting fixes.
15927
15928 PR middle-end/84309
15929 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15930 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15931 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15932 inline function.
15933 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15934 inline function.
15935 * omp-simd-clone.h: New file.
15936 * omp-simd-clone.c: Include omp-simd-clone.h.
15937 (expand_simd_clones): No longer static.
15938 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15939 cgraph.h and omp-simd-clone.h.
15940 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15941 (vect_recog_widen_shift_pattern): Formatting fix.
15942 (vect_pattern_recog_1): Don't check optab for calls.
15943
15944 PR target/84336
15945 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15946 operands[2] into a REG before using gen_lowpart on it.
15947
15948 2018-02-12 Jeff Law <law@redhat.com>
15949
15950 PR target/83760
15951 * config/sh/sh.c (find_barrier): Consider a sibling call
15952 a barrier as well.
15953
15954 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15955 successfully back substituting a reg.
15956
15957 2018-02-12 Richard Biener <rguenther@suse.de>
15958
15959 PR tree-optimization/84037
15960 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15961 parameter, move visited init to caller.
15962 (vect_slp_analyze_operations): Separate cost from validity
15963 check, initialize visited once for all instances.
15964 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15965 for all instances.
15966 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15967 out an assert.
15968 (vect_model_promotion_demotion_cost): Likewise.
15969 (vectorizable_bswap): Guard cost modeling with !slp_node
15970 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15971 SLP stmts.
15972 (vectorizable_call): Likewise.
15973 (vectorizable_conversion): Likewise.
15974 (vectorizable_assignment): Likewise.
15975 (vectorizable_shift): Likewise.
15976 (vectorizable_operation): Likewise.
15977 (vectorizable_store): Likewise.
15978 (vectorizable_load): Likewise.
15979 (vectorizable_condition): Likewise.
15980 (vectorizable_comparison): Likewise.
15981
15982 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15983
15984 PR sanitizer/84307
15985 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15986 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15987 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15988
15989 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15990
15991 PR middle-end/83665
15992 * params.def (inline-min-speedup): Increase from 8 to 15.
15993 (max-inline-insns-auto): Decrease from 40 to 30.
15994 * ipa-split.c (consider_split): Add some buffer for function to
15995 be considered inlining candidate.
15996 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15997 default values.
15998
15999 2018-02-12 Richard Biener <rguenther@suse.de>
16000
16001 PR tree-optimization/84037
16002 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16003 matched stmts if we cannot swap the non-matched ones.
16004
16005 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16006
16007 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16008 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16009 _mm_maskz_scalef_round_ss): New intrinsics.
16010 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16011 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16012 __builtin_ia32_scalefss_round): Remove.
16013 (__builtin_ia32_scalefsd_mask_round,
16014 __builtin_ia32_scalefss_mask_round): New intrinsics.
16015 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16016 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16017 ((match_operand:VF_128 2 "<round_nimm_predicate>"
16018 "<round_constraint>")): Changed to ...
16019 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16020 "<round_scalar_constraint>")): ... this.
16021 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16022 %0, %1, %2<round_op3>}"): Changed to ...
16023 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16024 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16025 %2<round_scalar_mask_op3>}"): ... this.
16026 * config/i386/subst.md (round_scalar_nimm_predicate): New.
16027
16028 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16029
16030 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16031 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16032 (_mm_maskz_sqrt_round_ss): New intrinsics.
16033 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16034 (__builtin_ia32_sqrtsd_mask_round)
16035 (__builtin_ia32_sqrtss_mask_round): New builtins.
16036 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16037 (__builtin_ia32_sqrtss_round): Remove.
16038 (__builtin_ia32_sqrtsd_mask_round)
16039 (__builtin_ia32_sqrtss_mask_round): New builtins.
16040 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16041 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16042 ((match_operand:VF_128 1 "vector_operand"
16043 "xBm,<round_constraint>")): Changed to ...
16044 ((match_operand:VF_128 1 "vector_operand"
16045 "xBm,<round_scalar_constraint>")): ... this.
16046 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16047 %0, %2, %<iptr>1<round_op3>}): Changed to ...
16048 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16049 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16050 %<iptr>1<round_scalar_mask_op3>}): ... this.
16051 ((set_attr "prefix" "<round_prefix>")): Changed to ...
16052 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16053
16054 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
16055
16056 PR target/84266
16057 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16058 Cast vec_cmpeq result to correct type.
16059 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16060 Cast vec_cmpgt result to correct type.
16061
16062 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
16063
16064 * final.c (final_scan_insn_1): Renamed from...
16065 (final_scan_insn): ... this. New wrapper, to recover
16066 seen from the outermost call in recursive ones.
16067 * config/sparc/sparc.c (output_return): Drop seen from call.
16068 (output_sibcall): Likewise.
16069 * config/visium/visium.c (output_branch): Likewise.
16070
16071 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
16072
16073 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16074 function label.
16075
16076 2018-02-10 Alan Modra <amodra@gmail.com>
16077
16078 PR target/84300
16079 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16080 Specify LR as an input.
16081
16082 2018-02-10 Jakub Jelinek <jakub@redhat.com>
16083
16084 PR sanitizer/83987
16085 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16086 remove_member_access_dummy_vars): New functions.
16087 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16088 lower_omp_1, execute_lower_omp): Use them.
16089
16090 PR rtl-optimization/84308
16091 * shrink-wrap.c (spread_components): Release todo vector.
16092
16093 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
16094
16095 PR rtl-optimization/57193
16096 * ira-color.c (struct allocno_color_data): Add member
16097 conflict_allocno_hard_prefs.
16098 (update_conflict_allocno_hard_prefs): New.
16099 (bucket_allocno_compare_func): Add a preference based on
16100 conflict_allocno_hard_prefs.
16101 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16102 (color_allocnos): Remove a dead code. Initiate
16103 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
16104
16105 2018-02-09 Jakub Jelinek <jakub@redhat.com>
16106
16107 PR target/84226
16108 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16109 constraint from =wa to wa. Avoid a subreg on the output operand,
16110 instead use a pseudo and subreg it in a move.
16111 (p9_xxbrd_<mode>): Changed to ...
16112 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16113 (p9_xxbrd_v2df): New expander.
16114 (p9_xxbrw_<mode>): Changed to ...
16115 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16116 (p9_xxbrw_v4sf): New expander.
16117
16118 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
16119
16120 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16121
16122 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
16123
16124 PR target/83926
16125 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16126 multiply in 32-bit mode.
16127 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16128 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16129 mode.
16130
16131 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
16132
16133 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16134 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16135 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16136 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16137
16138 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
16139
16140 PR lto/84213
16141 * dwarf2out.c (is_trivial_indirect_ref): New function.
16142 (dwarf2out_late_global_decl): Do not generate a location
16143 attribute for variables that have a non-trivial DECL_VALUE_EXPR
16144 and that are not defined in the current unit.
16145
16146 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
16147
16148 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16149 instead of a libcall for UNORDERED.
16150
16151 2018-02-09 Tamar Christina <tamar.christina@arm.com>
16152
16153 PR target/82641
16154 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16155 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16156
16157 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16158
16159 PR target/PR84295
16160 * config/s390/s390.c (s390_set_current_function): Invoke
16161 s390_indirect_branch_settings also if fndecl didn't change.
16162
16163 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
16164
16165 * config/rs6000/rs6000.md (blockage): Set length to zero.
16166
16167 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
16168
16169 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16170
16171 2018-02-09 Jakub Jelinek <jakub@redhat.com>
16172
16173 PR sanitizer/84285
16174 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16175 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16176 -static-lib*san.
16177
16178 PR debug/84252
16179 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16180 PARALLEL incoming that failed vt_get_decl_and_offset check.
16181
16182 PR middle-end/84237
16183 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16184 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16185 TREE_READONLY bit.
16186 (get_variable_section): For decls in named .bss* sections pass true as
16187 second argument to bss_initializer_p.
16188
16189 2018-02-09 Marek Polacek <polacek@redhat.com>
16190 Jakub Jelinek <jakub@redhat.com>
16191
16192 PR c++/83659
16193 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16194 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
16195 Sync some changes from cxx_fold_indirect_ref.
16196
16197 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
16198
16199 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16200 markers.
16201 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16202 (BLOCK_INLINE_ENTRY_LABEL): New.
16203 (dwarf2out_var_location): Disregard inline entry markers.
16204 (inline_entry_data): New struct.
16205 (inline_entry_data_hasher): New hashtable type.
16206 (inline_entry_data_hasher::hash): New.
16207 (inline_entry_data_hasher::equal): New.
16208 (inline_entry_data_table): New variable.
16209 (add_high_low_attributes): Add DW_AT_entry_pc and
16210 DW_AT_GNU_entry_view attributes if a pending entry is found
16211 in inline_entry_data_table. Add old entry_pc attribute only
16212 if debug nonbinding markers are disabled.
16213 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16214 markers are enabled.
16215 (block_within_block_p, dwarf2out_inline_entry): New.
16216 (dwarf2out_finish): Check that no entries remained in
16217 inline_entry_data_table.
16218 * final.c (reemit_insn_block_notes): Handle inline entry notes.
16219 (final_scan_insn, notice_source_line): Likewise.
16220 (rest_of_clean_state): Skip inline entry markers.
16221 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16222 markers.
16223 * gimple.c (gimple_build_debug_inline_entry): New.
16224 * gimple.h (enum gimple_debug_subcode): Add
16225 GIMPLE_DEBUG_INLINE_ENTRY.
16226 (gimple_build_debug_inline_entry): Declare.
16227 (gimple_debug_inline_entry_p): New.
16228 (gimple_debug_nonbind_marker_p): Adjust.
16229 * insn-notes.def (INLINE_ENTRY): New.
16230 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16231 inline entry marker notes.
16232 (print_insn): Likewise.
16233 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16234 (INSN_DEBUG_MARKER_KIND): Likewise.
16235 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16236 * tree-inline.c (expand_call_inline): Build and insert
16237 debug_inline_entry stmt.
16238 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16239 inline entry blocks early, if nonbind markers are enabled.
16240 (dump_scope_block): Dump fragment info.
16241 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16242 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16243 (gimple_build_debug_inline_entry): New.
16244 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16245 Enable/disable inline entry points too.
16246 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16247 (DEBUG_INSN): Describe inline entry markers.
16248
16249 * common.opt (gvariable-location-views): New.
16250 (gvariable-location-views=incompat5): New.
16251 * config.in: Rebuilt.
16252 * configure: Rebuilt.
16253 * configure.ac: Test assembler for view support.
16254 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16255 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16256 * dwarf2out.c (var_loc_view): New typedef.
16257 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16258 (dwarf2out_locviews_in_attribute): New.
16259 (dwarf2out_locviews_in_loclist): New.
16260 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16261 (enum dw_line_info_opcode): Add LI_adv_address.
16262 (struct dw_line_info_table): Add view.
16263 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16264 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16265 (zero_view_p): New variable.
16266 (ZERO_VIEW_P): New macro.
16267 (output_asm_line_debug_info): New.
16268 (struct var_loc_node): Add view.
16269 (add_AT_view_list, AT_loc_list): New.
16270 (add_var_loc_to_decl): Add view param. Test it against last.
16271 (new_loc_list): Add view params. Record them.
16272 (AT_loc_list_ptr): Handle loc and view lists.
16273 (view_list_to_loc_list_val_node): New.
16274 (print_dw_val): Handle dw_val_class_view_list.
16275 (size_of_die): Likewise.
16276 (value_format): Likewise.
16277 (loc_list_has_views): New.
16278 (gen_llsym): Set vl_symbol too.
16279 (maybe_gen_llsym, skip_loc_list_entry): New.
16280 (dwarf2out_maybe_output_loclist_view_pair): New.
16281 (output_loc_list): Output view list or entries too.
16282 (output_view_list_offset): New.
16283 (output_die): Handle dw_val_class_view_list.
16284 (output_dwarf_version): New.
16285 (output_compilation_unit_header): Use it.
16286 (output_skeleton_debug_sections): Likewise.
16287 (output_rnglists, output_line_info): Likewise.
16288 (output_pubnames, output_aranges): Update version comments.
16289 (output_one_line_info_table): Output view numbers in asm comments.
16290 (dw_loc_list): Determine current endview, pass it to new_loc_list.
16291 Call maybe_gen_llsym.
16292 (loc_list_from_tree_1): Adjust.
16293 (add_AT_location_description): Create view list attribute if
16294 needed, check it's absent otherwise.
16295 (convert_cfa_to_fb_loc_list): Adjust.
16296 (maybe_emit_file): Call output_asm_line_debug_info for test.
16297 (dwarf2out_var_location): Reset views as needed. Precompute
16298 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
16299 attribute. Set view.
16300 (new_line_info_table): Reset next view.
16301 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16302 (dwarf2out_source_line): Likewise. Output view resets and labels to
16303 the assembler, or select appropriate line info opcodes.
16304 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16305 (optimize_string_length): Catch it. Adjust.
16306 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
16307 dw_val_class_view_list, and remove it if no longer needed.
16308 (hash_loc_list): Hash view numbers.
16309 (loc_list_hasher::equal): Compare them.
16310 (optimize_location_lists): Check whether a view list symbol is
16311 needed, and whether the locview attribute is present, and
16312 whether they match. Remove the locview attribute if no longer
16313 needed.
16314 (index_location_lists): Call skip_loc_list_entry for test.
16315 (dwarf2out_finish): Call output_asm_line_debug_info for test.
16316 Use output_dwarf_version.
16317 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16318 (struct dw_val_node): Add val_view_list.
16319 * final.c (SEEN_NEXT_VIEW): New.
16320 (set_next_view_needed): New.
16321 (clear_next_view_needed): New.
16322 (maybe_output_next_view): New.
16323 (final_start_function): Rename to...
16324 (final_start_function_1): ... this. Take pointer to FIRST,
16325 add SEEN parameter. Emit param bindings in the initial view.
16326 (final_start_function): Reintroduce SEEN-less interface.
16327 (final): Rename to...
16328 (final_1): ... this. Take SEEN parameter. Output final pending
16329 next view at the end.
16330 (final): Reintroduce seen-less interface.
16331 (final_scan_insn): Output pending next view before switching
16332 sections or ending a block. Mark the next view as needed when
16333 outputting variable locations. Notify debug backend of section
16334 changes, and of location view changes.
16335 (rest_of_handle_final): Adjust.
16336 * toplev.c (process_options): Autodetect value for debug variable
16337 location views option. Warn on incompat5 without -gdwarf-5.
16338 * doc/invoke.texi (gvariable-location-views): New.
16339 (gvariable-location-views=incompat5): New.
16340 (gno-variable-location-views): New.
16341
16342 2018-02-08 David Malcolm <dmalcolm@redhat.com>
16343
16344 PR tree-optimization/84136
16345 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16346 that the result of find_edge is non-NULL.
16347
16348 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16349
16350 PR target/83008
16351 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16352 storing integer register in SImode. Fix cost of 256 and 512
16353 byte aligned SSE register store.
16354
16355 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16356
16357 * config/i386/i386.c (ix86_multiplication_cost): Fix
16358 multiplication cost for TARGET_AVX512DQ.
16359
16360 2018-02-08 Marek Polacek <polacek@redhat.com>
16361
16362 PR tree-optimization/84238
16363 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16364 get_range_strlen.
16365
16366 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16367
16368 PR tree-optimization/84265
16369 * tree-vect-stmts.c (vectorizable_store): Don't treat
16370 VMAT_CONTIGUOUS accesses as grouped.
16371 (vectorizable_load): Likewise.
16372
16373 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16374
16375 PR tree-optimization/81635
16376 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16377 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16378 (test_round_for_mask): New functions.
16379 (wide_int_cc_tests): Call test_round_for_mask.
16380 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16381 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16382 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16383 range returned by get_range_info.
16384
16385 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16386
16387 PR ipa/81360
16388 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16389 * symtab.c: Include builtins.h
16390 (symtab_node::output_to_lto_symbol_table_p): Move here
16391 from lto-streamer-out.c:output_symbol_p.
16392 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16393 (output_symbol_p): Move all logic to symtab.c
16394 (produce_symtab): Update.
16395
16396 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16397
16398 * config/s390/s390-opts.h (enum indirect_branch): Define.
16399 * config/s390/s390-protos.h (s390_return_addr_from_memory)
16400 (s390_indirect_branch_via_thunk)
16401 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16402 (enum s390_indirect_branch_type): Define.
16403 * config/s390/s390.c (struct s390_frame_layout, struct
16404 machine_function): Remove.
16405 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16406 (indirect_branch_table_label_no, indirect_branch_table_name):
16407 Define variables.
16408 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16409 (enum s390_indirect_branch_option): Define.
16410 (s390_return_addr_from_memory): New function.
16411 (s390_handle_string_attribute): New function.
16412 (s390_attribute_table): Add new attribute handler.
16413 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16414 (s390_indirect_branch_via_thunk): New function.
16415 (s390_indirect_branch_via_inline_thunk): New function.
16416 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16417 sibling call optimization for non z10 compiles.
16418 (s390_emit_call): Force indirect branch target to be a single
16419 register. Add r1 clobber for non-z10 compiles.
16420 (s390_emit_epilogue): Emit return jump via return_use expander.
16421 (s390_reorg): Handle JUMP_INSNs as execute targets.
16422 (s390_option_override_internal): Perform validity checks for the
16423 new command line options.
16424 (s390_indirect_branch_attrvalue): New function.
16425 (s390_indirect_branch_settings): New function.
16426 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16427 (s390_output_indirect_thunk_function): New function.
16428 (s390_code_end): Implement target hook.
16429 (s390_case_values_threshold): Implement target hook.
16430 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16431 macros.
16432 * config/s390/s390.h (struct s390_frame_layout)
16433 (struct machine_function): Move here from s390.c.
16434 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16435 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16436 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16437 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16438 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16439 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16440 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16441 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16442 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16443 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16444 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16445 (mnemonic attribute): Add values which aren't recognized
16446 automatically.
16447 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16448 pattern for branch conversion. Fix mnemonic attribute.
16449 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16450 indirect branch via thunk if requested.
16451 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16452 ("*indirect_jump"): Disable for branch conversion using out of
16453 line thunks.
16454 ("indirect_jump_via_thunk<mode>_z10")
16455 ("indirect_jump_via_thunk<mode>")
16456 ("indirect_jump_via_inlinethunk<mode>_z10")
16457 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16458 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16459 ("casesi_jump_via_inlinethunk<mode>_z10")
16460 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16461 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16462 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16463 ("*indirect2_jump"): Disable for branch conversion.
16464 ("casesi_jump"): Turn into expander and expand patterns for branch
16465 conversion.
16466 ("return_use"): New expander.
16467 ("*return"): Emit return via thunk and rename it to ...
16468 ("*return<mode>"): ... this one.
16469 * config/s390/s390.opt: Add new options and and enum for the
16470 option values.
16471
16472 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16473
16474 * lra-constraints.c (match_reload): Unconditionally use
16475 gen_lowpart_SUBREG, rather than selecting between that
16476 and equivalent gen_rtx_SUBREG code.
16477
16478 2018-02-08 Richard Biener <rguenther@suse.de>
16479
16480 PR tree-optimization/84233
16481 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16482 changed flag instead of boguously re-using phi_inserted.
16483
16484 2018-02-08 Martin Jambor <mjambor@suse.cz>
16485
16486 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16487 static local variables.
16488
16489 2018-02-08 Richard Biener <rguenther@suse.de>
16490
16491 PR tree-optimization/84278
16492 * tree-vect-stmts.c (vectorizable_store): When looking for
16493 smaller vector types to perform grouped strided loads/stores
16494 make sure the mode is supported by the target.
16495 (vectorizable_load): Likewise.
16496
16497 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16498
16499 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16500 Increase LDP/STP opportunities by adding adjacent callee-saves.
16501
16502 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16503
16504 PR rtl-optimization/84068
16505 PR rtl-optimization/83459
16506 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16507
16508 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16509
16510 PR tree-optimization/84224
16511 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16512 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16513 non-zero arguments.
16514
16515 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16516
16517 PR target/84113
16518 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16519 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16520 count, remove one USE.
16521
16522 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16523
16524 * doc/install.texi (Configuration): Document the
16525 --with-long-double-format={ibm,ieee} PowerPC configuration
16526 options.
16527
16528 PR target/84154
16529 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16530 Convert from define_expand to be define_insn_and_split. Rework
16531 float/double/_Float128 conversions to QI/HI/SImode to work with
16532 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16533 conversions to QI/HImode types did a store and then a load to
16534 truncate the value. For conversions to VSX registers, don't split
16535 the insn, instead emit the code directly. Use the code iterator
16536 any_fix to combine signed and unsigned conversions.
16537 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16538 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16539 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16540 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16541 (fix_<mode>di2_hw): Likewise.
16542 (fixuns_<mode>di2_hw): Likewise.
16543 (fix_<mode>si2_hw): Likewise.
16544 (fixuns_<mode>si2_hw): Likewise.
16545 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16546 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16547 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16548 fix<uns>_trunc<SFDF:mode>si2_p8.
16549 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16550 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16551 (fix<uns>_<mode>_mem): Likewise.
16552 (fctiw<u>z_<mode>_mem): Likewise.
16553 (fix<uns>_<mode>_mem): Likewise.
16554 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16555 the register allocator from doing a direct move to the GPRs to do
16556 a store, and instead use the ISA 3.0 store byte/half-word from
16557 vector register instruction. For IEEE 128-bit floating point,
16558 also optimize stores of 32-bit ints.
16559 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16560
16561 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16562
16563 * genextract.c (push_pathstr_operand): New function to support
16564 [a-zA-Z].
16565 (walk_rtx): Call push_pathstr_operand.
16566 (print_path): Support [a-zA-Z].
16567
16568 2018-02-07 Richard Biener <rguenther@suse.de>
16569
16570 PR tree-optimization/84037
16571 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16572 (cse_and_gimplify_to_preheader): Declare.
16573 (vect_get_place_in_interleaving_chain): Likewise.
16574 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16575 ivexpr_map.
16576 (_loop_vec_info::~_loop_vec_info): Delete it.
16577 (cse_and_gimplify_to_preheader): New function.
16578 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16579 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16580 (vectorizable_load): Likewise. For grouped stores always base
16581 the IV on the first element.
16582 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16583 condition before gimplifying.
16584
16585 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16586
16587 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16588 *DIV_EXPR and *MOD_EXPR.
16589
16590 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16591
16592 PR target/84248
16593 * config/i386/i386.c (ix86_option_override_internal): Mask out
16594 the CF_SET bit when checking -fcf-protection.
16595
16596 2018-02-07 Tom de Vries <tom@codesourcery.com>
16597
16598 PR libgomp/84217
16599 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16600 enough.
16601
16602 2018-02-07 Richard Biener <rguenther@suse.de>
16603
16604 PR tree-optimization/84204
16605 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16606 this place.
16607
16608 PR tree-optimization/84205
16609 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16610 special-case isl_ast_op_zdiv_r.
16611
16612 PR tree-optimization/84223
16613 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16614 Only add conditions from within the region.
16615 (gather_bbs::after_dom_children): Adjust.
16616
16617 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16618
16619 PR target/84209
16620 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16621 * config/avr/avr.md: Only post-reload split REG-REG moves if
16622 either register is GENERAL_REG_P.
16623
16624 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16625
16626 PR tree-optimization/84235
16627 * tree-ssa-scopedtables.c
16628 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16629 if the subtraction is performed in floating point type where NaNs are
16630 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16631 build 1. Formatting fix.
16632
16633 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16634
16635 PR target/84146
16636 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16637 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16638 and skip it regardless of bb boundaries. Use CALL_P macro,
16639 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16640 unnecessarily, formatting fix.
16641
16642 2018-02-06 Michael Collison <michael.collison@arm.com>
16643
16644 * config/arm/thumb2.md:
16645 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16646 (*thumb_mov_notscc): Ditto.
16647
16648 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16649
16650 PR target/84154
16651 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16652 unsigned_fix, not "s".
16653
16654 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16655
16656 * configure.ac (gcc_fn_eh_frame_ro): New function.
16657 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16658 correct .eh_frame permissions.
16659 * configure: Regenerate.
16660
16661 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16662
16663 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16664 irrelevant options.
16665
16666 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16667
16668 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16669 Display warning message for -mno-speculate-indirect-jumps.
16670
16671 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16672
16673 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16674 Undocumented.
16675 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16676
16677 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16678
16679 PR tree-optimization/84225
16680 * tree-eh.c (find_trapping_overflow): Only call
16681 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16682
16683 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16684
16685 PR target/84145
16686 * config/i386/i386.c: Reimplement the check of possible options
16687 -mibt/-mshstk conbination. Change error messages.
16688 * doc/invoke.texi: Fix a typo: remove extra '='.
16689
16690 2018-02-06 Marek Polacek <polacek@redhat.com>
16691
16692 PR tree-optimization/84228
16693 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16694
16695 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16696
16697 PR target/82641
16698 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16699 emitted arch directives.
16700 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16701 __ARM_FEATURE_COPROC before changing architectures.
16702
16703 2018-02-06 Richard Biener <rguenther@suse.de>
16704
16705 * config/i386/i386.c (print_reg): Fix typo.
16706 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16707
16708 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16709
16710 * configure: Regenerate.
16711
16712 2018-02-05 Martin Sebor <msebor@redhat.com>
16713
16714 PR tree-optimization/83369
16715 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16716 inlining context.
16717
16718 2018-02-05 Martin Liska <mliska@suse.cz>
16719
16720 * doc/invoke.texi: Cherry-pick upstream r323995.
16721
16722 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16723
16724 * ira.c (ira_init_register_move_cost): Adjust comment.
16725
16726 2018-02-05 Martin Liska <mliska@suse.cz>
16727
16728 PR gcov-profile/84137
16729 * doc/gcov.texi: Fix typo in documentation.
16730
16731 2018-02-05 Martin Liska <mliska@suse.cz>
16732
16733 PR gcov-profile/83879
16734 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16735 using dlopen functionality.
16736
16737 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16738
16739 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16740 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16741 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16742 _mm_maskz_range_round_ss): New intrinsics.
16743 (__builtin_ia32_rangesd128_round)
16744 (__builtin_ia32_rangess128_round): Remove.
16745 (__builtin_ia32_rangesd128_mask_round,
16746 __builtin_ia32_rangess128_mask_round): New builtins.
16747 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16748 __builtin_ia32_rangess128_round): Remove.
16749 (__builtin_ia32_rangesd128_mask_round,
16750 __builtin_ia32_rangess128_mask_round): New builtins.
16751 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16752 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16753 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16754 "<round_saeonly_constraint>")): Changed to ...
16755 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16756 "<round_saeonly_scalar_constraint>")): ... this.
16757 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16758 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16759 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16760 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16761 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16762
16763 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16764
16765 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16766 options.
16767 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16768 Remove all values except native, 8540 and 8548.
16769
16770 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16771
16772 * config/i386/i386.c (ix86_output_function_return): Pass
16773 INVALID_REGNUM, instead of -1, as invalid register number to
16774 indirect_thunk_name and output_indirect_thunk.
16775
16776 2018-02-02 Julia Koval <julia.koval@intel.com>
16777
16778 * config.gcc: Add -march=icelake.
16779 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16780 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16781 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16782 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16783 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16784 (processor_target_table): Add icelake.
16785 (ix86_option_override_internal): Handle new PTAs.
16786 (get_builtin_code_for_version): Handle icelake.
16787 (M_INTEL_COREI7_ICELAKE): New.
16788 (fold_builtin_cpu): Handle icelake.
16789 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16790 * doc/invoke.texi: Add -march=icelake.
16791
16792 2018-02-02 Julia Koval <julia.koval@intel.com>
16793
16794 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16795 to wide_int_bitmask.
16796 * wide-int-bitmask.h: New.
16797
16798 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16799
16800 PR target/84066
16801 * config/i386/i386.md: Replace Pmode with word_mode in
16802 builtin_setjmp_setup and builtin_longjmp to support x32.
16803
16804 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16805
16806 PR target/56010
16807 PR target/83743
16808 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16809 #include "opts.h".
16810 (rs6000_supported_cpu_names): New static variable.
16811 (linux_cpu_translation_table): Likewise.
16812 (elf_platform) <cpu>: Define new static variable and use it.
16813 Translate kernel AT_PLATFORM name to canonical name if needed.
16814 Error if platform name is unknown.
16815
16816 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16817
16818 PR target/84089
16819 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16820
16821 2018-02-01 Jeff Law <law@redhat.com>
16822
16823 PR target/84128
16824 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16825 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16826 the scratch if RELEASE_VIA_POP is false.
16827 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16828 If we have to save a temporary register, decrement SIZE appropriately.
16829 Pass new arguments to release_scratch_register_on_entry.
16830 (ix86_adjust_stack_and_probe): Likewise.
16831 (ix86_emit_probe_stack_range): Pass new arguments to
16832 release_scratch_register_on_entry.
16833
16834 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16835
16836 PR rtl-optimization/84157
16837 * combine.c (change_zero_ext): Use REG_P predicate in
16838 front of HARD_REGISTER_P predicate.
16839
16840 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16841
16842 * config/avr/avr.c (avr_option_override): Move disabling of
16843 -fdelete-null-pointer-checks to...
16844 * common/config/avr/avr-common.c (avr_option_optimization_table):
16845 ...here.
16846
16847 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16848
16849 PR tree-optimization/81635
16850 * tree-data-ref.c (split_constant_offset_1): For types that
16851 wrap on overflow, try to use range info to prove that wrapping
16852 cannot occur.
16853
16854 2018-02-01 Renlin Li <renlin.li@arm.com>
16855
16856 PR target/83370
16857 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16858 TAILCALL_ADDR_REGS.
16859 (aarch64_register_move_cost): Likewise.
16860 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16861 TAILCALL_ADDR_REGS.
16862 (REG_CLASS_NAMES): Likewise.
16863 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16864 TAILCALL_ADDR_REGS. Remove IP registers.
16865 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16866
16867 2018-02-01 Richard Biener <rguenther@suse.de>
16868
16869 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16870 for specifying RPO order and allow NULL for that.
16871 * domwalk.c (dom_walker::dom_walker): Likewise.
16872 (dom_walker::walk): Handle NULL RPO order.
16873 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16874 in RPO order.
16875 (rewrite_update_dom_walker): Likewise.
16876 (mark_def_dom_walker): Likewise.
16877
16878 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16879
16880 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16881 (aarch64_maybe_expand_sve_subreg_move): Declare.
16882 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16883 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16884 predicate.
16885 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16886 that are semantically a reverse operation.
16887 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16888 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16889 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16890 functions.
16891 (aarch64_can_change_mode_class): For big-endian, forbid changes
16892 between two SVE modes if they have different element sizes.
16893
16894 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16895
16896 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16897 the TImode handling for big-endian targets.
16898
16899 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16900
16901 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16902 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16903 not just bytes.
16904 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16905 Remove BSWAP handing for big-endian targets and use the form of
16906 LD1RQ appropariate for the mode.
16907
16908 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16909
16910 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16911 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16912 duplicated element.
16913
16914 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16915
16916 PR tearget/83845
16917 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16918 check for operands that need to go through aarch64_sve_reload_be.
16919
16920 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16921
16922 PR tree-optimization/81661
16923 PR tree-optimization/84117
16924 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16925 * tree-eh.c: Include gimplify.h.
16926 (find_trapping_overflow, replace_trapping_overflow,
16927 rewrite_to_non_trapping_overflow): New functions.
16928 * tree-vect-loop.c: Include tree-eh.h.
16929 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16930 * tree-data-ref.c: Include tree-eh.h.
16931 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16932
16933 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16934
16935 PR rtl-optimization/84123
16936 * combine.c (change_zero_ext): Check if hard register satisfies
16937 can_change_dest_mode before calling gen_lowpart_SUBREG.
16938
16939 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16940
16941 PR target/82444
16942 * ira.c (ira_init_register_move_cost): Remove assert.
16943
16944 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16945
16946 PR rtl-optimization/84071
16947 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16948 * doc/tm.texi: Regenerate.
16949
16950 2018-01-31 Richard Biener <rguenther@suse.de>
16951
16952 PR tree-optimization/84132
16953 * tree-data-ref.c (analyze_miv_subscript): Properly
16954 check whether evolution_function_is_affine_multivariate_p
16955 before calling gcd_of_steps_may_divide_p.
16956
16957 2018-01-31 Julia Koval <julia.koval@intel.com>
16958
16959 PR target/83618
16960 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16961 * config/i386/i386.md (rdpid_rex64) New.
16962 (rdpid): Make 32bit only.
16963
16964 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16965
16966 PR lto/84105
16967 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16968 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16969
16970 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16971
16972 Revert
16973 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16974
16975 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16976
16977 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16978
16979 PR rtl-optimization/84071
16980 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16981 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16982
16983 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16984
16985 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16986 (arc_attribute_table): Add 'aux' attribute.
16987 (arc_in_small_data_p): Consider aux like variables.
16988 (arc_is_aux_reg_p): New function.
16989 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16990 (arc_get_aux_arg): New function.
16991 (prepare_move_operands): Handle aux-register access.
16992 (arc_handle_aux_attribute): New function.
16993 * doc/extend.texi (ARC Variable attributes): Add subsection.
16994
16995 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16996
16997 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16998 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16999 (arc_attribute_table): Add 'uncached' attribute.
17000 (arc_print_operand): Print '.di' flag for uncached memory
17001 accesses.
17002 (arc_in_small_data_p): Do not consider for small data the uncached
17003 types.
17004 (arc_is_uncached_mem_p): New function.
17005 * config/arc/predicates.md (compact_store_memory_operand): Check
17006 for uncached memory accesses.
17007 (nonvol_nonimm_operand): Likewise.
17008 * doc/extend.texi (ARC Type Attribute): New subsection.
17009
17010 2018-01-31 Jakub Jelinek <jakub@redhat.com>
17011
17012 PR c/84100
17013 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17014 falign-loops=): Add Optimization flag.
17015
17016 2018-01-30 Jeff Law <law@redhat.com>
17017
17018 PR target/84064
17019 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17020 INT_REGISTERS_SAVED. Check it prior to calling
17021 get_scratch_register_on_entry.
17022 (ix86_adjust_stack_and_probe): Similarly.
17023 (ix86_emit_probe_stack_range): Similarly.
17024 (ix86_expand_prologue): Corresponding changes.
17025
17026 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17027
17028 PR target/40411
17029 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17030 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17031
17032 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
17033
17034 PR target/84112
17035 * lra-constraints.c (curr_insn_transform): Process AND in the
17036 address.
17037
17038 2018-01-30 Jakub Jelinek <jakub@redhat.com>
17039
17040 PR rtl-optimization/83986
17041 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17042 dependence against last_pending_memory_flush in addition to
17043 pending_jump_insns.
17044
17045 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
17046
17047 PR tree-optimization/81611
17048 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17049 copies.
17050
17051 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17052
17053 PR target/83758
17054 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17055 a reg rtx.
17056
17057 2018-01-30 Richard Biener <rguenther@suse.de>
17058 Jakub Jelinek <jakub@redhat.com>
17059
17060 PR tree-optimization/84111
17061 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17062 inner loops added during recursion, as they don't have up-to-date
17063 SSA form.
17064
17065 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17066
17067 PR ipa/81360
17068 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17069 (can_inline_edge_by_limits_p): ... here.
17070 (can_early_inline_edge_p, check_callers,
17071 update_caller_keys, update_callee_keys, recursive_inlining,
17072 add_new_edges_to_heap, speculation_useful_p,
17073 inline_small_functions,
17074 inline_small_functions, flatten_function,
17075 inline_to_all_callers_1): Update.
17076
17077 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17078
17079 * profile-count.c (profile_count::combine_with_ipa_count): Handle
17080 zeros correctly.
17081
17082 2018-01-30 Richard Biener <rguenther@suse.de>
17083
17084 PR tree-optimization/83008
17085 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17086 invariant and constant vector uses in stmts when they need
17087 more than one stmt.
17088
17089 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17090
17091 PR bootstrap/84017
17092 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17093 * configure: Regenerate.
17094
17095 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17096
17097 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17098 pattern.
17099 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17100 Use gen_rtx_REG rather than gen_lowpart.
17101
17102 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17103
17104 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17105 rather than 0 when creating partial subregs.
17106
17107 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17108
17109 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17110 of usage.
17111
17112 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
17113
17114 PR target/81550
17115 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17116 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17117 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17118 flags. This restores the settings used before the 2017-07-24.
17119 Turning off pre increment/decrement/modify allows IVOPTS to
17120 optimize DF/SF loops where the index is an int.
17121
17122 2018-01-29 Richard Biener <rguenther@suse.de>
17123 Kelvin Nilsen <kelvin@gcc.gnu.org>
17124
17125 PR bootstrap/80867
17126 * tree-vect-stmts.c (vectorizable_call): Don't call
17127 targetm.vectorize_builtin_md_vectorized_function if callee is
17128 NULL.
17129
17130 2018-01-22 Carl Love <cel@us.ibm.com>
17131
17132 * doc/extend.tex: Fix typo in second arg in
17133 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17134
17135 2018-01-29 Richard Biener <rguenther@suse.de>
17136
17137 PR tree-optimization/84086
17138 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17139 (flush_ssaname_freelist): When SSA names were released reset
17140 the SCEV hash table.
17141
17142 2018-01-29 Richard Biener <rguenther@suse.de>
17143
17144 PR tree-optimization/84057
17145 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17146 removed paths when removing edges.
17147
17148 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
17149
17150 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17151 -mfunction-return=@var{choice}.
17152
17153 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
17154
17155 PR diagnostic/84034
17156 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17157 Handle CR like TAB.
17158 (layout::print_source_line): Likewise.
17159 (test_get_line_width_without_trailing_whitespace): Add test cases.
17160
17161 2018-01-27 Jakub Jelinek <jakub@redhat.com>
17162
17163 PR middle-end/84040
17164 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17165 debug insns.
17166
17167 2018-01-26 Jim Wilson <jimw@sifive.com>
17168
17169 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17170
17171 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17172 specified.
17173
17174 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17175
17176 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17177 and CMP + SUB-immediate -> SUBS.
17178
17179 2018-01-26 Martin Sebor <msebor@redhat.com>
17180
17181 PR tree-optimization/83896
17182 * tree-ssa-strlen.c (get_string_len): Rename...
17183 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
17184 Avoid assuming length is constant.
17185 (handle_char_store): Use HOST_WIDE_INT for string length.
17186
17187 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
17188
17189 PR target/81763
17190 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17191 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17192
17193 2018-01-26 Richard Biener <rguenther@suse.de>
17194
17195 PR rtl-optimization/84003
17196 * dse.c (record_store): Only record redundant stores when
17197 the earlier store aliases at least all accesses the later one does.
17198
17199 2018-01-26 Jakub Jelinek <jakub@redhat.com>
17200
17201 PR rtl-optimization/83985
17202 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17203 REG_CFA_RESTORE insns.
17204 (delete_unmarked_insns): Don't ignore separate shrink wrapping
17205 REG_CFA_RESTORE insns here.
17206
17207 PR c/83989
17208 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17209 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17210
17211 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17212
17213 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17214 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17215 (arc_init): Likewise.
17216 (arc_override_options): Likewise.
17217 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17218 value.
17219 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17220 support.
17221 * config/arc/arc.h (TARGET_DBNZ): Define.
17222 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17223 properly set the tune attribute.
17224 (dbnz): Use TARGET_DBNZ guard.
17225 * config/arc/arc.opt (mtune): Add core3 option.
17226
17227 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17228
17229 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17230 recognize new pic like addresses.
17231 (arc_delegitimize_address): Clean up.
17232
17233 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17234
17235 * config/arc/arc-arches.def: Option mrf16 valid for all
17236 architectures.
17237 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17238 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17239 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17240 * config/arc/arc-tables.opt: Regenerate.
17241 * config/arc/arc.c (arc_conditional_register_usage): Handle
17242 reduced register file case.
17243 (arc_file_start): Set must have build attributes.
17244 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17245 mrf16 option value.
17246 * config/arc/arc.opt (mrf16): Add new option.
17247 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17248 * config/arc/genmultilib.awk: Handle new mrf16 option.
17249 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17250 * config/arc/t-multilib: Regenerate.
17251 * doc/invoke.texi (ARC Options): Document mrf16 option.
17252
17253 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17254
17255 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17256 * config/arc/arc.c (arc_handle_secure_attribute): New function.
17257 (arc_attribute_table): Add 'secure_call' attribute.
17258 (arc_print_operand): Print secure call operand.
17259 (arc_function_ok_for_sibcall): Don't optimize tail calls when
17260 secure.
17261 (arc_is_secure_call_p): New function. * config/arc/arc.md
17262 (call_i): Add support for sjli instruction.
17263 (call_value_i): Likewise.
17264 * config/arc/constraints.md (Csc): New constraint.
17265
17266 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17267 John Eric Martin <John.Martin@emmicro-us.com>
17268
17269 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17270 * config/arc/arc.c (_arc_jli_section): New struct.
17271 (arc_jli_section): New type.
17272 (rc_jli_sections): New static variable.
17273 (arc_handle_jli_attribute): New function.
17274 (arc_attribute_table): Add jli_always and jli_fixed attribute.
17275 (arc_file_end): New function.
17276 (TARGET_ASM_FILE_END): Define.
17277 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17278 (arc_add_jli_section): New function.
17279 (jli_call_scan): Likewise.
17280 (arc_reorg): Call jli_call_scan.
17281 (arc_output_addsi): Remove 'S' from printing asm operand.
17282 (arc_is_jli_call_p): New function.
17283 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17284 operand.
17285 (movhi_insn): Likewise.
17286 (movsi_insn): Likewise.
17287 (movsi_set_cc_insn): Likewise.
17288 (loadqi_update): Likewise.
17289 (load_zeroextendqisi_update): Likewise.
17290 (load_signextendqisi_update): Likewise.
17291 (loadhi_update): Likewise.
17292 (load_zeroextendhisi_update): Likewise.
17293 (load_signextendhisi_update): Likewise.
17294 (loadsi_update): Likewise.
17295 (loadsf_update): Likewise.
17296 (movsicc_insn): Likewise.
17297 (bset_insn): Likewise.
17298 (bxor_insn): Likewise.
17299 (bclr_insn): Likewise.
17300 (bmsk_insn): Likewise.
17301 (bicsi3_insn): Likewise.
17302 (cmpsi_cc_c_insn): Likewise.
17303 (movsi_ne): Likewise.
17304 (movsi_cond_exec): Likewise.
17305 (clrsbsi2): Likewise.
17306 (norm_f): Likewise.
17307 (normw): Likewise.
17308 (swap): Likewise.
17309 (divaw): Likewise.
17310 (flag): Likewise.
17311 (sr): Likewise.
17312 (kflag): Likewise.
17313 (ffs): Likewise.
17314 (ffs_f): Likewise.
17315 (fls): Likewise.
17316 (call_i): Remove 'S' asm letter, add jli instruction.
17317 (call_value_i): Likewise.
17318 * config/arc/arc.op (mjli-always): New option.
17319 * config/arc/constraints.md (Cji): New constraint.
17320 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17321 operand.
17322 (subsf3_fpx): Likewise.
17323 (mulsf3_fpx): Likewise.
17324 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17325 asm operand.
17326 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17327 function attrbutes.
17328 * doc/invoke.texi (ARC): Document mjli-always option.
17329
17330 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
17331
17332 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17333 avoid addition with 0 and use incw and decw where possible.
17334
17335 2018-01-26 Richard Biener <rguenther@suse.de>
17336
17337 PR tree-optimization/81082
17338 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17339 association if it requires casting to unsigned.
17340 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17341 from fold_plusminus_mult_expr to catch important cases late when
17342 range info is available.
17343
17344 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17345
17346 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17347 * configure.ac (hidden_linkonce): New test.
17348 * configure: Regenerate.
17349 * config.in: Regenerate.
17350
17351 2018-01-26 Julia Koval <julia.koval@intel.com>
17352
17353 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17354 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17355 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17356 _mm_mask_bitshuffle_epi64_mask): Fix type.
17357 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17358 USI_FTYPE_V4DI_V4DI_USI): Remove.
17359 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17360 __builtin_ia32_vpshufbitqmb256_mask,
17361 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17362 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17363 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17364
17365 2018-01-26 Alan Modra <amodra@gmail.com>
17366
17367 PR target/84033
17368 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17369 UNSPEC_VBPERMQ. Sort other unspecs.
17370
17371 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
17372
17373 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17374
17375 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
17376
17377 PR middle-end/83055
17378 * predict.c (drop_profile): Do not push/pop cfun; update also
17379 node->count.
17380 (handle_missing_profiles): Fix logic looking for zero profiles.
17381
17382 2018-01-25 Jakub Jelinek <jakub@redhat.com>
17383
17384 PR middle-end/83977
17385 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17386 on functions with #pragma omp declare simd or functions with simd
17387 attribute.
17388 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17389 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17390 Remove trailing \n from warning_at calls.
17391
17392 2018-01-25 Tom de Vries <tom@codesourcery.com>
17393
17394 PR target/84028
17395 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17396 for neutered workers.
17397
17398 2018-01-24 Joseph Myers <joseph@codesourcery.com>
17399
17400 PR target/68467
17401 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17402 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17403
17404 2018-01-24 Jeff Law <law@redhat.com>
17405
17406 PR target/83994
17407 * i386.c (get_probe_interval): Move to earlier point.
17408 (ix86_compute_frame_layout): If -fstack-clash-protection and
17409 the frame is larger than the probe interval, then use pushes
17410 to save registers rather than reg->mem moves.
17411 (ix86_expand_prologue): Remove conditional for int_registers_saved
17412 assertion.
17413
17414 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17415
17416 PR target/84014
17417 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17418 min/max for never referenced object.
17419
17420 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17421
17422 PR middle-end/83977
17423 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17424 here.
17425 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17426 attributes from DECL_ATTRIBUTES (decl) without affecting
17427 DECL_ATTRIBUTES (current_function_decl).
17428 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17429 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17430
17431 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17432
17433 PR tree-optimization/83979
17434 * fold-const.c (fold_comparison): Use constant_boolean_node
17435 instead of boolean_{true,false}_node.
17436
17437 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17438
17439 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17440 with zero counts.
17441
17442 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17443
17444 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17445 Simplify the clause that sets the length attribute.
17446 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17447 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17448 clause that sets the length attribute.
17449 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17450
17451 2018-01-24 Tom de Vries <tom@codesourcery.com>
17452
17453 PR target/83589
17454 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17455 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17456 Add strict parameter.
17457 (prevent_branch_around_nothing): Insert dummy insn between branch to
17458 label and label with no ptx insn inbetween.
17459 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17460
17461 2018-01-24 Tom de Vries <tom@codesourcery.com>
17462
17463 PR target/81352
17464 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17465 for neutered threads in warp.
17466 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17467
17468 2018-01-24 Richard Biener <rguenther@suse.de>
17469
17470 PR tree-optimization/83176
17471 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17472 operands.
17473
17474 2018-01-24 Richard Biener <rguenther@suse.de>
17475
17476 PR tree-optimization/82819
17477 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17478 code generating pluses that are no-ops in the target precision.
17479
17480 2018-01-24 Richard Biener <rguenther@suse.de>
17481
17482 PR middle-end/84000
17483 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17484
17485 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17486
17487 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17488 to merge probabilities.
17489 * predict.c (probably_never_executed): Also mark as cold functions
17490 with global 0 profile and guessed local profile.
17491 * profile-count.c (profile_probability::combine_with_count): New
17492 member function.
17493 * profile-count.h (profile_probability::operator*,
17494 profile_probability::operator*=, profile_probability::operator/,
17495 profile_probability::operator/=): Reduce precision to adjusted
17496 and set value to guessed on contradictory divisions.
17497 (profile_probability::combine_with_freq): Remove.
17498 (profile_probability::combine_wiht_count): Declare.
17499 (profile_count::force_nonzero):: Set to adjusted.
17500 (profile_count::probability_in):: Set quality to adjusted.
17501 * tree-ssa-tail-merge.c (replace_block_by): Use
17502 combine_with_count.
17503
17504 2018-01-23 Andrew Waterman <andrew@sifive.com>
17505 Jim Wilson <jimw@sifive.com>
17506
17507 * config/riscv/riscv.c (riscv_stack_boundary): New.
17508 (riscv_option_override): Set riscv_stack_boundary. Handle
17509 riscv_preferred_stack_boundary_arg.
17510 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17511 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17512 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17513 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17514 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17515 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17516
17517 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17518
17519 PR target/83905
17520 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17521 of struct ix86_frame.
17522 (ix86_expand_epilogue): Likewise. Add a local variable for
17523 the reg_save_offset field in struct ix86_frame.
17524
17525 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17526
17527 PR tree-optimization/82604
17528 * tree-loop-distribution.c (enum partition_kind): New enum item
17529 PKIND_PARTIAL_MEMSET.
17530 (partition_builtin_p): Support above new enum item.
17531 (generate_code_for_partition): Ditto.
17532 (compute_access_range): Differentiate cases that equality can be
17533 proven at all loops, the innermost loops or no loops.
17534 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17535 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17536 (finalize_partitions, distribute_loop): Don't fuse partition of
17537 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17538 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17539 parloop is enabled.
17540
17541 2018-01-23 Martin Liska <mliska@suse.cz>
17542
17543 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17544 order to ignore the predictor.
17545 (PRED_POLYMORPHIC_CALL): Likewise.
17546 (PRED_RECURSIVE_CALL): Likewise.
17547
17548 2018-01-23 Martin Liska <mliska@suse.cz>
17549
17550 * tree-profile.c (tree_profiling): Print function header to
17551 aware reader which function we are working on.
17552 * value-prof.c (gimple_find_values_to_profile): Do not print
17553 not interesting value histograms.
17554
17555 2018-01-23 Martin Liska <mliska@suse.cz>
17556
17557 * profile-count.h (enum profile_quality): Add
17558 profile_uninitialized as the first value. Do not number values
17559 as they are zero based.
17560 (profile_count::verify): Update sanity check.
17561 (profile_probability::verify): Likewise.
17562
17563 2018-01-23 Nathan Sidwell <nathan@acm.org>
17564
17565 * doc/invoke.texi (ffor-scope): Deprecate.
17566
17567 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17568
17569 PR tree-optimization/83510
17570 * domwalk.c (set_all_edges_as_executable): New function.
17571 (dom_walker::dom_walker): Convert bool param
17572 "skip_unreachable_blocks" to enum reachability. Move setup of
17573 edge flags to set_all_edges_as_executable and only do it when
17574 reachability is REACHABLE_BLOCKS.
17575 * domwalk.h (enum dom_walker::reachability): New enum.
17576 (dom_walker::dom_walker): Convert bool param
17577 "skip_unreachable_blocks" to enum reachability.
17578 (set_all_edges_as_executable): New decl.
17579 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17580 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17581 "reachability".
17582 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17583 but converting true to REACHABLE_BLOCKS.
17584 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17585 * tree-vrp.c
17586 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17587 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17588 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17589 REACHABLE_BLOCKS.
17590 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17591 if check_all_array_refs will be called.
17592
17593 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17594
17595 * tree.c (selftest::test_location_wrappers): Add more test
17596 coverage.
17597
17598 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17599
17600 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17601 (selftest::test_bit_in_range): Likewise.
17602
17603 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17604
17605 PR testsuite/83888
17606 * doc/sourcebuild.texi (vect_float): Say that the selector
17607 only describes the situation when -funsafe-math-optimizations is on.
17608 (vect_float_strict): Document.
17609
17610 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17611
17612 PR tree-optimization/83965
17613 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17614 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17615 instead of checking only for a reduction.
17616 (vect_recog_widen_sum_pattern): Likewise.
17617
17618 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17619
17620 * predict.c (probably_never_executed): Only use precise profile info.
17621 (compute_function_frequency): Skip after inlining hack since we now
17622 have quality checking.
17623
17624 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17625
17626 * profile-count.h (profile_probability::very_unlikely,
17627 profile_probability::unlikely, profile_probability::even): Set
17628 precision to guessed.
17629
17630 2018-01-23 Richard Biener <rguenther@suse.de>
17631
17632 PR tree-optimization/83963
17633 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17634 Properly terminate dominator walk when crossing the exit edge not
17635 when visiting its source block.
17636
17637 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17638
17639 PR c++/83918
17640 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17641 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17642
17643 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17644
17645 PR tree-optimization/83957
17646 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17647 semicolon after for body surrounded by braces.
17648
17649 PR tree-optimization/83081
17650 * profile-count.h (profile_probability::split): New method.
17651 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17652 Use profile_probability::split.
17653 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17654 when splitting a single conditional jump into 2.
17655
17656 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17657
17658 PR tree-optimization/69452
17659 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17660 decl.
17661
17662 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17663
17664 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17665 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17666 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17667
17668 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17669
17670 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17671 declaration.
17672 * config/rl78/rl78.md (movdi): New define_expand.
17673 * config/rl78/rl78.c (rl78_split_movdi): New function.
17674
17675 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17676
17677 PR target/83862
17678 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17679 no longer used.
17680 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17681 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17682 128-bit to produce an UNSPEC move to get the double word with the
17683 signbit and then a shift directly to do signbit.
17684 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17685 implementation with a new version that just does either a direct
17686 move or a regular move. Move memory interface to separate insns.
17687 Move insns so they are next to the expander.
17688 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17689 with signbit move. Split big and little endian case.
17690 (signbit<mode>2_dm_mem_le): Likewise.
17691 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17692 (signbit<mode>2_dm2): Likewise.
17693
17694 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17695
17696 * config/rl78/rl78.md (anddi3): New define_expand.
17697
17698 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17699
17700 * config/rl78/rl78.md (umindi3): New define_expand.
17701
17702 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17703
17704 * config/rl78/rl78.md (smindi3): New define_expand.
17705
17706 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17707
17708 * config/rl78/rl78.md (smaxdi3): New define_expand.
17709
17710 2018-01-22 Carl Love <cel@us.ibm.com>
17711
17712 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17713 LVX_V1TI): Add macro expansion.
17714 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17715 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17716 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17717 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17718 Change check to determine if the instruction is a byte reversing
17719 entry. Fix typo in comment.
17720 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17721 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17722 Add def_builtin calls for new builtins.
17723 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17724 Add define_insn expansion.
17725
17726 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17727
17728 * config/rl78/rl78.md (umaxdi3): New define_expand.
17729
17730 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17731
17732 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17733 for non-QImode registers.
17734
17735 2018-01-22 Richard Biener <rguenther@suse.de>
17736
17737 PR tree-optimization/83963
17738 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17739 including the loop exit block.
17740 (scop_detection::merge_sese): Likewise.
17741 (scop_detection::add_scop): Do it here instead.
17742
17743 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17744
17745 * doc/sourcebuild.texi (arm_softfloat): Document.
17746
17747 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17748
17749 PR gcc/77734
17750 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17751 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17752 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17753
17754 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17755 David Edelsohn <dje.gcc@gmail.com>
17756
17757 PR target/83946
17758 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17759 Change "crset eq" to "crset 2".
17760 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17761 (*call_indirect_aix<mode>_nospec): Likewise.
17762 (*call_value_indirect_aix<mode>_nospec): Likewise.
17763 (*call_indirect_elfv2<mode>_nospec): Likewise.
17764 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17765 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17766 change assembly output from . to $.
17767 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17768 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17769 (*tablejump<mode>_internal1_nospec): Likewise.
17770
17771 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17772
17773 PR target/80870
17774 * config/sh/sh_optimize_sett_clrt.cc:
17775 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17776
17777 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17778
17779 PR tree-optimization/83940
17780 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17781 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17782 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17783 use it to pass back the definition type.
17784 (vect_check_store_rhs): Likewise rhs_dt_out.
17785 (vect_build_gather_load_calls): Add a mask_dt argument and use
17786 it instead of a call to vect_is_simple_use.
17787 (vectorizable_store): Update calls to vect_check_load_store_mask
17788 and vect_check_store_rhs. Use the dt returned by the latter instead
17789 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17790 instead of calls to vect_is_simple_use. Pass the scalar rather
17791 than the vector operand to vect_is_simple_use when handling
17792 second and subsequent copies of an rhs value.
17793 (vectorizable_load): Update calls to vect_check_load_store_mask
17794 and vect_build_gather_load_calls. Use the cached mask_dt and
17795 gs_info.offset_dt instead of calls to vect_is_simple_use.
17796
17797 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17798
17799 PR middle-end/83945
17800 * tree-emutls.c: Include gimplify.h.
17801 (lower_emutls_2): New function.
17802 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17803 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17804 it before further processing.
17805
17806 PR target/83930
17807 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17808 UINTVAL (trueop1) instead of INTVAL (op1).
17809
17810 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17811
17812 PR debug/81570
17813 PR debug/83728
17814 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17815 INCOMING_FRAME_SP_OFFSET if not defined.
17816 (scan_trace): Add ENTRY argument. If true and
17817 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17818 emit a note to adjust the CFA offset.
17819 (create_cfi_notes): Adjust scan_trace callers.
17820 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17821 INCOMING_FRAME_SP_OFFSET in the CIE.
17822 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17823 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17824 Likewise.
17825 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17826 * doc/tm.texi: Regenerated.
17827
17828 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17829
17830 PR rtl-optimization/83147
17831 * lra-constraints.c (remove_inheritance_pseudos): Use
17832 lra_substitute_pseudo_within_insn.
17833
17834 2018-01-19 Tom de Vries <tom@codesourcery.com>
17835 Cesar Philippidis <cesar@codesourcery.com>
17836
17837 PR target/83920
17838 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17839
17840 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17841
17842 PR target/83790
17843 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17844 spaces for function labels.
17845
17846 2018-01-19 Martin Liska <mliska@suse.cz>
17847
17848 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17849 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17850 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17851 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17852 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17853 (PRED_CONST_RETURN): Change from 69 to 65.
17854 (PRED_NULL_RETURN): Change from 91 to 71.
17855 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17856 (PRED_LOOP_GUARD): Change from 66 to 73.
17857
17858 2018-01-19 Martin Liska <mliska@suse.cz>
17859
17860 * predict.c (predict_insn_def): Add new assert.
17861 (struct branch_predictor): Change type to signed integer.
17862 (test_prediction_value_range): Amend test to cover
17863 PROB_UNINITIALIZED.
17864 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17865 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17866 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17867 (PRED_LOOP_IV_COMPARE): Likewise.
17868 * predict.h (PROB_UNINITIALIZED): Define new constant.
17869
17870 2018-01-19 Martin Liska <mliska@suse.cz>
17871
17872 * predict.c (dump_prediction): Add new format for
17873 analyze_brprob.py script which is enabled with -details
17874 suboption.
17875 * profile-count.h (precise_p): New function.
17876
17877 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17878
17879 PR tree-optimization/83922
17880 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17881 there are no statements that need masking.
17882 (vect_active_double_reduction_p): New function.
17883 (vect_analyze_loop_operations): Use it when handling phis that
17884 are not in the loop header.
17885
17886 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17887
17888 PR tree-optimization/83914
17889 * tree-vect-loop.c (vectorizable_induction): Don't convert
17890 init_expr or apply the peeling adjustment for inductions
17891 that are nested within the vectorized loop.
17892
17893 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17894
17895 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17896 instead of NEG.
17897
17898 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17899
17900 PR sanitizer/81715
17901 PR testsuite/83882
17902 * function.h (gimplify_parameters): Add gimple_seq * argument.
17903 * function.c: Include gimple.h and options.h.
17904 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17905 for the added local temporaries if needed.
17906 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17907 if there are any parameter cleanups, wrap whole body into a
17908 try/finally with the cleanups.
17909
17910 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17911
17912 PR target/82964
17913 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17914 Use GET_MODE_CLASS for scalar floating point.
17915
17916 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17917
17918 PR ipa/82256
17919 patch by PaX Team
17920 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17921 Fix call of call_cgraph_insertion_hooks.
17922
17923 2018-01-18 Martin Sebor <msebor@redhat.com>
17924
17925 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17926
17927 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17928
17929 PR ipa/83619
17930 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17931 frequencies.
17932
17933 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17934
17935 PR other/70268
17936 * common.opt: (-ffile-prefix-map): New option.
17937 * opts.c (common_handle_option): Defer it.
17938 * opts-global.c (handle_common_deferred_options): Handle it.
17939 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17940 * file-prefix-map.h: New file.
17941 (remap_debug_filename, add_debug_prefix_map): ...here.
17942 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17943 * final.c (debug_prefix_map, add_debug_prefix_map
17944 remap_debug_filename): Move to...
17945 * file-prefix-map.c: New file.
17946 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17947 generalize, get rid of alloca(), use strrchr() instead of strchr().
17948 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17949 Implement in terms of add_prefix_map().
17950 (remap_macro_filename, remap_debug_filename): Implement in term of
17951 remap_filename().
17952 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17953 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17954 * dbxout.c: Include file-prefix-map.h.
17955 * varasm.c: Likewise.
17956 * vmsdbgout.c: Likewise.
17957 * xcoffout.c: Likewise.
17958 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17959 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17960 * doc/invoke.texi (-ffile-prefix-map): Document.
17961 (-fdebug-prefix-map): Update description.
17962
17963 2018-01-18 Martin Liska <mliska@suse.cz>
17964
17965 * config/i386/i386.c (indirect_thunk_name): Document that also
17966 lfence is emitted.
17967 (output_indirect_thunk): Document why both instructions
17968 (pause and lfence) are generated.
17969
17970 2018-01-18 Richard Biener <rguenther@suse.de>
17971
17972 PR tree-optimization/83887
17973 * graphite-scop-detection.c
17974 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17975 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17976 (scop_detection::merge_sese): Re-implement with a flood-fill
17977 algorithm that properly finds a SESE region if it exists.
17978
17979 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17980
17981 PR c/61240
17982 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17983 pointer_diff optimizations use view_convert instead of convert.
17984
17985 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17986
17987 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17988 Generate different code for -mno-speculate-indirect-jumps.
17989 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17990 (*call_indirect_aix<mode>): Disable for
17991 -mno-speculate-indirect-jumps.
17992 (*call_indirect_aix<mode>_nospec): New define_insn.
17993 (*call_value_indirect_aix<mode>): Disable for
17994 -mno-speculate-indirect-jumps.
17995 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17996 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17997 -mno-speculate-indirect-jumps.
17998 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17999
18000 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18001
18002 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18003 long double type, set the flags for noting the default long double
18004 type, even if we don't pass or return a long double type.
18005
18006 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
18007
18008 PR ipa/83051
18009 * ipa-inline.c (flatten_function): Do not overwrite final inlining
18010 failure.
18011
18012 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
18013
18014 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18015 support for merge[hl].
18016 (fold_mergehl_helper): New helper function.
18017 (tree-vector-builder.h): New #include for tree_vector_builder usage.
18018 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18019 (altivec_vmrglw_direct): Add xxmrglw insn.
18020
18021 2018-01-17 Andrew Waterman <andrew@sifive.com>
18022
18023 * config/riscv/riscv.c (riscv_conditional_register_usage): If
18024 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18025
18026 2018-01-17 David Malcolm <dmalcolm@redhat.com>
18027
18028 PR lto/83121
18029 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18030 call the lto_location_cache before reading the
18031 DECL_SOURCE_LOCATION of the types.
18032
18033 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
18034 Richard Sandiford <richard.sandiford@linaro.org>
18035
18036 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18037 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18038 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18039 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18040 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18041 Add declaration.
18042 * config/aarch64/constraints.md (aarch64_movti_operand):
18043 Limit immediates.
18044 * config/aarch64/predicates.md (Uti): Add new constraint.
18045
18046 2018-01-17 Carl Love <cel@us.ibm.com>
18047
18048 * config/rs6000/vsx.md (define_expand xl_len_r,
18049 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18050 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18051 lxvll.
18052 (define_expand, define_insn): Move the shift left from the
18053 define_insn to the define_expand for lxvl and stxvl instructions.
18054 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18055 and XL_LEN_R definitions to PURE.
18056
18057 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
18058
18059 * config/i386/i386.c (indirect_thunk_name): Declare regno
18060 as unsigned int. Compare regno with INVALID_REGNUM.
18061 (output_indirect_thunk): Ditto.
18062 (output_indirect_thunk_function): Ditto.
18063 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
18064 in the call to output_indirect_thunk_function.
18065
18066 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
18067
18068 PR middle-end/83884
18069 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18070 rather than the size of inner_type to determine the stack slot size
18071 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18072
18073 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
18074
18075 PR target/83546
18076 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18077 to PTA_SILVERMONT.
18078
18079 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
18080
18081 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18082 endian Linux systems to optionally enable multilibs for selecting
18083 the long double type if the user configured an explicit type.
18084 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18085 have no long double multilibs if not defined.
18086 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18087 warn if the user used -mabi={ieee,ibm}longdouble and we built
18088 multilibs for long double.
18089 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18090 appropriate multilib option.
18091 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18092 multilib options.
18093 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18094 for building long double multilibs.
18095 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18096
18097 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
18098
18099 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18100 copies.
18101
18102 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18103 64 bits.
18104 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18105 128 bits.
18106
18107 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18108 variables.
18109
18110 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18111 return value.
18112
18113 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
18114
18115 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18116 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18117
18118 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
18119
18120 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18121 different rtl trees depending on TARGET_64BIT.
18122 (rs6000_gen_lvx): Likewise.
18123
18124 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
18125
18126 * config/visium/visium.md (nop): Tweak comment.
18127 (hazard_nop): Likewise.
18128
18129 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18130
18131 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18132 -mspeculate-indirect-jumps.
18133 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18134 for -mno-speculate-indirect-jumps.
18135 (*call_indirect_elfv2<mode>_nospec): New define_insn.
18136 (*call_value_indirect_elfv2<mode>): Disable for
18137 -mno-speculate-indirect-jumps.
18138 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18139 (indirect_jump): Emit different RTL for
18140 -mno-speculate-indirect-jumps.
18141 (*indirect_jump<mode>): Disable for
18142 -mno-speculate-indirect-jumps.
18143 (*indirect_jump<mode>_nospec): New define_insn.
18144 (tablejump): Emit different RTL for
18145 -mno-speculate-indirect-jumps.
18146 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18147 (tablejumpsi_nospec): New define_expand.
18148 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18149 (tablejumpdi_nospec): New define_expand.
18150 (*tablejump<mode>_internal1): Disable for
18151 -mno-speculate-indirect-jumps.
18152 (*tablejump<mode>_internal1_nospec): New define_insn.
18153 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18154 option.
18155
18156 2018-01-16 Artyom Skrobov tyomitch@gmail.com
18157
18158 * caller-save.c (insert_save): Drop unnecessary parameter. All
18159 callers updated.
18160
18161 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18162 Richard Biener <rguenth@suse.de>
18163
18164 PR libgomp/83590
18165 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18166 return early, inline manually is_gimple_sizepos. Make sure if we
18167 call gimplify_expr we don't end up with a gimple constant.
18168 * tree.c (variably_modified_type_p): Don't return true for
18169 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
18170 * gimplify.h (is_gimple_sizepos): Remove.
18171
18172 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18173
18174 PR tree-optimization/83857
18175 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18176 vectorizable_live_operation for pure SLP statements.
18177 (vectorizable_live_operation): Handle PHIs.
18178
18179 2018-01-16 Richard Biener <rguenther@suse.de>
18180
18181 PR tree-optimization/83867
18182 * tree-vect-stmts.c (vect_transform_stmt): Precompute
18183 nested_in_vect_loop_p since the scalar stmt may get invalidated.
18184
18185 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18186
18187 PR c/83844
18188 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18189 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18190 If off is not INTEGER_CST, issue a may not be aligned warning
18191 rather than isn't aligned. Use isn%'t rather than isn't.
18192 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18193 into MULT_EXPR.
18194 <case MULT_EXPR>: Improve the case when bottom and one of the
18195 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18196 operand, in that case check if the other operand is multiple of
18197 bottom divided by the INTEGER_CST operand.
18198
18199 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18200
18201 PR target/83858
18202 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18203 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18204 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18205 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18206 * config/pa/pa.c (pa_function_arg_advance): Likewise.
18207 (pa_function_arg, pa_arg_partial_bytes): Likewise.
18208 (pa_function_arg_size): New function.
18209
18210 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18211
18212 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18213 in a separate statement.
18214
18215 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18216
18217 PR tree-optimization/83847
18218 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18219 group gathers and scatters.
18220
18221 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18222
18223 PR rtl-optimization/86620
18224 * params.def (max-sched-ready-insns): Bump minimum value to 1.
18225
18226 PR rtl-optimization/83213
18227 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18228 to last if both are JUMP_INSNs.
18229
18230 PR tree-optimization/83843
18231 * gimple-ssa-store-merging.c
18232 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18233 store_immediate_info for bswap/nop orig_stores.
18234
18235 2018-01-15 Andrew Waterman <andrew@sifive.com>
18236
18237 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18238 !TARGET_MUL.
18239 <UDIV>: Increase cost if !TARGET_DIV.
18240
18241 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
18242
18243 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18244 (define_attr "cr_logical_3op"): New.
18245 (cceq_ior_compare): Adjust.
18246 (cceq_ior_compare_complement): Adjust.
18247 (*cceq_rev_compare): Adjust.
18248 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18249 (is_cracked_insn): Adjust.
18250 (insn_must_be_first_in_group): Adjust.
18251 * config/rs6000/40x.md: Adjust.
18252 * config/rs6000/440.md: Adjust.
18253 * config/rs6000/476.md: Adjust.
18254 * config/rs6000/601.md: Adjust.
18255 * config/rs6000/603.md: Adjust.
18256 * config/rs6000/6xx.md: Adjust.
18257 * config/rs6000/7450.md: Adjust.
18258 * config/rs6000/7xx.md: Adjust.
18259 * config/rs6000/8540.md: Adjust.
18260 * config/rs6000/cell.md: Adjust.
18261 * config/rs6000/e300c2c3.md: Adjust.
18262 * config/rs6000/e500mc.md: Adjust.
18263 * config/rs6000/e500mc64.md: Adjust.
18264 * config/rs6000/e5500.md: Adjust.
18265 * config/rs6000/e6500.md: Adjust.
18266 * config/rs6000/mpc.md: Adjust.
18267 * config/rs6000/power4.md: Adjust.
18268 * config/rs6000/power5.md: Adjust.
18269 * config/rs6000/power6.md: Adjust.
18270 * config/rs6000/power7.md: Adjust.
18271 * config/rs6000/power8.md: Adjust.
18272 * config/rs6000/power9.md: Adjust.
18273 * config/rs6000/rs64.md: Adjust.
18274 * config/rs6000/titan.md: Adjust.
18275
18276 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18277
18278 * config/i386/predicates.md (indirect_branch_operand): Rewrite
18279 ix86_indirect_branch_register logic.
18280
18281 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18282
18283 * config/i386/constraints.md (Bs): Update
18284 ix86_indirect_branch_register check. Don't check
18285 ix86_indirect_branch_register with GOT_memory_operand.
18286 (Bw): Likewise.
18287 * config/i386/predicates.md (GOT_memory_operand): Don't check
18288 ix86_indirect_branch_register here.
18289 (GOT32_symbol_operand): Likewise.
18290
18291 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18292
18293 * config/i386/predicates.md (constant_call_address_operand):
18294 Rewrite ix86_indirect_branch_register logic.
18295 (sibcall_insn_operand): Likewise.
18296
18297 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18298
18299 * config/i386/constraints.md (Bs): Replace
18300 ix86_indirect_branch_thunk_register with
18301 ix86_indirect_branch_register.
18302 (Bw): Likewise.
18303 * config/i386/i386.md (indirect_jump): Likewise.
18304 (tablejump): Likewise.
18305 (*sibcall_memory): Likewise.
18306 (*sibcall_value_memory): Likewise.
18307 Peepholes of indirect call and jump via memory: Likewise.
18308 * config/i386/i386.opt: Likewise.
18309 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18310 (GOT_memory_operand): Likewise.
18311 (call_insn_operand): Likewise.
18312 (sibcall_insn_operand): Likewise.
18313 (GOT32_symbol_operand): Likewise.
18314
18315 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18316
18317 PR middle-end/83837
18318 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18319 type rather than type addr's type points to.
18320 (expand_omp_atomic_mutex): Likewise.
18321 (expand_omp_atomic): Likewise.
18322
18323 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18324
18325 PR target/83839
18326 * config/i386/i386.c (output_indirect_thunk_function): Use
18327 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18328 for __x86_return_thunk.
18329
18330 2018-01-15 Richard Biener <rguenther@suse.de>
18331
18332 PR middle-end/83850
18333 * expmed.c (extract_bit_field_1): Fix typo.
18334
18335 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18336
18337 PR target/83687
18338 * config/arm/iterators.md (VF): New mode iterator.
18339 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18340 Remove integer-related logic from pattern.
18341 (neon_vabd<mode>_3): Likewise.
18342
18343 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18344
18345 PR middle-end/82694
18346 * common.opt (fstrict-overflow): No longer an alias.
18347 (fwrapv-pointer): New option.
18348 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18349 also for pointer types based on flag_wrapv_pointer.
18350 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18351 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18352 opts->x_flag_wrapv got set.
18353 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18354 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18355 POINTER_TYPE_OVERFLOW_UNDEFINED.
18356 * match.pd: Likewise in address comparison pattern.
18357 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18358
18359 2018-01-15 Richard Biener <rguenther@suse.de>
18360
18361 PR lto/83804
18362 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18363 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
18364 Reset type names to their identifier if their TYPE_DECL doesn't
18365 have linkage (and thus is used for ODR and devirt).
18366 (save_debug_info_for_decl): Remove.
18367 (save_debug_info_for_type): Likewise.
18368 (add_tree_to_fld_list): Adjust.
18369 * tree-pretty-print.c (dump_generic_node): Make dumping of
18370 type names more robust.
18371
18372 2018-01-15 Richard Biener <rguenther@suse.de>
18373
18374 * BASE-VER: Bump to 8.0.1.
18375
18376 2018-01-14 Martin Sebor <msebor@redhat.com>
18377
18378 PR other/83508
18379 * builtins.c (check_access): Avoid warning when the no-warning bit
18380 is set.
18381
18382 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
18383
18384 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18385 * ira-color (allocno_hard_regs_compare): Likewise.
18386
18387 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
18388
18389 PR target/83013
18390 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18391 Use .pushsection/.popsection.
18392
18393 2018-01-14 Martin Sebor <msebor@redhat.com>
18394
18395 PR c++/81327
18396 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18397
18398 2018-01-14 Jakub Jelinek <jakub@redhat.com>
18399
18400 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18401 entry from extra_headers.
18402 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18403 extra_headers, make the list bitwise identical to the i?86-*-* one.
18404
18405 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18406
18407 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18408 -mcmodel=large with -mindirect-branch=thunk,
18409 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18410 -mfunction-return=thunk-extern.
18411 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18412 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18413 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18414
18415 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18416
18417 * config/i386/i386.c (print_reg): Print the name of the full
18418 integer register without '%'.
18419 (ix86_print_operand): Handle 'V'.
18420 * doc/extend.texi: Document 'V' modifier.
18421
18422 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18423
18424 * config/i386/constraints.md (Bs): Disallow memory operand for
18425 -mindirect-branch-register.
18426 (Bw): Likewise.
18427 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18428 (GOT_memory_operand): Likewise.
18429 (call_insn_operand): Likewise.
18430 (sibcall_insn_operand): Likewise.
18431 (GOT32_symbol_operand): Likewise.
18432 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18433 for -mindirect-branch-register.
18434 (tablejump): Likewise.
18435 (*sibcall_memory): Likewise.
18436 (*sibcall_value_memory): Likewise.
18437 Disallow peepholes of indirect call and jump via memory for
18438 -mindirect-branch-register.
18439 (*call_pop): Replace m with Bw.
18440 (*call_value_pop): Likewise.
18441 (*sibcall_pop_memory): Replace m with Bs.
18442 * config/i386/i386.opt (mindirect-branch-register): New option.
18443 * doc/invoke.texi: Document -mindirect-branch-register option.
18444
18445 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18446
18447 * config/i386/i386-protos.h (ix86_output_function_return): New.
18448 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18449 set function_return_type.
18450 (indirect_thunk_name): Add ret_p to indicate thunk for function
18451 return.
18452 (output_indirect_thunk_function): Pass false to
18453 indirect_thunk_name.
18454 (ix86_output_indirect_branch_via_reg): Likewise.
18455 (ix86_output_indirect_branch_via_push): Likewise.
18456 (output_indirect_thunk_function): Create alias for function
18457 return thunk if regno < 0.
18458 (ix86_output_function_return): New function.
18459 (ix86_handle_fndecl_attribute): Handle function_return.
18460 (ix86_attribute_table): Add function_return.
18461 * config/i386/i386.h (machine_function): Add
18462 function_return_type.
18463 * config/i386/i386.md (simple_return_internal): Use
18464 ix86_output_function_return.
18465 (simple_return_internal_long): Likewise.
18466 * config/i386/i386.opt (mfunction-return=): New option.
18467 (indirect_branch): Mention -mfunction-return=.
18468 * doc/extend.texi: Document function_return function attribute.
18469 * doc/invoke.texi: Document -mfunction-return= option.
18470
18471 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18472
18473 * config/i386/i386-opts.h (indirect_branch): New.
18474 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18475 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18476 with local indirect jump when converting indirect call and jump.
18477 (ix86_set_indirect_branch_type): New.
18478 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18479 (indirectlabelno): New.
18480 (indirect_thunk_needed): Likewise.
18481 (indirect_thunk_bnd_needed): Likewise.
18482 (indirect_thunks_used): Likewise.
18483 (indirect_thunks_bnd_used): Likewise.
18484 (INDIRECT_LABEL): Likewise.
18485 (indirect_thunk_name): Likewise.
18486 (output_indirect_thunk): Likewise.
18487 (output_indirect_thunk_function): Likewise.
18488 (ix86_output_indirect_branch_via_reg): Likewise.
18489 (ix86_output_indirect_branch_via_push): Likewise.
18490 (ix86_output_indirect_branch): Likewise.
18491 (ix86_output_indirect_jmp): Likewise.
18492 (ix86_code_end): Call output_indirect_thunk_function if needed.
18493 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18494 needed.
18495 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18496 (ix86_attribute_table): Add indirect_branch.
18497 * config/i386/i386.h (machine_function): Add indirect_branch_type
18498 and has_local_indirect_jump.
18499 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18500 to true.
18501 (tablejump): Likewise.
18502 (*indirect_jump): Use ix86_output_indirect_jmp.
18503 (*tablejump_1): Likewise.
18504 (simple_return_indirect_internal): Likewise.
18505 * config/i386/i386.opt (mindirect-branch=): New option.
18506 (indirect_branch): New.
18507 (keep): Likewise.
18508 (thunk): Likewise.
18509 (thunk-inline): Likewise.
18510 (thunk-extern): Likewise.
18511 * doc/extend.texi: Document indirect_branch function attribute.
18512 * doc/invoke.texi: Document -mindirect-branch= option.
18513
18514 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18515
18516 PR ipa/83051
18517 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18518
18519 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18520
18521 * ipa-inline.c (want_inline_small_function_p): Return false if
18522 inlining has already failed with CIF_FINAL_ERROR.
18523 (update_caller_keys): Call want_inline_small_function_p before
18524 can_inline_edge_p.
18525 (update_callee_keys): Likewise.
18526
18527 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18528
18529 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18530 New function.
18531 (rs6000_quadword_masked_address_p): Likewise.
18532 (quad_aligned_load_p): Likewise.
18533 (quad_aligned_store_p): Likewise.
18534 (const_load_sequence_p): Add comment to describe the outer-most loop.
18535 (mimic_memory_attributes_and_flags): New function.
18536 (rs6000_gen_stvx): Likewise.
18537 (replace_swapped_aligned_store): Likewise.
18538 (rs6000_gen_lvx): Likewise.
18539 (replace_swapped_aligned_load): Likewise.
18540 (replace_swapped_load_constant): Capitalize argument name in
18541 comment describing this function.
18542 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18543 and stores that access quad-word aligned addresses and replace
18544 with stvx or lvx instructions when appropriate.
18545 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18546 New function prototype.
18547 (rs6000_quadword_masked_address_p): Likewise.
18548 (rs6000_gen_lvx): Likewise.
18549 (rs6000_gen_stvx): Likewise.
18550 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18551 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18552 when memory address is aligned.
18553 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18554 this split to select lvx instruction when memory address is aligned.
18555 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18556 instruction when memory address is aligned.
18557 (*vsx_le_perm_load_v16qi): Likewise.
18558 (four unnamed splitters): Modify to select the stvx instruction
18559 when memory is aligned.
18560
18561 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18562
18563 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18564 which appears in the queue multiple times.
18565
18566 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18567 Alan Hayward <alan.hayward@arm.com>
18568 David Sherwood <david.sherwood@arm.com>
18569
18570 * tree-vectorizer.h (vec_lower_bound): New structure.
18571 (_loop_vec_info): Add check_nonzero and lower_bounds.
18572 (LOOP_VINFO_CHECK_NONZERO): New macro.
18573 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18574 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18575 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18576 fields. Make seg_len the distance travelled, not including the
18577 access size.
18578 (dr_direction_indicator): Declare.
18579 (dr_zero_step_indicator): Likewise.
18580 (dr_known_forward_stride_p): Likewise.
18581 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18582 tree-ssanames.h.
18583 (runtime_alias_check_p): Allow runtime alias checks with
18584 variable strides.
18585 (operator ==): Compare access_size and align.
18586 (prune_runtime_alias_test_list): Rework for new distinction between
18587 the access_size and seg_len.
18588 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18589 segment lengths.
18590 (get_segment_min_max): New function.
18591 (create_intersect_range_checks): Use it.
18592 (dr_step_indicator): New function.
18593 (dr_direction_indicator): Likewise.
18594 (dr_zero_step_indicator): Likewise.
18595 (dr_known_forward_stride_p): Likewise.
18596 * tree-loop-distribution.c (data_ref_segment_size): Return
18597 DR_STEP * (niters - 1).
18598 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18599 constructor.
18600 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18601 (vect_preserves_scalar_order_p): New function, split out from...
18602 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18603 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18604 (vect_vfa_access_size): New function.
18605 (vect_vfa_align): Likewise.
18606 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18607 (dump_lower_bound): New function.
18608 (vect_check_lower_bound): Likewise.
18609 (vect_small_gap_p): Likewise.
18610 (vectorizable_with_step_bound_p): Likewise.
18611 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18612 depencies if the vectorization factor is 1. Convert the checks
18613 for nonzero steps into checks on the bounds of DR_STEP. Try using
18614 a bunds check for variable steps if the minimum required step is
18615 relatively small. Update calls to the dr_with_seg_len
18616 constructor and to vect_compile_time_alias.
18617 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18618 function.
18619 (vect_loop_versioning): Call it.
18620 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18621 when retrying.
18622 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18623
18624 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18625 Alan Hayward <alan.hayward@arm.com>
18626 David Sherwood <david.sherwood@arm.com>
18627
18628 * doc/sourcebuild.texi (vect_scatter_store): Document.
18629 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18630 optabs.
18631 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18632 Document.
18633 * genopinit.c (main): Add supports_vec_scatter_store and
18634 supports_vec_scatter_store_cached to target_optabs.
18635 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18636 IFN_MASK_SCATTER_STORE.
18637 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18638 functions.
18639 * internal-fn.h (internal_store_fn_p): Declare.
18640 (internal_fn_stored_value_index): Likewise.
18641 * internal-fn.c (scatter_store_direct): New macro.
18642 (expand_scatter_store_optab_fn): New function.
18643 (direct_scatter_store_optab_supported_p): New macro.
18644 (internal_store_fn_p): New function.
18645 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18646 IFN_MASK_SCATTER_STORE.
18647 (internal_fn_mask_index): Likewise.
18648 (internal_fn_stored_value_index): New function.
18649 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18650 for scatter stores.
18651 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18652 * optabs-query.c (supports_vec_scatter_store_p): New function.
18653 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18654 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18655 true for scatter stores.
18656 (vect_gather_scatter_fn_p): Handle scatter stores too.
18657 (vect_check_gather_scatter): Consider using scatter stores if
18658 supports_vec_scatter_store_p.
18659 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18660 scatter stores too.
18661 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18662 internal_fn_stored_value_index.
18663 (check_load_store_masking): Handle scatter stores too.
18664 (vect_get_store_rhs): Make public.
18665 (vectorizable_call): Use internal_store_fn_p.
18666 (vectorizable_store): Handle scatter store internal functions.
18667 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18668 when deciding whether the end of the group has been reached.
18669 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18670 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18671 (mask_scatter_store<mode>): New insns.
18672
18673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18674 Alan Hayward <alan.hayward@arm.com>
18675 David Sherwood <david.sherwood@arm.com>
18676
18677 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18678 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18679 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18680 function.
18681 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18682 Use vect_truncate_gather_scatter_offset if we can't treat the
18683 operation as a normal gather load or scatter store.
18684 (get_group_load_store_type): Take the gather_scatter_info
18685 as argument. Try using a gather load or scatter store for
18686 single-element groups.
18687 (get_load_store_type): Update calls to get_group_load_store_type
18688 and vect_use_strided_gather_scatters_p.
18689
18690 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18691 Alan Hayward <alan.hayward@arm.com>
18692 David Sherwood <david.sherwood@arm.com>
18693
18694 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18695 optional tree argument.
18696 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18697 null target hooks.
18698 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18699 but continue to use the current value as a fallback.
18700 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18701 to compare the updates.
18702 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18703 (get_load_store_type): Use it when handling a strided access.
18704 (vect_get_strided_load_store_ops): New function.
18705 (vect_get_data_ptr_increment): Likewise.
18706 (vectorizable_load): Handle strided gather loads. Always pass
18707 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18708
18709 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18710 Alan Hayward <alan.hayward@arm.com>
18711 David Sherwood <david.sherwood@arm.com>
18712
18713 * doc/md.texi (gather_load@var{m}): Document.
18714 (mask_gather_load@var{m}): Likewise.
18715 * genopinit.c (main): Add supports_vec_gather_load and
18716 supports_vec_gather_load_cached to target_optabs.
18717 * optabs-tree.c (init_tree_optimization_optabs): Use
18718 ggc_cleared_alloc to allocate target_optabs.
18719 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18720 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18721 functions.
18722 * internal-fn.h (internal_load_fn_p): Declare.
18723 (internal_gather_scatter_fn_p): Likewise.
18724 (internal_fn_mask_index): Likewise.
18725 (internal_gather_scatter_fn_supported_p): Likewise.
18726 * internal-fn.c (gather_load_direct): New macro.
18727 (expand_gather_load_optab_fn): New function.
18728 (direct_gather_load_optab_supported_p): New macro.
18729 (direct_internal_fn_optab): New function.
18730 (internal_load_fn_p): Likewise.
18731 (internal_gather_scatter_fn_p): Likewise.
18732 (internal_fn_mask_index): Likewise.
18733 (internal_gather_scatter_fn_supported_p): Likewise.
18734 * optabs-query.c (supports_at_least_one_mode_p): New function.
18735 (supports_vec_gather_load_p): Likewise.
18736 * optabs-query.h (supports_vec_gather_load_p): Declare.
18737 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18738 and memory_type field.
18739 (NUM_PATTERNS): Bump to 15.
18740 * tree-vect-data-refs.c: Include internal-fn.h.
18741 (vect_gather_scatter_fn_p): New function.
18742 (vect_describe_gather_scatter_call): Likewise.
18743 (vect_check_gather_scatter): Try using internal functions for
18744 gather loads. Recognize existing calls to a gather load function.
18745 (vect_analyze_data_refs): Consider using gather loads if
18746 supports_vec_gather_load_p.
18747 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18748 (vect_get_gather_scatter_offset_type): Likewise.
18749 (vect_convert_mask_for_vectype): Likewise.
18750 (vect_add_conversion_to_patterm): Likewise.
18751 (vect_try_gather_scatter_pattern): Likewise.
18752 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18753 (vect_vect_recog_func_ptrs): Add it.
18754 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18755 internal_fn_mask_index and internal_gather_scatter_fn_p.
18756 (check_load_store_masking): Take the gather_scatter_info as an
18757 argument and handle gather loads.
18758 (vect_get_gather_scatter_ops): New function.
18759 (vectorizable_call): Check internal_load_fn_p.
18760 (vectorizable_load): Likewise. Handle gather load internal
18761 functions.
18762 (vectorizable_store): Update call to check_load_store_masking.
18763 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18764 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18765 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18766 (aarch64_gather_scale_operand_d): New predicates.
18767 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18768 (mask_gather_load<mode>): New insns.
18769
18770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18771 Alan Hayward <alan.hayward@arm.com>
18772 David Sherwood <david.sherwood@arm.com>
18773
18774 * optabs.def (fold_left_plus_optab): New optab.
18775 * doc/md.texi (fold_left_plus_@var{m}): Document.
18776 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18777 * internal-fn.c (fold_left_direct): Define.
18778 (expand_fold_left_optab_fn): Likewise.
18779 (direct_fold_left_optab_supported_p): Likewise.
18780 * fold-const-call.c (fold_const_fold_left): New function.
18781 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18782 * tree-parloops.c (valid_reduction_p): New function.
18783 (gather_scalar_reductions): Use it.
18784 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18785 (vect_finish_replace_stmt): Declare.
18786 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18787 (needs_fold_left_reduction_p): New function, split out from...
18788 (vect_is_simple_reduction): ...here. Accept reductions that
18789 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18790 (vect_force_simple_reduction): Also store the reduction type in
18791 the assignment's STMT_VINFO_REDUC_TYPE.
18792 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18793 (merge_with_identity): New function.
18794 (vect_expand_fold_left): Likewise.
18795 (vectorize_fold_left_reduction): Likewise.
18796 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18797 scalar phi in place for it. Check for target support and reject
18798 cases that would reassociate the operation. Defer the transform
18799 phase to vectorize_fold_left_reduction.
18800 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18801 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18802 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18803
18804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18805
18806 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18807 call to ifc_temp_var.
18808
18809 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18810 Alan Hayward <alan.hayward@arm.com>
18811 David Sherwood <david.sherwood@arm.com>
18812
18813 * target.def (legitimize_address_displacement): Take the original
18814 offset as a poly_int.
18815 * targhooks.h (default_legitimize_address_displacement): Update
18816 accordingly.
18817 * targhooks.c (default_legitimize_address_displacement): Likewise.
18818 * doc/tm.texi: Regenerate.
18819 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18820 as an argument, moving assert of ad->disp == ad->disp_term to...
18821 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18822 Try calling targetm.legitimize_address_displacement before expanding
18823 the address rather than afterwards, and adjust for the new interface.
18824 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18825 Match the new hook interface. Handle SVE addresses.
18826 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18827 new hook interface.
18828
18829 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18830
18831 * Makefile.in (OBJS): Add early-remat.o.
18832 * target.def (select_early_remat_modes): New hook.
18833 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18834 * doc/tm.texi: Regenerate.
18835 * targhooks.h (default_select_early_remat_modes): Declare.
18836 * targhooks.c (default_select_early_remat_modes): New function.
18837 * timevar.def (TV_EARLY_REMAT): New timevar.
18838 * passes.def (pass_early_remat): New pass.
18839 * tree-pass.h (make_pass_early_remat): Declare.
18840 * early-remat.c: New file.
18841 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18842 function.
18843 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18844
18845 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18846 Alan Hayward <alan.hayward@arm.com>
18847 David Sherwood <david.sherwood@arm.com>
18848
18849 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18850 vfm1 with a bound_epilog parameter.
18851 (vect_do_peeling): Update calls accordingly, and move the prologue
18852 call earlier in the function. Treat the base bound_epilog as 0 for
18853 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18854 this base when peeling for gaps.
18855 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18856 with fully-masked loops.
18857 (vect_estimate_min_profitable_iters): Handle the single peeled
18858 iteration in that case.
18859
18860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18861 Alan Hayward <alan.hayward@arm.com>
18862 David Sherwood <david.sherwood@arm.com>
18863
18864 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18865 single-element interleaving even if the size is not a power of 2.
18866 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18867 accesses for single-element interleaving if the group size is
18868 not a power of 2.
18869
18870 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18871 Alan Hayward <alan.hayward@arm.com>
18872 David Sherwood <david.sherwood@arm.com>
18873
18874 * doc/md.texi (fold_extract_last_@var{m}): Document.
18875 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18876 * optabs.def (fold_extract_last_optab): New optab.
18877 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18878 * internal-fn.c (fold_extract_direct): New macro.
18879 (expand_fold_extract_optab_fn): Likewise.
18880 (direct_fold_extract_optab_supported_p): Likewise.
18881 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18882 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18883 EXTRACT_LAST_REDUCTION.
18884 (get_initial_def_for_reduction): Do not create an initial vector
18885 for EXTRACT_LAST_REDUCTION reductions.
18886 (vectorizable_reduction): Leave the scalar phi in place for
18887 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18888 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18889 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18890 transform phase to vectorizable_condition.
18891 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18892 split out from...
18893 (vect_finish_stmt_generation): ...here.
18894 (vect_finish_replace_stmt): New function.
18895 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18896 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18897 pattern.
18898 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18899
18900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18901 Alan Hayward <alan.hayward@arm.com>
18902 David Sherwood <david.sherwood@arm.com>
18903
18904 * doc/md.texi (extract_last_@var{m}): Document.
18905 * optabs.def (extract_last_optab): New optab.
18906 * internal-fn.def (EXTRACT_LAST): New internal function.
18907 * internal-fn.c (cond_unary_direct): New macro.
18908 (expand_cond_unary_optab_fn): Likewise.
18909 (direct_cond_unary_optab_supported_p): Likewise.
18910 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18911 loops using EXTRACT_LAST.
18912 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18913 (extract_last_<mode>): ...this optab.
18914 (vec_extract<mode><Vel>): Update accordingly.
18915
18916 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18917 Alan Hayward <alan.hayward@arm.com>
18918 David Sherwood <david.sherwood@arm.com>
18919
18920 * target.def (empty_mask_is_expensive): New hook.
18921 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18922 * doc/tm.texi: Regenerate.
18923 * targhooks.h (default_empty_mask_is_expensive): Declare.
18924 * targhooks.c (default_empty_mask_is_expensive): New function.
18925 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18926 if the target says that empty masks are expensive.
18927 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18928 New function.
18929 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18930
18931 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18932 Alan Hayward <alan.hayward@arm.com>
18933 David Sherwood <david.sherwood@arm.com>
18934
18935 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18936 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18937 (vect_use_loop_mask_for_alignment_p): New function.
18938 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18939 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18940 niters_skip argument. Make sure that the first niters_skip elements
18941 of the first iteration are inactive.
18942 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18943 Update call to vect_set_loop_masks_directly.
18944 (get_misalign_in_elems): New function, split out from...
18945 (vect_gen_prolog_loop_niters): ...here.
18946 (vect_update_init_of_dr): Take a code argument that specifies whether
18947 the adjustment should be added or subtracted.
18948 (vect_update_init_of_drs): Likewise.
18949 (vect_prepare_for_masked_peels): New function.
18950 (vect_do_peeling): Skip prologue peeling if we're using a mask
18951 instead. Update call to vect_update_inits_of_drs.
18952 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18953 mask_skip_niters.
18954 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18955 alignment. Do not include the number of peeled iterations in
18956 the minimum threshold in that case.
18957 (vectorizable_induction): Adjust the start value down by
18958 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18959 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18960 Take the number of skipped iterations into account when calculating
18961 the loop bounds.
18962 * tree-vect-stmts.c (vect_gen_while_not): New function.
18963
18964 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18965 Alan Hayward <alan.hayward@arm.com>
18966 David Sherwood <david.sherwood@arm.com>
18967
18968 * doc/sourcebuild.texi (vect_fully_masked): Document.
18969 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18970 default value to 0.
18971 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18972 split out from...
18973 (vect_analyze_loop_2): ...here. Don't check the vectorization
18974 factor against the number of loop iterations if the loop is
18975 fully-masked.
18976
18977 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18978 Alan Hayward <alan.hayward@arm.com>
18979 David Sherwood <david.sherwood@arm.com>
18980
18981 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18982 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18983 (dump_groups): Update accordingly.
18984 (iv_use::mem_type): New member variable.
18985 (address_p): New function.
18986 (record_use): Add a mem_type argument and initialize the new
18987 mem_type field.
18988 (record_group_use): Add a mem_type argument. Use address_p.
18989 Remove obsolete null checks of base_object. Update call to record_use.
18990 (find_interesting_uses_op): Update call to record_group_use.
18991 (find_interesting_uses_cond): Likewise.
18992 (find_interesting_uses_address): Likewise.
18993 (get_mem_type_for_internal_fn): New function.
18994 (find_address_like_use): Likewise.
18995 (find_interesting_uses_stmt): Try find_address_like_use before
18996 calling find_interesting_uses_op.
18997 (addr_offset_valid_p): Use the iv mem_type field as the type
18998 of the addressed memory.
18999 (add_autoinc_candidates): Likewise.
19000 (get_address_cost): Likewise.
19001 (split_small_address_groups_p): Use address_p.
19002 (split_address_groups): Likewise.
19003 (add_iv_candidate_for_use): Likewise.
19004 (autoinc_possible_for_pair): Likewise.
19005 (rewrite_groups): Likewise.
19006 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19007 (determine_group_iv_cost): Update after split of USE_ADDRESS.
19008 (get_alias_ptr_type_for_ptr_address): New function.
19009 (rewrite_use_address): Rewrite address uses in calls that were
19010 identified by find_address_like_use.
19011
19012 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19013 Alan Hayward <alan.hayward@arm.com>
19014 David Sherwood <david.sherwood@arm.com>
19015
19016 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19017 TARGET_MEM_REFs.
19018 * gimple-expr.h (is_gimple_addressable: Likewise.
19019 * gimple-expr.c (is_gimple_address): Likewise.
19020 * internal-fn.c (expand_call_mem_ref): New function.
19021 (expand_mask_load_optab_fn): Use it.
19022 (expand_mask_store_optab_fn): Likewise.
19023
19024 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19025 Alan Hayward <alan.hayward@arm.com>
19026 David Sherwood <david.sherwood@arm.com>
19027
19028 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19029 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19030 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19031 (cond_umax@var{mode}): Document.
19032 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19033 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19034 (cond_umin_optab, cond_umax_optab): New optabs.
19035 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19036 (COND_IOR, COND_XOR): New internal functions.
19037 * internal-fn.h (get_conditional_internal_fn): Declare.
19038 * internal-fn.c (cond_binary_direct): New macro.
19039 (expand_cond_binary_optab_fn): Likewise.
19040 (direct_cond_binary_optab_supported_p): Likewise.
19041 (get_conditional_internal_fn): New function.
19042 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19043 Cope with reduction statements that are vectorized as calls rather
19044 than assignments.
19045 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19046 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19047 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19048 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19049 (UNSPEC_COND_EOR): New unspecs.
19050 (optab): Add mappings for them.
19051 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19052 (sve_int_op, sve_fp_op): New int attributes.
19053
19054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19055 Alan Hayward <alan.hayward@arm.com>
19056 David Sherwood <david.sherwood@arm.com>
19057
19058 * optabs.def (while_ult_optab): New optab.
19059 * doc/md.texi (while_ult@var{m}@var{n}): Document.
19060 * internal-fn.def (WHILE_ULT): New internal function.
19061 * internal-fn.h (direct_internal_fn_supported_p): New override
19062 that takes two types as argument.
19063 * internal-fn.c (while_direct): New macro.
19064 (expand_while_optab_fn): New function.
19065 (convert_optab_supported_p): Likewise.
19066 (direct_while_optab_supported_p): New macro.
19067 * wide-int.h (wi::udiv_ceil): New function.
19068 * tree-vectorizer.h (rgroup_masks): New structure.
19069 (vec_loop_masks): New typedef.
19070 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19071 and fully_masked_p.
19072 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19073 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19074 (vect_max_vf): New function.
19075 (slpeel_make_loop_iterate_ntimes): Delete.
19076 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19077 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19078 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19079 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19080 internal-fn.h, stor-layout.h and optabs-query.h.
19081 (vect_set_loop_mask): New function.
19082 (add_preheader_seq): Likewise.
19083 (add_header_seq): Likewise.
19084 (interleave_supported_p): Likewise.
19085 (vect_maybe_permute_loop_masks): Likewise.
19086 (vect_set_loop_masks_directly): Likewise.
19087 (vect_set_loop_condition_masked): Likewise.
19088 (vect_set_loop_condition_unmasked): New function, split out from
19089 slpeel_make_loop_iterate_ntimes.
19090 (slpeel_make_loop_iterate_ntimes): Rename to..
19091 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
19092 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19093 (vect_do_peeling): Update call accordingly.
19094 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19095 loops.
19096 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19097 mask_compare_type, can_fully_mask_p and fully_masked_p.
19098 (release_vec_loop_masks): New function.
19099 (_loop_vec_info): Use it to free the loop masks.
19100 (can_produce_all_loop_masks_p): New function.
19101 (vect_get_max_nscalars_per_iter): Likewise.
19102 (vect_verify_full_masking): Likewise.
19103 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19104 retries, and free the mask rgroups before retrying. Check loop-wide
19105 reasons for disallowing fully-masked loops. Make the final decision
19106 about whether use a fully-masked loop or not.
19107 (vect_estimate_min_profitable_iters): Do not assume that peeling
19108 for the number of iterations will be needed for fully-masked loops.
19109 (vectorizable_reduction): Disable fully-masked loops.
19110 (vectorizable_live_operation): Likewise.
19111 (vect_halve_mask_nunits): New function.
19112 (vect_double_mask_nunits): Likewise.
19113 (vect_record_loop_mask): Likewise.
19114 (vect_get_loop_mask): Likewise.
19115 (vect_transform_loop): Handle the case in which the final loop
19116 iteration might handle a partial vector. Call vect_set_loop_condition
19117 instead of slpeel_make_loop_iterate_ntimes.
19118 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19119 (check_load_store_masking): New function.
19120 (prepare_load_store_mask): Likewise.
19121 (vectorizable_store): Handle fully-masked loops.
19122 (vectorizable_load): Likewise.
19123 (supportable_widening_operation): Use vect_halve_mask_nunits for
19124 booleans.
19125 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19126 (vect_gen_while): New function.
19127 * config/aarch64/aarch64.md (umax<mode>3): New expander.
19128 (aarch64_uqdec<mode>): New insn.
19129
19130 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19131 Alan Hayward <alan.hayward@arm.com>
19132 David Sherwood <david.sherwood@arm.com>
19133
19134 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19135 (reduc_xor_scal_optab): New optabs.
19136 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19137 (reduc_xor_scal_@var{m}): Document.
19138 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19139 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19140 internal functions.
19141 * fold-const-call.c (fold_const_call): Handle them.
19142 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19143 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19144 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19145 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19146 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19147 (UNSPEC_XORV): New unspecs.
19148 (optab): Add entries for them.
19149 (BITWISEV): New int iterator.
19150 (bit_reduc_op): New int attributes.
19151
19152 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19153 Alan Hayward <alan.hayward@arm.com>
19154 David Sherwood <david.sherwood@arm.com>
19155
19156 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19157 * internal-fn.def (VEC_SHL_INSERT): New internal function.
19158 * optabs.def (vec_shl_insert_optab): New optab.
19159 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19160 (duplicate_and_interleave): Likewise.
19161 * tree-vect-loop.c: Include internal-fn.h.
19162 (neutral_op_for_slp_reduction): New function, split out from
19163 get_initial_defs_for_reduction.
19164 (get_initial_def_for_reduction): Handle option 2 for variable-length
19165 vectors by loading the neutral value into a vector and then shifting
19166 the initial value into element 0.
19167 (get_initial_defs_for_reduction): Replace the code argument with
19168 the neutral value calculated by neutral_op_for_slp_reduction.
19169 Use gimple_build_vector for constant-length vectors.
19170 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19171 but the first group_size elements have a neutral value.
19172 Use duplicate_and_interleave otherwise.
19173 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19174 Update call to get_initial_defs_for_reduction. Handle SLP
19175 reductions for variable-length vectors by creating one vector
19176 result for each scalar result, with the elements associated
19177 with other scalar results stubbed out with the neutral value.
19178 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19179 Require IFN_VEC_SHL_INSERT for double reductions on
19180 variable-length vectors, or SLP reductions that have
19181 a neutral value. Require can_duplicate_and_interleave_p
19182 support for variable-length unchained SLP reductions if there
19183 is no neutral value, such as for MIN/MAX reductions. Also require
19184 the number of vector elements to be a multiple of the number of
19185 SLP statements when doing variable-length unchained SLP reductions.
19186 Update call to vect_create_epilog_for_reduction.
19187 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19188 and remove initial values.
19189 (duplicate_and_interleave): Make public.
19190 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19191 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19192
19193 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19194 Alan Hayward <alan.hayward@arm.com>
19195 David Sherwood <david.sherwood@arm.com>
19196
19197 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19198 (can_duplicate_and_interleave_p): New function.
19199 (vect_get_and_check_slp_defs): Take the vector of statements
19200 rather than just the current one. Remove excess parentheses.
19201 Restriction rejectinon of vect_constant_def and vect_external_def
19202 for variable-length vectors to boolean types, or types for which
19203 can_duplicate_and_interleave_p is false.
19204 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19205 (duplicate_and_interleave): New function.
19206 (vect_get_constant_vectors): Use gimple_build_vector for
19207 constant-length vectors and suitable variable-length constant
19208 vectors. Use duplicate_and_interleave for other variable-length
19209 vectors. Don't defer the update when inserting new statements.
19210
19211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19212 Alan Hayward <alan.hayward@arm.com>
19213 David Sherwood <david.sherwood@arm.com>
19214
19215 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19216 min_profitable_iters doesn't go negative.
19217
19218 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19219 Alan Hayward <alan.hayward@arm.com>
19220 David Sherwood <david.sherwood@arm.com>
19221
19222 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19223 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19224 * optabs.def (vec_mask_load_lanes_optab): New optab.
19225 (vec_mask_store_lanes_optab): Likewise.
19226 * internal-fn.def (MASK_LOAD_LANES): New internal function.
19227 (MASK_STORE_LANES): Likewise.
19228 * internal-fn.c (mask_load_lanes_direct): New macro.
19229 (mask_store_lanes_direct): Likewise.
19230 (expand_mask_load_optab_fn): Handle masked operations.
19231 (expand_mask_load_lanes_optab_fn): New macro.
19232 (expand_mask_store_optab_fn): Handle masked operations.
19233 (expand_mask_store_lanes_optab_fn): New macro.
19234 (direct_mask_load_lanes_optab_supported_p): Likewise.
19235 (direct_mask_store_lanes_optab_supported_p): Likewise.
19236 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19237 parameter.
19238 (vect_load_lanes_supported): Likewise.
19239 * tree-vect-data-refs.c (strip_conversion): New function.
19240 (can_group_stmts_p): Likewise.
19241 (vect_analyze_data_ref_accesses): Use it instead of checking
19242 for a pair of assignments.
19243 (vect_store_lanes_supported): Take a masked_p parameter.
19244 (vect_load_lanes_supported): Likewise.
19245 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19246 vect_store_lanes_supported and vect_load_lanes_supported.
19247 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19248 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19249 parameter. Don't allow gaps for masked accesses.
19250 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
19251 and vect_load_lanes_supported.
19252 (get_load_store_type): Take a masked_p parameter and update
19253 call to get_group_load_store_type.
19254 (vectorizable_store): Update call to get_load_store_type.
19255 Handle IFN_MASK_STORE_LANES.
19256 (vectorizable_load): Update call to get_load_store_type.
19257 Handle IFN_MASK_LOAD_LANES.
19258
19259 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19260 Alan Hayward <alan.hayward@arm.com>
19261 David Sherwood <david.sherwood@arm.com>
19262
19263 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19264 modes for SVE.
19265 * config/aarch64/aarch64-protos.h
19266 (aarch64_sve_struct_memory_operand_p): Declare.
19267 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19268 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19269 (VPRED, vpred): Handle SVE structure modes.
19270 * config/aarch64/constraints.md (Utx): New constraint.
19271 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19272 (aarch64_sve_struct_nonimmediate_operand): New predicates.
19273 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19274 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19275 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19276 structure modes. Split into pieces after RA.
19277 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19278 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19279 New patterns.
19280 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19281 SVE structure modes.
19282 (aarch64_classify_address): Likewise.
19283 (sizetochar): Move earlier in file.
19284 (aarch64_print_operand): Handle SVE register lists.
19285 (aarch64_array_mode): New function.
19286 (aarch64_sve_struct_memory_operand_p): Likewise.
19287 (TARGET_ARRAY_MODE): Redefine.
19288
19289 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19290 Alan Hayward <alan.hayward@arm.com>
19291 David Sherwood <david.sherwood@arm.com>
19292
19293 * target.def (array_mode): New target hook.
19294 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19295 * doc/tm.texi: Regenerate.
19296 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19297 * hooks.c (hook_optmode_mode_uhwi_none): New function.
19298 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19299 targetm.array_mode.
19300 * stor-layout.c (mode_for_array): Likewise. Support polynomial
19301 type sizes.
19302
19303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19304 Alan Hayward <alan.hayward@arm.com>
19305 David Sherwood <david.sherwood@arm.com>
19306
19307 * fold-const.c (fold_binary_loc): Check the argument types
19308 rather than the result type when testing for a vector operation.
19309
19310 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19311
19312 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19313 * doc/tm.texi: Regenerate.
19314
19315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19316 Alan Hayward <alan.hayward@arm.com>
19317 David Sherwood <david.sherwood@arm.com>
19318
19319 * doc/invoke.texi (-msve-vector-bits=): Document new option.
19320 (sve): Document new AArch64 extension.
19321 * doc/md.texi (w): Extend the description of the AArch64
19322 constraint to include SVE vectors.
19323 (Upl, Upa): Document new AArch64 predicate constraints.
19324 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19325 enum.
19326 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19327 (msve-vector-bits=): New option.
19328 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19329 SVE when these are disabled.
19330 (sve): New extension.
19331 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19332 modes. Adjust their number of units based on aarch64_sve_vg.
19333 (MAX_BITSIZE_MODE_ANY_MODE): Define.
19334 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19335 aarch64_addr_query_type.
19336 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19337 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19338 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19339 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19340 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19341 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19342 (aarch64_simd_imm_zero_p): Delete.
19343 (aarch64_check_zero_based_sve_index_immediate): Declare.
19344 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19345 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19346 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19347 (aarch64_sve_float_mul_immediate_p): Likewise.
19348 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19349 rather than an rtx.
19350 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19351 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19352 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19353 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19354 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19355 (aarch64_regmode_natural_size): Likewise.
19356 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19357 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19358 left one place.
19359 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19360 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19361 for VG and the SVE predicate registers.
19362 (V_ALIASES): Add a "z"-prefixed alias.
19363 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19364 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19365 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19366 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19367 (REG_CLASS_NAMES): Add entries for them.
19368 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
19369 and the predicate registers.
19370 (aarch64_sve_vg): Declare.
19371 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19372 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19373 (REGMODE_NATURAL_SIZE): Define.
19374 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19375 SVE macros.
19376 * config/aarch64/aarch64.c: Include cfgrtl.h.
19377 (simd_immediate_info): Add a constructor for series vectors,
19378 and an associated step field.
19379 (aarch64_sve_vg): New variable.
19380 (aarch64_dbx_register_number): Handle VG and the predicate registers.
19381 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19382 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19383 (VEC_ANY_DATA, VEC_STRUCT): New constants.
19384 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19385 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19386 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19387 (aarch64_get_mask_mode): New functions.
19388 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19389 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19390 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
19391 predicate modes and predicate registers. Explicitly restrict
19392 GPRs to modes of 16 bytes or smaller. Only allow FP registers
19393 to store a vector mode if it is recognized by
19394 aarch64_classify_vector_mode.
19395 (aarch64_regmode_natural_size): New function.
19396 (aarch64_hard_regno_caller_save_mode): Return the original mode
19397 for predicates.
19398 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19399 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19400 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19401 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19402 functions.
19403 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
19404 does not overlap dest if the function is frame-related. Handle
19405 SVE constants.
19406 (aarch64_split_add_offset): New function.
19407 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19408 them aarch64_add_offset.
19409 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19410 and update call to aarch64_sub_sp.
19411 (aarch64_add_cfa_expression): New function.
19412 (aarch64_expand_prologue): Pass extra temporary registers to the
19413 functions above. Handle the case in which we need to emit new
19414 DW_CFA_expressions for registers that were originally saved
19415 relative to the stack pointer, but now have to be expressed
19416 relative to the frame pointer.
19417 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19418 functions above.
19419 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19420 IP0 and IP1 values for SVE frames.
19421 (aarch64_expand_vec_series): New function.
19422 (aarch64_expand_sve_widened_duplicate): Likewise.
19423 (aarch64_expand_sve_const_vector): Likewise.
19424 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19425 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19426 into the register, rather than emitting a SET directly.
19427 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19428 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19429 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19430 (offset_9bit_signed_scaled_p): New functions.
19431 (aarch64_replicate_bitmask_imm): New function.
19432 (aarch64_bitmask_imm): Use it.
19433 (aarch64_cannot_force_const_mem): Reject expressions involving
19434 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19435 (aarch64_classify_index): Handle SVE indices, by requiring
19436 a plain register index with a scale that matches the element size.
19437 (aarch64_classify_address): Handle SVE addresses. Assert that
19438 the mode of the address is VOIDmode or an integer mode.
19439 Update call to aarch64_classify_symbol.
19440 (aarch64_classify_symbolic_expression): Update call to
19441 aarch64_classify_symbol.
19442 (aarch64_const_vec_all_in_range_p): New function.
19443 (aarch64_print_vector_float_operand): Likewise.
19444 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19445 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19446 and the FP immediates 1.0 and 0.5.
19447 (aarch64_print_address_internal): Handle SVE addresses.
19448 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19449 (aarch64_regno_regclass): Handle predicate registers.
19450 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19451 data modes.
19452 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19453 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19454 (aarch64_convert_sve_vector_bits): New function.
19455 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19456 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19457 rather than an rtx.
19458 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19459 Handle SVE vector and predicate modes. Accept VL-based constants
19460 that need only one temporary register, and VL offsets that require
19461 no temporary registers.
19462 (aarch64_conditional_register_usage): Mark the predicate registers
19463 as fixed if SVE isn't available.
19464 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19465 Return true for SVE vector and predicate modes.
19466 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19467 rather than an unsigned int. Handle SVE modes.
19468 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19469 SVE modes.
19470 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19471 if SVE is enabled.
19472 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19473 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19474 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19475 (aarch64_sve_float_mul_immediate_p): New functions.
19476 (aarch64_sve_valid_immediate): New function.
19477 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19478 Explicitly reject structure modes. Check for INDEX constants.
19479 Handle PTRUE and PFALSE constants.
19480 (aarch64_check_zero_based_sve_index_immediate): New function.
19481 (aarch64_simd_imm_zero_p): Delete.
19482 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19483 vector modes. Accept constants in the range of CNT[BHWD].
19484 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19485 ask for an Advanced SIMD mode.
19486 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19487 (aarch64_simd_vector_alignment): Handle SVE predicates.
19488 (aarch64_vectorize_preferred_vector_alignment): New function.
19489 (aarch64_simd_vector_alignment_reachable): Use it instead of
19490 the vector size.
19491 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19492 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19493 functions.
19494 (MAX_VECT_LEN): Delete.
19495 (expand_vec_perm_d): Add a vec_flags field.
19496 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19497 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19498 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19499 for SVE modes.
19500 (aarch64_evpc_rev): Rename to...
19501 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19502 (aarch64_evpc_rev_global): New function.
19503 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19504 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19505 MAX_VECT_LEN.
19506 (aarch64_evpc_sve_tbl): New function.
19507 (aarch64_expand_vec_perm_const_1): Update after rename of
19508 aarch64_evpc_rev. Handle SVE permutes too, trying
19509 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19510 than aarch64_evpc_tbl.
19511 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19512 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19513 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19514 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19515 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19516 (aarch64_expand_sve_vcond): New functions.
19517 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19518 of aarch64_vector_mode_p.
19519 (aarch64_dwarf_poly_indeterminate_value): New function.
19520 (aarch64_compute_pressure_classes): Likewise.
19521 (aarch64_can_change_mode_class): Likewise.
19522 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19523 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19524 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19525 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19526 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19527 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19528 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19529 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19530 constraints.
19531 (Dn, Dl, Dr): Accept const as well as const_vector.
19532 (Dz): Likewise. Compare against CONST0_RTX.
19533 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19534 of "vector" where appropriate.
19535 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19536 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19537 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19538 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19539 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19540 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19541 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19542 (v_int_equiv): Extend to SVE modes.
19543 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19544 mode attributes.
19545 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19546 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19547 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19548 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19549 (SVE_COND_FP_CMP): New int iterators.
19550 (perm_hilo): Handle the new unpack unspecs.
19551 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19552 attributes.
19553 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19554 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19555 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19556 (aarch64_equality_operator, aarch64_constant_vector_operand)
19557 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19558 (aarch64_sve_nonimmediate_operand): Likewise.
19559 (aarch64_sve_general_operand): Likewise.
19560 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19561 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19562 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19563 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19564 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19565 (aarch64_sve_float_arith_immediate): Likewise.
19566 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19567 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19568 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19569 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19570 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19571 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19572 (aarch64_sve_float_arith_operand): Likewise.
19573 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19574 (aarch64_sve_float_mul_operand): Likewise.
19575 (aarch64_sve_vec_perm_operand): Likewise.
19576 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19577 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19578 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19579 as well as const_vector.
19580 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19581 in file. Use CONST0_RTX and CONSTM1_RTX.
19582 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19583 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19584 Use aarch64_simd_imm_zero.
19585 * config/aarch64/aarch64-sve.md: New file.
19586 * config/aarch64/aarch64.md: Include it.
19587 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19588 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19589 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19590 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19591 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19592 (sve): New attribute.
19593 (enabled): Disable instructions with the sve attribute unless
19594 TARGET_SVE.
19595 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19596 aarch64_expand_mov_immediate.
19597 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19598 CNT[BHSD] immediates.
19599 (movti): Split CONST_POLY_INT moves into two halves.
19600 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19601 Split additions that need a temporary here if the destination
19602 is the stack pointer.
19603 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19604 (*add<mode>3_poly_1): New instruction.
19605 (set_clobber_cc): New expander.
19606
19607 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19608
19609 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19610 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19611 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19612 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19613 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19614 Change innermode from fixed_mode_size to machine_mode.
19615 (simplify_subreg): Update call accordingly. Handle a constant-sized
19616 subreg of a variable-length CONST_VECTOR.
19617
19618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19619 Alan Hayward <alan.hayward@arm.com>
19620 David Sherwood <david.sherwood@arm.com>
19621
19622 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19623 (add_offset_to_base): New function, split out from...
19624 (create_mem_ref): ...here. When handling a scale other than 1,
19625 check first whether the address is valid without the offset.
19626 Add it into the base if so, leaving the index and scale as-is.
19627
19628 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19629
19630 PR c++/83778
19631 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19632 fold_for_warn before checking if arg2 is INTEGER_CST.
19633
19634 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19635
19636 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19637 (store_multiple_operation): Delete.
19638 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19639 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19640 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19641 guarded by TARGET_STRING.
19642 (rs6000_output_load_multiple): Delete.
19643 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19644 OPTION_MASK_STRING / TARGET_STRING handling.
19645 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19646 (const rs6000_opt_masks) <"string">: Change mask to 0.
19647 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19648 (MASK_STRING): Delete.
19649 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19650 parts. Simplify.
19651 (load_multiple): Delete.
19652 (*ldmsi8): Delete.
19653 (*ldmsi7): Delete.
19654 (*ldmsi6): Delete.
19655 (*ldmsi5): Delete.
19656 (*ldmsi4): Delete.
19657 (*ldmsi3): Delete.
19658 (store_multiple): Delete.
19659 (*stmsi8): Delete.
19660 (*stmsi7): Delete.
19661 (*stmsi6): Delete.
19662 (*stmsi5): Delete.
19663 (*stmsi4): Delete.
19664 (*stmsi3): Delete.
19665 (movmemsi_8reg): Delete.
19666 (corresponding unnamed define_insn): Delete.
19667 (movmemsi_6reg): Delete.
19668 (corresponding unnamed define_insn): Delete.
19669 (movmemsi_4reg): Delete.
19670 (corresponding unnamed define_insn): Delete.
19671 (movmemsi_2reg): Delete.
19672 (corresponding unnamed define_insn): Delete.
19673 (movmemsi_1reg): Delete.
19674 (corresponding unnamed define_insn): Delete.
19675 * config/rs6000/rs6000.opt (mno-string): New.
19676 (mstring): Replace by deprecation warning stub.
19677 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19678
19679 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19680
19681 * regrename.c (regrename_do_replace): If replacing the same
19682 reg multiple times, try to reuse last created gen_raw_REG.
19683
19684 PR debug/81155
19685 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19686 main to workaround a bug in GDB.
19687
19688 2018-01-12 Tom de Vries <tom@codesourcery.com>
19689
19690 PR target/83737
19691 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19692
19693 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19694
19695 PR rtl-optimization/80481
19696 * ira-color.c (get_cap_member): New function.
19697 (allocnos_conflict_by_live_ranges_p): Use it.
19698 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19699 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19700
19701 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19702
19703 PR target/83628
19704 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19705 (*saddl_se_1): Ditto.
19706 (*ssubsi_1): Ditto.
19707 (*ssubl_se_1): Ditto.
19708
19709 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19710
19711 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19712 rather than wi::to_widest for DR_INITs.
19713 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19714 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19715 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19716 INTEGER_CSTs.
19717 (vect_analyze_group_access_1): Note that here.
19718
19719 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19720
19721 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19722 polynomial type sizes.
19723
19724 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19725
19726 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19727 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19728 (gimple_add_tmp_var): Likewise.
19729
19730 2018-01-12 Martin Liska <mliska@suse.cz>
19731
19732 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19733 (gimple_alloc_sizes): Likewise.
19734 (dump_gimple_statistics): Use PRIu64 in printf format.
19735 * gimple.h: Change uint64_t to int.
19736
19737 2018-01-12 Martin Liska <mliska@suse.cz>
19738
19739 * tree-core.h: Use uint64_t instead of int.
19740 * tree.c (tree_node_counts): Likewise.
19741 (tree_node_sizes): Likewise.
19742 (dump_tree_statistics): Use PRIu64 in printf format.
19743
19744 2018-01-12 Martin Liska <mliska@suse.cz>
19745
19746 * Makefile.in: As qsort_chk is implemented in vec.c, add
19747 vec.o to linkage of gencfn-macros.
19748 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19749 passing the info to record_node_allocation_statistics.
19750 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19751 and pass the info.
19752 * ggc-common.c (struct ggc_usage): Add operator== and use
19753 it in operator< and compare function.
19754 * mem-stats.h (struct mem_usage): Likewise.
19755 * vec.c (struct vec_usage): Remove operator< and compare
19756 function. Can be simply inherited.
19757
19758 2018-01-12 Martin Jambor <mjambor@suse.cz>
19759
19760 PR target/81616
19761 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19762 * tree-ssa-math-opts.c: Include domwalk.h.
19763 (convert_mult_to_fma_1): New function.
19764 (fma_transformation_info): New type.
19765 (fma_deferring_state): Likewise.
19766 (cancel_fma_deferring): New function.
19767 (result_of_phi): Likewise.
19768 (last_fma_candidate_feeds_initial_phi): Likewise.
19769 (convert_mult_to_fma): Added deferring logic, split actual
19770 transformation to convert_mult_to_fma_1.
19771 (math_opts_dom_walker): New type.
19772 (math_opts_dom_walker::after_dom_children): New method, body moved
19773 here from pass_optimize_widening_mul::execute, added deferring logic
19774 bits.
19775 (pass_optimize_widening_mul::execute): Moved most of code to
19776 math_opts_dom_walker::after_dom_children.
19777 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19778 * config/i386/i386.c (ix86_option_override_internal): Added
19779 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19780
19781 2018-01-12 Richard Biener <rguenther@suse.de>
19782
19783 PR debug/83157
19784 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19785 inline instance vars.
19786
19787 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19788
19789 PR target/81819
19790 * config/rx/rx.c (rx_is_restricted_memory_address):
19791 Handle SUBREG case.
19792
19793 2018-01-12 Richard Biener <rguenther@suse.de>
19794
19795 PR tree-optimization/80846
19796 * target.def (split_reduction): New target hook.
19797 * targhooks.c (default_split_reduction): New function.
19798 * targhooks.h (default_split_reduction): Declare.
19799 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19800 target requests first reduce vectors by combining low and high
19801 parts.
19802 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19803 (get_vectype_for_scalar_type_and_size): Export.
19804 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19805 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19806 * doc/tm.texi: Regenerate.
19807 * config/i386/i386.c (ix86_split_reduction): Implement
19808 TARGET_VECTORIZE_SPLIT_REDUCTION.
19809
19810 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19811
19812 PR target/83368
19813 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19814 in PIC mode except for TARGET_VXWORKS_RTP.
19815 * config/sparc/sparc.c: Include cfgrtl.h.
19816 (TARGET_INIT_PIC_REG): Define.
19817 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19818 (sparc_pic_register_p): New predicate.
19819 (sparc_legitimate_address_p): Use it.
19820 (sparc_legitimize_pic_address): Likewise.
19821 (sparc_delegitimize_address): Likewise.
19822 (sparc_mode_dependent_address_p): Likewise.
19823 (gen_load_pcrel_sym): Remove 4th parameter.
19824 (load_got_register): Adjust call to above. Remove obsolete stuff.
19825 (sparc_expand_prologue): Do not call load_got_register here.
19826 (sparc_flat_expand_prologue): Likewise.
19827 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19828 (sparc_use_pseudo_pic_reg): New function.
19829 (sparc_init_pic_reg): Likewise.
19830 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19831 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19832
19833 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19834
19835 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19836 Add item for branch_cost.
19837
19838 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19839
19840 PR rtl-optimization/83565
19841 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19842 not extend the result to a larger mode for rotate operations.
19843 (num_sign_bit_copies1): Likewise.
19844
19845 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19846
19847 PR target/40411
19848 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19849 -symbolic.
19850 Use values-Xc.o for -pedantic.
19851 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19852
19853 2018-01-12 Martin Liska <mliska@suse.cz>
19854
19855 PR ipa/83054
19856 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19857 New function.
19858 (possible_polymorphic_call_targets): Use it.
19859 (ipa_devirt): Likewise.
19860
19861 2018-01-12 Martin Liska <mliska@suse.cz>
19862
19863 * profile-count.h (enum profile_quality): Use 0 as invalid
19864 enum value of profile_quality.
19865
19866 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19867
19868 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19869 -mext-string options.
19870
19871 2018-01-12 Richard Biener <rguenther@suse.de>
19872
19873 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19874 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19875 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19876 Likewise.
19877 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19878
19879 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19880
19881 * configure.ac (--with-long-double-format): Add support for the
19882 configuration option to change the default long double format on
19883 PowerPC systems.
19884 * config.gcc (powerpc*-linux*-*): Likewise.
19885 * configure: Regenerate.
19886 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19887 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19888 used without modification.
19889
19890 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19891
19892 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19893 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19894 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19895 MISC_BUILTIN_SPEC_BARRIER.
19896 (rs6000_init_builtins): Likewise.
19897 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19898 enum value.
19899 (speculation_barrier): New define_insn.
19900 * doc/extend.texi: Document __builtin_speculation_barrier.
19901
19902 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19903
19904 PR target/83203
19905 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19906 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19907 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19908 iterators.
19909 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19910 integral modes instead of "ss" and "sd".
19911 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19912 vectors with 32-bit and 64-bit elements.
19913 (vecdupssescalarmodesuffix): New mode attribute.
19914 (vec_dup<mode>): Use it.
19915
19916 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19917
19918 PR target/83330
19919 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19920 frame if argument is passed on stack.
19921
19922 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19923
19924 PR target/82682
19925 * ree.c (combine_reaching_defs): Optimize also
19926 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19927 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19928
19929 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19930
19931 PR middle-end/83189
19932 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19933
19934 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19935
19936 PR middle-end/83718
19937 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19938 after they are computed.
19939
19940 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19941
19942 PR tree-optimization/83695
19943 * gimple-loop-linterchange.cc
19944 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19945 reset cached scev information after interchange.
19946 (pass_linterchange::execute): Remove call to scev_reset_htab.
19947
19948 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19949
19950 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19951 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19952 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19953 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19954 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19955 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19956 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19957 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19958 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19959 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19960 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19961 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19962 (V_lane_reg): Likewise.
19963 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19964 New define_expand.
19965 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19966 (vfmal_lane_low<mode>_intrinsic,
19967 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19968 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19969 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19970 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19971 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19972 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19973
19974 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19975
19976 * config/arm/arm-cpus.in (fp16fml): New feature.
19977 (ALL_SIMD): Add fp16fml.
19978 (armv8.2-a): Add fp16fml as an option.
19979 (armv8.3-a): Likewise.
19980 (armv8.4-a): Add fp16fml as part of fp16.
19981 * config/arm/arm.h (TARGET_FP16FML): Define.
19982 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19983 when appropriate.
19984 * config/arm/arm-modes.def (V2HF): Define.
19985 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19986 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19987 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19988 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19989 vfmsl_low, vfmsl_high): New set of builtins.
19990 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19991 (vfml_op): New code attribute.
19992 (VFMLHALVES): New int iterator.
19993 (VFML, VFMLSEL): New mode attributes.
19994 (V_reg): Define mapping for V2HF.
19995 (V_hi, V_lo): New mode attributes.
19996 (VF_constraint): Likewise.
19997 (vfml_half, vfml_half_selector): New int attributes.
19998 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19999 define_expand.
20000 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20001 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20002 New define_insn.
20003 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20004 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20005 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20006 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
20007 documentation.
20008 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20009 Document new effective target and option set.
20010
20011 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20012
20013 * config/arm/arm-cpus.in (armv8_4): New feature.
20014 (ARMv8_4a): New fgroup.
20015 (armv8.4-a): New arch.
20016 * config/arm/arm-tables.opt: Regenerate.
20017 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20018 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20019 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20020 Add matching rules for -march=armv8.4-a and extensions.
20021 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20022
20023 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
20024
20025 PR target/81821
20026 * config/rx/rx.md (BW): New mode attribute.
20027 (sync_lock_test_and_setsi): Add mode suffix to insn output.
20028
20029 2018-01-11 Richard Biener <rguenther@suse.de>
20030
20031 PR tree-optimization/83435
20032 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20033 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20034 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20035
20036 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20037 Alan Hayward <alan.hayward@arm.com>
20038 David Sherwood <david.sherwood@arm.com>
20039
20040 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20041 field.
20042 (aarch64_classify_address): Initialize it. Track polynomial offsets.
20043 (aarch64_print_address_internal): Use it to check for a zero offset.
20044
20045 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20046 Alan Hayward <alan.hayward@arm.com>
20047 David Sherwood <david.sherwood@arm.com>
20048
20049 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20050 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20051 Return a poly_int64 rather than a HOST_WIDE_INT.
20052 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20053 rather than a HOST_WIDE_INT.
20054 * config/aarch64/aarch64.h (aarch64_frame): Protect with
20055 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
20056 hard_fp_offset, frame_size, initial_adjust, callee_offset and
20057 final_offset from HOST_WIDE_INT to poly_int64.
20058 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20059 to_constant when getting the number of units in an Advanced SIMD
20060 mode.
20061 (aarch64_builtin_vectorized_function): Check for a constant number
20062 of units.
20063 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20064 GET_MODE_SIZE.
20065 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20066 attribute instead of GET_MODE_NUNITS.
20067 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20068 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20069 GET_MODE_SIZE for fixed-size registers.
20070 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20071 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20072 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20073 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20074 (aarch64_print_operand, aarch64_print_address_internal)
20075 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20076 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20077 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20078 Handle polynomial GET_MODE_SIZE.
20079 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
20080 wider than SImode without modification.
20081 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20082 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20083 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20084 passing and returning SVE modes.
20085 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20086 rather than GEN_INT.
20087 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20088 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20089 (aarch64_allocate_and_probe_stack_space): Likewise.
20090 (aarch64_layout_frame): Cope with polynomial offsets.
20091 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20092 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
20093 polynomial offsets.
20094 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20095 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20096 poly_int64 rather than a HOST_WIDE_INT.
20097 (aarch64_get_separate_components, aarch64_process_components)
20098 (aarch64_expand_prologue, aarch64_expand_epilogue)
20099 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20100 (aarch64_anchor_offset): New function, split out from...
20101 (aarch64_legitimize_address): ...here.
20102 (aarch64_builtin_vectorization_cost): Handle polynomial
20103 TYPE_VECTOR_SUBPARTS.
20104 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20105 GET_MODE_NUNITS.
20106 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20107 number of elements from the PARALLEL rather than the mode.
20108 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20109 rather than GET_MODE_BITSIZE.
20110 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20111 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20112 (aarch64_expand_vec_perm_const_1): Handle polynomial
20113 d->perm.length () and d->perm elements.
20114 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
20115 Apply to_constant to d->perm elements.
20116 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20117 polynomial CONST_VECTOR_NUNITS.
20118 (aarch64_move_pointer): Take amount as a poly_int64 rather
20119 than an int.
20120 (aarch64_progress_pointer): Avoid temporary variable.
20121 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20122 the mode attribute instead of GET_MODE.
20123
20124 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20125 Alan Hayward <alan.hayward@arm.com>
20126 David Sherwood <david.sherwood@arm.com>
20127
20128 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20129 x exists before using it.
20130 (aarch64_add_constant_internal): Rename to...
20131 (aarch64_add_offset_1): ...this. Replace regnum with separate
20132 src and dest rtxes. Handle the case in which they're different,
20133 including when the offset is zero. Replace scratchreg with an rtx.
20134 Use 2 additions if there is no spare register into which we can
20135 move a 16-bit constant.
20136 (aarch64_add_constant): Delete.
20137 (aarch64_add_offset): Replace reg with separate src and dest
20138 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
20139 Use aarch64_add_offset_1.
20140 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20141 an rtx rather than an int. Take the delta as a poly_int64
20142 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
20143 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20144 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20145 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20146 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20147 and aarch64_add_sp.
20148 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20149 aarch64_add_constant.
20150
20151 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20152
20153 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20154 Use scalar_float_mode.
20155
20156 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20157
20158 * config/aarch64/aarch64-simd.md
20159 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20160 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20161 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20162 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20163 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20164 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20165 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20166 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20167 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20168 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20169
20170 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20171
20172 PR target/83514
20173 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20174 targ_options->x_arm_arch_string is non NULL.
20175
20176 2018-01-11 Tamar Christina <tamar.christina@arm.com>
20177
20178 * config/aarch64/aarch64.h
20179 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
20180
20181 2018-01-11 Sudakshina Das <sudi.das@arm.com>
20182
20183 PR target/82096
20184 * expmed.c (emit_store_flag_force): Swap if const op0
20185 and change VOIDmode to mode of op0.
20186
20187 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20188
20189 PR rtl-optimization/83761
20190 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20191 than bytes to mode_for_size.
20192
20193 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20194
20195 PR middle-end/83189
20196 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20197 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20198 profile.
20199
20200 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20201
20202 PR middle-end/83575
20203 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20204 when in layout mode.
20205 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20206 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20207 partition fixup.
20208
20209 2018-01-10 Michael Collison <michael.collison@arm.com>
20210
20211 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20212 * config/aarch64/aarch64-option-extension.def: Add
20213 AARCH64_OPT_EXTENSION of 'fp16fml'.
20214 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20215 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20216 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20217 * config/aarch64/constraints.md (Ui7): New constraint.
20218 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20219 (VFMLA_SEL_W): Ditto.
20220 (f16quad): Ditto.
20221 (f16mac1): Ditto.
20222 (VFMLA16_LOW): New int iterator.
20223 (VFMLA16_HIGH): Ditto.
20224 (UNSPEC_FMLAL): New unspec.
20225 (UNSPEC_FMLSL): Ditto.
20226 (UNSPEC_FMLAL2): Ditto.
20227 (UNSPEC_FMLSL2): Ditto.
20228 (f16mac): New code attribute.
20229 * config/aarch64/aarch64-simd-builtins.def
20230 (aarch64_fmlal_lowv2sf): Ditto.
20231 (aarch64_fmlsl_lowv2sf): Ditto.
20232 (aarch64_fmlalq_lowv4sf): Ditto.
20233 (aarch64_fmlslq_lowv4sf): Ditto.
20234 (aarch64_fmlal_highv2sf): Ditto.
20235 (aarch64_fmlsl_highv2sf): Ditto.
20236 (aarch64_fmlalq_highv4sf): Ditto.
20237 (aarch64_fmlslq_highv4sf): Ditto.
20238 (aarch64_fmlal_lane_lowv2sf): Ditto.
20239 (aarch64_fmlsl_lane_lowv2sf): Ditto.
20240 (aarch64_fmlal_laneq_lowv2sf): Ditto.
20241 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20242 (aarch64_fmlalq_lane_lowv4sf): Ditto.
20243 (aarch64_fmlsl_lane_lowv4sf): Ditto.
20244 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20245 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20246 (aarch64_fmlal_lane_highv2sf): Ditto.
20247 (aarch64_fmlsl_lane_highv2sf): Ditto.
20248 (aarch64_fmlal_laneq_highv2sf): Ditto.
20249 (aarch64_fmlsl_laneq_highv2sf): Ditto.
20250 (aarch64_fmlalq_lane_highv4sf): Ditto.
20251 (aarch64_fmlsl_lane_highv4sf): Ditto.
20252 (aarch64_fmlalq_laneq_highv4sf): Ditto.
20253 (aarch64_fmlsl_laneq_highv4sf): Ditto.
20254 * config/aarch64/aarch64-simd.md:
20255 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20256 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20257 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20258 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20259 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20260 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20261 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20262 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20263 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20264 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20265 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20266 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20267 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20268 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20269 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20270 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20271 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20272 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20273 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20274 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20275 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20276 (vfmlsl_low_u32): Ditto.
20277 (vfmlalq_low_u32): Ditto.
20278 (vfmlslq_low_u32): Ditto.
20279 (vfmlal_high_u32): Ditto.
20280 (vfmlsl_high_u32): Ditto.
20281 (vfmlalq_high_u32): Ditto.
20282 (vfmlslq_high_u32): Ditto.
20283 (vfmlal_lane_low_u32): Ditto.
20284 (vfmlsl_lane_low_u32): Ditto.
20285 (vfmlal_laneq_low_u32): Ditto.
20286 (vfmlsl_laneq_low_u32): Ditto.
20287 (vfmlalq_lane_low_u32): Ditto.
20288 (vfmlslq_lane_low_u32): Ditto.
20289 (vfmlalq_laneq_low_u32): Ditto.
20290 (vfmlslq_laneq_low_u32): Ditto.
20291 (vfmlal_lane_high_u32): Ditto.
20292 (vfmlsl_lane_high_u32): Ditto.
20293 (vfmlal_laneq_high_u32): Ditto.
20294 (vfmlsl_laneq_high_u32): Ditto.
20295 (vfmlalq_lane_high_u32): Ditto.
20296 (vfmlslq_lane_high_u32): Ditto.
20297 (vfmlalq_laneq_high_u32): Ditto.
20298 (vfmlslq_laneq_high_u32): Ditto.
20299 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20300 (AARCH64_FL_FOR_ARCH8_4): New.
20301 (AARCH64_ISA_F16FML): New ISA flag.
20302 (TARGET_F16FML): New feature flag for fp16fml.
20303 (doc/invoke.texi): Document new fp16fml option.
20304
20305 2018-01-10 Michael Collison <michael.collison@arm.com>
20306
20307 * config/aarch64/aarch64-builtins.c:
20308 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20309 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20310 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20311 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20312 (AARCH64_ISA_SHA3): New ISA flag.
20313 (TARGET_SHA3): New feature flag for sha3.
20314 * config/aarch64/iterators.md (sha512_op): New int attribute.
20315 (CRYPTO_SHA512): New int iterator.
20316 (UNSPEC_SHA512H): New unspec.
20317 (UNSPEC_SHA512H2): Ditto.
20318 (UNSPEC_SHA512SU0): Ditto.
20319 (UNSPEC_SHA512SU1): Ditto.
20320 * config/aarch64/aarch64-simd-builtins.def
20321 (aarch64_crypto_sha512hqv2di): New builtin.
20322 (aarch64_crypto_sha512h2qv2di): Ditto.
20323 (aarch64_crypto_sha512su0qv2di): Ditto.
20324 (aarch64_crypto_sha512su1qv2di): Ditto.
20325 (aarch64_eor3qv8hi): Ditto.
20326 (aarch64_rax1qv2di): Ditto.
20327 (aarch64_xarqv2di): Ditto.
20328 (aarch64_bcaxqv8hi): Ditto.
20329 * config/aarch64/aarch64-simd.md:
20330 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20331 (aarch64_crypto_sha512su0qv2di): Ditto.
20332 (aarch64_crypto_sha512su1qv2di): Ditto.
20333 (aarch64_eor3qv8hi): Ditto.
20334 (aarch64_rax1qv2di): Ditto.
20335 (aarch64_xarqv2di): Ditto.
20336 (aarch64_bcaxqv8hi): Ditto.
20337 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20338 (vsha512h2q_u64): Ditto.
20339 (vsha512su0q_u64): Ditto.
20340 (vsha512su1q_u64): Ditto.
20341 (veor3q_u16): Ditto.
20342 (vrax1q_u64): Ditto.
20343 (vxarq_u64): Ditto.
20344 (vbcaxq_u16): Ditto.
20345 * config/arm/types.md (crypto_sha512): New type attribute.
20346 (crypto_sha3): Ditto.
20347 (doc/invoke.texi): Document new sha3 option.
20348
20349 2018-01-10 Michael Collison <michael.collison@arm.com>
20350
20351 * config/aarch64/aarch64-builtins.c:
20352 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20353 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20354 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20355 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20356 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20357 (AARCH64_ISA_SM4): New ISA flag.
20358 (TARGET_SM4): New feature flag for sm4.
20359 * config/aarch64/aarch64-simd-builtins.def
20360 (aarch64_sm3ss1qv4si): Ditto.
20361 (aarch64_sm3tt1aq4si): Ditto.
20362 (aarch64_sm3tt1bq4si): Ditto.
20363 (aarch64_sm3tt2aq4si): Ditto.
20364 (aarch64_sm3tt2bq4si): Ditto.
20365 (aarch64_sm3partw1qv4si): Ditto.
20366 (aarch64_sm3partw2qv4si): Ditto.
20367 (aarch64_sm4eqv4si): Ditto.
20368 (aarch64_sm4ekeyqv4si): Ditto.
20369 * config/aarch64/aarch64-simd.md:
20370 (aarch64_sm3ss1qv4si): Ditto.
20371 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20372 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20373 (aarch64_sm4eqv4si): Ditto.
20374 (aarch64_sm4ekeyqv4si): Ditto.
20375 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20376 (sm3part_op): Ditto.
20377 (CRYPTO_SM3TT): Ditto.
20378 (CRYPTO_SM3PART): Ditto.
20379 (UNSPEC_SM3SS1): New unspec.
20380 (UNSPEC_SM3TT1A): Ditto.
20381 (UNSPEC_SM3TT1B): Ditto.
20382 (UNSPEC_SM3TT2A): Ditto.
20383 (UNSPEC_SM3TT2B): Ditto.
20384 (UNSPEC_SM3PARTW1): Ditto.
20385 (UNSPEC_SM3PARTW2): Ditto.
20386 (UNSPEC_SM4E): Ditto.
20387 (UNSPEC_SM4EKEY): Ditto.
20388 * config/aarch64/constraints.md (Ui2): New constraint.
20389 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20390 * config/arm/types.md (crypto_sm3): New type attribute.
20391 (crypto_sm4): Ditto.
20392 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20393 (vsm3tt1aq_u32): Ditto.
20394 (vsm3tt1bq_u32): Ditto.
20395 (vsm3tt2aq_u32): Ditto.
20396 (vsm3tt2bq_u32): Ditto.
20397 (vsm3partw1q_u32): Ditto.
20398 (vsm3partw2q_u32): Ditto.
20399 (vsm4eq_u32): Ditto.
20400 (vsm4ekeyq_u32): Ditto.
20401 (doc/invoke.texi): Document new sm4 option.
20402
20403 2018-01-10 Michael Collison <michael.collison@arm.com>
20404
20405 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20406 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20407 (AARCH64_FL_FOR_ARCH8_4): New.
20408 (AARCH64_FL_V8_4): New flag.
20409 (doc/invoke.texi): Document new armv8.4-a option.
20410
20411 2018-01-10 Michael Collison <michael.collison@arm.com>
20412
20413 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20414 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20415 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20416 * config/aarch64/aarch64-option-extension.def: Add
20417 AARCH64_OPT_EXTENSION of 'sha2'.
20418 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20419 (crypto): Disable sha2 and aes if crypto disabled.
20420 (crypto): Enable aes and sha2 if enabled.
20421 (simd): Disable sha2 and aes if simd disabled.
20422 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20423 New flags.
20424 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20425 (TARGET_SHA2): New feature flag for sha2.
20426 (TARGET_AES): New feature flag for aes.
20427 * config/aarch64/aarch64-simd.md:
20428 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20429 conditional on TARGET_AES.
20430 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20431 (aarch64_crypto_sha1hsi): Make pattern conditional
20432 on TARGET_SHA2.
20433 (aarch64_crypto_sha1hv4si): Ditto.
20434 (aarch64_be_crypto_sha1hv4si): Ditto.
20435 (aarch64_crypto_sha1su1v4si): Ditto.
20436 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20437 (aarch64_crypto_sha1su0v4si): Ditto.
20438 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20439 (aarch64_crypto_sha256su0v4si): Ditto.
20440 (aarch64_crypto_sha256su1v4si): Ditto.
20441 (doc/invoke.texi): Document new aes and sha2 options.
20442
20443 2018-01-10 Martin Sebor <msebor@redhat.com>
20444
20445 PR tree-optimization/83781
20446 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20447 as string arrays.
20448
20449 2018-01-11 Martin Sebor <msebor@gmail.com>
20450 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20451
20452 PR tree-optimization/83501
20453 PR tree-optimization/81703
20454
20455 * tree-ssa-strlen.c (get_string_cst): Rename...
20456 (get_string_len): ...to this. Handle global constants.
20457 (handle_char_store): Adjust.
20458
20459 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20460 Jim Wilson <jimw@sifive.com>
20461
20462 * config/riscv/riscv-protos.h (riscv_output_return): New.
20463 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20464 (riscv_attribute_table, riscv_output_return),
20465 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20466 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20467 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20468 function.
20469 (riscv_expand_prologue): Add early return for naked function.
20470 (riscv_expand_epilogue): Likewise.
20471 (riscv_function_ok_for_sibcall): Return false for naked function.
20472 (riscv_set_current_function): New.
20473 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20474 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20475 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20476 * doc/extend.texi (RISC-V Function Attributes): New.
20477
20478 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20479
20480 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20481 check for 128-bit long double before checking TCmode.
20482 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20483 128-bit long doubles before checking TFmode or TCmode.
20484 (FLOAT128_IBM_P): Likewise.
20485
20486 2018-01-10 Martin Sebor <msebor@redhat.com>
20487
20488 PR tree-optimization/83671
20489 * builtins.c (c_strlen): Unconditionally return zero for the empty
20490 string.
20491 Use -Warray-bounds for warnings.
20492 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20493 for non-constant array indices with COMPONENT_REF, arrays of
20494 arrays, and pointers to arrays.
20495 (gimple_fold_builtin_strlen): Determine and set length range for
20496 non-constant character arrays.
20497
20498 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20499
20500 PR middle-end/81897
20501 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20502 empty blocks.
20503
20504 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20505
20506 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20507
20508 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20509
20510 PR target/83399
20511 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20512 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20513 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20514 indexed_or_indirect_operand predicate.
20515 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20516 (*vsx_le_perm_load_v8hi): Likewise.
20517 (*vsx_le_perm_load_v16qi): Likewise.
20518 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20519 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20520 (*vsx_le_perm_store_v8hi): Likewise.
20521 (*vsx_le_perm_store_v16qi): Likewise.
20522 (eight unnamed splitters): Likewise.
20523
20524 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20525
20526 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20527 * config/rs6000/emmintrin.h: Likewise.
20528 * config/rs6000/mmintrin.h: Likewise.
20529 * config/rs6000/xmmintrin.h: Likewise.
20530
20531 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20532
20533 PR c++/43486
20534 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20535 "public_flag".
20536 * tree.c (tree_nop_conversion): Return true for location wrapper
20537 nodes.
20538 (maybe_wrap_with_location): New function.
20539 (selftest::check_strip_nops): New function.
20540 (selftest::test_location_wrappers): New function.
20541 (selftest::tree_c_tests): Call it.
20542 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20543 (maybe_wrap_with_location): New decl.
20544 (EXPR_LOCATION_WRAPPER_P): New macro.
20545 (location_wrapper_p): New inline function.
20546 (tree_strip_any_location_wrapper): New inline function.
20547
20548 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20549
20550 PR target/83735
20551 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20552 stack_realign_offset for the largest alignment of stack slot
20553 actually used.
20554 (ix86_find_max_used_stack_alignment): New function.
20555 (ix86_finalize_stack_frame_flags): Use it. Set
20556 max_used_stack_alignment if we don't realign stack.
20557 * config/i386/i386.h (machine_function): Add
20558 max_used_stack_alignment.
20559
20560 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20561
20562 * config/arm/arm.opt (-mbranch-cost): New option.
20563 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20564 account.
20565
20566 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20567
20568 PR target/83629
20569 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20570 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20571
20572 2018-01-10 Richard Biener <rguenther@suse.de>
20573
20574 PR debug/83765
20575 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20576 early out so it also covers the case where we have a non-NULL
20577 origin.
20578
20579 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20580
20581 PR tree-optimization/83753
20582 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20583 for non-strided grouped accesses if the number of elements is 1.
20584
20585 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20586
20587 PR target/81616
20588 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20589 * i386.h (TARGET_USE_GATHER): Define.
20590 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20591
20592 2018-01-10 Martin Liska <mliska@suse.cz>
20593
20594 PR bootstrap/82831
20595 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20596 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20597 partitioning.
20598 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20599 CLEANUP_NO_PARTITIONING is not set.
20600
20601 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20602
20603 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20604 for vectors, as a partial revert of r254296.
20605 * rtl.h (const_vec_p): Delete.
20606 (const_vec_duplicate_p): Don't test for vector CONSTs.
20607 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20608 * expmed.c (make_tree): Likewise.
20609
20610 Revert:
20611 * common.md (E, F): Use CONSTANT_P instead of checking for
20612 CONST_VECTOR.
20613 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20614 checking for CONST_VECTOR.
20615
20616 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20617
20618 PR middle-end/83575
20619 * predict.c (force_edge_cold): Handle in more sane way edges
20620 with no prediction.
20621
20622 2018-01-09 Carl Love <cel@us.ibm.com>
20623
20624 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20625 V4SI, V4SF types.
20626 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20627 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20628 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20629 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20630 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20631 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20632 * config/rs6000/rs6000-protos.h: Add extern defition for
20633 rs6000_generate_float2_double_code.
20634 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20635 function.
20636 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20637 (float2_v2df): Add define_expand.
20638
20639 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20640
20641 PR target/83628
20642 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20643 op_mode in the force_to_mode call.
20644
20645 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20646
20647 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20648 instead of checking each element individually.
20649 (aarch64_evpc_uzp): Likewise.
20650 (aarch64_evpc_zip): Likewise.
20651 (aarch64_evpc_ext): Likewise.
20652 (aarch64_evpc_rev): Likewise.
20653 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20654 instead of checking each element individually. Return true without
20655 generating rtl if
20656 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20657 whether all selected elements come from the same input, instead of
20658 checking each element individually. Remove calls to gen_rtx_REG,
20659 start_sequence and end_sequence and instead assert that no rtl is
20660 generated.
20661
20662 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20663
20664 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20665 order of HIGH and CONST checks.
20666
20667 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20668
20669 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20670 if the destination isn't an SSA_NAME.
20671
20672 2018-01-09 Richard Biener <rguenther@suse.de>
20673
20674 PR tree-optimization/83668
20675 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20676 move prologue...
20677 (canonicalize_loop_form): ... here, renamed from ...
20678 (canonicalize_loop_closed_ssa_form): ... this and amended to
20679 swap successor edges for loop exit blocks to make us use
20680 the RPO order we need for initial schedule generation.
20681
20682 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20683
20684 PR tree-optimization/64811
20685 * match.pd: When optimizing comparisons with Inf, avoid
20686 introducing or losing exceptions from comparisons with NaN.
20687
20688 2018-01-09 Martin Liska <mliska@suse.cz>
20689
20690 PR sanitizer/82517
20691 * asan.c (shadow_mem_size): Add gcc_assert.
20692
20693 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20694
20695 Don't save registers in main().
20696
20697 PR target/83738
20698 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20699 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20700 * config/avr/avr.c (avr_set_current_function): Don't error if
20701 naked, OS_task or OS_main are specified at the same time.
20702 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20703 OS_main.
20704 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20705 attribute.
20706 * common/config/avr/avr-common.c (avr_option_optimization_table):
20707 Switch on -mmain-is-OS_task for optimizing compilations.
20708
20709 2018-01-09 Richard Biener <rguenther@suse.de>
20710
20711 PR tree-optimization/83572
20712 * graphite.c: Include cfganal.h.
20713 (graphite_transform_loops): Connect infinite loops to exit
20714 and remove fake edges at the end.
20715
20716 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20717
20718 * ipa-inline.c (edge_badness): Revert accidental checkin.
20719
20720 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20721
20722 PR ipa/80763
20723 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20724 symbols; not inline clones.
20725
20726 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20727
20728 PR target/83507
20729 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20730 hard registers. Formatting fixes.
20731
20732 PR preprocessor/83722
20733 * gcc.c (try_generate_repro): Pass
20734 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20735 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20736 do_report_bug.
20737
20738 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20739 Kito Cheng <kito.cheng@gmail.com>
20740
20741 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20742 (riscv_leaf_function_p): Delete.
20743 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20744
20745 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20746
20747 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20748 function.
20749 (do_ifelse): New function.
20750 (do_isel): New function.
20751 (do_sub3): New function.
20752 (do_add3): New function.
20753 (do_load_mask_compare): New function.
20754 (do_overlap_load_compare): New function.
20755 (expand_compare_loop): New function.
20756 (expand_block_compare): Call expand_compare_loop() when appropriate.
20757 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20758 option description.
20759 (-mblock-compare-inline-loop-limit): New option.
20760
20761 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20762
20763 PR target/83677
20764 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20765 Reverse order of second and third operands in first alternative.
20766 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20767 of first and second elements in UNSPEC_VPERMR vector.
20768 (altivec_expand_vec_perm_le): Likewise.
20769
20770 2018-01-08 Jeff Law <law@redhat.com>
20771
20772 PR rtl-optimizatin/81308
20773 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20774 (process_switch): If group_case_labels makes a change, then set
20775 cfg_altered.
20776 (pass_convert_switch::execute): If a switch is converted, then
20777 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20778
20779 PR rtl-optimization/81308
20780 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20781 splitting insns.
20782
20783 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20784
20785 PR target/83663 - Revert r255946
20786 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20787 generation for cases where splatting a value is not useful.
20788 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20789 across a vec_duplicate and a paradoxical subreg forming a vector
20790 mode to a vec_concat.
20791
20792 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20793
20794 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20795 -march=armv8.3-a variants.
20796 * config/arm/t-multilib: Likewise.
20797 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20798
20799 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20800
20801 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20802 to generate rtl.
20803 (cceq_ior_compare_complement): Give it a name so I can use it, and
20804 change boolean_or_operator predicate to boolean_operator so it can
20805 be used to generate a crand.
20806 (eqne): New code iterator.
20807 (bd/bd_neg): New code_attrs.
20808 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20809 a single define_insn.
20810 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20811 decrement (bdnzt/bdnzf/bdzt/bdzf).
20812 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20813 with the new names of the branch decrement patterns, and added the
20814 names of the branch decrement conditional patterns.
20815
20816 2018-01-08 Richard Biener <rguenther@suse.de>
20817
20818 PR tree-optimization/83563
20819 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20820 cache.
20821
20822 2018-01-08 Richard Biener <rguenther@suse.de>
20823
20824 PR middle-end/83713
20825 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20826
20827 2018-01-08 Richard Biener <rguenther@suse.de>
20828
20829 PR tree-optimization/83685
20830 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20831 references to abnormals.
20832
20833 2018-01-08 Richard Biener <rguenther@suse.de>
20834
20835 PR lto/83719
20836 * dwarf2out.c (output_indirect_strings): Handle empty
20837 skeleton_debug_str_hash.
20838 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20839
20840 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20841
20842 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20843 (emit_store_direct): Likewise.
20844 (arc_trampoline_adjust_address): Likewise.
20845 (arc_asm_trampoline_template): New function.
20846 (arc_initialize_trampoline): Use asm_trampoline_template.
20847 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20848 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20849 * config/arc/arc.md (flush_icache): Delete pattern.
20850
20851 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20852
20853 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20854 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20855 munaligned-access.
20856
20857 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20858
20859 PR target/83681
20860 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20861 by not USED_FOR_TARGET.
20862 (make_pass_resolve_sw_modes): Likewise.
20863
20864 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20865
20866 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20867 USED_FOR_TARGET.
20868
20869 2018-01-08 Richard Biener <rguenther@suse.de>
20870
20871 PR middle-end/83580
20872 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20873
20874 2018-01-08 Richard Biener <rguenther@suse.de>
20875
20876 PR middle-end/83517
20877 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20878
20879 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20880
20881 PR middle-end/81897
20882 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20883 basic blocks with a small number of successors.
20884 (convert_control_dep_chain_into_preds): Improve handling of
20885 forwarder blocks.
20886 (dump_predicates): Split apart into...
20887 (dump_pred_chain): ...here...
20888 (dump_pred_info): ...and here.
20889 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20890 (can_chain_union_be_invalidated_p): Improve check for invalidation
20891 of paths.
20892 (uninit_uses_cannot_happen): Avoid unnecessary if
20893 convert_control_dep_chain_into_preds yielded nothing.
20894
20895 2018-01-06 Martin Sebor <msebor@redhat.com>
20896
20897 PR tree-optimization/83640
20898 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20899 subtracting negative offset from size.
20900 (builtin_access::overlap): Adjust offset bounds of the access to fall
20901 within the size of the object if possible.
20902
20903 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20904
20905 PR rtl-optimization/83699
20906 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20907 extract_bit_field_as_subreg to cases in which the extracted
20908 value is also a vector.
20909
20910 * lra-constraints.c (process_alt_operands): Test for the equivalence
20911 substitutions when detecting a possible reload cycle.
20912
20913 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20914
20915 PR debug/83480
20916 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20917 by default if flag_selective_schedling{,2}. Formatting fixes.
20918
20919 PR rtl-optimization/83682
20920 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20921 if it has non-VECTOR_MODE element mode.
20922 (vec_duplicate_p): Likewise.
20923
20924 PR middle-end/83694
20925 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20926 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20927
20928 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20929
20930 PR target/83604
20931 * config/i386/i386-builtin.def
20932 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20933 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20934 Require also OPTION_MASK_ISA_AVX512F in addition to
20935 OPTION_MASK_ISA_GFNI.
20936 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20937 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20938 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20939 to OPTION_MASK_ISA_GFNI.
20940 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20941 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20942 OPTION_MASK_ISA_AVX512BW.
20943 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20944 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20945 addition to OPTION_MASK_ISA_GFNI.
20946 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20947 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20948 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20949 to OPTION_MASK_ISA_GFNI.
20950 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20951 a requirement for all ISAs rather than any of them with a few
20952 exceptions.
20953 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20954 processing.
20955 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20956 bitmasks to be enabled with 3 exceptions, instead of requiring any
20957 enabled ISA with lots of exceptions.
20958 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20959 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20960 Change avx512bw in isa attribute to avx512f.
20961 * config/i386/sgxintrin.h: Add license boilerplate.
20962 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20963 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20964 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20965 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20966 defined.
20967 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20968 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20969 temporarily sse2 rather than sse if not enabled already.
20970
20971 PR target/83604
20972 * config/i386/sse.md (VI248_VLBW): Rename to ...
20973 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20974 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20975 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20976 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20977 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20978 mode iterator instead of VI248_VLBW.
20979
20980 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20981
20982 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20983 (record_modified): Skip clobbers; add debug output.
20984 (param_change_prob): Use sreal frequencies.
20985
20986 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20987
20988 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20989 punt for user-aligned variables.
20990
20991 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20992
20993 * tree-chrec.c (chrec_contains_symbols): Return true for
20994 POLY_INT_CST.
20995
20996 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20997
20998 PR target/82439
20999 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21000 of (x|y) == x for BICS pattern.
21001
21002 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21003
21004 PR tree-optimization/83605
21005 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21006 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21007 can throw.
21008
21009 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
21010
21011 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21012 * config/epiphany/rtems.h: New file.
21013
21014 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21015 Uros Bizjak <ubizjak@gmail.com>
21016
21017 PR target/83554
21018 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21019 QIreg_operand instead of register_operand predicate.
21020 * config/i386/i386.c (ix86_rop_should_change_byte_p,
21021 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21022 comments instead of -fmitigate[-_]rop.
21023
21024 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21025
21026 PR bootstrap/81926
21027 * cgraphunit.c (symbol_table::compile): Switch to text_section
21028 before calling assembly_start debug hook.
21029 * run-rtl-passes.c (run_rtl_passes): Likewise.
21030 Include output.h.
21031
21032 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21033
21034 * tree-vrp.c (extract_range_from_binary_expr_1): Check
21035 range_int_cst_p rather than !symbolic_range_p before calling
21036 extract_range_from_multiplicative_op_1.
21037
21038 2018-01-04 Jeff Law <law@redhat.com>
21039
21040 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21041 redundant test in assertion.
21042
21043 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21044
21045 * doc/rtl.texi: Document machine_mode wrapper classes.
21046
21047 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21048
21049 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21050 using tree_to_uhwi.
21051
21052 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21053
21054 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21055 the VEC_PERM_EXPR fold to fail.
21056
21057 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21058
21059 PR debug/83585
21060 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21061 to switched_sections.
21062
21063 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21064
21065 PR target/83680
21066 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21067 test for d.testing.
21068
21069 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
21070
21071 PR target/83387
21072 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21073 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21074
21075 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21076
21077 PR debug/83666
21078 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21079 is BLKmode and bitpos not zero or mode change is needed.
21080
21081 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21082
21083 PR target/83675
21084 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21085 TARGET_VIS2.
21086
21087 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
21088
21089 PR target/83628
21090 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21091 instead of MULT rtx. Update all corresponding splitters.
21092 (*saddl_se): Ditto.
21093 (*ssub<modesuffix>): Ditto.
21094 (*ssubl_se): Ditto.
21095 (*cmp_sadd_di): Update split patterns.
21096 (*cmp_sadd_si): Ditto.
21097 (*cmp_sadd_sidi): Ditto.
21098 (*cmp_ssub_di): Ditto.
21099 (*cmp_ssub_si): Ditto.
21100 (*cmp_ssub_sidi): Ditto.
21101 * config/alpha/predicates.md (const23_operand): New predicate.
21102 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21103 Look for ASHIFT, not MULT inner operand.
21104 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21105
21106 2018-01-04 Martin Liska <mliska@suse.cz>
21107
21108 PR gcov-profile/83669
21109 * gcov.c (output_intermediate_file): Add version to intermediate
21110 gcov file.
21111 * doc/gcov.texi: Document new field 'version' in intermediate
21112 file format. Fix location of '-k' option of gcov command.
21113
21114 2018-01-04 Martin Liska <mliska@suse.cz>
21115
21116 PR ipa/82352
21117 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21118
21119 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21120
21121 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21122
21123 2018-01-03 Martin Sebor <msebor@redhat.com>
21124
21125 PR tree-optimization/83655
21126 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21127 checking calls with invalid arguments.
21128
21129 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21130
21131 * tree-vect-stmts.c (vect_get_store_rhs): New function.
21132 (vectorizable_mask_load_store): Delete.
21133 (vectorizable_call): Return false for masked loads and stores.
21134 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
21135 instead of gimple_assign_rhs1.
21136 (vectorizable_load): Handle IFN_MASK_LOAD.
21137 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21138
21139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21140
21141 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21142 split out from..,
21143 (vectorizable_mask_load_store): ...here.
21144 (vectorizable_load): ...and here.
21145
21146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21147
21148 * tree-vect-stmts.c (vect_build_all_ones_mask)
21149 (vect_build_zero_merge_argument): New functions, split out from...
21150 (vectorizable_load): ...here.
21151
21152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21153
21154 * tree-vect-stmts.c (vect_check_store_rhs): New function,
21155 split out from...
21156 (vectorizable_mask_load_store): ...here.
21157 (vectorizable_store): ...and here.
21158
21159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21160
21161 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21162 split out from...
21163 (vectorizable_mask_load_store): ...here.
21164
21165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21166
21167 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21168 (vect_model_store_cost): Take a vec_load_store_type instead of a
21169 vect_def_type.
21170 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21171 (vect_model_store_cost): Take a vec_load_store_type instead of a
21172 vect_def_type.
21173 (vectorizable_mask_load_store): Update accordingly.
21174 (vectorizable_store): Likewise.
21175 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21176
21177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21178
21179 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21180 IFN_MASK_LOAD calls here rather than...
21181 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21182
21183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21184 Alan Hayward <alan.hayward@arm.com>
21185 David Sherwood <david.sherwood@arm.com>
21186
21187 * expmed.c (extract_bit_field_1): For vector extracts,
21188 fall back to extract_bit_field_as_subreg if vec_extract
21189 isn't available.
21190
21191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21192 Alan Hayward <alan.hayward@arm.com>
21193 David Sherwood <david.sherwood@arm.com>
21194
21195 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21196 they are variable or constant sized.
21197 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21198 slots for constant-sized data.
21199
21200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21201 Alan Hayward <alan.hayward@arm.com>
21202 David Sherwood <david.sherwood@arm.com>
21203
21204 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21205 handling COND_EXPRs with boolean comparisons, try to find a better
21206 basis for the mask type than the boolean itself.
21207
21208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21209
21210 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21211 is calculated and how it can be overridden.
21212 * genmodes.c (max_bitsize_mode_any_mode): New variable.
21213 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21214 if defined.
21215 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21216 if nonzero.
21217
21218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21219 Alan Hayward <alan.hayward@arm.com>
21220 David Sherwood <david.sherwood@arm.com>
21221
21222 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21223 Remove the mode argument.
21224 (aarch64_simd_valid_immediate): Remove the mode and inverse
21225 arguments.
21226 * config/aarch64/iterators.md (bitsize): New iterator.
21227 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21228 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21229 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21230 aarch64_simd_valid_immediate.
21231 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21232 (aarch64_reg_or_bic_imm): Likewise.
21233 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21234 with an insn_type enum and msl with a modifier_type enum.
21235 Replace element_width with a scalar_mode. Change the shift
21236 to unsigned int. Add constructors for scalar_float_mode and
21237 scalar_int_mode elements.
21238 (aarch64_vect_float_const_representable_p): Delete.
21239 (aarch64_can_const_movi_rtx_p)
21240 (aarch64_simd_scalar_immediate_valid_for_move)
21241 (aarch64_simd_make_constant): Update call to
21242 aarch64_simd_valid_immediate.
21243 (aarch64_advsimd_valid_immediate_hs): New function.
21244 (aarch64_advsimd_valid_immediate): Likewise.
21245 (aarch64_simd_valid_immediate): Remove mode and inverse
21246 arguments. Rewrite to use the above. Use const_vec_duplicate_p
21247 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21248 and aarch64_float_const_representable_p on the result.
21249 (aarch64_output_simd_mov_immediate): Remove mode argument.
21250 Update call to aarch64_simd_valid_immediate and use of
21251 simd_immediate_info.
21252 (aarch64_output_scalar_simd_mov_immediate): Update call
21253 accordingly.
21254
21255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21256 Alan Hayward <alan.hayward@arm.com>
21257 David Sherwood <david.sherwood@arm.com>
21258
21259 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21260 (mode_nunits): Likewise CONST_MODE_NUNITS.
21261 * machmode.def (ADJUST_NUNITS): Document.
21262 * genmodes.c (mode_data::need_nunits_adj): New field.
21263 (blank_mode): Update accordingly.
21264 (adj_nunits): New variable.
21265 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21266 parameter.
21267 (emit_mode_size_inline): Set need_bytesize_adj for all modes
21268 listed in adj_nunits.
21269 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21270 listed in adj_nunits. Don't emit case statements for such modes.
21271 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21272 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
21273 nothing if adj_nunits is nonnull.
21274 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21275 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21276 (emit_mode_fbit): Update use of print_maybe_const_decl.
21277 (emit_move_size): Likewise. Treat the array as non-const
21278 if adj_nunits.
21279 (emit_mode_adjustments): Handle adj_nunits.
21280
21281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21282
21283 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21284 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21285 (VECTOR_MODES): Use it.
21286 (make_vector_modes): Take the prefix as an argument.
21287
21288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21289 Alan Hayward <alan.hayward@arm.com>
21290 David Sherwood <david.sherwood@arm.com>
21291
21292 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21293 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21294 for MODE_VECTOR_BOOL.
21295 * machmode.def (VECTOR_BOOL_MODE): Document.
21296 * genmodes.c (VECTOR_BOOL_MODE): New macro.
21297 (make_vector_bool_mode): New function.
21298 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21299 MODE_VECTOR_BOOL.
21300 * lto-streamer-in.c (lto_input_mode_table): Likewise.
21301 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21302 Likewise.
21303 * stor-layout.c (int_mode_for_mode): Likewise.
21304 * tree.c (build_vector_type_for_mode): Likewise.
21305 * varasm.c (output_constant_pool_2): Likewise.
21306 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21307 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
21308 for MODE_VECTOR_BOOL.
21309 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21310 of mode class checks.
21311 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21312 instead of a list of mode class checks.
21313 (expand_vector_scalar_condition): Likewise.
21314 (type_for_widest_vector_mode): Handle BImode as an inner mode.
21315
21316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21317 Alan Hayward <alan.hayward@arm.com>
21318 David Sherwood <david.sherwood@arm.com>
21319
21320 * machmode.h (mode_size): Change from unsigned short to
21321 poly_uint16_pod.
21322 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21323 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21324 or if measurement_type is not polynomial.
21325 (fixed_size_mode::includes_p): Check for constant-sized modes.
21326 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21327 return a poly_uint16 rather than an unsigned short.
21328 (emit_mode_size): Change the type of mode_size from unsigned short
21329 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
21330 (emit_mode_adjustments): Cope with polynomial vector sizes.
21331 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21332 for GET_MODE_SIZE.
21333 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21334 for GET_MODE_SIZE.
21335 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21336 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21337 * caller-save.c (setup_save_areas): Likewise.
21338 (replace_reg_with_saved_mem): Likewise.
21339 * calls.c (emit_library_call_value_1): Likewise.
21340 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21341 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21342 (gen_lowpart_for_combine): Likewise.
21343 * convert.c (convert_to_integer_1): Likewise.
21344 * cse.c (equiv_constant, cse_insn): Likewise.
21345 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21346 (cselib_subst_to_values): Likewise.
21347 * dce.c (word_dce_process_block): Likewise.
21348 * df-problems.c (df_word_lr_mark_ref): Likewise.
21349 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21350 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21351 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21352 (rtl_for_decl_location): Likewise.
21353 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21354 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21355 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21356 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21357 (expand_expr_real_1): Likewise.
21358 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21359 (pad_below): Likewise.
21360 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21361 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21362 * ira.c (get_subreg_tracking_sizes): Likewise.
21363 * ira-build.c (ira_create_allocno_objects): Likewise.
21364 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21365 (ira_sort_regnos_for_alter_reg): Likewise.
21366 * ira-costs.c (record_operand_costs): Likewise.
21367 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21368 (resolve_simple_move): Likewise.
21369 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21370 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21371 (lra_constraints): Likewise.
21372 (CONST_POOL_OK_P): Reject variable-sized modes.
21373 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21374 (add_pseudo_to_slot, lra_spill): Likewise.
21375 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21376 * optabs-query.c (get_best_extraction_insn): Likewise.
21377 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21378 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21379 (expand_mult_highpart, valid_multiword_target_p): Likewise.
21380 * recog.c (offsettable_address_addr_space_p): Likewise.
21381 * regcprop.c (maybe_mode_change): Likewise.
21382 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21383 * regrename.c (build_def_use): Likewise.
21384 * regstat.c (dump_reg_info): Likewise.
21385 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21386 (find_reloads, find_reloads_subreg_address): Likewise.
21387 * reload1.c (eliminate_regs_1): Likewise.
21388 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21389 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21390 (simplify_binary_operation_1, simplify_subreg): Likewise.
21391 * targhooks.c (default_function_arg_padding): Likewise.
21392 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21393 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21394 (verify_gimple_assign_ternary): Likewise.
21395 * tree-inline.c (estimate_move_cost): Likewise.
21396 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21397 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21398 (get_address_cost_ainc): Likewise.
21399 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21400 (vect_supportable_dr_alignment): Likewise.
21401 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21402 (vectorizable_reduction): Likewise.
21403 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21404 (vectorizable_operation, vectorizable_load): Likewise.
21405 * tree.c (build_same_sized_truth_vector_type): Likewise.
21406 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21407 * var-tracking.c (emit_note_insn_var_location): Likewise.
21408 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21409 (ADDR_VEC_ALIGN): Likewise.
21410
21411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21412 Alan Hayward <alan.hayward@arm.com>
21413 David Sherwood <david.sherwood@arm.com>
21414
21415 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21416 unsigned short.
21417 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21418 or if measurement_type is polynomial.
21419 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21420 * combine.c (make_extraction): Likewise.
21421 * dse.c (find_shift_sequence): Likewise.
21422 * dwarf2out.c (mem_loc_descriptor): Likewise.
21423 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21424 (extract_bit_field, extract_low_bits): Likewise.
21425 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21426 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21427 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21428 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21429 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21430 * reload.c (find_reloads): Likewise.
21431 * reload1.c (alter_reg): Likewise.
21432 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21433 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21434 * tree-if-conv.c (predicate_mem_writes): Likewise.
21435 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21436 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21437 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21438 * valtrack.c (dead_debug_insert_temp): Likewise.
21439 * varasm.c (mergeable_constant_section): Likewise.
21440 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21441
21442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21443 Alan Hayward <alan.hayward@arm.com>
21444 David Sherwood <david.sherwood@arm.com>
21445
21446 * expr.c (expand_assignment): Cope with polynomial mode sizes
21447 when assigning to a CONCAT.
21448
21449 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21450 Alan Hayward <alan.hayward@arm.com>
21451 David Sherwood <david.sherwood@arm.com>
21452
21453 * machmode.h (mode_precision): Change from unsigned short to
21454 poly_uint16_pod.
21455 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21456 short.
21457 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21458 or if measurement_type is not polynomial.
21459 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21460 in which the mode is already known to be a scalar_int_mode.
21461 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21462 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21463 initializer.
21464 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21465 for GET_MODE_PRECISION.
21466 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21467 for GET_MODE_PRECISION.
21468 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21469 as polynomial.
21470 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21471 (expand_field_assignment, make_extraction): Likewise.
21472 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21473 (get_last_value): Likewise.
21474 * convert.c (convert_to_integer_1): Likewise.
21475 * cse.c (cse_insn): Likewise.
21476 * expr.c (expand_expr_real_1): Likewise.
21477 * lra-constraints.c (simplify_operand_subreg): Likewise.
21478 * optabs-query.c (can_atomic_load_p): Likewise.
21479 * optabs.c (expand_atomic_load): Likewise.
21480 (expand_atomic_store): Likewise.
21481 * ree.c (combine_reaching_defs): Likewise.
21482 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21483 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21484 * tree.h (type_has_mode_precision_p): Likewise.
21485 * ubsan.c (instrument_si_overflow): Likewise.
21486
21487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21488 Alan Hayward <alan.hayward@arm.com>
21489 David Sherwood <david.sherwood@arm.com>
21490
21491 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21492 polynomial numbers of units.
21493 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21494 (valid_vector_subparts_p): New function.
21495 (build_vector_type): Remove temporary shim and take the number
21496 of units as a poly_uint64 rather than an int.
21497 (build_opaque_vector_type): Take the number of units as a
21498 poly_uint64 rather than an int.
21499 * tree.c (build_vector_from_ctor): Handle polynomial
21500 TYPE_VECTOR_SUBPARTS.
21501 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21502 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21503 (build_vector_from_val): If the number of units is variable,
21504 use build_vec_duplicate_cst for constant operands and
21505 VEC_DUPLICATE_EXPR otherwise.
21506 (make_vector_type): Remove temporary is_constant ().
21507 (build_vector_type, build_opaque_vector_type): Take the number of
21508 units as a poly_uint64 rather than an int.
21509 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21510 VECTOR_CST_NELTS.
21511 * cfgexpand.c (expand_debug_expr): Likewise.
21512 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21513 (store_constructor, expand_expr_real_1): Likewise.
21514 (const_scalar_mask_from_tree): Likewise.
21515 * fold-const-call.c (fold_const_reduction): Likewise.
21516 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21517 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21518 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21519 (fold_relational_const): Likewise.
21520 (native_interpret_vector): Likewise. Change the size from an
21521 int to an unsigned int.
21522 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21523 TYPE_VECTOR_SUBPARTS.
21524 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21525 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21526 duplicating a non-constant operand into a variable-length vector.
21527 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21528 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21529 * ipa-icf.c (sem_variable::equals): Likewise.
21530 * match.pd: Likewise.
21531 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21532 * print-tree.c (print_node): Likewise.
21533 * stor-layout.c (layout_type): Likewise.
21534 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21535 * tree-cfg.c (verify_gimple_comparison): Likewise.
21536 (verify_gimple_assign_binary): Likewise.
21537 (verify_gimple_assign_ternary): Likewise.
21538 (verify_gimple_assign_single): Likewise.
21539 * tree-pretty-print.c (dump_generic_node): Likewise.
21540 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21541 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21542 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21543 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21544 (vect_shift_permute_load_chain): Likewise.
21545 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21546 (expand_vector_condition, optimize_vector_constructor): Likewise.
21547 (lower_vec_perm, get_compute_type): Likewise.
21548 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21549 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21550 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21551 (vect_recog_mask_conversion_pattern): Likewise.
21552 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21553 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21554 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21555 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21556 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21557 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21558 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21559 (supportable_widening_operation): Likewise.
21560 (supportable_narrowing_operation): Likewise.
21561 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21562 Likewise.
21563 * varasm.c (output_constant): Likewise.
21564
21565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21566 Alan Hayward <alan.hayward@arm.com>
21567 David Sherwood <david.sherwood@arm.com>
21568
21569 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21570 so that both the length == 3 and length != 3 cases set up their
21571 own permute vectors. Add comments explaining why we know the
21572 number of elements is constant.
21573 (vect_permute_load_chain): Likewise.
21574
21575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21576 Alan Hayward <alan.hayward@arm.com>
21577 David Sherwood <david.sherwood@arm.com>
21578
21579 * machmode.h (mode_nunits): Change from unsigned char to
21580 poly_uint16_pod.
21581 (ONLY_FIXED_SIZE_MODES): New macro.
21582 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21583 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21584 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21585 New typedefs.
21586 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21587 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21588 or if measurement_type is not polynomial.
21589 * genmodes.c (ZERO_COEFFS): New macro.
21590 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21591 poly_uint16.
21592 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21593 Use ZERO_COEFFS when emitting initializers.
21594 * data-streamer.h (bp_pack_poly_value): New function.
21595 (bp_unpack_poly_value): Likewise.
21596 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21597 for GET_MODE_NUNITS.
21598 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21599 for GET_MODE_NUNITS.
21600 * tree.c (make_vector_type): Remove temporary shim and make
21601 the real function take the number of units as a poly_uint64
21602 rather than an int.
21603 (build_vector_type_for_mode): Handle polynomial nunits.
21604 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21605 * emit-rtl.c (const_vec_series_p_1): Likewise.
21606 (gen_rtx_CONST_VECTOR): Likewise.
21607 * fold-const.c (test_vec_duplicate_folding): Likewise.
21608 * genrecog.c (validate_pattern): Likewise.
21609 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21610 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21611 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21612 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21613 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21614 * rtlanal.c (subreg_get_info): Likewise.
21615 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21616 (vect_grouped_load_supported): Likewise.
21617 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21618 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21619 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21620 (simplify_const_unary_operation, simplify_binary_operation_1)
21621 (simplify_const_binary_operation, simplify_ternary_operation)
21622 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21623 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21624 instead of CONST_VECTOR_NUNITS.
21625 * varasm.c (output_constant_pool_2): Likewise.
21626 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21627 explicit-encoded elements in the XVEC for variable-length vectors.
21628
21629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21630
21631 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21632
21633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21634 Alan Hayward <alan.hayward@arm.com>
21635 David Sherwood <david.sherwood@arm.com>
21636
21637 * coretypes.h (fixed_size_mode): Declare.
21638 (fixed_size_mode_pod): New typedef.
21639 * builtins.h (target_builtins::x_apply_args_mode)
21640 (target_builtins::x_apply_result_mode): Change type to
21641 fixed_size_mode_pod.
21642 * builtins.c (apply_args_size, apply_result_size, result_vector)
21643 (expand_builtin_apply_args_1, expand_builtin_apply)
21644 (expand_builtin_return): Update accordingly.
21645
21646 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21647
21648 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21649 * cselib.c (cselib_hash_rtx): Likewise.
21650 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21651 CONST_VECTOR encoding.
21652
21653 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21654 Jeff Law <law@redhat.com>
21655
21656 PR target/83641
21657 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21658 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21659 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21660 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21661
21662 PR target/83641
21663 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21664 explicitly probe *sp in a noreturn function if there were any callee
21665 register saves or frame pointer is needed.
21666
21667 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21668
21669 PR debug/83621
21670 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21671 BLKmode for ternary, binary or unary expressions.
21672
21673 PR debug/83645
21674 * var-tracking.c (delete_vta_debug_insn): New inline function.
21675 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21676 insns from get_insns () to NULL instead of each bb separately.
21677 Use delete_vta_debug_insn. No longer static.
21678 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21679 delete_vta_debug_insns callers.
21680 * rtl.h (delete_vta_debug_insns): Declare.
21681 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21682 instead of variable_tracking_main.
21683
21684 2018-01-03 Martin Sebor <msebor@redhat.com>
21685
21686 PR tree-optimization/83603
21687 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21688 arguments past the endof the argument list in functions declared
21689 without a prototype.
21690 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21691 Avoid checking when arguments are null.
21692
21693 2018-01-03 Martin Sebor <msebor@redhat.com>
21694
21695 PR c/83559
21696 * doc/extend.texi (attribute const): Fix a typo.
21697 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21698 issuing -Wsuggest-attribute for void functions.
21699
21700 2018-01-03 Martin Sebor <msebor@redhat.com>
21701
21702 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21703 offset_int::from instead of wide_int::to_shwi.
21704 (maybe_diag_overlap): Remove assertion.
21705 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21706 * gimple-ssa-sprintf.c (format_directive): Same.
21707 (parse_directive): Same.
21708 (sprintf_dom_walker::compute_format_length): Same.
21709 (try_substitute_return_value): Same.
21710
21711 2018-01-03 Jeff Law <law@redhat.com>
21712
21713 PR middle-end/83654
21714 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21715 non-constant residual for zero at runtime and avoid probing in
21716 that case. Reorganize code for trailing problem to mirror handling
21717 of the residual.
21718
21719 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21720
21721 PR tree-optimization/83501
21722 * tree-ssa-strlen.c (get_string_cst): New.
21723 (handle_char_store): Call get_string_cst.
21724
21725 2018-01-03 Martin Liska <mliska@suse.cz>
21726
21727 PR tree-optimization/83593
21728 * tree-ssa-strlen.c: Include tree-cfg.h.
21729 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21730 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21731 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21732 to false.
21733 (strlen_dom_walker::before_dom_children): Call
21734 gimple_purge_dead_eh_edges. Dump tranformation with details
21735 dump flags.
21736 (strlen_dom_walker::before_dom_children): Update call by adding
21737 new argument cleanup_eh.
21738 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21739
21740 2018-01-03 Martin Liska <mliska@suse.cz>
21741
21742 PR ipa/83549
21743 * cif-code.def (VARIADIC_THUNK): New enum value.
21744 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21745 thunks.
21746
21747 2018-01-03 Jan Beulich <jbeulich@suse.com>
21748
21749 * sse.md (mov<mode>_internal): Tighten condition for when to use
21750 vmovdqu<ssescalarsize> for TI and OI modes.
21751
21752 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21753
21754 Update copyright years.
21755
21756 2018-01-03 Martin Liska <mliska@suse.cz>
21757
21758 PR ipa/83594
21759 * ipa-visibility.c (function_and_variable_visibility): Skip
21760 functions with noipa attribure.
21761
21762 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21763
21764 * gcc.c (process_command): Update copyright notice dates.
21765 * gcov-dump.c (print_version): Ditto.
21766 * gcov.c (print_version): Ditto.
21767 * gcov-tool.c (print_version): Ditto.
21768 * gengtype.c (create_file): Ditto.
21769 * doc/cpp.texi: Bump @copying's copyright year.
21770 * doc/cppinternals.texi: Ditto.
21771 * doc/gcc.texi: Ditto.
21772 * doc/gccint.texi: Ditto.
21773 * doc/gcov.texi: Ditto.
21774 * doc/install.texi: Ditto.
21775 * doc/invoke.texi: Ditto.
21776
21777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21778
21779 * vector-builder.h (vector_builder::m_full_nelts): Change from
21780 unsigned int to poly_uint64.
21781 (vector_builder::full_nelts): Update prototype accordingly.
21782 (vector_builder::new_vector): Likewise.
21783 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21784 (vector_builder::operator ==): Likewise.
21785 (vector_builder::finalize): Likewise.
21786 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21787 Take the number of elements as a poly_uint64 rather than an
21788 unsigned int.
21789 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21790 from unsigned int to poly_uint64.
21791 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21792 (vec_perm_indices::new_vector): Likewise.
21793 (vec_perm_indices::length): Likewise.
21794 (vec_perm_indices::nelts_per_input): Likewise.
21795 (vec_perm_indices::input_nelts): Likewise.
21796 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21797 number of elements per input as a poly_uint64 rather than an
21798 unsigned int. Use the original encoding for variable-length
21799 vectors, rather than clamping each individual element.
21800 For the second and subsequent elements in each pattern,
21801 clamp the step and base before clamping their sum.
21802 (vec_perm_indices::series_p): Handle polynomial element counts.
21803 (vec_perm_indices::all_in_range_p): Likewise.
21804 (vec_perm_indices_to_tree): Likewise.
21805 (vec_perm_indices_to_rtx): Likewise.
21806 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21807 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21808 (tree_vector_builder::new_binary_operation): Handle polynomial
21809 element counts. Return false if we need to know the number
21810 of elements at compile time.
21811 * fold-const.c (fold_vec_perm): Punt if the number of elements
21812 isn't known at compile time.
21813
21814 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21815
21816 * vec-perm-indices.h (vec_perm_builder): Change element type
21817 from HOST_WIDE_INT to poly_int64.
21818 (vec_perm_indices::element_type): Update accordingly.
21819 (vec_perm_indices::clamp): Handle polynomial element_types.
21820 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21821 (vec_perm_indices::all_in_range_p): Likewise.
21822 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21823 than shwi trees.
21824 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21825 polynomial vec_perm_indices element types.
21826 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21827 * fold-const.c (fold_vec_perm): Likewise.
21828 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21829 * tree-vect-generic.c (lower_vec_perm): Likewise.
21830 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21831 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21832 element type to HOST_WIDE_INT.
21833
21834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21835 Alan Hayward <alan.hayward@arm.com>
21836 David Sherwood <david.sherwood@arm.com>
21837
21838 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21839 rather than an int. Use plus_constant.
21840 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21841 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21842
21843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21844 Alan Hayward <alan.hayward@arm.com>
21845 David Sherwood <david.sherwood@arm.com>
21846
21847 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21848 a HOST_WIDE_INT to a poly_int64.
21849
21850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21851 Alan Hayward <alan.hayward@arm.com>
21852 David Sherwood <david.sherwood@arm.com>
21853
21854 * calls.c (load_register_parameters): Cope with polynomial
21855 mode sizes. Require a constant size for BLKmode parameters
21856 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21857 forces a parameter to be padded at the lsb end in order to
21858 fill a complete number of words, require the parameter size
21859 to be ordered wrt UNITS_PER_WORD.
21860
21861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21862 Alan Hayward <alan.hayward@arm.com>
21863 David Sherwood <david.sherwood@arm.com>
21864
21865 * reload1.c (spill_stack_slot_width): Change element type
21866 from unsigned int to poly_uint64_pod.
21867 (alter_reg): Treat mode sizes as polynomial.
21868
21869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21870 Alan Hayward <alan.hayward@arm.com>
21871 David Sherwood <david.sherwood@arm.com>
21872
21873 * reload.c (complex_word_subreg_p): New function.
21874 (reload_inner_reg_of_subreg, push_reload): Use it.
21875
21876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21877 Alan Hayward <alan.hayward@arm.com>
21878 David Sherwood <david.sherwood@arm.com>
21879
21880 * lra-constraints.c (process_alt_operands): Reject matched
21881 operands whose sizes aren't ordered.
21882 (match_reload): Refer to this check here.
21883
21884 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21885 Alan Hayward <alan.hayward@arm.com>
21886 David Sherwood <david.sherwood@arm.com>
21887
21888 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21889 that the mode size is in the set {1, 2, 4, 8, 16}.
21890
21891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21892 Alan Hayward <alan.hayward@arm.com>
21893 David Sherwood <david.sherwood@arm.com>
21894
21895 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21896 Use plus_constant instead of gen_rtx_PLUS.
21897
21898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21899 Alan Hayward <alan.hayward@arm.com>
21900 David Sherwood <david.sherwood@arm.com>
21901
21902 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21903 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21904 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21905 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21906 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21907 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21908 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21909 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21910 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21911 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21912 a poly_int64.
21913 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21914 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21915 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21916 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21917 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21918 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21919 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21920 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21921 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21922 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21923 function.
21924 * expr.c (emit_move_resolve_push): Treat the input and result
21925 of PUSH_ROUNDING as a poly_int64.
21926 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21927 (emit_push_insn): Likewise.
21928 * lra-eliminations.c (mark_not_eliminable): Likewise.
21929 * recog.c (push_operand): Likewise.
21930 * reload1.c (elimination_effects): Likewise.
21931 * rtlanal.c (nonzero_bits1): Likewise.
21932 * calls.c (store_one_arg): Likewise. Require the padding to be
21933 known at compile time.
21934
21935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21936 Alan Hayward <alan.hayward@arm.com>
21937 David Sherwood <david.sherwood@arm.com>
21938
21939 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21940 Use plus_constant instead of gen_rtx_PLUS.
21941
21942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21943 Alan Hayward <alan.hayward@arm.com>
21944 David Sherwood <david.sherwood@arm.com>
21945
21946 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21947 rather than an int.
21948
21949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21950 Alan Hayward <alan.hayward@arm.com>
21951 David Sherwood <david.sherwood@arm.com>
21952
21953 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21954 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21955 via stack temporaries. Treat the mode size as polynomial too.
21956
21957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21958 Alan Hayward <alan.hayward@arm.com>
21959 David Sherwood <david.sherwood@arm.com>
21960
21961 * expr.c (expand_expr_real_2): When handling conversions involving
21962 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21963 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21964 as a poly_uint64 too.
21965
21966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21967 Alan Hayward <alan.hayward@arm.com>
21968 David Sherwood <david.sherwood@arm.com>
21969
21970 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21971
21972 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21973 Alan Hayward <alan.hayward@arm.com>
21974 David Sherwood <david.sherwood@arm.com>
21975
21976 * combine.c (can_change_dest_mode): Handle polynomial
21977 REGMODE_NATURAL_SIZE.
21978 * expmed.c (store_bit_field_1): Likewise.
21979 * expr.c (store_constructor): Likewise.
21980 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21981 and polynomial REGMODE_NATURAL_SIZE.
21982 (gen_lowpart_common): Likewise.
21983 * reginfo.c (record_subregs_of_mode): Likewise.
21984 * rtlanal.c (read_modify_subreg_p): Likewise.
21985
21986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21987 Alan Hayward <alan.hayward@arm.com>
21988 David Sherwood <david.sherwood@arm.com>
21989
21990 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21991 numbers of elements.
21992
21993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21994 Alan Hayward <alan.hayward@arm.com>
21995 David Sherwood <david.sherwood@arm.com>
21996
21997 * match.pd: Cope with polynomial numbers of vector elements.
21998
21999 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22000 Alan Hayward <alan.hayward@arm.com>
22001 David Sherwood <david.sherwood@arm.com>
22002
22003 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22004 in a POINTER_PLUS_EXPR.
22005
22006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22007 Alan Hayward <alan.hayward@arm.com>
22008 David Sherwood <david.sherwood@arm.com>
22009
22010 * omp-simd-clone.c (simd_clone_subparts): New function.
22011 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22012 (ipa_simd_modify_function_body): Likewise.
22013
22014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22015 Alan Hayward <alan.hayward@arm.com>
22016 David Sherwood <david.sherwood@arm.com>
22017
22018 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22019 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22020 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22021 (expand_vector_condition, vector_element): Likewise.
22022 (subparts_gt): New function.
22023 (get_compute_type): Use subparts_gt.
22024 (count_type_subparts): Delete.
22025 (expand_vector_operations_1): Use subparts_gt instead of
22026 count_type_subparts.
22027
22028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22029 Alan Hayward <alan.hayward@arm.com>
22030 David Sherwood <david.sherwood@arm.com>
22031
22032 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22033 (vect_compile_time_alias): ...this new function. Do the calculation
22034 on poly_ints rather than trees.
22035 (vect_prune_runtime_alias_test_list): Update call accordingly.
22036
22037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22038 Alan Hayward <alan.hayward@arm.com>
22039 David Sherwood <david.sherwood@arm.com>
22040
22041 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22042 numbers of units.
22043 (vect_schedule_slp_instance): Likewise.
22044
22045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22046 Alan Hayward <alan.hayward@arm.com>
22047 David Sherwood <david.sherwood@arm.com>
22048
22049 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22050 constant and extern definitions for variable-length vectors.
22051 (vect_get_constant_vectors): Note that the number of units
22052 is known to be constant.
22053
22054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22055 Alan Hayward <alan.hayward@arm.com>
22056 David Sherwood <david.sherwood@arm.com>
22057
22058 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22059 of units as polynomial. Choose between WIDE and NARROW based
22060 on multiple_p.
22061
22062 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22063 Alan Hayward <alan.hayward@arm.com>
22064 David Sherwood <david.sherwood@arm.com>
22065
22066 * tree-vect-stmts.c (simd_clone_subparts): New function.
22067 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22068
22069 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22070 Alan Hayward <alan.hayward@arm.com>
22071 David Sherwood <david.sherwood@arm.com>
22072
22073 * tree-vect-stmts.c (vectorizable_call): Treat the number of
22074 vectors as polynomial. Use build_index_vector for
22075 IFN_GOMP_SIMD_LANE.
22076
22077 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22078 Alan Hayward <alan.hayward@arm.com>
22079 David Sherwood <david.sherwood@arm.com>
22080
22081 * tree-vect-stmts.c (get_load_store_type): Treat the number of
22082 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22083 for variable-length vectors.
22084 (vectorizable_mask_load_store): Treat the number of units as
22085 polynomial, asserting that it is constant if the condition has
22086 already been enforced.
22087 (vectorizable_store, vectorizable_load): Likewise.
22088
22089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22090 Alan Hayward <alan.hayward@arm.com>
22091 David Sherwood <david.sherwood@arm.com>
22092
22093 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22094 of units as polynomial. Punt if we can't tell at compile time
22095 which vector contains the final result.
22096
22097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22098 Alan Hayward <alan.hayward@arm.com>
22099 David Sherwood <david.sherwood@arm.com>
22100
22101 * tree-vect-loop.c (vectorizable_induction): Treat the number
22102 of units as polynomial. Punt on SLP inductions. Use an integer
22103 VEC_SERIES_EXPR for variable-length integer reductions. Use a
22104 cast of such a series for variable-length floating-point
22105 reductions.
22106
22107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22108 Alan Hayward <alan.hayward@arm.com>
22109 David Sherwood <david.sherwood@arm.com>
22110
22111 * tree.h (build_index_vector): Declare.
22112 * tree.c (build_index_vector): New function.
22113 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22114 of units as polynomial, forcibly converting it to a constant if
22115 vectorizable_reduction has already enforced the condition.
22116 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
22117 to create a {1,2,3,...} vector.
22118 (vectorizable_reduction): Treat the number of units as polynomial.
22119 Choose vectype_in based on the largest scalar element size rather
22120 than the smallest number of units. Enforce the restrictions
22121 relied on above.
22122
22123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22124 Alan Hayward <alan.hayward@arm.com>
22125 David Sherwood <david.sherwood@arm.com>
22126
22127 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22128 number of units as polynomial.
22129
22130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22131 Alan Hayward <alan.hayward@arm.com>
22132 David Sherwood <david.sherwood@arm.com>
22133
22134 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22135 * target.def (autovectorize_vector_sizes): Return the vector sizes
22136 by pointer, using vector_sizes rather than a bitmask.
22137 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22138 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22139 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22140 Likewise.
22141 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22142 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22143 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22144 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22145 * omp-general.c (omp_max_vf): Likewise.
22146 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22147 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22148 * tree-vect-loop.c (vect_analyze_loop): Likewise.
22149 * tree-vect-slp.c (vect_slp_bb): Likewise.
22150 * doc/tm.texi: Regenerate.
22151 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22152 to a poly_uint64.
22153 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22154 the vector size as a poly_uint64 rather than an unsigned int.
22155 (current_vector_size): Change from an unsigned int to a poly_uint64.
22156 (get_vectype_for_scalar_type): Update accordingly.
22157 * tree.h (build_truth_vector_type): Take the size and number of
22158 units as a poly_uint64 rather than an unsigned int.
22159 (build_vector_type): Add a temporary overload that takes
22160 the number of units as a poly_uint64 rather than an unsigned int.
22161 * tree.c (make_vector_type): Likewise.
22162 (build_truth_vector_type): Take the number of units as a poly_uint64
22163 rather than an unsigned int.
22164
22165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22166 Alan Hayward <alan.hayward@arm.com>
22167 David Sherwood <david.sherwood@arm.com>
22168
22169 * target.def (get_mask_mode): Take the number of units and length
22170 as poly_uint64s rather than unsigned ints.
22171 * targhooks.h (default_get_mask_mode): Update accordingly.
22172 * targhooks.c (default_get_mask_mode): Likewise.
22173 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22174 * doc/tm.texi: Regenerate.
22175
22176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22177 Alan Hayward <alan.hayward@arm.com>
22178 David Sherwood <david.sherwood@arm.com>
22179
22180 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22181 * omp-general.c (omp_max_vf): Likewise.
22182 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22183 (expand_omp_simd): Handle polynomial safelen.
22184 * omp-low.c (omplow_simd_context): Add a default constructor.
22185 (omplow_simd_context::max_vf): Change from int to poly_uint64.
22186 (lower_rec_simd_input_clauses): Update accordingly.
22187 (lower_rec_input_clauses): Likewise.
22188
22189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22190 Alan Hayward <alan.hayward@arm.com>
22191 David Sherwood <david.sherwood@arm.com>
22192
22193 * tree-vectorizer.h (vect_nunits_for_cost): New function.
22194 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22195 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22196 (vect_analyze_slp_cost): Likewise.
22197 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22198 (vect_model_load_cost): Likewise.
22199
22200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22201 Alan Hayward <alan.hayward@arm.com>
22202 David Sherwood <david.sherwood@arm.com>
22203
22204 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22205 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22206 from an unsigned int * to a poly_uint64_pod *.
22207 (calculate_unrolling_factor): New function.
22208 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
22209
22210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22211 Alan Hayward <alan.hayward@arm.com>
22212 David Sherwood <david.sherwood@arm.com>
22213
22214 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22215 from an unsigned int to a poly_uint64.
22216 (_loop_vec_info::slp_unrolling_factor): Likewise.
22217 (_loop_vec_info::vectorization_factor): Change from an int
22218 to a poly_uint64.
22219 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22220 (vect_get_num_vectors): New function.
22221 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22222 (vect_get_num_copies): Use vect_get_num_vectors.
22223 (vect_analyze_data_ref_dependences): Change max_vf from an int *
22224 to an unsigned int *.
22225 (vect_analyze_data_refs): Change min_vf from an int * to a
22226 poly_uint64 *.
22227 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22228 than an unsigned HOST_WIDE_INT.
22229 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22230 (vect_analyze_data_ref_dependence): Change max_vf from an int *
22231 to an unsigned int *.
22232 (vect_analyze_data_ref_dependences): Likewise.
22233 (vect_compute_data_ref_alignment): Handle polynomial vf.
22234 (vect_enhance_data_refs_alignment): Likewise.
22235 (vect_prune_runtime_alias_test_list): Likewise.
22236 (vect_shift_permute_load_chain): Likewise.
22237 (vect_supportable_dr_alignment): Likewise.
22238 (dependence_distance_ge_vf): Take the vectorization factor as a
22239 poly_uint64 rather than an unsigned HOST_WIDE_INT.
22240 (vect_analyze_data_refs): Change min_vf from an int * to a
22241 poly_uint64 *.
22242 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22243 vfm1 as a poly_uint64 rather than an int. Make the same change
22244 for the returned bound_scalar.
22245 (vect_gen_vector_loop_niters): Handle polynomial vf.
22246 (vect_do_peeling): Likewise. Update call to
22247 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22248 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22249 be constant.
22250 * tree-vect-loop.c (vect_determine_vectorization_factor)
22251 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22252 (vect_get_known_peeling_cost): Likewise.
22253 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22254 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22255 (vect_transform_loop): Likewise. Use the lowest possible VF when
22256 updating the upper bounds of the loop.
22257 (vect_min_worthwhile_factor): Make static. Return an unsigned int
22258 rather than an int.
22259 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22260 polynomial unroll factors.
22261 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22262 (vect_make_slp_decision): Likewise.
22263 (vect_supported_load_permutation_p): Likewise, and polynomial
22264 vf too.
22265 (vect_analyze_slp_cost): Handle polynomial vf.
22266 (vect_slp_analyze_node_operations): Likewise.
22267 (vect_slp_analyze_bb_1): Likewise.
22268 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22269 than an unsigned HOST_WIDE_INT.
22270 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22271 (vectorizable_load): Handle polynomial vf.
22272 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22273 a poly_uint64.
22274 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22275
22276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22277 Alan Hayward <alan.hayward@arm.com>
22278 David Sherwood <david.sherwood@arm.com>
22279
22280 * match.pd: Handle bit operations involving three constants
22281 and try to fold one pair.
22282
22283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22284
22285 * tree-vect-loop-manip.c: Include gimple-fold.h.
22286 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22287 niters_maybe_zero parameters. Handle other cases besides a step of 1.
22288 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22289 Add a path that uses a step of VF instead of 1, but disable it
22290 for now.
22291 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22292 and niters_no_overflow parameters. Update calls to
22293 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22294 Create a new SSA name if the latter choses to use a ste other
22295 than zero, and return it via niters_vector_mult_vf_var.
22296 * tree-vect-loop.c (vect_transform_loop): Update calls to
22297 vect_do_peeling, vect_gen_vector_loop_niters and
22298 slpeel_make_loop_iterate_ntimes.
22299 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22300 (vect_gen_vector_loop_niters): Update declarations after above changes.
22301
22302 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
22303
22304 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22305 128-bit round to integer instructions.
22306 (ceil<mode>2): Likewise.
22307 (btrunc<mode>2): Likewise.
22308 (round<mode>2): Likewise.
22309
22310 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22311
22312 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22313 unaligned VSX load/store on P8/P9.
22314 (expand_block_clear): Allow the use of unaligned VSX
22315 load/store on P8/P9.
22316
22317 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22318
22319 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22320 New function.
22321 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22322 swap associated with both a load and a store.
22323
22324 2018-01-02 Andrew Waterman <andrew@sifive.com>
22325
22326 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22327 * config/riscv/riscv.md (clear_cache): Use it.
22328
22329 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
22330
22331 * web.c: Remove out-of-date comment.
22332
22333 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22334
22335 * expr.c (fixup_args_size_notes): Check that any existing
22336 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22337 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22338 (emit_single_push_insn): ...here.
22339
22340 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22341
22342 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22343 (const_vector_encoded_nelts): New function.
22344 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22345 (const_vector_int_elt, const_vector_elt): Declare.
22346 * emit-rtl.c (const_vector_int_elt_1): New function.
22347 (const_vector_elt): Likewise.
22348 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22349 of CONST_VECTOR_ELT.
22350
22351 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22352
22353 * expr.c: Include rtx-vector-builder.h.
22354 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22355 directly on the tree encoding.
22356 (const_vector_from_tree): Likewise.
22357 * optabs.c: Include rtx-vector-builder.h.
22358 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22359 sequence of "u" values.
22360 * vec-perm-indices.c: Include rtx-vector-builder.h.
22361 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22362 directly on the vec_perm_indices encoding.
22363
22364 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22365
22366 * doc/rtl.texi (const_vector): Describe new encoding scheme.
22367 * Makefile.in (OBJS): Add rtx-vector-builder.o.
22368 * rtx-vector-builder.h: New file.
22369 * rtx-vector-builder.c: Likewise.
22370 * rtl.h (rtx_def::u2): Add a const_vector field.
22371 (CONST_VECTOR_NPATTERNS): New macro.
22372 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22373 (CONST_VECTOR_DUPLICATE_P): Likewise.
22374 (CONST_VECTOR_STEPPED_P): Likewise.
22375 (CONST_VECTOR_ENCODED_ELT): Likewise.
22376 (const_vec_duplicate_p): Check for a duplicated vector encoding.
22377 (unwrap_const_vec_duplicate): Likewise.
22378 (const_vec_series_p): Check for a non-duplicated vector encoding.
22379 Say that the function only returns true for integer vectors.
22380 * emit-rtl.c: Include rtx-vector-builder.h.
22381 (gen_const_vec_duplicate_1): Delete.
22382 (gen_const_vector): Call gen_const_vec_duplicate instead of
22383 gen_const_vec_duplicate_1.
22384 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22385 (gen_const_vec_duplicate): Use rtx_vector_builder.
22386 (gen_const_vec_series): Likewise.
22387 (gen_rtx_CONST_VECTOR): Likewise.
22388 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22389 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22390 Build a new vector rather than modifying a CONST_VECTOR in-place.
22391 (handle_special_swappables): Update call accordingly.
22392 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22393 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22394 Build a new vector rather than modifying a CONST_VECTOR in-place.
22395 (handle_special_swappables): Update call accordingly.
22396
22397 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22398
22399 * simplify-rtx.c (simplify_const_binary_operation): Use
22400 CONST_VECTOR_ELT instead of XVECEXP.
22401
22402 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22403
22404 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22405 the selector elements to be different from the data elements
22406 if the selector is a VECTOR_CST.
22407 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22408 ssizetype for the selector.
22409
22410 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22411
22412 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22413 before testing each element individually.
22414 * tree-vect-generic.c (lower_vec_perm): Likewise.
22415
22416 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22417
22418 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22419 * selftest-run-tests.c (selftest::run_tests): Call it.
22420 * vector-builder.h (vector_builder::operator ==): New function.
22421 (vector_builder::operator !=): Likewise.
22422 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22423 (vec_perm_indices::all_from_input_p): New function.
22424 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22425 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22426 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22427 instead of reading the VECTOR_CST directly. Detect whether both
22428 vector inputs are the same before constructing the vec_perm_indices,
22429 and update the number of inputs argument accordingly. Use the
22430 utility functions added above. Only construct sel2 if we need to.
22431
22432 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22433
22434 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22435 the broadcast of the low byte.
22436 (expand_mult_highpart): Use an explicit encoding for the permutes.
22437 * optabs-query.c (can_mult_highpart_p): Likewise.
22438 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22439 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22440 (vectorizable_bswap): Likewise.
22441 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22442 explicit encoding for the power-of-2 permutes.
22443 (vect_permute_store_chain): Likewise.
22444 (vect_grouped_load_supported): Likewise.
22445 (vect_permute_load_chain): Likewise.
22446
22447 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22448
22449 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22450 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22451 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22452 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22453 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22454 (vect_gen_perm_mask_any): Likewise.
22455
22456 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22457
22458 * int-vector-builder.h: New file.
22459 * vec-perm-indices.h: Include int-vector-builder.h.
22460 (vec_perm_indices): Redefine as an int_vector_builder.
22461 (auto_vec_perm_indices): Delete.
22462 (vec_perm_builder): Redefine as a stand-alone class.
22463 (vec_perm_indices::vec_perm_indices): New function.
22464 (vec_perm_indices::clamp): Likewise.
22465 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22466 (vec_perm_indices::new_vector): New function.
22467 (vec_perm_indices::new_expanded_vector): Update for new
22468 vec_perm_indices class.
22469 (vec_perm_indices::rotate_inputs): New function.
22470 (vec_perm_indices::all_in_range_p): Operate directly on the
22471 encoded form, without computing elided elements.
22472 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22473 encoding. Update for new vec_perm_indices class.
22474 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22475 the given vec_perm_builder.
22476 (expand_vec_perm_var): Update vec_perm_builder constructor.
22477 (expand_mult_highpart): Use vec_perm_builder instead of
22478 auto_vec_perm_indices.
22479 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22480 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22481 or double series encoding as appropriate.
22482 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22483 vec_perm_indices instead of auto_vec_perm_indices.
22484 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22485 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22486 (vect_permute_store_chain): Likewise.
22487 (vect_grouped_load_supported): Likewise.
22488 (vect_permute_load_chain): Likewise.
22489 (vect_shift_permute_load_chain): Likewise.
22490 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22491 (vect_transform_slp_perm_load): Likewise.
22492 (vect_schedule_slp_instance): Likewise.
22493 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22494 (vectorizable_mask_load_store): Likewise.
22495 (vectorizable_bswap): Likewise.
22496 (vectorizable_store): Likewise.
22497 (vectorizable_load): Likewise.
22498 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22499 vec_perm_indices instead of auto_vec_perm_indices. Use
22500 tree_to_vec_perm_builder to read the vector from a tree.
22501 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22502 vec_perm_builder instead of a vec_perm_indices.
22503 (have_whole_vector_shift): Use vec_perm_builder and
22504 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22505 truncation to calc_vec_perm_mask_for_shift.
22506 (vect_create_epilog_for_reduction): Likewise.
22507 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22508 from auto_vec_perm_indices to vec_perm_indices.
22509 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22510 instead of changing individual elements.
22511 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22512 the vector in d.perm.
22513 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22514 from auto_vec_perm_indices to vec_perm_indices.
22515 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22516 instead of changing individual elements.
22517 (arm_vectorize_vec_perm_const): Use new_vector to install
22518 the vector in d.perm.
22519 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22520 Update vec_perm_builder constructor.
22521 (rs6000_expand_interleave): Likewise.
22522 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22523 (rs6000_expand_interleave): Likewise.
22524
22525 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22526
22527 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22528 to qimode could truncate the indices.
22529 * optabs.c (expand_vec_perm_var): Likewise.
22530
22531 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22532
22533 * Makefile.in (OBJS): Add vec-perm-indices.o.
22534 * vec-perm-indices.h: New file.
22535 * vec-perm-indices.c: Likewise.
22536 * target.h (vec_perm_indices): Replace with a forward class
22537 declaration.
22538 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22539 * optabs.h: Include vec-perm-indices.h.
22540 (expand_vec_perm): Delete.
22541 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22542 (expand_vec_perm_const): Declare.
22543 * target.def (vec_perm_const_ok): Replace with...
22544 (vec_perm_const): ...this new hook.
22545 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22546 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22547 * doc/tm.texi: Regenerate.
22548 * optabs.def (vec_perm_const): Delete.
22549 * doc/md.texi (vec_perm_const): Likewise.
22550 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22551 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22552 expand_vec_perm for constant permutation vectors. Assert that
22553 the mode of variable permutation vectors is the integer equivalent
22554 of the mode that is being permuted.
22555 * optabs-query.h (selector_fits_mode_p): Declare.
22556 * optabs-query.c: Include vec-perm-indices.h.
22557 (selector_fits_mode_p): New function.
22558 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22559 is defined, instead of checking whether the vec_perm_const_optab
22560 exists. Use targetm.vectorize.vec_perm_const instead of
22561 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22562 fit in the vector mode before using a variable permute.
22563 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22564 vec_perm_indices instead of an rtx.
22565 (expand_vec_perm): Replace with...
22566 (expand_vec_perm_const): ...this new function. Take the selector
22567 as a vec_perm_indices rather than an rtx. Also take the mode of
22568 the selector. Update call to shift_amt_for_vec_perm_mask.
22569 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22570 Use vec_perm_indices::new_expanded_vector to expand the original
22571 selector into bytes. Check whether the indices fit in the vector
22572 mode before using a variable permute.
22573 (expand_vec_perm_var): Make global.
22574 (expand_mult_highpart): Use expand_vec_perm_const.
22575 * fold-const.c: Includes vec-perm-indices.h.
22576 * tree-ssa-forwprop.c: Likewise.
22577 * tree-vect-data-refs.c: Likewise.
22578 * tree-vect-generic.c: Likewise.
22579 * tree-vect-loop.c: Likewise.
22580 * tree-vect-slp.c: Likewise.
22581 * tree-vect-stmts.c: Likewise.
22582 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22583 Delete.
22584 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22585 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22586 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22587 (aarch64_vectorize_vec_perm_const): ...this new function.
22588 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22589 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22590 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22591 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22592 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22593 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22594 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22595 into...
22596 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22597 check for NEON modes.
22598 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22599 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22600 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22601 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22602 into...
22603 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22604 the old VEC_PERM_CONST conditions.
22605 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22606 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22607 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22608 (ia64_vectorize_vec_perm_const_ok): Merge into...
22609 (ia64_vectorize_vec_perm_const): ...this new function.
22610 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22611 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22612 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22613 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22614 * config/mips/mips.c (mips_expand_vec_perm_const)
22615 (mips_vectorize_vec_perm_const_ok): Merge into...
22616 (mips_vectorize_vec_perm_const): ...this new function.
22617 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22618 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22619 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22620 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22621 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22622 (rs6000_expand_vec_perm_const): Delete.
22623 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22624 Delete.
22625 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22626 (altivec_expand_vec_perm_const_le): Take each operand individually.
22627 Operate on constant selectors rather than rtxes.
22628 (altivec_expand_vec_perm_const): Likewise. Update call to
22629 altivec_expand_vec_perm_const_le.
22630 (rs6000_expand_vec_perm_const): Delete.
22631 (rs6000_vectorize_vec_perm_const_ok): Delete.
22632 (rs6000_vectorize_vec_perm_const): New function.
22633 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22634 an element count and rtx array.
22635 (rs6000_expand_extract_even): Update call accordingly.
22636 (rs6000_expand_interleave): Likewise.
22637 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22638 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22639 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22640 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22641 (rs6000_expand_vec_perm_const): Delete.
22642 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22643 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22644 (altivec_expand_vec_perm_const_le): Take each operand individually.
22645 Operate on constant selectors rather than rtxes.
22646 (altivec_expand_vec_perm_const): Likewise. Update call to
22647 altivec_expand_vec_perm_const_le.
22648 (rs6000_expand_vec_perm_const): Delete.
22649 (rs6000_vectorize_vec_perm_const_ok): Delete.
22650 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22651 reference to the SPE evmerge intructions.
22652 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22653 an element count and rtx array.
22654 (rs6000_expand_extract_even): Update call accordingly.
22655 (rs6000_expand_interleave): Likewise.
22656 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22657 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22658 new function.
22659 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22660
22661 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22662
22663 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22664 vector mode and that that mode matches the mode of the data
22665 being permuted.
22666 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22667 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22668 directly using expand_vec_perm_1 when forcing selectors into
22669 registers.
22670 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22671
22672 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22673
22674 * optabs-query.h (can_vec_perm_p): Delete.
22675 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22676 * optabs-query.c (can_vec_perm_p): Split into...
22677 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22678 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22679 particular selector is valid.
22680 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22681 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22682 (vect_grouped_load_supported): Likewise.
22683 (vect_shift_permute_load_chain): Likewise.
22684 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22685 (vect_transform_slp_perm_load): Likewise.
22686 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22687 (vectorizable_bswap): Likewise.
22688 (vect_gen_perm_mask_checked): Likewise.
22689 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22690 implementations of variable permutation vectors into account
22691 when deciding which selector to use.
22692 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22693 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22694 with a false third argument.
22695 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22696 to test whether the constant selector is valid and can_vec_perm_var_p
22697 to test whether a variable selector is valid.
22698
22699 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22700
22701 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22702 * optabs-query.c (can_vec_perm_p): Likewise.
22703 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22704 instead of vec_perm_indices.
22705 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22706 (vect_gen_perm_mask_checked): Likewise,
22707 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22708 (vect_gen_perm_mask_checked): Likewise,
22709
22710 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22711
22712 * optabs-query.h (qimode_for_vec_perm): Declare.
22713 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22714 (qimode_for_vec_perm): ...this new function.
22715 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22716
22717 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22718
22719 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22720 does not have a conditional at the top.
22721
22722 2018-01-02 Richard Biener <rguenther@suse.de>
22723
22724 * ipa-inline.c (big_speedup_p): Fix expression.
22725
22726 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22727
22728 PR target/81616
22729 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22730 for generic 4->6.
22731
22732 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22733
22734 PR target/81616
22735 Generic tuning.
22736 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22737 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22738 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22739 cond_taken_branch_cost 3->4.
22740
22741 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22742
22743 PR tree-optimization/83581
22744 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22745 TODO_cleanup_cfg if any changes have been made.
22746
22747 PR middle-end/83608
22748 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22749 convert_modes if target mode has the right side, but different mode
22750 class.
22751
22752 PR middle-end/83609
22753 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22754 last argument when extracting from CONCAT. If either from_real or
22755 from_imag is NULL, use expansion through memory. If result is not
22756 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22757 the parts directly to inner mode, if even that fails, use expansion
22758 through memory.
22759
22760 PR middle-end/83623
22761 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22762 check for bswap in mode rather than HImode and use that in expand_unop
22763 too.
22764 \f
22765 Copyright (C) 2018 Free Software Foundation, Inc.
22766
22767 Copying and distribution of this file, with or without modification,
22768 are permitted in any medium without royalty provided the copyright
22769 notice and this notice are preserved.