1 2019-05-11 Andreas Tobler <andreast@gcc.gnu.org>
3 Backport from mainline.
4 2019-04-25 Andreas Tobler <andreast@gcc.gnu.org>
6 * config/i386/freebsd64.h: Add bits for 32-bit multilib support.
7 * config/i386/t-freebsd64: New file.
8 * config.gcc: Add the t-freebsd64 for multilib support.
10 2019-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12 Backport from mainline.
13 2019-05-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Add
19 2019-05-06 Richard Biener <rguenther@suse.de>
22 Backport from mainline
23 2019-03-11 Jakub Jelinek <jakub@redhat.com>
27 * vr-values.c (vr_values::update_value_range): If
28 old_vr->varying_p (), don't update it, make new_vr also VARYING
31 2019-05-03 Richard Biener <rguenther@suse.de>
33 Backport from mainline
34 2019-03-14 Richard Biener <rguenther@suse.de>
37 * fold-const.c (operand_equal_p): For INDIRECT_REF check
38 that the access types are similar.
40 2019-03-07 Richard Biener <rguenther@suse.de>
42 PR tree-optimization/89595
43 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Take
44 stmt iterator as reference, take boolean output parameter to
45 indicate whether the stmt was removed and thus the iterator
47 (dom_opt_dom_walker::before_dom_children): Re-iterate over
48 stmts created by folding.
50 2019-03-14 Richard Biener <rguenther@suse.de>
52 PR tree-optimization/89710
53 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
56 2019-04-15 Richard Biener <rguenther@suse.de>
58 PR tree-optimization/90071
59 * tree-ssa-reassoc.c (init_range_entry): Do not pick up
60 abnormal operands from def stmts.
62 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
65 * expr.c (expand_assignment): Assert that bitpos is positive.
66 (store_field): Likewise
67 (expand_expr_real_1): Make sure that bitpos is positive.
68 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
71 2019-03-14 Richard Biener <rguenther@suse.de>
74 * config/i386/i386.c (make_resolver_func): Properly set
75 DECL_CONTEXT on the RESULT_DECL.
76 * config/rs6000/rs6000.c (make_resolver_func): Likewise.
78 2019-04-30 Jakub Jelinek <jakub@redhat.com>
80 Backported from mainline
81 2019-04-24 Jakub Jelinek <jakub@redhat.com>
84 * rtl.c (classify_insn): Return JUMP_INSN for asm goto.
85 * emit-rtl.c (try_split): Copy over REG_LABEL_TARGET.
88 * config/i386/i386.c (ix86_expand_sse_fp_minmax): Force if_true into
89 a register if both if_true and if_false are MEMs.
91 PR tree-optimization/90208
92 * tree-cfg.c (remove_bb): Move forced labels from removed bbs
93 after labels of new_bb, not before them.
95 2019-04-16 Jakub Jelinek <jakub@redhat.com>
97 PR rtl-optimization/90082
98 * dce.c (can_delete_call): New function.
99 (deletable_insn_p, mark_insn): Use it.
101 PR tree-optimization/90090
102 * tree-ssa-math-opts.c (is_division_by): Ignore divisions that can
104 (is_division_by_square): Likewise. Formatting fix.
106 2019-04-12 Jakub Jelinek <jakub@redhat.com>
108 PR rtl-optimization/89965
109 * dce.c: Include rtl-iter.h.
110 (struct check_argument_load_data): New type.
111 (check_argument_load): New function.
112 (find_call_stack_args): Check for loads from stack slots still tracked
113 in sp_bytes and punt if any is found.
116 * varasm.c (assemble_start_function): Don't use tree_fits_uhwi_p
117 and gcc_unreachable if it fails, just call tree_to_uhwi which
118 verifies that too. Test TREE_CHAIN instead of list_length > 1.
119 Start warning message with a lower-case letter. Formatting fixes.
121 PR rtl-optimization/90026
122 * cfgcleanup.c (try_optimize_cfg): When removing empty bb with no
123 successors, look for BARRIERs inside of the whole BB_FOOTER chain
124 rather than just at the start of it. If e->src BB_FOOTER is not NULL
125 in cfglayout mode, use emit_barrier_after_bb.
127 2019-04-11 Jakub Jelinek <jakub@redhat.com>
129 PR rtl-optimization/89965
130 * dce.c (sp_based_mem_offset): New function.
131 (find_call_stack_args): Use sp_based_mem_offset.
133 2019-04-10 Jakub Jelinek <jakub@redhat.com>
136 * gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
137 with strlen in between hostsz-3 and hostsz-1 inclusive when no
138 translation is needed, and when translation is needed, only append
139 ... if the string length is hostsz or more bytes long. Avoid using
142 2019-04-09 Jakub Jelinek <jakub@redhat.com>
144 PR tree-optimization/89998
145 * gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
146 instead of integer_type_node if possible, don't add ranges if return
147 type is not compatible with int.
148 * gimple-fold.c (gimple_fold_builtin_sprintf,
149 gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
152 2019-03-29 Jakub Jelinek <jakub@redhat.com>
155 * gimplify.c (gimplify_compound_literal_expr): Don't optimize a
156 non-addressable complit into its initializer if it is volatile.
158 2019-03-28 Jakub Jelinek <jakub@redhat.com>
161 * tree-inline.h (struct copy_body_data): Add
162 dont_remap_vla_if_no_change flag.
163 * tree-inline.c (remap_type_3, remap_type_2): New functions.
164 (remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change
165 and remap_type_2 returns false.
166 * omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change.
168 2019-03-20 Jakub Jelinek <jakub@redhat.com>
171 * lra-constraints.c (process_alt_operands) <reg>: For BLKmode, don't
172 update this_alternative nor this_alternative_set.
174 2019-03-19 Jakub Jelinek <jakub@redhat.com>
176 PR rtl-optimization/89768
177 * loop-unroll.c (unroll_loop_constant_iterations): Use gen_int_mode
179 (unroll_loop_runtime_iterations): Likewise.
182 * gimplify.c (gimplify_asm_expr): For output argument with
183 TREE_ADDRESSABLE type, clear allows_reg if it allows memory, otherwise
187 * config/i386/i386.c (ix86_expand_floorceildf_32): In ceil
188 compensation use x2 += 1 instead of x2 -= -1 and when honoring
189 signed zeros, do another copysign after the compensation.
191 2019-03-15 Jakub Jelinek <jakub@redhat.com>
194 * dwarf2out.c (add_const_value_attribute): Return false for MINUS,
195 SIGN_EXTEND and ZERO_EXTEND.
197 2019-03-14 Jakub Jelinek <jakub@redhat.com>
200 * multiple_target.c (create_dispatcher_calls): Change
201 references_to_redirect from vector of ipa_ref * to vector of ipa_ref.
202 In the node->iterate_referring loop, push *ref rather than ref, call
203 ref->remove_reference () and always pass 0 to iterate_referring.
205 PR rtl-optimization/89679
206 * expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
207 would contain a paradoxical SUBREG.
209 PR tree-optimization/89703
210 * tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
211 aren't compatible also with builtin_decl_explicit. Check pure
212 or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
213 and BUILT_IN_STPNCPY{,_CHK}.
215 2019-03-13 Jakub Jelinek <jakub@redhat.com>
218 * dwarf2out.c (size_of_die): For dw_val_class_view_list always use
220 (value_format): For dw_val_class_view_list never use DW_FORM_loclistx.
223 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args.
224 (ipa_simd_modify_function_body): Handle PHIs.
226 2019-03-12 Jakub Jelinek <jakub@redhat.com>
229 * builtins.c (expand_builtin_int_roundingfn,
230 expand_builtin_int_roundingfn_2): Return NULL_RTX instead of
231 gcc_unreachable if validate_arglist fails.
233 2019-03-09 Jakub Jelinek <jakub@redhat.com>
236 * attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for
237 dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT.
239 2019-03-05 Jakub Jelinek <jakub@redhat.com>
242 * config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
246 * builtins.c (maybe_emit_free_warning): Punt if free doesn't have
247 exactly one argument.
249 2019-02-28 Jakub Jelinek <jakub@redhat.com>
252 * convert.c (convert_to_real_1, convert_to_integer_1): Punt for
253 builtins if they don't have a single scalar floating point argument.
256 2019-02-20 Jakub Jelinek <jakub@redhat.com>
259 * expr.c (expand_assignment): If result is a MEM, use change_address
260 instead of simplify_gen_subreg.
262 2019-02-20 Jakub Jelinek <jakub@redhat.com>
263 David Malcolm <dmalcolm@redhat.com>
266 * fold-const.c (decode_field_reference): Return NULL_TREE if
267 lang_hooks.types.type_for_size returns NULL. Check it before
268 overwriting *exp_. Use return NULL_TREE instead of return 0.
270 2019-02-20 Jakub Jelinek <jakub@redhat.com>
274 * toplev.c (do_compile): Double the emin/emax exponents to workaround
277 2019-02-19 Richard Biener <rguenther@suse.de>
280 * toplev.c (do_compile): Initialize mpfr's exponent range
281 based on available float modes.
283 2019-04-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
285 Backport from mainline.
286 2019-04-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
288 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
289 Define __ARM_FEATURE_ATOMICS.
291 2019-04-30 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
293 Backport from mainline
294 2018-12-11 Richard Earnshaw <Richard.Earnshaw@arm.com>
297 * config/aarch64/iterators.md (sizem1): Add sizes for
299 (Vbtype): Add SFmode mapping.
300 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
301 (copysign<GPF:mode>3): New expand pattern.
302 (copysign<GPF:mode>3_insn): New insn pattern.
304 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
306 Backport from mainline:
307 2019-01-25 Richard Sandiford <richard.sandiford@arm.com>
310 * varasm.c (output_constructor_bitfield): Use wi::extract_uhwi
311 instead of accessing TREE_INT_CST_ELT directly.
313 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
315 Backport from mainline:
316 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
319 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
320 aarch64_evpc_tbl guard.
322 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
324 Backport from mainline:
325 2019-03-08 Richard Sandiford <richard.sandiford@arm.com>
328 * dwarf2cfi.c (dwarf2out_frame_debug_expr): Use CONST_POLY_INT
329 instead of POLY_INT_CST.
331 2019-04-26 Roman Zhuykov <zhroma@ispras.ru>
333 Backport from mainline
334 2019-04-23 Roman Zhuykov <zhroma@ispras.ru>
336 PR rtl-optimization/87979
337 * modulo-sched.c (sms_schedule): Start ii value "mii" should
340 PR rtl-optimization/84032
341 * modulo-sched.c (ps_insn_find_column): Change condition so that
342 branch will always be the last insn in a row inside partial
345 2019-04-19 Pat Haugen <pthaugen@us.ibm.com>
347 Backport from mainline:
348 2019-04-16 Pat Haugen <pthaugen@us.ibm.com>
351 * config/rs6000/power9.md: Add store forwarding bypass.
353 2019-04-17 Martin Jambor <mjambor@suse.cz>
355 Backport from mainline
356 2019-03-10 Martin Jambor <mjambor@suse.cz>
358 PR tree-optimization/85762
359 PR tree-optimization/87008
360 PR tree-optimization/85459
361 * tree-sra.c (contains_vce_or_bfcref_p): New parameter, set the bool
362 it points to if there is a type changing MEM_REF. Adjust all callers.
363 (build_accesses_from_assign): Disable total scalarization if
364 contains_vce_or_bfcref_p returns true through the new parameter, for
367 2019-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
369 Backport from mainline
370 2019-03-15 Kelvin Nilsen <kelvin@gcc.gnu.org>
373 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
374 When handling vec_extract, use modular arithmetic to allow
375 constant selectors greater than vector length.
376 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow
377 V1TImode vectors to have constant selector values greater than 0.
378 Use modular arithmetic to compute vector index.
379 (rs6000_split_vec_extract_var): Use modular arithmetic to compute
380 index for in-memory vectors. Correct code generation for
381 in-register vectors. Use inner mode of vector rather than mode of
382 destination for move instruction.
383 (altivec_expand_vec_ext_builtin): Use modular arithmetic to
386 2019-04-12 Kelvin Nilsen <kelvin@gcc.gnu.org>
389 * config/rs6000/vsx.md (*vsx_extract_<mode>_<VS_scalar>mode_var):
390 Use QI inner mode with V16QI vector mode.
392 2019-04-15 Martin Jambor <mjambor@suse.cz>
394 Backport from mainline
395 2019-04-15 Martin Jambor <mjambor@suse.cz>
398 * cgraph.c (clone_of_p): Loop over clone chain for each step in
401 2019-04-15 Martin Liska <mliska@suse.cz>
403 Backport from mainline
404 2019-01-18 Martin Liska <mliska@suse.cz>
405 Richard Biener <rguenther@suse.de>
408 * cgraph.h (create_version_clone_with_body): Add new argument
410 * cgraphclones.c (cgraph_node::create_version_clone): Add
411 DECL_ATTRIBUTES to a newly created decl. And call
412 valid_attribute_p so that proper cl_target_optimization_node
413 is set for the newly created declaration.
414 * multiple_target.c (create_target_clone): Set DECL_ATTRIBUTES
416 (expand_target_clones): Do not call valid_attribute_p, it must
418 * tree-inline.c (copy_decl_for_dup_finish): Reset mode for
421 2019-04-11 Richard Biener <rguenther@suse.de>
423 PR tree-optimization/90018
424 * tree-vect-data-refs.c (vect_preserves_scalar_order_p):
425 Test both SLP and interleaving variants.
427 2019-04-10 Matthew Malcomson <matthew.malcomson@arm.com>
430 * config/arm/arm.c (neon_valid_immediate): Disallow VOIDmode parameter.
431 * config/arm/constraints.md (Dm, DN, Dn): Split previous Dn constraint
433 * config/arm/neon.md (*neon_mov<mode>): Account for TImode and DImode
434 differences directly.
435 (*smax<mode>3_neon, vashl<mode>3, vashr<mode>3_imm): Use Dm constraint.
437 2019-04-07 Uroš Bizjak <ubizjak@gmail.com>
440 * config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
441 Avoid calling gen_lowpart with SYMBOL_REF and LABEL_REF operand.
443 2019-04-04 Martin Sebor <msebor@redhat.com>
446 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Bail
447 out if the number of arguments is less than expected.
449 2019-04-03 Richard Biener <rguenther@suse.de>
452 * lto-wrapper.c (run_gcc): Avoid implicit rules making
453 the all target phony.
455 2019-04-02 Uroš Bizjak <ubizjak@gmail.com>
459 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
460 Return false for variable DImode shifts.
461 (dimode_scalar_chain::compute_convert_gain): Do not handle
462 register count operand in variable DImode shifts.
463 (dimode_scalar_chain::make_vector_copies): Remove support to copy
464 count argument of a variable shift instruction to a vector register.
465 (dimode_scalar_chain::convert_reg): Remove support to convert
466 count argument of a variable shift instruction.
468 2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
470 Backport from mainline
471 2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
472 Eric Botcazou <ebotcazou@adacore.com>
474 PR rtl-optimization/89862
475 * rtl.h (word_register_operation_p): Exclude CONST_INT from operations
476 that operates on the full registers for WORD_REGISTER_OPERATIONS
479 2019-03-28 Uroš Bizjak <ubizjak@gmail.com>
482 * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
483 Also process XEXP (src, 0) of a shift insn.
485 2019-03-28 Martin Liska <mliska@suse.cz>
487 Backport from mainline
488 2018-11-05 Martin Liska <mliska@suse.cz>
491 * doc/invoke.texi: Remove options that are
492 not disabled with -Os.
494 2019-03-26 Uroš Bizjak <ubizjak@gmail.com>
497 * config/i386/i386.c (dimode_scalar_chain::convert_reg):
498 Also process XEXP (src, 0) of a shift insn.
500 2019-03-25 Andreas Krebbel <krebbel@linux.ibm.com>
502 Backport from mainline
503 2019-03-20 Andreas Krebbel <krebbel@linux.ibm.com>
506 * config/s390/s390.c (global_not_special_regno_p): Move to make it
508 (s390_optimize_register_info): Use global_not_special_regno_p to
509 check for global regs.
511 2019-03-22 Bill Schmidt <wschmidt@linux.ibm.com>
513 Backport from mainline
514 2019-03-22 Bill Schmidt <wschmidt@linux.ibm.com>
516 * config/rs6000/mmintrin.h (_mm_sub_pi32): Fix typo.
518 2019-03-21 Bill Schmidt <wschmidt@linux.ibm.com>
520 Backport from mainline
521 2019-03-08 Bill Schmidt <wschmidt@linux.ibm.com>
523 * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild
524 ud- and du-chains between phases.
526 2019-03-19 Richard Biener <rguenther@suse.de>
529 * opts.c (finish_options): Disable -gsplit-dwarf when doing LTO.
531 2019-03-19 Eric Botcazou <ebotcazou@adacore.com>
533 PR rtl-optimization/89753
534 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for
535 explicit unrolling factor even more robust.
537 2019-03-18 Martin Sebor <msebor@redhat.com>
540 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range):
541 Handle anti-ranges the same as no range at all.
543 2019-03-18 Martin Jambor <mjambor@suse.cz>
545 Backport from mainline
546 2019-03-18 Martin Jambor <mjambor@suse.cz>
548 PR tree-optimization/89546
549 * tree-sra.c (propagate_subaccesses_across_link): Requeue new_acc if
550 any propagation to its children took place.
552 2019-03-17 H.J. Lu <hongjiu.lu@intel.com>
554 Backport from mainline
555 2019-03-14 H.J. Lu <hongjiu.lu@intel.com>
558 * config/i386/i386.c (ix86_print_operand): Handle 'M' to add
559 addr32 prefix to VSIB address for X32.
560 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask): Prepend
562 (*avx512pf_gatherpf<mode>df_mask): Likewise.
563 (*avx512pf_scatterpf<mode>sf_mask): Likewise.
564 (*avx512pf_scatterpf<mode>df_mask): Likewise.
565 (*avx2_gathersi<mode>): Prepend "%M3" to opcode.
566 (*avx2_gathersi<mode>_2): Prepend "%M2" to opcode.
567 (*avx2_gatherdi<mode>): Prepend "%M3" to opcode.
568 (*avx2_gatherdi<mode>_2): Prepend "%M2" to opcode.
569 (*avx2_gatherdi<mode>_3): Prepend "%M3" to opcode.
570 (*avx2_gatherdi<mode>_4): Prepend "%M2" to opcode.`
571 (*avx512f_gathersi<mode>): Prepend "%M4" to opcode.
572 (*avx512f_gathersi<mode>_2): Prepend "%M3" to opcode.
573 (*avx512f_gatherdi<mode>): Prepend "%M4" to opcode.
574 (*avx512f_gatherdi<mode>_2): Prepend "%M3" to opcode.
575 (*avx512f_scattersi<mode>): Prepend "%M0" to opcode.
576 (*avx512f_scatterdi<mode>): Likewise.
578 2019-03-15 Richard Biener <rguenther@suse.de>
580 Backport from mainline
581 2018-11-30 Jakub Jelinek <jakub@redhat.com>
584 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
585 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
586 --param logical-op-non-short-circuit is present, override
587 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
588 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
590 2019-03-15 Martin Liska <mliska@suse.cz>
593 * doc/invoke.texi: Remove -fdump-class-hierarchy option.
595 2019-03-14 Martin Jambor <mjambor@suse.cz>
597 Backport from mainline
598 2019-03-07 Martin Jambor <mjambor@suse.cz>
601 * ipa-cp.c (perform_estimation_of_a_value): Account zero time benefit
602 for extern inline functions.
604 2019-03-14 Richard Biener <rguenther@suse.de>
607 * tree-scalar-evolution.c (get_loop_exit_condition): Use
609 * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
610 Use gimple_location_safe.
612 2019-03-13 Vladimir Makarov <vmakarov@redhat.com>
615 * lra-constraints.c (inherit_in_ebb): Update
616 potential_reload_hard_regs along with live_hard_regs.
618 2019-03-14 Richard Biener <rguenther@suse.de>
620 Backport from mainline
621 2019-03-13 Richard Biener <rguenther@suse.de>
624 * tree-scalar-evolution.c (simplify_peeled_chrec): Do not
625 throw FP expressions at tree-affine.
627 2019-03-01 Richard Biener <rguenther@suse.de>
630 * tree-cfgcleanup.h (cleanup_tree_cfg): Add SSA update flags
631 argument, defaulted to zero.
632 * passes.c (execute_function_todo): Pass down SSA update flags
634 * tree-cfgcleanup.c: Include tree-into-ssa.h and tree-cfgcleanup.h.
635 (cleanup_tree_cfg_1): After cleanup_control_flow_pre update SSA
637 (cleanup_tree_cfg_noloop): Pass down SSA update flags.
638 (cleanup_tree_cfg): Get and pass down SSA update flags.
640 2019-02-18 Richard Biener <rguenther@suse.de>
642 PR tree-optimization/89296
643 * tree-ssa-loop-ch.c (ch_base::copy_headers): Restrict setting
644 of no-warning flag to cases that might emit the bogus warning.
646 2019-03-13 Andreas Krebbel <krebbel@linux.ibm.com>
648 Backport from mainline
649 2019-03-11 Andreas Krebbel <krebbel@linux.ibm.com>
651 * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not
652 only on the else branch.
654 2019-03-13 Andreas Krebbel <krebbel@linux.ibm.com>
656 Backport from mainline
657 2019-02-07 Andreas Krebbel <krebbel@linux.ibm.com>
659 * config/s390/s390-builtin-types.def: Add new types.
660 * config/s390/s390-builtins.def: (s390_vec_xl, s390_vec_xld2)
661 (s390_vec_xlw4): Make the memory operand into a const pointer.
662 (s390_vec_xld2, s390_vec_xlw4): Add a variant for single precision
664 * config/s390/s390-c.c (s390_expand_overloaded_builtin): Generate
665 a new vector type with the alignment of the scalar memory operand.
667 2019-03-12 Richard Biener <rguenther@suse.de>
669 PR tree-optimization/89664
670 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly
671 free the occurance tree after the early out.
673 2019-03-12 Andre Vieira <andre.simoesdiasvieira@arm.com>
675 Backport from mainline
676 2019-03-08 Andre Vieira <andre.simoesdiasvieira@arm.com>
678 * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
681 2019-03-11 Eric Botcazou <ebotcazou@adacore.com>
683 PR rtl-optimization/89588
684 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for
685 explicit unrolling factor more robust.
687 2019-03-11 Martin Liska <mliska@suse.cz>
689 Backport from mainline
690 2019-03-08 Martin Liska <mliska@suse.cz>
693 * config/i386/i386.c (ix86_option_override_internal): Disable
694 jump tables when retpolines are used.
696 2019-03-11 Martin Liska <mliska@suse.cz>
698 Backport from mainline
699 2019-02-11 David Malcolm <dmalcolm@redhat.com>
702 * input.c (selftest::test_line_offset_overflow): New selftest.
703 (selftest::input_c_tests): Call it.
705 2019-03-08 Martin Jambor <mjambor@suse.cz>
707 Backport from mainline
708 2019-03-07 Martin Jambor <mjambor@suse.cz>
711 * cgraph.h (cgraph_node): New inline method former_thunk_p.
712 * cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk.
713 (clone_of_p): Treat expanded thunks like thunks, be optimistic if they
714 have multiple callees. At the end check if declarations match as
715 opposed to cgraph_nodes.
717 2019-03-06 Tamar Christina <tamar.christina@arm.com>
720 2019-02-25 Tamar Christina <tamar.christina@arm.com>
723 * common/config/aarch64/aarch64-common.c
724 (struct aarch64_option_extension): Add is_synthetic.
725 (all_extensions): Use it.
726 (TARGET_OPTION_INIT_STRUCT): Define hook.
727 (struct gcc_targetm_common): Moved to end.
728 (all_extensions_by_on): New.
729 (opt_ext_cmp, typedef opt_ext): New.
730 (aarch64_option_init_struct): New.
731 (aarch64_contains_opt): New.
732 (aarch64_get_extension_string_for_isa_flags): Output smallest set.
733 * config/aarch64/aarch64-option-extensions.def
734 (AARCH64_OPT_EXTENSION): Explicitly include AES and SHA2 in crypto.
735 (fp, simd, crc, lse, fp16, rcpc, rdma, dotprod, aes, sha2, sha3,
737 Set is_synthetic to false.
738 (crypto): Set is_synthetic to true.
739 * config/aarch64/driver-aarch64.c (AARCH64_OPT_EXTENSION): Add
742 2019-03-06 Tamar Christina <tamar.christina@arm.com>
745 2019-02-28 Tamar Christina <tamar.christina@arm.com>
748 * config/aarch64/aarch64-option-extensions.def: Document it.
749 * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip feature
752 2019-03-06 Xiong Hu Luo <luoxhu@linux.ibm.com>
754 Backport of r268834 from mainline to gcc-8-branch.
755 2019-02-13 Xiong Hu Luo <luoxhu@linux.vnet.ibm.com>
757 * config/rs6000/altivec.h (vec_sbox_be, vec_cipher_be,
758 vec_cipherlast_be, vec_ncipher_be, vec_ncipherlast_be): New #defines.
759 * config/rs6000/crypto.md (CR_vqdi): New define_mode_iterator.
760 (crypto_vsbox_<mode>, crypto_<CR_insn>_<mode>): New define_insns.
761 * config/rs6000/rs6000-builtin.def (VSBOX_BE): New BU_CRYPTO_1.
762 (VCIPHER_BE, VCIPHERLAST_BE, VNCIPHER_BE, VNCIPHERLAST_BE):
764 * config/rs6000/rs6000.c (builtin_function_type)
765 <CRYPTO_BUILTIN_VSBOX_BE, CRYPTO_BUILTIN_VCIPHER_BE,
766 CRYPTO_BUILTIN_VCIPHERLAST_BE, CRYPTO_BUILTIN_VNCIPHER_BE,
767 CRYPTO_BUILTIN_VNCIPHERLAST_BE>: New switch options.
768 * doc/extend.texi (vec_sbox_be, vec_cipher_be, vec_cipherlast_be,
769 vec_ncipher_be, vec_ncipherlast_be): New builtin functions.
771 2019-03-05 Richard Biener <rguenther@suse.de>
773 Backport from mainline
774 2019-02-26 Richard Biener <rguenther@suse.de>
776 PR tree-optimization/89505
777 * tree-ssa-structalias.c (compute_dependence_clique): Make sure
778 to handle restrict pointed-to vars with multiple subvars
781 2019-03-01 Tamar Christina <tamar.christina@arm.com>
784 * config/aarch64/aarch64-option-extensions.def (fp, simd, crypto,
785 fp16): Collapse line.
787 2019-03-01 Richard Biener <rguenther@suse.de>
789 Backport from mainline
790 2019-03-01 Jakub Jelinek <jakub@redhat.com>
793 * dwarf2out.c (output_comdat_type_unit): Add ATTRIBUTE_UNUSED to
794 early_lto_debug argument.
796 2019-02-27 Richard Biener <rguenther@suse.de>
799 * dwarf2out.c (use_debug_types): Disable when in_lto_p.
801 2019-02-27 Richard Biener <rguenther@suse.de>
804 * dwarf2out.c (output_comdat_type_unit): Add early_lto_debug
805 parameter, prefix section name with .gnu.debuglto_ if true.
806 (dwarf2out_finish): Pass false to output_comdat_type_unit.
807 (dwarf2out_early_finish): Pass true to output_comdat_type_unit.
809 2019-02-27 Richard Biener <rguenther@suse.de>
812 * dwarf2out.c (size_of_die): Key on AT_ref (a)->comdat_type_p
813 rather than on use_debug_types, doing what output_die does.
814 (value_format): Likewise.
816 2019-02-28 Eric Botcazou <ebotcazou@adacore.com>
818 PR tree-optimization/89536
819 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_NOT_EXPR>: Test
820 only whether bit #0 of the value is 0 instead of the entire value.
822 2019-02-28 Li Jia He <helijia@linux.ibm.com>
825 2019-02-20 Li Jia He <helijia@linux.ibm.com>
828 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin)
829 <case ALTIVEC_BUILTIN_VSPLTISB, ALTIVEC_BUILTIN_VSPLTISH,
830 ALTIVEC_BUILTIN_VSPLTISW>: Don't convert the operand before
833 2019-02-27 Uroš Bizjak <ubizjak@gmail.com>
836 * config/i386/i386.c (ix86_atomic_assign_expand_fenv): Check
837 TARGET_SSE in addition to TARGET_SSE_MATH.
839 (ix86_excess_precision): Ditto.
840 (ix86_float_exceptions_rounding_supported_p): Ditto.
841 (use_rsqrt_p): Ditto.
842 * config/i386/sse.md (rsqrt<mode>2): Ditto.
844 2019-02-27 Jakub Jelinek <jakub@redhat.com>
846 Backported from mainline
847 2019-02-18 Jakub Jelinek <jakub@redhat.com>
850 * config/s390/s390.c (s390_indirect_branch_attrvalue,
851 s390_indirect_branch_settings): Define unconditionally.
852 (s390_set_current_function): Likewise, but guard the whole body except
853 the s390_indirect_branch_settings call with
854 #if S390_USE_TARGET_ATTRIBUTE.
855 (TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
857 2019-02-26 Eric Botcazou <ebotcazou@adacore.com>
859 Backport from mainline
860 2019-02-19 Eric Botcazou <ebotcazou@adacore.com>
862 * rtlanal.c (get_initial_register_offset): Fall back to the estimate
863 as long as the epilogue isn't completed.
865 2019-02-26 Eric Botcazou <ebotcazou@adacore.com>
867 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_IOR_EXPR>: Fix
868 and move around comment.
869 <BIT_AND_EXPR>: Likewise.
870 <BIT_NOT_EXPR>: Add specific handling for boolean types.
872 2019-02-24 Alan Modra <amodra@gmail.com>
875 * config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int
876 output reg on add insn.
877 (<bd>tf_<mode> split): Likewise. Match predicates with insn.
879 2019-02-22 Jakub Jelinek <jakub@redhat.com>
881 * BASE-VER: Set to 8.3.1.
883 2019-02-22 Release Manager
885 * GCC 8.3.0 released.
887 2019-02-15 Richard Biener <rguenther@suse.de>
888 Jakub Jelinek <jakub@redhat.com>
890 PR tree-optimization/89278
891 * tree-loop-distribution.c: Include tree-eh.h.
892 (generate_memset_builtin, generate_memcpy_builtin): Call
893 rewrite_to_non_trapping_overflow on builtin->size before passing it
894 to force_gimple_operand_gsi.
896 2019-02-15 Jakub Jelinek <jakub@redhat.com>
899 * optc-save-gen.awk: Handle optimize_fast like optimize_size or
901 * opth-gen.awk: Likewise.
903 2019-02-14 David Malcolm <dmalcolm@redhat.com>
905 Backport of r267957 from trunk.
906 2019-01-15 David Malcolm <dmalcolm@redhat.com>
909 * tree.c (build_function_type): Assert that arg_types is not
912 2019-02-14 Jakub Jelinek <jakub@redhat.com>
914 PR rtl-optimization/89354
915 * combine.c (make_extraction): Punt if extraction_mode is narrower
918 2019-02-14 David Malcolm <dmalcolm@redhat.com>
920 Backport of r263339 from trunk.
921 2018-08-06 David Malcolm <dmalcolm@redhat.com>
923 * function-tests.c (selftest::test_expansion_to_rtl): Call
924 free_after_compilation.
926 2019-02-14 David Malcolm <dmalcolm@redhat.com>
928 Backport of r263295 from trunk.
929 2018-08-03 David Malcolm <dmalcolm@redhat.com>
931 * doc/gcov.texi (-x): Remove duplicate "to".
932 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
933 (-Wif-not-aligned): Remove duplicate "is".
934 (-flto): Remove duplicate "the".
935 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
937 (MSP430 Options): Remove duplicate "and" from the description
938 of "-mgprel-sec=regexp".
939 (x86 Options): Remove duplicate copies of "vmldLog102" and
940 vmlsLog104 from description of "-mveclibabi=type".
942 2019-02-14 David Malcolm <dmalcolm@redhat.com>
944 Backport of r263275 from trunk.
945 2018-08-02 David Malcolm <dmalcolm@redhat.com>
947 * diagnostic-show-locus.c (diagnostic_show_locus): Use
948 pp_take_prefix when saving the existing prefix.
949 * diagnostic.c (diagnostic_append_note): Likewise.
950 * langhooks.c (lhd_print_error_function): Likewise.
951 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
952 param's type. Free the existing prefix.
953 (pp_take_prefix): New function.
954 (pretty_printer::pretty_printer): Drop the prefix parameter.
955 Rename the length parameter to match the comment.
956 (pretty_printer::~pretty_printer): Free the prefix.
957 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
959 (struct pretty_printer): Drop the "const" from "prefix" field's
960 type and clarify memory management.
961 (pp_set_prefix): Drop the "const" from the 2nd param.
962 (pp_take_prefix): New decl.
964 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
967 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
971 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
973 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
976 2019-01-18 Segher Boessenkool <segher@kernel.crashing.org>
979 * config/rs6000/rs6000.md (*movsi_from_df): Allow only register
982 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
985 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
987 PR rtl-optimization/85805
988 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
989 value for hard registers if that was written in the same mode.
991 2019-02-14 Martin Liska <mliska@suse.cz>
993 Backport from mainline
994 2019-02-14 Martin Liska <mliska@suse.cz>
996 PR rtl-optimization/89242
997 * dce.c (delete_unmarked_insns): Call free_dominance_info we
998 process a transformation.
1000 2019-02-14 Martin Liska <mliska@suse.cz>
1002 Backport from mainline
1003 2019-02-13 Martin Liska <mliska@suse.cz>
1006 * cfgrtl.c (remove_barriers_from_footer): New function.
1007 (try_redirect_by_replacing_jump): Use it.
1008 (cfg_layout_redirect_edge_and_branch): Likewise.
1010 2019-02-14 Martin Liska <mliska@suse.cz>
1012 Backport from mainline
1013 2019-02-11 Martin Liska <mliska@suse.cz>
1016 * ipa-cp.c (build_toporder_info): Remove usage of a param.
1017 * ipa-inline.c (inline_small_functions): Likewise.
1018 * ipa-pure-const.c (propagate_pure_const): Likewise.
1019 (propagate_nothrow): Likewise.
1020 * ipa-reference.c (propagate): Likewise.
1021 * ipa-utils.c (struct searchc_env): Remove unused field.
1022 (searchc): Always search across AVAIL_INTERPOSABLE.
1023 (ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as
1024 the only called IPA pure const can properly not propagate
1025 across interposable boundary.
1026 * ipa-utils.h (ipa_reduced_postorder): Remove param.
1028 2019-02-14 Jakub Jelinek <jakub@redhat.com>
1030 PR tree-optimization/89314
1031 * fold-const.c (fold_binary_loc): Cast strlen argument to
1032 const char * before dereferencing it. Formatting fixes.
1034 Backported from mainline
1035 2019-02-13 Jakub Jelinek <jakub@redhat.com>
1038 * tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
1039 into pt->vars_contains_escaped_heap instead of setting
1040 pt->vars_contains_escaped_heap to it.
1043 * optabs.c (prepare_cmp_insn): Use UINTVAL (size) instead of
1044 INTVAL (size), compare it to GET_MODE_MASK instead of
1045 1 << GET_MODE_BITSIZE.
1048 * config/i386/predicates.md (x86_64_immediate_operand): Allow
1049 TLS UNSPECs offsetted by signed 32-bit CONST_INT even with
1052 2019-02-09 Jakub Jelinek <jakub@redhat.com>
1055 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
1056 If !node->definition and TYPE_ARG_TYPES is non-NULL, use
1057 TYPE_ARG_TYPES instead of DECL_ARGUMENTS.
1059 2019-02-13 Bill Schmidt <wschmidt@linux.ibm.com>
1061 Backport from mainline
1062 2019-02-11 Bill Schmidt <wschmidt@linux.ibm.com>
1064 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right
1065 and shift-left vector built-ins need to include a TRUNC_MOD_EXPR
1066 for correct semantics.
1068 2019-02-13 Richard Biener <rguenther@suse.de>
1070 Backport from mainline
1071 2019-01-08 Richard Biener <rguenther@suse.de>
1073 PR tree-optimization/86554
1074 * tree-ssa-sccvn.c (visit_nary_op): When value-numbering to
1075 expressions with different overflow behavior make sure there's an
1076 available expression on the path.
1078 2019-02-13 Martin Liska <mliska@suse.cz>
1081 * lto-streamer.h (LTO_minor_version): Bump version due
1084 2019-02-13 Richard Biener <rguenther@suse.de>
1086 Backport from mainline
1087 2019-02-12 Richard Biener <rguenther@suse.de>
1089 PR tree-optimization/89253
1090 * tree-ssa-loop-split.c (tree_ssa_split_loops): Check we can
1093 2019-02-08 Richard Biener <rguenther@suse.de>
1096 * tree-data-ref.c (initialize_matrix_A): Fail if constant
1098 (analyze_subscript_affine_affine): Handle failure from
1099 initialize_matrix_A.
1101 2019-01-28 Richard Biener <rguenther@suse.de>
1103 PR tree-optimization/88739
1104 * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid generating
1105 BIT_FIELD_REFs of non-mode-precision integral operands.
1107 2019-02-12 Jan Hubicka <hubicka@ucw.cz>
1109 Backport from mainline:
1110 2019-02-09 Jan Hubicka <hubicka@ucw.cz>
1112 * ipa-visibility.c (localize_node): Also do not localize
1113 LDPR_PREVAILING_DEF_IRONLY_EXP.
1115 2019-02-11 Stefan Agner <stefan@agner.ch>
1117 Backport from mainline.
1118 2019-01-10 Stefan Agner <stefan@agner.ch>
1121 * config/arm/arm.c (arm_option_override_internal): Force
1122 opts->x_inline_asm_unified to true only if TARGET_THUMB2_P.
1124 2019-02-09 Jan Hubicka <hubicka@ucw.cz>
1126 Backport from mainline:
1127 2019-01-05 Jan Hubicka <hubicka@ucw.cz>
1131 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
1133 * ipa-inline.c (edge_badness): Use inlined_time instead of
1134 inline_summaries->get.
1136 2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
1138 Backported from mainline
1139 2019-02-05 Aaron Sawdey <acsawdey@linux.ibm.com>
1142 * config/rs6000/rs6000.md (<bd>tf_<mode>): Generate a local label
1143 for the long branch case.
1145 2019-02-05 Aaron Sawdey <acsawdey@linux.ibm.com>
1148 * config/rs6000/rs6000-string.c (do_ifelse, expand_cmp_vec_sequence,
1149 expand_compare_loop, expand_block_compare_gpr,
1150 expand_strncmp_align_check, expand_strncmp_gpr_sequence): Insert
1151 REG_BR_PROB notes in inline expansion of memcmp/strncmp. Add
1152 #include "profile-count.h" and "predict.h" for types and functions
1153 needed to work with REG_BR_PROB notes.
1155 2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
1157 * config/rs6000/rs6000-string.c (expand_compare_loop,
1158 expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
1161 2019-02-09 Jakub Jelinek <jakub@redhat.com>
1163 Backported from mainline
1164 2019-01-16 David Malcolm <dmalcolm@redhat.com>
1167 * combine.c (delete_noop_moves): Convert to "bool" return,
1168 returning true if any edges are eliminated.
1169 (combine_instructions): Also return true if delete_noop_moves
1172 2019-02-08 Jakub Jelinek <jakub@redhat.com>
1174 PR rtl-optimization/89234
1175 * except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
1176 is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
1177 (copy_reg_eh_region_note_backward): Likewise.
1179 2019-02-09 Alan Modra <amodra@gmail.com>
1182 * config/rs6000/rs6000.c (save_reg_p): Match logic in
1183 rs6000_emit_prologue emitting pic_offset_table setup.
1185 2019-02-08 Richard Biener <rguenther@suse.de>
1187 Backport from mainline
1188 2018-11-13 Richard Biener <rguenther@suse.de>
1190 PR tree-optimization/86991
1191 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1192 group building until we have successfully detected the SLP
1194 (vect_is_simple_reduction): Remove fixup code here.
1196 2019-02-08 Richard Biener <rguenther@suse.de>
1198 Backport from mainline
1199 2019-02-03 Richard Biener <rguenther@suse.de>
1202 * dwarf2out.c (copy_ancestor_tree): Register non-stubs as
1205 2019-01-29 Richard Biener <rguenther@suse.de>
1208 * dwarf2out.c (collect_skeleton_dies): New helper.
1209 (copy_decls_for_unworthy_types): Call it.
1210 (build_abbrev_table): Do not try to replace
1211 DW_AT_signature refs with local refs.
1213 2019-01-17 Richard Biener <rguenther@suse.de>
1216 * dwarf2out.c (want_pubnames): Never generate pubnames sections
1217 and friends for the LTO part of debug info.
1219 2019-01-24 Richard Biener <rguenther@suse.de>
1222 * tree-streamer-out.c (write_ts_decl_common_tree_pointers):
1223 When in "legacy" debug mode make sure to reset self-origins.
1225 2019-01-15 Richard Biener <rguenther@suse.de>
1228 * dwarf2out.c (gen_member_die): Do not generate inheritance
1231 2018-11-22 Richard Biener <rguenther@suse.de>
1235 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1236 which can appear in size expressions.
1237 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1238 CALL_EXPR_BY_DESCRIPTOR.
1239 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1240 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1241 CALL_EXPR_BY_DESCRIPTOR.
1242 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1244 2019-02-08 Christophe Lyon <christophe.lyon@linaro.org>
1246 Backport from mainline
1247 2019-01-07 Christophe Lyon <christophe.lyon@linaro.org>
1250 * doc/install.texi (with-multilib-list): Document for aarch64.
1252 2019-02-08 Richard Biener <rguenther@suse.de>
1254 Backport from mainline
1255 2018-12-10 Richard Biener <rguenther@suse.de>
1257 PR tree-optimization/88427
1258 * vr-values.c (vr_values::extract_range_from_phi_node):
1259 Handle symbolic ranges conservatively when trying to drop
1262 2018-11-28 Richard Biener <rguenther@suse.de>
1264 PR tree-optimization/88217
1265 * vr-values.c (vr_values::extract_range_from_phi_node): Make
1266 sure to handle results > +INF and < -INF correctly when
1267 trying to drop down to +INF - 1 or -INF + 1.
1269 2018-11-23 Richard Biener <rguenther@suse.de>
1271 PR tree-optimization/88149
1272 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1273 the case where there are two different def types for the
1274 same operand at different operand position in the same stmt.
1276 2019-02-07 Jakub Jelinek <jakub@redhat.com>
1278 Backported from mainline
1279 2019-02-05 Jakub Jelinek <jakub@redhat.com>
1282 * dce.c (delete_unmarked_insns): Don't remove no-op moves if they
1283 can throw, non-call exceptions are enabled and we can't delete
1284 dead exceptions or alter cfg. Set must_clean if
1285 delete_insn_and_edges returns true, don't set it blindly for calls.
1287 PR rtl-optimization/89195
1288 * combine.c (make_extraction): For MEMs, don't extract bytes outside
1289 of the original MEM.
1292 * optabs.c (prepare_cmp_insn): Pass x and y to
1293 emit_block_comp_via_libcall rather than XEXP (x, 0) and XEXP (y, 0).
1295 2019-02-02 Jakub Jelinek <jakub@redhat.com>
1298 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
1299 Punt with warning on aggregate return or argument types. Ignore
1300 type/mode checking for uniform arguments.
1302 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1304 PR tree-optimization/88107
1305 * tree-cfg.c (find_outermost_region_in_block): Add ALL argument,
1306 instead of assertion that eh_region_outermost is non-NULL, if it
1307 is NULL, set *ALL to true and return NULL.
1308 (move_sese_region_to_fn): Adjust caller, if all is set, call
1309 duplicate_eh_regions with NULL region.
1311 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1314 * ipa-inline.c (sanitize_attrs_match_for_inline_p): Allow inlining
1315 always_inline callees into no_sanitize_address callers.
1317 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1320 * config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
1321 for arguments to functions that are TU-local and shouldn't be
1322 referenced by assembly.
1324 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1328 * omp-simd-clone.c (simd_clone_clauses_extract)
1329 <case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL
1330 OMP_CLAUSE_ALIGNED_ALIGNMENT.
1332 2019-01-28 Jakub Jelinek <jakub@redhat.com>
1335 * gimplify.c (gimplify_omp_for): When adding OMP_CLAUSE_*_GIMPLE_SEQ
1336 for lastprivate/linear IV, push gimplify context around gimplify_assign
1337 and, if it needed any temporaries, pop it into a gimple bind around the
1341 * doc/invoke.texi (-mclwb, -mprfchw, -mrdpid, -mrdseed, -msgx,
1342 -madx, -mhle, -mavx5124fmaps, -mavx512vnni, -mavx5124vnniw): Document
1344 (bmi2): Add missing @opindex.
1345 * doc/extend.texi (x86 target attribute): Move fma4, lwp, ssse3
1346 options alphabetically. Add missing 3dnow, 3dnowa, adx, avx, avx2,
1347 avx5124fmaps, avx5124vnniw, avx512bitalg, avx512bw, avx512cd,
1348 avx512dq, avx512er, avx512f, avx512ifma, avx512pf, avx512vbmi,
1349 avx512vbmi2, avx512vl, avx512vnni, avx512vpopcntdq, bmi, bmi2,
1350 clflushopt, clwb, clzero, crc32, cx16, f16c, fma, fsgsbase,
1351 fxsr, gfni, hle, lzcnt, movbe, movdir64b, movdiri, mwaitx, pconfig,
1352 pku, prefetchwt1, prfchw, rdpid, rdrnd, rdseed, rtm, sahf,
1353 sgx, sha, shstk, tbm, vaes, vpclmulqdq, wbnoinvd, xsave,
1354 xsavec, xsaveopt and xsaves options.
1356 2019-01-27 Jakub Jelinek <jakub@redhat.com>
1359 * config/i386/sse.md
1360 (<mask_codefor>avx512dq_shuf_<shuffletype>64x2_1<mask_name>,
1361 avx512f_shuf_<shuffletype>64x2_1<mask_name>): Ensure the
1362 first constants in pairs are multiples of 2. Formatting fixes.
1363 (avx512vl_shuf_<shuffletype>32x4_1<mask_name>,
1364 avx512vl_shuf_<shuffletype>32x4_1<mask_name>): Ensure the
1365 first constants in each quadruple are multiples of 4. Formatting fixes.
1367 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1369 PR tree-optimization/88964
1370 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also
1371 punt if HONOR_SNANS (chrec).
1373 2019-01-23 Jakub Jelinek <jakub@redhat.com>
1375 PR tree-optimization/88964
1376 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Use
1377 build_zero_cst instead of build_int_cst. Return false for loop
1378 invariants which honor signed zeros.
1380 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1383 * config/rs6000/rs6000.c: Include tree-vrp.h and tree-ssanames.h.
1384 (rs6000_gimple_fold_builtin): If MEM_REF address doesn't satisfy
1385 is_gimple_mem_ref_addr predicate, force it into a SSA_NAME first.
1388 * gimplify.c (gimplify_omp_atomic): Handle bitfield atomics with
1389 non-integral DECL_BIT_FIELD_REPRESENTATIVEs.
1392 * optabs.c (add_equal_note): Add op0_mode argument, use it instead of
1394 (expand_binop_directly, expand_doubleword_clz,
1395 expand_doubleword_popcount, expand_ctz, expand_ffs,
1396 expand_unop_direct, maybe_emit_unop_insn): Adjust callers.
1398 PR rtl-optimization/49429
1400 PR rtl-optimization/86334
1402 * expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
1403 addressable from here...
1404 (emit_block_op_via_libcall): ... to here.
1406 2019-01-17 Jakub Jelinek <jakub@redhat.com>
1409 * config/aarch64/arm_neon.h: Fix #pragma GCC target syntax - replace
1410 (("..."))) with ("..."). Use arch=armv8.2-a+sha3 instead of
1411 arch=armv8.2-a+crypto for vsha512hq_u64 etc. intrinsics.
1413 PR rtl-optimization/88870
1414 * dce.c (deletable_insn_p): Never delete const/pure calls that can
1415 throw if we can't alter the cfg or delete dead exceptions.
1416 (mark_insn): Don't call find_call_stack_args for such calls.
1418 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1421 * passes.c (finish_optimization_passes): Call print_combine_total_stats
1422 inside of pass_combine_1 dump rather than pass_profile_1.
1424 2019-01-10 Jakub Jelinek <jakub@redhat.com>
1427 * attribs.c (handle_dll_attribute): Clear TREE_STATIC after setting
1430 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1433 * dwarf2out.c (const_ok_for_output_1): Remove redundant call to
1434 const_not_ok_for_debug_p target hook.
1435 (mem_loc_descriptor) <case UNSPEC>: Only call const_ok_for_output_1
1436 on UNSPEC and subexpressions thereof if all subexpressions of the
1437 UNSPEC are CONSTANT_P.
1439 2019-01-05 Jakub Jelinek <jakub@redhat.com>
1442 * dwarf2out.c (const_ok_for_output_1): Reject MINUS that contains
1443 SYMBOL_REF, CODE_LABEL or UNSPEC in subexpressions of second argument.
1444 Reject PLUS that contains SYMBOL_REF, CODE_LABEL or UNSPEC in
1445 subexpressions of both operands.
1446 (mem_loc_descriptor): Handle UNSPEC if target hook acks it and all the
1447 subrtxes are CONSTANT_P.
1449 2019-02-07 Richard Biener <rguenther@suse.de>
1451 Backport from mainline
1452 2018-11-20 Richard Biener <rguenther@suse.de>
1454 PR tree-optimization/88105
1455 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1458 2018-11-28 Richard Biener <rguenther@suse.de>
1460 PR tree-optimization/88223
1461 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1462 over a stored-same value may-alias store make sure to consider
1463 partial overlaps which are valid when TBAA reasonings do not
1464 apply and byte-granular overlaps are possible at all.
1466 2019-02-07 Richard Biener <rguenther@suse.de>
1468 Backport from mainline
1469 2018-12-11 Richard Biener <rguenther@suse.de>
1473 * tree-complex.c (update_complex_assignment): Properly transfer
1474 or clean EH info around gimple_assign_set_rhs_with_ops.
1476 2018-11-15 Richard Biener <rguenther@suse.de>
1478 PR tree-optimization/88030
1479 * tree-complex.c (need_eh_cleanup): New global.
1480 (update_complex_assignment): Mark blocks that need EH update.
1481 (expand_complex_comparison): Likewise.
1482 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1483 perform EH cleanup and schedule CFG cleanup if that did anything.
1485 2018-11-08 Richard Biener <rguenther@suse.de>
1487 PR tree-optimization/87929
1488 * tree-complex.c (expand_complex_comparison): Clean EH.
1490 2019-02-06 Eric Botcazou <ebotcazou@adacore.com>
1492 * config/i386/i386.c (ix86_expand_prologue): Emit a memory blockage
1493 after restoring registers saved to allocate the frame on Windows.
1495 2019-02-06 Richard Biener <rguenther@suse.de>
1497 Backport from mainline
1498 2019-01-31 Richard Biener <rguenther@suse.de>
1500 PR tree-optimization/89135
1501 * tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
1502 with abnormal preds.
1504 2019-01-18 Richard Biener <rguenther@suse.de>
1506 PR tree-optimization/88903
1507 * tree-vect-stmts.c (vectorizable_shift): Verify we see all
1508 scalar stmts a SLP shift amount is composed of when detecting
1511 2019-02-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
1513 Backport from mainline.
1514 2019-01-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
1515 * config/rs6000/rs6000-c.c (altivec-resolve_overloaded_builtin):
1516 Change handling of ALTIVEC_BUILTIN_VEC_EXTRACT. Coerce result to
1517 type of vector element when vec_extract is implemented by direct
1520 2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
1522 Backport from mainline
1523 2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
1526 * config/s390/s390.md: Remove load and test FP splitter.
1528 2019-02-04 Bill Schmidt <wshmidt@linux.ibm.com>
1531 Backport from mainline
1533 2019-01-30 Bill Schmidt <wschmidt@linux.ibm.com>
1536 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v4sf_scalar):
1537 Disable for little-endian.
1539 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1542 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v2df_scalar):
1543 Disable for little endian.
1545 2019-02-04 Eric Botcazou <ebotcazou@adacore.com>
1547 * config/sparc/sparc.h: Remove superfluous blank lines.
1548 * config/sparc/sparc.c (global_offset_table_rtx): Rename into...
1549 (got_register_rtx): ...this.
1550 (sparc_got): Adjust to above renaming.
1551 (sparc_tls_got): Likewise.
1552 (sparc_output_mi_thunk): Likewise.
1553 (sparc_init_pic_reg): Likewise.
1554 (save_local_or_in_reg_p): Fix test on the GOT register.
1555 (USE_HIDDEN_LINKONCE): Move around.
1556 (get_pc_thunk_name): Likewise.
1557 (gen_load_pcrel_sym): Likewise.
1558 (load_got_register): Likewise.
1560 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1562 Backport from mainline
1563 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1565 PR tree-optimization/87022
1566 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1567 bits in dist vector rather than the first one.
1569 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1571 Backport from mainline
1572 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1574 PR tree-optimization/88932
1575 * tree-predcom.c (try_combine_chains): Get loop bbs in dom order.
1577 2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
1579 Backport from mainline
1580 2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
1582 PR tree-optimization/89008
1583 * gimple-ssa-strength-reduction.c (slsr_process_mul): Don't
1584 process anything of the form X * 0.
1586 2019-01-31 Richard Biener <rguenther@suse.de>
1588 Backport from mainline
1589 2019-01-31 Richard Biener <rguenther@suse.de>
1591 PR rtl-optimization/89115
1592 * lra.c (lra_rtx_hash): Properly hash CONST_INT values.
1594 2019-01-30 Richard Biener <rguenther@suse.de>
1596 PR rtl-optimization/89115
1597 * opts.c (default_options_optimization): Reduce
1598 PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1.
1599 Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative
1602 2019-01-30 Kewen Lin <linkw@gcc.gnu.org>
1604 Backport from mainline.
1605 2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
1607 * doc/extend.texi: Add four new prototypes for vec_ld and seven new
1608 prototypes for vec_st.
1609 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add entries
1610 for scalar address type variants of altivec_vec_ld/altivec_vec_st,
1611 mainly on signed/unsigned long long and double.
1613 2019-01-29 Vineet Gupta <vgupta@synopsys.com>
1615 Backport from mainline.
1616 * gcc/config.gcc: Force .init_array for ARC.
1618 2019-01-29 Vineet Gupta <vgupta@synopsys.com>
1620 Backport from mainline.
1621 * config/arc/atomic.md: Add operand to DMB instruction.
1623 2019-01-27 Uroš Bizjak <ubizjak@gmail.com>
1626 * rtl.h (prepare_copy_insn): New prototype.
1627 * gcse.c (prepare_copy_insn): New function, split out from
1628 process_insert_insn.
1629 (process_insert_insn): Use prepare_copy_insn.
1630 * store-motion.c (replace_store_insn): Use prepare_copy_insn
1631 instead of gen_move_insn.
1633 2019-01-25 Richard Biener <rguenther@suse.de>
1635 PR tree-optimization/86865
1636 * graphite-scop-detection.c (scop_detection::can_represent_loop):
1637 Reject non-do-while loops.
1639 2019-01-24 Uroš Bizjak <ubizjak@gmail.com>
1642 * config/i386/sse.md (sse2_cvtpi2pd): Add SSE alternatives.
1643 Disparage MMX alternative.
1644 (sse2_cvtpd2pi): Ditto.
1645 (sse2_cvttpd2pi): Ditto.
1647 2019-01-24 Richard Earnshaw <rearnsha@arm.com>
1650 * profile-count.h (profile_count): On ARM systems using GCC 6/7/8
1651 force the alignment of m_val.
1653 2019-01-24 Richard Biener <rguenther@suse.de>
1655 Backport from mainline
1656 2019-01-23 Richard Biener <rguenther@suse.de>
1658 PR tree-optimization/89008
1659 * tree-ssa-reassoc.c (eliminate_using_constants): For * 0 do
1660 not leave another stray operand.
1662 2019-01-22 Uroš Bizjak <ubizjak@gmail.com>
1665 * config/i386/i386.c (ix86_expand_builtin) [case IX86_BUILTIN_BEXTRI32,
1666 case IX86_BUILTIN_BEXTRI64]: Sanitize operands.
1668 2019-01-18 Richard Earnshaw <rearnsha@arm.com>
1671 * config/arm/arm-cpus.in (mp): New feature.
1673 (fgroup ARMv7ve): Add mp and sec features.
1674 (arch armv7-a): Add options to allow mp and sec extensions.
1675 (cpu generic-armv7-a): Add options to allow mp and sec extensions.
1676 (cpu cortex-a5, cpu cortex-7, cpu cortex-a9): Add mp and sec
1677 extenstions to the base architecture.
1678 (cpu cortex-a8): Add sec extension to the base architecture.
1679 (cpu marvell-pj4): Add mp and sec extensions to the base architecture.
1680 * config/arm/t-aprofile (MULTILIB_MATCHES): Map all armv7-a arch
1681 variants down to the base v7-a varaint.
1682 * config/arm/t-multilib (v7_a_arch_variants): New variable.
1683 * doc/invoke.texi (ARM Options): Add +mp and +sec to the list
1684 of permitted extensions for -march=armv7-a and for
1685 -mcpu=generic-armv7-a.
1687 2019-01-17 Uroš Bizjak <ubizjak@gmail.com>
1689 * config/alpha/alpha.c (alpha_gimplify_va_arg):
1690 Handle split indirect COMPLEX_TYPE arguments.
1692 2019-01-17 Eric Botcazou <ebotcazou@adacore.com>
1694 * gimple-ssa-isolate-paths.c (stmt_uses_name_in_undefined_way): Replace
1695 flag_non_call_exceptions with cfun->can_throw_non_call_exceptions.
1696 (stmt_uses_0_or_null_in_undefined_way): Likewise.
1697 * tree-ssa-alias.c (same_addr_size_stores_p): Likewise.
1699 2019-01-16 Aaron Sawdey <acsawdey@linux.ibm.com>
1701 Backported from mainline
1702 2019-01-03 Aaron Sawdey <acsawdey@linux.ibm.com>
1703 * config/rs6000/rs6000-string.c (expand_block_move): Don't use
1704 unaligned vsx and avoid lxvd2x/stxvd2x.
1705 (gen_lvx_v4si_move): New function.
1707 2019-01-16 Martin Jambor <mjambor@suse.cz>
1709 Backported from mainline
1710 2018-12-10 Martin Jambor <mjambor@suse.cz>
1713 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1714 we check pointers against pointers.
1716 2019-01-10 Jan Hubicka <hubicka@ucw.cz>
1718 Backported from mainline
1719 2018-12-27 Jan Hubicka <hubicka@ucw.cz>
1721 * ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
1722 (polymorphic_call_target_hasher::hash): Hash it.
1723 (polymorphic_call_target_hasher::equal): Compare it.
1724 (possible_polymorphic_call_targets): Set it.
1725 * tree.c (free_lang_data): Rebuild type inheritance graph even on
1728 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1730 Backported from mainline
1731 2019-01-02 Richard Biener <rguenther@suse.de>
1734 * ipa-icf.h (sem_item_optimizer::sort_congruence_split): Declare.
1735 * ipa-icf.c (sem_item_optimizer::sort_congruence_split): New
1737 (sem_item_optimizer::do_congruence_step_f): Sort the congruence
1738 set after UIDs before splitting them.
1740 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1742 Backported from mainline
1743 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1745 PR tree-optimization/85574
1746 * tree-ssa-uncprop.c (struct equiv_hash_elt): Remove unused
1748 (struct ssa_equip_hash_traits): Declare.
1749 (val_ssa_equiv): Use custom hash traits using operand_equal_p.
1751 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1753 * config/sparc/sparc.md (*tablejump_sp32): Merge into...
1754 (*tablejump_sp64): Likewise.
1755 (*tablejump<P:mode>): ...this.
1756 (*call_address_sp32): Merge into...
1757 (*call_address_sp64): Likewise.
1758 (*call_address<P:mode>): ...this.
1759 (*call_symbolic_sp32): Merge into...
1760 (*call_symbolic_sp64): Likewise.
1761 (*call_symbolic<P:mode>): ...this.
1762 (call_value): Remove constraint and add predicate.
1763 (*call_value_address_sp32): Merge into...
1764 (*call_value_address_sp64): Likewise.
1765 (*call_value_address<P:mode>): ...this.
1766 (*call_value_symbolic_sp32): Merge into...
1767 (*call_value_symbolic_sp64): Likewise.
1768 (*call_value_symbolic<P:mode>): ...this.
1769 (*sibcall_symbolic_sp32): Merge into...
1770 (*sibcall_symbolic_sp64): Likewise.
1771 (*sibcall_symbolic<P:mode>): ...this.
1772 (sibcall_value): Remove constraint and add predicate.
1773 (*sibcall_value_symbolic_sp32): Merge into...
1774 (*sibcall_value_symbolic_sp64): Likewise.
1775 (*sibcall_value_symbolic<P:mode>): ...this.
1776 (window_save): Minor tweak.
1777 (*branch_sp32): Merge into...
1778 (*branch_sp64): Likewise.
1779 (*branch<P:mode>): ...this.
1781 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1782 James Clarke <jrtc27@jrtc27.com>
1785 * config/sparc/sparc.c (sparc_legitimize_tls_address): Only use Pmode
1786 consistently in TLS address generation and adjust code to the renaming
1787 of patterns. Mark calls to __tls_get_addr as const.
1788 * config/sparc/sparc.md (tgd_hi22): Turn into...
1789 (tgd_hi22<P:mode>): ...this and use Pmode throughout.
1790 (tgd_lo10): Turn into...
1791 (tgd_lo10<P:mode>): ...this and use Pmode throughout.
1792 (tgd_add32): Merge into...
1793 (tgd_add64): Likewise.
1794 (tgd_add<P:mode>): ...this and use Pmode throughout.
1795 (tldm_hi22): Turn into...
1796 (tldm_hi22<P:mode>): ...this and use Pmode throughout.
1797 (tldm_lo10): Turn into...
1798 (tldm_lo10<P:mode>): ...this and use Pmode throughout.
1799 (tldm_add32): Merge into...
1800 (tldm_add64): Likewise.
1801 (tldm_add<P:mode>): ...this and use Pmode throughout.
1802 (tldm_call32): Merge into...
1803 (tldm_call64): Likewise.
1804 (tldm_call<P:mode>): ...this and use Pmode throughout.
1805 (tldo_hix22): Turn into...
1806 (tldo_hix22<P:mode>): ...this and use Pmode throughout.
1807 (tldo_lox10): Turn into...
1808 (tldo_lox10<P:mode>): ...this and use Pmode throughout.
1809 (tldo_add32): Merge into...
1810 (tldo_add64): Likewise.
1811 (tldo_add<P:mode>): ...this and use Pmode throughout.
1812 (tie_hi22): Turn into...
1813 (tie_hi22<P:mode>): ...this and use Pmode throughout.
1814 (tie_lo10): Turn into...
1815 (tie_lo10<P:mode>): ...this and use Pmode throughout.
1816 (tie_ld64): Use DImode throughout.
1817 (tie_add32): Merge into...
1818 (tie_add64): Likewise.
1819 (tie_add<P:mode>): ...this and use Pmode throughout.
1820 (tle_hix22_sp32): Merge into...
1821 (tle_hix22_sp64): Likewise.
1822 (tle_hix22<P:mode>): ...this and use Pmode throughout.
1823 (tle_lox22_sp32): Merge into...
1824 (tle_lox22_sp64): Likewise.
1825 (tle_lox22<P:mode>): ...this and use Pmode throughout.
1826 (*tldo_ldub_sp32): Merge into...
1827 (*tldo_ldub_sp64): Likewise.
1828 (*tldo_ldub<P:mode>): ...this and use Pmode throughout.
1829 (*tldo_ldub1_sp32): Merge into...
1830 (*tldo_ldub1_sp64): Likewise.
1831 (*tldo_ldub1<P:mode>): ...this and use Pmode throughout.
1832 (*tldo_ldub2_sp32): Merge into...
1833 (*tldo_ldub2_sp64): Likewise.
1834 (*tldo_ldub2<P:mode>): ...this and use Pmode throughout.
1835 (*tldo_ldsb1_sp32): Merge into...
1836 (*tldo_ldsb1_sp64): Likewise.
1837 (*tldo_ldsb1<P:mode>): ...this and use Pmode throughout.
1838 (*tldo_ldsb2_sp32): Merge into...
1839 (*tldo_ldsb2_sp64): Likewise.
1840 (*tldo_ldsb2<P:mode>): ...this and use Pmode throughout.
1841 (*tldo_ldub3_sp64): Use DImode throughout.
1842 (*tldo_ldsb3_sp64): Likewise.
1843 (*tldo_lduh_sp32): Merge into...
1844 (*tldo_lduh_sp64): Likewise.
1845 (*tldo_lduh<P:mode>): ...this and use Pmode throughout.
1846 (*tldo_lduh1_sp32): Merge into...
1847 (*tldo_lduh1_sp64): Likewise.
1848 (*tldo_lduh1<P:mode>): ...this and use Pmode throughout.
1849 (*tldo_ldsh1_sp32): Merge into...
1850 (*tldo_ldsh1_sp64): Likewise.
1851 (*tldo_ldsh1<P:mode>): ...this and use Pmode throughout.
1852 (*tldo_lduh2_sp64): Use DImode throughout.
1853 (*tldo_ldsh2_sp64): Likewise.
1854 (*tldo_lduw_sp32): Merge into...
1855 (*tldo_lduw_sp64): Likewise.
1856 (*tldo_lduw<P:mode>): ...this and use Pmode throughout.
1857 (*tldo_lduw1_sp64): Use DImode throughout.
1858 (*tldo_ldsw1_sp64): Likewise.
1859 (*tldo_ldx_sp64): Likewise.
1860 (*tldo_stb_sp32): Merge into...
1861 (*tldo_stb_sp64): Likewise.
1862 (*tldo_stb<P:mode>): ...this and use Pmode throughout.
1863 (*tldo_sth_sp32): Merge into...
1864 (*tldo_sth_sp64): Likewise.
1865 (*tldo_sth<P:mode>): ...this and use Pmode throughout.
1866 (*tldo_stw_sp32): Merge into...
1867 (*tldo_stw_sp64): Likewise.
1868 (*tldo_stw<P:mode>): ...this and use Pmode throughout.
1869 (*tldo_stx_sp64): Use DImode throughout.
1871 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1873 * doc/invoke.texi (-Os): Add reference to -finline-functions.
1874 (-finline-functions): Remove reference to -O2, add references
1875 to -fprofile-use and -fauto-profile.
1877 2019-01-08 Jakub Jelinek <jakub@redhat.com>
1879 Backported from mainline
1880 2019-01-05 Jakub Jelinek <jakub@redhat.com>
1884 * expr.c (expand_assignment): For calls returning VLA structures
1885 if to_rtx is not a MEM, force it into a stack temporary.
1887 2019-01-04 Jakub Jelinek <jakub@redhat.com>
1890 * config/i386/i386.c (ix86_expand_divmod_libfunc): Use mode instead
1891 of GET_MODE (opN) as modes of the libcall arguments.
1893 2019-01-03 Jakub Jelinek <jakub@redhat.com>
1896 * dwarf2out.c (modified_type_die): If type is equal to sizetype,
1897 change it to qualified_type.
1899 2018-12-21 Jakub Jelinek <jakub@redhat.com>
1903 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
1905 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
1908 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
1909 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
1910 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
1912 (gatherq_mode): Remove mode iterator.
1913 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
1915 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
1916 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
1917 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
1919 PR rtl-optimization/88563
1920 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
1921 and mode arguments to convert_modes. Likewise swap mode and word_mode
1922 arguments. Handle both arguments with VOIDmode before convert_modes
1923 of one of them. Formatting fixes.
1925 2018-12-19 Jakub Jelinek <jakub@redhat.com>
1928 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
1929 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
1931 2018-12-14 Jakub Jelinek <jakub@redhat.com>
1935 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
1936 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
1937 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
1938 Fix up COMPLEX_CST handling.
1939 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
1940 it and pass it through to categorize_ctor_elements_1.
1941 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
1942 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
1943 ctor into readonly data section if num_unique_nonzero_elements is
1944 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
1947 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1949 PR rtl-optimization/88470
1950 * cfgcleanup.c (outgoing_edges_match): If the function is
1951 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
1952 edge to EXIT, return false.
1954 PR rtl-optimization/88416
1955 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
1956 even if !AUTO_INC_DEC.
1958 2018-12-07 Jakub Jelinek <jakub@redhat.com>
1961 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
1962 for functions with naked attribute.
1964 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1967 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
1968 call output_operand_lossage on VOIDmode CONST_INTs. After
1969 output_operand_lossage do return false.
1971 2018-12-05 Jakub Jelinek <jakub@redhat.com>
1973 PR tree-optimization/87360
1974 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
1975 data dependencies, don't return false, just continue.
1977 2018-11-29 Jakub Jelinek <jakub@redhat.com>
1980 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
1981 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
1982 in unsigned_type_for instead of vector integral type where overflow
1985 2018-11-26 Jakub Jelinek <jakub@redhat.com>
1988 * dwarf2out.c (secname_for_decl): For functions with
1989 DECL_SECTION_NAME if in_cold_section_p, try to return
1990 current_function_section's name if it is a named section.
1992 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1996 * config/i386/i386.c (ix86_option_override_internal): Default
1997 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1999 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
2000 stack_protect_test, stack_protect_test_<mode>): Use empty condition
2001 instead of TARGET_SSP_TLS_GUARD.
2003 2018-11-20 Jakub Jelinek <jakub@redhat.com>
2005 PR tree-optimization/87895
2006 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
2007 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
2008 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
2009 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
2010 has any preds and always use EDGE_PRED (, 0).
2012 2018-11-19 Jakub Jelinek <jakub@redhat.com>
2014 PR tree-optimization/88071
2015 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2016 of false as last argument to gsi_remove.
2017 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2018 false as last argument to gsi_replace.
2021 * omp-expand.c: Don't include debug.h.
2022 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
2023 from innermost outer parallel, task, or target that has a
2024 child_fn set, or, if there is no such outer region, use
2025 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
2026 whether a suitable BLOCK is found or not.
2027 (expand_parallel_call): Don't call adjust_context_and_scope here.
2028 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2029 (expand_omp_taskreg, expand_omp_target): Likewise. Call
2030 adjust_context_and_scope.
2031 * dwarf2out.c (dwarf2out_early_global_decl): For
2032 decl_function_context recurse instead of calling dwarf2out_decl.
2034 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2036 PR rtl-optimization/87475
2037 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2038 CROSSING_JUMP_P insns.
2039 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2041 2018-11-15 Jakub Jelinek <jakub@redhat.com>
2043 PR rtl-optimization/88018
2044 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2045 on the presence of fallthru edge, rather than if it is a USE or not.
2047 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2049 PR tree-optimization/87898
2050 * omp-simd-clone.c (ipa_simd_modify_function_body): Remove debug stmts
2051 where the first argument was changed into a non-decl.
2053 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2055 Backport from mainline
2056 2019-01-02 Jan Hubicka <hubicka@ucw.cz>
2059 * varpool.c (varpool_node::ctor_useable_for_folding_p): Also return
2060 false at WPA time when body was removed.
2062 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2064 Backport from mainline
2065 2018-08-29 Jan Hubicka <jh@suse.cz>
2069 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
2070 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
2072 2019-01-04 Aaron Sawdey <acsawdey@linux.ibm.com>
2074 Backport from mainline
2075 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2077 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
2078 we determine if unaligned vsx is ok.
2080 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2082 Backport from mainline
2083 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2085 * ipa-utils.c (scale_ipa_profile_for_fn): Break out from ...
2086 (ipa_merge_profiles): ... here; do not ICE on thunks and aliases.
2088 2019-01-03 Martin Liska <mliska@suse.cz>
2090 Backport from mainline
2091 2019-01-01 Jan Hubicka <hubicka@ucw.cz>
2093 * coverage.c (get_coverage_counts): Use current_function_decl.
2094 * profile.c (read_thunk_profile): New function.
2095 (branch_prob): Add THUNK parameter.
2096 * tree-profile.c (tree_profiling): Handle thunks.
2097 * value-prof.c (init_node_map): Handle thunks.
2098 * value-prof.h (branch_prob): Upate prototype.
2099 (read_thunk_profile): Declare.
2101 2019-01-03 Iain Sandoe <iain@sandoe.co.uk>
2104 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2106 backport from mainline.
2107 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
2108 Iain Sandoe <iain@sandoe.co.uk>
2111 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
2112 unless it has been used.
2113 (first_reg_to_save): Remove dead code.
2115 2019-01-02 Segher Boessenkool <segher@kernel.crashing.org>
2118 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2121 * doc/extend.texi (Basic Asm): Update grammar.
2122 (Extended Asm): Update grammar.
2125 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2127 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
2128 (Size of an asm): Fix typo. Document asm inline.
2129 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
2130 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
2131 (gimple_asm_set_volatile): Fix typo.
2132 (gimple_asm_inline_p): New.
2133 (gimple_asm_set_inline): New.
2134 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
2136 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
2137 gimple_asm_inline_p flag, too.
2138 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
2140 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
2141 a minimum size for an asm.
2142 * tree.h (ASM_INLINE_P): New.
2144 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
2145 Julian Brown <julian@codesourcery.com>
2147 * gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.
2149 2018-12-27 Martin Liska <mliska@suse.cz>
2151 Backport from mainline
2152 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
2155 * ipa-polymorphic-call.c
2156 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
2157 arguments of thunks correctly.
2158 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
2159 NULL instance pinter.
2160 * lto-cgraph.c (lto_output_node): Always stream thunk info.
2162 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2164 backport from mainline.
2165 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
2166 Iain Sandoe <iain@sandoe.co.uk>
2169 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
2170 unless it has been used.
2171 (first_reg_to_save): Remove dead code.
2173 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2175 Backport from mainline
2176 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
2179 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
2181 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
2183 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2185 Backport from mainline
2186 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
2189 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
2190 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
2191 stack alignment in non-leaf functions.
2193 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
2195 Backport from mainline
2196 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
2199 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
2200 check operand 1 with vector_operand predicate.
2201 (ix86_expand_sse_movcc): For vector modes, check op_true with
2202 vector_operand, not nonimmediate_operand.
2204 2018-12-19 Bill Schmidt <wschmidt@linux.ibm.com>
2206 Backport from mainline
2207 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
2209 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
2210 Describe when a typedef name can be used as the type specifier for
2211 a vector type, and when it cannot.
2213 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2216 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2219 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
2220 Require TARGET_POWERPC64.
2222 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2225 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2227 PR rtl-optimization/88253
2228 * combine.c (combine_simplify_rtx): Test for side-effects before
2229 substituting by zero.
2231 2018-12-15 Segher Boessenkool <segher@kernel.crashing.org>
2234 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
2236 PR rtl-optimization/88001
2237 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
2239 2018-12-15 Jan Hubicka <jh@suse.cz>
2241 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
2243 (cgraph_build_static_cdtor): Update.
2244 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
2247 2018-12-15 Jan Hubicka <jh@suse.cz>
2249 Backport from mainline
2250 2018-11-02 Richard Biener <rguenther@suse.de>
2252 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2255 2018-12-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2257 Backport from mainline
2258 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2260 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
2263 2018-12-14 Andre Vieira <andre.simoesdiasvieira@arm.com>
2265 Backport from mainline
2267 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2268 (cortex-r7, cortex-r8): Update fpu and add new configuration.
2269 * doc/invoke.texi (armv7-r): Add two new vfp options.
2270 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2271 support this option.
2273 2018-12-13 H.J. Lu <hongjiu.lu@intel.com>
2275 Backport from mainline
2276 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2279 * config/i386/emmintrin.h (__v16qs): New to cope with option
2281 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2282 (_mm_cmplt_epi8): Likewise.
2283 (_mm_cmpgt_epi8): Likewise.
2285 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2287 Backport from mainline
2288 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2290 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
2291 s390_vec_double_s64 instead of s390_vcdgb.
2292 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
2295 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2297 Backport from mainline
2298 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2300 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
2301 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
2302 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
2304 2018-12-13 Eric Botcazou <ebotcazou@adacore.com>
2306 Backport from mainline
2307 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
2309 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
2310 accounting for STACK_BOUNDARY 128.
2311 (STACK_DYNAMIC_OFFSET): Likewise.
2313 2018-12-12 Peter Bergner <bergner@linux.ibm.com>
2315 Backport from mainline
2316 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
2319 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2320 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
2321 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
2322 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
2323 require -mlong-double-128.
2325 2018-12-05 Richard Biener <rguenther@suse.de>
2327 Backport from mainline
2328 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2330 PR tree-optimization/87288
2331 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2332 into account when determining PEELING_FOR_NITERS.
2334 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
2336 Backport from mainline
2337 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2339 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2340 emit a diagnostic that it is not supported and reset the option.
2341 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2342 supported and consume the option. (ASM_FINAL_SPEC): New.
2344 2018-12-04 Iain Sandoe <iain@sandoe.co.uk>
2346 Backport from mainline
2347 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2350 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2351 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2352 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2354 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2356 Backport from mainline
2357 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2360 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2361 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2363 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2365 Backport from mainline
2366 2018-10-25 Aaron Sawdey <acsawdey@linux.ibm.com>
2368 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2369 a shorter sequence with fewer branches.
2370 (emit_final_str_compare_gpr): Ditto.
2372 Backport from mainline to allow the above code to go in:
2373 2018-06-14 Aaron Sawdey <acsawdey@linux.ibm.com>
2375 * config/rs6000/rs6000-string.c (do_and3, do_and3_mask,
2376 do_cmpb3, do_rotl3): New functions.
2378 2018-11-28 Richard Biener <rguenther@suse.de>
2380 PR tree-optimization/79351
2381 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2382 empty CONSTRUCTORs ensure the store is at a constant position.
2384 2018-11-28 Richard Biener <rguenther@suse.de>
2386 PR tree-optimization/88229
2387 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2388 is an INTEGER_CST before accessing it so.
2390 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2392 Backport from mainline
2393 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
2395 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
2396 DImode parts of the target operand.
2398 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2400 Backport from mainline
2401 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2403 * doc/invoke.texi: Document z14/arch12 -march option.
2405 2018-11-23 Tamar Christina <tamar.christina@arm.com>
2407 Backported from mainline.
2408 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2411 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2412 (mov<mov>): ..this and enable unconditionally.
2414 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2416 Backport from mainline
2417 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
2420 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2421 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2423 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
2425 PR rtl-optimization/85925
2426 * rtl.h (word_register_operation_p): New predicate.
2427 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2428 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2429 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
2430 (num_sign_bit_copies1): Likewise.
2432 2018-11-19 Martin Liska <mliska@suse.cz>
2434 PR gcov-profile/88045
2435 * coverage.c (coverage_begin_function): One can't relly on the
2436 fact that function ends on the same line it starts or later.
2438 2018-11-18 Uros Bizjak <ubizjak@gmail.com>
2440 Backport from mainline
2441 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2444 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2445 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2446 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2447 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2449 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
2451 * tree-switch-conversion.c (emit_case_decision_tree): Pass location
2452 of switch statement to emit_case_nodes.
2453 (do_jump_if_equal): Add LOC parameter and set it on the newly built
2454 GIMPLE comparison statement.
2455 (emit_cmp_and_jump_insns): Likewise.
2456 (emit_case_nodes): Add LOC parameter and pass it to do_jump_if_equal
2457 as well as recursive calls.
2459 2018-11-15 Nathan Sidwell <nathan@acm.org>
2463 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2466 2018-11-14 Paul A. Clarke <pc@us.ibm.com>
2468 Backport from mainline
2469 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2471 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2473 Backport from mainline
2475 * config/arc/arc.c (arc_return_address_register): Fix
2478 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2480 Backport from mainline
2481 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2482 * config/arc/elf.h (PROFILE_HOOK): Define.
2483 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2485 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2487 Backport from mainline
2488 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2489 jump table data in the text section.
2491 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2493 Backport from mainline
2494 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2495 to fit the eh_return pattern.
2496 * config/arc/arc.md (eh_return): Define.
2497 (VUNSPEC_ARC_EH_RETURN): Likewise.
2498 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2500 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2502 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2504 Backport from mainline
2505 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2507 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2509 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2511 Backport from mainline
2512 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2514 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2516 Backport from mainline
2517 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2520 * cfgexpand.c (pass_expand::execute): Move the call to
2521 finish_eh_generation in front of the call to expand_stack_alignment.
2523 2018-11-07 Max Filippov <jcmvbkbc@gmail.com>
2525 Backport from mainline
2526 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2528 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2530 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2532 PR tree-optimization/87859
2533 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2534 first_nonmergeable_order member.
2535 (merged_store_group::merged_store_group): Initialize them.
2536 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2537 stores with order >= first_nonmergeable_order.
2538 Set merged_store->first_nonmergeable_order if we've skipped any
2539 stores. Attempt to merge overlapping INTEGER_CST stores that
2540 we would otherwise skip.
2543 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2545 Backported from mainline
2546 2018-10-20 Jakub Jelinek <jakub@redhat.com>
2549 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2551 2018-10-19 Jakub Jelinek <jakub@redhat.com>
2555 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
2556 depend closely nested inside of loop with ordered clause with
2559 2018-10-29 Richard Biener <rguenther@suse.de>
2561 Backport from mainline
2562 2018-09-26 Richard Biener <rguenther@suse.de>
2566 * tree-inline.c (expand_call_inline): When the location
2567 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2568 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2569 the inserted BLOCK to make inlined_function_outer_scope_p
2571 * dwarf2out.c (add_call_src_coords_attributes): Do not add
2572 coords for reserved locations.
2574 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2576 Backport from mainline
2577 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2582 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2583 (dwarf2out_switch_text_section): Generate a local label for the second
2584 function sub-section and apply it as the second FDE start label.
2585 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2586 second sub-section start.
2588 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2590 Backport from mainline
2591 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2594 (darwin_function_switched_text_sections): Delete.
2595 * gcc/config/darwin.h
2596 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2598 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2600 backport from mainline.
2601 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2604 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2605 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2606 (STACK_DYNAMIC_OFFSET): Likewise.
2608 2018-10-26 Bill Schmidt <wschmidt@linux.ibm.com>
2610 Backport from mainline
2611 2018-10-19 Bill Schmidt <wschmidt@linux.ibm.com>
2613 PR tree-optimization/87473
2614 * gimple-ssa-strength-reduction.c (record_phi_increments_1): For
2615 phi arguments identical to the base expression of the phi
2616 candidate, record a phi-adjust increment of zero minus the index
2617 expression of the hidden basis.
2618 (phi_incr_cost_1): For phi arguments identical to the base
2619 expression of the phi candidate, the difference to compare against
2620 the increment is zero minus the index expression of the hidden
2621 basis, and there is no potential savings from replacing the (phi)
2623 (ncd_with_phi): For phi arguments identical to the base expression
2624 of the phi candidate, the difference to compare against the
2625 increment is zero minus the index expression of the hidden basis.
2626 (all_phi_incrs_profitable_1): For phi arguments identical to the
2627 base expression of the phi candidate, the increment to be checked
2628 for profitability is zero minus the index expression of the hidden
2631 2018-10-25 Richard Biener <rguenther@suse.de>
2633 PR tree-optimization/87665
2634 PR tree-optimization/87745
2635 * tree-vectorizer.h (get_earlier_stmt): Remove.
2636 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2638 2018-10-24 Richard Biener <rguenther@suse.de>
2640 PR tree-optimization/87665
2641 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2644 2018-10-23 Richard Biener <rguenther@suse.de>
2646 PR tree-optimization/87700
2647 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2649 2018-10-19 Richard Biener <rguenther@suse.de>
2652 Backport from mainline
2653 2018-07-12 Richard Biener <rguenther@suse.de>
2655 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2656 (vn_lookup_simplify_result): Remove recursion limit applied
2658 (vn_nary_build_or_lookup_1): Adjust.
2659 (try_to_simplify): Likewise.
2660 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2662 (gimple_resimplify2): Likewise.
2663 (gimple_resimplify3): Likewise.
2664 (gimple_resimplify4): Likewise.
2666 2018-10-19 Andreas Krebbel <krebbel@linux.ibm.com>
2668 Backport from mainline
2669 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2671 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2672 into reg if it isn't a general operand.
2674 2018-10-18 Richard Biener <rguenther@suse.de>
2678 2018-02-07 Richard Biener <rguenther@suse.de>
2680 PR tree-optimization/84204
2681 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2684 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2687 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2688 bail out if both sides do not have the same storage order.
2690 2018-10-17 Richard Biener <rguenther@suse.de>
2692 Backport from mainline
2693 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2696 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2697 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2699 2018-10-16 Richard Biener <rguenther@suse.de>
2701 Backport from mainline
2702 2018-10-08 Richard Biener <rguenther@suse.de>
2704 PR tree-optimization/63155
2705 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2706 (ssa_propagation_engine::ssa_propagate): Remove redundant
2707 bitmap bit clearing.
2709 2018-10-05 Richard Biener <rguenther@suse.de>
2711 PR tree-optimization/63155
2712 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2713 vertical space in dumpfiles.
2714 * tree-ssa-propagate.h
2715 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2716 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2717 (ssa_edge_worklist_back): Likewise.
2718 (curr_order): Likewise.
2719 (cfg_blocks_get): Remove abstraction.
2720 (cfg_blocks_add): Likewise.
2721 (cfg_blocks_empty_p): Likewise.
2722 (add_ssa_edge): Add to current or next worklist based on
2724 (add_control_edge): Likewise.
2725 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2727 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2728 iteration from CFG and SSA edge worklist so we process
2729 everything in RPO order, prioritizing forward progress
2731 (ssa_prop_init): Allocate new worklists, do not dump
2733 (ssa_prop_fini): Free new worklists.
2735 2018-09-24 Richard Biener <rguenther@suse.de>
2737 PR tree-optimization/63155
2738 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2739 the worklist when the edge of the respective argument isn't
2742 2018-10-16 Wilco Dijkstra <wdijkstr@arm.com>
2744 Backported from mainline
2746 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2747 Use HOST_WIDE_INT_1U for shift.
2749 2018-10-16 Richard Biener <rguenther@suse.de>
2751 Backport from mainline
2752 2018-09-18 Richard Biener <rguenther@suse.de>
2755 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2756 (compute_samebase_partition_bases): Likewise.
2757 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2758 (gimple_can_coalesce_p): Simplify.
2760 2018-10-16 Richard Biener <rguenther@suse.de>
2762 Backport from mainline
2763 2018-10-15 Richard Biener <rguenther@suse.de>
2766 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2767 (visit_loadstore): When a used restrict tag escaped verify that
2768 the points-to solution of "other" pointers do not include
2770 (compute_dependence_clique): If a used restrict tag escaped
2771 communicated that down to visit_loadstore.
2773 2018-10-01 Richard Biener <rguenther@suse.de>
2775 PR tree-optimization/87465
2776 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2777 causing branch miscounts.
2779 2018-10-11 Jakub Jelinek <jakub@redhat.com>
2781 Backported from mainline
2782 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2785 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2786 to special_args set.
2788 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2791 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2792 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2795 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2796 Andreas Krebbel <krebbel@linux.ibm.com>
2798 PR tree-optimization/86844
2799 * gimple-ssa-store-merging.c
2800 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2801 there are any overlapping stores in between them, make sure they are
2802 also coalesced or we give up completely.
2804 2018-10-09 Will Schmidt <will_schmidt@vnet.ibm.com>
2806 Backport from trunk.
2807 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2810 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2811 around folding of vec_sl to handle out of range shift values.
2813 2018-10-09 H.J. Lu <hongjiu.lu@intel.com>
2815 Backport from mainline
2816 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2819 * config/i386/i386.c (construct_container): Use TImode for
2820 BLKmode values in 2 integer registers.
2822 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2824 Backport from mainline
2825 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2828 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2829 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2831 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2833 Backport from mainline
2834 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2837 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2838 assembler for -mavx.
2839 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2841 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2843 Backport from mainline
2844 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2846 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2847 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2849 2018-10-03 Jonathan Wakely <jwakely@redhat.com>
2852 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2854 2018-10-03 Martin Liska <mliska@suse.cz>
2856 Backport from mainline
2857 2018-10-03 Martin Liska <mliska@suse.cz>
2859 PR gcov-profile/86109
2860 * coverage.c (coverage_begin_function): Do not
2861 mark lambdas as artificial.
2862 * tree-core.h (struct GTY): Remove tm_clone_flag
2863 and introduce new lambda_function.
2864 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2866 2018-10-02 H.J. Lu <hongjiu.lu@intel.com>
2868 Backport from mainline
2869 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
2872 * config/i386/i386.c (rest_of_insert_endbranch): Set
2873 endbr_queued_at_entrance to true and don't insert ENDBR if
2874 x86_function_profiler will be called.
2875 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2877 * config/i386/i386.h (machine_function): Add
2878 endbr_queued_at_entrance.
2880 2018-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2882 Backport from mainline
2883 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2885 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2886 if starting source register is not even.
2888 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2891 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2892 __m512d type for __A argument rather than __m512.
2894 2018-09-27 Michael Meissner <meissner@linux.ibm.com>
2896 Backport from mainline
2897 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2900 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2901 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2904 2018-09-25 Martin Liska <mliska@suse.cz>
2906 Backport from mainline
2907 2018-09-24 Martin Liska <mliska@suse.cz>
2910 * asan.c: Make asan_handled_variables extern.
2912 * cfgexpand.c (expand_stack_vars): Make sure
2913 a representative is unpoison if another
2914 variable in the partition is handled by
2915 use-after-scope sanitization.
2917 2018-09-24 Andrew Pinski <apinski@marvell.com>
2919 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2920 access prev before checking it for NULLness in the
2921 AARCH64_FUSE_CMP_BRANCH case.
2923 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2925 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2926 if the call takes a static chain.
2928 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2930 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2931 (atomic_storehi): Likewise.
2932 (atomic_storesi): Likewise.
2933 (atomic_loaddi): Restore compare and swap exchange loop code.
2935 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2938 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2940 PR rtl-optimization/86882
2941 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2943 2018-09-18 Martin Liska <mliska@suse.cz>
2945 Backport from mainline
2946 2018-09-17 Martin Liska <mliska@suse.cz>
2948 PR gcov-profile/85871
2949 * gcov.c (output_intermediate_file): Fix out of bounds
2952 2018-09-16 Hans-Peter Nilsson <hp@bitrange.com>
2955 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2956 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2957 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2958 leaf_function_p, instead use has_hard_reg_initial_val.
2960 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2963 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2964 when one operand is a function pointer. Use POINTER_TYPE_P and
2965 FUNC_OR_METHOD_TYPE_P.
2966 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2967 * fold-const.c (build_range_check): Likewise.
2968 * match.pd (simple_comparison): Likewise.
2970 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2973 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2976 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2979 2018-09-14 Carl Love <cel@us.ibm.com>
2982 2018-09-14 Carl Love <cel@us.ibm.com>
2984 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2985 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2987 2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
2990 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2993 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2996 2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
2999 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
3001 PR rtl-optimization/86771
3002 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
3003 of two SETs into those two SETs, one to be placed at i2, if that SETs
3004 destination is modified between i2 and i3.
3006 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
3008 Backport from mainline
3009 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
3011 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3013 ("trunc<BFP:mode><DFP_ALL:mode>2")
3014 ("trunc<DFP_ALL:mode><BFP:mode>2")
3015 ("extend<BFP:mode><DFP_ALL:mode>2")
3016 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3017 according to the target operand type.
3019 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3022 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3023 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
3025 2018-09-05 Nathan Sidwell <nathan@acm.org>
3028 * stor-layout.c (place_field): Scan forwards to check last
3029 bitfield when ms_bitfield_placement is in effect.
3031 2018-09-05 Richard Biener <rguenther@suse.de>
3034 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3037 2018-09-05 Jakub Jelinek <jakub@redhat.com>
3039 Backported from mainline
3040 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3043 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3044 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3045 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3046 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3047 and OPTION_MASK_ISA_XSAVEC_UNSET.
3049 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3052 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3053 gen_int_mode. Formatting fixes.
3055 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3057 PR tree-optimization/86835
3058 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3059 new_stmt after def_gsi, make sure to insert new_square_stmt after
3060 that stmt, not 2 stmts before it.
3062 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3064 Backport from mainline
3065 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3067 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3068 XOR operations in NAND case.
3070 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3072 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3074 2018-09-03 Tom de Vries <tdevries@suse.de>
3076 backport from trunk:
3077 2018-06-21 Tom de Vries <tdevries@suse.de>
3079 PR tree-optimization/85859
3080 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3081 test with comment from bb_no_side_effects_p.
3083 2018-09-01 Michael Matz <matz@suse.de>
3085 Backport from mainline
3086 PR tree-optimization/87074
3087 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3088 PHIs for outer-loop uses.
3090 2018-08-31 Richard Biener <rguenther@suse.de>
3092 Backport from mainline
3093 2018-08-27 Richard Biener <rguenther@suse.de>
3095 PR tree-optimization/86927
3096 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3097 use const cond reduction code.
3099 2018-08-23 Richard Biener <rguenther@suse.de>
3102 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
3105 2018-08-22 Richard Biener <rguenther@suse.de>
3107 PR tree-optimization/86945
3108 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
3110 2018-08-17 Richard Biener <rguenther@suse.de>
3113 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
3114 across a va-arg-pack using call adjust its return value accordingly.
3116 2018-08-02 Richard Biener <rguenther@suse.de>
3118 PR tree-optimization/86816
3119 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3120 which checks for value availability before querying it.
3121 (gvn_uses_equal): Use it.
3122 (same_succ_hash): Likewise.
3123 (gimple_equal_p): Likewise.
3125 2018-07-17 Richard Biener <rguenther@suse.de>
3128 * dwarf2out.c (init_sections_and_labels): Always generate
3129 a debug_line_str_section for early LTO debug.
3130 (dwarf2out_finish): Reset debug_line_str_hash output early.
3131 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3133 (dwarf2out_early_finish): Output debug_line_str.
3135 2018-08-29 Luis Machado <luis.machado@linaro.org>
3137 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static global.
3138 (qdf24xx_tunings): Set vector cost structure to qdf24xx_vector_cost.
3140 2018-08-29 Luis Machado <luis.machado@linaro.org>
3142 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3143 <register_sextend>: Set to 3.
3145 2018-08-27 Martin Sebor <msebor@redhat.com>
3147 PR tree-optimization/86914
3148 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3150 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3153 * calls.c (maybe_warn_nonstring_arg): Punt early if
3154 warn_stringop_overflow is zero. Don't call get_range_strlen
3155 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3156 Only use lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3157 increment lenrng[0].
3159 2018-08-27 Jakub Jelinek <jakub@redhat.com>
3161 PR rtl-optimization/87065
3162 * combine.c (simplify_if_then_else): Formatting fix.
3163 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3165 (known_cond): Don't return const_true_rtx for vector modes. Use
3166 CONST0_RTX instead of const0_rtx. Formatting fixes.
3168 2018-08-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3170 Backport from mainline
3172 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3173 with all enabled __intN types.
3175 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3177 2018-08-21 H.J. Lu <hongjiu.lu@intel.com>
3179 Backport from mainline
3180 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
3183 * config/i386/i386.md (eh_return): Always update EH return
3184 address in word_mode.
3186 2018-08-17 John David Anglin <danglin@gcc.gnu.org>
3188 Backport from mainline
3189 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3191 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3192 Update comment for atomic instructions.
3193 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3194 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3196 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3197 load for __ATOMIC_SEQ_CST model.
3198 (atomic_loaddi_1): Remove float register target.
3199 (atomic_storedi): Handle CONST_INT values.
3200 (atomic_storedi_1): Remove float register source. Add special case
3202 (memory_barrier): New expander and insn.
3204 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3206 Backport from mainline
3207 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3210 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3213 2018-08-16 Martin Liska <mliska@suse.cz>
3215 Backport from mainline
3216 2018-08-02 Martin Liska <mliska@suse.cz>
3218 PR gcov-profile/86817
3219 * gcov.c (process_all_functions): New function.
3221 (process_file): Move functions processing to
3222 process_all_functions.
3224 2018-08-14 Siddhesh Poyarekar <siddhesh@sourceware.org>
3226 Backport from mainline
3227 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3229 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3231 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3233 2018-08-13 Liu Hao <lh_mouse@126.com>
3235 Backport from mainline
3236 2018-08-13 Liu Hao <lh_mouse@126.com>
3238 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3239 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3240 and clear it thereafter, as it only works for DBCS.
3242 2018-08-13 Liu Hao <lh_mouse@126.com>
3244 Backport from mainline
3245 2018-08-13 Liu Hao <lh_mouse@126.com>
3247 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3248 handle returned by _get_osf_handle().
3250 2018-08-14 Richard Sandiford <richard.sandiford@arm.com>
3252 Backport from mainline
3253 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3255 PR tree-optimization/86871
3256 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3257 instead of gimple_assign_lhs.
3259 2018-08-07 H.J. Lu <hongjiu.lu@intel.com>
3261 Backport from mainline
3262 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3265 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3266 cfun->machine->max_used_stack_alignment if needed.
3268 2018-08-02 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3270 Backport from mainline
3271 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3274 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3275 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3276 requested variable alignment.
3277 (expand_one_ssa_partition): Likewise.
3278 (expand_one_var): Likewise.
3280 2018-08-02 Andreas Schwab <schwab@linux-m68k.org>
3282 Backport from mainline
3283 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3286 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3287 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3289 2018-08-01 Richard Biener <rguenther@suse.de>
3292 * graphite.h: Include isl/id.h and isl/space.h to allow build
3295 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3298 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3299 mode for COFF targets.
3300 * defaults.h (TARGET_COFF): Define.
3301 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3302 TARGET_COFF): Define.
3303 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3304 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3305 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3307 2018-07-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3309 Backport from mainline
3310 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3313 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3315 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3317 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3318 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3319 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3321 2018-07-26 Uros Bizjak <ubizjak@gmail.com>
3323 Backport from mainline
3324 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
3327 * expmed.c (emit_store_flag): Do not emit setcc followed by a
3328 conditional move when trapping comparison was split to a
3329 non-trapping one (and vice versa).
3331 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3333 Backported from mainline
3334 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3337 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3338 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3339 and abs_d == d, do the power of two handling if profitable.
3341 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3344 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3345 to _looptemp_ clauses, other than the first two.
3348 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3349 and cond temporaries don't have reference type if iterator has
3350 pointer type. For init use &for_pre_body instead of pre_p if
3351 for_pre_body is non-empty.
3353 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3356 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3357 declare target to variables if they have always,{to,from,tofrom} map
3360 * BASE-VER: Set to 8.2.1.
3362 2018-07-26 Release Manager
3364 * GCC 8.2.0 released.
3366 2018-07-18 Martin Sebor <msebor@redhat.com>
3369 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3370 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3371 Handle integer subtraction.
3372 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3373 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3374 * doc/invoke.texi (-Wstringop-truncation): Update.
3376 gcc/testsuite/ChangeLog:
3378 2018-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3380 Backport from mainline
3381 2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
3383 * config/arc/arc-protos.h (arc_pad_return): Remove.
3384 * config/arc/arc.c (machine_function): Remove force_short_suffix
3386 (arc_print_operand): Adjust printing of '&'.
3387 (arc_verify_short): Remove conditional printing of short suffix.
3388 (arc_final_prescan_insn): Remove reference to size_reason.
3389 (pad_return): New function.
3390 (arc_reorg): Call pad_return.
3391 (arc_pad_return): Remove.
3392 (arc_init_machine_status): Remove reference to force_short_suffix.
3393 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3394 (attr length): When attribute iscompact is true force to 2
3395 regardless; in the case of maybe check if we want to force the
3396 instruction to have 4 bytes length.
3397 (nopv): Change it to generate 4 byte long nop as well.
3398 (blockage): New pattern.
3399 (simple_return): Remove call to arc_pad_return.
3400 (p_return_i): Likewise.
3402 2018-07-19 Richard Biener <rguenther@suse.de>
3404 Backport from mainline
3405 2018-07-13 Richard Biener <rguenther@suse.de>
3408 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3409 instead of get_context_die.
3411 2018-07-11 Richard Biener <rguenther@suse.de>
3414 * dwarf2out.c (init_sections_and_labels): Use
3415 output_asm_line_debug_info consistently.
3416 (dwarf2out_early_finish): Likewise.
3417 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3420 2018-07-16 Richard Biener <rguenther@suse.de>
3422 Backport from mainline
3423 2018-07-13 Richard Biener <rguenther@suse.de>
3426 * match.pd (addr1 - addr2): Allow either of the operand to
3429 2018-06-15 Richard Biener <rguenther@suse.de>
3432 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3433 before adjusting their block.
3435 2018-06-06 Richard Biener <rguenther@suse.de>
3437 PR tree-optimization/85935
3438 * graphite-scop-detection.c (find_params_in_bb): Analyze
3439 condition operands with respect to the correct loop. Assert
3440 the analysis doesn't fail.
3442 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
3444 PR tree-optimization/86514
3445 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3446 conversion to a boolean type from a type with greater precision.
3448 2018-07-15 Bill Schmidt <wschmidt@linux.ibm.com>
3450 Backport from mainline
3451 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3452 Steve Munroe <munroesj52@gmail.com>
3454 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3455 (_mm_andnot_si128): Likewise.
3456 (_mm_or_si128): Likewise.
3457 (_mm_xor_si128): Likewise.
3459 2018-07-14 Martin Sebor <msebor@redhat.com>
3461 PR tree-optimization/86274
3462 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3464 (format_floating): Correct handling of infinities and NaNs.
3466 2018-07-13 H.J. Lu <hongjiu.lu@intel.com>
3468 Backport from mainline
3469 2018-07-13 H.J. Lu <hongjiu.lu@intel.com>
3470 Sunil K Pandey <sunil.k.pandey@intel.com>
3473 * config/i386/i386.c (m_CORE_AVX512): New.
3474 (m_CORE_AVX2): Likewise.
3475 (m_CORE_ALL): Add m_CORE_AVX2.
3476 * config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2.
3477 Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal
3478 and remove the rest of m_SKYLAKE_AVX512.
3480 2018-07-13 Marek Polacek <polacek@redhat.com>
3483 2018-07-03 Marek Polacek <polacek@redhat.com>
3486 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3488 2018-07-12 Richard Biener <rguenther@suse.de>
3491 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3492 Remove -mieee-fp handling.
3494 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3496 PR tree-optimization/86492
3497 * gimple-ssa-store-merging.c
3498 (imm_store_chain_info::coalesce_immediate_stores): Call
3499 check_no_overlap even for the merge_overlapping case.
3501 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3503 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3504 Use __mmask64 type instead of __mmask8 for __M argument.
3505 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3506 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3508 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3509 __mmask16 for __M argument.
3510 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3511 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3512 to __mmask16 instead of __mmask8.
3513 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3514 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3515 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3516 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3517 instead of __mmask16 for __U argument.
3518 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3519 __mmask16 instead of __mmask8 for __U argument.
3520 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3522 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3524 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3526 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3528 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3530 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3532 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3534 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3536 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3538 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3540 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3541 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3542 return type as well as __M argument type and all casts from __mmask8
3544 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3545 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3546 return type as well as __M argument type and all casts from __mmask8
3548 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3549 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3550 return type as well as __M argument type and all casts from __mmask8
3552 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3553 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3554 return type as well as __M argument type and all casts from __mmask8
3556 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3557 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3560 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3562 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3563 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3566 2018-07-05 Martin Sebor <msebor@redhat.com>
3569 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3570 than its domain to compute its the upper bound of a char array.
3572 2018-07-03 Carl Love <cel@us.ibm.com>
3575 2018-07-03 Carl Love <cel@us.ibm.com>
3577 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3578 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3579 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3580 VSX_BUILTIN_DOUBLEL_V4SF.
3582 2018-07-04 Luis Machado <luis.machado@linaro.org>
3584 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3586 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3588 2018-07-02 Segher Boessenkool <segher@kernel.crashing.org>
3591 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3594 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3595 ieee128_float_type_node to long_double_type_node unless
3596 TARGET_LONG_DOUBLE_128 is set.
3598 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3600 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3601 -fno-omit-frame-pointer when not optimizing.
3603 2018-06-30 Alexandre Oliva <aoliva@redhat.com>
3606 * dwarf2out.c (loc_list_has_views): Adjust comments.
3607 (dw_loc_list): Split single cross-partition range with
3610 2018-06-29 Kelvin Nilsen <kelvin@gcc.gnu.org>
3612 Backport from mainline
3613 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3615 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3616 behavior of vec_pack (vector double, vector double) to match
3617 behavior of vec_float2 (vector double, vector double).
3619 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3621 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3623 2018-06-28 Kelvin Nilsen <kelvin@gcc.gnu.org>
3625 Backport from mainline
3626 2017-05-23 Segher Boessenkool <segher@kernel.crashing.org>
3628 * doc/sourcebuild.texi (Endianness): New subsubsection.
3630 2018-06-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3632 Backport from mainline
3633 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3635 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3636 behavior of vec_packsu (vector unsigned long long, vector unsigned
3637 long long) to match behavior of vec_packs with same signature.
3639 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3642 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3644 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3645 unaligned vsx for 16B memset.
3647 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3650 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3653 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3656 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3659 2018-05-08 Segher Boessenkool <segher@kernel.crashing.org>
3661 PR rtl-optimization/85645
3662 * regrename.c (build_def_use): Also kill the chains that include the
3663 destination of a REG_CFA_REGISTER note.
3665 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3668 2018-05-08 Segher Boessenkool <segher@kernel.crashing.org>
3670 PR rtl-optimization/85645
3671 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
3672 insn that has a REG_CFA_REGISTER note.
3674 2018-06-26 Robin Dapp <rdapp@linux.ibm.com>
3676 * config/s390/s390.h (enum processor_flags): Do not use
3677 default tune parameter when -march was specified.
3679 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3682 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3683 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3686 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3688 Back port from trunk
3689 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3691 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3692 added IEEE/IBM long double multilib support on PowerPC little
3693 endian Linux systems.
3694 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3695 (MULTILIB_DEFAULTS): Likewise.
3696 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3698 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3699 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3700 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3702 2018-06-25 Segher Boessenkool <segher@kernel.crashing.org>
3705 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
3707 * config/rs6000/rs6000.md (abs<mode>2): Handle IFmode.
3709 2018-05-02 Jan Hubicka <jh@suse.cz>
3711 Backport from mainline
3712 2018-04-30 Jan Hubicka <jh@suse.cz>
3714 * lto-wrapper.c (ltrans_priorities): New static var.
3715 (cmp_priority): New.
3716 (run_gcc): Read priorities and if doing parallel build order
3717 the Makefile by them.
3719 2018-06-25 Segher Boessenkool <segher@kernel.crashing.org>
3722 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3725 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3726 ieee128 argument takes up only one (vector) register, not two (floating
3729 2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
3731 PR tree-optimization/85989
3732 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3734 (backprop::intersect_uses): Check it when deciding whether this
3735 is a backedge reference.
3736 (backprop::process_block): Add each phi to m_visited_phis
3737 after visiting it, then clear it at the end.
3739 2018-06-22 David Edelsohn <dje.gcc@gmail.com>
3741 Backport from mainline
3743 2018-06-19 Tony Reix <tony.reix@atos.com>
3744 Damien Bergamini <damien.bergamini@atos.com>
3745 David Edelsohn <dje.gcc@gmail.com>
3747 * collect2.c (static_obj): New variable.
3748 (static_libs): New variable.
3749 (is_in_list): Uncomment declaration.
3750 (main): Track AIX libraries linked statically.
3751 (is_in_list): Uncomment definition.
3752 (scan_prog_file): Don't add AIX shared libraries initializer
3753 to constructor list if linking statically.
3755 2018-06-22 Michael Meissner <meissner@linux.ibm.com>
3757 Back port from trunk
3758 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3760 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3761 conversion insn that shows up when pr85657-3.c is compiled using
3762 IEEE 128-bit long double.
3764 Back port from trunk
3765 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3767 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3768 multiply and divide external functions from being created more
3771 Back port from trunk
3772 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3774 * config/rs6000/rs6000.md (neg<mode>2_internal): Use the correct
3775 mode to check whether the mode is IBM extended.
3777 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3780 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3781 floating point modes, so that IFmode is numerically greater than
3782 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3783 to declare the ordering. This prevents IFmode from being
3784 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3785 machine. Include rs6000-modes.h to share the fractional values
3786 between genmodes* and the rest of the compiler.
3790 * config/rs6000/rs6000-modes.h: New file.
3791 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3792 meaning of rs6000_long_double_size so that 126..128 selects an
3793 appropriate 128-bit floating point type.
3794 (rs6000_option_override_internal): Likewise.
3795 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3796 (TARGET_LONG_DOUBLE_128): Change the meaning of
3797 rs6000_long_double_size so that 126..128 selects an appropriate
3798 128-bit floating point type.
3799 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3800 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3801 source and destination to match the standard usage.
3802 (truncifkf2): Likewise.
3803 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3804 ISA 2.07 to use an explicit clobber, instead of passing in a
3806 (copysign<mode>3_soft): Likewise.
3808 Back port from trunk
3809 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3811 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3814 Back port from trunk
3815 2018-06-04 Michael Meissner <meissner@linux.ibm.com>
3817 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3818 track if we pass or return IEEE 128-bit floating point.
3819 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3820 C++ mangling that is compatible with GCC 8.1.
3821 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3822 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3823 floating point types.
3824 (rs6000_function_arg_advance_1): Likewise.
3825 (rs6000_mangle_type): Optionally generate mangled names that match
3826 what GCC 8.1 generated for IEEE 128-bit floating point types.
3827 (rs6000_globalize_decl_name): If we have an external function that
3828 passes or returns IEEE 128-bit types, generate a weak reference
3829 from the mangled name used in GCC 8.1 to the current mangled
3831 (rs6000_init_builtins): Make __ibm128 use the long double type if
3832 long double is IBM extended double. Make __float128 use the long
3833 double type if long double is IEEE 128-bit.
3836 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3837 macro for __ibm128 built-in functions.
3838 (PACK_IF): Add __ibm128 pack/unpack functions.
3839 (UNPACK_IF): Likewise.
3840 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3841 enable long double built-in functions if long double is IEEE
3842 128-bit floating point.
3843 (rs6000_invalid_builtin): Update long double built-in function
3845 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3846 functions, adjust the built-in function to use the long double
3847 built-in function if __ibm128 and long double are the same type.
3848 * doc/extend.texi (PowerPC builtins): Update documention for
3849 __builtin_{,un}pack_longdouble. Add documentation for
3850 __builtin_{,un}pack_ibm128.
3852 Back port from trunk
3853 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
3855 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3856 the 128-bit floating point types. Fix function comment.
3858 2018-06-22 Michael Meissner <meissner@linux.ibm.com>
3860 Back port from trunk
3861 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
3864 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
3865 define __ibm128 as long double.
3866 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
3867 as a distinct type with IEEE 128-bit floating point is supported.
3868 (init_float128_ieee): Fix up conversions between IFmode and IEEE
3869 128-bit types to use the correct functions.
3870 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
3871 convert between 128-bit floating point types that have different
3872 modes but the same representation, instead of using gen_lowpart to
3874 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
3876 (IFKF_reg): New attributes to give the register constraints for
3878 (extend<mode>tf2_internal): New insns to mark an explicit
3879 conversion between 128-bit floating point types that have a
3880 different mode but share the same representation.
3882 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3885 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3886 -x assembler-with-cpp.
3888 2018-06-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
3890 Backported from mainline
3891 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3893 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3894 multilibs for *-*-rtems*.
3895 * config/riscv/t-rtems: New file.
3897 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3899 Backported from mainline
3900 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3902 PR rtl-optimization/86108
3903 * bb-reorder.c (create_forwarder_block): Renamed to ...
3904 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3905 jump from new landing pad to the second part.
3906 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3909 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3912 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3915 PR tree-optimization/86231
3916 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3917 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3919 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3921 Backport from mainline
3922 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3924 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3926 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3928 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3930 * gimplify.c (gimplify_init_constructor): Really never clear for an
3931 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3933 2018-06-18 Martin Sebor <msebor@redhat.com>
3936 * calls.c (alloc_max_size): Correct a logic error/typo.
3937 Treat excessive arguments as infinite. Warn for invalid arguments.
3938 * doc/invoke.texi (-Walloc-size-larger-than): Update.
3940 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3943 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3944 documented as preserved for backward compatibility only.
3945 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3947 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3950 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3951 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3952 Only call store_expr for halves if the mode is the same.
3955 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3956 Fix up comment formatting.
3958 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3961 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3962 unsigned_type_for returns NULL.
3965 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3966 subregs of multi-word pseudos unless the float mode has word size.
3968 2018-06-14 Richard Biener <rguenther@suse.de>
3971 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3972 duplicate and harmful type_hash_canon.
3973 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3975 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3977 Backport from mainline
3978 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3980 * config/rtems.h (STDINT_LONG32): Define.
3982 2018-05-05 Roland McGrath <mcgrathr@google.com>
3985 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
3986 any section for which we don't know a specific type it should have,
3987 regardless of name. Previously this was done only for the exact
3988 names ".init_array", ".fini_array", and ".preinit_array".
3989 (default_elf_asm_named_section): Add comment about
3990 relationship with default_section_type_flags and SECTION_NOTYPE.
3991 (get_section): Don't consider it a type conflict if one side has
3992 SECTION_NOTYPE and the other doesn't, as long as neither has the
3993 SECTION_BSS et al used in the default_section_type_flags logic.
3995 2018-06-13 Martin Sebor <msebor@redhat.com>
3997 PR tree-optimization/86114
3998 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4000 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4002 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4005 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4006 offsets for register save directives. Emit a second batch of save
4007 directives, if need be, when the function accesses prior frames.
4009 2018-06-11 Jason Merrill <jason@redhat.com>
4011 PR c++/80485 - inline function non-zero address.
4012 * symtab.c (nonzero_address): Check DECL_COMDAT.
4014 2018-06-11 Peter Bergner <bergner@vnet.ibm.com>
4016 Backport from mainline
4017 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4020 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4023 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4026 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4029 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4030 on the correct operand.
4031 (*movdi_internal64): Ditto.
4033 2018-06-08 Carl Love <cel@us.ibm.com>
4035 Backport from mainline
4036 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4037 vextract_fp_from_shortl): Add BE support.
4039 2018-06-08 Carl Love <cel@us.ibm.com>
4041 Backport from mainline
4042 * gcc/config/rs6000/vsx.md (first_match_index_<mode>):
4043 Calculate index using natureal element order.
4044 (first_match_or_eos_index_<mode>):
4045 Calculate index using natural element order.
4046 (first_match_index_<mode>):
4047 Calculate index using natural element order.
4048 (first_match_or_eos_index_<mode>):
4049 Calculate index using natural order.
4050 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4051 for BE and LE modes.
4052 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4053 P9V_BUILTIN_VCLZLSBB_V16QI.
4054 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4057 2018-06-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4059 Backport from mainline
4060 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4063 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4064 qualifier_void_pointer and qualifier_const_void_pointer.
4065 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4066 (arm_init_builtins): Handle the above.
4067 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4068 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4069 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4072 2018-06-07 Uros Bizjak <ubizjak@gmail.com>
4075 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
4076 Generate SImode target register for null target.
4077 <case IX86_BUILTIN_XGETBV>: Ditto.
4078 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
4079 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
4081 2018-06-07 Peter Bergner <bergner@vnet.ibm.com>
4083 Backport from mainline
4084 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
4087 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4088 Don't handle -mcpu=power8 if -mpower9-vector is also used.
4090 2018-06-06 Richard Biener <rguenther@suse.de>
4092 Backport from mainline
4093 2018-06-04 Richard Biener <rguenther@suse.de>
4095 PR tree-optimization/86038
4096 * tracer.c (find_best_successor): Check probability for
4097 being initialized, bail out if not.
4099 2018-05-30 Richard Biener <rguenther@suse.de>
4101 PR tree-optimization/85964
4102 * tracer.c (better_p): Drop initialized count check, we only
4103 call the function with initialized counts now.
4104 (find_best_successor): Do find a best edge if one
4105 has uninitialized count.
4106 (find_best_predecessor): Likewise. Do BB frequency check only
4107 if count is initialized.
4109 2018-05-28 Richard Biener <rguenther@suse.de>
4111 PR tree-optimization/85934
4112 * tree-vect-generic.c (expand_vector_operations_1): Hoist
4113 vector boolean check before scalar optimization.
4115 2018-05-22 Richard Biener <rguenther@suse.de>
4117 PR tree-optimization/85863
4118 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4119 comparisons when vectype is specified.
4120 (vectorizable_condition): Do not specify vectype for
4121 vect_is_simple_cond when SLP vectorizing.
4123 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4125 Backport from mainline
4126 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4128 * config/s390/s390-builtin-types.def: Add void function type.
4129 * config/s390/s390-builtins.def: Use the function type for the
4132 2018-06-04 Martin Sebor <msebor@redhat.com>
4135 * calls.c (maybe_warn_nonstring_arg): Use string length to set
4136 or ajust the presumed bound on an operation to avoid unnecessary
4139 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4142 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4143 of bits to ignore when comparing architectures.
4145 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4148 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4150 2018-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
4152 PR tree-optimization/85712
4153 Backport from mainline:
4154 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
4156 PR tree-optimization/85712
4157 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4159 (alloc_cand_and_find_basis): Initialize first_interp field.
4160 (slsr_process_mul): Modify first_interp field.
4161 (slsr_process_add): Likewise.
4162 (slsr_process_cast): Modify first_interp field for each new
4164 (slsr_process_copy): Likewise.
4165 (dump_candidate): Dump first_interp field.
4166 (replace_mult_candidate): Process all interpretations, not just
4168 (replace_rhs_if_not_dup): Likewise.
4169 (replace_one_candidate): Likewise.
4171 Backport from mainline:
4172 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
4174 PR tree-optimization/85712
4175 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4176 this candidate has already been replaced in-situ by a copy.
4178 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4181 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4182 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4184 (sse4_1_round<mode>2): Use nonimmediate_operand
4185 for operand 1 predicate.
4187 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4190 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4191 functions with naked attribute.
4193 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4196 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4197 and movx for Haswell.
4199 2018-05-30 Jakub Jelinek <jakub@redhat.com>
4201 Backported from mainline
4202 2018-05-14 Jakub Jelinek <jakub@redhat.com>
4205 * config/i386/i386.md: Disallow non-commutative arithmetics in
4206 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4207 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
4208 in the peephole2 before it.
4210 2018-05-08 Jakub Jelinek <jakub@redhat.com>
4213 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
4214 after cmpelim optimization.
4216 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
4218 Backport from mainline
4219 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
4223 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4225 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4229 * varasm.c (assemble_alias): Check ifunc_resolver only on
4232 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
4235 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4237 (cgraph_node::create_alias): Likewise.
4238 (cgraph_node::get_availability): Check ifunc_resolver instead
4239 of looking up ifunc attribute.
4240 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4241 * varasm.c (do_assemble_alias): Likewise.
4242 (assemble_alias): Likewise.
4243 (default_binds_local_p_3): Likewise.
4244 * cgraph.h (cgraph_node): Add ifunc_resolver.
4245 (cgraph_node::only_called_directly_or_aliased_p): Return false
4247 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4249 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4250 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4251 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4252 instead of looking up ifunc attribute.
4254 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
4256 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4258 2018-05-25 Richard Biener <rguenther@suse.de>
4261 * tree-dump.c (dequeue_and_dump): Remove access to removed
4262 operand 2 of a SWITCH_EXPR.
4264 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4266 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4267 Add {q} suffix to insn mnemonic.
4269 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4272 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4273 when memory input operand is handled.
4275 2018-05-23 Bin Cheng <bin.cheng@arm.com>
4277 Backport from mainline
4278 2018-05-17 Bin Cheng <bin.cheng@arm.com>
4279 Richard Biener <rguenther@suse.de>
4281 PR tree-optimization/85793
4282 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4283 for VMAT_ELEMENTWISE.
4285 2018-05-23 Richard Biener <rguenther@suse.de>
4288 * tree-data-ref.c (create_runtime_alias_checks): Defer
4289 and ignore overflow warnings.
4291 2018-05-23 Martin Liska <mliska@suse.cz>
4293 Backport from mainline
4294 2018-05-23 Yury Gribov <tetra2005@gmail.com>
4296 PR tree-optimization/85822
4297 * tree-vrp.c (is_masked_range_test): Fix handling of negative
4300 2018-05-23 Martin Liska <mliska@suse.cz>
4302 Backport from mainline
4303 2018-05-11 Martin Liska <mliska@suse.cz>
4306 * doc/extend.texi: Document LLVM style format for no_sanitize
4309 2018-05-22 Martin Sebor <msebor@redhat.com>
4312 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4314 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
4316 PR tree-optimization/85814
4317 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4318 a null return from get_strinfo when unsharing the next
4319 strinfo in the chain.
4321 2018-05-21 Pat Haugen <pthaugen@us.ibm.com>
4323 Backport from mainline
4324 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
4325 Segher Boessenkool <segher@kernel.crashing.org>
4328 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest operand.
4330 2018-05-18 Toon Moene <toon@moene.org>
4332 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4333 directly after that of -floop-interchange. Indicate that both
4334 options are enabled by default when specifying -O3.
4336 2018-05-11 Martin Jambor <mjambor@suse.cz>
4339 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
4342 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4345 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
4347 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4350 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
4352 (cortex-m0): Use armv6s-m isa.
4353 (cortex-m0plus): Likewise.
4354 (cortex-m1): Likewise.
4355 (cortex-m0.small-multiply): Likewise.
4356 (cortex-m0plus.small-multiply): Likewise.
4357 (cortex-m1.small-multiply): Likewise.
4359 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
4361 PR rtl-optimization/85638
4362 * bb-reorder.c: Include common/common-target.h.
4363 (create_forwarder_block): New function extracted from...
4364 (fix_up_crossing_landing_pad): ...here. Rename into...
4365 (dw2_fix_up_crossing_landing_pad): ...this.
4366 (sjlj_fix_up_crossing_landing_pad): New function.
4367 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
4368 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
4369 from both partitions and exit the loop after one iteration.
4371 2018-05-08 Richard Biener <rguenther@suse.de>
4373 Backport from mainline
4374 2018-05-04 Richard Biener <rguenther@suse.de>
4377 * fold-const.c (negate_expr_p): Restrict negation of operand
4378 zero of a division to when we know that can happen without
4380 (fold_negate_expr_1): Likewise.
4382 2018-05-03 Richard Biener <rguenther@suse.de>
4384 PR tree-optimization/85615
4385 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
4386 to loops not nested in BBs loop father to avoid creating multi-entry
4389 2018-05-02 Richard Biener <rguenther@suse.de>
4392 * gimplify.c (gimplify_save_expr): When in SSA form allow
4393 SAVE_EXPRs to compute to SSA vars.
4395 2018-05-02 Richard Biener <rguenther@suse.de>
4397 PR tree-optimization/85597
4398 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
4399 do not use split vect_get_vec_defs call but call vect_get_slp_defs
4402 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
4405 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
4406 (check_arch): Likewise.
4407 (check_fpu): Return the result rather than printing it.
4408 (end arch): Fix operator precedence.
4409 (end cpu): Likewise.
4410 (END): Print the result from check_fpu.
4412 2018-05-08 Richard Biener <rguenther@suse.de>
4414 Backport from mainline
4415 2018-05-04 Richard Biener <rguenther@suse.de>
4417 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
4418 * gimple-ssa-store-merging.c
4419 (imm_store_chain_info::output_merged_store): Remove redundant create,
4420 release split_store vector contents on failure.
4421 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
4422 scalar stmt vector on cache hit.
4424 2018-05-04 Richard Biener <rguenther@suse.de>
4427 * tree-complex.c (tree_lower_complex): Handle removed blocks.
4429 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4431 Backport from mainline.
4432 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4434 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
4435 GET_MODE_MASK before any checking.
4436 (nds32_can_use_bset_p): Likewise.
4437 (nds32_can_use_btgl_p): Likewise.
4439 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4441 Backport from mainline.
4442 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4444 * config/nds32/nds32-doubleword.md: New define_split pattern for
4445 illegal register number.
4447 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4449 Backport from mainline.
4450 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4452 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
4454 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4456 Backport from mainline.
4457 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4459 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
4461 2018-05-06 Jakub Jelinek <jakub@redhat.com>
4464 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
4465 the type is addressable. Don't force op into register if it has
4468 2018-05-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4470 Backport from trunk.
4471 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4474 * config/aarch64/constraints.md (Usg): Limit to 31.
4477 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4479 * BASE-VER: Set to 8.1.1.
4481 2018-05-02 Release Manager
4483 * GCC 8.1.0 released.
4485 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
4487 PR tree-optimization/85586
4488 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
4489 exit early for statements in the same group if the accesses are
4492 2018-05-01 Jakub Jelinek <jakub@redhat.com>
4495 * doc/install.texi2html: Replace _002d with - and _002a with * in
4496 generated html files using sed.
4498 2018-04-27 Martin Jambor <mjambor@suse.cz>
4501 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
4502 the jump function allows for passing through aggregate values.
4504 2018-04-27 Jeff Law <law@redhat.com>
4506 * config.gcc: Mark tile* targets as deprecated/obsolete.
4508 2018-04-27 Jakub Jelinek <jakub@redhat.com>
4510 PR tree-optimization/85529
4511 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
4512 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
4513 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
4514 zero extension or masking of the MSB bit.
4515 (optimize_range_tests): Add FIRST_BB argument, pass it through
4516 to optimize_range_tests_var_bound.
4517 (maybe_optimize_range_tests, reassociate_bb): Adjust
4518 optimize_range_tests callers.
4520 2018-04-26 Richard Biener <rguenther@suse.de>
4521 Jakub Jelinek <jakub@redhat.com>
4523 * cgraph.h (symbol_table): Just declare debug method here.
4524 * symtab.c (symbol_table::debug): Define.
4526 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
4528 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
4530 2018-04-25 H.J. Lu <hongjiu.lu@intel.com>
4532 Backport from mainline
4533 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
4536 * config/i386/i386.c (ix86_expand_builtin): Change memory
4537 operand to XI, extend p0 to Pmode.
4538 * config/i386/i386.md: Change unspec volatile and operand
4539 1 mode to XI, change operand 0 mode to P.
4541 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4543 * DEV-PHASE: Set to prerelease.
4545 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
4547 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4548 in __abskf2 and __powikf2.
4550 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4553 * config/aarch64/constraints.md (Usg, Usj): New constraints.
4554 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4555 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4556 Use the above on operand 2. Reindent.
4557 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4559 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4562 * common/config/i386/i386-common.c (ix86_handle_option): Don't
4564 * config/i386/i386.opt (mcet): Removed.
4565 * doc/install.texi: Remove -mcet documentation.
4566 * doc/invoke.texi: Likewise.
4568 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4571 * doc/install.texi: Remove -mcet from bootstrap-cet.
4573 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4576 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4577 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4581 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4582 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4583 containing a CONST_VECTOR.
4585 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
4587 * doc/install.texi: Update newlib dependency for nvptx.
4589 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4592 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4593 instead of INTVAL when shifting x left.
4595 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
4597 PR tree-optimization/85478
4598 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4599 vect_grouped_store_supported for single element vectors.
4601 2018-04-24 Richard Biener <rguenther@suse.de>
4604 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4605 load cost increase to the case of non-constant step.
4607 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4610 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4611 destination if any_malformed_asm.
4613 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
4616 * expr.c (store_field): In the bitfield case, if the value comes from
4617 a function call and is returned in registers by means of a PARALLEL,
4618 do not change the mode of the temporary unless BLKmode and VOIDmode.
4620 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
4622 PR rtl-optimization/85423
4623 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4624 dependencies to debug insns when the previous insn is non-debug.
4626 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4628 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4629 enums into a single definition.
4630 (fls): Fix predicates and printing.
4633 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4635 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4636 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4637 and short u6 immediate.
4638 (check_if_valid_sleep_operand): Remove.
4639 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4641 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4643 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4644 flag_always_save_lp condition.
4645 * config/nds32/nds32.opt (malways-save-lp): New option.
4647 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4649 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4650 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4651 * config/nds32/nds32.h
4652 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4653 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4655 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4657 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4658 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4660 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4661 Chung-Ju Wu <jasonwucj@gmail.com>
4663 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4665 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4666 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4668 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4670 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4672 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4674 * config/nds32/nds32-protos.h (nds32_data_alignment,
4675 nds32_local_alignment): Declare.
4676 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4677 nds32_local_alignment): New functions.
4678 (TARGET_CONSTANT_ALIGNMENT): Define.
4679 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4681 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4683 * config/nds32/nds32.c
4684 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4685 (TARGET_MODES_TIEABLE_P): Likewise.
4687 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4689 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4692 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
4693 Chung-Ju Wu <jasonwucj@gmail.com>
4695 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4696 for unaligned access.
4697 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4699 * config/nds32/nds32-intrinsic.md: Likewise.
4700 * config/nds32/nds32_intrinsic.h: Likewise.
4701 * config/nds32/nds32.h (nds32_builtins): Likewise.
4702 * config/nds32/nds32.opt (munaligned-access): New option.
4703 * config/nds32/nds32.c (nds32_asm_file_start): Display
4704 flag_unaligned_access status.
4706 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4708 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4709 -mno-relax is present.
4710 * config/riscv/linux.h (LINK_SPEC): Ditto.
4712 2018-04-20 Martin Sebor <msebor@redhat.com>
4715 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4717 (gimple_fold_builtin_stxcpy_chk): Same.
4718 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4720 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
4723 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4724 __powikf2 when long double is IEEE 128-bit.
4726 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4728 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
4729 step to make sure stack always aligned.
4731 2018-04-20 Carl Love <cel@us.ibm.com>
4734 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
4735 size check for arg0.
4737 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
4738 Tom de Vries <tom@codesourcery.com>
4741 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
4742 Emit insns for calls too.
4743 (nvptx_find_par): Always look for worker-level predecessor insn.
4744 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
4746 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
4747 (nvptx_process_pars): Propagate frames for calls.
4749 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
4752 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
4754 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
4755 (ix86_handle_option): Don't handle OPT_mibt.
4756 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
4758 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
4760 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
4761 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
4762 (ix86_target_macros): Define __CET__ with flag_cf_protection
4763 for -fcf-protection.
4764 * config/i386/i386.c (isa2_opts): Remove -mibt.
4765 * config/i386/i386.h (TARGET_IBT): Removed.
4766 (TARGET_IBT_P): Likewise.
4767 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
4768 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
4769 * config/i386/i386.opt (mcet): Update help message.
4772 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
4773 -mcet as an alias for -mshstk.
4775 2018-04-20 Richard Biener <rguenther@suse.de>
4778 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
4779 complexity by forcing a single use of the multiply operand.
4781 2018-04-20 Martin Jambor <mjambor@suse.cz>
4784 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
4785 recursion dependency to only apply to non-clones.
4787 2018-04-20 Martin Jambor <mjambor@suse.cz>
4790 * ipa-cp.c (create_specialized_node): Check that clones of
4791 self-recursive edges exist during IPA-CP.
4793 2018-04-19 Toon Moene <toon@moene.org>
4795 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
4798 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4800 PR tree-optimization/85467
4801 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
4802 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
4803 VECTOR_CST element to type.
4805 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4808 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
4809 * config/i386/i386.md (builtin_setjmp_setup): Removed.
4810 (builtin_longjmp): Likewise.
4811 (save_stack_nonlocal): New pattern.
4812 (restore_stack_nonlocal): Likewise.
4814 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4817 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4818 Replace ASM_OUTPUT_LABEL with fprintf.
4820 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4823 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4824 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
4825 * config/i386/i386-c.c (ix86_target_macros_internal): Also
4826 define __IBT__ and __SHSTK__ for -fcf-protection.
4827 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
4829 (ix86_trampoline_init): Likewise.
4830 (x86_output_mi_thunk): Likewise.
4831 (ix86_notrack_prefixed_insn_p): Likewise.
4832 (ix86_option_override_internal): Don't disallow -fcf-protection.
4833 * config/i386/i386.md (rdssp<mode>): Also enable for
4835 (incssp<mode>): Likewise.
4836 (nop_endbr): Likewise.
4837 * config/i386/i386.opt (mcet): Change help message to built-in
4841 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
4842 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
4843 enable CET built-in functions.
4845 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
4847 * common/config/i386/i386-common.c
4848 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
4849 OPTION_MASK_ISA_MOVDIRI_UNSET,
4850 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
4851 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
4852 * config.gcc (movdirintrin.h): New header.
4853 * config/i386/cpuid.h (bit_MOVDIRI,
4854 bit_MOVDIR64B): New bits.
4855 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
4857 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
4858 (VOID, PVOID, PCVOID)): New function types.
4859 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
4860 __builtin_ia32_directstoreu_u64,
4861 __builtin_ia32_movdir64b): New builtins.
4862 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
4863 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
4865 (ix86_valid_target_attribute_inner_p): Ditto.
4866 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
4867 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
4868 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
4869 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
4870 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
4871 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
4872 (movdiri<mode>, movdir64b_<mode>): New.
4873 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
4874 * config/i386/immintrin.h: Include movdirintrin.h.
4875 * config/i386/movdirintrin.h: New file.
4876 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
4878 2018-04-19 Richard Biener <rguenther@suse.de>
4881 * cfg.c (clear_bb_flags): When loop state says we have
4882 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
4884 2018-04-19 Richard Biener <rguenther@suse.de>
4886 PR tree-optimization/84737
4887 * tree-vect-data-refs.c (vect_copy_ref_info): New function
4888 copying restrict info.
4889 (vect_setup_realignment): Use it.
4890 * tree-vectorizer.h (vect_copy_ref_info): Declare.
4891 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
4892 the first DR to all generated stores.
4893 (vectorizable_load): Likewise for loads.
4895 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4897 PR tree-optimization/85446
4898 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
4899 the integral and pointer types to have the same precision.
4901 * doc/install.texi: Document --disable-cet being the default and
4904 2018-04-18 Martin Liska <mliska@suse.cz>
4906 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
4909 2018-04-18 Martin Liska <mliska@suse.cz>
4912 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
4915 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
4916 arguments if they are comparable.
4918 2018-04-18 Martin Liska <mliska@suse.cz>
4921 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4924 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4927 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
4930 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
4931 ENDBR after calling __morestack.
4933 2018-04-18 David Malcolm <dmalcolm@redhat.com>
4936 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
4937 by using gcc_base_ver to generate a gcc_driver_version, and use
4938 it when generating GCC_DRIVER_NAME.
4939 * configure: Regenerate.
4941 2018-04-18 Jakub Jelinek <jakub@redhat.com>
4944 * config.gcc: Obsolete powerpc*-*-*spe*.
4946 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4949 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
4950 (stabstr_D): Change type of unum from unsigned int to
4951 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
4954 2018-04-17 Jim Wilson <jimw@sifive.com>
4957 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
4958 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
4959 Set arg_pointer_offset after using pretend_args_size.
4961 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4963 PR rtl-optimization/85431
4964 * dse.c (record_store): Ignore zero width stores.
4967 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
4968 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
4969 __builtin_stack_restore rather than after it.
4970 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
4971 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
4972 argument instead of virtual_dynamic_stack_rtx.
4974 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
4976 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
4978 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
4979 Add note to error message to explain internal mapping of overloaded
4980 built-in function name to non-overloaded built-in function name.
4981 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
4984 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
4987 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
4988 where the inputs overlap with the output.
4990 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4992 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
4993 (=v, v) alternative and explicit "memory" attribute.
4994 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
4995 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4997 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
4998 "sselog1" type instead of "sselog".
4999 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
5000 "sselog". Remove explicit "memory" attribute.
5001 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
5002 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5004 (vec_extract_hi_v32hi): Merge all alternatives into one, use
5005 "sselog1" type instead of "sselog". Remove explicit "memory"
5007 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
5008 use "sselog1" type instead of "sselog". Remove explicit "memory"
5010 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
5011 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5013 (vec_extract_hi_v64qi): Merge all alternatives into one, use
5014 "sselog1" type instead of "sselog". Remove explicit "memory"
5016 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
5017 use "sselog1" type instead of "sselog". Remove explicit "memory"
5021 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
5024 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
5027 2018-04-17 Martin Jambor <mjambor@suse.cz>
5030 * ipa-cp.c (create_specialized_node): Call
5031 expand_all_artificial_thunks if necessary.
5033 2018-04-17 Martin Liska <mliska@suse.cz>
5036 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
5037 in message, remote space in between '_G' and '('.
5039 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5042 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
5043 avx512f_vmcmp<mode>3<round_saeonly_name>,
5044 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
5045 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
5046 avx512f_rndscale<mode><round_saeonly_name>,
5047 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
5048 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
5049 Use %<iptr>2 instead of %2 for -masm=intel.
5050 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
5051 avx512f_vcvttss2usi<round_saeonly_name>,
5052 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
5054 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
5055 avx512f_vcvttsd2usi<round_saeonly_name>,
5056 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
5057 Use %q1 instead of %1 for -masm=intel.
5058 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
5059 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
5060 of %3 for -masm=intel.
5061 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
5063 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
5065 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
5067 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
5068 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
5070 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
5072 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
5073 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
5074 %g1 and one with %0 and %1.
5075 (avx512er_vmrcp28<mode><round_saeonly_name>,
5076 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
5078 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
5079 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
5080 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
5081 of %0 and %{%4%} for -masm=intel.
5082 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
5083 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
5084 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
5085 order of %0 and %{%5%}%{z%} for -masm=intel.
5087 2018-04-17 Jan Hubicka <jh@suse.cz>
5090 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
5092 2018-04-17 Martin Liska <mliska@suse.cz>
5095 * multiple_target.c (create_dispatcher_calls): Set apostrophes
5096 for target_clone error message. Make default implementation
5097 clone to be a local declaration.
5098 (separate_attrs): Add new argument and check for an empty
5100 (expand_target_clones): Handle it.
5101 (ipa_target_clone): Make redirection just for target_clones
5104 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
5105 Tom de Vries <tom@codesourcery.com>
5108 * omp-expand.c (expand_oacc_for): Add dummy false branch for
5109 tiled basic blocks without omp continue statements.
5111 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
5114 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
5115 vec_extract expression as having side effects to make sure it gets
5118 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
5121 * config/i386/i386.c (get_builtin_code_for_version): Check
5124 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
5127 * gcc/config.gcc: Support "skylake".
5128 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
5130 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
5131 (processor_target_table): Add "skylake".
5132 (ix86_option_override_internal): Add "skylake".
5133 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
5134 PROCESSOR_CANNONLAKE.
5135 (get_builtin_code_for_version): Fix priority for
5136 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
5137 PROCESSOR_SKYLAKE-AVX512.
5138 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
5139 (processor_type): Add PROCESSOR_SKYLAKE.
5141 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
5142 Jason Merrill <jason@redhat.com>
5145 * convert.c (convert_to_integer_1): Use direct recursion for
5146 enumeral types and types with a precision less than the number
5147 of bits in their mode.
5149 2018-04-16 Julia Koval <julia.koval@intel.com>
5152 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
5153 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
5155 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
5158 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
5159 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
5160 and -mno-direct-move.
5162 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
5165 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
5166 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
5167 Ensure negative shifts result in {0}.
5169 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
5171 PR rtl-optimization/79916
5172 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
5173 regs (if any) to define how to gnerate SD moves when LRA is in
5176 2018-04-13 Jakub Jelinek <jakub@redhat.com>
5178 PR rtl-optimization/85393
5179 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
5180 * except.c (expand_dw2_landing_pad_for_region): Make static.
5181 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
5182 a label and unconditional jump to old_bb, rather than
5183 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
5186 PR rtl-optimization/85376
5187 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
5188 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
5189 instead of a specific value.
5191 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5192 Bin Cheng <bin.cheng@arm.com>
5194 PR tree-optimization/82965
5195 PR tree-optimization/83991
5196 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
5197 by_profile_only parameter.
5198 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
5199 information if the loop was predicted to iterate too many times.
5200 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
5202 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5205 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
5208 2018-04-13 Martin Liska <mliska@suse.cz>
5209 Jakub Jelinek <jakub@redhat.com>
5212 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
5213 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
5214 * builtins.c (expand_builtin_memory_copy_args): Use
5215 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
5216 handle dest_addr == pc_rtx.
5218 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
5221 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
5222 asked to not generate direct moves.
5223 (fix_trunc<mode>si2_stfiwx): Similar.
5224 (fix_trunc<mode>si2_internal): Similar.
5226 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5229 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
5230 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
5231 lookup if dest in some wider mode is known to be const0_rtx and
5232 if so, record permanent equivalence for it to be ZERO_EXTEND of
5233 the narrower mode destination.
5235 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5237 * lto-streamer-out.c (output_function): Revert 259346.
5238 * omp-expand.c (expand_oacc_for): Likewise.
5240 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
5242 PR rtl-optimization/85354
5243 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
5244 * sel-sched.c (sel_global_init): ... here.
5246 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
5249 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
5250 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5251 mode for PE-COFF targets.
5252 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
5253 (i386_pe_asm_lto_end): Likewise.
5254 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
5255 (TARGET_ASM_LTO_END): Likewise.
5256 * config/i386/winnt.c (saved_debug_info_level): New static variable.
5257 (i386_pe_asm_lto_start): New function.
5258 (i386_pe_asm_lto_end): Likewise.
5260 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5261 Richard Biener <rguenther@suse.de>
5264 * lto-streamer-out.c (output_function): Fix CFG loop state before
5266 * omp-expand.c (expand_oacc_for): Handle calls to internal
5267 functions like regular functions.
5269 2018-04-12 Richard Biener <rguenther@suse.de>
5272 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
5273 for the early LTO debug to properly generate references to it
5274 during DIE emission. Do not re-use that for the skeleton for
5276 (dwarf2out_early_finish): Likewise.
5278 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5281 * config/i386/sse.md
5282 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
5283 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
5284 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
5285 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
5286 and output is a reg, avoid creating invalid lowpart subreg, but
5287 instead split into a 512-bit move. Don't split if not AVX512VL,
5288 input is xmm16+ reg and output is a mem.
5289 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
5290 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
5291 xmm16+ reg and output is a mem.
5293 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5295 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
5296 also for flag_dwarf2_cfi_asm.
5298 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5300 PR rtl-optimization/85342
5301 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
5302 a bool scalar var inside of the loop instead. Don't try to update
5303 recog_data.operand after failed apply_change_group.
5305 2018-04-12 Tom de Vries <tom@codesourcery.com>
5308 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
5309 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
5310 array with flexible array member as array without given dimension.
5311 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
5312 argument for undefined param to true.
5314 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
5317 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5318 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
5319 from PowerPC section.
5320 * config/rs6000/sysv4.opt (mcall-): Improve help text.
5321 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
5322 help text that is too long.
5323 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
5324 help text that is too long.
5325 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
5326 help text that is too long.
5328 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
5330 * config/alpha/alpha.md (stack_probe_internal): Rename
5331 from "probe_stack". Update all callers.
5333 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5335 PR rtl-optimization/84566
5336 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
5337 sched_macro_fuse_insns.
5339 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5342 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
5343 (compute_block_dependences): ... from here.
5345 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5347 PR tree-optimization/85331
5348 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
5349 from int to HOST_WIDE_INT.
5351 2018-04-11 Martin Jambor <mjambor@suse.cz>
5354 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
5355 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
5356 not the same as the source val.
5357 (cgraph_edge_brings_value_p): New parameter.
5358 (gather_edges_for_value): Pass destination value to
5359 cgraph_edge_brings_value_p.
5360 (perhaps_add_new_callers): Likewise.
5361 (get_info_about_necessary_edges): Likewise and exclude values brought
5362 only by self-recursive edges.
5363 (create_specialized_node): Redirect only clones of self-calling edges.
5364 (+self_recursive_pass_through_p): New function.
5365 (find_more_scalar_values_for_callers_subset): Use it.
5366 (find_aggregate_values_for_callers_subset): Likewise.
5367 (known_aggs_to_agg_replacement_list): Removed.
5368 (decide_whether_version_node): Re-calculate known constants for all
5369 remaining context clones.
5371 2018-04-11 Richard Biener <rguenther@suse.de>
5374 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
5375 from early DWARF output.
5376 (dwarf2out_early_finish): Output line info unconditionally into
5377 early DWARF and add reference to it.
5379 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5382 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
5383 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
5384 other than V2DFmode using iptr mode attribute.
5385 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
5387 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5389 PR rtl-optimization/84659
5390 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
5392 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5395 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
5397 (output_loc_list): Pass address of a dummy size variable even in the
5398 locview handling loop.
5399 (index_location_lists): Add comment on why skip_loc_list_entry can't
5402 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
5405 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
5408 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
5411 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5412 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
5413 and -mstring-compare-inline-limit.
5415 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5418 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
5419 for stack clash protection in a register whenever we need it to be in
5422 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5424 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
5425 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
5427 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5430 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
5432 (mlong-double-): Ditto.
5433 * config/rs6000/sysv4.opt (msdata=): Ditto.
5434 (mtls-size=): Ditto.
5436 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
5438 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5439 erroneous entries for
5440 "vector int vec_ldl (int, long int *)", and
5441 "vector unsigned int vec_ldl (int, unsigned long int *)".
5442 Add comments and entries for
5443 "vector bool char vec_ldl (int, bool char *)",
5444 "vector bool short vec_ldl (int, bool short *)",
5445 "vector bool int vec_ldl (int, bool int *)",
5446 "vector bool long long vec_ldl (int, bool long long *)",
5447 "vector pixel vec_ldl (int, pixel *)",
5448 "vector long long vec_ldl (int, long long *)",
5449 "vector unsigned long long vec_ldl (int, unsigned long long *)".
5450 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
5451 type tree bool_long_long_type_node and correct definition of
5452 bool_V2DI_type_node to make reference to this new type tree.
5453 (rs6000_mangle_type): Replace erroneous reference to
5454 bool_long_type_node with bool_long_long_type_node.
5455 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
5456 comments to emphasize sign distinctions for char and int types and
5457 replace RS6000_BTI_bool_long constant with
5458 RS6000_BTI_bool_long_long constant. Also add comment to restrict
5459 use of RS6000_BTI_pixel.
5460 (bool_long_type_node): Remove this macro definition.
5461 (bool_long_long_type_node): New macro definition
5463 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5465 PR rtl-optimization/85300
5466 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
5467 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
5468 simplify_unary_operation fails.
5470 2018-04-10 Martin Liska <mliska@suse.cz>
5472 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
5473 cgraph_edge and ipa_ref.
5475 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5479 * config/i386/sse.md
5480 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
5481 computation of the VEC_MERGE selector from mask.
5482 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
5483 Fix decoding of the VEC_MERGE selector into mask.
5485 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5487 PR tree-optimization/85286
5488 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
5490 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5492 * final.c (final_1): Set insn_last_address as well as
5493 insn_current_address.
5495 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5498 * explow.c (emit_stack_probe): Call validize_mem on memory location
5499 before passing it to gen_probe_stack. Create address operand and
5500 legitimize it for the probe_stack_address case.
5502 2018-04-09 Jan Hubicka <jh@suse.cz>
5505 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
5506 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
5507 * tree.c (free_lang_data_in_type): Fix handling of binfos;
5509 (free_lang_data): Rebuild type inheritance graph.
5511 2018-04-09 Martin Sebor <msebor@redhat.com>
5513 * invoke.texi (-finline-small-functions): Mention other optimization
5515 (-findirect-inlining, -fpartial-inlining): Same.
5516 (-finline-functions-called-once): Same.
5517 (-freorder-blocks-and-partition): Same.
5519 2018-04-09 Jan Hubicka <jh@suse.cz>
5522 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
5523 jumps; choose last target that matches the criteria (i.e.
5524 no partition changes for non-crossing jumps).
5525 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
5526 support for redirecting crossing jumps to non-crossing.
5528 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
5530 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
5531 also for naked functions.
5533 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
5535 * config/arc/arc.md (add_shift): New pattern.
5536 (add_shift2): Likewise.
5537 (sub_shift): Likewise.
5538 (sub_shift_cmp0_noout): Likewise.
5539 (compare_si_ashiftsi): Likewise.
5540 (xbfu_cmp0_noout): New combine pattern.
5541 (xbfu_cmp0"): Likewise.
5542 (movsi_set_cc_insn): Place the predicable variant first.
5543 (commutative_binary_cmp0_noout): Remove clobber.
5544 (commutative_binary_cmp0): New pattern.
5545 (noncommutative_binary_cmp0): Likewise.
5546 (noncommutative_binary_cmp0_noout): Likewise.
5547 (noncommutative_binary_comparison_result_used): Removed.
5548 (rsub_cmp0): New pattern.
5549 (rsub_cmp0_noout): Likewise.
5550 (extzvsi): Changed, keep only meaningful variants.
5551 (SQH, SEZ): New iterators.
5552 (SQH_postfix): New mode attribute.
5553 (SEZ_prefix): New code attribute.
5554 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5555 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5556 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5558 (noncommutative_operator): Check the availability of barrel
5561 2018-04-09 Richard Biener <rguenther@suse.de>
5563 PR tree-optimization/85284
5564 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5565 Only use the niter constraining form of simple_iv when the exit
5568 2018-04-09 Tom de Vries <tom@codesourcery.com>
5571 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5572 (define_expand "*memory_barrier"): New define_expand.
5573 (define_insn "memory_barrier"): New insn.
5575 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5577 PR rtl-optimization/80463
5578 PR rtl-optimization/83972
5579 PR rtl-optimization/83480
5581 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5582 correct producer for the insn.
5583 (tidy_control_flow): Fixup seqnos in case of debug insns.
5585 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5587 PR rtl-optimization/83913
5589 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5590 different sched-times when merging exprs.
5592 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5594 PR rtl-optimization/83962
5596 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5597 tidy_fallthru_edge and tidy_control_flow.
5599 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5601 PR rtl-optimization/83530
5603 * sel-sched.c (force_next_insn): New global variable.
5604 (remove_insn_for_debug): When force_next_insn is true, also leave only
5605 next insn in the ready list.
5606 (sel_sched_region): When the region wasn't scheduled, make another pass
5607 over it with force_next_insn set to 1.
5609 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5611 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5613 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5614 for interrupt control.
5615 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5616 functions for interrupt control.
5617 * config/nds32/nds32-intrinsic.md: Likewise.
5618 * config/nds32/nds32_intrinsic.h: Likewise.
5619 * config/nds32/nds32.h (nds32_builtins): Likewise.
5621 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5623 * config/nds32/nds32.c (nds32_init_machine_status,
5624 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5625 strict_aligned_p field.
5626 (nds32_expand_to_rtl_hook): New function.
5627 (TARGET_EXPAND_TO_RTL_HOOK): Define.
5628 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5630 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5631 Chung-Ju Wu <jasonwucj@gmail.com>
5633 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5634 * config/nds32/nds32-n7.md: New file.
5635 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5636 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5638 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5639 * config/nds32/nds32.md (pipeline_model): Add n7.
5640 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5641 * config/nds32/pipelines.md: Include n7 settings.
5643 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5644 Chung-Ju Wu <jasonwucj@gmail.com>
5646 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5647 * config/nds32/nds32-e8.md: New file.
5648 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5649 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5651 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5652 * config/nds32/nds32.md (pipeline_model): Add e8.
5653 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5654 * config/nds32/pipelines.md: Include e8 settings.
5656 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5657 Chung-Ju Wu <jasonwucj@gmail.com>
5659 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5660 * config/nds32/nds32-n8.md: New file.
5661 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5662 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5664 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5665 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5666 * config/nds32/nds32.md (pipeline_model): Add n8.
5667 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5668 * config/nds32/pipelines.md: Include n8 settings.
5670 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5671 Chung-Ju Wu <jasonwucj@gmail.com>
5673 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5674 * config/nds32/nds32-n9-2r1w.md: New file.
5675 * config/nds32/nds32-n9-3r2w.md: New file.
5676 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5677 nds32_register_ports): New or modify for cpu n9.
5678 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5680 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5681 * config/nds32/nds32-utils.c: New file.
5682 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5683 TARGET_MUL_SLOW): Define.
5684 * config/nds32/nds32.md (pipeline_model): New attribute.
5685 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5686 New options that support cpu n9.
5687 * config/nds32/pipelines.md: Include n9 settings.
5688 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5690 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5692 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5693 information if necessary.
5694 (output_cond_branch_compare_zero): Likewise.
5695 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5696 (nds32_target_alignment): Refine for alignment.
5697 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5698 (FUNCTION_BOUNDARY): Modify.
5699 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5701 * config/nds32/nds32.opt (malways-align, malign-functions): New.
5703 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5705 * config/nds32/constants.md (unspec_volatile_element): Add values for
5706 TLB operation and data prefetch.
5707 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5708 functions for TLB operation and data prefetch.
5709 * config/nds32/nds32-intrinsic.md: Likewise.
5710 * config/nds32/nds32_intrinsic.h: Likewise.
5711 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5712 (nds32_print_operand): Likewise.
5713 * config/nds32/nds32.h (nds32_builtins): Likewise.
5715 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5716 Andrew Pinski <pinsika@gcc.gnu.org>
5719 * match.pd: Use constant_boolean_node of correct type instead of
5720 boolean_true_node or boolean_false_node for simplifying
5721 pointer comparisons to zero.
5723 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5725 PR tree-optimization/80021
5726 * tree.c (verify_type_variant): Make error call in verify_variant_match
5727 translatable and remove final full stop.
5729 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5731 * config/nds32/constants.md (unspec_volatile_element): Add
5732 UNSPEC_VOLATILE_EH_RETURN.
5733 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
5734 nds32_output_stack_pop): Support dwarf exception handling process.
5735 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
5736 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
5737 exception handling process.
5738 (nds32_compute_stack_frame): Likewise.
5739 (nds32_return_addr_rtx): Likewise.
5740 (nds32_initial_elimination_offset): Likewise.
5741 (nds32_expand_prologue): Likewise.
5742 (nds32_expand_epilogue): Likewise.
5743 (nds32_dynamic_chain_address): New function.
5744 * config/nds32/nds32.h (machine_function): Add fields for dwarf
5746 (DYNAMIC_CHAIN_ADDRESS): Define.
5747 (EH_RETURN_DATA_REGNO): Define.
5748 (EH_RETURN_STACKADJ_RTX): Define.
5749 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
5750 patterns for dwarf exception handling.
5752 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5754 * config/nds32/nds32.h: Clean up obsolete macros.
5756 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5758 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5759 Add enum values for particular instructions.
5760 * config/nds32/nds32-intrinsic.c: Implementation of expanding
5761 particular intrinsic functions.
5762 * config/nds32/nds32-intrinsic.md: Likewise.
5763 * config/nds32/nds32_intrinsic.h: Likewise.
5764 * config/nds32/nds32.h (nds32_builtins): Likewise.
5765 * config/nds32/nds32.md (type): Add pbsad and pbsada.
5766 (btst, ave): New patterns for particular instructions.
5768 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5770 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5771 Add enum values for atomic load/store and memory sync.
5772 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
5774 * config/nds32/nds32-intrinsic.md: Likewise.
5775 * config/nds32/nds32_intrinsic.h: Likewise.
5776 * config/nds32/nds32.h (nds32_builtins): Likewise.
5778 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5780 PR tree-optimization/85257
5781 * fold-const.c (native_encode_vector): If not all elts could fit
5782 and off is -1, return 0 rather than offset.
5783 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
5784 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
5785 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
5786 adjust buffer in native_interpret_expr call.
5788 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5790 * config/nds32/constants.md (unspec_volatile_element): Add cache
5791 control enum values.
5792 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
5793 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
5794 * config/nds32/nds32.c (nds32_cctl_names): New.
5795 (nds32_print_operand): Handle cache control register names.
5796 * config/nds32/nds32.h (nds32_builtins): New enum values.
5797 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
5799 * config/nds32/nds32.md (type): Add mmu.
5800 * config/nds32/pipelines.md (simple_insn): Add mmu.
5802 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5804 * config/nds32/nds32.md (type): Remove call.
5805 * config/nds32/pipelines.md (simple_insn): Likewise.
5807 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5809 * config/nds32/constants.md (unspec_volatile_element): Add
5810 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
5811 UNSPEC_VOLATILE_FMFCFG.
5812 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
5813 description for fmfcfg and fmfcsr.
5814 (bdesc_1arg): Add fmtcsr.
5815 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
5816 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
5817 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
5818 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
5819 unspec_fmfcfg): New patterns.
5820 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
5821 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
5822 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
5823 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
5824 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
5825 __nds32__fmfcfg): Define.
5827 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5829 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
5830 intrinsic register names.
5831 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
5832 intrinsic register enum values and macros.
5834 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5836 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
5837 for load/store addressing form.
5838 (nds32_print_operand_address): Likewise.
5840 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
5843 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
5844 based on LABEL_REF. Remove useless assertion.
5845 (pic_address_needs_scratch): Fix formatting.
5846 (sparc_legitimize_pic_address): Minor tweaks.
5847 (sparc_delegitimize_address): Adjust assertion accordingly.
5848 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
5849 into symbolic_operand.
5850 (movsi_high_pic_label_ref): Likewise.
5851 (movsi_lo_sum_pic_label_ref): Likewise.
5852 (movdi_pic_label_ref): Likewise.
5853 (movdi_high_pic_label_ref): Likewise.
5854 (movdi_lo_sum_pic_label_ref): Likewise.
5856 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
5858 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
5859 custom LIB_SPEC setup.
5861 2018-04-06 Ruslan Bukin <br@bsdpad.com>
5862 Kito Cheng <kito.cheng@gmail.com>
5864 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
5865 * config/riscv/freebsd.h: New.
5867 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5869 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
5870 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
5873 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5874 Kito Cheng <kito.cheng@gmail.com>
5876 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
5877 nds32_output_call, nds32_symbol_binds_local_p): New functions.
5878 * config/nds32/nds32-protos.h (nds32_output_call,
5879 nds32_output_return): Declare.
5880 * config/nds32/nds32.md: Refine all the call and return patterns.
5882 2018-04-06 Jakub Jelinek <jakub@redhat.com>
5885 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
5886 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
5888 PR rtl-optimization/84872
5889 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
5890 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
5893 2018-04-06 Tamar Christina <tamar.christina@arm.com>
5895 * expr.c (copy_blkmode_to_reg): Revert 254862.
5896 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
5898 2018-04-06 Richard Biener <rguenther@suse.de>
5901 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
5902 after seeing a component reference with an adjacent field. Treat
5903 refs to arrays at struct end of external decls similar to
5904 refs to unconstrained commons.
5906 2018-04-06 Jakub Jelinek <jakub@redhat.com>
5909 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
5910 look through SAVE_EXPRs with non-side-effects argument. Adjust
5912 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
5915 2018-04-06 Richard Biener <rguenther@suse.de>
5918 * alias.c (find_base_term): New wrapper around find_base_term
5919 unwinding CSELIB_VAL_PTR changes.
5920 (find_base_term): Do not restore CSELIB_VAL_PTR during the
5923 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5925 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
5927 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
5928 constant definitions.
5929 ("nop"): lr 0,0 -> nopr r0
5930 ("nop_lr0", "nop_lr1"): New insn definitions.
5932 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5934 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
5935 NDS32_V3PUSH_AVAILABLE_P macro.
5937 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
5938 Chung-Ju Wu <jasonwucj@gmail.com>
5940 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
5941 (nds32*-*-*): Add float and fpu_config into supported_defaults.
5942 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
5943 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
5944 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
5945 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
5946 * config/nds32/constraints.md: New constraints and checking for hard
5947 float configuration.
5948 * config/nds32/iterators.md: New mode iterator and attribute for hard
5949 float configuration.
5950 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
5952 * config/nds32/nds32-fpu.md: New file.
5953 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
5954 deal with hard float code generation.
5955 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
5957 (abi_type, float_reg_number): New enum type.
5958 * config/nds32/nds32-predicates.c: New predicates for hard float.
5959 * config/nds32/nds32-protos.h: Declare functions for hard float.
5960 * config/nds32/nds32.c: Implementation for hard float configuration.
5961 * config/nds32/nds32.h: Definitions for hard float configuration.
5962 * config/nds32/nds32.md: Include hard float machine description and
5963 modify patterns for hard float configuration.
5964 * config/nds32/nds32.opt: New options for hard float configuration.
5965 * config/nds32/predicates.md: New predicates for hard float
5968 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5970 * common/config/nds32/nds32-common.c
5971 (nds32_option_optimization_table): Enable -mreleax-hint by default.
5973 2018-04-05 Jakub Jelinek <jakub@redhat.com>
5976 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
5977 CONSTRUCTOR_ELT (ctor, ...)->value.
5979 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
5982 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
5984 2018-04-05 Tom de Vries <tom@codesourcery.com>
5987 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
5990 2018-04-05 Shiva Chen <shiva0217@gmail.com>
5991 Kito Cheng <kito.cheng@gmail.com>
5993 * config/nds32/constraints.md (U33): Fine-tune checking condition.
5994 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
5995 * config/nds32/nds32.h (nds32_16bit_address_type): Add
5996 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
5998 2018-04-05 Shiva Chen <shiva0217@gmail.com>
5999 Kito Cheng <kito.cheng@gmail.com>
6001 * config/nds32/constraints.md (Ufe): New memory constraint.
6002 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
6003 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
6004 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
6006 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
6007 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
6009 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6011 * config/nds32/nds32.md: Use optimize_size in the condition for
6012 alu-shift instructions.
6014 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6016 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
6018 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6020 * config/nds32/nds32.md (negsi2): Refine pattern.
6022 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6023 Chung-Ju Wu <jasonwucj@gmail.com>
6025 * config/nds32/iterators.md (shift_rotate): New code iterator.
6026 (shift): New code attribute.
6027 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
6028 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
6029 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
6030 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
6031 bit-wise operations.
6032 (andsi3, *andsi3): Ditto.
6033 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
6034 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
6035 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
6036 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
6037 nds32_ior_operand, nds32_xor_operand): New predicates.
6039 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6041 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
6042 (addsi3, subsi3): ... this.
6044 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6046 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
6048 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6050 * config/nds32/nds32.md: Adjust indention.
6052 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6054 * config/nds32/nds32.md (feature): New attribute.
6056 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6058 * config/nds32/nds32.md (subtype): New attribute.
6060 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
6063 * config/arm/arm-builtins.c (arm_expand_builtin): Change
6064 expansion to perform a bitwise AND of the argument followed by a
6065 boolean negation of the result.
6067 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
6069 PR rtl-optimization/84878
6070 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
6071 the basic block. Assert the use reference is not artificial and that
6072 it has an associated insn.
6074 2018-04-04 Michael Matz <matz@suse.de>
6076 * builtins.c (compute_objsize): Pass correct operand
6077 to array_at_struct_end_p.
6079 2018-04-04 Richard Biener <rguenther@suse.de>
6082 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
6083 from contexts for DINFO_LEVEL_TERSE and below.
6085 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6087 * config/nds32/nds32-doubleword.md (move_<mode>): Require
6088 resiter_operand condition.
6089 * config/nds32/nds32.md (*move<mode>): Ditto.
6091 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6092 Monk Chiang <sh.chiang04@gmail.com>
6094 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
6096 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6098 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
6100 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6101 Kito Cheng <kito.cheng@gmail.com>
6103 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
6104 nds32_cond_code_str, output_cond_branch,
6105 output_cond_branch_compare_zero, nds32_expand_cbranch,
6106 nds32_expand_cstore, nds32_expand_movcc,
6107 nds32_output_cbranchsi4_equality_zero,
6108 nds32_output_cbranchsi4_equality_reg,
6109 nds32_output_cbranchsi4_equality_reg_or_const_int,
6110 nds32_output_cbranchsi4_greater_less_zero: New functions.
6111 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
6112 nds32_expand_cstore, nds32_expand_movcc,
6113 nds32_output_cbranchsi4_equality_zero,
6114 nds32_output_cbranchsi4_equality_reg,
6115 nds32_output_cbranchsi4_equality_reg_or_const_int,
6116 nds32_output_cbranchsi4_greater_less_zero): Declare.
6117 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
6118 nds32_rimm11s_operand): New predicates.
6119 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
6120 * config/nds32/nds32.md: Rewrite all the branch and conditional move
6123 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6125 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
6126 * config/nds32/nds32.md: Ditto.
6127 * config/nds32/pipelines.md: Ditto.
6129 2018-04-04 Richard Biener <rguenther@suse.de>
6131 PR tree-optimization/85168
6132 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
6133 propagating abnormals.
6135 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6137 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
6139 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6140 Kito Cheng <kito.cheng@gmail.com>
6142 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
6143 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
6144 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
6145 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
6146 * config/nds32/nds32.md (sibcall_internal): New.
6147 (sibcall_register): Remove.
6148 (sibcall_immediate): Remove.
6149 (sibcall_value_internal): New.
6150 (sibcall_value_register): Remove.
6151 (sibcall_value_immediate): Remove.
6152 * config/nds32/predicates.md (nds32_general_register_operand): New.
6153 (nds32_call_address_operand): New.
6155 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6157 PR rtl-optimization/85167
6158 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
6159 bb_defs if *split_p, instead preinitialize it to NULL.
6161 PR tree-optimization/85156
6162 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
6163 evaluating the argument multiple times.
6165 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
6167 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
6169 (_mm_cvtpd_ps): Likewise.
6170 (_mm_cvttpd_epi32): Likewise.
6171 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
6172 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
6173 vector, pixel, and bool following altivec.h include.
6175 2018-04-03 Martin Sebor <msebor@redhat.com>
6177 * doc/extend.texi (Common Function Attributes): Clarify.
6178 (const attribute): Likewise.
6179 (pure attribute): Likewise.
6181 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6184 * config/i386/i386.c (ix86_expand_vector_set): Use
6185 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
6187 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
6189 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
6190 instructions when changing rounding bits to preserve precision bits
6191 in the x87 control word.
6193 2018-04-03 Martin Liska <mliska@suse.cz>
6195 PR tree-optimization/82491
6196 * rtl.h (strip_offset_and_add): Replace += suboffset with
6197 poly_uint64 () + suboffset.
6199 2018-03-29 Martin Liska <mliska@suse.cz>
6200 Martin Jambor <mjambor@suse.cz>
6203 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
6204 param_type is not an integral or pointer type.
6206 2018-04-03 Richard Biener <rguenther@suse.de>
6208 * sese.h (recompute_all_dominators): Remove.
6210 2018-04-02 Martin Sebor <msebor@redhat.com>
6212 * doc/invoke.texi (-Wrestrict): Fix typos.
6214 2018-04-02 Jim Wilson <jimw@sifive.com>
6216 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
6217 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
6218 (<optab>di3, <optab>si3_extend): Likewise.
6219 (<optab>si3_mask, <optab>si3_mask_1): New.
6220 (<optab>di3_mask, <optab>di3_mask_1): New.
6221 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
6222 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
6223 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
6225 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
6227 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
6230 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
6232 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
6233 (nds32_canonicalize_comparison): New function.
6235 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6236 Kito Cheng <kito.cheng@gmail.com>
6237 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6239 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
6240 * config/nds32/constants.md (unspec_volatile_element): Add
6241 UNSPEC_VOLATILE_RELAX_GROUP.
6242 * config/nds32/nds32-relax-opt.c: New file.
6243 * config/nds32/nds32-predicates.c
6244 (nds32_symbol_load_store_p): New function.
6245 * config/nds32/nds32-protos.h
6246 (nds32_symbol_load_store_p): Declare function.
6247 (make_pass_nds32_relax_opt): Declare new rtl pass function.
6248 * config/nds32/nds32.c
6249 (nds32_register_pass): New function to register pass.
6250 (nds32_register_passes): New function to register passes.
6251 * config/nds32/nds32.md (relax_group): New pattern.
6252 * config/nds32/nds32.opt (mrelax-hint): New option.
6253 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
6255 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
6257 * config/nds32/t-nds32: Modify files dependency.
6259 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6261 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
6262 (PROFILE_HOOK): Define its implementation.
6264 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6266 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
6267 type and 32-bit size.
6269 2018-04-01 Jakub Jelinek <jakub@redhat.com>
6272 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
6273 (V_128_256): New mode iterator.
6274 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
6275 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
6276 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
6278 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
6279 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
6281 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
6284 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
6285 NaN inputs correctly.
6287 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
6290 * config/rs6000/vsx.md (??r): New mode attribute.
6291 (*vsx_mov<mode>_64bit): Use it.
6292 (*vsx_mov<mode>_32bit): Likewise.
6294 2018-03-30 Martin Sebor <msebor@redhat.com>
6296 PR tree-optimization/84818
6297 * builtins.c (check_access): Use warning_n.
6299 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6302 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
6304 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
6307 2018-03-30 Julia Koval <julia.koval@intel.com>
6310 * x86-tune.def (movx, partial_reg_dependency): Enable for
6313 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
6316 * lra-constraints.c (process_alt_operands): Move setting
6317 this_alternative_matches below.
6319 2018-03-29 Martin Liska <mliska@suse.cz>
6322 * doc/invoke.texi: Document how LTO works with debug info.
6323 Describe auto-load support of binutils. Mention 'x86-64'
6324 as valid option value of -march option.
6326 2018-03-29 Jakub Jelinek <jakub@redhat.com>
6328 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
6331 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
6332 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
6333 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
6336 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6339 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
6340 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
6341 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
6342 for RS6000_BTM_POWERPC64.
6343 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
6344 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
6345 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
6350 2018-03-28 Carl Love <cel@us.ibm.com>
6353 2017-09-27 Carl Love <cel@us.ibm.com>
6355 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
6356 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
6357 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
6360 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6362 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
6363 instead of __vector bool.
6364 (_mm_max_pu8): Likewise.
6365 (_mm_min_pi16): Likewise.
6367 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6370 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
6371 (DIVWEUO): Likewise.
6373 (DIVDEUO): Likewise.
6374 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
6375 DIVWEUO and DIVDEUO.
6376 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
6377 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
6378 (div_extend): Likewise.
6379 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
6381 (__builtin_divweuo): Likewise.
6382 (__builtin_divdeo): Likewise.
6383 (__builtin_divdeuo): Likewise.
6385 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6388 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
6389 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
6391 PR tree-optimization/82004
6392 * gimple-match-head.c (optimize_pow_to_exp): New function.
6393 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
6394 Don't fold to exp if optimize_pow_to_exp is false.
6396 2018-03-28 Martin Liska <mliska@suse.cz>
6399 * calls.c (initialize_argument_information): Fix trailing space.
6400 * common.opt: Fix typo and provide better explanation for
6401 -fsanitize-coverage option.
6402 * config/i386/i386.opt: Fix typo.
6404 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6405 Martin Liska <mliska@suse.cz>
6408 * gimplify.c (asan_poison_variable): Don't do the check for
6409 gimplify_omp_ctxp here.
6410 (gimplify_decl_expr): Do it here.
6411 (gimplify_target_expr): Likewise.
6413 2018-03-28 Martin Liska <mliska@suse.cz>
6416 * config/i386/i386.c (ix86_function_arg_advance): Do not call
6417 chkp_type_bounds_count if MPX is not enabled.
6419 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
6421 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
6423 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6426 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
6427 function to create the function decl for complex long double
6428 multiply and divide for -mabi=ieeelongdouble.
6429 (init_float128_ieee): Call it.
6431 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
6434 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
6435 -fcf-protection=branch -mibt.
6436 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
6438 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6441 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
6443 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
6446 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
6447 extern array declarations.
6449 2018-03-27 Richard Biener <rguenther@suse.de>
6452 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
6453 explicit single_use checks.
6455 2018-03-27 Richard Biener <rguenther@suse.de>
6457 PR tree-optimization/85082
6458 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
6461 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6463 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
6464 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
6465 Turn on fasynchronous-unwind-tables and funwind-tables.
6467 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
6470 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
6471 (*bmi_blsr_<mode>_ccz): Ditto.
6473 2018-03-26 Tom de Vries <tom@codesourcery.com>
6475 PR tree-optimization/85063
6476 * omp-general.c (offloading_function_p): New function. Factor out
6478 * omp-offload.c (pass_omp_target_link::gate): ... here.
6479 * omp-general.h (offloading_function_p): Declare.
6480 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
6481 with attribute omp declare target for offloading functions.
6483 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
6485 PR tree-optimization/84005
6486 * tree-data-ref.h (get_base_for_alignment): Declare.
6487 * tree-data-ref.c (get_base_for_alignment_1): New function.
6488 (get_base_for_alignment): Likewise.
6489 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
6490 get_base_for_alignment to find a suitable base object, instead
6491 of always using drb->base_address.
6493 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6496 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
6497 known size by default.
6499 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
6502 * lra-constraints.c (process_alt_operands): Don't match BLKmode
6503 and non BLKmode operands.
6505 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6508 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
6509 Clean up attributes.
6511 2018-03-23 Richard Biener <rguenther@suse.de>
6514 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
6515 we are going to emit early debug for LTO.
6517 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6520 * function.c (match_asm_constraints_1): Don't optimize if input
6521 doesn't satisfy general_operand predicate for output's mode.
6524 * alias.c (write_dependence_p): Don't require for x_canonicalized
6525 non-VOIDmode if x has VOIDmode.
6528 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
6529 just don't try to optimize it rather than assert it never happens.
6531 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6533 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
6534 macro expansions for definition of ST_INTERNAL_<mode> and
6535 LD_INTERNAL_<mode> builtins.
6536 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
6538 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
6540 (altivec_expand_st_builtin): Likewise.
6541 (altivec_expand_builtin): Remove calls to deleted functions.
6542 (rs6000_address_for_altivec): Delete this function.
6543 * config/rs6000/vector.md: Remove expands for
6544 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6546 2018-03-22 Sudakshina Das <sudi.das@arm.com>
6549 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6550 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6551 re-computing once computed.
6552 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6553 (arm_init_machine_status): Initialize
6554 machine->static_chain_stack_bytes.
6556 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6559 * doc/extend.texi: Add four new prototypes for vec_ld.
6560 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6561 definitions for more logical presentation.
6562 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6563 entries for V1TI variants of __builtin_altivec_ld builtin.
6564 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6565 handling of V1TI variant of LVX icode pattern.
6566 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6567 (rs6000_gimple_fold_builtin): Likewise.
6568 (altivec_init_builtins): Add code to define
6569 __builtin_altivec_lvx_v1ti function.
6571 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6574 * function.c (match_asm_constraints_1): Don't do the optimization
6575 if input isn't a REG, SUBREG, MEM or constant.
6577 2018-03-22 Tom de Vries <tom@codesourcery.com>
6579 PR tree-optimization/84956
6580 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6581 bb_has_abnormal_pred.
6583 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6586 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6587 DECL_INITIAL (decl) to decl at the end.
6588 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6591 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6593 * doc/extend.texi (__builtin_tgmath): Document when complex
6594 integer types are treated as _Complex _Float64.
6596 2018-03-21 Tom de Vries <tom@codesourcery.com>
6598 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6600 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6602 PR tree-optimization/84960
6603 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6604 if it is ENTRY block, move them into single succ of ENTRY in that case.
6606 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
6608 PR tree-optimization/84811
6609 * poly-int.h (poly_span_traits): Remove the T3 parameter and
6610 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6611 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6612 (known_subrange_p): Update accordingly. Cast each value involved
6613 in the size comparison, rather than casting the result of the
6616 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6618 PR tree-optimization/84982
6619 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6620 by flipping the least significant bit rather than all bits from
6621 bitpos to bitpos + bitsize - 1.
6623 2018-03-21 Nathan Sidwell <nathan@acm.org>
6625 * doc/extend.texi (Deprecated Features): Remove mention of
6626 long-deleted deprecations.
6628 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6631 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6632 * configure: Regenerate.
6634 2018-03-21 Tom de Vries <tom@codesourcery.com>
6636 PR tree-optimization/83126
6637 * tree-parloops.c (num_phis): New function.
6638 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6640 2018-03-21 Nathan Sidwell <nathan@acm.org>
6642 * doc/extend.texi (Deprecated Features): Update deprecated flags,
6643 mention anon-struct/union members and trailing attributes.
6645 2018-03-21 Bin Cheng <bin.cheng@arm.com>
6647 PR tree-optimization/84969
6648 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6649 builtin memset partitions if they set different rhs values.
6651 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6653 PR rtl-optimization/84989
6654 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6655 VEC_DUPLICATE with scalar result mode.
6657 2018-03-21 Martin Liska <mliska@suse.cz>
6660 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6661 not intended return statement.
6663 2018-03-21 Martin Liska <mliska@suse.cz>
6666 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6667 (chkp_find_bound_slots_1): Limit number of iterations.
6669 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
6672 * Minor grammar fixes for x86 options.
6674 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6677 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6678 holding REG_CFA_RESTORE notes, instead turn them into a USE.
6680 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
6683 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6684 (altivec_lvx_<mode>_1op): Likewise.
6685 (altivec_stvx_<mode>_2op): Likewise.
6686 (altivec_stvx_<mode>_1op): Likewise.
6687 (altivec_lvx_<VM2:mode>): New define_expand.
6688 (altivec_stvx_<VM2:mode>): Likewise.
6689 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6690 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6691 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6692 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6693 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6694 (rs6000_gen_lvx): Likewise.
6695 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6696 (altivec_expand_stv_builtin): Likewise.
6697 (altivec_expand_builtin): Likewise.
6698 * config/rs6000/vector.md: Likewise.
6700 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6703 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6706 2018-03-20 Richard Biener <rguenther@suse.de>
6709 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6710 sign-conversions as zero, fall back to standard scalar_stmt
6713 2018-03-20 Martin Liska <mliska@suse.cz>
6716 * predict.c (rebuild_frequencies): Handle case when we have
6717 PROFILE_ABSENT, but flag_guess_branch_prob is false.
6719 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6722 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6723 flag_section_anchors.
6724 * varasm.c (use_blocks_for_decl_p): Remove hack for
6725 dw2_force_const_mem.
6728 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
6730 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
6731 be created, use lowpart_subreg of operands[0] rather than operands[0]
6733 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
6734 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
6735 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
6736 and n constraint instead of aarch64_shift_imm_di and Usd.
6737 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
6738 (*aarch64_<optab>_reg_minus<mode>3): ... this.
6740 2018-03-20 Sudakshina Das <sudi.das@arm.com>
6743 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
6744 to favor GPR over NEON registers.
6745 (<shift>di3_neon): Likewise.
6747 2018-03-20 Tom de Vries <tom@codesourcery.com>
6750 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
6751 (nvptx_process_pars): Emit bar.sync asap and alap.
6753 2018-03-20 Tom de Vries <tom@codesourcery.com>
6756 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
6757 seen_label if seen_label is already set.
6759 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6762 * config/i386/i386.c (fold_builtin_cpu): For features above 31
6763 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
6764 Use 1U instead of 1. Formatting fixes.
6767 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
6768 instead of TREE_TYPE (s1) for the return value.
6770 2018-03-19 Jakub Jelinek <jakub@redhat.com>
6772 PR tree-optimization/84946
6773 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
6774 bitsize + bitsize in poly_uint64 rather than poly_int64.
6777 * dwarf2asm.c: Include fold-const.c.
6778 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
6779 of decl rather than decl itself.
6781 PR rtl-optimization/84643
6782 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
6784 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
6787 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
6788 calling assemble_variable.
6790 2018-03-19 Sudakshina Das <sudi.das@arm.com>
6793 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
6794 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
6796 2018-03-19 Jim Wilson <jimw@sifive.com>
6799 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
6800 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
6801 (riscv_first_stack_step): Likewise.
6802 (riscv_option_override): Use STACK_BOUNDARY instead of
6804 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
6806 (BIGGEST_ALIGNMENT): Set to 128.
6807 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
6808 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
6811 2018-03-19 Richard Biener <rguenther@suse.de>
6813 PR tree-optimization/84933
6814 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
6815 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
6817 2018-03-19 Richard Biener <rguenther@suse.de>
6819 PR tree-optimization/84859
6820 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
6821 (cond_if_else_store_replacement): Perform sinking operation on
6822 single-store BBs regardless of MAX_STORES_TO_SINK setting.
6823 Generalize what a BB with a single eligible store is.
6825 2018-03-19 Richard Biener <rguenther@suse.de>
6827 PR tree-optimization/84929
6828 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
6829 chrec_is_positive against non-chrec arg.
6831 2018-03-19 Tamar Christina <tamar.christina@arm.com>
6834 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
6836 2018-03-18 Martin Liska <mliska@suse.cz>
6838 PR rtl-optimization/84635
6839 * regrename.c (build_def_use): Use matches_mode only when
6842 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
6844 PR tree-optimization/84913
6845 * tree-vect-loop.c (vectorizable_reduction): Don't try to
6846 vectorize chains of COND_EXPRs.
6848 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6850 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
6852 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6854 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
6856 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6858 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
6860 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6861 Kito Cheng <kito.cheng@gmail.com>
6863 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
6864 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
6865 (nds32_adjust_reg_alloc_order): New function.
6866 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
6868 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
6870 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
6871 nds32_print_operand, nds32_print_operand_address): Use
6872 HOST_WIDE_INT_PRINT_DEC instead.
6874 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6876 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
6878 2018-03-17 Jakub Jelinek <jakub@redhat.com>
6881 * config/i386/i386.c (initial_ix86_tune_features,
6882 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
6884 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
6885 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
6886 rather than 1u << ix86_tune. Formatting fix.
6887 (ix86_option_override_internal): Change ix86_arch_mask from
6888 unsigned int to unsigned HOST_WIDE_INT, initialize to
6889 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
6890 (ix86_function_specific_restore): Likewise.
6892 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6895 * postreload.c (reload_combine_recognize_pattern): Perform
6896 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
6897 truncate_int_for_mode the result for the destination's mode.
6900 * hsa-gen.c (mem_type_for_type): Fix comment typo.
6901 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
6903 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6906 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
6909 * lra-assigns.c (lra_split_hard_reg_for): Don't use
6910 regno_allocno_class_array and sorted_pseudos.
6911 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
6912 insns where regno is used.
6914 2018-03-16 Martin Liska <mliska@suse.cz>
6917 * multiple_target.c (create_dispatcher_calls): Redirect
6918 reference in the symbol table.
6920 2018-03-16 Martin Liska <mliska@suse.cz>
6923 * multiple_target.c (create_dispatcher_calls): Redirect also
6926 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6930 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
6931 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
6932 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
6934 2018-03-16 Julia Koval <julia.koval@intel.com>
6936 * doc/invoke.texi (Skylake Server): Add CLWB.
6937 Cannonlake): Remove CLWB.
6939 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6941 PR tree-optimization/84841
6942 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
6944 (FLOAT_ONE_CONST_TYPE): Define.
6945 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
6946 (sort_by_operand_rank): Put entries with higher constant_type last
6947 rather than first to match comments.
6949 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
6951 * config/nios2/nios2.md (movsi_internal): Fix thinko in
6954 2018-03-15 Jakub Jelinek <jakub@redhat.com>
6957 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
6958 check and use address of target always.
6960 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
6963 * config/i386/i386.c (indirect_thunk_needed): Update comments.
6964 (indirect_thunk_bnd_needed): Likewise.
6965 (indirect_thunks_used): Likewise.
6966 (indirect_thunks_bnd_used): Likewise.
6967 (indirect_return_needed): New.
6968 (indirect_return_bnd_needed): Likewise.
6969 (output_indirect_thunk_function): Add a bool argument for
6971 (output_indirect_thunk_function): Don't generate alias for
6972 function return thunk.
6973 (ix86_code_end): Call output_indirect_thunk_function to generate
6974 function return thunks.
6975 (ix86_output_function_return): Set indirect_return_bnd_needed
6976 and indirect_return_needed instead of indirect_thunk_bnd_needed
6977 and indirect_thunk_needed.
6979 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
6981 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
6982 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
6983 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
6985 2018-03-15 David Malcolm <dmalcolm@redhat.com>
6986 Paul Hua <paul.hua.gm@gmail.com>
6989 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
6991 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
6993 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
6994 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
6997 2018-03-15 Tamar Christina <tamar.christina@arm.com>
7000 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7001 instead of GET_MODE_SIZE when comparing Units.
7003 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7006 * varasm.c (hash_section): Return an unchangeble hash value
7007 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
7008 Return !aarch64_can_use_per_function_literal_pools_p ().
7010 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7013 * optabs.c (emit_conditional_move): Pass address of cmode's copy
7014 rather than address of cmode as last argument to prepare_cmp_insn.
7016 2018-03-15 Julia Koval <julia.koval@intel.com>
7018 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
7019 F_AVX512VNNI, F_AVX512BITALG): New.
7021 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
7024 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
7025 insn for floating-point loads and stores.
7027 2018-03-14 Carl Love <cel@us.ibm.com>
7029 * config/rs6000/rs6000-c.c: Add macro definitions for
7030 ALTIVEC_BUILTIN_VEC_PERMXOR.
7031 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
7032 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
7033 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
7034 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
7036 * config/doc/extend.texi: Add prototypes for vec_permxor.
7038 2018-03-14 David Malcolm <dmalcolm@redhat.com>
7041 * diagnostic-show-locus.c (class layout_point): Convert m_line
7042 from int to linenum_type.
7043 (line_span::comparator): Use linenum "compare" function when
7044 comparing line numbers.
7045 (test_line_span): New function.
7046 (layout_range::contains_point): Convert param "row" from int to
7048 (layout_range::intersects_line_p): Likewise.
7049 (layout::will_show_line_p): Likewise.
7050 (layout::print_source_line): Likewise.
7051 (layout::should_print_annotation_line_p): Likewise.
7052 (layout::print_annotation_line): Likewise.
7053 (layout::print_leading_fixits): Likewise.
7054 (layout::annotation_line_showed_range_p): Likewise.
7055 (struct line_corrections): Likewise for field m_row.
7056 (line_corrections::line_corrections): Likewise for param "row".
7057 (layout::print_trailing_fixits): Likewise.
7058 (layout::get_state_at_point): Likewise.
7059 (layout::get_x_bound_for_row): Likewise.
7060 (layout::print_line): Likewise.
7061 (diagnostic_show_locus): Likewise for locals "last_line" and
7063 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
7064 * input.c (selftest::test_linenum_comparisons): New function.
7065 (selftest::input_c_tests): Call it.
7066 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
7067 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
7068 * selftest.h (ASSERT_GT): New macro.
7069 (ASSERT_GT_AT): New macro.
7070 (ASSERT_LT): New macro.
7071 (ASSERT_LT_AT): New macro.
7073 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
7075 PR rtl-optimization/84780
7076 * combine.c (distribute_links): Don't make a link based on pc_rtx.
7078 2018-03-14 Martin Liska <mliska@suse.cz>
7080 * tree.c (record_node_allocation_statistics): Use
7081 get_stats_node_kind.
7082 (get_stats_node_kind): New function extracted from
7083 record_node_allocation_statistics.
7084 (free_node): Use get_stats_node_kind.
7086 2018-03-14 Richard Biener <rguenther@suse.de>
7088 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
7089 that the value-set of ANTIC_IN doesn't grow.
7092 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7094 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7095 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7097 2018-03-14 Julia Koval <julia.koval@intel.com>
7099 * config.gcc (icelake-client, icelake-server): New.
7101 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
7102 (initial_ix86_arch_features): Ditto.
7103 (PTA_SKYLAKE): Add SGX.
7104 (PTA_ICELAKE): Remove.
7105 (PTA_ICELAKE_CLIENT): New.
7106 (PTA_ICELAKE_SERVER): New.
7107 (ix86_option_override_internal): Split up icelake on icelake client and
7109 (get_builtin_code_for_version): Ditto.
7110 (fold_builtin_cpu): Ditto.
7111 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
7112 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
7113 * config/i386/i386.h (processor_type): Ditto.
7114 * doc/invoke.texi: Ditto.
7116 2018-03-14 Jakub Jelinek <jakub@redhat.com>
7119 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
7120 INTEGER_CST offset, add it together with bitpos / 8 and
7121 sign extend based on POINTER_SIZE.
7125 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
7128 * config/i386/constraints.md (Yc): New register constraint.
7129 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
7130 Use Yc constraint for alternative 2 of operand 0. Remove
7131 preferred_for_speed attribute.
7133 2018-03-14 Richard Biener <rguenther@suse.de>
7135 PR tree-optimization/84830
7136 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
7137 with the old one to avoid oscillations.
7139 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
7142 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
7144 (assign_by_spills): Return a flag of reload assignment failure.
7145 Do not process the reload assignment failures. Do not spill other
7146 reload pseudos if they has the same reg class. Update n if
7148 (lra_assign): Add a return arg. Set up from the result of
7149 assign_by_spills call.
7150 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7151 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7152 usage_insns if it is not NULL.
7153 (spill_hard_reg_in_range): New function.
7154 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7155 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7156 function prototypes.
7157 (lra_assign): Change prototype.
7158 * lra.c (lra): Add code to deal with fails by splitting hard reg
7161 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
7163 * config/riscv/riscv.opt (mrelax): New option.
7164 * config/riscv/riscv.c (riscv_file_start): Emit ".option
7165 "norelax" when riscv_mrelax is disabled.
7166 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
7168 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7171 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
7172 reassociation for int modes.
7174 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7176 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
7177 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
7179 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
7180 * config/aarch64/aarch64-sve.md
7181 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
7182 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
7183 (*extend<mode><Vwide>2): Rename to...
7184 (aarch64_sve_extend<mode><Vwide>2): ...this.
7185 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
7186 renaming the old pattern to...
7187 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
7189 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
7190 define_expand, renaming the old pattern to...
7191 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
7192 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
7193 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
7194 account when deciding which SVE instruction the optab should use.
7195 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
7197 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7199 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
7200 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
7201 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
7202 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
7203 (tlsdesc_small_<mode>): Turn a define_expand and use
7204 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
7205 (tlsdesc_small_advsimd_<mode>): ...this.
7206 (tlsdesc_small_sve_<mode>): New pattern.
7208 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7210 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
7211 (UNSPEC_UMUL_HIGHPART): New constants.
7212 (MUL_HIGHPART): New int iteraor.
7213 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
7214 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
7216 (*<su>mul<mode>3_highpart): New define_insn.
7218 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7221 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7224 2018-03-13 Martin Liska <mliska@suse.cz>
7227 * (sem_item_optimizer::sem_item_optimizer): Initialize new
7229 (sem_item_optimizer::~sem_item_optimizer): Release it.
7230 (sem_item_optimizer::merge_classes): Register variable aliases.
7231 (sem_item_optimizer::fixup_pt_set): New function.
7232 (sem_item_optimizer::fixup_points_to_sets): Likewise.
7233 * ipa-icf.h: Declare new variables and functions.
7235 2018-03-13 Jakub Jelinek <jakub@redhat.com>
7238 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
7239 integer_pow2p@2 and test integer_pow2p in condition.
7240 (A < 0 ? C : 0): Similarly for @1.
7243 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
7244 characters starting at p contain '\0' character, don't look beyond
7248 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
7249 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
7252 * reg-stack.c (change_stack): Change update_end var from int to
7253 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
7254 also call set_block_for_insn on the newly added insns and rescan.
7257 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
7258 on the last operand.
7261 * tree.c (stabilize_reference_1): Return save_expr (e) for
7262 STATEMENT_LIST even if it doesn't have side-effects.
7264 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
7266 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
7268 2018-03-12 Renlin Li <renlin.li@arm.com>
7270 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
7271 aarch64_output_scalar_simd_mov_immediate.
7273 2018-03-12 Martin Sebor <msebor@redhat.com>
7275 PR tree-optimization/83456
7276 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
7277 for perfectly overlapping calls to memcpy.
7278 (gimple_fold_builtin_memory_chk): Same.
7279 (gimple_fold_builtin_strcpy): Handle no-warning.
7280 (gimple_fold_builtin_stxcpy_chk): Same.
7281 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
7283 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7285 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
7286 parameter. Use it for SFmode.
7287 (rs6000_function_arg_advance_1): Adjust.
7288 (rs6000_function_arg): Adjust.
7289 (rs6000_gimplify_va_arg): Pass false for that new parameter.
7291 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7293 PR rtl-optimization/84169
7294 PR rtl-optimization/84780
7295 * combine.c (can_combine_p): Check for a 2-insn combination whether
7296 the destination register is used between the two insns, too.
7298 2018-03-12 Richard Biener <rguenther@suse.de>
7300 PR tree-optimization/84803
7301 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
7302 for refs DR analysis didn't process.
7304 2018-03-12 Richard Biener <rguenther@suse.de>
7306 PR tree-optimization/84777
7307 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
7308 force-vectorize loops ignore whether we are optimizing for size.
7310 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
7312 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
7313 (TARGET_MD_ASM_ADJUST): Define.
7315 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
7316 Kito Cheng <kito.cheng@gmail.com>
7317 Chung-Ju Wu <jasonwucj@gmail.com>
7319 * config/nds32/nds32.c (nds32_compute_stack_frame,
7320 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
7321 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
7322 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
7323 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
7324 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
7325 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
7326 * config/nds32/nds32.md (prologue, epilogue): Use macro
7327 NDS32_V3PUSH_AVAILABLE_P to do checking.
7329 2018-03-11 Jakub Jelinek <jakub@redhat.com>
7332 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
7333 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
7334 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
7335 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
7336 addition of most attributes on !orig_type_die or the attribute not
7337 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
7339 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7340 Chung-Ju Wu <jasonwucj@gmail.com>
7342 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
7344 * config/nds32/nds32.opt (mvh): New option.
7346 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7347 Chung-Ju Wu <jasonwucj@gmail.com>
7349 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
7351 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
7352 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
7355 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7356 Chung-Ju Wu <jasonwucj@gmail.com>
7358 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
7360 * config/nds32/nds32-multiple.md (strlensi): New pattern.
7361 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
7363 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
7364 Kito Cheng <kito.cheng@gmail.com>
7365 Chung-Ju Wu <jasonwucj@gmail.com>
7367 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
7368 UNSPEC_FFMISM and UNSPEC_FLMISM.
7369 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
7370 for ffb, ffmism and flmism.
7371 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
7372 (unspec_ffmism): Ditto.
7373 (unspec_flmism): Ditto.
7374 (nds32_expand_builtin_impl): Check if string extension is available.
7375 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
7376 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
7378 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
7381 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7384 * lra-assigns.c (assign_by_spills): Return a flag of reload
7385 assignment failure. Do not process the reload assignment
7386 failures. Do not spill other reload pseudos if they has the same
7388 (lra_assign): Add a return arg. Set up from the result of
7389 assign_by_spills call.
7390 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7391 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7392 usage_insns if it is not NULL.
7393 (spill_hard_reg_in_range): New function.
7394 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7395 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7396 function prototypes.
7397 (lra_assign): Change prototype.
7398 * lra.c (lra): Add code to deal with fails by splitting hard reg
7401 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
7404 * config/i386/i386.opt: Replace Enforcment with Enforcement.
7406 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
7409 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
7410 (dw_val_node): Add val_symbolic_view.
7411 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
7412 (symview_upper_bound): New.
7413 (new_line_info_table): Initialize symviews_since_reset.
7414 (dwarf2out_source_line): Count symviews_since_reset and set
7415 symview_upper_bound.
7416 (dw_val_equal_p): Handle symview.
7417 (add_AT_symview): New.
7418 (print_dw_val): Handle symview.
7419 (attr_checksum, attr_checksum_ordered): Likewise.
7420 (same_dw_val_p, size_of_die): Likewise.
7421 (value_format, output_die): Likewise.
7422 (add_high_low_attributes): Use add_AT_symview for entry_view.
7423 (dwarf2out_finish): Reset symview_upper_bound, clear
7426 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
7429 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
7430 Add strict argument and use it.
7431 (rs6000_split_multireg_move): Update for new strict argument.
7432 (mem_operand_gpr): Disallow all non-offsettable addresses.
7433 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
7435 2018-03-09 Jakub Jelinek <jakub@redhat.com>
7438 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
7439 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
7440 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
7443 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
7444 decl, use remap_type if we want to use the type.
7446 2018-03-09 Martin Sebor <msebor@redhat.com>
7448 PR tree-optimization/84526
7449 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7451 (builtin_access::generic_overlap): Be prepared to handle non-array
7454 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
7456 PR rtl-optimization/84682
7457 * lra-constraints.c (process_address_1): Check is_address flag
7458 for address constraints.
7459 (process_alt_operands): Likewise.
7460 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
7461 preprocess_constraints.
7462 * recog.h (preprocess_constraints): Add oploc parameter.
7464 * recog.c (preprocess_constraints): Test address_operand for
7465 CT_ADDRESS constraints.
7467 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7470 * lra-assigns.c (assign_by_spills): Return a flag of reload
7471 assignment failure. Do not process the reload assignment
7472 failures. Do not spill other reload pseudos if they has the same
7474 (lra_assign): Add a return arg. Set up from the result of
7475 assign_by_spills call.
7476 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7477 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7478 usage_insns if it is not NULL.
7479 (spill_hard_reg_in_range): New function.
7480 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7481 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7482 function prototypes.
7483 (lra_assign): Change prototype.
7484 * lra.c (lra): Add code to deal with fails by splitting hard reg
7487 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7490 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
7491 Accept complain bool parameter. Only emit errors if it is true.
7492 (arm_parse_cpu_option_name): Likewise.
7493 (arm_target_thumb_only): Adjust callers of the above.
7494 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
7495 prototype to take a default true bool parameter.
7496 (arm_parse_arch_option_name): Likewise.
7498 2018-03-09 David Malcolm <dmalcolm@redhat.com>
7499 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7503 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
7504 * configure: Regenerate.
7505 * configure.ac ("linker --version-script option"): New.
7506 ("linker soname option"): New.
7508 2018-03-09 Richard Biener <rguenther@suse.de>
7510 PR tree-optimization/84775
7511 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
7512 immediate uses of predicate stmts and mark them modified.
7515 PR tree-optimization/84178
7516 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7518 (version_loop_for_if_conversion): Delay update_ssa call.
7519 (tree_if_conversion): Delay update_ssa until after predicate
7522 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
7525 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
7526 when the function accesses prior frames.
7528 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7531 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
7532 gen_llsym, otherwise call maybe_gen_llsym.
7535 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
7536 has ',' character inside of it.
7538 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7541 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
7542 as clobbering CC_REGNUM.
7544 2018-03-08 Richard Biener <rguenther@suse.de>
7547 * tree-scalar-evolution.c: Include tree-into-ssa.h.
7548 (follow_copies_to_constant): Do not follow SSA names registered
7551 2018-03-08 Richard Biener <rguenther@suse.de>
7553 PR tree-optimization/84178
7554 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7556 (version_loop_for_if_conversion): Delay update_ssa call.
7557 (tree_if_conversion): Delay update_ssa until after predicate
7560 2018-03-08 David Malcolm <dmalcolm@redhat.com>
7562 PR tree-optimization/84178
7563 * tree-if-conv.c (release_bb_predicate): Remove the
7564 the assertion that the stmts have NULL use_ops.
7565 Discard the statements, asserting that they haven't
7566 yet been added to a BB.
7568 2018-03-08 Richard Biener <rguenther@suse.de>
7570 PR tree-optimization/84746
7571 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7572 (phi_translate): Pass in destination ANTIC_OUT set.
7573 (phi_translate_1): Likewise. For a simplified result lookup
7574 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7575 (phi_translate_set): Adjust.
7576 (do_pre_regular_insertion): Likewise.
7577 (do_pre_partial_partial_insertion): Likewise.
7579 2018-03-08 Martin Liska <mliska@suse.cz>
7581 PR gcov-profile/84735
7582 * doc/gcov.texi: Document usage of profile files.
7583 * gcov-io.h: Document changes in the format.
7585 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
7589 * dwarf2out.c (struct dw_line_info_table): Update comments for
7591 (FORCE_RESET_NEXT_VIEW): New.
7592 (FORCE_RESETTING_VIEW_P): New.
7593 (RESETTING_VIEW_P): Check for -1 too.
7594 (ZERO_VIEW_P): Likewise.
7595 (new_line_info_table): Force-reset next view.
7596 (dwarf2out_begin_function): Likewise.
7597 (dwarf2out_source_line): Simplify zero_view_p initialization.
7598 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7599 view directly. Omit view when omitting .loc at line 0.
7601 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7603 PR tree-optimization/84740
7604 * tree-switch-conversion.c (process_switch): Call build_constructors
7605 only if info.phi_count is non-zero.
7607 PR tree-optimization/84739
7608 * tree-tailcall.c (find_tail_calls): Check call arguments against
7609 DECL_ARGUMENTS (current_function_decl) rather than
7610 DECL_ARGUMENTS (func) when checking for tail recursion.
7612 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7614 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7615 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7616 Volker Reichelt's entry and add entries for people that perform
7617 GCC fuzzy testing and report numerous bugs.
7619 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
7622 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7623 readonly data in sdata, if that is disabled.
7624 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7625 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7626 -mreadonly-in-sdata option.
7628 2018-03-07 Martin Sebor <msebor@redhat.com>
7630 PR tree-optimization/84468
7631 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7632 basic block when looking for nul assignment.
7634 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
7637 * except.h (output_function_exception_table): Adjust prototype.
7638 * except.c (output_function_exception_table): Remove FNNAME parameter
7639 and add SECTION parameter. Ouput one part of the table at a time.
7640 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7641 the first part of the exception table and emit unwind directives.
7642 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7643 (i386_pe_seh_cold_init): Likewise.
7644 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7645 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7646 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7647 (ix86_output_call_insn): Emit a nop in one more case for SEH.
7648 * config/i386/winnt.c: Include except.h.
7649 (struct seh_frame_state): Add reg_offset, after_prologue and
7650 in_cold_section fields.
7651 (i386_pe_seh_end_prologue): Set seh->after_prologue.
7652 (i386_pe_seh_cold_init): New function.
7653 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7654 to seh->in_cold_section.
7655 (seh_emit_push): Record the offset of the push.
7656 (seh_emit_save): Record the offet of the save.
7657 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7658 Test seh->after_prologue to disregard the epilogue.
7659 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7660 (i386_pe_end_cold_function): New function.
7662 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7665 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7666 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7669 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7671 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7672 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7675 * multiple_target.c: Include tree-inline.h and intl.h.
7676 (expand_target_clones): Diagnose and fail if node->definition and
7677 !tree_versionable_function_p (node->decl).
7679 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
7681 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7683 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7684 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7685 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7687 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7690 * combine.c (try_combine): Use reg_or_subregno instead of handling
7691 just paradoxical SUBREGs and REGs.
7693 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
7695 * config/arc/arc.c (arc_finalize_pic): Remove function.
7696 (arc_must_save_register): We use single base PIC register, remove
7697 checks to save/restore the PIC register.
7698 (arc_expand_prologue): Likewise.
7699 * config/arc/arc-protos.h (arc_set_default_type_attributes):
7701 (arc_verify_short): Likewise.
7702 (arc_attr_type): Likewise.
7703 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7704 (walk_stores): Likewise.
7705 (arc_address_cost): Make it static.
7706 (arc_verify_short): Likewise.
7707 (branch_dest): Likewise.
7708 (arc_attr_type): Likewise.
7709 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7710 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7711 (arc_final_prescan_insn): Remove inserting the nops due to
7712 hardware hazards. It is done in reorg step.
7713 (insn_length_variant_t): Remove.
7714 (insn_length_parameters_t): Likewise.
7715 (arc_insn_length_parameters): Likewise.
7716 (arc_get_insn_variants): Likewise.
7717 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7719 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7722 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7725 PR tree-optimization/84687
7726 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
7728 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
7730 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7732 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
7733 Rename to ppc_speculation_barrier.
7734 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
7735 __builtin_ppc_speculation_barrier.
7737 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7740 * combine.c (combine_simplify_rtx): Don't try to simplify if
7741 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
7744 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
7746 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
7747 to 32 bytes when compiling for POWER9.
7749 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7752 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
7753 regparm >= 3 with no arg reg available also for calls with
7754 flag_force_indirect_call. Pass decl to ix86_function_regparm.
7757 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
7759 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
7761 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
7764 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
7766 2018-03-05 Richard Biener <rguenther@suse.de>
7768 PR tree-optimization/84486
7769 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
7770 When inserting a __builtin_assume_aligned call set the LHS
7771 SSA name alignment info accordingly.
7773 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
7775 PR tree-optimization/84114
7776 * config/aarch64/aarch64.c (aarch64_reassociation_width)
7777 Avoid reassociation of FLOAT_MODE addition.
7779 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
7781 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
7782 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
7783 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
7784 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
7785 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
7786 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
7787 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
7789 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
7790 __builtin_ia32_wbinvd): New builtins.
7791 (SPECIAL_ARGS2): New.
7792 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
7793 (SPECIAL_ARGS2): New.
7794 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
7795 (ix86_valid_target_attribute_inner_p): Ditto.
7796 (ix86_init_mmx_sse_builtins): Add special_args2.
7797 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
7798 TARGET_WBNOINVD_P): New.
7799 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
7800 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
7801 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
7802 * config/i386/immintrin.h (_wbinvd): New intrinsic.
7803 * config/i386/pconfigintrin.h: New file.
7804 * config/i386/wbnoinvdintrin.h: Ditto.
7805 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
7806 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
7808 2018-03-05 Richard Biener <rguenther@suse.de>
7810 PR tree-optimization/84670
7811 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7813 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7814 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7815 (compute_antic_aux): Only assert the number of values in ANTIC_IN
7816 doesn't grow if all successors (recursively) were visited at least
7819 2018-03-05 Richard Biener <rguenther@suse.de>
7821 PR tree-optimization/84650
7822 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
7823 if executed in the loop pipeline.
7825 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
7827 * doc/configfiles.texi (Configuration Files): Move info about
7828 conditionalizing $target-protos.h to...
7829 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
7830 differs from $target-protos.h.
7832 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
7833 Chung-Ju Wu <jasonwucj@gmail.com>
7835 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
7836 * config/nds32/nds32-multiple.md (setmemsi): Define.
7837 * config/nds32/nds32-memory-manipulation.c
7838 (nds32_gen_dup_4_byte_to_word_value): New.
7839 (emit_setmem_word_loop): New.
7840 (emit_setmem_byte_loop): New.
7841 (nds32_expand_setmem_loop): New.
7842 (nds32_expand_setmem_loop_v3m): New.
7843 (nds32_expand_setmem_unroll): New.
7844 (nds32_expand_setmem): New.
7846 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7847 Chung-Ju Wu <jasonwucj@gmail.com>
7849 * config/nds32/nds32-memory-manipulation.c
7850 (nds32_emit_load_store): New.
7851 (nds32_emit_post_inc_load_store): New.
7852 (nds32_emit_mem_move): New.
7853 (nds32_emit_mem_move_block): New.
7854 (nds32_expand_movmemsi_loop_unknown_size): New.
7855 (nds32_expand_movmemsi_loop_known_size): New.
7856 (nds32_expand_movmemsi_loop): New.
7857 (nds32_expand_movmemsi_unroll): New.
7858 (nds32_expand_movmemqi): Rename ...
7859 (nds32_expand_movmemsi): ... to this.
7860 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
7861 (movmemsi): ... to this.
7862 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
7863 (nds32_expand_movmemsi): ... to this.
7865 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7866 Monk Chiang <sh.chiang04@gmail.com>
7867 Chung-Ju Wu <jasonwucj@gmail.com>
7869 * config/nds32/nds32-protos.h
7870 (nds32_expand_load_multiple): New arguments.
7871 (nds32_expand_store_multiple): Ditto.
7872 (nds32_valid_multiple_load_store): Rename ...
7873 (nds32_valid_multiple_load_store_p): ... to this.
7874 * config/nds32/nds32-memory-manipulation.c
7875 (nds32_expand_load_multiple): Refine implementation.
7876 (nds32_expand_store_multiple): Ditto.
7877 * config/nds32/nds32-multiple.md
7878 (load_multiple): Update nds32_expand_load_multiple interface.
7879 (store_multiple): Update nds32_expand_store_multiple interface.
7880 * config/nds32/nds32-predicates.c
7881 (nds32_valid_multiple_load_store): Rename ...
7882 (nds32_valid_multiple_load_store_p): ... to this and refine
7884 * config/nds32/predicates.md
7885 (nds32_load_multiple_and_update_address_operation): New predicate.
7886 (nds32_store_multiple_and_update_address_operation): New predicate.
7888 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7889 Chung-Ju Wu <jasonwucj@gmail.com>
7891 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
7892 (combo): New attribute.
7893 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
7895 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
7897 * config/nds32/nds32.opt: Change -mcmodel= default value.
7899 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
7900 Monk Chiang <sh.chiang04@gmail.com>
7901 Chung-Ju Wu <jasonwucj@gmail.com>
7903 * config/nds32/constants.md (unspec_element): New enum.
7904 * config/nds32/constraints.md (Umw): New constraint.
7905 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
7906 * config/nds32/nds32-intrinsic.md: Likewise.
7907 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
7908 (nds32_valid_smw_lwm_base_p): New.
7909 (nds32_output_smw_single_word): New.
7910 (nds32_output_lmw_single_word): New.
7911 (nds32_expand_unaligned_load): New.
7912 (nds32_expand_unaligned_store): New.
7913 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
7914 (nds32_output_smw_single_word): Declare.
7915 (nds32_output_lmw_single_word): Declare.
7916 (nds32_expand_unaligned_load): Declare.
7917 (nds32_expand_unaligned_store): Declare.
7918 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
7919 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
7920 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
7921 NDS32_BUILTIN_UASTORE_DW.
7922 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
7925 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
7926 Kito Cheng <kito.cheng@gmail.com>
7927 Chung-Ju Wu <jasonwucj@gmail.com>
7929 * config/nds32/nds32-intrinsic.c
7930 (nds32_expand_builtin_null_ftype_reg): Delete.
7931 (nds32_expand_builtin_reg_ftype_imm): Ditto.
7932 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
7933 (nds32_read_argument): New.
7934 (nds32_legitimize_target): Ditto.
7935 (nds32_legitimize_argument): Ditto.
7936 (nds32_check_constant_argument): Ditto.
7937 (nds32_expand_unop_builtin): Ditto.
7938 (nds32_expand_unopimm_builtin): Ditto.
7939 (nds32_expand_binop_builtin): Ditto.
7940 (nds32_builtin_decl_impl): Ditto.
7941 (builtin_description): Ditto.
7942 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
7943 (nds32_init_builtins_impl): Ditto.
7944 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
7945 (nds32_builtin_decl): New.
7946 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
7947 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
7949 2018-03-02 Jeff Law <law@redhat.com>
7951 * reorg.c (stop_search_p): Handle DEBUG_INSN.
7952 (redundant_insn, fill_simple_delay_slots): Likewise.
7953 (fill_slots_from_thread): Likewise.
7954 * resource.c (mark_referenced_resources): Likewise.
7955 (mark_set_resources, find_dead_or_set_registers): Likewise.
7957 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7959 * substring-locations.h (format_warning_va): Formatting fix for
7961 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
7963 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
7964 * substring-locations.c: Include intl.h.
7965 (format_warning_va): Turned into small wrapper around
7966 format_warning_n_va, renamed to ...
7967 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
7968 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
7970 (format_warning_at_substring_n): New function.
7971 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
7972 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
7973 format_warning_at_substring with just a shorter name instead of
7974 const function pointer.
7975 (fmtwarn_n): New function.
7976 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
7977 appropriate, get rid of all the fmtstr temporaries, move conditionals
7978 with G_() wrapped string literals directly into fmtwarn arguments,
7979 cast dir.len to (int), formatting fixes.
7981 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
7983 * doc/invoke.texi: Remove "Cilk Plus" references.
7985 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7986 Richard Biener <rguenther@suse.de>
7989 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
7990 for error or warning attributes if CALL_FROM_THUNK_P is set.
7993 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7996 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
7997 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
8000 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
8001 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
8003 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
8004 instead of -1U in last predictors element's probability member.
8006 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8009 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8010 arguments if they are comparable.
8012 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8014 PR tree-optimization/84634
8015 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
8016 masks and masked_loop_p with a single loop_masks, making sure it's
8017 null for bb vectorization.
8019 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8021 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8022 (vect_analyze_data_ref_access): Use loop->safe_len rather than
8023 loop->force_vectorize to check whether there is no alias.
8025 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8028 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
8030 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
8032 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
8033 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
8034 instead of a loop around prev_real_insn.
8035 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
8039 * config/i386/i386.c (ix86_print_operand): Use conditional
8040 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
8043 2018-03-02 Richard Biener <rguenther@suse.de>
8045 PR tree-optimization/84427
8046 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
8047 (bitmap_set_subtract_values): Rewrite to handle multiple
8050 (prune_clobbered_mems): Likewise.
8051 (phi_translate): Take edge instead of pred/phiblock.
8052 (phi_translate_1): Likewise.
8053 (phi_translate_set): Likewise. Insert all translated
8054 exprs for a value into the set, keeping possibly multiple
8055 expressions per value.
8056 (compute_antic_aux): Adjust for phi_translate changes.
8057 When intersecting union the expressions and prune those
8058 not in the final value set, keeping possibly multiple
8059 expressions per value. Do not use value-insertion
8060 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
8061 all expressions. Add verification that the value-sets
8062 only shrink during iteration.
8063 (compute_partial_antic_aux): Adjust for the phi_translate changes.
8064 (do_pre_regular_insertion): Likewise.
8065 (do_pre_partial_partial_insertion): Likewise.
8067 2018-03-02 Richard Biener <rguenther@suse.de>
8070 * config/darwin.c (saved_debug_info_level): New static global.
8071 (darwin_asm_lto_start): Disable debug info generation for LTO out.
8072 (darwin_asm_lto_end): Restore debug info generation settings.
8074 2018-03-01 Martin Liska <mliska@suse.cz>
8077 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8080 2018-03-01 Richard Biener <rguenther@suse.de>
8083 * dwarf2out.c (gen_variable_die): Properly handle late VLA
8084 type annotation with LTO when debug was disabled at compile-time.
8086 2018-03-01 Matthew Fortune <mfortune@gmail.com>
8088 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
8090 (mips_final_postscan_insn): Likewise.
8092 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
8094 PR rtl-optimization/84528
8095 * alias.c (init_alias_target): Add commentary.
8096 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
8097 a unique base value if the frame pointer is not eliminated
8098 to the stack pointer.
8100 2018-03-01 Tom de Vries <tom@codesourcery.com>
8102 PR rtl-optimization/83327
8103 * lra-int.h (hard_regs_spilled_into): Declare.
8104 * lra.c (hard_regs_spilled_into): Define.
8105 (init_reg_info): Init hard_regs_spilled_into.
8106 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
8107 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
8108 (process_bb_lives): Handle hard_regs_spilled_into.
8109 (lra_create_live_ranges_1): Before doing liveness propagation, clear
8110 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
8112 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
8114 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
8115 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
8116 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
8117 * config/rs6000/aix72.h: New file.
8119 2018-02-28 Jakub Jelinek <jakub@redhat.com>
8121 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
8122 instead of warning_at with conditional singular and plural messages
8126 * stor-layout.c (update_alignment_for_field): For
8127 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
8128 && !DECL_PACKED (field), do the alignment update, just use
8129 only desired_align instead of MAX (type_align, desired_align)
8131 (place_field): Don't do known_align < desired_align handling
8132 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
8133 is non-NULL, instead do it after rli->prev_field handling and
8134 only if not within a bitfield word. For DECL_PACKED (field)
8135 use type_align of BITS_PER_UNIT.
8137 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
8139 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
8140 superfluous parentheses and trailing spaces.
8142 2018-02-28 Richard Biener <rguenther@suse.de>
8144 PR tree-optimization/84584
8145 * graphite-scop-detection.c (scop_detection::add_scop): Discard
8146 SCoPs with fake exit edge.
8148 2018-02-28 Martin Liska <mliska@suse.cz>
8151 * timevar.c (timer::print): Fix format to properly print 100%
8154 2018-02-28 Richard Biener <rguenther@suse.de>
8157 * genmatch.c (capture_info::walk_match): Do not mark
8158 captured expressions without operands as expr_p given
8159 they act more like predicates and should be subject to
8160 "lost tail" side-effect preserving.
8162 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
8164 PR rtl-optimization/81611
8165 * auto-inc-dec.c (attempt_change): Move dead note from
8166 mem_insn if it's the next use of regno
8167 (find_address): Take address use of reg holding
8168 non-incremented value. Add parm to limit search to the named
8170 (merge_in_block): Attempt to use a mem insn that is the next
8171 use of the original regno.
8173 2018-02-27 Martin Sebor <msebor@redhat.com>
8176 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
8177 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
8179 2018-02-27 Martin Sebor <msebor@redhat.com>
8181 PR translation/84207
8182 * diagnostic-core.h (warning_n, error_n, inform_n): Change
8183 n argument to unsigned HOST_WIDE_INT.
8184 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
8185 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
8186 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
8187 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
8189 2018-02-27 Richard Biener <rguenther@suse.de>
8191 PR tree-optimization/84512
8192 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8193 Do not use the estimate returned from record_stmt_cost for
8194 the scalar iteration cost but sum properly using add_stmt_cost.
8196 2018-02-27 Richard Biener <rguenther@suse.de>
8198 PR tree-optimization/84466
8199 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8200 Adjust last change to less strictly validate use operands.
8202 2018-02-27 Martin Liska <mliska@suse.cz>
8204 PR gcov-profile/84548
8205 * gcov.c (process_file): Allow partial overlap and consider it
8206 also as group functions.
8207 (output_lines): Properly calculate range of lines for a group.
8209 2018-02-27 Martin Liska <mliska@suse.cz>
8211 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
8212 'ggc' suffixes. Change first column width.
8213 (timer::print): Fix formatting of the column.
8215 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
8217 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
8218 preserve inline entry blocks for the sake of debug inline
8219 entry point markers alone.
8220 (remove_unused_locals): Suggest in comments a better place to
8221 force the preservation of inline entry blocks that are
8222 otherwise unused, but do not preserve them.
8224 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8226 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
8228 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8231 * config/i386/constraints.md (Bs): Replace
8232 ix86_indirect_branch_register with
8233 TARGET_INDIRECT_BRANCH_REGISTER.
8235 * config/i386/i386.md (indirect_jump): Likewise.
8236 (tablejump): Likewise.
8237 (*sibcall_memory): Likewise.
8238 (*sibcall_value_memory): Likewise.
8239 Peepholes of indirect call and jump via memory: Likewise.
8240 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
8241 (*sibcall_value_GOT_32): Likewise.
8242 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8243 (GOT_memory_operand): Likewise.
8244 (call_insn_operand): Likewise.
8245 (sibcall_insn_operand): Likewise.
8246 (GOT32_symbol_operand): Likewise.
8247 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
8249 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8251 PR rtl-optimization/83496
8252 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
8253 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
8254 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
8255 redundant insn, if any.
8256 (relax_delay_slots): Likewise.
8257 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
8259 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
8261 PR tree-optimization/83965
8262 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
8263 that grouped statements are part of a reduction chain. Return
8264 true if the statement is not marked as a reduction itself but
8266 (vect_recog_dot_prod_pattern): Don't check whether the statement
8267 is part of a group here.
8268 (vect_recog_sad_pattern): Likewise.
8269 (vect_recog_widen_sum_pattern): Likewise.
8271 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8274 * final.c (rest_of_clean_state): Also look for calls inside sequences.
8276 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8279 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
8281 (ix86_output_indirect_function_return): New prototype.
8282 (ix86_split_simple_return_pop_internal): Likewise.
8283 * config/i386/i386.c (indirect_return_via_cx): New.
8284 (indirect_return_via_cx_bnd): Likewise.
8285 (indirect_thunk_name): Handle return va CX_REG.
8286 (output_indirect_thunk_function): Create alias for
8287 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
8288 (ix86_output_indirect_jmp): Remove the bool argument.
8289 (ix86_output_indirect_function_return): New function.
8290 (ix86_split_simple_return_pop_internal): Likewise.
8291 * config/i386/i386.md (*indirect_jump): Don't pass false
8292 to ix86_output_indirect_jmp.
8293 (*tablejump_1): Likewise.
8294 (simple_return_pop_internal): Change it to define_insn_and_split.
8295 Call ix86_split_simple_return_pop_internal to split it for
8297 (simple_return_indirect_internal): Call
8298 ix86_output_indirect_function_return instead of
8299 ix86_output_indirect_jmp.
8301 2018-02-26 Jakub Jelinek <jakub@redhat.com>
8304 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
8305 memset and value initialization afterwards.
8307 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
8309 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
8311 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8314 * common/config/aarch64/aarch64-common.c
8315 (aarch_option_optimization_table[]): Switch
8316 off fomit-frame-pointer
8318 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8319 Chung-Ju Wu <jasonwucj@gmail.com>
8321 * config/nds32/nds32-multiple.md (load_multiple): Disallow
8323 (store_multiple): Ditto.
8325 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8327 * config.gcc: Add --with-cpu support for nds32 target.
8328 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
8329 * config/nds32/nds32.opt: Add -mcpu= option.
8331 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
8333 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
8334 isel=yes): Warn for these deprecated options.
8336 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
8338 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
8339 ISA_2_5_MASKS_EMBEDDED.
8341 2018-02-23 Jakub Jelinek <jakub@redhat.com>
8343 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
8344 p->max as pointers rather than using iterative_hash_expr.
8346 2018-02-23 Carl Love <cel@us.ibm.com>
8348 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
8349 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
8351 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
8352 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
8353 P8V_BUILTIN_VEC_VUNSIGNED2.
8355 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
8358 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
8359 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
8361 * lra-constraints.c (curr_insn_transform): Set up
8362 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
8364 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
8365 * lra-eliminations.c (spill_pseudos): Ditto.
8366 (process_insn_for_elimination): Ditto.
8367 * lra-lives.c (reg_early_clobber_p): Use the new macros.
8368 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
8369 LRA_NON_CLOBBERED_ALT.
8371 2018-02-22 Martin Sebor <msebor@redhat.com>
8373 PR tree-optimization/84480
8374 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
8375 to maybe_diag_stxncpy_trunc. Call it.
8376 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
8377 from gimple_fold_builtin_strcpy. Print inlining stack.
8378 (handle_builtin_stxncpy): Print inlining stack.
8379 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
8381 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
8384 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
8385 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
8386 and -fcheck-pointer-bounds are used together.
8387 (indirect_thunk_prefix): New enum.
8388 (indirect_thunk_need_prefix): New function.
8389 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
8390 "_nt" instead of "_bnd" for NOTRACK prefix.
8391 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
8392 (output_indirect_thunk_function): Likewise.
8394 (ix86_code_end): Update output_indirect_thunk_function calls.
8395 (ix86_output_indirect_branch_via_reg): Replace
8396 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
8397 (ix86_output_indirect_branch_via_push): Likewise.
8398 (ix86_output_function_return): Likewise.
8399 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
8400 incompatible with -fcf-protection=branch and
8401 -fcheck-pointer-bounds.
8403 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8406 * config/aarch64/aarch64.c (aarch64_print_address_internal):
8407 Change gcc_assert call to output_operand_lossage.
8409 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8411 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
8413 2018-02-22 DJ Delorie <dj@redhat.com>
8414 Sebastian Perta <sebastian.perta@renesas.com>
8415 Oleg Endo <olegendo@gcc.gnu.org>
8417 * config/rx/rx.c (rx_rtx_costs): New function.
8418 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
8420 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
8422 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
8424 2018-02-22 Martin Liska <mliska@suse.cz>
8427 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
8428 Add "native" as a possible value.
8430 2018-02-22 Martin Liska <mliska@suse.cz>
8433 * config/i386/i386.c (ix86_option_override_internal):
8434 Add "native" as a possible value for -march and -mtune.
8436 2018-02-22 Jakub Jelinek <jakub@redhat.com>
8439 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
8440 to all type variants.
8442 PR tree-optimization/84503
8443 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
8444 width as info->bitpos + info->bitsize - start.
8445 (merged_store_group::merge_overlapping): Simplify width computation.
8446 (check_no_overlap): New function.
8447 (imm_store_chain_info::try_coalesce_bswap): Compute expected
8448 start + width and last_order of the group, fail if check_no_overlap
8450 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
8451 to group if check_no_overlap fails.
8453 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8455 * config/rs6000/altivec.md: Delete contraint arguments to
8456 define_expand, define_split, and define_peephole2, and in
8457 define_insn_and_split if always unused.
8458 * config/rs6000/darwin.md: Ditto.
8459 * config/rs6000/dfp.md: Ditto.
8460 * config/rs6000/rs6000.md: Ditto.
8461 * config/rs6000/sync.md: Ditto.
8462 * config/rs6000/vector.md: Ditto.
8463 * config/rs6000/vsx.md: Ditto.
8465 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8467 * config/rs6000/altivec.md: Write output control strings as braced
8468 blocks instead of double-quoted strings.
8469 * config/rs6000/darwin.md: Ditto.
8470 * config/rs6000/rs6000.md: Ditto.
8471 * config/rs6000/vector.md: Ditto.
8472 * config/rs6000/vsx.md: Ditto.
8474 2018-02-21 Jason Merrill <jason@redhat.com>
8476 PR c++/84314 - ICE with templates and fastcall attribute.
8477 * attribs.c (build_type_attribute_qual_variant): Remove assert.
8479 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8481 * ipa-cp.c (determine_versionability): Fix comment typos.
8483 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8486 * ipa-cp.c (determine_versionability): Do not version functions caling
8489 2018-02-21 Martin Liska <mliska@suse.cz>
8492 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
8493 Add "native" as a possible value.
8494 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
8495 the macro when native cpu detection is available.
8497 2018-02-21 Martin Liska <mliska@suse.cz>
8500 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
8501 Add "native" as a possible value.
8502 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
8503 when native cpu detection is available.
8505 2018-02-21 Jakub Jelinek <jakub@redhat.com>
8506 Martin Sebor <msebor@redhat.com>
8508 PR tree-optimization/84478
8509 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
8511 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
8512 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
8513 support which is conservatively correct, for 2 only stay conservative
8514 for maxlen. Formatting and comment capitalization fixes. Add STRICT
8515 argument to the 2 argument get_range_strlen, adjust 6 arg
8516 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
8518 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
8519 (gimple_fold_builtin_strlen): Pass true as last argument to
8522 2018-02-20 Martin Sebor <msebor@redhat.com>
8525 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
8526 (builtin_memref::set_base_and_offset): Same. Handle inner references.
8527 (builtin_memref::builtin_memref): Factor out parts into
8528 set_base_and_offset and call it.
8530 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8533 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
8534 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
8535 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
8536 search at the associated MODE_INT.
8538 2018-02-20 Jeff Law <law@redhat.com>
8541 PR tree-optimization/81592
8543 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8544 for range data rather than using global data.
8545 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8546 range data rather than using global data.
8547 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8548 pass it to children as needed.
8549 (struct directive::fmtresult): Similarly.
8550 (struct directive::set_width): Similarly.
8551 (struct directive::set_precision): Similarly.
8552 (format_integer, format_directive, parse_directive): Similarly.
8553 (format_none): Accept unnamed vr_values parameter.
8554 (format_percent, format_floating, format_character): Similarly.
8555 (format_string, format_plain): Similarly.
8556 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8557 the EVRP range analyzer for range data rather than using global data.
8558 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8559 gimple-ssa-evrp-analyze.h
8560 (class sprintf_dom_walker): Add after_dom_children member function.
8561 Add evrp_range_analyzer member.
8562 (sprintf_dom_walker::before_dom_children): Call into the EVRP
8563 range analyzer as needed.
8564 (sprintf_dom_walker::after_dom_children): New member function.
8565 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8567 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8568 (evrp_range_analyzer::pop_to_marker): Likewise.
8570 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8572 PR tree-optimization/84419
8573 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8574 with the required type if its current type is compatible but
8577 2018-02-20 Jakub Jelinek <jakub@redhat.com>
8580 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8581 after vectorization.
8583 2018-02-20 Martin Liska <mliska@suse.cz>
8586 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8587 possible values if we don't have a hint.
8589 2018-02-20 Martin Liska <mliska@suse.cz>
8593 * final.c (shorten_branches): Build align_tab array with one
8595 * opts.c (finish_options): Add alignment option limit check.
8596 (MAX_CODE_ALIGN): Likewise.
8597 (MAX_CODE_ALIGN_VALUE): Likewise.
8598 * doc/invoke.texi: Document maximum allowed option value for
8599 all -falign-* options.
8601 2018-02-19 Jakub Jelinek <jakub@redhat.com>
8604 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8605 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8606 * var-tracking.c (emit_note_insn_var_location): Remove all references
8607 to NOTE_INSN_CALL_ARG_LOCATION.
8608 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8609 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8610 Use copy_rtx_if_shared.
8611 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8612 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8613 (dwarf2out_var_location): Remove handling of
8614 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8616 * final.c (final_scan_insn): Remove all references to
8617 NOTE_INSN_CALL_ARG_LOCATION.
8618 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
8619 before dumping final insns.
8620 * except.c (emit_note_eh_region_end): Remove all references to
8621 NOTE_INSN_CALL_ARG_LOCATION.
8622 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8623 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8624 * config/arc/arc.c (hwloop_optimize): Likewise.
8625 * config/arm/arm.c (create_fix_barrier): Likewise.
8626 * config/s390/s390.c (s390_chunkify_start): Likewise.
8627 * config/sh/sh.c (find_barrier): Likewise.
8628 * config/i386/i386.c (rest_of_insert_endbranch,
8629 ix86_seh_fixup_eh_fallthru): Likewise.
8630 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8631 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8632 * config/frv/frv.c (frv_function_prologue): Likewise.
8633 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
8635 (note_outside_basic_block_p): Remove all references to
8636 NOTE_INSN_CALL_ARG_LOCATION.
8637 * gengtype.c (adjust_field_rtx_def): Likewise.
8638 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8640 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8641 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8644 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8647 PR tree-optimization/84452
8648 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8649 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8652 2018-02-19 Martin Liska <mliska@suse.cz>
8655 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8657 2018-02-19 Martin Liska <mliska@suse.cz>
8658 Richard Sandiford <richard.sandiford@linaro.org>
8660 PR tree-optimization/82491
8661 * gimple-fold.c (get_base_constructor): Make earlier bail out
8664 2018-02-19 Carl Love <cel@us.ibm.com>
8666 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8667 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8669 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8670 P8V_BUILTIN_VEC_NEG.
8672 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
8674 * config/rl78/rl78.md (movdf): New define expand.
8676 2018-02-19 Martin Liska <mliska@suse.cz>
8679 * doc/invoke.texi: Fix typo.
8680 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8682 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
8684 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8685 handle rs6000_single_float and rs6000_double_float specially for
8688 2018-02-16 Jeff Law <law@redhat.com>
8690 * config/rx/rx.c (add_pop_cfi_notes): New function.;
8693 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8696 * ipa-inline.c (inline_small_functions): Fix a typo.
8698 2018-02-16 Nathan Sidwell <nathan@acm.org>
8700 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8702 2018-02-16 Carl Love <cel@us.ibm.com>
8704 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8705 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8706 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8707 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8708 expansion to P8V_BUILTIN_VEC_FLOAT2.
8710 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
8712 PR rtl-optimization/70023
8713 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8714 src_regno into account.
8716 2018-02-16 Carl Love <cel@us.ibm.com>
8718 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8719 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8720 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8721 * config/rs6000/rs6000.c: Remove case statements for
8722 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8723 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8724 and P9V_BUILTIN_VEC_VINSERT4B.
8725 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
8726 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
8727 * config/rs6000/vsx.md:
8728 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
8731 2018-02-16 Carl Love <cel@us.ibm.com>
8733 * config/rs6000/altivec.h: Add builtin names vec_extract4b
8735 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
8737 * config/rs6000/rs6000-c.c: Add the definitions for
8738 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
8739 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
8740 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
8741 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
8742 definition for insert4b and define insn *insert3b_internal.
8743 * doc/extend.texi: Add documentation for vec_extract4b.
8745 2018-02-16 Nathan Sidwell <nathan@acm.org>
8747 * doc/extend.texi (Backwards Compatibility): Mention friend
8748 injection. Note for-scope is deprecated.
8749 * doc/invoke.texi (-ffriend-injection): Deprecate.
8751 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
8753 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
8754 that moved to I2, also allow destinations that are a paradoxical
8755 subreg (instead of a normal reg).
8757 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
8760 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
8763 2018-02-16 Richard Biener <rguenther@suse.de>
8765 PR tree-optimization/84037
8766 PR tree-optimization/84016
8768 * config/i386/i386.c (ix86_builtin_vectorization_cost):
8769 Adjust vec_construct for the fact we need additional higher latency
8770 128bit inserts for AVX256 and AVX512 vector builds.
8771 (ix86_add_stmt_cost): Scale vector construction cost for
8774 2018-02-16 Richard Biener <rguenther@suse.de>
8776 PR tree-optimization/84417
8777 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
8778 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
8779 (non_rewritable_lvalue_p): Likewise, use poly-ints.
8781 2018-02-16 Martin Liska <mliska@suse.cz>
8784 * internal-fn.def (ASAN_CHECK): Set proper flags.
8785 (ASAN_MARK): Likewise.
8787 2018-02-16 Julia Koval <julia.koval@intel.com>
8789 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
8790 from PTA_CANNONLAKE.
8792 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8795 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
8796 Use ++iter rather than iter++ for std::list iterators.
8797 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
8798 defer deleting them until all nodes in the forest are processed. Do
8799 free even leaf nodes. Change to_process into auto_vec.
8802 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
8803 * vec.h (vec_default_construct): Use memset instead of placement new
8804 if BROKEN_VALUE_INITIALIZATION is defined.
8805 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
8806 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
8809 PR rtl-optimization/83723
8810 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
8811 * lra.c (lra_substitute_pseudo): Likewise. If true, use
8812 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
8814 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
8816 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
8818 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
8820 PR rtl-optimization/81443
8821 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
8822 from inner REGs to paradoxical SUBREGs.
8824 2018-02-16 Richard Biener <rguenther@suse.de>
8826 PR tree-optimization/84399
8827 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8828 For operands we can analyze at their definition make sure we can
8829 analyze them at each use as well.
8831 2018-02-16 Richard Biener <rguenther@suse.de>
8833 PR tree-optimization/84190
8834 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
8835 volatile accesses if the decl isn't volatile.
8837 2018-02-15 Jason Merrill <jason@redhat.com>
8839 PR c++/84314 - ICE with templates and fastcall attribute.
8840 * attribs.c (build_type_attribute_qual_variant): Don't clobber
8841 TYPE_CANONICAL on an existing type.
8843 2018-02-15 Jakub Jelinek <jakub@redhat.com>
8845 PR tree-optimization/84383
8846 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
8847 dstoff nor call operand_equal_p if dstbase is NULL.
8849 PR tree-optimization/84334
8850 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
8851 also a CONSTANT_CLASS_P, punt.
8853 2018-02-14 Jim Wilson <jimw@sifive.com>
8855 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
8856 first SMALL_OPERAND check. New local min_second_step. Move assert
8857 to where locals are set. Add TARGET_RVC support.
8858 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
8860 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
8862 * doc/invoke.texi: Correct -Wformat-overflow code sample.
8864 2018-02-14 Martin Sebor <msebor@redhat.com>
8866 PR tree-optimization/83698
8867 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
8868 arrays constrain the offset range to their bounds.
8869 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
8870 (builtin_access::overlap): Avoid setting the size of overlap if it's
8872 (maybe_diag_overlap): Also consider arrays when deciding what values
8873 of offsets to include in diagnostics.
8875 2018-02-14 Martin Sebor <msebor@redhat.com>
8878 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
8879 that correspond to the kind of a declaration.
8881 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
8884 * config/pa/pa.md: Load address of PIC label using the linkage table
8885 if the label is nonlocal.
8887 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
8889 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
8890 warning message if user requests -maltivec=be.
8891 * doc/invoke.texi: Document deprecation of -maltivec=be.
8893 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
8896 * config/rs6000/rs6000-c.c: Update definitions for
8897 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
8898 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
8900 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8903 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
8904 add _get_ssp intrinsics. Remove argument from
8905 __builtin_ia32_rdssp[d|q].
8906 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
8907 * config/i386/i386-builtin.def: Remove argument from
8908 __builtin_ia32_rdssp[d|q].
8909 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
8910 ix86_expand_special_args_builtin for _rdssp[d|q].
8911 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
8912 Clear register before usage.
8913 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
8914 Add documentation for new _get_ssp and _inc_ssp intrinsics.
8916 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
8918 PR tree-optimization/84357
8919 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
8920 operand 1 of an ARRAY_REF too.
8922 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
8925 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
8926 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
8928 (set_of_reg): New struct.
8929 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
8930 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
8931 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
8933 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
8934 Split into bitclr, bitset, bitinvert patterns if appropriate.
8935 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
8936 use rx_fuse_in_memory_bitop.
8937 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
8938 to named insn, correct maximum insn length.
8940 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
8943 * machmode.def: Define a complex mode for PARTIAL_INT.
8944 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
8946 * doc/rtl.texi: Document CSPImode.
8947 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
8949 (msp430_hard_regno_nregs_with_padding): Likewise.
8951 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
8954 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
8956 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
8958 PR rtl-optimization/84169
8959 * combine.c (try_combine): New variable split_i2i3. Set it to true if
8960 we generated a parallel as new i3 and we split that to new i2 and i3
8961 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
8962 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
8963 those to i2, not i1. Partially rewrite this scan code.
8965 2018-02-13 Jakub Jelinek <jakub@redhat.com>
8968 * stor-layout.c (place_field): For variable length fields, adjust
8969 offset_align afterwards not just based on the field's alignment,
8970 but also on the size.
8973 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
8974 of exps and logs in the use_exp2 case.
8976 2018-02-13 Jeff Law <law@redhat.com>
8978 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
8981 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
8984 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
8988 * common.opt (gas-loc-support, gas-locview-support): New.
8989 (ginline-points, ginternal-reset-location-views): New.
8990 * doc/invoke.texi: Document them. Use @itemx where intended.
8991 (gvariable-location-views): Adjust.
8992 * target.def (reset_location_view): New.
8993 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
8994 (TARGET_RESET_LOCATION_VIEW): New.
8995 * doc/tm.texi: Rebuilt.
8996 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
8997 (dwarf2out_default_as_locview_support): New.
8998 (output_asm_line_debug_info): Use option variables.
8999 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
9000 (output_loc_list): Likewise.
9001 (add_high_low_attributes): Check option variables.
9002 Don't output entry view attribute in strict mode.
9003 (gen_inlined_subroutine_die): Check option variables.
9004 (dwarf2out_inline_entry): Likewise.
9005 (init_sections_and_labels): Likewise.
9006 (dwarf2out_early_finish): Likewise.
9007 (maybe_reset_location_view): New, from...
9008 (dwarf2out_var_location): ... here. Call it.
9009 * debug.h (dwarf2out_default_as_loc_support): Declare.
9010 (dwarf2out_default_as_locview_support): Declare.
9011 * hooks.c (hook_int_rtx_insn_0): New.
9012 * hooks.h (hook_int_rtx_insn_0): Declare.
9013 * toplev.c (process_options): Take -gas-loc-support and
9014 -gas-locview-support from dwarf2out. Enable
9015 -gvariable-location-views by default only with locview
9016 assembler support. Enable -ginternal-reset-location-views by
9017 default only if the target defines the corresponding hook.
9018 Enable -ginline-points by default if location views are
9019 enabled; force it disabled if statement frontiers are
9021 * tree-inline.c (expand_call_inline): Check option variables.
9022 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9024 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
9026 PR tree-optimization/84321
9027 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
9028 handling. Also check whether the anti-range contains any values
9029 that satisfy the mask; switch to a VR_RANGE if not.
9031 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
9034 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
9036 2018-02-13 Martin Jambor <mjambor@suse.cz>
9039 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
9040 of call statements, also set location of a load to a temporary.
9042 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
9044 * config/rl78/rl78.c (add_vector_labels): New function.
9045 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
9046 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
9047 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
9048 which checks that no arguments are passed.
9049 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
9050 * doc/extend.texi: Documentation for the new attribute.
9052 2018-02-13 Andreas Schwab <schwab@suse.de>
9054 * config/riscv/linux.h (CPP_SPEC): Define.
9056 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9059 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
9060 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
9061 OPTION_MASK_ISA_AES as first argument to def_builtin_const
9062 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
9063 instead of OPTION_MASK_ISA_PCLMUL as first argument to
9064 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
9065 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
9066 temporarily for AES and PCLMUL builtins.
9068 PR tree-optimization/84339
9069 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
9070 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
9074 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
9075 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
9076 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
9078 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
9080 * omp-simd-clone.h: New file.
9081 * omp-simd-clone.c: Include omp-simd-clone.h.
9082 (expand_simd_clones): No longer static.
9083 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
9084 cgraph.h and omp-simd-clone.h.
9085 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
9086 (vect_recog_widen_shift_pattern): Formatting fix.
9087 (vect_pattern_recog_1): Don't check optab for calls.
9090 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
9091 operands[2] into a REG before using gen_lowpart on it.
9093 2018-02-12 Jeff Law <law@redhat.com>
9096 * config/sh/sh.c (find_barrier): Consider a sibling call
9099 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
9100 successfully back substituting a reg.
9102 2018-02-12 Richard Biener <rguenther@suse.de>
9104 PR tree-optimization/84037
9105 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
9106 parameter, move visited init to caller.
9107 (vect_slp_analyze_operations): Separate cost from validity
9108 check, initialize visited once for all instances.
9109 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
9111 * tree-vect-stmts.c (vect_model_simple_cost): Make early
9113 (vect_model_promotion_demotion_cost): Likewise.
9114 (vectorizable_bswap): Guard cost modeling with !slp_node
9115 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
9117 (vectorizable_call): Likewise.
9118 (vectorizable_conversion): Likewise.
9119 (vectorizable_assignment): Likewise.
9120 (vectorizable_shift): Likewise.
9121 (vectorizable_operation): Likewise.
9122 (vectorizable_store): Likewise.
9123 (vectorizable_load): Likewise.
9124 (vectorizable_condition): Likewise.
9125 (vectorizable_comparison): Likewise.
9127 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
9130 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
9131 (ASAN_MARK): Fix fnspec to account for return value, change pointer
9132 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
9134 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9137 * params.def (inline-min-speedup): Increase from 8 to 15.
9138 (max-inline-insns-auto): Decrease from 40 to 30.
9139 * ipa-split.c (consider_split): Add some buffer for function to
9140 be considered inlining candidate.
9141 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
9144 2018-02-12 Richard Biener <rguenther@suse.de>
9146 PR tree-optimization/84037
9147 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
9148 matched stmts if we cannot swap the non-matched ones.
9150 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9152 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
9153 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
9154 _mm_maskz_scalef_round_ss): New intrinsics.
9155 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
9156 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
9157 __builtin_ia32_scalefss_round): Remove.
9158 (__builtin_ia32_scalefsd_mask_round,
9159 __builtin_ia32_scalefss_mask_round): New intrinsics.
9160 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
9161 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
9162 ((match_operand:VF_128 2 "<round_nimm_predicate>"
9163 "<round_constraint>")): Changed to ...
9164 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
9165 "<round_scalar_constraint>")): ... this.
9166 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
9167 %0, %1, %2<round_op3>}"): Changed to ...
9168 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
9169 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
9170 %2<round_scalar_mask_op3>}"): ... this.
9171 * config/i386/subst.md (round_scalar_nimm_predicate): New.
9173 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9175 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
9176 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
9177 (_mm_maskz_sqrt_round_ss): New intrinsics.
9178 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
9179 (__builtin_ia32_sqrtsd_mask_round)
9180 (__builtin_ia32_sqrtss_mask_round): New builtins.
9181 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
9182 (__builtin_ia32_sqrtss_round): Remove.
9183 (__builtin_ia32_sqrtsd_mask_round)
9184 (__builtin_ia32_sqrtss_mask_round): New builtins.
9185 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
9186 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
9187 ((match_operand:VF_128 1 "vector_operand"
9188 "xBm,<round_constraint>")): Changed to ...
9189 ((match_operand:VF_128 1 "vector_operand"
9190 "xBm,<round_scalar_constraint>")): ... this.
9191 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
9192 %0, %2, %<iptr>1<round_op3>}): Changed to ...
9193 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
9194 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
9195 %<iptr>1<round_scalar_mask_op3>}): ... this.
9196 ((set_attr "prefix" "<round_prefix>")): Changed to ...
9197 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
9199 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
9202 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
9203 Cast vec_cmpeq result to correct type.
9204 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
9205 Cast vec_cmpgt result to correct type.
9207 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
9209 * final.c (final_scan_insn_1): Renamed from...
9210 (final_scan_insn): ... this. New wrapper, to recover
9211 seen from the outermost call in recursive ones.
9212 * config/sparc/sparc.c (output_return): Drop seen from call.
9213 (output_sibcall): Likewise.
9214 * config/visium/visium.c (output_branch): Likewise.
9216 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
9218 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
9221 2018-02-10 Alan Modra <amodra@gmail.com>
9224 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
9225 Specify LR as an input.
9227 2018-02-10 Jakub Jelinek <jakub@redhat.com>
9230 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
9231 remove_member_access_dummy_vars): New functions.
9232 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
9233 lower_omp_1, execute_lower_omp): Use them.
9235 PR rtl-optimization/84308
9236 * shrink-wrap.c (spread_components): Release todo vector.
9238 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
9240 PR rtl-optimization/57193
9241 * ira-color.c (struct allocno_color_data): Add member
9242 conflict_allocno_hard_prefs.
9243 (update_conflict_allocno_hard_prefs): New.
9244 (bucket_allocno_compare_func): Add a preference based on
9245 conflict_allocno_hard_prefs.
9246 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
9247 (color_allocnos): Remove a dead code. Initiate
9248 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
9250 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9253 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
9254 constraint from =wa to wa. Avoid a subreg on the output operand,
9255 instead use a pseudo and subreg it in a move.
9256 (p9_xxbrd_<mode>): Changed to ...
9257 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
9258 (p9_xxbrd_v2df): New expander.
9259 (p9_xxbrw_<mode>): Changed to ...
9260 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
9261 (p9_xxbrw_v4sf): New expander.
9263 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9265 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
9267 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
9270 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
9271 multiply in 32-bit mode.
9272 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
9273 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
9276 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9278 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
9279 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
9280 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
9281 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
9283 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
9286 * dwarf2out.c (is_trivial_indirect_ref): New function.
9287 (dwarf2out_late_global_decl): Do not generate a location
9288 attribute for variables that have a non-trivial DECL_VALUE_EXPR
9289 and that are not defined in the current unit.
9291 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9293 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
9294 instead of a libcall for UNORDERED.
9296 2018-02-09 Tamar Christina <tamar.christina@arm.com>
9299 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
9300 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
9302 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9305 * config/s390/s390.c (s390_set_current_function): Invoke
9306 s390_indirect_branch_settings also if fndecl didn't change.
9308 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9310 * config/rs6000/rs6000.md (blockage): Set length to zero.
9312 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9314 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
9316 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9319 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
9320 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
9324 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
9325 PARALLEL incoming that failed vt_get_decl_and_offset check.
9328 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
9329 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
9331 (get_variable_section): For decls in named .bss* sections pass true as
9332 second argument to bss_initializer_p.
9334 2018-02-09 Marek Polacek <polacek@redhat.com>
9335 Jakub Jelinek <jakub@redhat.com>
9338 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
9339 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
9340 Sync some changes from cxx_fold_indirect_ref.
9342 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9344 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
9346 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
9347 (BLOCK_INLINE_ENTRY_LABEL): New.
9348 (dwarf2out_var_location): Disregard inline entry markers.
9349 (inline_entry_data): New struct.
9350 (inline_entry_data_hasher): New hashtable type.
9351 (inline_entry_data_hasher::hash): New.
9352 (inline_entry_data_hasher::equal): New.
9353 (inline_entry_data_table): New variable.
9354 (add_high_low_attributes): Add DW_AT_entry_pc and
9355 DW_AT_GNU_entry_view attributes if a pending entry is found
9356 in inline_entry_data_table. Add old entry_pc attribute only
9357 if debug nonbinding markers are disabled.
9358 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
9359 markers are enabled.
9360 (block_within_block_p, dwarf2out_inline_entry): New.
9361 (dwarf2out_finish): Check that no entries remained in
9362 inline_entry_data_table.
9363 * final.c (reemit_insn_block_notes): Handle inline entry notes.
9364 (final_scan_insn, notice_source_line): Likewise.
9365 (rest_of_clean_state): Skip inline entry markers.
9366 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
9368 * gimple.c (gimple_build_debug_inline_entry): New.
9369 * gimple.h (enum gimple_debug_subcode): Add
9370 GIMPLE_DEBUG_INLINE_ENTRY.
9371 (gimple_build_debug_inline_entry): Declare.
9372 (gimple_debug_inline_entry_p): New.
9373 (gimple_debug_nonbind_marker_p): Adjust.
9374 * insn-notes.def (INLINE_ENTRY): New.
9375 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
9376 inline entry marker notes.
9377 (print_insn): Likewise.
9378 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
9379 (INSN_DEBUG_MARKER_KIND): Likewise.
9380 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
9381 * tree-inline.c (expand_call_inline): Build and insert
9382 debug_inline_entry stmt.
9383 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
9384 inline entry blocks early, if nonbind markers are enabled.
9385 (dump_scope_block): Dump fragment info.
9386 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
9387 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
9388 (gimple_build_debug_inline_entry): New.
9389 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
9390 Enable/disable inline entry points too.
9391 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
9392 (DEBUG_INSN): Describe inline entry markers.
9394 * common.opt (gvariable-location-views): New.
9395 (gvariable-location-views=incompat5): New.
9396 * config.in: Rebuilt.
9397 * configure: Rebuilt.
9398 * configure.ac: Test assembler for view support.
9399 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
9400 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
9401 * dwarf2out.c (var_loc_view): New typedef.
9402 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
9403 (dwarf2out_locviews_in_attribute): New.
9404 (dwarf2out_locviews_in_loclist): New.
9405 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
9406 (enum dw_line_info_opcode): Add LI_adv_address.
9407 (struct dw_line_info_table): Add view.
9408 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
9409 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
9410 (zero_view_p): New variable.
9411 (ZERO_VIEW_P): New macro.
9412 (output_asm_line_debug_info): New.
9413 (struct var_loc_node): Add view.
9414 (add_AT_view_list, AT_loc_list): New.
9415 (add_var_loc_to_decl): Add view param. Test it against last.
9416 (new_loc_list): Add view params. Record them.
9417 (AT_loc_list_ptr): Handle loc and view lists.
9418 (view_list_to_loc_list_val_node): New.
9419 (print_dw_val): Handle dw_val_class_view_list.
9420 (size_of_die): Likewise.
9421 (value_format): Likewise.
9422 (loc_list_has_views): New.
9423 (gen_llsym): Set vl_symbol too.
9424 (maybe_gen_llsym, skip_loc_list_entry): New.
9425 (dwarf2out_maybe_output_loclist_view_pair): New.
9426 (output_loc_list): Output view list or entries too.
9427 (output_view_list_offset): New.
9428 (output_die): Handle dw_val_class_view_list.
9429 (output_dwarf_version): New.
9430 (output_compilation_unit_header): Use it.
9431 (output_skeleton_debug_sections): Likewise.
9432 (output_rnglists, output_line_info): Likewise.
9433 (output_pubnames, output_aranges): Update version comments.
9434 (output_one_line_info_table): Output view numbers in asm comments.
9435 (dw_loc_list): Determine current endview, pass it to new_loc_list.
9436 Call maybe_gen_llsym.
9437 (loc_list_from_tree_1): Adjust.
9438 (add_AT_location_description): Create view list attribute if
9439 needed, check it's absent otherwise.
9440 (convert_cfa_to_fb_loc_list): Adjust.
9441 (maybe_emit_file): Call output_asm_line_debug_info for test.
9442 (dwarf2out_var_location): Reset views as needed. Precompute
9443 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
9444 attribute. Set view.
9445 (new_line_info_table): Reset next view.
9446 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
9447 (dwarf2out_source_line): Likewise. Output view resets and labels to
9448 the assembler, or select appropriate line info opcodes.
9449 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
9450 (optimize_string_length): Catch it. Adjust.
9451 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
9452 dw_val_class_view_list, and remove it if no longer needed.
9453 (hash_loc_list): Hash view numbers.
9454 (loc_list_hasher::equal): Compare them.
9455 (optimize_location_lists): Check whether a view list symbol is
9456 needed, and whether the locview attribute is present, and
9457 whether they match. Remove the locview attribute if no longer
9459 (index_location_lists): Call skip_loc_list_entry for test.
9460 (dwarf2out_finish): Call output_asm_line_debug_info for test.
9461 Use output_dwarf_version.
9462 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
9463 (struct dw_val_node): Add val_view_list.
9464 * final.c (SEEN_NEXT_VIEW): New.
9465 (set_next_view_needed): New.
9466 (clear_next_view_needed): New.
9467 (maybe_output_next_view): New.
9468 (final_start_function): Rename to...
9469 (final_start_function_1): ... this. Take pointer to FIRST,
9470 add SEEN parameter. Emit param bindings in the initial view.
9471 (final_start_function): Reintroduce SEEN-less interface.
9472 (final): Rename to...
9473 (final_1): ... this. Take SEEN parameter. Output final pending
9474 next view at the end.
9475 (final): Reintroduce seen-less interface.
9476 (final_scan_insn): Output pending next view before switching
9477 sections or ending a block. Mark the next view as needed when
9478 outputting variable locations. Notify debug backend of section
9479 changes, and of location view changes.
9480 (rest_of_handle_final): Adjust.
9481 * toplev.c (process_options): Autodetect value for debug variable
9482 location views option. Warn on incompat5 without -gdwarf-5.
9483 * doc/invoke.texi (gvariable-location-views): New.
9484 (gvariable-location-views=incompat5): New.
9485 (gno-variable-location-views): New.
9487 2018-02-08 David Malcolm <dmalcolm@redhat.com>
9489 PR tree-optimization/84136
9490 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
9491 that the result of find_edge is non-NULL.
9493 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9496 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
9497 storing integer register in SImode. Fix cost of 256 and 512
9498 byte aligned SSE register store.
9500 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9502 * config/i386/i386.c (ix86_multiplication_cost): Fix
9503 multiplication cost for TARGET_AVX512DQ.
9505 2018-02-08 Marek Polacek <polacek@redhat.com>
9507 PR tree-optimization/84238
9508 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
9511 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9513 PR tree-optimization/84265
9514 * tree-vect-stmts.c (vectorizable_store): Don't treat
9515 VMAT_CONTIGUOUS accesses as grouped.
9516 (vectorizable_load): Likewise.
9518 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9520 PR tree-optimization/81635
9521 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
9522 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
9523 (test_round_for_mask): New functions.
9524 (wide_int_cc_tests): Call test_round_for_mask.
9525 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
9526 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
9527 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
9528 range returned by get_range_info.
9530 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9533 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
9534 * symtab.c: Include builtins.h
9535 (symtab_node::output_to_lto_symbol_table_p): Move here
9536 from lto-streamer-out.c:output_symbol_p.
9537 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
9538 (output_symbol_p): Move all logic to symtab.c
9539 (produce_symtab): Update.
9541 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9543 * config/s390/s390-opts.h (enum indirect_branch): Define.
9544 * config/s390/s390-protos.h (s390_return_addr_from_memory)
9545 (s390_indirect_branch_via_thunk)
9546 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9547 (enum s390_indirect_branch_type): Define.
9548 * config/s390/s390.c (struct s390_frame_layout, struct
9549 machine_function): Remove.
9550 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9551 (indirect_branch_table_label_no, indirect_branch_table_name):
9553 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9554 (enum s390_indirect_branch_option): Define.
9555 (s390_return_addr_from_memory): New function.
9556 (s390_handle_string_attribute): New function.
9557 (s390_attribute_table): Add new attribute handler.
9558 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9559 (s390_indirect_branch_via_thunk): New function.
9560 (s390_indirect_branch_via_inline_thunk): New function.
9561 (s390_function_ok_for_sibcall): When jumping via thunk disallow
9562 sibling call optimization for non z10 compiles.
9563 (s390_emit_call): Force indirect branch target to be a single
9564 register. Add r1 clobber for non-z10 compiles.
9565 (s390_emit_epilogue): Emit return jump via return_use expander.
9566 (s390_reorg): Handle JUMP_INSNs as execute targets.
9567 (s390_option_override_internal): Perform validity checks for the
9568 new command line options.
9569 (s390_indirect_branch_attrvalue): New function.
9570 (s390_indirect_branch_settings): New function.
9571 (s390_set_current_function): Invoke s390_indirect_branch_settings.
9572 (s390_output_indirect_thunk_function): New function.
9573 (s390_code_end): Implement target hook.
9574 (s390_case_values_threshold): Implement target hook.
9575 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9577 * config/s390/s390.h (struct s390_frame_layout)
9578 (struct machine_function): Move here from s390.c.
9579 (TARGET_INDIRECT_BRANCH_NOBP_RET)
9580 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9581 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9582 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9583 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9584 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9585 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9586 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9587 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9588 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9589 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9590 (mnemonic attribute): Add values which aren't recognized
9592 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9593 pattern for branch conversion. Fix mnemonic attribute.
9594 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9595 indirect branch via thunk if requested.
9596 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9597 ("*indirect_jump"): Disable for branch conversion using out of
9599 ("indirect_jump_via_thunk<mode>_z10")
9600 ("indirect_jump_via_thunk<mode>")
9601 ("indirect_jump_via_inlinethunk<mode>_z10")
9602 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9603 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9604 ("casesi_jump_via_inlinethunk<mode>_z10")
9605 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9606 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9607 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9608 ("*indirect2_jump"): Disable for branch conversion.
9609 ("casesi_jump"): Turn into expander and expand patterns for branch
9611 ("return_use"): New expander.
9612 ("*return"): Emit return via thunk and rename it to ...
9613 ("*return<mode>"): ... this one.
9614 * config/s390/s390.opt: Add new options and and enum for the
9617 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9619 * lra-constraints.c (match_reload): Unconditionally use
9620 gen_lowpart_SUBREG, rather than selecting between that
9621 and equivalent gen_rtx_SUBREG code.
9623 2018-02-08 Richard Biener <rguenther@suse.de>
9625 PR tree-optimization/84233
9626 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9627 changed flag instead of boguously re-using phi_inserted.
9629 2018-02-08 Martin Jambor <mjambor@suse.cz>
9631 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9632 static local variables.
9634 2018-02-08 Richard Biener <rguenther@suse.de>
9636 PR tree-optimization/84278
9637 * tree-vect-stmts.c (vectorizable_store): When looking for
9638 smaller vector types to perform grouped strided loads/stores
9639 make sure the mode is supported by the target.
9640 (vectorizable_load): Likewise.
9642 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9644 * config/aarch64/aarch64.c (aarch64_components_for_bb):
9645 Increase LDP/STP opportunities by adding adjacent callee-saves.
9647 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9649 PR rtl-optimization/84068
9650 PR rtl-optimization/83459
9651 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9653 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
9655 PR tree-optimization/84224
9656 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9657 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9660 2018-02-07 Iain Sandoe <iain@codesourcery.com>
9663 * config/rs6000/altivec.md (*restore_world): Remove LR use.
9664 * config/rs6000/predicates.md (restore_world_operation): Adjust op
9665 count, remove one USE.
9667 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
9669 * doc/install.texi (Configuration): Document the
9670 --with-long-double-format={ibm,ieee} PowerPC configuration
9674 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9675 Convert from define_expand to be define_insn_and_split. Rework
9676 float/double/_Float128 conversions to QI/HI/SImode to work with
9677 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
9678 conversions to QI/HImode types did a store and then a load to
9679 truncate the value. For conversions to VSX registers, don't split
9680 the insn, instead emit the code directly. Use the code iterator
9681 any_fix to combine signed and unsigned conversions.
9682 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9683 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9684 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9685 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9686 (fix_<mode>di2_hw): Likewise.
9687 (fixuns_<mode>di2_hw): Likewise.
9688 (fix_<mode>si2_hw): Likewise.
9689 (fixuns_<mode>si2_hw): Likewise.
9690 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9691 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9692 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9693 fix<uns>_trunc<SFDF:mode>si2_p8.
9694 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
9696 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9697 (fix<uns>_<mode>_mem): Likewise.
9698 (fctiw<u>z_<mode>_mem): Likewise.
9699 (fix<uns>_<mode>_mem): Likewise.
9700 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9701 the register allocator from doing a direct move to the GPRs to do
9702 a store, and instead use the ISA 3.0 store byte/half-word from
9703 vector register instruction. For IEEE 128-bit floating point,
9704 also optimize stores of 32-bit ints.
9705 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9707 2018-02-07 Alan Hayward <alan.hayward@arm.com>
9709 * genextract.c (push_pathstr_operand): New function to support
9711 (walk_rtx): Call push_pathstr_operand.
9712 (print_path): Support [a-zA-Z].
9714 2018-02-07 Richard Biener <rguenther@suse.de>
9716 PR tree-optimization/84037
9717 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9718 (cse_and_gimplify_to_preheader): Declare.
9719 (vect_get_place_in_interleaving_chain): Likewise.
9720 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9722 (_loop_vec_info::~_loop_vec_info): Delete it.
9723 (cse_and_gimplify_to_preheader): New function.
9724 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9725 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
9726 (vectorizable_load): Likewise. For grouped stores always base
9727 the IV on the first element.
9728 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
9729 condition before gimplifying.
9731 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9733 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
9734 *DIV_EXPR and *MOD_EXPR.
9736 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
9739 * config/i386/i386.c (ix86_option_override_internal): Mask out
9740 the CF_SET bit when checking -fcf-protection.
9742 2018-02-07 Tom de Vries <tom@codesourcery.com>
9745 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
9748 2018-02-07 Richard Biener <rguenther@suse.de>
9750 PR tree-optimization/84204
9751 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
9754 PR tree-optimization/84205
9755 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
9756 special-case isl_ast_op_zdiv_r.
9758 PR tree-optimization/84223
9759 * graphite-scop-detection.c (gather_bbs::before_dom_children):
9760 Only add conditions from within the region.
9761 (gather_bbs::after_dom_children): Adjust.
9763 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
9766 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
9767 * config/avr/avr.md: Only post-reload split REG-REG moves if
9768 either register is GENERAL_REG_P.
9770 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9772 PR tree-optimization/84235
9773 * tree-ssa-scopedtables.c
9774 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
9775 if the subtraction is performed in floating point type where NaNs are
9776 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
9777 build 1. Formatting fix.
9779 2018-02-06 Jakub Jelinek <jakub@redhat.com>
9782 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
9783 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
9784 and skip it regardless of bb boundaries. Use CALL_P macro,
9785 don't test INSN_P (insn) together with CALL_P or JUMP_P check
9786 unnecessarily, formatting fix.
9788 2018-02-06 Michael Collison <michael.collison@arm.com>
9790 * config/arm/thumb2.md:
9791 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
9792 (*thumb_mov_notscc): Ditto.
9794 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
9797 * config/rs6000/rs6000.md (su code attribute): Use "u" for
9798 unsigned_fix, not "s".
9800 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9802 * configure.ac (gcc_fn_eh_frame_ro): New function.
9803 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
9804 correct .eh_frame permissions.
9805 * configure: Regenerate.
9807 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
9809 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
9812 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9814 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9815 Display warning message for -mno-speculate-indirect-jumps.
9817 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
9819 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
9821 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
9823 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
9825 PR tree-optimization/84225
9826 * tree-eh.c (find_trapping_overflow): Only call
9827 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
9829 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9832 * config/i386/i386.c: Reimplement the check of possible options
9833 -mibt/-mshstk conbination. Change error messages.
9834 * doc/invoke.texi: Fix a typo: remove extra '='.
9836 2018-02-06 Marek Polacek <polacek@redhat.com>
9838 PR tree-optimization/84228
9839 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
9841 2018-02-06 Tamar Christina <tamar.christina@arm.com>
9844 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
9845 emitted arch directives.
9846 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
9847 __ARM_FEATURE_COPROC before changing architectures.
9849 2018-02-06 Richard Biener <rguenther@suse.de>
9851 * config/i386/i386.c (print_reg): Fix typo.
9852 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
9854 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
9856 * configure: Regenerate.
9858 2018-02-05 Martin Sebor <msebor@redhat.com>
9860 PR tree-optimization/83369
9861 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
9864 2018-02-05 Martin Liska <mliska@suse.cz>
9866 * doc/invoke.texi: Cherry-pick upstream r323995.
9868 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
9870 * ira.c (ira_init_register_move_cost): Adjust comment.
9872 2018-02-05 Martin Liska <mliska@suse.cz>
9874 PR gcov-profile/84137
9875 * doc/gcov.texi: Fix typo in documentation.
9877 2018-02-05 Martin Liska <mliska@suse.cz>
9879 PR gcov-profile/83879
9880 * doc/gcov.texi: Document necessity of --dynamic-list-data when
9881 using dlopen functionality.
9883 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
9885 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
9886 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
9887 _mm_maskz_range_ss, _mm_mask_range_round_ss,
9888 _mm_maskz_range_round_ss): New intrinsics.
9889 (__builtin_ia32_rangesd128_round)
9890 (__builtin_ia32_rangess128_round): Remove.
9891 (__builtin_ia32_rangesd128_mask_round,
9892 __builtin_ia32_rangess128_mask_round): New builtins.
9893 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
9894 __builtin_ia32_rangess128_round): Remove.
9895 (__builtin_ia32_rangesd128_mask_round,
9896 __builtin_ia32_rangess128_mask_round): New builtins.
9897 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
9898 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
9899 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
9900 "<round_saeonly_constraint>")): Changed to ...
9901 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
9902 "<round_saeonly_scalar_constraint>")): ... this.
9903 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
9904 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
9905 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
9906 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
9907 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
9909 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
9911 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
9913 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
9914 Remove all values except native, 8540 and 8548.
9916 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
9918 * config/i386/i386.c (ix86_output_function_return): Pass
9919 INVALID_REGNUM, instead of -1, as invalid register number to
9920 indirect_thunk_name and output_indirect_thunk.
9922 2018-02-02 Julia Koval <julia.koval@intel.com>
9924 * config.gcc: Add -march=icelake.
9925 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
9926 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
9927 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
9928 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
9929 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
9930 (processor_target_table): Add icelake.
9931 (ix86_option_override_internal): Handle new PTAs.
9932 (get_builtin_code_for_version): Handle icelake.
9933 (M_INTEL_COREI7_ICELAKE): New.
9934 (fold_builtin_cpu): Handle icelake.
9935 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
9936 * doc/invoke.texi: Add -march=icelake.
9938 2018-02-02 Julia Koval <julia.koval@intel.com>
9940 * config/i386/i386.c (ix86_option_override_internal): Change flags type
9941 to wide_int_bitmask.
9942 * wide-int-bitmask.h: New.
9944 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9947 * config/i386/i386.md: Replace Pmode with word_mode in
9948 builtin_setjmp_setup and builtin_longjmp to support x32.
9950 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
9954 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
9956 (rs6000_supported_cpu_names): New static variable.
9957 (linux_cpu_translation_table): Likewise.
9958 (elf_platform) <cpu>: Define new static variable and use it.
9959 Translate kernel AT_PLATFORM name to canonical name if needed.
9960 Error if platform name is unknown.
9962 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
9965 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
9967 2018-02-01 Jeff Law <law@redhat.com>
9970 * config/i386/i386.c (release_scratch_register_on_entry): Add new
9971 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
9972 the scratch if RELEASE_VIA_POP is false.
9973 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
9974 If we have to save a temporary register, decrement SIZE appropriately.
9975 Pass new arguments to release_scratch_register_on_entry.
9976 (ix86_adjust_stack_and_probe): Likewise.
9977 (ix86_emit_probe_stack_range): Pass new arguments to
9978 release_scratch_register_on_entry.
9980 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
9982 PR rtl-optimization/84157
9983 * combine.c (change_zero_ext): Use REG_P predicate in
9984 front of HARD_REGISTER_P predicate.
9986 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
9988 * config/avr/avr.c (avr_option_override): Move disabling of
9989 -fdelete-null-pointer-checks to...
9990 * common/config/avr/avr-common.c (avr_option_optimization_table):
9993 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9995 PR tree-optimization/81635
9996 * tree-data-ref.c (split_constant_offset_1): For types that
9997 wrap on overflow, try to use range info to prove that wrapping
10000 2018-02-01 Renlin Li <renlin.li@arm.com>
10003 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
10004 TAILCALL_ADDR_REGS.
10005 (aarch64_register_move_cost): Likewise.
10006 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
10007 TAILCALL_ADDR_REGS.
10008 (REG_CLASS_NAMES): Likewise.
10009 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
10010 TAILCALL_ADDR_REGS. Remove IP registers.
10011 * config/aarch64/aarch64.md (Ucs): Update register constraint.
10013 2018-02-01 Richard Biener <rguenther@suse.de>
10015 * domwalk.h (dom_walker::dom_walker): Add additional constructor
10016 for specifying RPO order and allow NULL for that.
10017 * domwalk.c (dom_walker::dom_walker): Likewise.
10018 (dom_walker::walk): Handle NULL RPO order.
10019 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
10021 (rewrite_update_dom_walker): Likewise.
10022 (mark_def_dom_walker): Likewise.
10024 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10026 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
10027 (aarch64_maybe_expand_sve_subreg_move): Declare.
10028 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
10029 * config/aarch64/predicates.md (aarch64_any_register_operand): New
10031 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
10032 that are semantically a reverse operation.
10033 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
10034 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
10035 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
10037 (aarch64_can_change_mode_class): For big-endian, forbid changes
10038 between two SVE modes if they have different element sizes.
10040 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10042 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
10043 the TImode handling for big-endian targets.
10045 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10047 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
10048 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
10050 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
10051 Remove BSWAP handing for big-endian targets and use the form of
10052 LD1RQ appropariate for the mode.
10054 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10056 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
10057 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
10058 duplicated element.
10060 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10063 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
10064 check for operands that need to go through aarch64_sve_reload_be.
10066 2018-02-01 Jakub Jelinek <jakub@redhat.com>
10068 PR tree-optimization/81661
10069 PR tree-optimization/84117
10070 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
10071 * tree-eh.c: Include gimplify.h.
10072 (find_trapping_overflow, replace_trapping_overflow,
10073 rewrite_to_non_trapping_overflow): New functions.
10074 * tree-vect-loop.c: Include tree-eh.h.
10075 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
10076 * tree-data-ref.c: Include tree-eh.h.
10077 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
10079 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
10081 PR rtl-optimization/84123
10082 * combine.c (change_zero_ext): Check if hard register satisfies
10083 can_change_dest_mode before calling gen_lowpart_SUBREG.
10085 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
10088 * ira.c (ira_init_register_move_cost): Remove assert.
10090 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10092 PR rtl-optimization/84071
10093 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
10094 * doc/tm.texi: Regenerate.
10096 2018-01-31 Richard Biener <rguenther@suse.de>
10098 PR tree-optimization/84132
10099 * tree-data-ref.c (analyze_miv_subscript): Properly
10100 check whether evolution_function_is_affine_multivariate_p
10101 before calling gcd_of_steps_may_divide_p.
10103 2018-01-31 Julia Koval <julia.koval@intel.com>
10106 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
10107 * config/i386/i386.md (rdpid_rex64) New.
10108 (rdpid): Make 32bit only.
10110 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
10113 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
10114 an IDENTIFIER_NODE for FUNCTION_TYPE's.
10116 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10119 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10121 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10123 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10125 PR rtl-optimization/84071
10126 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
10127 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
10129 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10131 * config/arc/arc.c (arc_handle_aux_attribute): New function.
10132 (arc_attribute_table): Add 'aux' attribute.
10133 (arc_in_small_data_p): Consider aux like variables.
10134 (arc_is_aux_reg_p): New function.
10135 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
10136 (arc_get_aux_arg): New function.
10137 (prepare_move_operands): Handle aux-register access.
10138 (arc_handle_aux_attribute): New function.
10139 * doc/extend.texi (ARC Variable attributes): Add subsection.
10141 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10143 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
10144 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
10145 (arc_attribute_table): Add 'uncached' attribute.
10146 (arc_print_operand): Print '.di' flag for uncached memory
10148 (arc_in_small_data_p): Do not consider for small data the uncached
10150 (arc_is_uncached_mem_p): New function.
10151 * config/arc/predicates.md (compact_store_memory_operand): Check
10152 for uncached memory accesses.
10153 (nonvol_nonimm_operand): Likewise.
10154 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
10156 2018-01-31 Jakub Jelinek <jakub@redhat.com>
10159 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
10160 falign-loops=): Add Optimization flag.
10162 2018-01-30 Jeff Law <law@redhat.com>
10165 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
10166 INT_REGISTERS_SAVED. Check it prior to calling
10167 get_scratch_register_on_entry.
10168 (ix86_adjust_stack_and_probe): Similarly.
10169 (ix86_emit_probe_stack_range): Similarly.
10170 (ix86_expand_prologue): Corresponding changes.
10172 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10175 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
10176 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
10178 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
10181 * lra-constraints.c (curr_insn_transform): Process AND in the
10184 2018-01-30 Jakub Jelinek <jakub@redhat.com>
10186 PR rtl-optimization/83986
10187 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
10188 dependence against last_pending_memory_flush in addition to
10189 pending_jump_insns.
10191 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
10193 PR tree-optimization/81611
10194 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
10197 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10200 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
10203 2018-01-30 Richard Biener <rguenther@suse.de>
10204 Jakub Jelinek <jakub@redhat.com>
10206 PR tree-optimization/84111
10207 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
10208 inner loops added during recursion, as they don't have up-to-date
10211 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10214 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
10215 (can_inline_edge_by_limits_p): ... here.
10216 (can_early_inline_edge_p, check_callers,
10217 update_caller_keys, update_callee_keys, recursive_inlining,
10218 add_new_edges_to_heap, speculation_useful_p,
10219 inline_small_functions,
10220 inline_small_functions, flatten_function,
10221 inline_to_all_callers_1): Update.
10223 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10225 * profile-count.c (profile_count::combine_with_ipa_count): Handle
10228 2018-01-30 Richard Biener <rguenther@suse.de>
10230 PR tree-optimization/83008
10231 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
10232 invariant and constant vector uses in stmts when they need
10233 more than one stmt.
10235 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10238 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
10239 * configure: Regenerate.
10241 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10243 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
10245 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
10246 Use gen_rtx_REG rather than gen_lowpart.
10248 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10250 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
10251 rather than 0 when creating partial subregs.
10253 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10255 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
10258 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
10261 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
10262 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
10263 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
10264 flags. This restores the settings used before the 2017-07-24.
10265 Turning off pre increment/decrement/modify allows IVOPTS to
10266 optimize DF/SF loops where the index is an int.
10268 2018-01-29 Richard Biener <rguenther@suse.de>
10269 Kelvin Nilsen <kelvin@gcc.gnu.org>
10272 * tree-vect-stmts.c (vectorizable_call): Don't call
10273 targetm.vectorize_builtin_md_vectorized_function if callee is
10276 2018-01-22 Carl Love <cel@us.ibm.com>
10278 * doc/extend.tex: Fix typo in second arg in
10279 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
10281 2018-01-29 Richard Biener <rguenther@suse.de>
10283 PR tree-optimization/84086
10284 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
10285 (flush_ssaname_freelist): When SSA names were released reset
10286 the SCEV hash table.
10288 2018-01-29 Richard Biener <rguenther@suse.de>
10290 PR tree-optimization/84057
10291 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
10292 removed paths when removing edges.
10294 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
10296 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
10297 -mfunction-return=@var{choice}.
10299 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
10301 PR diagnostic/84034
10302 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
10303 Handle CR like TAB.
10304 (layout::print_source_line): Likewise.
10305 (test_get_line_width_without_trailing_whitespace): Add test cases.
10307 2018-01-27 Jakub Jelinek <jakub@redhat.com>
10309 PR middle-end/84040
10310 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
10313 2018-01-26 Jim Wilson <jimw@sifive.com>
10315 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
10317 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
10320 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10322 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
10323 and CMP + SUB-immediate -> SUBS.
10325 2018-01-26 Martin Sebor <msebor@redhat.com>
10327 PR tree-optimization/83896
10328 * tree-ssa-strlen.c (get_string_len): Rename...
10329 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
10330 Avoid assuming length is constant.
10331 (handle_char_store): Use HOST_WIDE_INT for string length.
10333 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
10336 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
10337 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
10339 2018-01-26 Richard Biener <rguenther@suse.de>
10341 PR rtl-optimization/84003
10342 * dse.c (record_store): Only record redundant stores when
10343 the earlier store aliases at least all accesses the later one does.
10345 2018-01-26 Jakub Jelinek <jakub@redhat.com>
10347 PR rtl-optimization/83985
10348 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
10349 REG_CFA_RESTORE insns.
10350 (delete_unmarked_insns): Don't ignore separate shrink wrapping
10351 REG_CFA_RESTORE insns here.
10354 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
10355 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
10357 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10359 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
10360 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
10361 (arc_init): Likewise.
10362 (arc_override_options): Likewise.
10363 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
10365 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
10367 * config/arc/arc.h (TARGET_DBNZ): Define.
10368 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
10369 properly set the tune attribute.
10370 (dbnz): Use TARGET_DBNZ guard.
10371 * config/arc/arc.opt (mtune): Add core3 option.
10373 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10375 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
10376 recognize new pic like addresses.
10377 (arc_delegitimize_address): Clean up.
10379 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10381 * config/arc/arc-arches.def: Option mrf16 valid for all
10383 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
10384 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
10385 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
10386 * config/arc/arc-tables.opt: Regenerate.
10387 * config/arc/arc.c (arc_conditional_register_usage): Handle
10388 reduced register file case.
10389 (arc_file_start): Set must have build attributes.
10390 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
10391 mrf16 option value.
10392 * config/arc/arc.opt (mrf16): Add new option.
10393 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
10394 * config/arc/genmultilib.awk: Handle new mrf16 option.
10395 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
10396 * config/arc/t-multilib: Regenerate.
10397 * doc/invoke.texi (ARC Options): Document mrf16 option.
10399 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10401 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
10402 * config/arc/arc.c (arc_handle_secure_attribute): New function.
10403 (arc_attribute_table): Add 'secure_call' attribute.
10404 (arc_print_operand): Print secure call operand.
10405 (arc_function_ok_for_sibcall): Don't optimize tail calls when
10407 (arc_is_secure_call_p): New function. * config/arc/arc.md
10408 (call_i): Add support for sjli instruction.
10409 (call_value_i): Likewise.
10410 * config/arc/constraints.md (Csc): New constraint.
10412 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10413 John Eric Martin <John.Martin@emmicro-us.com>
10415 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
10416 * config/arc/arc.c (_arc_jli_section): New struct.
10417 (arc_jli_section): New type.
10418 (rc_jli_sections): New static variable.
10419 (arc_handle_jli_attribute): New function.
10420 (arc_attribute_table): Add jli_always and jli_fixed attribute.
10421 (arc_file_end): New function.
10422 (TARGET_ASM_FILE_END): Define.
10423 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
10424 (arc_add_jli_section): New function.
10425 (jli_call_scan): Likewise.
10426 (arc_reorg): Call jli_call_scan.
10427 (arc_output_addsi): Remove 'S' from printing asm operand.
10428 (arc_is_jli_call_p): New function.
10429 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
10431 (movhi_insn): Likewise.
10432 (movsi_insn): Likewise.
10433 (movsi_set_cc_insn): Likewise.
10434 (loadqi_update): Likewise.
10435 (load_zeroextendqisi_update): Likewise.
10436 (load_signextendqisi_update): Likewise.
10437 (loadhi_update): Likewise.
10438 (load_zeroextendhisi_update): Likewise.
10439 (load_signextendhisi_update): Likewise.
10440 (loadsi_update): Likewise.
10441 (loadsf_update): Likewise.
10442 (movsicc_insn): Likewise.
10443 (bset_insn): Likewise.
10444 (bxor_insn): Likewise.
10445 (bclr_insn): Likewise.
10446 (bmsk_insn): Likewise.
10447 (bicsi3_insn): Likewise.
10448 (cmpsi_cc_c_insn): Likewise.
10449 (movsi_ne): Likewise.
10450 (movsi_cond_exec): Likewise.
10451 (clrsbsi2): Likewise.
10452 (norm_f): Likewise.
10462 (call_i): Remove 'S' asm letter, add jli instruction.
10463 (call_value_i): Likewise.
10464 * config/arc/arc.op (mjli-always): New option.
10465 * config/arc/constraints.md (Cji): New constraint.
10466 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
10468 (subsf3_fpx): Likewise.
10469 (mulsf3_fpx): Likewise.
10470 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
10472 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
10473 function attrbutes.
10474 * doc/invoke.texi (ARC): Document mjli-always option.
10476 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
10478 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
10479 avoid addition with 0 and use incw and decw where possible.
10481 2018-01-26 Richard Biener <rguenther@suse.de>
10483 PR tree-optimization/81082
10484 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
10485 association if it requires casting to unsigned.
10486 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
10487 from fold_plusminus_mult_expr to catch important cases late when
10488 range info is available.
10490 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10492 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
10493 * configure.ac (hidden_linkonce): New test.
10494 * configure: Regenerate.
10495 * config.in: Regenerate.
10497 2018-01-26 Julia Koval <julia.koval@intel.com>
10499 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
10500 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
10501 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
10502 _mm_mask_bitshuffle_epi64_mask): Fix type.
10503 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
10504 USI_FTYPE_V4DI_V4DI_USI): Remove.
10505 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
10506 __builtin_ia32_vpshufbitqmb256_mask,
10507 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
10508 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
10509 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
10511 2018-01-26 Alan Modra <amodra@gmail.com>
10514 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
10515 UNSPEC_VBPERMQ. Sort other unspecs.
10517 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
10519 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
10521 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
10523 PR middle-end/83055
10524 * predict.c (drop_profile): Do not push/pop cfun; update also
10526 (handle_missing_profiles): Fix logic looking for zero profiles.
10528 2018-01-25 Jakub Jelinek <jakub@redhat.com>
10530 PR middle-end/83977
10531 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
10532 on functions with #pragma omp declare simd or functions with simd
10534 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
10535 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
10536 Remove trailing \n from warning_at calls.
10538 2018-01-25 Tom de Vries <tom@codesourcery.com>
10541 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10542 for neutered workers.
10544 2018-01-24 Joseph Myers <joseph@codesourcery.com>
10547 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10548 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10550 2018-01-24 Jeff Law <law@redhat.com>
10553 * i386.c (get_probe_interval): Move to earlier point.
10554 (ix86_compute_frame_layout): If -fstack-clash-protection and
10555 the frame is larger than the probe interval, then use pushes
10556 to save registers rather than reg->mem moves.
10557 (ix86_expand_prologue): Remove conditional for int_registers_saved
10560 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
10563 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10564 min/max for never referenced object.
10566 2018-01-24 Jakub Jelinek <jakub@redhat.com>
10568 PR middle-end/83977
10569 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10571 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10572 attributes from DECL_ATTRIBUTES (decl) without affecting
10573 DECL_ATTRIBUTES (current_function_decl).
10574 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10575 functions with non-NULL DECL_ABSTRACT_ORIGIN.
10577 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
10579 PR tree-optimization/83979
10580 * fold-const.c (fold_comparison): Use constant_boolean_node
10581 instead of boolean_{true,false}_node.
10583 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
10585 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10588 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10590 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10591 Simplify the clause that sets the length attribute.
10592 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10593 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10594 clause that sets the length attribute.
10595 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10597 2018-01-24 Tom de Vries <tom@codesourcery.com>
10600 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10601 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10602 Add strict parameter.
10603 (prevent_branch_around_nothing): Insert dummy insn between branch to
10604 label and label with no ptx insn inbetween.
10605 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10607 2018-01-24 Tom de Vries <tom@codesourcery.com>
10610 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10611 for neutered threads in warp.
10612 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10614 2018-01-24 Richard Biener <rguenther@suse.de>
10616 PR tree-optimization/83176
10617 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10620 2018-01-24 Richard Biener <rguenther@suse.de>
10622 PR tree-optimization/82819
10623 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10624 code generating pluses that are no-ops in the target precision.
10626 2018-01-24 Richard Biener <rguenther@suse.de>
10628 PR middle-end/84000
10629 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10631 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10633 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10634 to merge probabilities.
10635 * predict.c (probably_never_executed): Also mark as cold functions
10636 with global 0 profile and guessed local profile.
10637 * profile-count.c (profile_probability::combine_with_count): New
10639 * profile-count.h (profile_probability::operator*,
10640 profile_probability::operator*=, profile_probability::operator/,
10641 profile_probability::operator/=): Reduce precision to adjusted
10642 and set value to guessed on contradictory divisions.
10643 (profile_probability::combine_with_freq): Remove.
10644 (profile_probability::combine_wiht_count): Declare.
10645 (profile_count::force_nonzero):: Set to adjusted.
10646 (profile_count::probability_in):: Set quality to adjusted.
10647 * tree-ssa-tail-merge.c (replace_block_by): Use
10648 combine_with_count.
10650 2018-01-23 Andrew Waterman <andrew@sifive.com>
10651 Jim Wilson <jimw@sifive.com>
10653 * config/riscv/riscv.c (riscv_stack_boundary): New.
10654 (riscv_option_override): Set riscv_stack_boundary. Handle
10655 riscv_preferred_stack_boundary_arg.
10656 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10657 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10658 (STACK_BOUNDARY): Set to riscv_stack_boundary.
10659 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10660 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10661 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10663 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
10666 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10667 of struct ix86_frame.
10668 (ix86_expand_epilogue): Likewise. Add a local variable for
10669 the reg_save_offset field in struct ix86_frame.
10671 2018-01-23 Bin Cheng <bin.cheng@arm.com>
10673 PR tree-optimization/82604
10674 * tree-loop-distribution.c (enum partition_kind): New enum item
10675 PKIND_PARTIAL_MEMSET.
10676 (partition_builtin_p): Support above new enum item.
10677 (generate_code_for_partition): Ditto.
10678 (compute_access_range): Differentiate cases that equality can be
10679 proven at all loops, the innermost loops or no loops.
10680 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10681 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
10682 (finalize_partitions, distribute_loop): Don't fuse partition of
10683 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10684 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10685 parloop is enabled.
10687 2018-01-23 Martin Liska <mliska@suse.cz>
10689 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10690 order to ignore the predictor.
10691 (PRED_POLYMORPHIC_CALL): Likewise.
10692 (PRED_RECURSIVE_CALL): Likewise.
10694 2018-01-23 Martin Liska <mliska@suse.cz>
10696 * tree-profile.c (tree_profiling): Print function header to
10697 aware reader which function we are working on.
10698 * value-prof.c (gimple_find_values_to_profile): Do not print
10699 not interesting value histograms.
10701 2018-01-23 Martin Liska <mliska@suse.cz>
10703 * profile-count.h (enum profile_quality): Add
10704 profile_uninitialized as the first value. Do not number values
10705 as they are zero based.
10706 (profile_count::verify): Update sanity check.
10707 (profile_probability::verify): Likewise.
10709 2018-01-23 Nathan Sidwell <nathan@acm.org>
10711 * doc/invoke.texi (ffor-scope): Deprecate.
10713 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10715 PR tree-optimization/83510
10716 * domwalk.c (set_all_edges_as_executable): New function.
10717 (dom_walker::dom_walker): Convert bool param
10718 "skip_unreachable_blocks" to enum reachability. Move setup of
10719 edge flags to set_all_edges_as_executable and only do it when
10720 reachability is REACHABLE_BLOCKS.
10721 * domwalk.h (enum dom_walker::reachability): New enum.
10722 (dom_walker::dom_walker): Convert bool param
10723 "skip_unreachable_blocks" to enum reachability.
10724 (set_all_edges_as_executable): New decl.
10725 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
10726 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
10728 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
10729 but converting true to REACHABLE_BLOCKS.
10730 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
10732 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
10733 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
10734 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
10736 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
10737 if check_all_array_refs will be called.
10739 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10741 * tree.c (selftest::test_location_wrappers): Add more test
10744 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10746 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
10747 (selftest::test_bit_in_range): Likewise.
10749 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10752 * doc/sourcebuild.texi (vect_float): Say that the selector
10753 only describes the situation when -funsafe-math-optimizations is on.
10754 (vect_float_strict): Document.
10756 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10758 PR tree-optimization/83965
10759 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10760 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
10761 instead of checking only for a reduction.
10762 (vect_recog_widen_sum_pattern): Likewise.
10764 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10766 * predict.c (probably_never_executed): Only use precise profile info.
10767 (compute_function_frequency): Skip after inlining hack since we now
10768 have quality checking.
10770 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10772 * profile-count.h (profile_probability::very_unlikely,
10773 profile_probability::unlikely, profile_probability::even): Set
10774 precision to guessed.
10776 2018-01-23 Richard Biener <rguenther@suse.de>
10778 PR tree-optimization/83963
10779 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
10780 Properly terminate dominator walk when crossing the exit edge not
10781 when visiting its source block.
10783 2018-01-23 Jakub Jelinek <jakub@redhat.com>
10786 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
10787 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
10789 2018-01-22 Jakub Jelinek <jakub@redhat.com>
10791 PR tree-optimization/83957
10792 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
10793 semicolon after for body surrounded by braces.
10795 PR tree-optimization/83081
10796 * profile-count.h (profile_probability::split): New method.
10797 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
10798 Use profile_probability::split.
10799 (do_compare_rtx_and_jump): Fix adjustment of probabilities
10800 when splitting a single conditional jump into 2.
10802 2018-01-22 David Malcolm <dmalcolm@redhat.com>
10804 PR tree-optimization/69452
10805 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
10808 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10810 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
10811 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
10812 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
10814 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10816 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
10817 * config/rl78/rl78.md (movdi): New define_expand.
10818 * config/rl78/rl78.c (rl78_split_movdi): New function.
10820 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
10823 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
10825 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
10826 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
10827 128-bit to produce an UNSPEC move to get the double word with the
10828 signbit and then a shift directly to do signbit.
10829 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
10830 implementation with a new version that just does either a direct
10831 move or a regular move. Move memory interface to separate insns.
10832 Move insns so they are next to the expander.
10833 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
10834 with signbit move. Split big and little endian case.
10835 (signbit<mode>2_dm_mem_le): Likewise.
10836 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
10837 (signbit<mode>2_dm2): Likewise.
10839 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10841 * config/rl78/rl78.md (anddi3): New define_expand.
10843 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10845 * config/rl78/rl78.md (umindi3): New define_expand.
10847 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10849 * config/rl78/rl78.md (smindi3): New define_expand.
10851 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10853 * config/rl78/rl78.md (smaxdi3): New define_expand.
10855 2018-01-22 Carl Love <cel@us.ibm.com>
10857 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
10858 LVX_V1TI): Add macro expansion.
10859 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
10860 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
10861 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
10862 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
10863 Change check to determine if the instruction is a byte reversing
10864 entry. Fix typo in comment.
10865 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
10866 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
10867 Add def_builtin calls for new builtins.
10868 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
10869 Add define_insn expansion.
10871 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10873 * config/rl78/rl78.md (umaxdi3): New define_expand.
10875 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10877 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
10878 for non-QImode registers.
10880 2018-01-22 Richard Biener <rguenther@suse.de>
10882 PR tree-optimization/83963
10883 * graphite-scop-detection.c (scop_detection::get_sese): Delay
10884 including the loop exit block.
10885 (scop_detection::merge_sese): Likewise.
10886 (scop_detection::add_scop): Do it here instead.
10888 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10890 * doc/sourcebuild.texi (arm_softfloat): Document.
10892 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
10895 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
10896 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
10897 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
10899 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10900 David Edelsohn <dje.gcc@gmail.com>
10903 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10904 Change "crset eq" to "crset 2".
10905 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10906 (*call_indirect_aix<mode>_nospec): Likewise.
10907 (*call_value_indirect_aix<mode>_nospec): Likewise.
10908 (*call_indirect_elfv2<mode>_nospec): Likewise.
10909 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
10910 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
10911 change assembly output from . to $.
10912 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10913 (indirect_jump<mode>_nospec): Change assembly output from . to $.
10914 (*tablejump<mode>_internal1_nospec): Likewise.
10916 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
10919 * config/sh/sh_optimize_sett_clrt.cc:
10920 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
10922 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
10924 PR tree-optimization/83940
10925 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
10926 offset_dt to vect_constant_def rather than vect_unknown_def_type.
10927 (vect_check_load_store_mask): Add a mask_dt_out parameter and
10928 use it to pass back the definition type.
10929 (vect_check_store_rhs): Likewise rhs_dt_out.
10930 (vect_build_gather_load_calls): Add a mask_dt argument and use
10931 it instead of a call to vect_is_simple_use.
10932 (vectorizable_store): Update calls to vect_check_load_store_mask
10933 and vect_check_store_rhs. Use the dt returned by the latter instead
10934 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
10935 instead of calls to vect_is_simple_use. Pass the scalar rather
10936 than the vector operand to vect_is_simple_use when handling
10937 second and subsequent copies of an rhs value.
10938 (vectorizable_load): Update calls to vect_check_load_store_mask
10939 and vect_build_gather_load_calls. Use the cached mask_dt and
10940 gs_info.offset_dt instead of calls to vect_is_simple_use.
10942 2018-01-20 Jakub Jelinek <jakub@redhat.com>
10944 PR middle-end/83945
10945 * tree-emutls.c: Include gimplify.h.
10946 (lower_emutls_2): New function.
10947 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
10948 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
10949 it before further processing.
10952 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
10953 UINTVAL (trueop1) instead of INTVAL (op1).
10955 2018-01-19 Jakub Jelinek <jakub@redhat.com>
10959 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
10960 INCOMING_FRAME_SP_OFFSET if not defined.
10961 (scan_trace): Add ENTRY argument. If true and
10962 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
10963 emit a note to adjust the CFA offset.
10964 (create_cfi_notes): Adjust scan_trace callers.
10965 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
10966 INCOMING_FRAME_SP_OFFSET in the CIE.
10967 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
10968 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
10970 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
10971 * doc/tm.texi: Regenerated.
10973 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10975 PR rtl-optimization/83147
10976 * lra-constraints.c (remove_inheritance_pseudos): Use
10977 lra_substitute_pseudo_within_insn.
10979 2018-01-19 Tom de Vries <tom@codesourcery.com>
10980 Cesar Philippidis <cesar@codesourcery.com>
10983 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
10985 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
10988 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
10989 spaces for function labels.
10991 2018-01-19 Martin Liska <mliska@suse.cz>
10993 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
10994 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
10995 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
10996 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
10997 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
10998 (PRED_CONST_RETURN): Change from 69 to 65.
10999 (PRED_NULL_RETURN): Change from 91 to 71.
11000 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
11001 (PRED_LOOP_GUARD): Change from 66 to 73.
11003 2018-01-19 Martin Liska <mliska@suse.cz>
11005 * predict.c (predict_insn_def): Add new assert.
11006 (struct branch_predictor): Change type to signed integer.
11007 (test_prediction_value_range): Amend test to cover
11008 PROB_UNINITIALIZED.
11009 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
11010 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
11011 (PRED_LOOP_ITERATIONS_MAX): Likewise.
11012 (PRED_LOOP_IV_COMPARE): Likewise.
11013 * predict.h (PROB_UNINITIALIZED): Define new constant.
11015 2018-01-19 Martin Liska <mliska@suse.cz>
11017 * predict.c (dump_prediction): Add new format for
11018 analyze_brprob.py script which is enabled with -details
11020 * profile-count.h (precise_p): New function.
11022 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11024 PR tree-optimization/83922
11025 * tree-vect-loop.c (vect_verify_full_masking): Return false if
11026 there are no statements that need masking.
11027 (vect_active_double_reduction_p): New function.
11028 (vect_analyze_loop_operations): Use it when handling phis that
11029 are not in the loop header.
11031 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11033 PR tree-optimization/83914
11034 * tree-vect-loop.c (vectorizable_induction): Don't convert
11035 init_expr or apply the peeling adjustment for inductions
11036 that are nested within the vectorized loop.
11038 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11040 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
11043 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11047 * function.h (gimplify_parameters): Add gimple_seq * argument.
11048 * function.c: Include gimple.h and options.h.
11049 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
11050 for the added local temporaries if needed.
11051 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
11052 if there are any parameter cleanups, wrap whole body into a
11053 try/finally with the cleanups.
11055 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
11058 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
11059 Use GET_MODE_CLASS for scalar floating point.
11061 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11065 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
11066 Fix call of call_cgraph_insertion_hooks.
11068 2018-01-18 Martin Sebor <msebor@redhat.com>
11070 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
11072 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11075 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
11078 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
11081 * common.opt: (-ffile-prefix-map): New option.
11082 * opts.c (common_handle_option): Defer it.
11083 * opts-global.c (handle_common_deferred_options): Handle it.
11084 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
11085 * file-prefix-map.h: New file.
11086 (remap_debug_filename, add_debug_prefix_map): ...here.
11087 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
11088 * final.c (debug_prefix_map, add_debug_prefix_map
11089 remap_debug_filename): Move to...
11090 * file-prefix-map.c: New file.
11091 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
11092 generalize, get rid of alloca(), use strrchr() instead of strchr().
11093 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
11094 Implement in terms of add_prefix_map().
11095 (remap_macro_filename, remap_debug_filename): Implement in term of
11097 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
11098 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
11099 * dbxout.c: Include file-prefix-map.h.
11100 * varasm.c: Likewise.
11101 * vmsdbgout.c: Likewise.
11102 * xcoffout.c: Likewise.
11103 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
11104 * doc/cppopts.texi (-fmacro-prefix-map): Document.
11105 * doc/invoke.texi (-ffile-prefix-map): Document.
11106 (-fdebug-prefix-map): Update description.
11108 2018-01-18 Martin Liska <mliska@suse.cz>
11110 * config/i386/i386.c (indirect_thunk_name): Document that also
11112 (output_indirect_thunk): Document why both instructions
11113 (pause and lfence) are generated.
11115 2018-01-18 Richard Biener <rguenther@suse.de>
11117 PR tree-optimization/83887
11118 * graphite-scop-detection.c
11119 (scop_detection::get_nearest_dom_with_single_entry): Remove.
11120 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
11121 (scop_detection::merge_sese): Re-implement with a flood-fill
11122 algorithm that properly finds a SESE region if it exists.
11124 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11127 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
11128 pointer_diff optimizations use view_convert instead of convert.
11130 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11132 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11133 Generate different code for -mno-speculate-indirect-jumps.
11134 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11135 (*call_indirect_aix<mode>): Disable for
11136 -mno-speculate-indirect-jumps.
11137 (*call_indirect_aix<mode>_nospec): New define_insn.
11138 (*call_value_indirect_aix<mode>): Disable for
11139 -mno-speculate-indirect-jumps.
11140 (*call_value_indirect_aix<mode>_nospec): New define_insn.
11141 (*sibcall_nonlocal_sysv<mode>): Generate different code for
11142 -mno-speculate-indirect-jumps.
11143 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11145 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11147 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
11148 long double type, set the flags for noting the default long double
11149 type, even if we don't pass or return a long double type.
11151 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
11154 * ipa-inline.c (flatten_function): Do not overwrite final inlining
11157 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
11159 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
11160 support for merge[hl].
11161 (fold_mergehl_helper): New helper function.
11162 (tree-vector-builder.h): New #include for tree_vector_builder usage.
11163 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
11164 (altivec_vmrglw_direct): Add xxmrglw insn.
11166 2018-01-17 Andrew Waterman <andrew@sifive.com>
11168 * config/riscv/riscv.c (riscv_conditional_register_usage): If
11169 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
11171 2018-01-17 David Malcolm <dmalcolm@redhat.com>
11174 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
11175 call the lto_location_cache before reading the
11176 DECL_SOURCE_LOCATION of the types.
11178 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
11179 Richard Sandiford <richard.sandiford@linaro.org>
11181 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
11182 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
11183 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
11184 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
11185 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
11187 * config/aarch64/constraints.md (aarch64_movti_operand):
11189 * config/aarch64/predicates.md (Uti): Add new constraint.
11191 2018-01-17 Carl Love <cel@us.ibm.com>
11193 * config/rs6000/vsx.md (define_expand xl_len_r,
11194 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
11195 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
11197 (define_expand, define_insn): Move the shift left from the
11198 define_insn to the define_expand for lxvl and stxvl instructions.
11199 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
11200 and XL_LEN_R definitions to PURE.
11202 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
11204 * config/i386/i386.c (indirect_thunk_name): Declare regno
11205 as unsigned int. Compare regno with INVALID_REGNUM.
11206 (output_indirect_thunk): Ditto.
11207 (output_indirect_thunk_function): Ditto.
11208 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
11209 in the call to output_indirect_thunk_function.
11211 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
11213 PR middle-end/83884
11214 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
11215 rather than the size of inner_type to determine the stack slot size
11216 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
11218 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
11221 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
11224 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
11226 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
11227 endian Linux systems to optionally enable multilibs for selecting
11228 the long double type if the user configured an explicit type.
11229 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
11230 have no long double multilibs if not defined.
11231 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
11232 warn if the user used -mabi={ieee,ibm}longdouble and we built
11233 multilibs for long double.
11234 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
11235 appropriate multilib option.
11236 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
11238 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
11239 for building long double multilibs.
11240 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
11242 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
11244 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
11247 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
11249 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
11252 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
11255 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
11258 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11260 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
11261 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
11263 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11265 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
11266 different rtl trees depending on TARGET_64BIT.
11267 (rs6000_gen_lvx): Likewise.
11269 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11271 * config/visium/visium.md (nop): Tweak comment.
11272 (hazard_nop): Likewise.
11274 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11276 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
11277 -mspeculate-indirect-jumps.
11278 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
11279 for -mno-speculate-indirect-jumps.
11280 (*call_indirect_elfv2<mode>_nospec): New define_insn.
11281 (*call_value_indirect_elfv2<mode>): Disable for
11282 -mno-speculate-indirect-jumps.
11283 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
11284 (indirect_jump): Emit different RTL for
11285 -mno-speculate-indirect-jumps.
11286 (*indirect_jump<mode>): Disable for
11287 -mno-speculate-indirect-jumps.
11288 (*indirect_jump<mode>_nospec): New define_insn.
11289 (tablejump): Emit different RTL for
11290 -mno-speculate-indirect-jumps.
11291 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
11292 (tablejumpsi_nospec): New define_expand.
11293 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
11294 (tablejumpdi_nospec): New define_expand.
11295 (*tablejump<mode>_internal1): Disable for
11296 -mno-speculate-indirect-jumps.
11297 (*tablejump<mode>_internal1_nospec): New define_insn.
11298 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
11301 2018-01-16 Artyom Skrobov tyomitch@gmail.com
11303 * caller-save.c (insert_save): Drop unnecessary parameter. All
11306 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11307 Richard Biener <rguenth@suse.de>
11310 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
11311 return early, inline manually is_gimple_sizepos. Make sure if we
11312 call gimplify_expr we don't end up with a gimple constant.
11313 * tree.c (variably_modified_type_p): Don't return true for
11314 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
11315 * gimplify.h (is_gimple_sizepos): Remove.
11317 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11319 PR tree-optimization/83857
11320 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
11321 vectorizable_live_operation for pure SLP statements.
11322 (vectorizable_live_operation): Handle PHIs.
11324 2018-01-16 Richard Biener <rguenther@suse.de>
11326 PR tree-optimization/83867
11327 * tree-vect-stmts.c (vect_transform_stmt): Precompute
11328 nested_in_vect_loop_p since the scalar stmt may get invalidated.
11330 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11333 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
11334 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
11335 If off is not INTEGER_CST, issue a may not be aligned warning
11336 rather than isn't aligned. Use isn%'t rather than isn't.
11337 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
11339 <case MULT_EXPR>: Improve the case when bottom and one of the
11340 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
11341 operand, in that case check if the other operand is multiple of
11342 bottom divided by the INTEGER_CST operand.
11344 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11347 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
11348 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
11349 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
11350 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
11351 * config/pa/pa.c (pa_function_arg_advance): Likewise.
11352 (pa_function_arg, pa_arg_partial_bytes): Likewise.
11353 (pa_function_arg_size): New function.
11355 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11357 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
11358 in a separate statement.
11360 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11362 PR tree-optimization/83847
11363 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
11364 group gathers and scatters.
11366 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11368 PR rtl-optimization/86620
11369 * params.def (max-sched-ready-insns): Bump minimum value to 1.
11371 PR rtl-optimization/83213
11372 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
11373 to last if both are JUMP_INSNs.
11375 PR tree-optimization/83843
11376 * gimple-ssa-store-merging.c
11377 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
11378 store_immediate_info for bswap/nop orig_stores.
11380 2018-01-15 Andrew Waterman <andrew@sifive.com>
11382 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
11384 <UDIV>: Increase cost if !TARGET_DIV.
11386 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
11388 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
11389 (define_attr "cr_logical_3op"): New.
11390 (cceq_ior_compare): Adjust.
11391 (cceq_ior_compare_complement): Adjust.
11392 (*cceq_rev_compare): Adjust.
11393 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
11394 (is_cracked_insn): Adjust.
11395 (insn_must_be_first_in_group): Adjust.
11396 * config/rs6000/40x.md: Adjust.
11397 * config/rs6000/440.md: Adjust.
11398 * config/rs6000/476.md: Adjust.
11399 * config/rs6000/601.md: Adjust.
11400 * config/rs6000/603.md: Adjust.
11401 * config/rs6000/6xx.md: Adjust.
11402 * config/rs6000/7450.md: Adjust.
11403 * config/rs6000/7xx.md: Adjust.
11404 * config/rs6000/8540.md: Adjust.
11405 * config/rs6000/cell.md: Adjust.
11406 * config/rs6000/e300c2c3.md: Adjust.
11407 * config/rs6000/e500mc.md: Adjust.
11408 * config/rs6000/e500mc64.md: Adjust.
11409 * config/rs6000/e5500.md: Adjust.
11410 * config/rs6000/e6500.md: Adjust.
11411 * config/rs6000/mpc.md: Adjust.
11412 * config/rs6000/power4.md: Adjust.
11413 * config/rs6000/power5.md: Adjust.
11414 * config/rs6000/power6.md: Adjust.
11415 * config/rs6000/power7.md: Adjust.
11416 * config/rs6000/power8.md: Adjust.
11417 * config/rs6000/power9.md: Adjust.
11418 * config/rs6000/rs64.md: Adjust.
11419 * config/rs6000/titan.md: Adjust.
11421 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11423 * config/i386/predicates.md (indirect_branch_operand): Rewrite
11424 ix86_indirect_branch_register logic.
11426 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11428 * config/i386/constraints.md (Bs): Update
11429 ix86_indirect_branch_register check. Don't check
11430 ix86_indirect_branch_register with GOT_memory_operand.
11432 * config/i386/predicates.md (GOT_memory_operand): Don't check
11433 ix86_indirect_branch_register here.
11434 (GOT32_symbol_operand): Likewise.
11436 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11438 * config/i386/predicates.md (constant_call_address_operand):
11439 Rewrite ix86_indirect_branch_register logic.
11440 (sibcall_insn_operand): Likewise.
11442 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11444 * config/i386/constraints.md (Bs): Replace
11445 ix86_indirect_branch_thunk_register with
11446 ix86_indirect_branch_register.
11448 * config/i386/i386.md (indirect_jump): Likewise.
11449 (tablejump): Likewise.
11450 (*sibcall_memory): Likewise.
11451 (*sibcall_value_memory): Likewise.
11452 Peepholes of indirect call and jump via memory: Likewise.
11453 * config/i386/i386.opt: Likewise.
11454 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11455 (GOT_memory_operand): Likewise.
11456 (call_insn_operand): Likewise.
11457 (sibcall_insn_operand): Likewise.
11458 (GOT32_symbol_operand): Likewise.
11460 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11462 PR middle-end/83837
11463 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
11464 type rather than type addr's type points to.
11465 (expand_omp_atomic_mutex): Likewise.
11466 (expand_omp_atomic): Likewise.
11468 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11471 * config/i386/i386.c (output_indirect_thunk_function): Use
11472 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
11473 for __x86_return_thunk.
11475 2018-01-15 Richard Biener <rguenther@suse.de>
11477 PR middle-end/83850
11478 * expmed.c (extract_bit_field_1): Fix typo.
11480 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11483 * config/arm/iterators.md (VF): New mode iterator.
11484 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
11485 Remove integer-related logic from pattern.
11486 (neon_vabd<mode>_3): Likewise.
11488 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11490 PR middle-end/82694
11491 * common.opt (fstrict-overflow): No longer an alias.
11492 (fwrapv-pointer): New option.
11493 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
11494 also for pointer types based on flag_wrapv_pointer.
11495 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
11496 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
11497 opts->x_flag_wrapv got set.
11498 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
11499 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
11500 POINTER_TYPE_OVERFLOW_UNDEFINED.
11501 * match.pd: Likewise in address comparison pattern.
11502 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
11504 2018-01-15 Richard Biener <rguenther@suse.de>
11507 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
11508 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
11509 Reset type names to their identifier if their TYPE_DECL doesn't
11510 have linkage (and thus is used for ODR and devirt).
11511 (save_debug_info_for_decl): Remove.
11512 (save_debug_info_for_type): Likewise.
11513 (add_tree_to_fld_list): Adjust.
11514 * tree-pretty-print.c (dump_generic_node): Make dumping of
11515 type names more robust.
11517 2018-01-15 Richard Biener <rguenther@suse.de>
11519 * BASE-VER: Bump to 8.0.1.
11521 2018-01-14 Martin Sebor <msebor@redhat.com>
11524 * builtins.c (check_access): Avoid warning when the no-warning bit
11527 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
11529 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
11530 * ira-color (allocno_hard_regs_compare): Likewise.
11532 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
11535 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
11536 Use .pushsection/.popsection.
11538 2018-01-14 Martin Sebor <msebor@redhat.com>
11541 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
11543 2018-01-14 Jakub Jelinek <jakub@redhat.com>
11545 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11546 entry from extra_headers.
11547 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11548 extra_headers, make the list bitwise identical to the i?86-*-* one.
11550 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11552 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11553 -mcmodel=large with -mindirect-branch=thunk,
11554 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11555 -mfunction-return=thunk-extern.
11556 * doc/invoke.texi: Document -mcmodel=large is incompatible with
11557 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11558 -mfunction-return=thunk and -mfunction-return=thunk-extern.
11560 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11562 * config/i386/i386.c (print_reg): Print the name of the full
11563 integer register without '%'.
11564 (ix86_print_operand): Handle 'V'.
11565 * doc/extend.texi: Document 'V' modifier.
11567 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11569 * config/i386/constraints.md (Bs): Disallow memory operand for
11570 -mindirect-branch-register.
11572 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11573 (GOT_memory_operand): Likewise.
11574 (call_insn_operand): Likewise.
11575 (sibcall_insn_operand): Likewise.
11576 (GOT32_symbol_operand): Likewise.
11577 * config/i386/i386.md (indirect_jump): Call convert_memory_address
11578 for -mindirect-branch-register.
11579 (tablejump): Likewise.
11580 (*sibcall_memory): Likewise.
11581 (*sibcall_value_memory): Likewise.
11582 Disallow peepholes of indirect call and jump via memory for
11583 -mindirect-branch-register.
11584 (*call_pop): Replace m with Bw.
11585 (*call_value_pop): Likewise.
11586 (*sibcall_pop_memory): Replace m with Bs.
11587 * config/i386/i386.opt (mindirect-branch-register): New option.
11588 * doc/invoke.texi: Document -mindirect-branch-register option.
11590 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11592 * config/i386/i386-protos.h (ix86_output_function_return): New.
11593 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11594 set function_return_type.
11595 (indirect_thunk_name): Add ret_p to indicate thunk for function
11597 (output_indirect_thunk_function): Pass false to
11598 indirect_thunk_name.
11599 (ix86_output_indirect_branch_via_reg): Likewise.
11600 (ix86_output_indirect_branch_via_push): Likewise.
11601 (output_indirect_thunk_function): Create alias for function
11602 return thunk if regno < 0.
11603 (ix86_output_function_return): New function.
11604 (ix86_handle_fndecl_attribute): Handle function_return.
11605 (ix86_attribute_table): Add function_return.
11606 * config/i386/i386.h (machine_function): Add
11607 function_return_type.
11608 * config/i386/i386.md (simple_return_internal): Use
11609 ix86_output_function_return.
11610 (simple_return_internal_long): Likewise.
11611 * config/i386/i386.opt (mfunction-return=): New option.
11612 (indirect_branch): Mention -mfunction-return=.
11613 * doc/extend.texi: Document function_return function attribute.
11614 * doc/invoke.texi: Document -mfunction-return= option.
11616 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11618 * config/i386/i386-opts.h (indirect_branch): New.
11619 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11620 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11621 with local indirect jump when converting indirect call and jump.
11622 (ix86_set_indirect_branch_type): New.
11623 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11624 (indirectlabelno): New.
11625 (indirect_thunk_needed): Likewise.
11626 (indirect_thunk_bnd_needed): Likewise.
11627 (indirect_thunks_used): Likewise.
11628 (indirect_thunks_bnd_used): Likewise.
11629 (INDIRECT_LABEL): Likewise.
11630 (indirect_thunk_name): Likewise.
11631 (output_indirect_thunk): Likewise.
11632 (output_indirect_thunk_function): Likewise.
11633 (ix86_output_indirect_branch_via_reg): Likewise.
11634 (ix86_output_indirect_branch_via_push): Likewise.
11635 (ix86_output_indirect_branch): Likewise.
11636 (ix86_output_indirect_jmp): Likewise.
11637 (ix86_code_end): Call output_indirect_thunk_function if needed.
11638 (ix86_output_call_insn): Call ix86_output_indirect_branch if
11640 (ix86_handle_fndecl_attribute): Handle indirect_branch.
11641 (ix86_attribute_table): Add indirect_branch.
11642 * config/i386/i386.h (machine_function): Add indirect_branch_type
11643 and has_local_indirect_jump.
11644 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11646 (tablejump): Likewise.
11647 (*indirect_jump): Use ix86_output_indirect_jmp.
11648 (*tablejump_1): Likewise.
11649 (simple_return_indirect_internal): Likewise.
11650 * config/i386/i386.opt (mindirect-branch=): New option.
11651 (indirect_branch): New.
11654 (thunk-inline): Likewise.
11655 (thunk-extern): Likewise.
11656 * doc/extend.texi: Document indirect_branch function attribute.
11657 * doc/invoke.texi: Document -mindirect-branch= option.
11659 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
11662 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11664 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
11666 * ipa-inline.c (want_inline_small_function_p): Return false if
11667 inlining has already failed with CIF_FINAL_ERROR.
11668 (update_caller_keys): Call want_inline_small_function_p before
11670 (update_callee_keys): Likewise.
11672 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11674 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11676 (rs6000_quadword_masked_address_p): Likewise.
11677 (quad_aligned_load_p): Likewise.
11678 (quad_aligned_store_p): Likewise.
11679 (const_load_sequence_p): Add comment to describe the outer-most loop.
11680 (mimic_memory_attributes_and_flags): New function.
11681 (rs6000_gen_stvx): Likewise.
11682 (replace_swapped_aligned_store): Likewise.
11683 (rs6000_gen_lvx): Likewise.
11684 (replace_swapped_aligned_load): Likewise.
11685 (replace_swapped_load_constant): Capitalize argument name in
11686 comment describing this function.
11687 (rs6000_analyze_swaps): Add a third pass to search for vector loads
11688 and stores that access quad-word aligned addresses and replace
11689 with stvx or lvx instructions when appropriate.
11690 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11691 New function prototype.
11692 (rs6000_quadword_masked_address_p): Likewise.
11693 (rs6000_gen_lvx): Likewise.
11694 (rs6000_gen_stvx): Likewise.
11695 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11696 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11697 when memory address is aligned.
11698 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11699 this split to select lvx instruction when memory address is aligned.
11700 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11701 instruction when memory address is aligned.
11702 (*vsx_le_perm_load_v16qi): Likewise.
11703 (four unnamed splitters): Modify to select the stvx instruction
11704 when memory is aligned.
11706 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
11708 * predict.c (determine_unlikely_bbs): Handle correctly BBs
11709 which appears in the queue multiple times.
11711 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11712 Alan Hayward <alan.hayward@arm.com>
11713 David Sherwood <david.sherwood@arm.com>
11715 * tree-vectorizer.h (vec_lower_bound): New structure.
11716 (_loop_vec_info): Add check_nonzero and lower_bounds.
11717 (LOOP_VINFO_CHECK_NONZERO): New macro.
11718 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11719 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11720 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11721 fields. Make seg_len the distance travelled, not including the
11723 (dr_direction_indicator): Declare.
11724 (dr_zero_step_indicator): Likewise.
11725 (dr_known_forward_stride_p): Likewise.
11726 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
11728 (runtime_alias_check_p): Allow runtime alias checks with
11730 (operator ==): Compare access_size and align.
11731 (prune_runtime_alias_test_list): Rework for new distinction between
11732 the access_size and seg_len.
11733 (create_intersect_range_checks_index): Likewise. Cope with polynomial
11735 (get_segment_min_max): New function.
11736 (create_intersect_range_checks): Use it.
11737 (dr_step_indicator): New function.
11738 (dr_direction_indicator): Likewise.
11739 (dr_zero_step_indicator): Likewise.
11740 (dr_known_forward_stride_p): Likewise.
11741 * tree-loop-distribution.c (data_ref_segment_size): Return
11742 DR_STEP * (niters - 1).
11743 (compute_alias_check_pairs): Update call to the dr_with_seg_len
11745 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
11746 (vect_preserves_scalar_order_p): New function, split out from...
11747 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
11748 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
11749 (vect_vfa_access_size): New function.
11750 (vect_vfa_align): Likewise.
11751 (vect_compile_time_alias): Take access_size_a and access_b arguments.
11752 (dump_lower_bound): New function.
11753 (vect_check_lower_bound): Likewise.
11754 (vect_small_gap_p): Likewise.
11755 (vectorizable_with_step_bound_p): Likewise.
11756 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
11757 depencies if the vectorization factor is 1. Convert the checks
11758 for nonzero steps into checks on the bounds of DR_STEP. Try using
11759 a bunds check for variable steps if the minimum required step is
11760 relatively small. Update calls to the dr_with_seg_len
11761 constructor and to vect_compile_time_alias.
11762 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
11764 (vect_loop_versioning): Call it.
11765 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
11767 (vect_estimate_min_profitable_iters): Account for any bounds checks.
11769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11770 Alan Hayward <alan.hayward@arm.com>
11771 David Sherwood <david.sherwood@arm.com>
11773 * doc/sourcebuild.texi (vect_scatter_store): Document.
11774 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
11776 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
11778 * genopinit.c (main): Add supports_vec_scatter_store and
11779 supports_vec_scatter_store_cached to target_optabs.
11780 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
11781 IFN_MASK_SCATTER_STORE.
11782 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
11784 * internal-fn.h (internal_store_fn_p): Declare.
11785 (internal_fn_stored_value_index): Likewise.
11786 * internal-fn.c (scatter_store_direct): New macro.
11787 (expand_scatter_store_optab_fn): New function.
11788 (direct_scatter_store_optab_supported_p): New macro.
11789 (internal_store_fn_p): New function.
11790 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
11791 IFN_MASK_SCATTER_STORE.
11792 (internal_fn_mask_index): Likewise.
11793 (internal_fn_stored_value_index): New function.
11794 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
11795 for scatter stores.
11796 * optabs-query.h (supports_vec_scatter_store_p): Declare.
11797 * optabs-query.c (supports_vec_scatter_store_p): New function.
11798 * tree-vectorizer.h (vect_get_store_rhs): Declare.
11799 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
11800 true for scatter stores.
11801 (vect_gather_scatter_fn_p): Handle scatter stores too.
11802 (vect_check_gather_scatter): Consider using scatter stores if
11803 supports_vec_scatter_store_p.
11804 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
11805 scatter stores too.
11806 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11807 internal_fn_stored_value_index.
11808 (check_load_store_masking): Handle scatter stores too.
11809 (vect_get_store_rhs): Make public.
11810 (vectorizable_call): Use internal_store_fn_p.
11811 (vectorizable_store): Handle scatter store internal functions.
11812 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
11813 when deciding whether the end of the group has been reached.
11814 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
11815 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
11816 (mask_scatter_store<mode>): New insns.
11818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11819 Alan Hayward <alan.hayward@arm.com>
11820 David Sherwood <david.sherwood@arm.com>
11822 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
11823 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
11824 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
11826 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
11827 Use vect_truncate_gather_scatter_offset if we can't treat the
11828 operation as a normal gather load or scatter store.
11829 (get_group_load_store_type): Take the gather_scatter_info
11830 as argument. Try using a gather load or scatter store for
11831 single-element groups.
11832 (get_load_store_type): Update calls to get_group_load_store_type
11833 and vect_use_strided_gather_scatters_p.
11835 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11836 Alan Hayward <alan.hayward@arm.com>
11837 David Sherwood <david.sherwood@arm.com>
11839 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
11840 optional tree argument.
11841 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
11843 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
11844 but continue to use the current value as a fallback.
11845 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
11846 to compare the updates.
11847 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
11848 (get_load_store_type): Use it when handling a strided access.
11849 (vect_get_strided_load_store_ops): New function.
11850 (vect_get_data_ptr_increment): Likewise.
11851 (vectorizable_load): Handle strided gather loads. Always pass
11852 a step to vect_create_data_ref_ptr and bump_vector_ptr.
11854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11855 Alan Hayward <alan.hayward@arm.com>
11856 David Sherwood <david.sherwood@arm.com>
11858 * doc/md.texi (gather_load@var{m}): Document.
11859 (mask_gather_load@var{m}): Likewise.
11860 * genopinit.c (main): Add supports_vec_gather_load and
11861 supports_vec_gather_load_cached to target_optabs.
11862 * optabs-tree.c (init_tree_optimization_optabs): Use
11863 ggc_cleared_alloc to allocate target_optabs.
11864 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
11865 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
11867 * internal-fn.h (internal_load_fn_p): Declare.
11868 (internal_gather_scatter_fn_p): Likewise.
11869 (internal_fn_mask_index): Likewise.
11870 (internal_gather_scatter_fn_supported_p): Likewise.
11871 * internal-fn.c (gather_load_direct): New macro.
11872 (expand_gather_load_optab_fn): New function.
11873 (direct_gather_load_optab_supported_p): New macro.
11874 (direct_internal_fn_optab): New function.
11875 (internal_load_fn_p): Likewise.
11876 (internal_gather_scatter_fn_p): Likewise.
11877 (internal_fn_mask_index): Likewise.
11878 (internal_gather_scatter_fn_supported_p): Likewise.
11879 * optabs-query.c (supports_at_least_one_mode_p): New function.
11880 (supports_vec_gather_load_p): Likewise.
11881 * optabs-query.h (supports_vec_gather_load_p): Declare.
11882 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
11883 and memory_type field.
11884 (NUM_PATTERNS): Bump to 15.
11885 * tree-vect-data-refs.c: Include internal-fn.h.
11886 (vect_gather_scatter_fn_p): New function.
11887 (vect_describe_gather_scatter_call): Likewise.
11888 (vect_check_gather_scatter): Try using internal functions for
11889 gather loads. Recognize existing calls to a gather load function.
11890 (vect_analyze_data_refs): Consider using gather loads if
11891 supports_vec_gather_load_p.
11892 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
11893 (vect_get_gather_scatter_offset_type): Likewise.
11894 (vect_convert_mask_for_vectype): Likewise.
11895 (vect_add_conversion_to_patterm): Likewise.
11896 (vect_try_gather_scatter_pattern): Likewise.
11897 (vect_recog_gather_scatter_pattern): New pattern recognizer.
11898 (vect_vect_recog_func_ptrs): Add it.
11899 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11900 internal_fn_mask_index and internal_gather_scatter_fn_p.
11901 (check_load_store_masking): Take the gather_scatter_info as an
11902 argument and handle gather loads.
11903 (vect_get_gather_scatter_ops): New function.
11904 (vectorizable_call): Check internal_load_fn_p.
11905 (vectorizable_load): Likewise. Handle gather load internal
11907 (vectorizable_store): Update call to check_load_store_masking.
11908 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
11909 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
11910 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
11911 (aarch64_gather_scale_operand_d): New predicates.
11912 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
11913 (mask_gather_load<mode>): New insns.
11915 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11916 Alan Hayward <alan.hayward@arm.com>
11917 David Sherwood <david.sherwood@arm.com>
11919 * optabs.def (fold_left_plus_optab): New optab.
11920 * doc/md.texi (fold_left_plus_@var{m}): Document.
11921 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
11922 * internal-fn.c (fold_left_direct): Define.
11923 (expand_fold_left_optab_fn): Likewise.
11924 (direct_fold_left_optab_supported_p): Likewise.
11925 * fold-const-call.c (fold_const_fold_left): New function.
11926 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
11927 * tree-parloops.c (valid_reduction_p): New function.
11928 (gather_scalar_reductions): Use it.
11929 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
11930 (vect_finish_replace_stmt): Declare.
11931 * tree-vect-loop.c (fold_left_reduction_fn): New function.
11932 (needs_fold_left_reduction_p): New function, split out from...
11933 (vect_is_simple_reduction): ...here. Accept reductions that
11934 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
11935 (vect_force_simple_reduction): Also store the reduction type in
11936 the assignment's STMT_VINFO_REDUC_TYPE.
11937 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
11938 (merge_with_identity): New function.
11939 (vect_expand_fold_left): Likewise.
11940 (vectorize_fold_left_reduction): Likewise.
11941 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
11942 scalar phi in place for it. Check for target support and reject
11943 cases that would reassociate the operation. Defer the transform
11944 phase to vectorize_fold_left_reduction.
11945 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
11946 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
11947 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
11949 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11951 * tree-if-conv.c (predicate_mem_writes): Remove redundant
11952 call to ifc_temp_var.
11954 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11955 Alan Hayward <alan.hayward@arm.com>
11956 David Sherwood <david.sherwood@arm.com>
11958 * target.def (legitimize_address_displacement): Take the original
11959 offset as a poly_int.
11960 * targhooks.h (default_legitimize_address_displacement): Update
11962 * targhooks.c (default_legitimize_address_displacement): Likewise.
11963 * doc/tm.texi: Regenerate.
11964 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
11965 as an argument, moving assert of ad->disp == ad->disp_term to...
11966 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
11967 Try calling targetm.legitimize_address_displacement before expanding
11968 the address rather than afterwards, and adjust for the new interface.
11969 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
11970 Match the new hook interface. Handle SVE addresses.
11971 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
11972 new hook interface.
11974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11976 * Makefile.in (OBJS): Add early-remat.o.
11977 * target.def (select_early_remat_modes): New hook.
11978 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
11979 * doc/tm.texi: Regenerate.
11980 * targhooks.h (default_select_early_remat_modes): Declare.
11981 * targhooks.c (default_select_early_remat_modes): New function.
11982 * timevar.def (TV_EARLY_REMAT): New timevar.
11983 * passes.def (pass_early_remat): New pass.
11984 * tree-pass.h (make_pass_early_remat): Declare.
11985 * early-remat.c: New file.
11986 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
11988 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
11990 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11991 Alan Hayward <alan.hayward@arm.com>
11992 David Sherwood <david.sherwood@arm.com>
11994 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
11995 vfm1 with a bound_epilog parameter.
11996 (vect_do_peeling): Update calls accordingly, and move the prologue
11997 call earlier in the function. Treat the base bound_epilog as 0 for
11998 fully-masked loops and retain vf - 1 for other loops. Add 1 to
11999 this base when peeling for gaps.
12000 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
12001 with fully-masked loops.
12002 (vect_estimate_min_profitable_iters): Handle the single peeled
12003 iteration in that case.
12005 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12006 Alan Hayward <alan.hayward@arm.com>
12007 David Sherwood <david.sherwood@arm.com>
12009 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
12010 single-element interleaving even if the size is not a power of 2.
12011 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
12012 accesses for single-element interleaving if the group size is
12015 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12016 Alan Hayward <alan.hayward@arm.com>
12017 David Sherwood <david.sherwood@arm.com>
12019 * doc/md.texi (fold_extract_last_@var{m}): Document.
12020 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
12021 * optabs.def (fold_extract_last_optab): New optab.
12022 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
12023 * internal-fn.c (fold_extract_direct): New macro.
12024 (expand_fold_extract_optab_fn): Likewise.
12025 (direct_fold_extract_optab_supported_p): Likewise.
12026 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
12027 * tree-vect-loop.c (vect_model_reduction_cost): Handle
12028 EXTRACT_LAST_REDUCTION.
12029 (get_initial_def_for_reduction): Do not create an initial vector
12030 for EXTRACT_LAST_REDUCTION reductions.
12031 (vectorizable_reduction): Leave the scalar phi in place for
12032 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
12033 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
12034 epilogue code for EXTRACT_LAST_REDUCTION and defer the
12035 transform phase to vectorizable_condition.
12036 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
12038 (vect_finish_stmt_generation): ...here.
12039 (vect_finish_replace_stmt): New function.
12040 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
12041 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
12043 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
12045 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12046 Alan Hayward <alan.hayward@arm.com>
12047 David Sherwood <david.sherwood@arm.com>
12049 * doc/md.texi (extract_last_@var{m}): Document.
12050 * optabs.def (extract_last_optab): New optab.
12051 * internal-fn.def (EXTRACT_LAST): New internal function.
12052 * internal-fn.c (cond_unary_direct): New macro.
12053 (expand_cond_unary_optab_fn): Likewise.
12054 (direct_cond_unary_optab_supported_p): Likewise.
12055 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
12056 loops using EXTRACT_LAST.
12057 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
12058 (extract_last_<mode>): ...this optab.
12059 (vec_extract<mode><Vel>): Update accordingly.
12061 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12062 Alan Hayward <alan.hayward@arm.com>
12063 David Sherwood <david.sherwood@arm.com>
12065 * target.def (empty_mask_is_expensive): New hook.
12066 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
12067 * doc/tm.texi: Regenerate.
12068 * targhooks.h (default_empty_mask_is_expensive): Declare.
12069 * targhooks.c (default_empty_mask_is_expensive): New function.
12070 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
12071 if the target says that empty masks are expensive.
12072 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
12074 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
12076 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12077 Alan Hayward <alan.hayward@arm.com>
12078 David Sherwood <david.sherwood@arm.com>
12080 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
12081 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
12082 (vect_use_loop_mask_for_alignment_p): New function.
12083 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
12084 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
12085 niters_skip argument. Make sure that the first niters_skip elements
12086 of the first iteration are inactive.
12087 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
12088 Update call to vect_set_loop_masks_directly.
12089 (get_misalign_in_elems): New function, split out from...
12090 (vect_gen_prolog_loop_niters): ...here.
12091 (vect_update_init_of_dr): Take a code argument that specifies whether
12092 the adjustment should be added or subtracted.
12093 (vect_update_init_of_drs): Likewise.
12094 (vect_prepare_for_masked_peels): New function.
12095 (vect_do_peeling): Skip prologue peeling if we're using a mask
12096 instead. Update call to vect_update_inits_of_drs.
12097 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12099 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
12100 alignment. Do not include the number of peeled iterations in
12101 the minimum threshold in that case.
12102 (vectorizable_induction): Adjust the start value down by
12103 LOOP_VINFO_MASK_SKIP_NITERS iterations.
12104 (vect_transform_loop): Call vect_prepare_for_masked_peels.
12105 Take the number of skipped iterations into account when calculating
12107 * tree-vect-stmts.c (vect_gen_while_not): New function.
12109 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12110 Alan Hayward <alan.hayward@arm.com>
12111 David Sherwood <david.sherwood@arm.com>
12113 * doc/sourcebuild.texi (vect_fully_masked): Document.
12114 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
12115 default value to 0.
12116 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
12118 (vect_analyze_loop_2): ...here. Don't check the vectorization
12119 factor against the number of loop iterations if the loop is
12122 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12123 Alan Hayward <alan.hayward@arm.com>
12124 David Sherwood <david.sherwood@arm.com>
12126 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
12127 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
12128 (dump_groups): Update accordingly.
12129 (iv_use::mem_type): New member variable.
12130 (address_p): New function.
12131 (record_use): Add a mem_type argument and initialize the new
12133 (record_group_use): Add a mem_type argument. Use address_p.
12134 Remove obsolete null checks of base_object. Update call to record_use.
12135 (find_interesting_uses_op): Update call to record_group_use.
12136 (find_interesting_uses_cond): Likewise.
12137 (find_interesting_uses_address): Likewise.
12138 (get_mem_type_for_internal_fn): New function.
12139 (find_address_like_use): Likewise.
12140 (find_interesting_uses_stmt): Try find_address_like_use before
12141 calling find_interesting_uses_op.
12142 (addr_offset_valid_p): Use the iv mem_type field as the type
12143 of the addressed memory.
12144 (add_autoinc_candidates): Likewise.
12145 (get_address_cost): Likewise.
12146 (split_small_address_groups_p): Use address_p.
12147 (split_address_groups): Likewise.
12148 (add_iv_candidate_for_use): Likewise.
12149 (autoinc_possible_for_pair): Likewise.
12150 (rewrite_groups): Likewise.
12151 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
12152 (determine_group_iv_cost): Update after split of USE_ADDRESS.
12153 (get_alias_ptr_type_for_ptr_address): New function.
12154 (rewrite_use_address): Rewrite address uses in calls that were
12155 identified by find_address_like_use.
12157 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12158 Alan Hayward <alan.hayward@arm.com>
12159 David Sherwood <david.sherwood@arm.com>
12161 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
12163 * gimple-expr.h (is_gimple_addressable: Likewise.
12164 * gimple-expr.c (is_gimple_address): Likewise.
12165 * internal-fn.c (expand_call_mem_ref): New function.
12166 (expand_mask_load_optab_fn): Use it.
12167 (expand_mask_store_optab_fn): Likewise.
12169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12170 Alan Hayward <alan.hayward@arm.com>
12171 David Sherwood <david.sherwood@arm.com>
12173 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
12174 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
12175 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
12176 (cond_umax@var{mode}): Document.
12177 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
12178 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
12179 (cond_umin_optab, cond_umax_optab): New optabs.
12180 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
12181 (COND_IOR, COND_XOR): New internal functions.
12182 * internal-fn.h (get_conditional_internal_fn): Declare.
12183 * internal-fn.c (cond_binary_direct): New macro.
12184 (expand_cond_binary_optab_fn): Likewise.
12185 (direct_cond_binary_optab_supported_p): Likewise.
12186 (get_conditional_internal_fn): New function.
12187 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
12188 Cope with reduction statements that are vectorized as calls rather
12190 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
12191 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
12192 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
12193 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12194 (UNSPEC_COND_EOR): New unspecs.
12195 (optab): Add mappings for them.
12196 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
12197 (sve_int_op, sve_fp_op): New int attributes.
12199 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12200 Alan Hayward <alan.hayward@arm.com>
12201 David Sherwood <david.sherwood@arm.com>
12203 * optabs.def (while_ult_optab): New optab.
12204 * doc/md.texi (while_ult@var{m}@var{n}): Document.
12205 * internal-fn.def (WHILE_ULT): New internal function.
12206 * internal-fn.h (direct_internal_fn_supported_p): New override
12207 that takes two types as argument.
12208 * internal-fn.c (while_direct): New macro.
12209 (expand_while_optab_fn): New function.
12210 (convert_optab_supported_p): Likewise.
12211 (direct_while_optab_supported_p): New macro.
12212 * wide-int.h (wi::udiv_ceil): New function.
12213 * tree-vectorizer.h (rgroup_masks): New structure.
12214 (vec_loop_masks): New typedef.
12215 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
12216 and fully_masked_p.
12217 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
12218 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
12219 (vect_max_vf): New function.
12220 (slpeel_make_loop_iterate_ntimes): Delete.
12221 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
12222 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
12223 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
12224 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
12225 internal-fn.h, stor-layout.h and optabs-query.h.
12226 (vect_set_loop_mask): New function.
12227 (add_preheader_seq): Likewise.
12228 (add_header_seq): Likewise.
12229 (interleave_supported_p): Likewise.
12230 (vect_maybe_permute_loop_masks): Likewise.
12231 (vect_set_loop_masks_directly): Likewise.
12232 (vect_set_loop_condition_masked): Likewise.
12233 (vect_set_loop_condition_unmasked): New function, split out from
12234 slpeel_make_loop_iterate_ntimes.
12235 (slpeel_make_loop_iterate_ntimes): Rename to..
12236 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
12237 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
12238 (vect_do_peeling): Update call accordingly.
12239 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
12241 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12242 mask_compare_type, can_fully_mask_p and fully_masked_p.
12243 (release_vec_loop_masks): New function.
12244 (_loop_vec_info): Use it to free the loop masks.
12245 (can_produce_all_loop_masks_p): New function.
12246 (vect_get_max_nscalars_per_iter): Likewise.
12247 (vect_verify_full_masking): Likewise.
12248 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
12249 retries, and free the mask rgroups before retrying. Check loop-wide
12250 reasons for disallowing fully-masked loops. Make the final decision
12251 about whether use a fully-masked loop or not.
12252 (vect_estimate_min_profitable_iters): Do not assume that peeling
12253 for the number of iterations will be needed for fully-masked loops.
12254 (vectorizable_reduction): Disable fully-masked loops.
12255 (vectorizable_live_operation): Likewise.
12256 (vect_halve_mask_nunits): New function.
12257 (vect_double_mask_nunits): Likewise.
12258 (vect_record_loop_mask): Likewise.
12259 (vect_get_loop_mask): Likewise.
12260 (vect_transform_loop): Handle the case in which the final loop
12261 iteration might handle a partial vector. Call vect_set_loop_condition
12262 instead of slpeel_make_loop_iterate_ntimes.
12263 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
12264 (check_load_store_masking): New function.
12265 (prepare_load_store_mask): Likewise.
12266 (vectorizable_store): Handle fully-masked loops.
12267 (vectorizable_load): Likewise.
12268 (supportable_widening_operation): Use vect_halve_mask_nunits for
12270 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
12271 (vect_gen_while): New function.
12272 * config/aarch64/aarch64.md (umax<mode>3): New expander.
12273 (aarch64_uqdec<mode>): New insn.
12275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12276 Alan Hayward <alan.hayward@arm.com>
12277 David Sherwood <david.sherwood@arm.com>
12279 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
12280 (reduc_xor_scal_optab): New optabs.
12281 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
12282 (reduc_xor_scal_@var{m}): Document.
12283 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
12284 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
12285 internal functions.
12286 * fold-const-call.c (fold_const_call): Handle them.
12287 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
12288 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
12289 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
12290 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
12291 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
12292 (UNSPEC_XORV): New unspecs.
12293 (optab): Add entries for them.
12294 (BITWISEV): New int iterator.
12295 (bit_reduc_op): New int attributes.
12297 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12298 Alan Hayward <alan.hayward@arm.com>
12299 David Sherwood <david.sherwood@arm.com>
12301 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
12302 * internal-fn.def (VEC_SHL_INSERT): New internal function.
12303 * optabs.def (vec_shl_insert_optab): New optab.
12304 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
12305 (duplicate_and_interleave): Likewise.
12306 * tree-vect-loop.c: Include internal-fn.h.
12307 (neutral_op_for_slp_reduction): New function, split out from
12308 get_initial_defs_for_reduction.
12309 (get_initial_def_for_reduction): Handle option 2 for variable-length
12310 vectors by loading the neutral value into a vector and then shifting
12311 the initial value into element 0.
12312 (get_initial_defs_for_reduction): Replace the code argument with
12313 the neutral value calculated by neutral_op_for_slp_reduction.
12314 Use gimple_build_vector for constant-length vectors.
12315 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
12316 but the first group_size elements have a neutral value.
12317 Use duplicate_and_interleave otherwise.
12318 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
12319 Update call to get_initial_defs_for_reduction. Handle SLP
12320 reductions for variable-length vectors by creating one vector
12321 result for each scalar result, with the elements associated
12322 with other scalar results stubbed out with the neutral value.
12323 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
12324 Require IFN_VEC_SHL_INSERT for double reductions on
12325 variable-length vectors, or SLP reductions that have
12326 a neutral value. Require can_duplicate_and_interleave_p
12327 support for variable-length unchained SLP reductions if there
12328 is no neutral value, such as for MIN/MAX reductions. Also require
12329 the number of vector elements to be a multiple of the number of
12330 SLP statements when doing variable-length unchained SLP reductions.
12331 Update call to vect_create_epilog_for_reduction.
12332 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
12333 and remove initial values.
12334 (duplicate_and_interleave): Make public.
12335 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
12336 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
12338 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12339 Alan Hayward <alan.hayward@arm.com>
12340 David Sherwood <david.sherwood@arm.com>
12342 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
12343 (can_duplicate_and_interleave_p): New function.
12344 (vect_get_and_check_slp_defs): Take the vector of statements
12345 rather than just the current one. Remove excess parentheses.
12346 Restriction rejectinon of vect_constant_def and vect_external_def
12347 for variable-length vectors to boolean types, or types for which
12348 can_duplicate_and_interleave_p is false.
12349 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
12350 (duplicate_and_interleave): New function.
12351 (vect_get_constant_vectors): Use gimple_build_vector for
12352 constant-length vectors and suitable variable-length constant
12353 vectors. Use duplicate_and_interleave for other variable-length
12354 vectors. Don't defer the update when inserting new statements.
12356 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12357 Alan Hayward <alan.hayward@arm.com>
12358 David Sherwood <david.sherwood@arm.com>
12360 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
12361 min_profitable_iters doesn't go negative.
12363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12364 Alan Hayward <alan.hayward@arm.com>
12365 David Sherwood <david.sherwood@arm.com>
12367 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
12368 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
12369 * optabs.def (vec_mask_load_lanes_optab): New optab.
12370 (vec_mask_store_lanes_optab): Likewise.
12371 * internal-fn.def (MASK_LOAD_LANES): New internal function.
12372 (MASK_STORE_LANES): Likewise.
12373 * internal-fn.c (mask_load_lanes_direct): New macro.
12374 (mask_store_lanes_direct): Likewise.
12375 (expand_mask_load_optab_fn): Handle masked operations.
12376 (expand_mask_load_lanes_optab_fn): New macro.
12377 (expand_mask_store_optab_fn): Handle masked operations.
12378 (expand_mask_store_lanes_optab_fn): New macro.
12379 (direct_mask_load_lanes_optab_supported_p): Likewise.
12380 (direct_mask_store_lanes_optab_supported_p): Likewise.
12381 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
12383 (vect_load_lanes_supported): Likewise.
12384 * tree-vect-data-refs.c (strip_conversion): New function.
12385 (can_group_stmts_p): Likewise.
12386 (vect_analyze_data_ref_accesses): Use it instead of checking
12387 for a pair of assignments.
12388 (vect_store_lanes_supported): Take a masked_p parameter.
12389 (vect_load_lanes_supported): Likewise.
12390 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
12391 vect_store_lanes_supported and vect_load_lanes_supported.
12392 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12393 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
12394 parameter. Don't allow gaps for masked accesses.
12395 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
12396 and vect_load_lanes_supported.
12397 (get_load_store_type): Take a masked_p parameter and update
12398 call to get_group_load_store_type.
12399 (vectorizable_store): Update call to get_load_store_type.
12400 Handle IFN_MASK_STORE_LANES.
12401 (vectorizable_load): Update call to get_load_store_type.
12402 Handle IFN_MASK_LOAD_LANES.
12404 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12405 Alan Hayward <alan.hayward@arm.com>
12406 David Sherwood <david.sherwood@arm.com>
12408 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
12410 * config/aarch64/aarch64-protos.h
12411 (aarch64_sve_struct_memory_operand_p): Declare.
12412 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
12413 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
12414 (VPRED, vpred): Handle SVE structure modes.
12415 * config/aarch64/constraints.md (Utx): New constraint.
12416 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
12417 (aarch64_sve_struct_nonimmediate_operand): New predicates.
12418 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
12419 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
12420 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
12421 structure modes. Split into pieces after RA.
12422 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
12423 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
12425 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
12426 SVE structure modes.
12427 (aarch64_classify_address): Likewise.
12428 (sizetochar): Move earlier in file.
12429 (aarch64_print_operand): Handle SVE register lists.
12430 (aarch64_array_mode): New function.
12431 (aarch64_sve_struct_memory_operand_p): Likewise.
12432 (TARGET_ARRAY_MODE): Redefine.
12434 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12435 Alan Hayward <alan.hayward@arm.com>
12436 David Sherwood <david.sherwood@arm.com>
12438 * target.def (array_mode): New target hook.
12439 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
12440 * doc/tm.texi: Regenerate.
12441 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
12442 * hooks.c (hook_optmode_mode_uhwi_none): New function.
12443 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
12444 targetm.array_mode.
12445 * stor-layout.c (mode_for_array): Likewise. Support polynomial
12448 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12449 Alan Hayward <alan.hayward@arm.com>
12450 David Sherwood <david.sherwood@arm.com>
12452 * fold-const.c (fold_binary_loc): Check the argument types
12453 rather than the result type when testing for a vector operation.
12455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12457 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
12458 * doc/tm.texi: Regenerate.
12460 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12461 Alan Hayward <alan.hayward@arm.com>
12462 David Sherwood <david.sherwood@arm.com>
12464 * doc/invoke.texi (-msve-vector-bits=): Document new option.
12465 (sve): Document new AArch64 extension.
12466 * doc/md.texi (w): Extend the description of the AArch64
12467 constraint to include SVE vectors.
12468 (Upl, Upa): Document new AArch64 predicate constraints.
12469 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
12471 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
12472 (msve-vector-bits=): New option.
12473 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
12474 SVE when these are disabled.
12475 (sve): New extension.
12476 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
12477 modes. Adjust their number of units based on aarch64_sve_vg.
12478 (MAX_BITSIZE_MODE_ANY_MODE): Define.
12479 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
12480 aarch64_addr_query_type.
12481 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
12482 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
12483 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
12484 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
12485 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
12486 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
12487 (aarch64_simd_imm_zero_p): Delete.
12488 (aarch64_check_zero_based_sve_index_immediate): Declare.
12489 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12490 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12491 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12492 (aarch64_sve_float_mul_immediate_p): Likewise.
12493 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12494 rather than an rtx.
12495 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
12496 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
12497 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
12498 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
12499 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
12500 (aarch64_regmode_natural_size): Likewise.
12501 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
12502 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
12504 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
12505 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
12506 for VG and the SVE predicate registers.
12507 (V_ALIASES): Add a "z"-prefixed alias.
12508 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
12509 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
12510 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
12511 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
12512 (REG_CLASS_NAMES): Add entries for them.
12513 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
12514 and the predicate registers.
12515 (aarch64_sve_vg): Declare.
12516 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
12517 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
12518 (REGMODE_NATURAL_SIZE): Define.
12519 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
12521 * config/aarch64/aarch64.c: Include cfgrtl.h.
12522 (simd_immediate_info): Add a constructor for series vectors,
12523 and an associated step field.
12524 (aarch64_sve_vg): New variable.
12525 (aarch64_dbx_register_number): Handle VG and the predicate registers.
12526 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
12527 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
12528 (VEC_ANY_DATA, VEC_STRUCT): New constants.
12529 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
12530 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
12531 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
12532 (aarch64_get_mask_mode): New functions.
12533 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
12534 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
12535 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
12536 predicate modes and predicate registers. Explicitly restrict
12537 GPRs to modes of 16 bytes or smaller. Only allow FP registers
12538 to store a vector mode if it is recognized by
12539 aarch64_classify_vector_mode.
12540 (aarch64_regmode_natural_size): New function.
12541 (aarch64_hard_regno_caller_save_mode): Return the original mode
12543 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12544 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12545 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12546 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12548 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
12549 does not overlap dest if the function is frame-related. Handle
12551 (aarch64_split_add_offset): New function.
12552 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12553 them aarch64_add_offset.
12554 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12555 and update call to aarch64_sub_sp.
12556 (aarch64_add_cfa_expression): New function.
12557 (aarch64_expand_prologue): Pass extra temporary registers to the
12558 functions above. Handle the case in which we need to emit new
12559 DW_CFA_expressions for registers that were originally saved
12560 relative to the stack pointer, but now have to be expressed
12561 relative to the frame pointer.
12562 (aarch64_output_mi_thunk): Pass extra temporary registers to the
12564 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
12565 IP0 and IP1 values for SVE frames.
12566 (aarch64_expand_vec_series): New function.
12567 (aarch64_expand_sve_widened_duplicate): Likewise.
12568 (aarch64_expand_sve_const_vector): Likewise.
12569 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12570 Handle SVE constants. Use emit_move_insn to move a force_const_mem
12571 into the register, rather than emitting a SET directly.
12572 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12573 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12574 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12575 (offset_9bit_signed_scaled_p): New functions.
12576 (aarch64_replicate_bitmask_imm): New function.
12577 (aarch64_bitmask_imm): Use it.
12578 (aarch64_cannot_force_const_mem): Reject expressions involving
12579 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
12580 (aarch64_classify_index): Handle SVE indices, by requiring
12581 a plain register index with a scale that matches the element size.
12582 (aarch64_classify_address): Handle SVE addresses. Assert that
12583 the mode of the address is VOIDmode or an integer mode.
12584 Update call to aarch64_classify_symbol.
12585 (aarch64_classify_symbolic_expression): Update call to
12586 aarch64_classify_symbol.
12587 (aarch64_const_vec_all_in_range_p): New function.
12588 (aarch64_print_vector_float_operand): Likewise.
12589 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
12590 "vN" for FP registers with SVE modes. Handle (const ...) vectors
12591 and the FP immediates 1.0 and 0.5.
12592 (aarch64_print_address_internal): Handle SVE addresses.
12593 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12594 (aarch64_regno_regclass): Handle predicate registers.
12595 (aarch64_secondary_reload): Handle big-endian reloads of SVE
12597 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12598 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12599 (aarch64_convert_sve_vector_bits): New function.
12600 (aarch64_override_options): Use it to handle -msve-vector-bits=.
12601 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12602 rather than an rtx.
12603 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12604 Handle SVE vector and predicate modes. Accept VL-based constants
12605 that need only one temporary register, and VL offsets that require
12606 no temporary registers.
12607 (aarch64_conditional_register_usage): Mark the predicate registers
12608 as fixed if SVE isn't available.
12609 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12610 Return true for SVE vector and predicate modes.
12611 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12612 rather than an unsigned int. Handle SVE modes.
12613 (aarch64_preferred_simd_mode): Update call accordingly. Handle
12615 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12617 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12618 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12619 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12620 (aarch64_sve_float_mul_immediate_p): New functions.
12621 (aarch64_sve_valid_immediate): New function.
12622 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12623 Explicitly reject structure modes. Check for INDEX constants.
12624 Handle PTRUE and PFALSE constants.
12625 (aarch64_check_zero_based_sve_index_immediate): New function.
12626 (aarch64_simd_imm_zero_p): Delete.
12627 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12628 vector modes. Accept constants in the range of CNT[BHWD].
12629 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12630 ask for an Advanced SIMD mode.
12631 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12632 (aarch64_simd_vector_alignment): Handle SVE predicates.
12633 (aarch64_vectorize_preferred_vector_alignment): New function.
12634 (aarch64_simd_vector_alignment_reachable): Use it instead of
12636 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12637 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12639 (MAX_VECT_LEN): Delete.
12640 (expand_vec_perm_d): Add a vec_flags field.
12641 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12642 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12643 (aarch64_evpc_ext): Don't apply a big-endian lane correction
12645 (aarch64_evpc_rev): Rename to...
12646 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
12647 (aarch64_evpc_rev_global): New function.
12648 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12649 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12651 (aarch64_evpc_sve_tbl): New function.
12652 (aarch64_expand_vec_perm_const_1): Update after rename of
12653 aarch64_evpc_rev. Handle SVE permutes too, trying
12654 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12655 than aarch64_evpc_tbl.
12656 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12657 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12658 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12659 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12660 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12661 (aarch64_expand_sve_vcond): New functions.
12662 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12663 of aarch64_vector_mode_p.
12664 (aarch64_dwarf_poly_indeterminate_value): New function.
12665 (aarch64_compute_pressure_classes): Likewise.
12666 (aarch64_can_change_mode_class): Likewise.
12667 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12668 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12669 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12670 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12671 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12672 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12673 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12674 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12676 (Dn, Dl, Dr): Accept const as well as const_vector.
12677 (Dz): Likewise. Compare against CONST0_RTX.
12678 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12679 of "vector" where appropriate.
12680 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12681 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12682 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12683 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12684 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12685 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12686 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12687 (v_int_equiv): Extend to SVE modes.
12688 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12690 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12691 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12692 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12693 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12694 (SVE_COND_FP_CMP): New int iterators.
12695 (perm_hilo): Handle the new unpack unspecs.
12696 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12698 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12699 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12700 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12701 (aarch64_equality_operator, aarch64_constant_vector_operand)
12702 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12703 (aarch64_sve_nonimmediate_operand): Likewise.
12704 (aarch64_sve_general_operand): Likewise.
12705 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12706 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12707 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12708 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12709 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12710 (aarch64_sve_float_arith_immediate): Likewise.
12711 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12712 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12713 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12714 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12715 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12716 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12717 (aarch64_sve_float_arith_operand): Likewise.
12718 (aarch64_sve_float_arith_with_sub_operand): Likewise.
12719 (aarch64_sve_float_mul_operand): Likewise.
12720 (aarch64_sve_vec_perm_operand): Likewise.
12721 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12722 (aarch64_mov_operand): Accept const_poly_int and const_vector.
12723 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12724 as well as const_vector.
12725 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
12726 in file. Use CONST0_RTX and CONSTM1_RTX.
12727 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
12728 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
12729 Use aarch64_simd_imm_zero.
12730 * config/aarch64/aarch64-sve.md: New file.
12731 * config/aarch64/aarch64.md: Include it.
12732 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
12733 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
12734 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
12735 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
12736 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
12737 (sve): New attribute.
12738 (enabled): Disable instructions with the sve attribute unless
12740 (movqi, movhi): Pass CONST_POLY_INT operaneds through
12741 aarch64_expand_mov_immediate.
12742 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
12743 CNT[BHSD] immediates.
12744 (movti): Split CONST_POLY_INT moves into two halves.
12745 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
12746 Split additions that need a temporary here if the destination
12747 is the stack pointer.
12748 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
12749 (*add<mode>3_poly_1): New instruction.
12750 (set_clobber_cc): New expander.
12752 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12754 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
12755 parameter and use it instead of GET_MODE_SIZE (innermode). Use
12756 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
12757 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
12758 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
12759 Change innermode from fixed_mode_size to machine_mode.
12760 (simplify_subreg): Update call accordingly. Handle a constant-sized
12761 subreg of a variable-length CONST_VECTOR.
12763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12764 Alan Hayward <alan.hayward@arm.com>
12765 David Sherwood <david.sherwood@arm.com>
12767 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
12768 (add_offset_to_base): New function, split out from...
12769 (create_mem_ref): ...here. When handling a scale other than 1,
12770 check first whether the address is valid without the offset.
12771 Add it into the base if so, leaving the index and scale as-is.
12773 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12776 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
12777 fold_for_warn before checking if arg2 is INTEGER_CST.
12779 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
12781 * config/rs6000/predicates.md (load_multiple_operation): Delete.
12782 (store_multiple_operation): Delete.
12783 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
12784 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
12785 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
12786 guarded by TARGET_STRING.
12787 (rs6000_output_load_multiple): Delete.
12788 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
12789 OPTION_MASK_STRING / TARGET_STRING handling.
12790 (print_operand) <'N', 'O'>: Add comment that these are unused now.
12791 (const rs6000_opt_masks) <"string">: Change mask to 0.
12792 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
12793 (MASK_STRING): Delete.
12794 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
12796 (load_multiple): Delete.
12803 (store_multiple): Delete.
12810 (movmemsi_8reg): Delete.
12811 (corresponding unnamed define_insn): Delete.
12812 (movmemsi_6reg): Delete.
12813 (corresponding unnamed define_insn): Delete.
12814 (movmemsi_4reg): Delete.
12815 (corresponding unnamed define_insn): Delete.
12816 (movmemsi_2reg): Delete.
12817 (corresponding unnamed define_insn): Delete.
12818 (movmemsi_1reg): Delete.
12819 (corresponding unnamed define_insn): Delete.
12820 * config/rs6000/rs6000.opt (mno-string): New.
12821 (mstring): Replace by deprecation warning stub.
12822 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
12824 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12826 * regrename.c (regrename_do_replace): If replacing the same
12827 reg multiple times, try to reuse last created gen_raw_REG.
12830 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
12831 main to workaround a bug in GDB.
12833 2018-01-12 Tom de Vries <tom@codesourcery.com>
12836 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
12838 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
12840 PR rtl-optimization/80481
12841 * ira-color.c (get_cap_member): New function.
12842 (allocnos_conflict_by_live_ranges_p): Use it.
12843 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
12844 (setup_slot_coalesced_allocno_live_ranges): Ditto.
12846 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
12849 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
12850 (*saddl_se_1): Ditto.
12851 (*ssubsi_1): Ditto.
12852 (*ssubl_se_1): Ditto.
12854 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12856 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
12857 rather than wi::to_widest for DR_INITs.
12858 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
12859 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
12860 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
12862 (vect_analyze_group_access_1): Note that here.
12864 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12866 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
12867 polynomial type sizes.
12869 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12871 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
12872 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
12873 (gimple_add_tmp_var): Likewise.
12875 2018-01-12 Martin Liska <mliska@suse.cz>
12877 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
12878 (gimple_alloc_sizes): Likewise.
12879 (dump_gimple_statistics): Use PRIu64 in printf format.
12880 * gimple.h: Change uint64_t to int.
12882 2018-01-12 Martin Liska <mliska@suse.cz>
12884 * tree-core.h: Use uint64_t instead of int.
12885 * tree.c (tree_node_counts): Likewise.
12886 (tree_node_sizes): Likewise.
12887 (dump_tree_statistics): Use PRIu64 in printf format.
12889 2018-01-12 Martin Liska <mliska@suse.cz>
12891 * Makefile.in: As qsort_chk is implemented in vec.c, add
12892 vec.o to linkage of gencfn-macros.
12893 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
12894 passing the info to record_node_allocation_statistics.
12895 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
12897 * ggc-common.c (struct ggc_usage): Add operator== and use
12898 it in operator< and compare function.
12899 * mem-stats.h (struct mem_usage): Likewise.
12900 * vec.c (struct vec_usage): Remove operator< and compare
12901 function. Can be simply inherited.
12903 2018-01-12 Martin Jambor <mjambor@suse.cz>
12906 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
12907 * tree-ssa-math-opts.c: Include domwalk.h.
12908 (convert_mult_to_fma_1): New function.
12909 (fma_transformation_info): New type.
12910 (fma_deferring_state): Likewise.
12911 (cancel_fma_deferring): New function.
12912 (result_of_phi): Likewise.
12913 (last_fma_candidate_feeds_initial_phi): Likewise.
12914 (convert_mult_to_fma): Added deferring logic, split actual
12915 transformation to convert_mult_to_fma_1.
12916 (math_opts_dom_walker): New type.
12917 (math_opts_dom_walker::after_dom_children): New method, body moved
12918 here from pass_optimize_widening_mul::execute, added deferring logic
12920 (pass_optimize_widening_mul::execute): Moved most of code to
12921 math_opts_dom_walker::after_dom_children.
12922 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
12923 * config/i386/i386.c (ix86_option_override_internal): Added
12924 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
12926 2018-01-12 Richard Biener <rguenther@suse.de>
12929 * dwarf2out.c (gen_variable_die): Do not reset old_die for
12930 inline instance vars.
12932 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
12935 * config/rx/rx.c (rx_is_restricted_memory_address):
12936 Handle SUBREG case.
12938 2018-01-12 Richard Biener <rguenther@suse.de>
12940 PR tree-optimization/80846
12941 * target.def (split_reduction): New target hook.
12942 * targhooks.c (default_split_reduction): New function.
12943 * targhooks.h (default_split_reduction): Declare.
12944 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
12945 target requests first reduce vectors by combining low and high
12947 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
12948 (get_vectype_for_scalar_type_and_size): Export.
12949 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
12950 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
12951 * doc/tm.texi: Regenerate.
12952 * config/i386/i386.c (ix86_split_reduction): Implement
12953 TARGET_VECTORIZE_SPLIT_REDUCTION.
12955 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12958 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
12959 in PIC mode except for TARGET_VXWORKS_RTP.
12960 * config/sparc/sparc.c: Include cfgrtl.h.
12961 (TARGET_INIT_PIC_REG): Define.
12962 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
12963 (sparc_pic_register_p): New predicate.
12964 (sparc_legitimate_address_p): Use it.
12965 (sparc_legitimize_pic_address): Likewise.
12966 (sparc_delegitimize_address): Likewise.
12967 (sparc_mode_dependent_address_p): Likewise.
12968 (gen_load_pcrel_sym): Remove 4th parameter.
12969 (load_got_register): Adjust call to above. Remove obsolete stuff.
12970 (sparc_expand_prologue): Do not call load_got_register here.
12971 (sparc_flat_expand_prologue): Likewise.
12972 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
12973 (sparc_use_pseudo_pic_reg): New function.
12974 (sparc_init_pic_reg): Likewise.
12975 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12976 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
12978 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
12980 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
12981 Add item for branch_cost.
12983 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12985 PR rtl-optimization/83565
12986 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
12987 not extend the result to a larger mode for rotate operations.
12988 (num_sign_bit_copies1): Likewise.
12990 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12993 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
12995 Use values-Xc.o for -pedantic.
12996 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
12998 2018-01-12 Martin Liska <mliska@suse.cz>
13001 * ipa-devirt.c (final_warning_record::grow_type_warnings):
13003 (possible_polymorphic_call_targets): Use it.
13004 (ipa_devirt): Likewise.
13006 2018-01-12 Martin Liska <mliska@suse.cz>
13008 * profile-count.h (enum profile_quality): Use 0 as invalid
13009 enum value of profile_quality.
13011 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
13013 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
13014 -mext-string options.
13016 2018-01-12 Richard Biener <rguenther@suse.de>
13018 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
13019 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
13020 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
13022 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
13024 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13026 * configure.ac (--with-long-double-format): Add support for the
13027 configuration option to change the default long double format on
13029 * config.gcc (powerpc*-linux*-*): Likewise.
13030 * configure: Regenerate.
13031 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
13032 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
13033 used without modification.
13035 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13037 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
13038 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
13039 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
13040 MISC_BUILTIN_SPEC_BARRIER.
13041 (rs6000_init_builtins): Likewise.
13042 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
13044 (speculation_barrier): New define_insn.
13045 * doc/extend.texi: Document __builtin_speculation_barrier.
13047 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13050 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
13051 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
13052 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
13054 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
13055 integral modes instead of "ss" and "sd".
13056 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
13057 vectors with 32-bit and 64-bit elements.
13058 (vecdupssescalarmodesuffix): New mode attribute.
13059 (vec_dup<mode>): Use it.
13061 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
13064 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
13065 frame if argument is passed on stack.
13067 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13070 * ree.c (combine_reaching_defs): Optimize also
13071 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
13072 reg2=any_extend(exp); reg1=reg2;, formatting fix.
13074 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13076 PR middle-end/83189
13077 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
13079 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13081 PR middle-end/83718
13082 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
13083 after they are computed.
13085 2018-01-11 Bin Cheng <bin.cheng@arm.com>
13087 PR tree-optimization/83695
13088 * gimple-loop-linterchange.cc
13089 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
13090 reset cached scev information after interchange.
13091 (pass_linterchange::execute): Remove call to scev_reset_htab.
13093 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13095 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
13096 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
13097 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
13098 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
13099 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
13100 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
13101 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
13102 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
13103 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
13104 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
13105 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
13106 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
13107 (V_lane_reg): Likewise.
13108 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
13110 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
13111 (vfmal_lane_low<mode>_intrinsic,
13112 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
13113 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
13114 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
13115 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
13116 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
13117 vfmsl_lane_high<mode>_intrinsic): New define_insns.
13119 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13121 * config/arm/arm-cpus.in (fp16fml): New feature.
13122 (ALL_SIMD): Add fp16fml.
13123 (armv8.2-a): Add fp16fml as an option.
13124 (armv8.3-a): Likewise.
13125 (armv8.4-a): Add fp16fml as part of fp16.
13126 * config/arm/arm.h (TARGET_FP16FML): Define.
13127 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
13129 * config/arm/arm-modes.def (V2HF): Define.
13130 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
13131 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
13132 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
13133 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
13134 vfmsl_low, vfmsl_high): New set of builtins.
13135 * config/arm/iterators.md (PLUSMINUS): New code iterator.
13136 (vfml_op): New code attribute.
13137 (VFMLHALVES): New int iterator.
13138 (VFML, VFMLSEL): New mode attributes.
13139 (V_reg): Define mapping for V2HF.
13140 (V_hi, V_lo): New mode attributes.
13141 (VF_constraint): Likewise.
13142 (vfml_half, vfml_half_selector): New int attributes.
13143 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
13145 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
13146 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
13148 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
13149 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
13150 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
13151 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
13153 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
13154 Document new effective target and option set.
13156 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13158 * config/arm/arm-cpus.in (armv8_4): New feature.
13159 (ARMv8_4a): New fgroup.
13160 (armv8.4-a): New arch.
13161 * config/arm/arm-tables.opt: Regenerate.
13162 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
13163 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
13164 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
13165 Add matching rules for -march=armv8.4-a and extensions.
13166 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
13168 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
13171 * config/rx/rx.md (BW): New mode attribute.
13172 (sync_lock_test_and_setsi): Add mode suffix to insn output.
13174 2018-01-11 Richard Biener <rguenther@suse.de>
13176 PR tree-optimization/83435
13177 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
13178 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
13179 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
13181 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13182 Alan Hayward <alan.hayward@arm.com>
13183 David Sherwood <david.sherwood@arm.com>
13185 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
13187 (aarch64_classify_address): Initialize it. Track polynomial offsets.
13188 (aarch64_print_address_internal): Use it to check for a zero offset.
13190 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13191 Alan Hayward <alan.hayward@arm.com>
13192 David Sherwood <david.sherwood@arm.com>
13194 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
13195 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
13196 Return a poly_int64 rather than a HOST_WIDE_INT.
13197 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
13198 rather than a HOST_WIDE_INT.
13199 * config/aarch64/aarch64.h (aarch64_frame): Protect with
13200 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
13201 hard_fp_offset, frame_size, initial_adjust, callee_offset and
13202 final_offset from HOST_WIDE_INT to poly_int64.
13203 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
13204 to_constant when getting the number of units in an Advanced SIMD
13206 (aarch64_builtin_vectorized_function): Check for a constant number
13208 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
13210 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
13211 attribute instead of GET_MODE_NUNITS.
13212 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
13213 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
13214 GET_MODE_SIZE for fixed-size registers.
13215 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
13216 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
13217 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
13218 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
13219 (aarch64_print_operand, aarch64_print_address_internal)
13220 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
13221 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
13222 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
13223 Handle polynomial GET_MODE_SIZE.
13224 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
13225 wider than SImode without modification.
13226 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
13227 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
13228 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
13229 passing and returning SVE modes.
13230 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
13231 rather than GEN_INT.
13232 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
13233 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
13234 (aarch64_allocate_and_probe_stack_space): Likewise.
13235 (aarch64_layout_frame): Cope with polynomial offsets.
13236 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
13237 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
13238 polynomial offsets.
13239 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
13240 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
13241 poly_int64 rather than a HOST_WIDE_INT.
13242 (aarch64_get_separate_components, aarch64_process_components)
13243 (aarch64_expand_prologue, aarch64_expand_epilogue)
13244 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
13245 (aarch64_anchor_offset): New function, split out from...
13246 (aarch64_legitimize_address): ...here.
13247 (aarch64_builtin_vectorization_cost): Handle polynomial
13248 TYPE_VECTOR_SUBPARTS.
13249 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
13251 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
13252 number of elements from the PARALLEL rather than the mode.
13253 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
13254 rather than GET_MODE_BITSIZE.
13255 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
13256 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
13257 (aarch64_expand_vec_perm_const_1): Handle polynomial
13258 d->perm.length () and d->perm elements.
13259 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
13260 Apply to_constant to d->perm elements.
13261 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
13262 polynomial CONST_VECTOR_NUNITS.
13263 (aarch64_move_pointer): Take amount as a poly_int64 rather
13265 (aarch64_progress_pointer): Avoid temporary variable.
13266 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
13267 the mode attribute instead of GET_MODE.
13269 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13270 Alan Hayward <alan.hayward@arm.com>
13271 David Sherwood <david.sherwood@arm.com>
13273 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
13274 x exists before using it.
13275 (aarch64_add_constant_internal): Rename to...
13276 (aarch64_add_offset_1): ...this. Replace regnum with separate
13277 src and dest rtxes. Handle the case in which they're different,
13278 including when the offset is zero. Replace scratchreg with an rtx.
13279 Use 2 additions if there is no spare register into which we can
13280 move a 16-bit constant.
13281 (aarch64_add_constant): Delete.
13282 (aarch64_add_offset): Replace reg with separate src and dest
13283 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
13284 Use aarch64_add_offset_1.
13285 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
13286 an rtx rather than an int. Take the delta as a poly_int64
13287 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
13288 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
13289 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
13290 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
13291 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
13292 and aarch64_add_sp.
13293 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
13294 aarch64_add_constant.
13296 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13298 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
13299 Use scalar_float_mode.
13301 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13303 * config/aarch64/aarch64-simd.md
13304 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
13305 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
13306 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
13307 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
13308 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
13309 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
13310 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
13311 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
13312 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
13313 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
13315 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13318 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
13319 targ_options->x_arm_arch_string is non NULL.
13321 2018-01-11 Tamar Christina <tamar.christina@arm.com>
13323 * config/aarch64/aarch64.h
13324 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
13326 2018-01-11 Sudakshina Das <sudi.das@arm.com>
13329 * expmed.c (emit_store_flag_force): Swap if const op0
13330 and change VOIDmode to mode of op0.
13332 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13334 PR rtl-optimization/83761
13335 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
13336 than bytes to mode_for_size.
13338 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13340 PR middle-end/83189
13341 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
13342 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
13345 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13347 PR middle-end/83575
13348 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
13349 when in layout mode.
13350 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
13351 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
13354 2018-01-10 Michael Collison <michael.collison@arm.com>
13356 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
13357 * config/aarch64/aarch64-option-extension.def: Add
13358 AARCH64_OPT_EXTENSION of 'fp16fml'.
13359 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13360 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
13361 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
13362 * config/aarch64/constraints.md (Ui7): New constraint.
13363 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
13364 (VFMLA_SEL_W): Ditto.
13367 (VFMLA16_LOW): New int iterator.
13368 (VFMLA16_HIGH): Ditto.
13369 (UNSPEC_FMLAL): New unspec.
13370 (UNSPEC_FMLSL): Ditto.
13371 (UNSPEC_FMLAL2): Ditto.
13372 (UNSPEC_FMLSL2): Ditto.
13373 (f16mac): New code attribute.
13374 * config/aarch64/aarch64-simd-builtins.def
13375 (aarch64_fmlal_lowv2sf): Ditto.
13376 (aarch64_fmlsl_lowv2sf): Ditto.
13377 (aarch64_fmlalq_lowv4sf): Ditto.
13378 (aarch64_fmlslq_lowv4sf): Ditto.
13379 (aarch64_fmlal_highv2sf): Ditto.
13380 (aarch64_fmlsl_highv2sf): Ditto.
13381 (aarch64_fmlalq_highv4sf): Ditto.
13382 (aarch64_fmlslq_highv4sf): Ditto.
13383 (aarch64_fmlal_lane_lowv2sf): Ditto.
13384 (aarch64_fmlsl_lane_lowv2sf): Ditto.
13385 (aarch64_fmlal_laneq_lowv2sf): Ditto.
13386 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
13387 (aarch64_fmlalq_lane_lowv4sf): Ditto.
13388 (aarch64_fmlsl_lane_lowv4sf): Ditto.
13389 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
13390 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
13391 (aarch64_fmlal_lane_highv2sf): Ditto.
13392 (aarch64_fmlsl_lane_highv2sf): Ditto.
13393 (aarch64_fmlal_laneq_highv2sf): Ditto.
13394 (aarch64_fmlsl_laneq_highv2sf): Ditto.
13395 (aarch64_fmlalq_lane_highv4sf): Ditto.
13396 (aarch64_fmlsl_lane_highv4sf): Ditto.
13397 (aarch64_fmlalq_laneq_highv4sf): Ditto.
13398 (aarch64_fmlsl_laneq_highv4sf): Ditto.
13399 * config/aarch64/aarch64-simd.md:
13400 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
13401 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13402 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
13403 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13404 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
13405 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
13406 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
13407 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
13408 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
13409 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
13410 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
13411 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
13412 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
13413 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
13414 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
13415 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
13416 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
13417 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
13418 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
13419 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
13420 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
13421 (vfmlsl_low_u32): Ditto.
13422 (vfmlalq_low_u32): Ditto.
13423 (vfmlslq_low_u32): Ditto.
13424 (vfmlal_high_u32): Ditto.
13425 (vfmlsl_high_u32): Ditto.
13426 (vfmlalq_high_u32): Ditto.
13427 (vfmlslq_high_u32): Ditto.
13428 (vfmlal_lane_low_u32): Ditto.
13429 (vfmlsl_lane_low_u32): Ditto.
13430 (vfmlal_laneq_low_u32): Ditto.
13431 (vfmlsl_laneq_low_u32): Ditto.
13432 (vfmlalq_lane_low_u32): Ditto.
13433 (vfmlslq_lane_low_u32): Ditto.
13434 (vfmlalq_laneq_low_u32): Ditto.
13435 (vfmlslq_laneq_low_u32): Ditto.
13436 (vfmlal_lane_high_u32): Ditto.
13437 (vfmlsl_lane_high_u32): Ditto.
13438 (vfmlal_laneq_high_u32): Ditto.
13439 (vfmlsl_laneq_high_u32): Ditto.
13440 (vfmlalq_lane_high_u32): Ditto.
13441 (vfmlslq_lane_high_u32): Ditto.
13442 (vfmlalq_laneq_high_u32): Ditto.
13443 (vfmlslq_laneq_high_u32): Ditto.
13444 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
13445 (AARCH64_FL_FOR_ARCH8_4): New.
13446 (AARCH64_ISA_F16FML): New ISA flag.
13447 (TARGET_F16FML): New feature flag for fp16fml.
13448 (doc/invoke.texi): Document new fp16fml option.
13450 2018-01-10 Michael Collison <michael.collison@arm.com>
13452 * config/aarch64/aarch64-builtins.c:
13453 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
13454 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13455 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
13456 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
13457 (AARCH64_ISA_SHA3): New ISA flag.
13458 (TARGET_SHA3): New feature flag for sha3.
13459 * config/aarch64/iterators.md (sha512_op): New int attribute.
13460 (CRYPTO_SHA512): New int iterator.
13461 (UNSPEC_SHA512H): New unspec.
13462 (UNSPEC_SHA512H2): Ditto.
13463 (UNSPEC_SHA512SU0): Ditto.
13464 (UNSPEC_SHA512SU1): Ditto.
13465 * config/aarch64/aarch64-simd-builtins.def
13466 (aarch64_crypto_sha512hqv2di): New builtin.
13467 (aarch64_crypto_sha512h2qv2di): Ditto.
13468 (aarch64_crypto_sha512su0qv2di): Ditto.
13469 (aarch64_crypto_sha512su1qv2di): Ditto.
13470 (aarch64_eor3qv8hi): Ditto.
13471 (aarch64_rax1qv2di): Ditto.
13472 (aarch64_xarqv2di): Ditto.
13473 (aarch64_bcaxqv8hi): Ditto.
13474 * config/aarch64/aarch64-simd.md:
13475 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
13476 (aarch64_crypto_sha512su0qv2di): Ditto.
13477 (aarch64_crypto_sha512su1qv2di): Ditto.
13478 (aarch64_eor3qv8hi): Ditto.
13479 (aarch64_rax1qv2di): Ditto.
13480 (aarch64_xarqv2di): Ditto.
13481 (aarch64_bcaxqv8hi): Ditto.
13482 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
13483 (vsha512h2q_u64): Ditto.
13484 (vsha512su0q_u64): Ditto.
13485 (vsha512su1q_u64): Ditto.
13486 (veor3q_u16): Ditto.
13487 (vrax1q_u64): Ditto.
13488 (vxarq_u64): Ditto.
13489 (vbcaxq_u16): Ditto.
13490 * config/arm/types.md (crypto_sha512): New type attribute.
13491 (crypto_sha3): Ditto.
13492 (doc/invoke.texi): Document new sha3 option.
13494 2018-01-10 Michael Collison <michael.collison@arm.com>
13496 * config/aarch64/aarch64-builtins.c:
13497 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
13498 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13499 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
13500 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
13501 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
13502 (AARCH64_ISA_SM4): New ISA flag.
13503 (TARGET_SM4): New feature flag for sm4.
13504 * config/aarch64/aarch64-simd-builtins.def
13505 (aarch64_sm3ss1qv4si): Ditto.
13506 (aarch64_sm3tt1aq4si): Ditto.
13507 (aarch64_sm3tt1bq4si): Ditto.
13508 (aarch64_sm3tt2aq4si): Ditto.
13509 (aarch64_sm3tt2bq4si): Ditto.
13510 (aarch64_sm3partw1qv4si): Ditto.
13511 (aarch64_sm3partw2qv4si): Ditto.
13512 (aarch64_sm4eqv4si): Ditto.
13513 (aarch64_sm4ekeyqv4si): Ditto.
13514 * config/aarch64/aarch64-simd.md:
13515 (aarch64_sm3ss1qv4si): Ditto.
13516 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
13517 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
13518 (aarch64_sm4eqv4si): Ditto.
13519 (aarch64_sm4ekeyqv4si): Ditto.
13520 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
13521 (sm3part_op): Ditto.
13522 (CRYPTO_SM3TT): Ditto.
13523 (CRYPTO_SM3PART): Ditto.
13524 (UNSPEC_SM3SS1): New unspec.
13525 (UNSPEC_SM3TT1A): Ditto.
13526 (UNSPEC_SM3TT1B): Ditto.
13527 (UNSPEC_SM3TT2A): Ditto.
13528 (UNSPEC_SM3TT2B): Ditto.
13529 (UNSPEC_SM3PARTW1): Ditto.
13530 (UNSPEC_SM3PARTW2): Ditto.
13531 (UNSPEC_SM4E): Ditto.
13532 (UNSPEC_SM4EKEY): Ditto.
13533 * config/aarch64/constraints.md (Ui2): New constraint.
13534 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
13535 * config/arm/types.md (crypto_sm3): New type attribute.
13536 (crypto_sm4): Ditto.
13537 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
13538 (vsm3tt1aq_u32): Ditto.
13539 (vsm3tt1bq_u32): Ditto.
13540 (vsm3tt2aq_u32): Ditto.
13541 (vsm3tt2bq_u32): Ditto.
13542 (vsm3partw1q_u32): Ditto.
13543 (vsm3partw2q_u32): Ditto.
13544 (vsm4eq_u32): Ditto.
13545 (vsm4ekeyq_u32): Ditto.
13546 (doc/invoke.texi): Document new sm4 option.
13548 2018-01-10 Michael Collison <michael.collison@arm.com>
13550 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13551 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13552 (AARCH64_FL_FOR_ARCH8_4): New.
13553 (AARCH64_FL_V8_4): New flag.
13554 (doc/invoke.texi): Document new armv8.4-a option.
13556 2018-01-10 Michael Collison <michael.collison@arm.com>
13558 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13559 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13560 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13561 * config/aarch64/aarch64-option-extension.def: Add
13562 AARCH64_OPT_EXTENSION of 'sha2'.
13563 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13564 (crypto): Disable sha2 and aes if crypto disabled.
13565 (crypto): Enable aes and sha2 if enabled.
13566 (simd): Disable sha2 and aes if simd disabled.
13567 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13569 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13570 (TARGET_SHA2): New feature flag for sha2.
13571 (TARGET_AES): New feature flag for aes.
13572 * config/aarch64/aarch64-simd.md:
13573 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13574 conditional on TARGET_AES.
13575 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13576 (aarch64_crypto_sha1hsi): Make pattern conditional
13578 (aarch64_crypto_sha1hv4si): Ditto.
13579 (aarch64_be_crypto_sha1hv4si): Ditto.
13580 (aarch64_crypto_sha1su1v4si): Ditto.
13581 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13582 (aarch64_crypto_sha1su0v4si): Ditto.
13583 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13584 (aarch64_crypto_sha256su0v4si): Ditto.
13585 (aarch64_crypto_sha256su1v4si): Ditto.
13586 (doc/invoke.texi): Document new aes and sha2 options.
13588 2018-01-10 Martin Sebor <msebor@redhat.com>
13590 PR tree-optimization/83781
13591 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13594 2018-01-11 Martin Sebor <msebor@gmail.com>
13595 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13597 PR tree-optimization/83501
13598 PR tree-optimization/81703
13600 * tree-ssa-strlen.c (get_string_cst): Rename...
13601 (get_string_len): ...to this. Handle global constants.
13602 (handle_char_store): Adjust.
13604 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
13605 Jim Wilson <jimw@sifive.com>
13607 * config/riscv/riscv-protos.h (riscv_output_return): New.
13608 * config/riscv/riscv.c (struct machine_function): New naked_p field.
13609 (riscv_attribute_table, riscv_output_return),
13610 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13611 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13612 (riscv_compute_frame_info): Only compute frame->mask if not a naked
13614 (riscv_expand_prologue): Add early return for naked function.
13615 (riscv_expand_epilogue): Likewise.
13616 (riscv_function_ok_for_sibcall): Return false for naked function.
13617 (riscv_set_current_function): New.
13618 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13619 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13620 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13621 * doc/extend.texi (RISC-V Function Attributes): New.
13623 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13625 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13626 check for 128-bit long double before checking TCmode.
13627 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13628 128-bit long doubles before checking TFmode or TCmode.
13629 (FLOAT128_IBM_P): Likewise.
13631 2018-01-10 Martin Sebor <msebor@redhat.com>
13633 PR tree-optimization/83671
13634 * builtins.c (c_strlen): Unconditionally return zero for the empty
13636 Use -Warray-bounds for warnings.
13637 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13638 for non-constant array indices with COMPONENT_REF, arrays of
13639 arrays, and pointers to arrays.
13640 (gimple_fold_builtin_strlen): Determine and set length range for
13641 non-constant character arrays.
13643 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
13645 PR middle-end/81897
13646 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13649 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
13651 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13653 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13656 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13657 VECTOR_MEM_ALTIVEC_OR_VSX_P.
13658 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13659 indexed_or_indirect_operand predicate.
13660 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13661 (*vsx_le_perm_load_v8hi): Likewise.
13662 (*vsx_le_perm_load_v16qi): Likewise.
13663 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13664 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13665 (*vsx_le_perm_store_v8hi): Likewise.
13666 (*vsx_le_perm_store_v16qi): Likewise.
13667 (eight unnamed splitters): Likewise.
13669 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13671 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13672 * config/rs6000/emmintrin.h: Likewise.
13673 * config/rs6000/mmintrin.h: Likewise.
13674 * config/rs6000/xmmintrin.h: Likewise.
13676 2018-01-10 David Malcolm <dmalcolm@redhat.com>
13679 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13681 * tree.c (tree_nop_conversion): Return true for location wrapper
13683 (maybe_wrap_with_location): New function.
13684 (selftest::check_strip_nops): New function.
13685 (selftest::test_location_wrappers): New function.
13686 (selftest::tree_c_tests): Call it.
13687 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13688 (maybe_wrap_with_location): New decl.
13689 (EXPR_LOCATION_WRAPPER_P): New macro.
13690 (location_wrapper_p): New inline function.
13691 (tree_strip_any_location_wrapper): New inline function.
13693 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
13696 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13697 stack_realign_offset for the largest alignment of stack slot
13699 (ix86_find_max_used_stack_alignment): New function.
13700 (ix86_finalize_stack_frame_flags): Use it. Set
13701 max_used_stack_alignment if we don't realign stack.
13702 * config/i386/i386.h (machine_function): Add
13703 max_used_stack_alignment.
13705 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
13707 * config/arm/arm.opt (-mbranch-cost): New option.
13708 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13711 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
13714 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13715 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13717 2018-01-10 Richard Biener <rguenther@suse.de>
13720 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13721 early out so it also covers the case where we have a non-NULL
13724 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13726 PR tree-optimization/83753
13727 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
13728 for non-strided grouped accesses if the number of elements is 1.
13730 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13733 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
13734 * i386.h (TARGET_USE_GATHER): Define.
13735 * x86-tune.def (X86_TUNE_USE_GATHER): New.
13737 2018-01-10 Martin Liska <mliska@suse.cz>
13740 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
13741 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
13743 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
13744 CLEANUP_NO_PARTITIONING is not set.
13746 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13748 * doc/rtl.texi: Remove documentation of (const ...) wrappers
13749 for vectors, as a partial revert of r254296.
13750 * rtl.h (const_vec_p): Delete.
13751 (const_vec_duplicate_p): Don't test for vector CONSTs.
13752 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
13753 * expmed.c (make_tree): Likewise.
13756 * common.md (E, F): Use CONSTANT_P instead of checking for
13758 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
13759 checking for CONST_VECTOR.
13761 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13763 PR middle-end/83575
13764 * predict.c (force_edge_cold): Handle in more sane way edges
13765 with no prediction.
13767 2018-01-09 Carl Love <cel@us.ibm.com>
13769 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
13771 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
13772 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
13773 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
13774 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
13775 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
13776 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
13777 * config/rs6000/rs6000-protos.h: Add extern defition for
13778 rs6000_generate_float2_double_code.
13779 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
13781 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
13782 (float2_v2df): Add define_expand.
13784 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
13787 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
13788 op_mode in the force_to_mode call.
13790 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13792 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
13793 instead of checking each element individually.
13794 (aarch64_evpc_uzp): Likewise.
13795 (aarch64_evpc_zip): Likewise.
13796 (aarch64_evpc_ext): Likewise.
13797 (aarch64_evpc_rev): Likewise.
13798 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
13799 instead of checking each element individually. Return true without
13801 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
13802 whether all selected elements come from the same input, instead of
13803 checking each element individually. Remove calls to gen_rtx_REG,
13804 start_sequence and end_sequence and instead assert that no rtl is
13807 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13809 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
13810 order of HIGH and CONST checks.
13812 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13814 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
13815 if the destination isn't an SSA_NAME.
13817 2018-01-09 Richard Biener <rguenther@suse.de>
13819 PR tree-optimization/83668
13820 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
13822 (canonicalize_loop_form): ... here, renamed from ...
13823 (canonicalize_loop_closed_ssa_form): ... this and amended to
13824 swap successor edges for loop exit blocks to make us use
13825 the RPO order we need for initial schedule generation.
13827 2018-01-09 Joseph Myers <joseph@codesourcery.com>
13829 PR tree-optimization/64811
13830 * match.pd: When optimizing comparisons with Inf, avoid
13831 introducing or losing exceptions from comparisons with NaN.
13833 2018-01-09 Martin Liska <mliska@suse.cz>
13836 * asan.c (shadow_mem_size): Add gcc_assert.
13838 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
13840 Don't save registers in main().
13843 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
13844 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
13845 * config/avr/avr.c (avr_set_current_function): Don't error if
13846 naked, OS_task or OS_main are specified at the same time.
13847 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
13849 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
13851 * common/config/avr/avr-common.c (avr_option_optimization_table):
13852 Switch on -mmain-is-OS_task for optimizing compilations.
13854 2018-01-09 Richard Biener <rguenther@suse.de>
13856 PR tree-optimization/83572
13857 * graphite.c: Include cfganal.h.
13858 (graphite_transform_loops): Connect infinite loops to exit
13859 and remove fake edges at the end.
13861 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13863 * ipa-inline.c (edge_badness): Revert accidental checkin.
13865 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13868 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
13869 symbols; not inline clones.
13871 2018-01-09 Jakub Jelinek <jakub@redhat.com>
13874 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
13875 hard registers. Formatting fixes.
13877 PR preprocessor/83722
13878 * gcc.c (try_generate_repro): Pass
13879 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
13880 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
13883 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
13884 Kito Cheng <kito.cheng@gmail.com>
13886 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
13887 (riscv_leaf_function_p): Delete.
13888 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
13890 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13892 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
13894 (do_ifelse): New function.
13895 (do_isel): New function.
13896 (do_sub3): New function.
13897 (do_add3): New function.
13898 (do_load_mask_compare): New function.
13899 (do_overlap_load_compare): New function.
13900 (expand_compare_loop): New function.
13901 (expand_block_compare): Call expand_compare_loop() when appropriate.
13902 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
13903 option description.
13904 (-mblock-compare-inline-loop-limit): New option.
13906 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13909 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
13910 Reverse order of second and third operands in first alternative.
13911 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
13912 of first and second elements in UNSPEC_VPERMR vector.
13913 (altivec_expand_vec_perm_le): Likewise.
13915 2018-01-08 Jeff Law <law@redhat.com>
13917 PR rtl-optimizatin/81308
13918 * tree-switch-conversion.c (cfg_altered): New file scoped static.
13919 (process_switch): If group_case_labels makes a change, then set
13921 (pass_convert_switch::execute): If a switch is converted, then
13922 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
13924 PR rtl-optimization/81308
13925 * recog.c (split_all_insns): Conditionally cleanup the CFG after
13928 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
13930 PR target/83663 - Revert r255946
13931 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
13932 generation for cases where splatting a value is not useful.
13933 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
13934 across a vec_duplicate and a paradoxical subreg forming a vector
13935 mode to a vec_concat.
13937 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13939 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
13940 -march=armv8.3-a variants.
13941 * config/arm/t-multilib: Likewise.
13942 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
13944 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13946 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
13948 (cceq_ior_compare_complement): Give it a name so I can use it, and
13949 change boolean_or_operator predicate to boolean_operator so it can
13950 be used to generate a crand.
13951 (eqne): New code iterator.
13952 (bd/bd_neg): New code_attrs.
13953 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
13954 a single define_insn.
13955 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
13956 decrement (bdnzt/bdnzf/bdzt/bdzf).
13957 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
13958 with the new names of the branch decrement patterns, and added the
13959 names of the branch decrement conditional patterns.
13961 2018-01-08 Richard Biener <rguenther@suse.de>
13963 PR tree-optimization/83563
13964 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
13967 2018-01-08 Richard Biener <rguenther@suse.de>
13969 PR middle-end/83713
13970 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
13972 2018-01-08 Richard Biener <rguenther@suse.de>
13974 PR tree-optimization/83685
13975 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
13976 references to abnormals.
13978 2018-01-08 Richard Biener <rguenther@suse.de>
13981 * dwarf2out.c (output_indirect_strings): Handle empty
13982 skeleton_debug_str_hash.
13983 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
13985 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
13987 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
13988 (emit_store_direct): Likewise.
13989 (arc_trampoline_adjust_address): Likewise.
13990 (arc_asm_trampoline_template): New function.
13991 (arc_initialize_trampoline): Use asm_trampoline_template.
13992 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
13993 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
13994 * config/arc/arc.md (flush_icache): Delete pattern.
13996 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
13998 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
13999 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
14002 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14005 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
14006 by not USED_FOR_TARGET.
14007 (make_pass_resolve_sw_modes): Likewise.
14009 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14011 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
14014 2018-01-08 Richard Biener <rguenther@suse.de>
14016 PR middle-end/83580
14017 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
14019 2018-01-08 Richard Biener <rguenther@suse.de>
14021 PR middle-end/83517
14022 * match.pd ((t * 2) / 2) -> t): Add missing :c.
14024 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
14026 PR middle-end/81897
14027 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
14028 basic blocks with a small number of successors.
14029 (convert_control_dep_chain_into_preds): Improve handling of
14031 (dump_predicates): Split apart into...
14032 (dump_pred_chain): ...here...
14033 (dump_pred_info): ...and here.
14034 (can_one_predicate_be_invalidated_p): Add debugging printfs.
14035 (can_chain_union_be_invalidated_p): Improve check for invalidation
14037 (uninit_uses_cannot_happen): Avoid unnecessary if
14038 convert_control_dep_chain_into_preds yielded nothing.
14040 2018-01-06 Martin Sebor <msebor@redhat.com>
14042 PR tree-optimization/83640
14043 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
14044 subtracting negative offset from size.
14045 (builtin_access::overlap): Adjust offset bounds of the access to fall
14046 within the size of the object if possible.
14048 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
14050 PR rtl-optimization/83699
14051 * expmed.c (extract_bit_field_1): Restrict the vector usage of
14052 extract_bit_field_as_subreg to cases in which the extracted
14053 value is also a vector.
14055 * lra-constraints.c (process_alt_operands): Test for the equivalence
14056 substitutions when detecting a possible reload cycle.
14058 2018-01-06 Jakub Jelinek <jakub@redhat.com>
14061 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
14062 by default if flag_selective_schedling{,2}. Formatting fixes.
14064 PR rtl-optimization/83682
14065 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
14066 if it has non-VECTOR_MODE element mode.
14067 (vec_duplicate_p): Likewise.
14069 PR middle-end/83694
14070 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
14071 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
14073 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14076 * config/i386/i386-builtin.def
14077 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
14078 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
14079 Require also OPTION_MASK_ISA_AVX512F in addition to
14080 OPTION_MASK_ISA_GFNI.
14081 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
14082 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
14083 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
14084 to OPTION_MASK_ISA_GFNI.
14085 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
14086 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
14087 OPTION_MASK_ISA_AVX512BW.
14088 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
14089 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
14090 addition to OPTION_MASK_ISA_GFNI.
14091 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
14092 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
14093 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
14094 to OPTION_MASK_ISA_GFNI.
14095 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
14096 a requirement for all ISAs rather than any of them with a few
14098 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
14100 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
14101 bitmasks to be enabled with 3 exceptions, instead of requiring any
14102 enabled ISA with lots of exceptions.
14103 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
14104 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
14105 Change avx512bw in isa attribute to avx512f.
14106 * config/i386/sgxintrin.h: Add license boilerplate.
14107 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
14108 to __AVX512F__ and __AVX512VL to __AVX512VL__.
14109 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
14110 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
14112 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
14113 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
14114 temporarily sse2 rather than sse if not enabled already.
14117 * config/i386/sse.md (VI248_VLBW): Rename to ...
14118 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
14119 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
14120 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
14121 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
14122 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
14123 mode iterator instead of VI248_VLBW.
14125 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
14127 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
14128 (record_modified): Skip clobbers; add debug output.
14129 (param_change_prob): Use sreal frequencies.
14131 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14133 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14134 punt for user-aligned variables.
14136 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14138 * tree-chrec.c (chrec_contains_symbols): Return true for
14141 2018-01-05 Sudakshina Das <sudi.das@arm.com>
14144 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
14145 of (x|y) == x for BICS pattern.
14147 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14149 PR tree-optimization/83605
14150 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
14151 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
14154 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
14156 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
14157 * config/epiphany/rtems.h: New file.
14159 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14160 Uros Bizjak <ubizjak@gmail.com>
14163 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
14164 QIreg_operand instead of register_operand predicate.
14165 * config/i386/i386.c (ix86_rop_should_change_byte_p,
14166 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
14167 comments instead of -fmitigate[-_]rop.
14169 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14172 * cgraphunit.c (symbol_table::compile): Switch to text_section
14173 before calling assembly_start debug hook.
14174 * run-rtl-passes.c (run_rtl_passes): Likewise.
14177 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14179 * tree-vrp.c (extract_range_from_binary_expr_1): Check
14180 range_int_cst_p rather than !symbolic_range_p before calling
14181 extract_range_from_multiplicative_op_1.
14183 2018-01-04 Jeff Law <law@redhat.com>
14185 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
14186 redundant test in assertion.
14188 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14190 * doc/rtl.texi: Document machine_mode wrapper classes.
14192 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14194 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
14195 using tree_to_uhwi.
14197 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14199 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
14200 the VEC_PERM_EXPR fold to fail.
14202 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14205 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
14206 to switched_sections.
14208 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14211 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
14212 test for d.testing.
14214 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
14217 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
14218 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
14220 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14223 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
14224 is BLKmode and bitpos not zero or mode change is needed.
14226 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14229 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
14232 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
14235 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
14236 instead of MULT rtx. Update all corresponding splitters.
14237 (*saddl_se): Ditto.
14238 (*ssub<modesuffix>): Ditto.
14239 (*ssubl_se): Ditto.
14240 (*cmp_sadd_di): Update split patterns.
14241 (*cmp_sadd_si): Ditto.
14242 (*cmp_sadd_sidi): Ditto.
14243 (*cmp_ssub_di): Ditto.
14244 (*cmp_ssub_si): Ditto.
14245 (*cmp_ssub_sidi): Ditto.
14246 * config/alpha/predicates.md (const23_operand): New predicate.
14247 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
14248 Look for ASHIFT, not MULT inner operand.
14249 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
14251 2018-01-04 Martin Liska <mliska@suse.cz>
14253 PR gcov-profile/83669
14254 * gcov.c (output_intermediate_file): Add version to intermediate
14256 * doc/gcov.texi: Document new field 'version' in intermediate
14257 file format. Fix location of '-k' option of gcov command.
14259 2018-01-04 Martin Liska <mliska@suse.cz>
14262 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
14264 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14266 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
14268 2018-01-03 Martin Sebor <msebor@redhat.com>
14270 PR tree-optimization/83655
14271 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
14272 checking calls with invalid arguments.
14274 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14276 * tree-vect-stmts.c (vect_get_store_rhs): New function.
14277 (vectorizable_mask_load_store): Delete.
14278 (vectorizable_call): Return false for masked loads and stores.
14279 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
14280 instead of gimple_assign_rhs1.
14281 (vectorizable_load): Handle IFN_MASK_LOAD.
14282 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
14284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14286 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
14288 (vectorizable_mask_load_store): ...here.
14289 (vectorizable_load): ...and here.
14291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14293 * tree-vect-stmts.c (vect_build_all_ones_mask)
14294 (vect_build_zero_merge_argument): New functions, split out from...
14295 (vectorizable_load): ...here.
14297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14299 * tree-vect-stmts.c (vect_check_store_rhs): New function,
14301 (vectorizable_mask_load_store): ...here.
14302 (vectorizable_store): ...and here.
14304 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14306 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
14308 (vectorizable_mask_load_store): ...here.
14310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14312 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
14313 (vect_model_store_cost): Take a vec_load_store_type instead of a
14315 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
14316 (vect_model_store_cost): Take a vec_load_store_type instead of a
14318 (vectorizable_mask_load_store): Update accordingly.
14319 (vectorizable_store): Likewise.
14320 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
14322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14324 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
14325 IFN_MASK_LOAD calls here rather than...
14326 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
14328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14329 Alan Hayward <alan.hayward@arm.com>
14330 David Sherwood <david.sherwood@arm.com>
14332 * expmed.c (extract_bit_field_1): For vector extracts,
14333 fall back to extract_bit_field_as_subreg if vec_extract
14336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14337 Alan Hayward <alan.hayward@arm.com>
14338 David Sherwood <david.sherwood@arm.com>
14340 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
14341 they are variable or constant sized.
14342 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
14343 slots for constant-sized data.
14345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14346 Alan Hayward <alan.hayward@arm.com>
14347 David Sherwood <david.sherwood@arm.com>
14349 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
14350 handling COND_EXPRs with boolean comparisons, try to find a better
14351 basis for the mask type than the boolean itself.
14353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14355 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
14356 is calculated and how it can be overridden.
14357 * genmodes.c (max_bitsize_mode_any_mode): New variable.
14358 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
14360 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
14363 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14364 Alan Hayward <alan.hayward@arm.com>
14365 David Sherwood <david.sherwood@arm.com>
14367 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
14368 Remove the mode argument.
14369 (aarch64_simd_valid_immediate): Remove the mode and inverse
14371 * config/aarch64/iterators.md (bitsize): New iterator.
14372 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
14373 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
14374 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
14375 aarch64_simd_valid_immediate.
14376 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
14377 (aarch64_reg_or_bic_imm): Likewise.
14378 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
14379 with an insn_type enum and msl with a modifier_type enum.
14380 Replace element_width with a scalar_mode. Change the shift
14381 to unsigned int. Add constructors for scalar_float_mode and
14382 scalar_int_mode elements.
14383 (aarch64_vect_float_const_representable_p): Delete.
14384 (aarch64_can_const_movi_rtx_p)
14385 (aarch64_simd_scalar_immediate_valid_for_move)
14386 (aarch64_simd_make_constant): Update call to
14387 aarch64_simd_valid_immediate.
14388 (aarch64_advsimd_valid_immediate_hs): New function.
14389 (aarch64_advsimd_valid_immediate): Likewise.
14390 (aarch64_simd_valid_immediate): Remove mode and inverse
14391 arguments. Rewrite to use the above. Use const_vec_duplicate_p
14392 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
14393 and aarch64_float_const_representable_p on the result.
14394 (aarch64_output_simd_mov_immediate): Remove mode argument.
14395 Update call to aarch64_simd_valid_immediate and use of
14396 simd_immediate_info.
14397 (aarch64_output_scalar_simd_mov_immediate): Update call
14400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14401 Alan Hayward <alan.hayward@arm.com>
14402 David Sherwood <david.sherwood@arm.com>
14404 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
14405 (mode_nunits): Likewise CONST_MODE_NUNITS.
14406 * machmode.def (ADJUST_NUNITS): Document.
14407 * genmodes.c (mode_data::need_nunits_adj): New field.
14408 (blank_mode): Update accordingly.
14409 (adj_nunits): New variable.
14410 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
14412 (emit_mode_size_inline): Set need_bytesize_adj for all modes
14413 listed in adj_nunits.
14414 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
14415 listed in adj_nunits. Don't emit case statements for such modes.
14416 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
14417 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
14418 nothing if adj_nunits is nonnull.
14419 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
14420 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
14421 (emit_mode_fbit): Update use of print_maybe_const_decl.
14422 (emit_move_size): Likewise. Treat the array as non-const
14424 (emit_mode_adjustments): Handle adj_nunits.
14426 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14428 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
14429 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
14430 (VECTOR_MODES): Use it.
14431 (make_vector_modes): Take the prefix as an argument.
14433 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14434 Alan Hayward <alan.hayward@arm.com>
14435 David Sherwood <david.sherwood@arm.com>
14437 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
14438 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
14439 for MODE_VECTOR_BOOL.
14440 * machmode.def (VECTOR_BOOL_MODE): Document.
14441 * genmodes.c (VECTOR_BOOL_MODE): New macro.
14442 (make_vector_bool_mode): New function.
14443 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
14445 * lto-streamer-in.c (lto_input_mode_table): Likewise.
14446 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
14448 * stor-layout.c (int_mode_for_mode): Likewise.
14449 * tree.c (build_vector_type_for_mode): Likewise.
14450 * varasm.c (output_constant_pool_2): Likewise.
14451 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
14452 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
14453 for MODE_VECTOR_BOOL.
14454 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
14455 of mode class checks.
14456 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
14457 instead of a list of mode class checks.
14458 (expand_vector_scalar_condition): Likewise.
14459 (type_for_widest_vector_mode): Handle BImode as an inner mode.
14461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14462 Alan Hayward <alan.hayward@arm.com>
14463 David Sherwood <david.sherwood@arm.com>
14465 * machmode.h (mode_size): Change from unsigned short to
14467 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
14468 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14469 or if measurement_type is not polynomial.
14470 (fixed_size_mode::includes_p): Check for constant-sized modes.
14471 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
14472 return a poly_uint16 rather than an unsigned short.
14473 (emit_mode_size): Change the type of mode_size from unsigned short
14474 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
14475 (emit_mode_adjustments): Cope with polynomial vector sizes.
14476 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14478 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14480 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
14481 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
14482 * caller-save.c (setup_save_areas): Likewise.
14483 (replace_reg_with_saved_mem): Likewise.
14484 * calls.c (emit_library_call_value_1): Likewise.
14485 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
14486 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
14487 (gen_lowpart_for_combine): Likewise.
14488 * convert.c (convert_to_integer_1): Likewise.
14489 * cse.c (equiv_constant, cse_insn): Likewise.
14490 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
14491 (cselib_subst_to_values): Likewise.
14492 * dce.c (word_dce_process_block): Likewise.
14493 * df-problems.c (df_word_lr_mark_ref): Likewise.
14494 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
14495 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
14496 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
14497 (rtl_for_decl_location): Likewise.
14498 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
14499 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
14500 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
14501 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
14502 (expand_expr_real_1): Likewise.
14503 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
14504 (pad_below): Likewise.
14505 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14506 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
14507 * ira.c (get_subreg_tracking_sizes): Likewise.
14508 * ira-build.c (ira_create_allocno_objects): Likewise.
14509 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
14510 (ira_sort_regnos_for_alter_reg): Likewise.
14511 * ira-costs.c (record_operand_costs): Likewise.
14512 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
14513 (resolve_simple_move): Likewise.
14514 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
14515 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
14516 (lra_constraints): Likewise.
14517 (CONST_POOL_OK_P): Reject variable-sized modes.
14518 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
14519 (add_pseudo_to_slot, lra_spill): Likewise.
14520 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14521 * optabs-query.c (get_best_extraction_insn): Likewise.
14522 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14523 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
14524 (expand_mult_highpart, valid_multiword_target_p): Likewise.
14525 * recog.c (offsettable_address_addr_space_p): Likewise.
14526 * regcprop.c (maybe_mode_change): Likewise.
14527 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
14528 * regrename.c (build_def_use): Likewise.
14529 * regstat.c (dump_reg_info): Likewise.
14530 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
14531 (find_reloads, find_reloads_subreg_address): Likewise.
14532 * reload1.c (eliminate_regs_1): Likewise.
14533 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
14534 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
14535 (simplify_binary_operation_1, simplify_subreg): Likewise.
14536 * targhooks.c (default_function_arg_padding): Likewise.
14537 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
14538 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
14539 (verify_gimple_assign_ternary): Likewise.
14540 * tree-inline.c (estimate_move_cost): Likewise.
14541 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14542 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14543 (get_address_cost_ainc): Likewise.
14544 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14545 (vect_supportable_dr_alignment): Likewise.
14546 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14547 (vectorizable_reduction): Likewise.
14548 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14549 (vectorizable_operation, vectorizable_load): Likewise.
14550 * tree.c (build_same_sized_truth_vector_type): Likewise.
14551 * valtrack.c (cleanup_auto_inc_dec): Likewise.
14552 * var-tracking.c (emit_note_insn_var_location): Likewise.
14553 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14554 (ADDR_VEC_ALIGN): Likewise.
14556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14557 Alan Hayward <alan.hayward@arm.com>
14558 David Sherwood <david.sherwood@arm.com>
14560 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14562 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14563 or if measurement_type is polynomial.
14564 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14565 * combine.c (make_extraction): Likewise.
14566 * dse.c (find_shift_sequence): Likewise.
14567 * dwarf2out.c (mem_loc_descriptor): Likewise.
14568 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14569 (extract_bit_field, extract_low_bits): Likewise.
14570 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14571 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14572 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14573 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14574 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14575 * reload.c (find_reloads): Likewise.
14576 * reload1.c (alter_reg): Likewise.
14577 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14578 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14579 * tree-if-conv.c (predicate_mem_writes): Likewise.
14580 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14581 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14582 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14583 * valtrack.c (dead_debug_insert_temp): Likewise.
14584 * varasm.c (mergeable_constant_section): Likewise.
14585 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14588 Alan Hayward <alan.hayward@arm.com>
14589 David Sherwood <david.sherwood@arm.com>
14591 * expr.c (expand_assignment): Cope with polynomial mode sizes
14592 when assigning to a CONCAT.
14594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14595 Alan Hayward <alan.hayward@arm.com>
14596 David Sherwood <david.sherwood@arm.com>
14598 * machmode.h (mode_precision): Change from unsigned short to
14600 (mode_to_precision): Return a poly_uint16 rather than an unsigned
14602 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14603 or if measurement_type is not polynomial.
14604 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
14605 in which the mode is already known to be a scalar_int_mode.
14606 * genmodes.c (emit_mode_precision): Change the type of mode_precision
14607 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
14609 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14610 for GET_MODE_PRECISION.
14611 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14612 for GET_MODE_PRECISION.
14613 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14615 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14616 (expand_field_assignment, make_extraction): Likewise.
14617 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14618 (get_last_value): Likewise.
14619 * convert.c (convert_to_integer_1): Likewise.
14620 * cse.c (cse_insn): Likewise.
14621 * expr.c (expand_expr_real_1): Likewise.
14622 * lra-constraints.c (simplify_operand_subreg): Likewise.
14623 * optabs-query.c (can_atomic_load_p): Likewise.
14624 * optabs.c (expand_atomic_load): Likewise.
14625 (expand_atomic_store): Likewise.
14626 * ree.c (combine_reaching_defs): Likewise.
14627 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14628 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14629 * tree.h (type_has_mode_precision_p): Likewise.
14630 * ubsan.c (instrument_si_overflow): Likewise.
14632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14633 Alan Hayward <alan.hayward@arm.com>
14634 David Sherwood <david.sherwood@arm.com>
14636 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14637 polynomial numbers of units.
14638 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14639 (valid_vector_subparts_p): New function.
14640 (build_vector_type): Remove temporary shim and take the number
14641 of units as a poly_uint64 rather than an int.
14642 (build_opaque_vector_type): Take the number of units as a
14643 poly_uint64 rather than an int.
14644 * tree.c (build_vector_from_ctor): Handle polynomial
14645 TYPE_VECTOR_SUBPARTS.
14646 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14647 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14648 (build_vector_from_val): If the number of units is variable,
14649 use build_vec_duplicate_cst for constant operands and
14650 VEC_DUPLICATE_EXPR otherwise.
14651 (make_vector_type): Remove temporary is_constant ().
14652 (build_vector_type, build_opaque_vector_type): Take the number of
14653 units as a poly_uint64 rather than an int.
14654 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14656 * cfgexpand.c (expand_debug_expr): Likewise.
14657 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14658 (store_constructor, expand_expr_real_1): Likewise.
14659 (const_scalar_mask_from_tree): Likewise.
14660 * fold-const-call.c (fold_const_reduction): Likewise.
14661 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14662 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14663 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14664 (fold_relational_const): Likewise.
14665 (native_interpret_vector): Likewise. Change the size from an
14666 int to an unsigned int.
14667 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14668 TYPE_VECTOR_SUBPARTS.
14669 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14670 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14671 duplicating a non-constant operand into a variable-length vector.
14672 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14673 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14674 * ipa-icf.c (sem_variable::equals): Likewise.
14675 * match.pd: Likewise.
14676 * omp-simd-clone.c (simd_clone_subparts): Likewise.
14677 * print-tree.c (print_node): Likewise.
14678 * stor-layout.c (layout_type): Likewise.
14679 * targhooks.c (default_builtin_vectorization_cost): Likewise.
14680 * tree-cfg.c (verify_gimple_comparison): Likewise.
14681 (verify_gimple_assign_binary): Likewise.
14682 (verify_gimple_assign_ternary): Likewise.
14683 (verify_gimple_assign_single): Likewise.
14684 * tree-pretty-print.c (dump_generic_node): Likewise.
14685 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14686 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14687 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14688 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14689 (vect_shift_permute_load_chain): Likewise.
14690 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14691 (expand_vector_condition, optimize_vector_constructor): Likewise.
14692 (lower_vec_perm, get_compute_type): Likewise.
14693 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14694 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14695 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14696 (vect_recog_mask_conversion_pattern): Likewise.
14697 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14698 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14699 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14700 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14701 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14702 (vectorizable_shift, vectorizable_operation, vectorizable_store)
14703 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14704 (supportable_widening_operation): Likewise.
14705 (supportable_narrowing_operation): Likewise.
14706 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14708 * varasm.c (output_constant): Likewise.
14710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14711 Alan Hayward <alan.hayward@arm.com>
14712 David Sherwood <david.sherwood@arm.com>
14714 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14715 so that both the length == 3 and length != 3 cases set up their
14716 own permute vectors. Add comments explaining why we know the
14717 number of elements is constant.
14718 (vect_permute_load_chain): Likewise.
14720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14721 Alan Hayward <alan.hayward@arm.com>
14722 David Sherwood <david.sherwood@arm.com>
14724 * machmode.h (mode_nunits): Change from unsigned char to
14726 (ONLY_FIXED_SIZE_MODES): New macro.
14727 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
14728 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
14729 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
14731 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
14732 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
14733 or if measurement_type is not polynomial.
14734 * genmodes.c (ZERO_COEFFS): New macro.
14735 (emit_mode_nunits_inline): Make mode_nunits_inline return a
14737 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
14738 Use ZERO_COEFFS when emitting initializers.
14739 * data-streamer.h (bp_pack_poly_value): New function.
14740 (bp_unpack_poly_value): Likewise.
14741 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14742 for GET_MODE_NUNITS.
14743 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14744 for GET_MODE_NUNITS.
14745 * tree.c (make_vector_type): Remove temporary shim and make
14746 the real function take the number of units as a poly_uint64
14747 rather than an int.
14748 (build_vector_type_for_mode): Handle polynomial nunits.
14749 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
14750 * emit-rtl.c (const_vec_series_p_1): Likewise.
14751 (gen_rtx_CONST_VECTOR): Likewise.
14752 * fold-const.c (test_vec_duplicate_folding): Likewise.
14753 * genrecog.c (validate_pattern): Likewise.
14754 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
14755 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14756 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
14757 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
14758 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
14759 * rtlanal.c (subreg_get_info): Likewise.
14760 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14761 (vect_grouped_load_supported): Likewise.
14762 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14763 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
14764 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14765 (simplify_const_unary_operation, simplify_binary_operation_1)
14766 (simplify_const_binary_operation, simplify_ternary_operation)
14767 (test_vector_ops_duplicate, test_vector_ops): Likewise.
14768 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
14769 instead of CONST_VECTOR_NUNITS.
14770 * varasm.c (output_constant_pool_2): Likewise.
14771 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
14772 explicit-encoded elements in the XVEC for variable-length vectors.
14774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14776 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
14778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14779 Alan Hayward <alan.hayward@arm.com>
14780 David Sherwood <david.sherwood@arm.com>
14782 * coretypes.h (fixed_size_mode): Declare.
14783 (fixed_size_mode_pod): New typedef.
14784 * builtins.h (target_builtins::x_apply_args_mode)
14785 (target_builtins::x_apply_result_mode): Change type to
14786 fixed_size_mode_pod.
14787 * builtins.c (apply_args_size, apply_result_size, result_vector)
14788 (expand_builtin_apply_args_1, expand_builtin_apply)
14789 (expand_builtin_return): Update accordingly.
14791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14793 * cse.c (hash_rtx_cb): Hash only the encoded elements.
14794 * cselib.c (cselib_hash_rtx): Likewise.
14795 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
14796 CONST_VECTOR encoding.
14798 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14799 Jeff Law <law@redhat.com>
14802 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
14803 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
14804 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
14805 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
14808 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
14809 explicitly probe *sp in a noreturn function if there were any callee
14810 register saves or frame pointer is needed.
14812 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14815 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
14816 BLKmode for ternary, binary or unary expressions.
14819 * var-tracking.c (delete_vta_debug_insn): New inline function.
14820 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
14821 insns from get_insns () to NULL instead of each bb separately.
14822 Use delete_vta_debug_insn. No longer static.
14823 (vt_debug_insns_local, variable_tracking_main_1): Adjust
14824 delete_vta_debug_insns callers.
14825 * rtl.h (delete_vta_debug_insns): Declare.
14826 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
14827 instead of variable_tracking_main.
14829 2018-01-03 Martin Sebor <msebor@redhat.com>
14831 PR tree-optimization/83603
14832 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
14833 arguments past the endof the argument list in functions declared
14834 without a prototype.
14835 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
14836 Avoid checking when arguments are null.
14838 2018-01-03 Martin Sebor <msebor@redhat.com>
14841 * doc/extend.texi (attribute const): Fix a typo.
14842 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
14843 issuing -Wsuggest-attribute for void functions.
14845 2018-01-03 Martin Sebor <msebor@redhat.com>
14847 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
14848 offset_int::from instead of wide_int::to_shwi.
14849 (maybe_diag_overlap): Remove assertion.
14850 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
14851 * gimple-ssa-sprintf.c (format_directive): Same.
14852 (parse_directive): Same.
14853 (sprintf_dom_walker::compute_format_length): Same.
14854 (try_substitute_return_value): Same.
14856 2018-01-03 Jeff Law <law@redhat.com>
14858 PR middle-end/83654
14859 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
14860 non-constant residual for zero at runtime and avoid probing in
14861 that case. Reorganize code for trailing problem to mirror handling
14864 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14866 PR tree-optimization/83501
14867 * tree-ssa-strlen.c (get_string_cst): New.
14868 (handle_char_store): Call get_string_cst.
14870 2018-01-03 Martin Liska <mliska@suse.cz>
14872 PR tree-optimization/83593
14873 * tree-ssa-strlen.c: Include tree-cfg.h.
14874 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
14875 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
14876 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
14878 (strlen_dom_walker::before_dom_children): Call
14879 gimple_purge_dead_eh_edges. Dump tranformation with details
14881 (strlen_dom_walker::before_dom_children): Update call by adding
14882 new argument cleanup_eh.
14883 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
14885 2018-01-03 Martin Liska <mliska@suse.cz>
14888 * cif-code.def (VARIADIC_THUNK): New enum value.
14889 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
14892 2018-01-03 Jan Beulich <jbeulich@suse.com>
14894 * sse.md (mov<mode>_internal): Tighten condition for when to use
14895 vmovdqu<ssescalarsize> for TI and OI modes.
14897 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14899 Update copyright years.
14901 2018-01-03 Martin Liska <mliska@suse.cz>
14904 * ipa-visibility.c (function_and_variable_visibility): Skip
14905 functions with noipa attribure.
14907 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14909 * gcc.c (process_command): Update copyright notice dates.
14910 * gcov-dump.c (print_version): Ditto.
14911 * gcov.c (print_version): Ditto.
14912 * gcov-tool.c (print_version): Ditto.
14913 * gengtype.c (create_file): Ditto.
14914 * doc/cpp.texi: Bump @copying's copyright year.
14915 * doc/cppinternals.texi: Ditto.
14916 * doc/gcc.texi: Ditto.
14917 * doc/gccint.texi: Ditto.
14918 * doc/gcov.texi: Ditto.
14919 * doc/install.texi: Ditto.
14920 * doc/invoke.texi: Ditto.
14922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14924 * vector-builder.h (vector_builder::m_full_nelts): Change from
14925 unsigned int to poly_uint64.
14926 (vector_builder::full_nelts): Update prototype accordingly.
14927 (vector_builder::new_vector): Likewise.
14928 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
14929 (vector_builder::operator ==): Likewise.
14930 (vector_builder::finalize): Likewise.
14931 * int-vector-builder.h (int_vector_builder::int_vector_builder):
14932 Take the number of elements as a poly_uint64 rather than an
14934 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
14935 from unsigned int to poly_uint64.
14936 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
14937 (vec_perm_indices::new_vector): Likewise.
14938 (vec_perm_indices::length): Likewise.
14939 (vec_perm_indices::nelts_per_input): Likewise.
14940 (vec_perm_indices::input_nelts): Likewise.
14941 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
14942 number of elements per input as a poly_uint64 rather than an
14943 unsigned int. Use the original encoding for variable-length
14944 vectors, rather than clamping each individual element.
14945 For the second and subsequent elements in each pattern,
14946 clamp the step and base before clamping their sum.
14947 (vec_perm_indices::series_p): Handle polynomial element counts.
14948 (vec_perm_indices::all_in_range_p): Likewise.
14949 (vec_perm_indices_to_tree): Likewise.
14950 (vec_perm_indices_to_rtx): Likewise.
14951 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
14952 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
14953 (tree_vector_builder::new_binary_operation): Handle polynomial
14954 element counts. Return false if we need to know the number
14955 of elements at compile time.
14956 * fold-const.c (fold_vec_perm): Punt if the number of elements
14957 isn't known at compile time.
14959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14961 * vec-perm-indices.h (vec_perm_builder): Change element type
14962 from HOST_WIDE_INT to poly_int64.
14963 (vec_perm_indices::element_type): Update accordingly.
14964 (vec_perm_indices::clamp): Handle polynomial element_types.
14965 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14966 (vec_perm_indices::all_in_range_p): Likewise.
14967 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
14969 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
14970 polynomial vec_perm_indices element types.
14971 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
14972 * fold-const.c (fold_vec_perm): Likewise.
14973 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
14974 * tree-vect-generic.c (lower_vec_perm): Likewise.
14975 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14976 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
14977 element type to HOST_WIDE_INT.
14979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14980 Alan Hayward <alan.hayward@arm.com>
14981 David Sherwood <david.sherwood@arm.com>
14983 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
14984 rather than an int. Use plus_constant.
14985 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
14986 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
14988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14989 Alan Hayward <alan.hayward@arm.com>
14990 David Sherwood <david.sherwood@arm.com>
14992 * calls.c (emit_call_1, expand_call): Change struct_value_size from
14993 a HOST_WIDE_INT to a poly_int64.
14995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14996 Alan Hayward <alan.hayward@arm.com>
14997 David Sherwood <david.sherwood@arm.com>
14999 * calls.c (load_register_parameters): Cope with polynomial
15000 mode sizes. Require a constant size for BLKmode parameters
15001 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
15002 forces a parameter to be padded at the lsb end in order to
15003 fill a complete number of words, require the parameter size
15004 to be ordered wrt UNITS_PER_WORD.
15006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15007 Alan Hayward <alan.hayward@arm.com>
15008 David Sherwood <david.sherwood@arm.com>
15010 * reload1.c (spill_stack_slot_width): Change element type
15011 from unsigned int to poly_uint64_pod.
15012 (alter_reg): Treat mode sizes as polynomial.
15014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15015 Alan Hayward <alan.hayward@arm.com>
15016 David Sherwood <david.sherwood@arm.com>
15018 * reload.c (complex_word_subreg_p): New function.
15019 (reload_inner_reg_of_subreg, push_reload): Use it.
15021 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15022 Alan Hayward <alan.hayward@arm.com>
15023 David Sherwood <david.sherwood@arm.com>
15025 * lra-constraints.c (process_alt_operands): Reject matched
15026 operands whose sizes aren't ordered.
15027 (match_reload): Refer to this check here.
15029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15030 Alan Hayward <alan.hayward@arm.com>
15031 David Sherwood <david.sherwood@arm.com>
15033 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
15034 that the mode size is in the set {1, 2, 4, 8, 16}.
15036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15037 Alan Hayward <alan.hayward@arm.com>
15038 David Sherwood <david.sherwood@arm.com>
15040 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
15041 Use plus_constant instead of gen_rtx_PLUS.
15043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15044 Alan Hayward <alan.hayward@arm.com>
15045 David Sherwood <david.sherwood@arm.com>
15047 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
15048 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
15049 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
15050 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
15051 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
15052 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
15053 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
15054 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
15055 * config/i386/i386.c (ix86_push_rounding): ...this new function.
15056 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
15058 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
15059 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
15060 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
15061 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
15062 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
15063 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
15064 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
15065 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
15066 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
15067 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
15069 * expr.c (emit_move_resolve_push): Treat the input and result
15070 of PUSH_ROUNDING as a poly_int64.
15071 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
15072 (emit_push_insn): Likewise.
15073 * lra-eliminations.c (mark_not_eliminable): Likewise.
15074 * recog.c (push_operand): Likewise.
15075 * reload1.c (elimination_effects): Likewise.
15076 * rtlanal.c (nonzero_bits1): Likewise.
15077 * calls.c (store_one_arg): Likewise. Require the padding to be
15078 known at compile time.
15080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15081 Alan Hayward <alan.hayward@arm.com>
15082 David Sherwood <david.sherwood@arm.com>
15084 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
15085 Use plus_constant instead of gen_rtx_PLUS.
15087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15088 Alan Hayward <alan.hayward@arm.com>
15089 David Sherwood <david.sherwood@arm.com>
15091 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
15092 rather than an int.
15094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15095 Alan Hayward <alan.hayward@arm.com>
15096 David Sherwood <david.sherwood@arm.com>
15098 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
15099 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
15100 via stack temporaries. Treat the mode size as polynomial too.
15102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15103 Alan Hayward <alan.hayward@arm.com>
15104 David Sherwood <david.sherwood@arm.com>
15106 * expr.c (expand_expr_real_2): When handling conversions involving
15107 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
15108 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
15109 as a poly_uint64 too.
15111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15112 Alan Hayward <alan.hayward@arm.com>
15113 David Sherwood <david.sherwood@arm.com>
15115 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
15117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15118 Alan Hayward <alan.hayward@arm.com>
15119 David Sherwood <david.sherwood@arm.com>
15121 * combine.c (can_change_dest_mode): Handle polynomial
15122 REGMODE_NATURAL_SIZE.
15123 * expmed.c (store_bit_field_1): Likewise.
15124 * expr.c (store_constructor): Likewise.
15125 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
15126 and polynomial REGMODE_NATURAL_SIZE.
15127 (gen_lowpart_common): Likewise.
15128 * reginfo.c (record_subregs_of_mode): Likewise.
15129 * rtlanal.c (read_modify_subreg_p): Likewise.
15131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15132 Alan Hayward <alan.hayward@arm.com>
15133 David Sherwood <david.sherwood@arm.com>
15135 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
15136 numbers of elements.
15138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15139 Alan Hayward <alan.hayward@arm.com>
15140 David Sherwood <david.sherwood@arm.com>
15142 * match.pd: Cope with polynomial numbers of vector elements.
15144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15145 Alan Hayward <alan.hayward@arm.com>
15146 David Sherwood <david.sherwood@arm.com>
15148 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
15149 in a POINTER_PLUS_EXPR.
15151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15152 Alan Hayward <alan.hayward@arm.com>
15153 David Sherwood <david.sherwood@arm.com>
15155 * omp-simd-clone.c (simd_clone_subparts): New function.
15156 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
15157 (ipa_simd_modify_function_body): Likewise.
15159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15160 Alan Hayward <alan.hayward@arm.com>
15161 David Sherwood <david.sherwood@arm.com>
15163 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
15164 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
15165 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
15166 (expand_vector_condition, vector_element): Likewise.
15167 (subparts_gt): New function.
15168 (get_compute_type): Use subparts_gt.
15169 (count_type_subparts): Delete.
15170 (expand_vector_operations_1): Use subparts_gt instead of
15171 count_type_subparts.
15173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15174 Alan Hayward <alan.hayward@arm.com>
15175 David Sherwood <david.sherwood@arm.com>
15177 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
15178 (vect_compile_time_alias): ...this new function. Do the calculation
15179 on poly_ints rather than trees.
15180 (vect_prune_runtime_alias_test_list): Update call accordingly.
15182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15183 Alan Hayward <alan.hayward@arm.com>
15184 David Sherwood <david.sherwood@arm.com>
15186 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
15188 (vect_schedule_slp_instance): Likewise.
15190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15191 Alan Hayward <alan.hayward@arm.com>
15192 David Sherwood <david.sherwood@arm.com>
15194 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
15195 constant and extern definitions for variable-length vectors.
15196 (vect_get_constant_vectors): Note that the number of units
15197 is known to be constant.
15199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15200 Alan Hayward <alan.hayward@arm.com>
15201 David Sherwood <david.sherwood@arm.com>
15203 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
15204 of units as polynomial. Choose between WIDE and NARROW based
15207 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15208 Alan Hayward <alan.hayward@arm.com>
15209 David Sherwood <david.sherwood@arm.com>
15211 * tree-vect-stmts.c (simd_clone_subparts): New function.
15212 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
15214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15215 Alan Hayward <alan.hayward@arm.com>
15216 David Sherwood <david.sherwood@arm.com>
15218 * tree-vect-stmts.c (vectorizable_call): Treat the number of
15219 vectors as polynomial. Use build_index_vector for
15220 IFN_GOMP_SIMD_LANE.
15222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15223 Alan Hayward <alan.hayward@arm.com>
15224 David Sherwood <david.sherwood@arm.com>
15226 * tree-vect-stmts.c (get_load_store_type): Treat the number of
15227 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
15228 for variable-length vectors.
15229 (vectorizable_mask_load_store): Treat the number of units as
15230 polynomial, asserting that it is constant if the condition has
15231 already been enforced.
15232 (vectorizable_store, vectorizable_load): Likewise.
15234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15235 Alan Hayward <alan.hayward@arm.com>
15236 David Sherwood <david.sherwood@arm.com>
15238 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
15239 of units as polynomial. Punt if we can't tell at compile time
15240 which vector contains the final result.
15242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15243 Alan Hayward <alan.hayward@arm.com>
15244 David Sherwood <david.sherwood@arm.com>
15246 * tree-vect-loop.c (vectorizable_induction): Treat the number
15247 of units as polynomial. Punt on SLP inductions. Use an integer
15248 VEC_SERIES_EXPR for variable-length integer reductions. Use a
15249 cast of such a series for variable-length floating-point
15252 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15253 Alan Hayward <alan.hayward@arm.com>
15254 David Sherwood <david.sherwood@arm.com>
15256 * tree.h (build_index_vector): Declare.
15257 * tree.c (build_index_vector): New function.
15258 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
15259 of units as polynomial, forcibly converting it to a constant if
15260 vectorizable_reduction has already enforced the condition.
15261 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
15262 to create a {1,2,3,...} vector.
15263 (vectorizable_reduction): Treat the number of units as polynomial.
15264 Choose vectype_in based on the largest scalar element size rather
15265 than the smallest number of units. Enforce the restrictions
15268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15269 Alan Hayward <alan.hayward@arm.com>
15270 David Sherwood <david.sherwood@arm.com>
15272 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
15273 number of units as polynomial.
15275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15276 Alan Hayward <alan.hayward@arm.com>
15277 David Sherwood <david.sherwood@arm.com>
15279 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
15280 * target.def (autovectorize_vector_sizes): Return the vector sizes
15281 by pointer, using vector_sizes rather than a bitmask.
15282 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
15283 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
15284 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
15286 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
15287 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
15288 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
15289 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
15290 * omp-general.c (omp_max_vf): Likewise.
15291 * omp-low.c (omp_clause_aligned_alignment): Likewise.
15292 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
15293 * tree-vect-loop.c (vect_analyze_loop): Likewise.
15294 * tree-vect-slp.c (vect_slp_bb): Likewise.
15295 * doc/tm.texi: Regenerate.
15296 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
15298 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
15299 the vector size as a poly_uint64 rather than an unsigned int.
15300 (current_vector_size): Change from an unsigned int to a poly_uint64.
15301 (get_vectype_for_scalar_type): Update accordingly.
15302 * tree.h (build_truth_vector_type): Take the size and number of
15303 units as a poly_uint64 rather than an unsigned int.
15304 (build_vector_type): Add a temporary overload that takes
15305 the number of units as a poly_uint64 rather than an unsigned int.
15306 * tree.c (make_vector_type): Likewise.
15307 (build_truth_vector_type): Take the number of units as a poly_uint64
15308 rather than an unsigned int.
15310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15311 Alan Hayward <alan.hayward@arm.com>
15312 David Sherwood <david.sherwood@arm.com>
15314 * target.def (get_mask_mode): Take the number of units and length
15315 as poly_uint64s rather than unsigned ints.
15316 * targhooks.h (default_get_mask_mode): Update accordingly.
15317 * targhooks.c (default_get_mask_mode): Likewise.
15318 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15319 * doc/tm.texi: Regenerate.
15321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15322 Alan Hayward <alan.hayward@arm.com>
15323 David Sherwood <david.sherwood@arm.com>
15325 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
15326 * omp-general.c (omp_max_vf): Likewise.
15327 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
15328 (expand_omp_simd): Handle polynomial safelen.
15329 * omp-low.c (omplow_simd_context): Add a default constructor.
15330 (omplow_simd_context::max_vf): Change from int to poly_uint64.
15331 (lower_rec_simd_input_clauses): Update accordingly.
15332 (lower_rec_input_clauses): Likewise.
15334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15335 Alan Hayward <alan.hayward@arm.com>
15336 David Sherwood <david.sherwood@arm.com>
15338 * tree-vectorizer.h (vect_nunits_for_cost): New function.
15339 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
15340 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
15341 (vect_analyze_slp_cost): Likewise.
15342 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
15343 (vect_model_load_cost): Likewise.
15345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15346 Alan Hayward <alan.hayward@arm.com>
15347 David Sherwood <david.sherwood@arm.com>
15349 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
15350 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
15351 from an unsigned int * to a poly_uint64_pod *.
15352 (calculate_unrolling_factor): New function.
15353 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
15355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15356 Alan Hayward <alan.hayward@arm.com>
15357 David Sherwood <david.sherwood@arm.com>
15359 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
15360 from an unsigned int to a poly_uint64.
15361 (_loop_vec_info::slp_unrolling_factor): Likewise.
15362 (_loop_vec_info::vectorization_factor): Change from an int
15364 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
15365 (vect_get_num_vectors): New function.
15366 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
15367 (vect_get_num_copies): Use vect_get_num_vectors.
15368 (vect_analyze_data_ref_dependences): Change max_vf from an int *
15369 to an unsigned int *.
15370 (vect_analyze_data_refs): Change min_vf from an int * to a
15372 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15373 than an unsigned HOST_WIDE_INT.
15374 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
15375 (vect_analyze_data_ref_dependence): Change max_vf from an int *
15376 to an unsigned int *.
15377 (vect_analyze_data_ref_dependences): Likewise.
15378 (vect_compute_data_ref_alignment): Handle polynomial vf.
15379 (vect_enhance_data_refs_alignment): Likewise.
15380 (vect_prune_runtime_alias_test_list): Likewise.
15381 (vect_shift_permute_load_chain): Likewise.
15382 (vect_supportable_dr_alignment): Likewise.
15383 (dependence_distance_ge_vf): Take the vectorization factor as a
15384 poly_uint64 rather than an unsigned HOST_WIDE_INT.
15385 (vect_analyze_data_refs): Change min_vf from an int * to a
15387 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
15388 vfm1 as a poly_uint64 rather than an int. Make the same change
15389 for the returned bound_scalar.
15390 (vect_gen_vector_loop_niters): Handle polynomial vf.
15391 (vect_do_peeling): Likewise. Update call to
15392 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
15393 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
15395 * tree-vect-loop.c (vect_determine_vectorization_factor)
15396 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
15397 (vect_get_known_peeling_cost): Likewise.
15398 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
15399 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
15400 (vect_transform_loop): Likewise. Use the lowest possible VF when
15401 updating the upper bounds of the loop.
15402 (vect_min_worthwhile_factor): Make static. Return an unsigned int
15403 rather than an int.
15404 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
15405 polynomial unroll factors.
15406 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
15407 (vect_make_slp_decision): Likewise.
15408 (vect_supported_load_permutation_p): Likewise, and polynomial
15410 (vect_analyze_slp_cost): Handle polynomial vf.
15411 (vect_slp_analyze_node_operations): Likewise.
15412 (vect_slp_analyze_bb_1): Likewise.
15413 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15414 than an unsigned HOST_WIDE_INT.
15415 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
15416 (vectorizable_load): Handle polynomial vf.
15417 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
15419 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
15421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15422 Alan Hayward <alan.hayward@arm.com>
15423 David Sherwood <david.sherwood@arm.com>
15425 * match.pd: Handle bit operations involving three constants
15426 and try to fold one pair.
15428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15430 * tree-vect-loop-manip.c: Include gimple-fold.h.
15431 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
15432 niters_maybe_zero parameters. Handle other cases besides a step of 1.
15433 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
15434 Add a path that uses a step of VF instead of 1, but disable it
15436 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
15437 and niters_no_overflow parameters. Update calls to
15438 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
15439 Create a new SSA name if the latter choses to use a ste other
15440 than zero, and return it via niters_vector_mult_vf_var.
15441 * tree-vect-loop.c (vect_transform_loop): Update calls to
15442 vect_do_peeling, vect_gen_vector_loop_niters and
15443 slpeel_make_loop_iterate_ntimes.
15444 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
15445 (vect_gen_vector_loop_niters): Update declarations after above changes.
15447 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
15449 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
15450 128-bit round to integer instructions.
15451 (ceil<mode>2): Likewise.
15452 (btrunc<mode>2): Likewise.
15453 (round<mode>2): Likewise.
15455 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15457 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
15458 unaligned VSX load/store on P8/P9.
15459 (expand_block_clear): Allow the use of unaligned VSX
15460 load/store on P8/P9.
15462 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15464 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
15466 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
15467 swap associated with both a load and a store.
15469 2018-01-02 Andrew Waterman <andrew@sifive.com>
15471 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
15472 * config/riscv/riscv.md (clear_cache): Use it.
15474 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
15476 * web.c: Remove out-of-date comment.
15478 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15480 * expr.c (fixup_args_size_notes): Check that any existing
15481 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
15482 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
15483 (emit_single_push_insn): ...here.
15485 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15487 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
15488 (const_vector_encoded_nelts): New function.
15489 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
15490 (const_vector_int_elt, const_vector_elt): Declare.
15491 * emit-rtl.c (const_vector_int_elt_1): New function.
15492 (const_vector_elt): Likewise.
15493 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
15494 of CONST_VECTOR_ELT.
15496 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15498 * expr.c: Include rtx-vector-builder.h.
15499 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
15500 directly on the tree encoding.
15501 (const_vector_from_tree): Likewise.
15502 * optabs.c: Include rtx-vector-builder.h.
15503 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
15504 sequence of "u" values.
15505 * vec-perm-indices.c: Include rtx-vector-builder.h.
15506 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
15507 directly on the vec_perm_indices encoding.
15509 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15511 * doc/rtl.texi (const_vector): Describe new encoding scheme.
15512 * Makefile.in (OBJS): Add rtx-vector-builder.o.
15513 * rtx-vector-builder.h: New file.
15514 * rtx-vector-builder.c: Likewise.
15515 * rtl.h (rtx_def::u2): Add a const_vector field.
15516 (CONST_VECTOR_NPATTERNS): New macro.
15517 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
15518 (CONST_VECTOR_DUPLICATE_P): Likewise.
15519 (CONST_VECTOR_STEPPED_P): Likewise.
15520 (CONST_VECTOR_ENCODED_ELT): Likewise.
15521 (const_vec_duplicate_p): Check for a duplicated vector encoding.
15522 (unwrap_const_vec_duplicate): Likewise.
15523 (const_vec_series_p): Check for a non-duplicated vector encoding.
15524 Say that the function only returns true for integer vectors.
15525 * emit-rtl.c: Include rtx-vector-builder.h.
15526 (gen_const_vec_duplicate_1): Delete.
15527 (gen_const_vector): Call gen_const_vec_duplicate instead of
15528 gen_const_vec_duplicate_1.
15529 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
15530 (gen_const_vec_duplicate): Use rtx_vector_builder.
15531 (gen_const_vec_series): Likewise.
15532 (gen_rtx_CONST_VECTOR): Likewise.
15533 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
15534 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15535 Build a new vector rather than modifying a CONST_VECTOR in-place.
15536 (handle_special_swappables): Update call accordingly.
15537 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
15538 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15539 Build a new vector rather than modifying a CONST_VECTOR in-place.
15540 (handle_special_swappables): Update call accordingly.
15542 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15544 * simplify-rtx.c (simplify_const_binary_operation): Use
15545 CONST_VECTOR_ELT instead of XVECEXP.
15547 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15549 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15550 the selector elements to be different from the data elements
15551 if the selector is a VECTOR_CST.
15552 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15553 ssizetype for the selector.
15555 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15557 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15558 before testing each element individually.
15559 * tree-vect-generic.c (lower_vec_perm): Likewise.
15561 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15563 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15564 * selftest-run-tests.c (selftest::run_tests): Call it.
15565 * vector-builder.h (vector_builder::operator ==): New function.
15566 (vector_builder::operator !=): Likewise.
15567 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15568 (vec_perm_indices::all_from_input_p): New function.
15569 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15570 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15571 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15572 instead of reading the VECTOR_CST directly. Detect whether both
15573 vector inputs are the same before constructing the vec_perm_indices,
15574 and update the number of inputs argument accordingly. Use the
15575 utility functions added above. Only construct sel2 if we need to.
15577 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15579 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15580 the broadcast of the low byte.
15581 (expand_mult_highpart): Use an explicit encoding for the permutes.
15582 * optabs-query.c (can_mult_highpart_p): Likewise.
15583 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15584 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15585 (vectorizable_bswap): Likewise.
15586 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15587 explicit encoding for the power-of-2 permutes.
15588 (vect_permute_store_chain): Likewise.
15589 (vect_grouped_load_supported): Likewise.
15590 (vect_permute_load_chain): Likewise.
15592 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15594 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15595 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15596 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15597 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15598 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15599 (vect_gen_perm_mask_any): Likewise.
15601 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15603 * int-vector-builder.h: New file.
15604 * vec-perm-indices.h: Include int-vector-builder.h.
15605 (vec_perm_indices): Redefine as an int_vector_builder.
15606 (auto_vec_perm_indices): Delete.
15607 (vec_perm_builder): Redefine as a stand-alone class.
15608 (vec_perm_indices::vec_perm_indices): New function.
15609 (vec_perm_indices::clamp): Likewise.
15610 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15611 (vec_perm_indices::new_vector): New function.
15612 (vec_perm_indices::new_expanded_vector): Update for new
15613 vec_perm_indices class.
15614 (vec_perm_indices::rotate_inputs): New function.
15615 (vec_perm_indices::all_in_range_p): Operate directly on the
15616 encoded form, without computing elided elements.
15617 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15618 encoding. Update for new vec_perm_indices class.
15619 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15620 the given vec_perm_builder.
15621 (expand_vec_perm_var): Update vec_perm_builder constructor.
15622 (expand_mult_highpart): Use vec_perm_builder instead of
15623 auto_vec_perm_indices.
15624 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15625 vec_perm_indices instead of auto_vec_perm_indices. Use a single
15626 or double series encoding as appropriate.
15627 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15628 vec_perm_indices instead of auto_vec_perm_indices.
15629 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15630 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15631 (vect_permute_store_chain): Likewise.
15632 (vect_grouped_load_supported): Likewise.
15633 (vect_permute_load_chain): Likewise.
15634 (vect_shift_permute_load_chain): Likewise.
15635 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15636 (vect_transform_slp_perm_load): Likewise.
15637 (vect_schedule_slp_instance): Likewise.
15638 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15639 (vectorizable_mask_load_store): Likewise.
15640 (vectorizable_bswap): Likewise.
15641 (vectorizable_store): Likewise.
15642 (vectorizable_load): Likewise.
15643 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15644 vec_perm_indices instead of auto_vec_perm_indices. Use
15645 tree_to_vec_perm_builder to read the vector from a tree.
15646 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15647 vec_perm_builder instead of a vec_perm_indices.
15648 (have_whole_vector_shift): Use vec_perm_builder and
15649 vec_perm_indices instead of auto_vec_perm_indices. Leave the
15650 truncation to calc_vec_perm_mask_for_shift.
15651 (vect_create_epilog_for_reduction): Likewise.
15652 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15653 from auto_vec_perm_indices to vec_perm_indices.
15654 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15655 instead of changing individual elements.
15656 (aarch64_vectorize_vec_perm_const): Use new_vector to install
15657 the vector in d.perm.
15658 * config/arm/arm.c (expand_vec_perm_d::perm): Change
15659 from auto_vec_perm_indices to vec_perm_indices.
15660 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15661 instead of changing individual elements.
15662 (arm_vectorize_vec_perm_const): Use new_vector to install
15663 the vector in d.perm.
15664 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15665 Update vec_perm_builder constructor.
15666 (rs6000_expand_interleave): Likewise.
15667 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15668 (rs6000_expand_interleave): Likewise.
15670 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15672 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15673 to qimode could truncate the indices.
15674 * optabs.c (expand_vec_perm_var): Likewise.
15676 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15678 * Makefile.in (OBJS): Add vec-perm-indices.o.
15679 * vec-perm-indices.h: New file.
15680 * vec-perm-indices.c: Likewise.
15681 * target.h (vec_perm_indices): Replace with a forward class
15683 (auto_vec_perm_indices): Move to vec-perm-indices.h.
15684 * optabs.h: Include vec-perm-indices.h.
15685 (expand_vec_perm): Delete.
15686 (selector_fits_mode_p, expand_vec_perm_var): Declare.
15687 (expand_vec_perm_const): Declare.
15688 * target.def (vec_perm_const_ok): Replace with...
15689 (vec_perm_const): ...this new hook.
15690 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15691 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15692 * doc/tm.texi: Regenerate.
15693 * optabs.def (vec_perm_const): Delete.
15694 * doc/md.texi (vec_perm_const): Likewise.
15695 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15696 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15697 expand_vec_perm for constant permutation vectors. Assert that
15698 the mode of variable permutation vectors is the integer equivalent
15699 of the mode that is being permuted.
15700 * optabs-query.h (selector_fits_mode_p): Declare.
15701 * optabs-query.c: Include vec-perm-indices.h.
15702 (selector_fits_mode_p): New function.
15703 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15704 is defined, instead of checking whether the vec_perm_const_optab
15705 exists. Use targetm.vectorize.vec_perm_const instead of
15706 targetm.vectorize.vec_perm_const_ok. Check whether the indices
15707 fit in the vector mode before using a variable permute.
15708 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15709 vec_perm_indices instead of an rtx.
15710 (expand_vec_perm): Replace with...
15711 (expand_vec_perm_const): ...this new function. Take the selector
15712 as a vec_perm_indices rather than an rtx. Also take the mode of
15713 the selector. Update call to shift_amt_for_vec_perm_mask.
15714 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15715 Use vec_perm_indices::new_expanded_vector to expand the original
15716 selector into bytes. Check whether the indices fit in the vector
15717 mode before using a variable permute.
15718 (expand_vec_perm_var): Make global.
15719 (expand_mult_highpart): Use expand_vec_perm_const.
15720 * fold-const.c: Includes vec-perm-indices.h.
15721 * tree-ssa-forwprop.c: Likewise.
15722 * tree-vect-data-refs.c: Likewise.
15723 * tree-vect-generic.c: Likewise.
15724 * tree-vect-loop.c: Likewise.
15725 * tree-vect-slp.c: Likewise.
15726 * tree-vect-stmts.c: Likewise.
15727 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
15729 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
15730 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
15731 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
15732 (aarch64_vectorize_vec_perm_const): ...this new function.
15733 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15734 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15735 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
15736 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
15737 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15738 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15739 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
15741 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
15742 check for NEON modes.
15743 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
15744 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
15745 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
15746 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
15748 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
15749 the old VEC_PERM_CONST conditions.
15750 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
15751 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
15752 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
15753 (ia64_vectorize_vec_perm_const_ok): Merge into...
15754 (ia64_vectorize_vec_perm_const): ...this new function.
15755 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
15756 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
15757 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
15758 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
15759 * config/mips/mips.c (mips_expand_vec_perm_const)
15760 (mips_vectorize_vec_perm_const_ok): Merge into...
15761 (mips_vectorize_vec_perm_const): ...this new function.
15762 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
15763 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
15764 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
15765 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
15766 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
15767 (rs6000_expand_vec_perm_const): Delete.
15768 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
15770 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15771 (altivec_expand_vec_perm_const_le): Take each operand individually.
15772 Operate on constant selectors rather than rtxes.
15773 (altivec_expand_vec_perm_const): Likewise. Update call to
15774 altivec_expand_vec_perm_const_le.
15775 (rs6000_expand_vec_perm_const): Delete.
15776 (rs6000_vectorize_vec_perm_const_ok): Delete.
15777 (rs6000_vectorize_vec_perm_const): New function.
15778 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15779 an element count and rtx array.
15780 (rs6000_expand_extract_even): Update call accordingly.
15781 (rs6000_expand_interleave): Likewise.
15782 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
15783 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
15784 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
15785 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
15786 (rs6000_expand_vec_perm_const): Delete.
15787 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15788 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15789 (altivec_expand_vec_perm_const_le): Take each operand individually.
15790 Operate on constant selectors rather than rtxes.
15791 (altivec_expand_vec_perm_const): Likewise. Update call to
15792 altivec_expand_vec_perm_const_le.
15793 (rs6000_expand_vec_perm_const): Delete.
15794 (rs6000_vectorize_vec_perm_const_ok): Delete.
15795 (rs6000_vectorize_vec_perm_const): New function. Remove stray
15796 reference to the SPE evmerge intructions.
15797 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15798 an element count and rtx array.
15799 (rs6000_expand_extract_even): Update call accordingly.
15800 (rs6000_expand_interleave): Likewise.
15801 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
15802 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
15804 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15806 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15808 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
15809 vector mode and that that mode matches the mode of the data
15811 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
15812 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
15813 directly using expand_vec_perm_1 when forcing selectors into
15815 (expand_vec_perm_var): New function, split out from expand_vec_perm.
15817 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15819 * optabs-query.h (can_vec_perm_p): Delete.
15820 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
15821 * optabs-query.c (can_vec_perm_p): Split into...
15822 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
15823 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
15824 particular selector is valid.
15825 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15826 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15827 (vect_grouped_load_supported): Likewise.
15828 (vect_shift_permute_load_chain): Likewise.
15829 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15830 (vect_transform_slp_perm_load): Likewise.
15831 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15832 (vectorizable_bswap): Likewise.
15833 (vect_gen_perm_mask_checked): Likewise.
15834 * fold-const.c (fold_ternary_loc): Likewise. Don't take
15835 implementations of variable permutation vectors into account
15836 when deciding which selector to use.
15837 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
15838 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
15839 with a false third argument.
15840 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
15841 to test whether the constant selector is valid and can_vec_perm_var_p
15842 to test whether a variable selector is valid.
15844 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15846 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
15847 * optabs-query.c (can_vec_perm_p): Likewise.
15848 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
15849 instead of vec_perm_indices.
15850 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
15851 (vect_gen_perm_mask_checked): Likewise,
15852 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
15853 (vect_gen_perm_mask_checked): Likewise,
15855 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15857 * optabs-query.h (qimode_for_vec_perm): Declare.
15858 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
15859 (qimode_for_vec_perm): ...this new function.
15860 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
15862 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15864 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
15865 does not have a conditional at the top.
15867 2018-01-02 Richard Biener <rguenther@suse.de>
15869 * ipa-inline.c (big_speedup_p): Fix expression.
15871 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
15874 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
15877 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
15881 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
15882 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
15883 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
15884 cond_taken_branch_cost 3->4.
15886 2018-01-01 Jakub Jelinek <jakub@redhat.com>
15888 PR tree-optimization/83581
15889 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
15890 TODO_cleanup_cfg if any changes have been made.
15892 PR middle-end/83608
15893 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
15894 convert_modes if target mode has the right side, but different mode
15897 PR middle-end/83609
15898 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
15899 last argument when extracting from CONCAT. If either from_real or
15900 from_imag is NULL, use expansion through memory. If result is not
15901 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
15902 the parts directly to inner mode, if even that fails, use expansion
15905 PR middle-end/83623
15906 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
15907 check for bswap in mode rather than HImode and use that in expand_unop
15910 Copyright (C) 2018 Free Software Foundation, Inc.
15912 Copying and distribution of this file, with or without modification,
15913 are permitted in any medium without royalty provided the copyright
15914 notice and this notice are preserved.