compiler: don't set btype_ too early for alias type
[official-gcc.git] / gcc / ChangeLog
blob27f8a722fa570bed3e79690adbfc14248c02bc4b
1 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3         * config/arc/arc.c (arc_label_align): Use align_labels instead of
4         deprecated align_labels_log.
6 2018-07-17  Richard Biener  <rguenther@suse.de>
8         PR lto/86456
9         * dwarf2out.c (init_sections_and_labels): Always generate
10         a debug_line_str_section for early LTO debug.
11         (dwarf2out_finish): Reset debug_line_str_hash output early.
12         Bump counter for extra dwarf5 .debug_loc labels to not conflict
13         with fat LTO part.
14         (dwarf2out_early_finish): Output debug_line_str.
16 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
18         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
19         index register on z196 or later.
21 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
23         * config/s390/s390.c (s390_default_align): Set default function
24         alignment to 16.
25         (s390_override_options_after_change): Call s390_default align.
26         (s390_option_override_internal): Call s390_default_align.
27         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
29 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
31         PR middle-end/86542
32         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
33         to _looptemp_ clauses, other than the first two.
35 2018-07-17  Martin Liska  <mliska@suse.cz>
37         * opts.c: Do not enable OPT_falign_* for -Os.
39 2018-07-17  Martin Liska  <mliska@suse.cz>
41         * align.h (MAX_CODE_ALIGN): New.
42         (MAX_CODE_ALIGN_VALUE): New.
43         * common/config/i386/i386-common.c (ix86_handle_option):
44         (MAX_CODE_ALIGN): Moved to align.h.
45         * final.c (MAX_CODE_ALIGN): Likewise.
46         * opts.c (parse_and_check_align_values):
47         (MAX_CODE_ALIGN): Likewise.
48         (MAX_CODE_ALIGN_VALUE): Likewise.
50 2018-07-17  Martin Liska  <mliska@suse.cz>
52         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
53         in order to fulfil coding style.
54         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
55         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
56         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
57         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
58         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
59         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
60         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
61         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
62         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
64 2018-07-17  Martin Liska  <mliska@suse.cz>
66         * align.h: New file.
67         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
68         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
69         align_flags of label_to_alignment.
70         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
71         class.
72         * config/m68k/m68k.c: Do not use removed align_labels_value and
73         align_loops_value.
74         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
75         (LOOP_ALIGN): Likewise.
76         (LABEL_ALIGN): Likewise.
77         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
78         Remove not used macro.
79         (rs6000_loop_align): Change return type to align_flags.
80         (rs6000_loop_align_max_skip): Remove.
81         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
82         Change return type to align_flags.
83         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
84         Remove not used macro.
85         (rs6000_loop_align):  Change return type to align_flags.
86         (rs6000_loop_align_max_skip): Remove.
87         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
88         * config/rx/rx-protos.h (rx_align_for_label): Make it
89         static function.
90         * config/rx/rx.c (rx_align_for_label): Change return type
91         to align_flags.
92         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
93         macro definitions.
94         into align_flags class.
95         (LABEL_ALIGN): Likewise.
96         (LOOP_ALIGN): Likewise.
97         * config/s390/s390.c (s390_label_align): Use align_flags
98         class member.
99         (s390_asm_output_function_label): Likewise.
100         * config/sh/sh.c (sh_override_options_after_change):
101         Use align_flags class directly without macros.
102         (find_barrier): Likewise.
103         (barrier_align): Likewise.
104         (sh_loop_align): Likewise.
105         * config/spu/spu.c (spu_option_override):
106         Use align_flags_tuple::get_value instead of removed macros.
107         (spu_sched_init): Likewise.
108         * config/spu/spu.h (GTY): Likewise.
109         * config/visium/visium.c (visium_option_override):
110         Set "8" as default secondary alignment.
111         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
112         in order to guarantee secondary alignment of 8.
113         * coretypes.h: Include align.h header file.
114         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
115         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
116         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
117         * doc/tm.texi.in: Likewise.
118         * final.c (struct label_alignment): Remove not used structure.
119         (LABEL_ALIGN): Change type to align_flags.
120         (LOOP_ALIGN): Likewise.
121         (JUMP_ALIGN): Likewise.
122         (default_loop_align_max_skip): Remove.
123         (default_label_align_max_skip): Likewise.
124         (default_jump_align_max_skip): Likewise.
125         (default_label_align_after_barrier_max_skip):
126         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
127         (LABEL_TO_MAX_SKIP): Remove.
128         (label_to_alignment): Return align_flags type instead of integer.
129         (label_to_max_skip): Remove.
130         (align_fuzz): Use align_flags type.
131         (compute_alignments): Use align_flags type and use align_flags::max
132         to combine multiple alignments.
133         (grow_label_align): Grow vec instead of C array.
134         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
135         (shorten_branches):  Use align_flags type and use align_flags::max
136         to combine multiple alignments.
137         (final_scan_insn_1): Remove usage of secondary alignment that comes
138         from label alignment, but instead use proper secondary alignment
139         which is computed in grow_label_align.
140         * flags.h (struct align_flags_tuple): Move to align.h.
141         (struct align_flags): Likewise.
142         (state_align_loops): Rename to align_loops.
143         (state_align_jumps): Rename to align_jumps.
144         (state_align_labels): Rename to align_labels.
145         (state_align_functions): Rename to align_functions.
146         (align_loops_log): Remove.
147         (align_jumps_log): Remove.
148         (align_labels_log): Remove.
149         (align_functions_log): Remove.
150         (align_loops_max_skip): Remove.
151         (align_jumps_max_skip): Remove.
152         (align_labels_max_skip): Remove.
153         (align_functions_max_skip): Remove.
154         (align_loops_value): Remove.
155         (align_jumps_value): Remove.
156         (align_labels_value): Remove.
157         (align_functions_value): Remove.
158         * output.h (label_to_alignment): Change return type to align_flags.
159         (label_to_max_skip): Remove.
160         * target.def: Remove loop_align_max_skip, label_align_max_skip,
161         jump_align_max_skip macros.
162         * targhooks.h (default_loop_align_max_skip): Remove.
163         (default_label_align_max_skip): Likewise.
164         (default_jump_align_max_skip): Likewise.
165         (default_label_align_after_barrier_max_skip): Remove.
166         * toplev.c (read_log_maxskip): Use ::normalize function.
167         (parse_N_M): Remove not used argument and also call ::normalize.
168         (parse_alignment_opts): Do not pass unused arguments.
169         * varasm.c (assemble_start_function): Use directly align_functions
170         instead of removed macros.
171         * system.h: Do not poison removed macros.
173 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
175         PR middle-end/86539
176         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
177         and cond temporaries don't have reference type if iterator has
178         pointer type.  For init use &for_pre_body instead of pre_p if
179         for_pre_body is non-empty.
181 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
183         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
184         double-double modes to SFmode directly directly.
185         (trunc<mode>sf2_fprs): Delete.
187 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
189         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
190         for conversions between IFmode and the decimal floating point modes.
191         (init_float128_ieee): Use the correct names for conversions between
192         KFmode and the decimal floating point modes.
194 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
196         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
197         for the conversions between TDmode and IFmode.
198         (init_float128_ieee): Use more correct names for the conversions
199         between TDmode and KFmode.
201 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
203         PR tree-optimization/86526
204         * builtins.c (expand_builtin_memcmp): Formatting fixes.
205         (inline_expand_builtin_string_cmp): Likewise.
206         (inline_string_cmp): Likewise.  Use c_readstr instead of
207         builtin_memcpy_read_str.  Add unit_mode temporary.
209 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
211         PR middle-end/86528
212         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
213         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
215 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
217         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
218         Alphabetize prototypes of built-in functions, separating out
219         built-in functions that are listed in this section but should be
220         described elsewhere.
222 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
224         PR target/86511
225         * expmed.c (emit_store_flag): Do not emit setcc followed by a
226         conditional move when trapping comparison was split to a
227         non-trapping one (and vice versa).
229 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
231         * config/s390/s390.c (s390_function_profiler): Generate nops
232         instead of profiler call sequences.
233         * config/s390/s390.opt: Add the new option.
235 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
237         * config/s390/s390.c (s390_function_profiler): Generate
238         __mcount_loc section.
239         * config/s390/s390.opt: Add the new option.
241 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
243         * common.opt: Add the new warning.
244         * config/s390/s390.c (s390_function_profiler): Emit "brasl
245         %r0,__fentry__" when -mfentry is specified.
246         (s390_option_override_internal): Disallow -mfentry for 31-bit
247         CPUs.
248         * config/s390/s390.opt: Add the new option.
250 2018-07-16  Richard Biener  <rguenther@suse.de>
252         PR lto/86523
253         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
254         for function-local FUNCTION_DECL and RESULT_DECL immediately.
256 2018-07-16  Martin Liska  <mliska@suse.cz>
258         PR ipa/86529
259         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
260         to ::get_create.
262 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
264         * config/arc/arcHS.md: Update ARCHS scheduling rules.
266 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
268         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
269         for ARCHS4x.
270         * config/arc/arc-cpus.def (hs4x): New cpu.
271         (hs4xd): Likewise.
272         * config/arc/arc-tables.opt: Regenerate.
273         * config/arc/arc.c (arc_sched_issue_rate): New function.
274         (TARGET_SCHED_ISSUE_RATE): Define.
275         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
276         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
277         fpu_cvt.
278         (attr tune): Add ARCHS4x tune values.
279         (attr tune_dspmpy): Define.
280         (*tst): Correct instruction type.
281         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
282         * config/arc/arcHS4x.md: New file.
283         * config/arc/fpu.md: Update instruction type attributes.
284         * config/arc/t-multilib: Regenerate.
286 2018-07-16  Tom de Vries  <tdevries@suse.de>
288         PR debug/86455
289         * var-tracking.c (vt_initialize): Fix pre_dec handling.
291 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
293         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
294         early clobber.
296 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
298         PR tree-optimization/86514
299         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
300         conversion to a boolean type from a type with greater precision.
302 2018-07-16  Tom de Vries  <tdevries@suse.de>
304         * var-tracking.c (vt_initialize): Print adjusted insn slim if
305         dump_flags request TDF_SLIM.
307 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
309         * fold-const.c (int_const_binop_1): Abstract...
310         (wide_int_binop): ...wide int code here.
311         (poly_int_binop): ...poly int code here.
312         Abstract the rest of int_const_binop_1 into int_const_binop.
313         * fold-const.h (wide_int_binop): New.
314         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
315         Remove useless PLUS/MINUS_EXPR case.
316         (zero_nonzero_bits_from_vr): Move wide int code...
317         (zero_nonzero_bits_from_bounds): ...here.
318         (extract_range_from_binary_expr_1): Move mask optimization code...
319         (range_easy_mask_min_max): ...here.
320         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
321         (range_easy_mask_min_max): New.
323 2018-07-15  Jeff Law  <law@redhat.com>
325         PR target/85993
326         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
327         block.
329 2018-07-14  Jim Wilson  <jimw@sifive.com>
331         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
333 2018-07-14  Paul Koning  <ni1d@arrl.net>
335         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
337 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
339         * lto-streamer-out.c (copy_function_or_variable): Dump info about
340         copying section.
342 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
343             Steve Munroe  <munroesj52@gmail.com>
345         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
346         (_mm_andnot_si128): Likewise.
347         (_mm_or_si128): Likewise.
348         (_mm_xor_si128): Likewise.
350 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
352         PR middle-end/78809
353         * builtins.c (expand_builtin_memcmp): Inline the calls first
354         when result_eq is false.
355         (expand_builtin_strcmp): Inline the calls first.
356         (expand_builtin_strncmp): Likewise.
357         (inline_string_cmp): New routine. Expand a string compare
358         call by using a sequence of char comparison.
359         (inline_expand_builtin_string_cmp): New routine. Inline expansion
360         a call to str(n)cmp/memcmp.
361         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
362         New option.
363         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
365 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
367         * config/arm/driver-arm.c: Include arm-native.h.
368         (host_detect_local_cpu): Use auto-generated data tables.
369         (vendors, arm_cpu_table): Delete.  Move part information to ...
370         * config/arm/arm-cpus.in: ... here.
371         * config/arm/parsecpu.awk (gen_native): New function.
372         (vendor, part): New CPU fields.
373         (END): Add support for building the native CPU detection tables.
374         * config/arm/t-arm (arm-native.h): Add build rule.
375         (driver-arm.o): Add dependency on arm-native.h.
377 2018-07-13  Richard Biener  <rguenther@suse.de>
379         PR middle-end/85974
380         * match.pd (addr1 - addr2): Allow either of the operand to
381         have a conversion.
383 2018-07-13  Tom de Vries  <tdevries@suse.de>
385         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
386         in remap_ssa_name.
388 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
390         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
391         arrays instead of numbered variables.
393 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
395         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
396         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
398 2018-07-13  Richard Biener  <rguenther@suse.de>
400         PR debug/86452
401         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
402         instead of get_context_die.
404 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
405             Richard Biener  <rguenther@suse.de>
407         PR middle-end/86489
408         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
409         that the loop latch destination where phi is defined.
411 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
413         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
414         (riscv_expand_epilogue): Add assertion to check interrupt mode.
415         (riscv_set_current_function): Extract getting interrupt type to new
416         function.
417         (riscv_get_interrupt_type): New function.
418         (riscv_merge_decl_attributes): New function, checking interrupt type is
419         same.
420         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
422 2018-07-12  Paul Koning  <ni1d@arrl.net>
424         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
425         directive.
427 2018-07-12  Paul Koning  <ni1d@arrl.net>
429         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
430         zero reference, add doloop_end instead.
431         * doc/md.texi (decrement_and_branch_until_zero): Remove.
432         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
433         detail for doloop_end.
435 2018-07-12  Martin Sebor  <msebor@redhat.com>
437         PR c/86453
438         * attribs.c (decl_attributes): Reject conflicting attributes before
439         calling attribute handlers.
441 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
443         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
444          parameter.
445         (gcc::dump_manager::get_dump_file_name): likewise.
446         (dump_begin): Likewise.
447         * dumpfile.h (dump_begin): Update prototype.
448         (gcc::dump_manager::get_dump_file_name,
449         gcc::dump_manager::get_dump_file_name): Update prototype.
451 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
453         * internal-fn.h (vectorizable_internal_fn_p): New function.
454         * tree-vect-slp.c (compatible_calls_p): Likewise.
455         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
456         to internal functions.
457         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
459 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
461         * fold-const.h (inverse_conditions_p): Declare.
462         * fold-const.c (inverse_conditions_p): New function.
463         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
464         that test the inverse condition of a conditional internal function.
465         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
466         * internal-fn.c (internal_fn_mask_index): Handle conditional
467         internal functions.
468         (vectorized_internal_fn_supported_p): New function.
469         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
470         (any_pred_load_store): Replace with...
471         (need_to_predicate): ...this new variable.
472         (redundant_ssa_names): New variable.
473         (ifcvt_can_use_mask_load_store): Move initial checks to...
474         (ifcvt_can_predicate): ...this new function.  Handle tree codes
475         for which a conditional internal function exists.
476         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
477         instead of ifcvt_can_use_mask_load_store.  Update after variable
478         name change.
479         (predicate_load_or_store): New function, split out from
480         predicate_mem_writes.
481         (check_redundant_cond_expr): New function.
482         (value_available_p): Likewise.
483         (predicate_rhs_code): Likewise.
484         (predicate_mem_writes): Rename to...
485         (predicate_statements): ...this.  Use predicate_load_or_store
486         and predicate_rhs_code.
487         (combine_blocks, tree_if_conversion): Update after above name changes.
488         (ifcvt_local_dce): Handle redundant_ssa_names.
489         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
490         general conditional functions.
491         * tree-vect-stmts.c (vectorizable_call): Likewise.
493 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
494             Alan Hayward  <alan.hayward@arm.com>
495             David Sherwood  <david.sherwood@arm.com>
497         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
498         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
499         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
500         plus and minus and convert them into IFN_COND_FMA-based sequences.
501         (convert_mult_to_fma): Handle conditional plus and minus.
503 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
505         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
506         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
507         (cond_fnms_optab): New optabs.
508         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
509         internal functions.
510         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
511         * internal-fn.h (get_conditional_internal_fn): Declare.
512         (get_unconditional_internal_fn): Likewise.
513         * internal-fn.c (cond_ternary_direct): New macro.
514         (expand_cond_ternary_optab_fn): Likewise.
515         (direct_cond_ternary_optab_supported_p): Likewise.
516         (FOR_EACH_COND_FN_PAIR): Likewise.
517         (get_conditional_internal_fn): New function.
518         (get_unconditional_internal_fn): Likewise.
519         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
520         (gimple_match_op::gimple_match_op): Add a new overload for 5
521         operands.
522         (gimple_match_op::set_op): Likewise.
523         (gimple_resimplify5): Declare.
524         * genmatch.c (decision_tree::gen): Generate simplifications for
525         5 operands.
526         * gimple-match-head.c (gimple_simplify): Define an overload for
527         5 operands.  Handle calls with 5 arguments in the top-level overload.
528         (convert_conditional_op): Handle conversions from unconditional
529         internal functions to conditional ones.
530         (gimple_resimplify5): New function.
531         (build_call_internal): Pass a fifth operand.
532         (maybe_push_res_to_seq): Likewise.
533         (try_conditional_simplification): Try converting conditional
534         internal functions to unconditional internal functions.
535         Handle 3-operand unconditional forms.
536         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
537         Define ternary equivalents of the current rules for binary conditional
538         internal functions.
539         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
540         ternary operations.
541         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
542         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
543         (optab): Handle them.
544         (SVE_COND_FP_TERNARY): New int iterator.
545         (sve_fmla_op, sve_fmad_op): New int attributes.
546         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
547         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
548         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
550 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
552         * target.def (preferred_else_value): New target hook.
553         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
554         * doc/tm.texi: Regenerate.
555         * targhooks.h (default_preferred_else_value): Declare.
556         * targhooks.c (default_preferred_else_value): New function.
557         * internal-fn.h (conditional_internal_fn_code): Declare.
558         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
559         (get_conditional_internal_fn): Use it.
560         (conditional_internal_fn_code): New function.
561         * gimple-match.h (gimple_match_cond): New struct.
562         (gimple_match_op): Add a cond member function.
563         (gimple_match_op::gimple_match_op): Update all forms to take a
564         gimple_match_cond.
565         * genmatch.c (expr::gen_transform): Use the same condition as res_op
566         for the suboperation, but don't specify a particular else_value.
567         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
568         (visit_nary_op, visit_reference_op_load): Pass
569         gimple_match_cond::UNCOND to the gimple_match_op constructor.
570         * gimple-match-head.c: Include tree-eh.h
571         (convert_conditional_op): New function.
572         (maybe_resimplify_conditional_op): Likewise.
573         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
574         (gimple_resimplify2): Likewise.
575         (gimple_resimplify3): Likewise.
576         (gimple_resimplify4): Likewise.
577         (maybe_push_res_to_seq): Return null for conditional operations.
578         (try_conditional_simplification): New function.
579         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
580         constructor.
581         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
582         IFN_COND_* call.
583         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
584         function.
585         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
587 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
589         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
590         DECL_FCONTEXT
591         (hash_tree): Do not hash DECL_FCONTEXT
592         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
593         Do not stream DECL_FCONTEXT.
594         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
595         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
597 2018-07-12  Richard Biener  <rguenther@suse.de>
599         PR debug/86462
600         * dwarf2out.c (gen_block_die): Only output blocks when they have
601         at least one !DECL_IGNORED_P variable.
603 2018-07-12  Richard Biener  <rguenther@suse.de>
605         PR target/84829
606         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
607         Remove -mieee-fp handling.
609 2018-07-12  Richard Biener  <rguenther@suse.de>
611         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
612         left-over from last patch.
614 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
616         PR tree-optimization/86492
617         * gimple-ssa-store-merging.c
618         (imm_store_chain_info::coalesce_immediate_stores): Call
619         check_no_overlap even for the merge_overlapping case.  Formatting fix.
621 2018-07-12  Richard Biener  <rguenther@suse.de>
623         PR middle-end/86479
624         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
625         move possibly trapping operations into the conditional.
627 2018-07-12  Richard Biener  <rguenther@suse.de>
629         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
630         (vn_lookup_simplify_result): Remove recursion limit applied
631         here.
632         (vn_nary_build_or_lookup_1): Adjust.
633         (try_to_simplify): Likewise.
634         * gimple-match-head.c (gimple_resimplify1): Instead apply one
635         here.
636         (gimple_resimplify2): Likewise.
637         (gimple_resimplify3): Likewise.
638         (gimple_resimplify4): Likewise.
640 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
642         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
643         Use __mmask64 type instead of __mmask8 for __M argument.
644         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
645         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
646         __U argument.
647         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
648         __mmask16 for __M argument.
649         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
650         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
651         to __mmask16 instead of __mmask8.
652         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
653         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
654         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
655         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
656         instead of __mmask16 for __U argument.
657         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
658         __mmask16 instead of __mmask8 for __U argument.
659         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
660         __U argument.
661         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
662         __mmask16.
663         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
664         argument.
665         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
666         __U argument.
667         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
668         __mmask16.
669         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
670         of __mmask16.
671         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
672         __U argument.
673         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
674         __U argument.
675         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
676         __U argument.
677         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
678         __U argument.
679         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
680         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
681         return type as well as __M argument type and all casts from __mmask8
682         to __mmask32.
683         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
684         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
685         return type as well as __M argument type and all casts from __mmask8
686         to __mmask16.
687         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
688         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
689         return type as well as __M argument type and all casts from __mmask8
690         to __mmask32.
691         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
692         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
693         return type as well as __M argument type and all casts from __mmask8
694         to __mmask16.
695         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
696         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
697         __mmask16.
699 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
701         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
702         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
703         for __U argument.
705 2018-07-11  Paul Koning  <ni1d@arrl.net>
707         * doc/md.texi (define_subst): Document how multiple occurrences of
708         the same argument in the replacement pattern are handled.
710 2018-07-11  Paul Koning  <ni1d@arrl.net>
712         * doc/extend.texi (Common Variable Attributes): Move "mode" into
713         alphabetical order.
714         (Common Type Attributes): Add "mode" attribute.
716 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
718         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
719         stream DECL_ORIGINAL_TYPE.
720         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
721         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
722         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
723         Do not walk original type.
724         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
725         external decls.
726         (write_ts_decl_non_common_tree_pointers): Do not stream
727         DECL_ORIGINAL_TYPE
728         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
729         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
731 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
733         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
734         thread twice from the same starting edge.
736 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
738         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
739         * gimple.c (gimple_call_nonnull_result_p): ...here...
740         (gimple_call_nonnull_arg): ...and here.
741         * gimple.h (gimple_call_nonnull_result_p): New.
742         (gimple_call_nonnull_arg): New.
744 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
746         * config/arm/arm-cpus.in: Move information from fpu field of each
747         cpu definition to the isa field.
748         * config/arm/parsecpu.awk (fpu): Delete match rule.
749         (gen_comm_data): Don't add bits from the CPU's FPU entry.
751 2018-07-11  Richard Biener  <rguenther@suse.de>
753         PR debug/86457
754         * dwarf2out.c (init_sections_and_labels): Use
755         output_asm_line_debug_info consistently.
756         (dwarf2out_early_finish): Likewise.
757         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
758         type units.
760 2018-07-11  Richard Biener  <rguenther@suse.de>
762         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
763         Rework father_bb setting in a way to avoid propagating constants
764         multiple times on a loop body.
766 2018-07-10  Mark Wielaard  <mark@klomp.org>
768         PR debug/86459
769         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
771 2018-07-10  Richard Biener  <rguenther@suse.de>
773         * hash-map.h (hash_map::iterator::operator*): Return
774         references to key and value.
776 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
778         PR c++/86443
779         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
780         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
781         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
782         (gimplify_omp_for): For composite loops, move outer
783         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
784         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
785         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
786         TREE_LIST for both the original class iterator and the "last" helper
787         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
788         loop, remember has_decl_expr from outer composite loops for the
789         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
791 2018-07-09  Martin Sebor  <msebor@redhat.com>
793         PR middle-end/77357
794         PR middle-end/86428
795         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
796         accessing implicitly initialized array elements.
797         * expr.c (string_constant): Handle string initializers of
798         character arrays within aggregates.
799         * gimple-fold.c (fold_array_ctor_reference): Add argument.
800         Store element offset.  As a special case, handle zero size.
801         (fold_nonarray_ctor_reference): Same.
802         (fold_ctor_reference): Add argument.  Store subobject offset.
803         * gimple-fold.h (fold_ctor_reference): Add argument.
805 2018-07-09  Paul Koning  <ni1d@arrl.net>
807         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
808         (pdp11_insn_cost): New function.
809         (pdp11_md_asm_adjust): New function.
810         (TARGET_INVALID_WITHIN_DOLOOP): Define.
811         (pdp11_rtx_costs): Update to match machine better.
812         (output_addr_const_pdp11): Correct format mismatch warnings.
813         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
814         * config/pdp11/pdp11.md: General change to add base_cost and/or
815         length attributes for use by new pdp11_insn_cost function.
816         (MIN_BRANCH): Correct definition.
817         (MIN_SOB): Ditto.
818         (doloop_end): Use standard pattern name for looping pattern.
819         (doloop_end_nocc): New.
820         (movsf): Add another constraint alternative.
821         (zero_extendqihi2): Add constraint alternatives for not in place
822         extend.
823         (zero_extendhisi2): Remove.
824         (shift patterns): Add CC handling variants.
825         (bswaphi2): New.
826         (bswapsi2): New.
827         (rothi3): New.
828         (define_peephole2): New peephole to recognize mov that sets CC for
829         subsequent test.
831 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
833         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
834         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
835         wi::add.
837 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
839         PR c/86420
840         * real.c (real_nextafter): Return true if result is denormal.
842 2018-07-09  Martin Liska  <mliska@suse.cz>
844         * common.opt: Add back wrongly removed attribute.
846 2018-07-09  Richard Biener  <rguenther@suse.de>
848         PR debug/86413
849         * dwarf2out.c (gen_block_die): For an early generated DIE
850         always output high/low PC attributes.
852 2018-07-09  Tom de Vries  <tdevries@suse.de>
854         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
855         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
856         onto VAR_DECL with abstract origin.
858 2018-07-07  Jim Wilson  <jimw@sifive.com>
860         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
862 2018-07-07  Tom de Vries  <tdevries@suse.de>
864         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
866 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
868         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
869         overflow_type.
870         (combine_bound): Use wide-int overflow calculation instead of
871         rolling our own.
872         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
873         overflow_type.
874         * fold-const.c (int_const_binop_2): Same.
875         (extract_muldiv_1): Same.
876         (fold_div_compare): Same.
877         (fold_abs_const): Same.
878         * match.pd: Same.
879         * poly-int.h (add): Same.
880         (sub): Same.
881         (neg): Same.
882         (mul): Same.
883         * predict.c (predict_iv_comparison): Same.
884         * profile-count.c (slow_safe_scale_64bit): Same.
885         * simplify-rtx.c (simplify_const_binary_operation): Same.
886         * tree-chrec.c (tree_fold_binomial): Same.
887         * tree-data-ref.c (split_constant_offset_1): Same.
888         * tree-if-conv.c (idx_within_array_bound): Same.
889         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
890         * tree-ssa-phiopt.c (minmax_replacement): Same.
891         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
892         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
893         * vr-values.c (vr_values::adjust_range_with_scev): Same.
894         * wide-int.cc (wi::add_large): Same.
895         (wi::mul_internal): Same.
896         (wi::sub_large): Same.
897         (wi::divmod_internal): Same.
898         * wide-int.h: Change overflow type to overflow_type for neg, add,
899         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
900         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
901         mul_internal, divmod_internal.
902         (overflow_type): New enum.
903         (accumulate_overflow): New.
905 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
907         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
908         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
910 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
912         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
913         argument is checked for zero before entering loop, avoid checking again.
915 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
917         * gimplify.h (generic_expr_could_trap_p): Set as global function.
918         * gimplify.h (generic_expr_could_trap_p): Likwise.
919         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
921 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
923         PR tree-optimization/86401
924         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
925         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
926         (fold_bit_and_mask): ... here.  New helper function for match.pd.
927         * fold-const.h (fold_bit_and_mask): Declare.
928         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
930 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
932         PR target/86324
933         * target.def (translate_mode_attribute): New hook.
934         * targhooks.h (default_translate_mode_attribute): Declare.
935         * targhooks.c (default_translate_mode_attribute): New function.
936         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
937         * doc/tm.texi: Regenerate.
938         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
939         (rs6000_translate_mode_attribute): New function.
941 2018-07-06  Paul Koning  <ni1d@arrl.net>
943         * doc/md.texi (define_split): Document DONE and FAIL.
944         (define_peephole2): Ditto.
946 2018-07-05  Jeff Law  <law@redhat.com>
948         PR tree-optimization/86010
949         * tree-ssa-dse.c (compute_trims): More aggressively trim at
950         both the head and tail of mem* and str* calls.
952 2018-07-05  Jim Wilson  <jimw@sifive.com>
954         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
956 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
958         * config/aarch64/aarch64-simd.md: correct flags text for
959         MIN_EXPR replacement.
961 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
963         * configure: Regenerated.
965 2018-07-05  Carl Love  <cel@us.ibm.com>
967         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
968         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
969         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
970         VSX_BUILTIN_DOUBLEL_V4SF.
972 2018-07-05  Martin Sebor  <msebor@redhat.com>
974         PR c++/86400
975         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
976         than its domain to compute its the upper bound of a char array.
978 2018-07-05  Nathan Sidwell  <nathan@acm.org>
980         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
981         * doc/cpp.texi: Update comment.
982         * doc/tm.texi: Rebuilt.
983         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
984         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
985         * doc/extend.texi (Backwards Compatibility): Clarify it is system
986         headers affected by extern "C".
987         * system.h: Poison NO_IMPLICIT_EXTERN_C.
988         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
989         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
990         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
991         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
992         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
993         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
994         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
995         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
996         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
997         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
998         config/sparc/sp64-elf.h, config/spu/spu.h,
999         config/stormy16/stormy16.h, config/v850/v850.h,
1000         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1001         define NO_IMPLICIT_EXTERN_C.
1002         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1004 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1006         PR target/84711
1007         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1008         instead of GET_MODE_SIZE when comparing Units.
1010 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1012         PR target/84711
1013         * rtlanal.c (set_noop_p): Constrain on mode change,
1014         include hard-reg-set.h
1016 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1018         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1020 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
1022         Revert
1023         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1025         PR sanitizer/84250
1026         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1027         libasan.
1028         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1030 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1032         PR sanitizer/84250
1033         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1034         libasan.
1035         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1037 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
1039         PR middle-end/86380
1040         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1042 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
1044         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1045         neg_*_op* variables.
1047 2018-07-04  Martin Liska  <mliska@suse.cz>
1049         * tree-switch-conversion.c: Define
1050         max_ratio_for_speed and max_ratio_for_size constants.
1052 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1053             Martin Liska  <mliska@suse.cz>
1055         PR middle-end/66240
1056         PR target/45996
1057         PR c/84100
1058         * common.opt: Rename align options with 'str_' prefix.
1059         * common/config/i386/i386-common.c (set_malign_value): New
1060         function.
1061         (ix86_handle_option): Use it to set -falign-* options/
1062         * config/aarch64/aarch64-protos.h (struct tune_params): Change
1063         type from int to string.
1064         * config/aarch64/aarch64.c: Update default values from int
1065         to string.
1066         * config/alpha/alpha.c (alpha_override_options_after_change):
1067         Likewise.
1068         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1069         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1070         max skip conditionally.
1071         * config/i386/freebsd.h (SUBALIGN_LOG): New.
1072         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1073         max skip conditionally.
1074         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1075         max skip conditionally.
1076         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1077         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1078         max skip conditionally.
1079         * config/i386/i386.c (struct ptt): Change type from int to
1080         string.
1081         (ix86_default_align): Set default values.
1082         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1083         max skip conditionally.
1084         * config/i386/iamcu.h (SUBALIGN_LOG): New.
1085         (ASM_OUTPUT_MAX_SKIP_ALIGN):
1086         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1087         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1088         max skip conditionally.
1089         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1090         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1091         * config/i386/x86-64.h (SUBALIGN_LOG): New.
1092         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1093         max skip conditionally.
1094         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1095         * config/ia64/ia64.c (ia64_option_override): Set default values
1096         for alignment options.
1097         * config/m68k/m68k.c: Handle new str_align_* options.
1098         * config/mips/mips.c (mips_set_compression_mode): Change
1099         type of constants.
1100         (mips_option_override): Set default values for options.
1101         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1102         Likewise.
1103         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1104         Likewise.
1105         * config/rx/rx.c (rx_option_override): Likewise.
1106         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1107         (LABEL_ALIGN): Use align_labels_log.
1108         (LOOP_ALIGN): Use align_loops_align.
1109         * config/s390/s390.c (s390_asm_output_function_label): Use new
1110         macros.
1111         * config/sh/sh.c (sh_override_options_after_change):
1112         Change type of constants.
1113         * config/spu/spu.c (spu_sched_init): Likewise.
1114         * config/sparc/sparc.c (sparc_option_override): Set default
1115         values for options.
1116         * config/visium/visium.c (visium_option_override): Likewise.
1117         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1118         emit p2align format with last argument if it's not needed.
1119         * doc/invoke.texi: Document extended format of -falign-*.
1120         * final.c: Use align_labels alignment.
1121         * flags.h (struct target_flag_state): Change type to use
1122         align_flags.
1123         (struct align_flags_tuple): New.
1124         (struct align_flags): Likewise.
1125         (align_loops_log): Redefine macro to use new types.
1126         (align_loops_max_skip): Redefine macro to use new types.
1127         (align_jumps_log): Redefine macro to use new types.
1128         (align_jumps_max_skip): Redefine macro to use new types.
1129         (align_labels_log): Redefine macro to use new types.
1130         (align_labels_max_skip): Redefine macro to use new types.
1131         (align_functions_log): Redefine macro to use new types.
1132         (align_loops): Redefine macro to use new types.
1133         (align_jumps): Redefine macro to use new types.
1134         (align_labels): Redefine macro to use new types.
1135         (align_functions): Redefine macro to use new types.
1136         (align_functions_max_skip): Redefine macro to use new types.
1137         (align_loops_value): New macro.
1138         (align_jumps_value): New macro.
1139         (align_labels_value): New macro.
1140         (align_functions_value): New macro.
1141         * function.c (invoke_set_current_function_hook): Propagate
1142         alignment values from flags to global variables default in
1143         topleev.h.
1144         * ipa-icf.c (sem_function::equals_wpa): Use
1145         cl_optimization_option_eq instead of memcmp.
1146         * lto-streamer.h (cl_optimization_stream_out): Support streaming
1147         of string types.
1148         (cl_optimization_stream_in): Likewise.
1149         * optc-save-gen.awk: Support strings in cl_optimization.
1150         * opth-gen.awk: Likewise.
1151         * opts.c (finish_options): Remove error checking of invalid
1152         value ranges.
1153         (MAX_CODE_ALIGN): Remove.
1154         (MAX_CODE_ALIGN_VALUE): Likewise.
1155         (parse_and_check_align_values): New function.
1156         (check_alignment_argument): Likewise.
1157         (common_handle_option): Use check_alignment_argument.
1158         * opts.h (parse_and_check_align_values): Declare.
1159         * toplev.c (init_alignments): Remove.
1160         (read_log_maxskip): New.
1161         (parse_N_M): Likewise.
1162         (parse_alignment_opts): Likewise.
1163         (backend_init_target): Remove usage of init_alignments.
1164         * toplev.h (parse_alignment_opts): Declare.
1165         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1166         argument.
1167         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1168         * tree.c (cl_option_hasher::equal): New.
1169         * varasm.c: Use new global macros.
1171 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1173         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1174         Use a simpler align directive also if MAXSKIP = ALIGN-1.
1175         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1176         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1177         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1178         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1179         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1180         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1181         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1182         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1183         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1184         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1185         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1187 2018-07-04  Martin Liska  <mliska@suse.cz>
1188             Jonathan Wakely  <jwakely@redhat.com>
1190         * coverage.c: Use correct type.
1191         * doc/invoke.texi: Language correction.
1193 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1195         PR target/85620
1196         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1197         ENDBRANCH for non-tail call which may return via indirect branch.
1198         * doc/extend.texi: Document indirect_return attribute.
1200 2018-07-03  Martin Sebor  <msebor@redhat.com>
1202         PR tree-optimization/86274
1203         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1204         precondition.
1205         (format_floating): Correct handling of infinities and NaNs.
1207 2018-07-03  Martin Sebor  <msebor@redhat.com>
1209         * print-tree.c (print_real_cst): New function.
1210         (print_node_brief): Call it.
1211         (print_node): Ditto.
1213 2018-07-03  Jeff Law  <law@redhat.com>
1215         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1216         into a single pattern.
1218         * config/h8300/h8300.md (ors code_iterator): New.
1219         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1220         a single pattern and single splitter.
1221         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1222         (iorqi3_1, xorqi3_1): Likewise.
1223         (iorqi3, xorqi3 expanders): Similarly.
1225         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1226         (movmd_internal) into a single pattern using the P mode iterator.
1227         (movmd splitters): Similarly.
1228         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1229         (movsd splitters): Similarly.
1231         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1232         ADDB, ADDW and ADDL into a single ADD attribute which selects the
1233         right table based on the size of the operand.
1234         * config/h8300/h8300.md (length_table): Corresponding changes. All
1235         references to "addb", "addw" and "addl" changed to "add".
1236         (btst patterns): Merge two variants into a single pattern.
1237         (tstqi, tsthi): Likewise.
1238         (addhi3_incdec, addsi3_incdec): Likewise.
1239         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1240         (mulhi3, mulsi3): Likewise.
1241         (udivhi3, udivsi3): Likewise.
1242         (divhi3, divsi3): Likewise.
1243         (andorqi3, andorhi3, andorsi3): Likewise.
1245 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
1247         PR target/85694
1248         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1249         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1251 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1253         PR tree-optimization/85694
1254         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1255         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1256         UNSPEC_URHADD.
1257         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1258         (<u>avg<mode>3_ceil): New patterns.
1260 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
1262         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1263         scan-tree-dump directive.
1264         * gcc.dg/vect/slp-perm-2.c: Likewise.
1265         * gcc.dg/vect/slp-perm-3.c: Likewise.
1266         * gcc.dg/vect/slp-perm-5.c: Likewise.
1267         * gcc.dg/vect/slp-perm-6.c: Likewise.
1268         * gcc.dg/vect/slp-perm-7.c: Likewise.
1269         * gcc.dg/vect/slp-perm-8.c: Likewise.
1271 2018-07-03  Marek Polacek  <polacek@redhat.com>
1273         PR middle-end/86202
1274         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1276 2018-07-03  Richard Biener  <rguenther@suse.de>
1278         PR ipa/86389
1279         * tree-ssa-structalias.c (find_func_clobbers): Properly
1280         handle indirect calls.
1282 2018-07-03  Jeff Law  <law@redhat.com>
1284         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1285         (shifts): New code iterator.
1286         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1287         expander.  Fix HImode handling on H8/SX.
1288         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1289         (subqi3, subhi3, subsi3 expanders): Likewise.
1290         (andqi3, andhi3, andsi3 expanders): Likewise.
1291         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1292         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1293         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1294         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1295         (zero_extendqihi2, zero_extendqisi2): Likewise.
1296         (extendqihi2, extendqisi2): Likewise.
1297         (rotlqi3, rotlhi3, rotlsi3): Likewise.
1298         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1299         (rotlqi3_1, rotlhi3_1): Likewise.
1300         (logicalhi3_sn, logicalsi3_sn): Likewise.
1301         (logicalhi3, logicalsi3): Likewise.
1303 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1305         * tree-vect-patterns.c (vect_recog_rotate_pattern)
1306         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1307         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1308         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1309         type to append_pattern_def_seq instead of creating a stmt_vec_info
1310         directly.
1311         (build_mask_conversion): Likewise.  Remove vinfo argument.
1312         (vect_add_conversion_to_patterm): Likewise, renaming to...
1313         (vect_add_conversion_to_pattern): ...this.
1314         (vect_recog_mask_conversion_pattern): Update call to
1315         build_mask_conversion.  Pass the vector type to
1316         append_pattern_def_seq here too.
1317         (vect_recog_gather_scatter_pattern): Update call to
1318         vect_add_conversion_to_pattern.
1320 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1322         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1323         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1324         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1325         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1326         STMT_VINFO_PATTERN_DEF_SEQ to null here.
1327         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1328         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1329         append_pattern_def_seq instead of new_pattern_def_seq.
1330         (vect_recog_divmod_pattern): Do both of the above.
1331         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1332         is null.
1334 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1336         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1337         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1338         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1339         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1340         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1341         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1342         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1343         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1344         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1345         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1346         parameter with a single stmt_vec_info.
1347         (vect_recog_func_ptr): Likewise.
1348         (vect_recog_gather_scatter_pattern): Likewise, folding in...
1349         (vect_try_gather_scatter_pattern): ...this.
1350         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1351         the stmt_vec_info of the statement to be matched.  Don't clear
1352         STMT_VINFO_RELATED_STMT.
1353         (vect_pattern_recog): Update call accordingly.
1355 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1357         PR tree-optimization/85694
1358         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1359         (uavgM3_ceil): Document new optabs.
1360         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1361         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1362         functions.
1363         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1364         (savg_ceil_optab): New optabs.
1365         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1366         (vect_vect_recog_func_ptrs): Add it.
1367         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1368         constant directly from the associated lhs.
1370 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1372         * tree-vect-patterns.c (vect_split_statement): New function.
1373         (vect_convert_input): Use it to try to split an existing cast.
1375 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1377         * poly-int.h (print_hex): New function.
1378         * dumpfile.h (dump_dec, dump_hex): Declare.
1379         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1380         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1381         min_input_precision, operation_precision and operation_sign.
1382         * tree-vect-patterns.c (vect_get_range_info): New function.
1383         (vect_same_loop_or_bb_p, vect_single_imm_use)
1384         (vect_operation_fits_smaller_type): Delete.
1385         (vect_look_through_possible_promotion): Add an optional
1386         single_use_p parameter.
1387         (vect_recog_over_widening_pattern): Rewrite to use new
1388         stmt_vec_info infomration.  Handle one operation at a time.
1389         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1390         (vect_truncatable_operation_p, vect_set_operation_type)
1391         (vect_set_min_input_precision): New functions.
1392         (vect_determine_min_output_precision_1): Likewise.
1393         (vect_determine_min_output_precision): Likewise.
1394         (vect_determine_precisions_from_range): Likewise.
1395         (vect_determine_precisions_from_users): Likewise.
1396         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1397         (vect_vect_recog_func_ptrs): Put over_widening first.
1398         Add cast_forwprop.
1399         (vect_pattern_recog): Call vect_determine_precisions.
1401 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1403         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1404         statements that have been replaced by further pattern statements.
1405         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1407 2018-07-03  Richard Biener  <rguenther@suse.de>
1409         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1410         always set *dt.  Dump vectype in vectype overload.
1411         * dumpfile.h (dump_gimple_expr): New function.
1412         (dump_gimple_expr_loc): Likewise.
1413         * dumpfile.c (dump_gimple_expr): New function.
1414         (dump_gimple_expr_loc): Likewise.
1416 2018-07-02  Jeff Law  <law@redhat.com>
1418         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1419         the H8/300, H8/300H and H8/S variants into a single pattern.
1420         (movhi_h8300, movqi_h8300hs): Similarly.
1421         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1422         (QHI mode iterator): New.
1424         * config/h8300/h8300.md: Remove trailing whitespace.
1426 2018-07-02  Jim Wilson  <jimw@sifive.com>
1428         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1429         instead of emit_insn for interrupt returns.
1430         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1431         (riscv_sret, riscv_uret): Likewise.
1433 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
1435         * pretty-print.c (selftest::test_pp_format): Move save and restore
1436         of quotes to class auto_fix_quotes, and add an instance.
1437         * selftest.c: Include "intl.h".
1438         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1439         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1440         * selftest.h (selftest::auto_fix_quotes): New class.
1442 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
1444         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1445         (aarch64_sve_prepare_conditional_op): Remove.
1446         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1447         Allow aarch64_simd_reg_or_zero as select operand; remove
1448         the aarch64_sve_prepare_conditional_op call.
1449         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1450         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1451         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1452         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1453         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1454         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1455         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1456         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1457         and a splitters to match all of the *_any patterns.
1458         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1460         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1461         (SVE_COND_FP_BINARY_REV): Remove.
1462         (sve_int_op_rev, sve_fp_op_rev): New.
1463         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1464         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1465         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1466         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1467         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1468         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1469         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1470         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1471         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1473         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1474         Remove match_dup 1 from the inner unspec.
1475         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1477         * config/aarch64/aarch64.md (movprfx): New attr.
1478         (length): Default movprfx to 8.
1479         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1480         (*madd<SVE_I>, *msub<SVE_I): Likewise.
1481         (*<su>mul<SVE_I>3_highpart): Likewise.
1482         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1483         (*v<ASHIFT><SVE_I>3): Likewise.
1484         (*<su><MAXMIN><SVE_I>3): Likewise.
1485         (*<su><MAXMIN><SVE_F>3): Likewise.
1486         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1487         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1488         (*div<SVE_F>4): Likewise.
1490 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
1492         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1493         in dump string.
1495 2018-07-02  Richard Biener  <rguenther@suse.de>
1497         PR tree-optimization/86363
1498         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1499         memset argument refers to a non-variable address.
1501 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
1503         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1504         {PLUS,MINUS}_EXPR code to...
1505         (adjust_symbolic_bound): ...here,
1506         (combine_bound): ...here,
1507         (set_value_range_with_overflow): ...and here.
1509 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
1511         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1512         code...
1513         (extract_range_from_abs_expr): ...here.
1515 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
1517         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1518         -fno-omit-frame-pointer when not optimizing.
1520 2018-07-02  Martin Liska  <mliska@suse.cz>
1522         PR ipa/86279
1523         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1524         (propagate_nothrow): Likewise.
1526 2018-07-02  Martin Liska  <mliska@suse.cz>
1528         PR ipa/86323
1529         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1531 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
1533         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1534         function in r262149, changing "loc" param from source_location to
1535         const dump_location_t &.
1536         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1537         declaration, as above.
1539 2018-07-01  Paul Koning  <ni1d@arrl.net>
1541         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1542         -munit-asm, -mgnu-asm, -mdec-asm.
1543         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1544         (pdp11_output_labelref): New.
1545         (pdp11_output_def): New.
1546         (pdp11_output_addr_vec_elt): New.
1547         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
1548         %# and %@ format codes.
1549         (pdp11_option_override): New.
1550         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1551         (pdp11_output_ident): New.
1552         (pdp11_asm_named_section): New.
1553         (pdp11_asm_init_sections): New.
1554         (pdp11_file_start): New.
1555         (pdp11_file_end): New.
1556         (output_ascii): Use .ascii/.asciz for -mdec-asm.
1557         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
1558         %o, like %c but octal.
1559         (pdp11_option_override): New.
1560         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1561         -mdec-asm.
1562         (DATA_SECTION_ASM_OP): Ditto.
1563         (READONLY_DATA_SECTION_ASM_OP): New.
1564         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1565         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1566         (ASM_OUTPUT_LABELREF): Ditto.
1567         (ASM_OUTPUT_DEF): Ditto.
1568         (ASM_OUTPUT_EXTERNAL): New.
1569         (ASM_OUTPUT_SOURCE_FILENAME): New.
1570         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1571         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1572         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
1573         %# and %@ format codes.
1574         * config/pdp11/pdp11.opt (mgnu-asm): New.
1575         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1576         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1577         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1579 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
1581         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1582         dereferencing path[] beyond its length.
1583         (debug_path): New.
1584         (debug_all_paths): New.
1585         (rewire_first_differing_edge): New.
1586         (adjust_paths_after_duplication): New.
1587         (duplicate_thread_path): Call adjust_paths_after_duplication.
1588         Add new argument.
1589         (thread_through_all_blocks): Add new argument to
1590         duplicate_thread_path.
1592 2018-06-30  Jim Wilson  <jimw@sifive.com>
1594         * config/riscv/predicates.md (p2m1_shift_operand): New.
1595         (high_mask_shift_operand): New.
1596         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1597         pattern using p2m1_shift_operand.
1598         (lshsi3_zero_extend_3+2): New combiner pattern using
1599         high_mask_shift_operand.
1601 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1603         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1604         split out from...
1605         (vect_recog_rotate_pattern): ...here.
1606         (vect_convert_input): Try to insert casts of invariants in the
1607         preheader.
1608         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1609         preheader to be empty.
1611 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1613         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1614         vector type.  If given, install it in the new statement's
1615         STMT_VINFO_VECTYPE.
1616         (vect_element_precision): New function.
1617         (vect_unpromoted_value): New struct.
1618         (vect_unpromoted_value::vect_unpromoted_value): New function.
1619         (vect_unpromoted_value::set_op): Likewise.
1620         (vect_look_through_possible_promotion): Likewise.
1621         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1622         (vect_widened_op_tree, vect_convert_input): Likewise.
1623         (vect_convert_inputs, vect_convert_output): Likewise.
1624         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1625         to handle the optional cast of the multiplication result and
1626         vect_widened_op_tree to detect the widened multiplication itself.
1627         Do not require the input and output of promotion casts to have
1628         the same sign, but base the signedness of the operation on the
1629         input rather than the result.  If the pattern includes two
1630         promotions, check that those promotions have the same sign.
1631         Do not restrict the MULT_EXPR handling to a double-width result;
1632         handle quadruple-width results and wider.  Use vect_convert_inputs
1633         to convert the inputs to the common type.
1634         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
1635         to handle the optional cast of the ABS result.  Also allow a sign
1636         change or a sign extension between the ABS and MINUS.
1637         Use vect_widened_op_tree to detect the widened subtraction and use
1638         vect_convert_inputs to convert the inputs to the common type.
1639         (vect_handle_widen_op_by_const): Delete.
1640         (vect_recog_widen_op_pattern): New function.
1641         (vect_recog_widen_mult_pattern): Use it.
1642         (vect_recog_widen_shift_pattern): Likewise.
1643         (vect_recog_widen_sum_pattern): Use
1644         vect_look_through_possible_promotion to handle the promoted
1645         PLUS_EXPR operand.
1647 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1649         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1650         the containing gimple_seq *.
1651         * gimple-iterator.h (gsi_for_stmt): Declare it.
1652         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1653         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1654         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1655         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1656         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1657         checks.
1658         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1659         split out from...
1660         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
1661         statement being replaced is part of an existing pattern
1662         definition sequence, inserting the new pattern statements before
1663         the original one.
1664         (vect_pattern_recog_1): Don't return a bool.  If the statement
1665         is already part of a pattern, instead apply pattern matching
1666         to the pattern definition statements.  Don't clear the
1667         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1668         (vect_pattern_recog): Don't break after the first match;
1669         continue processing the pattern definition statements instead.
1670         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1672 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1674         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1675         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1676         (vect_recog_widen_sum_pattern): Use it.
1678 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1680         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1681         phi is not a pattern statement and has not been replaced by
1682         a pattern statement.
1683         * tree-vect-patterns.c (type_conversion_p): Don't check
1684         STMT_VINFO_IN_PATTERN_P.
1685         (vect_recog_vector_vector_shift_pattern): Likewise.
1686         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1687         the pattern statement rather than the original statement; check
1688         directly for a WIDEN_MULT_EXPR here.
1689         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1690         vect_is_simple_use to return the pattern statement rather
1691         than the original statement; use is_pattern_stmt_p to check
1692         for such a pattern statement.
1693         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1694         to return the pattern statement rather than the original statement;
1695         don't do the same transformation here.
1696         (vect_is_simple_use): If the defining statement has been replaced
1697         by a pattern statement, return the pattern statement instead.
1698         Remove the corresponding (local) transformation from the vectype
1699         overload.
1701 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1703         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1704         end and default to null.
1705         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1706         (vectorizable_reduction): Update calls accordingly, dropping the
1707         gimple ** argument if the passed-back statement isn't needed.
1708         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1709         (vect_recog_rotate_pattern): Likewise.
1710         (vect_recog_mask_conversion_pattern): Likewise.
1711         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1712         (vect_mask_constant_operand_p): Likewise.
1713         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1714         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1715         (get_group_load_store_type, get_load_store_type): Likewise.
1716         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1717         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1718         (vectorizable_conversion, vectorizable_assignment): Likewise.
1719         (vectorizable_shift, vectorizable_operation): Likewise.
1720         (vectorizable_store, vect_is_simple_cond): Likewise.
1721         (vectorizable_condition, vectorizable_comparison): Likewise.
1722         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1723         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1724         and move it to the end.  Cope with null def_stmt_outs.
1726 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1728         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1730 2018-06-29  Jeff Law  <law@redhat.com>
1732         * config/v850/v850.c (v850_legitimate_address_p): Handle large
1733         displacements for TARGET_V850E2V3 and newer.
1734         (TARGET_LRA_P): Remove.  Defaults to LRA now.
1735         * config/v850/v850.md (sign23byte_load): Remove.
1736         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1737         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1739 2018-06-29  Martin Liska  <mliska@suse.cz>
1741         PR lto/85759
1742         * coverage.c (coverage_init): Mangle full path name.
1743         * doc/invoke.texi: Document the change.
1744         * gcov-io.c (mangle_path): New.
1745         * gcov-io.h (mangle_path): Likewise.
1746         * gcov.c (mangle_name): Use mangle_path for path mangling.
1748 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1750         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1751         if starting source register is not even.
1753 2018-06-29  Martin Liska  <mliska@suse.cz>
1755         PR tree-optimization/86263
1756         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1757         Make edge redirection.
1759 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
1761         * dumpfile.c (dump_loc): Add indentation based on scope depth.
1762         (dump_scope_depth): New variable.
1763         (get_dump_scope_depth): New function.
1764         (dump_begin_scope): New function.
1765         (dump_end_scope): New function.
1766         * dumpfile.h (get_dump_scope_depth): New declaration.
1767         (dump_begin_scope): New declaration.
1768         (dump_end_scope): New declaration.
1769         (class auto_dump_scope): New class.
1770         (AUTO_DUMP_SCOPE): New macro.
1771         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1772         AUTO_DUMP_SCOPE.
1774 2018-06-29  Richard Biener  <rguenther@suse.de>
1776         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1777         compute_all_dependences succeeds.
1778         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1779         exceed --param loop-max-datarefs-for-datadeps.
1781 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
1783         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1785 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
1787         PR target/86348
1788         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1789         alternative 0 in preferred_for_speed attribute.
1791 2018-06-28  Paul Koning  <ni1d@arrl.net>
1793         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1794         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1795         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1796         * config/pdp11/pdp11.md: Correct "length" attribute calculation
1797         for shift insn patterns.
1799 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
1801         * cgraph.c (cgraph_node::get_body): Replace assignments to
1802         "dump_file" with calls to set_dump_file.
1803         * dumpfile.c (alt_dump_file): Make static, and group with...
1804         (alt_flags): ...this definition.
1805         (dumps_are_enabled): New variable.
1806         (refresh_dumps_are_enabled): New function.
1807         (set_dump_file): New function.
1808         (set_alt_dump_file): New function.
1809         (gcc::dump_manager::dump_start): Replace assignments to
1810         "dump_file" and "alt_dump_file" with calls to set_dump_file and
1811         set_alt_dump_file.
1812         (gcc::dump_manager::dump_finish): Likewise.
1813         * dumpfile.h (alt_dump_file): Delete decl.
1814         (dumps_are_enabled): New variable decl.
1815         (set_dump_file): New function decl.
1816         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1817         global.
1818         * tree-nested.c (lower_nested_functions): Replace assignments to
1819         "dump_file" with calls to set_dump_file.
1821 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1823         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1824         goto_locus of each outgoing edge of each basic block.
1826 2018-06-28  Richard Biener  <rguenther@suse.de>
1828         * dwarf2out.c (decl_scope_table): Remove.
1829         (push_decl_scope): Likewise.
1830         (pop_decl_scope): Likewise.
1831         (gen_type_die_for_member): Do not call push/pop_decl_scope.
1832         (gen_struct_or_union_type_die): Likewise.
1833         (gen_tagged_type_die): Likewise.
1834         (dwarf2out_init): Do not initialize decl_scope_table.
1835         (dwarf2out_c_finalize): Do not free it.
1837 2018-06-28  Richard Biener  <rguenther@suse.de>
1839         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1840         deciding whether to not re-use a DIE.
1842 2018-06-28  Richard Biener  <rguenther@suse.de>
1844         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1845         DW_AT_abstract_origin attribute.
1847 2018-06-28  Martin Liska  <mliska@suse.cz>
1849         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1850         Use newly introduced constants.
1851         * tree-switch-conversion.h (struct jump_table_cluster):
1852         Define max_ratio_for_size and max_ratio_for_speed.
1854 2018-06-28  Martin Liska  <mliska@suse.cz>
1856         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1857         Add new checking assert to catch invalid state.
1858         (jump_table_cluster::can_be_handled): Handle single case
1859         clusters.
1860         (jump_table_cluster::is_beneficial): Bail out for such case.
1861         (bit_test_cluster::find_bit_tests):
1862         Add new checking assert to catch invalid state.
1863         (bit_test_cluster::can_be_handled): Handle single case
1864         clusters.
1865         (bit_test_cluster::is_beneficial): Bail out for such case.
1866         (switch_decision_tree::analyze_switch_statement):
1867         Fix comment.
1869 2018-06-28  Martin Liska  <mliska@suse.cz>
1871         * common.opt: Introduce -completion option.
1872         * gcc.c (driver_handle_option): Handle it.
1873         (driver::main): Print completions if completion
1874         is set.
1875         * opt-suggestions.c (option_proposer::get_completions):
1876         New function.
1877         (option_proposer::suggest_completion): Likewise.
1878         (option_proposer::find_param_completions): Likewise.
1879         (verify_autocompletions): Likewise.
1880         (test_completion_valid_options): Likewise.
1881         (test_completion_valid_params): Likewise.
1882         (in_completion_p): Likewise.
1883         (empty_completion_p): Likewise.
1884         (test_completion_partial_match): Likewise.
1885         (test_completion_garbage): Likewise.
1886         (opt_proposer_c_tests): Likewise.
1887         * opt-suggestions.h: Declare new functions.
1888         * opts.c (common_handle_option): Handle OPT__completion_.
1889         * selftest-run-tests.c (selftest::run_tests): Add
1890         opt_proposer_c_tests.
1891         * selftest.c (assert_str_startswith): New.
1892         * selftest.h (assert_str_startswith): Likewise.
1893         (opt_proposer_c_tests): New.
1894         (ASSERT_STR_STARTSWITH): Likewise.
1896 2018-06-28  Martin Liska  <mliska@suse.cz>
1898         * Makefile.in: Add opt-suggestions.o.
1899         * gcc-main.c: Include opt-suggestions.h.
1900         * gcc.c (driver::driver): Likewise.
1901         (driver::~driver): Remove m_option_suggestions.
1902         (driver::build_option_suggestions): Moved to option_proposer.
1903         (driver::suggest_option): Likewise.
1904         (driver::handle_unrecognized_options): Use option_proposer.
1905         * gcc.h (class driver): Add new memver m_option_proposer.
1906         * opt-suggestions.c: New file.
1907         * opt-suggestions.h: New file.
1909 2018-06-28  Martin Liska  <mliska@suse.cz>
1911         * vec.h (class auto_string_vec): New (moved from auto_argvec).
1912         (auto_string_vec::~auto_string_vec): Likewise.
1914 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1916         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1917         prevent_decl_creation_for_types fields up and add reset_location field.
1918         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1919         statement if id->reset_location is true.
1920         (copy_edges_for_bb): Do not set goto_locus on the new edges if
1921         id->reset_location is true.
1922         (copy_phis_for_bb): Force input_location on the arguments if
1923         id->reset_location is true.
1924         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1925         is set on the function to be inlined.
1927 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
1929         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1931 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
1933         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1934         registers for Pmode.
1935         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1936         hard registers for the clobbered pseudo.
1938 2018-06-27  Paul Koning  <ni1d@arrl.net>
1940         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1941         mutually exclusive options.
1942         * config/pdp11/constraints.md (h): New constraint.
1943         (O): Update definition to match shift code generation.
1944         (D): New constraint.
1945         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1946         (CCFP): Remove.
1947         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1948         function.
1949         (output_jump): Change arguments.
1950         (pdp11_fixed_cc_regs): New function.
1951         (pdp11_cc_mode): Ditto.
1952         (pdp11_expand_shift): Ditto.
1953         (pdp11_assemble_shift): Ditto.
1954         (pdp11_small_shift): Ditto.
1955         (pdp11_branch_cost): Remove.
1956         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1957         from output.
1958         (pdp11_register_move_cost): Update for CC registers.
1959         (pdp11_rtx_costs): Add case for LSHIFTRT.
1960         (pdp11_output_jump): Add CCNZ mode conditional branches.
1961         (notice_update_cc_on_set): Remove.
1962         (pdp11_cc_mode): New function.
1963         (simple_memory_operand): Correct pre/post decrement case.
1964         (no_side_effect_operand): New function.
1965         (pdp11_regno_reg_class): Add CC_REGS class.
1966         (pdp11_fixed_cc_regs): New function.
1967         (pdp11_small_shift): New function.
1968         (pdp11_expand_shift): New function to expand shift insns.
1969         (pdp11_assemble_shift): New function to output shifts.
1970         (pdp11_branch_cost): Remove.
1971         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1972         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1973         (WCHAR_TYPE): Ditto.
1974         (PTRDIFF_TYPE): Ditto.
1975         (ADJUST_INSN_LENGTH): New macro.
1976         (FIXED_REGISTERS): Add CC registers.
1977         (CALL_USED_REGISTERS): Ditto.
1978         (reg_class): Ditto.
1979         (REG_CLASS_NAMES): Ditto.
1980         (REG_CLASS_CONTENTS): Ditto.
1981         (SELECT_CC_MODE): Use new function.
1982         (TARGET_FLAGS_REGNUM): New macro.
1983         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1984         (cc0_reg_rtx): Remove.
1985         (CC_STATUS_MDEP): Remove.
1986         (CC_STATUS_MDEFP_INIT): Remove.
1987         (CC_IN_FPU): Remove.
1988         (NOTICE_UPDATE_CC): Remove.
1989         (REGISTER_NAMES): Add CC registers.
1990         (BRANCH_COST): Change to constant 1.
1991         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1992         handling.
1993         * config/pdp11/pdp11.opt (mbcopy): Remove.
1994         (mbcopy-builtin): Remove.
1995         (mbranch-cheap): Remove.
1996         (mbranch-expensive): Remove.
1997         * config/pdp11/predicates.md (expand_shift_operand): Update to
1998         match shift code generation.
1999         (ccnz_operator): New predicate.
2000         * doc/invoke.texi (PDP-11 Options): Remove deleted options
2001         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2002         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
2003         exclusive options.
2004         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
2005         description of O constraint.
2007 2018-06-27  Jeff Law  <law@redhat.com>
2008             Austin Law  <austinklaw@gmail.com>
2010         * config/v850/v850.md (addsi3_set_flags): New pattern.
2011         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2012         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2013         (zero_extendhisi2_v850_set_flags): Likewise.
2014         (zero_extendqisi2_v850_set_flags): Likewise.
2015         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2016         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2017         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2019         * config/v850/v850-protos.h (notice_update_cc): Remove.
2020         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2021         (v850_print_operand): Handle 'D' and "d".
2022         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2023         Add handling of arithmetic/logical operations compared against zero.
2024         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2025         Do not look at v850_compare_op, instead get mode from last argument.
2026         (v850_gen_compare): Remove
2027         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2028         after reload for prologue insns.
2029         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2030         patterns.
2031         (construct_save_jarl): Likewise.
2032         (TARGET_FLAGS_REGNUM): Define.
2033         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2034         (NOTICE_UPDATE_CC): Remove.
2035         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2036         than cc0.  Conditionalize on reload_completed.
2037         (cmpsi_insn, setfcc_insn): Likewise.
2038         (tst1 splitter): Turn into define_and_split which sets the flags
2039         after reload.
2040         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2041         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2042         (cstoresf4, cstoredf4): Clobber the flags.
2043         (cmpsi, cmpsf, cmpdf): Remove expanders.
2044         (setf_insn): Remove pattern.
2045         (addsi3): Turn into define_and_split which clobbers the flags after
2046         reload and a suitable pattern (addsi3_clobber_flags) for use after
2047         reload.
2048         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2049         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2050         (ashrsi3, ashrsi3_v850e2): Likewise.
2051         (bins): Clobber the flags.
2052         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2053         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2054         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2055         (call_value_internal_short, call_value_internal_long): Likewise.
2056         (callt_save_interrupt, callt_return_interrupt): Likewise.
2057         (save_interrupt, return_interrupt): Likewise.
2058         (callt_save_all_interrupt, save_all_interrupt): Likewise.
2059         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2060         (restore_all_interrupt, _restore_all_interrupt): Likewise.
2061         (All FP comparisons): Only allow after reload has completed.
2062         (trfsr): Likewise.
2063         (divh, divhu): Tweak output template.
2064         (branch_z_normal, branch_z_invert): Remove
2065         (branch_nz_normal, branch_nz_invert): Likewise.
2066         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2068         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2069         * config/v850/v850.c (notice_update_cc): Remove.
2070         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
2071         (CC_NO_CARRY): Likewise.
2072         (NOTICE_UPDATE_CC): Define to nothing.
2073         * config/v850/v850.md: Remove block comment on cc0 handling
2074         Remove "cc" attribute from all patterns.  Remove cc_status handling
2075         from all patterns.  Minor formatting fixes.
2077 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2079         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2080         (cortex-a76.cortex-a55): Likewise.
2081         * config/aarch64/aarch64-tune.md: Regenerate.
2082         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2083         cortex-a76.cortex-a55.
2085 2018-06-27  Jeff Law  <law@redhat.com>
2087         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2088         (MULTILIB_DIRNAMES): Similarly.
2090 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
2092         * gimple.h (gimple_return_retbnd): Delete.
2093         (gimple_return_set_retbnd): Likewise.
2094         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2095         gimple_return_set_retbnd.
2096         * gimple-pretty-print.c (dump_gimple_return): Remove call to
2097         gimple_return_retbnd and adjust.
2098         * tree-inline.h (struct copy_body_data): Remove retbnd field.
2099         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2100         Explicitly return NULL in a couple more cases.  Move assertion
2101         on debug statements and remove unreachable code.
2102         (reset_debug_binding): Do not test id->retbnd.
2103         (expand_call_inline): Do not set it.
2105 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2107         * configure.ac: Add --disable-gcov option.
2108         * configure: Regenerate.
2109         * Makefile.in: Honour @enable_gcov@.
2110         * doc/install.texi: Document --disable-gcov.
2112 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2114         * config/arm/arm-cpus.in (cortex-a76): New entry.
2115         (cortex-a76.cortex-a55): Likewise.
2116         * config/arm/arm-tables.opt: Regenerate.
2117         * config/arm/arm-tune.md: Likewise.
2118         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2119         * doc/invoke.texi (ARM Options): Document cortex-a76 and
2120         cortex-a76.cortex-a55.
2122 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
2124         PR target/85769
2125         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2127 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2129         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2130         comment.
2131         (EPILOGUE_USES): Likewise.
2133 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2135         * tree-inline.c (remap_location): New function extracted from...
2136         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
2137         (copy_phis_for_bb): ...here.  Call remap_location.
2138         (copy_cfg_body): Adjust call to copy_edges_for_bb.
2140 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2142         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2143         unaligned vsx for 16B memset.
2145 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
2147         PR target/86285
2148         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2149         ieee128_float_type_node to long_double_type_node unless
2150         TARGET_LONG_DOUBLE_128 is set.
2152 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
2154         * cfgloop.c (get_loop_location): Convert return type from
2155         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2156         by implicit construction from rtx_insn *, and using
2157         dump_user_location_t::from_function_decl for the fallback case.
2158         * cfgloop.h (get_loop_location): Convert return type from
2159         location_t to dump_user_location_t.
2160         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2161         dump_printf_loc to pass in a dump_location_t rather than a
2162         location_t, via the gimple stmt.
2163         * coverage.c (get_coverage_counts): Update calls to
2164         dump_printf_loc to pass in dump_location_t rather than a
2165         location_t.
2166         * doc/optinfo.texi (Dump types): Convert example of
2167         dump_printf_loc from taking "locus" to taking "insn".  Update
2168         description of the "_loc" calls to cover dump_location_t.
2169         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2170         "selftest.h".
2171         (dump_user_location_t::dump_user_location_t): New constructors,
2172         from gimple *stmt and rtx_insn *.
2173         (dump_user_location_t::from_function_decl): New function.
2174         (dump_loc): Make static.
2175         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2176         const dump_location_t &.
2177         (dump_generic_expr_loc): Delete.
2178         (dump_printf_loc): Convert param "loc" from location_t to
2179         const dump_location_t &.
2180         (selftest::test_impl_location): New function.
2181         (selftest::dumpfile_c_tests): New function.
2182         * dumpfile.h: Include "profile-count.h".
2183         (class dump_user_location_t): New class.
2184         (struct dump_impl_location_t): New struct.
2185         (class dump_location_t): New class.
2186         (dump_printf_loc): Convert 2nd param from source_location to
2187         const dump_location_t &.
2188         (dump_generic_expr_loc): Delete.
2189         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2190         const dump_location_t &.
2191         * gimple-fold.c (fold_gimple_assign): Update call to
2192         dump_printf_loc to pass in a dump_location_t rather than a
2193         location_t, via the gimple stmt.
2194         (gimple_fold_call): Likewise.
2195         * gimple-loop-interchange.cc
2196         (loop_cand::analyze_iloop_reduction_var): Update for change to
2197         check_reduction_path.
2198         (tree_loop_interchange::interchange): Update for change to
2199         find_loop_location.
2200         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2201         change in return-type of find_loop_location.
2202         (graphite_regenerate_ast_isl): Likewise.
2203         * graphite-optimize-isl.c (optimize_isl): Likewise.
2204         * graphite.c (graphite_transform_loops): Likewise.
2205         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2206         pass in a dump_location_t rather than a location_t, via the
2207         gimple stmt.
2208         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2209         * ipa.c (walk_polymorphic_call_targets): Likewise.
2210         * loop-unroll.c (report_unroll): Convert "locus" param from
2211         location_t to dump_location_t.
2212         (decide_unrolling): Update for change to get_loop_location's
2213         return type.
2214         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2215         location_t to dump_user_location_t.
2216         (grid_find_single_omp_among_assignments_1): Updates calls to
2217         dump_printf_loc to pass in a dump_location_t rather than a
2218         location_t, via the gimple stmt.
2219         (grid_parallel_clauses_gridifiable): Convert "tloc" from
2220         location_t to dump_location_t.  Updates calls to dump_printf_loc
2221         to pass in a dump_location_t rather than a location_t, via the
2222         gimple stmt.
2223         (grid_inner_loop_gridifiable_p): Likewise.
2224         (grid_dist_follows_simple_pattern): Likewise.
2225         (grid_gfor_follows_tiling_pattern): Likewise.
2226         (grid_target_follows_gridifiable_pattern): Likewise.
2227         (grid_attempt_target_gridification): Convert initialization
2228         of local "grid" from memset to zero-initialization; FIXME: does
2229         this require C++11?  Update call to dump_printf_loc to pass in a
2230         optinfo_location rather than a location_t, via the gimple stmt.
2231         * profile.c (read_profile_edge_counts): Updates call to
2232         dump_printf_loc to pass in a dump_location_t rather than a
2233         location_t
2234         (compute_branch_probabilities): Likewise.
2235         * selftest-run-tests.c (selftest::run_tests): Call
2236         dumpfile_c_tests.
2237         * selftest.h (dumpfile_c_tests): New decl.
2238         * tree-loop-distribution.c (pass_loop_distribution::execute):
2239         Update for change in return type of find_loop_location.
2240         * tree-parloops.c (parallelize_loops): Likewise.
2241         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2242         "locus" from location_t to dump_user_location_t.
2243         (canonicalize_loop_induction_variables): Likewise.
2244         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2245         for change in return type of find_loop_location.
2246         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2247         to dump_printf_loc to pass in a dump_location_t rather than a
2248         location_t, via the stmt.
2249         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2250         Likewise.
2251         * tree-vect-loop-manip.c (find_loop_location): Convert return
2252         type from source_location to dump_user_location_t.
2253         (vect_do_peeling): Update for above change.
2254         (vect_loop_versioning): Update for change in type of
2255         vect_location.
2256         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2257         from location_t to dump_user_location_t.
2258         (vect_estimate_min_profitable_iters): Update for change in type
2259         of vect_location.
2260         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2261         location_t to dump_location_t.
2262         (vect_slp_bb): Update for change in type of vect_location.
2263         * tree-vectorizer.c (vect_location): Convert from source_location
2264         to dump_user_location_t.
2265         (try_vectorize_loop_1): Update for change in vect_location's type.
2266         (vectorize_loops): Likewise.
2267         (increase_alignment): Likewise.
2268         * tree-vectorizer.h (vect_location): Convert from source_location
2269         to dump_user_location_t.
2270         (find_loop_location): Convert return type from source_location to
2271         dump_user_location_t.
2272         (check_reduction_path): Convert 1st param from location_t to
2273         dump_user_location_t.
2274         * value-prof.c (check_counter): Update call to dump_printf_loc to
2275         pass in a dump_user_location_t rather than a location_t; update
2276         call to error_at for change in type of "locus".
2277         (check_ic_target): Update call to dump_printf_loc to
2278         pass in a dump_user_location_t rather than a location_t, via the
2279         call_stmt.
2281 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
2283         * config/s390/s390.h (enum processor_flags): Do not use
2284         default tune parameter when -march was specified.
2286 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
2288         PR target/86314
2289         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2290         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2291         operands.
2293 2018-06-26  Richard Biener  <rguenther@suse.de>
2295         PR tree-optimization/86287
2296         PR bootstrap/86316
2297         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2298         (vect_analyze_loop): Initialize n_stmts.
2300 2018-06-26  Richard Biener  <rguenther@suse.de>
2302         PR middle-end/86271
2303         * fold-const.c (fold_convertible_p): Pointer extension
2304         isn't valid.
2306 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
2308         PR debug/86064
2309         * dwarf2out.c (loc_list_has_views): Adjust comments.
2310         (dw_loc_list): Split single cross-partition range with
2311         nonzero locview.
2313 2018-06-25  Jeff Law  <law@redhat.com>
2315         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2316         on -mbig-switch by default.
2318         * config/v850/predicates.md (const_float_1_operand): Fix match_code
2319         test.
2320         (const_float_0_operand): Remove unused predicate.
2321         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2322         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2323         (recipsf2): New expander.  Original pattern now called
2324         (recipsf2_insn).
2325         (recipdf2, recipdf2_insn): Similarly.
2326         (rsqrtsf2, rsqrtsf2_insn): Similarly
2327         (rsqrtdf2, rsqrtdf2_insn): Similarly
2329 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
2331         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2332         Simplify logic for FreeBSD (twice).
2334 2018-06-25  Martin Sebor  <msebor@redhat.com>
2336         PR tree-optimization/86204
2337         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2338         a strnlen result if it's less than the length of the string.
2340 2018-06-25  Martin Sebor  <msebor@redhat.com>
2342         PR tree-optimization/85700
2343         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2344         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2345         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2347 2018-06-25  Martin Sebor  <msebor@redhat.com>
2349         * doc/extend.texi (Zero-length arrays): Update and clarify.
2351 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
2353         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2354         added IEEE/IBM long double multilib support on PowerPC little
2355         endian Linux systems.
2356         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2357         (MULTILIB_DEFAULTS): Likewise.
2358         * config/rs6000/rs6000.c (rs6000_option_override_internal):
2359         Likewise.
2360         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2361         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2362         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2364 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
2366         PR middle-end/86311
2367         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2368         (REORDER_45): Likewise.
2370 2018-06-25  Jeff Law  <law@redhat.com>
2372         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2373         dividend to 32 bits.  Adjust length.
2374         (udivmodhi4): Cleanup output template.  Fix length.
2376 2018-06-25  Carl Love  <cel@us.ibm.com>
2378         * config/rs6000/vsx.md: Change word selector to prefered location.
2380 2018-06-25  Richard Biener  <rguenther@suse.de>
2382         PR tree-optimization/86304
2383         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2384         epilogue-if-converted loops as well.
2386 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
2388         * lto-section-out.c (lto_begin_section): Do not print section
2389         name for noaddr and unnumbered dumps.
2391 2018-06-25  Richard Biener  <rguenther@suse.de>
2393         * tree-vectorizer.h (struct vec_info_shared): New structure
2394         with parts split out from struct vec_info and loop_nest from
2395         struct _loop_vec_info.
2396         (struct vec_info): Adjust accordingly.
2397         (struct _loop_vec_info): Likewise.
2398         (LOOP_VINFO_LOOP_NEST): Adjust.
2399         (LOOP_VINFO_DATAREFS): Likewise.
2400         (LOOP_VINFO_DDRS): Likewise.
2401         (struct _bb_vec_info): Likewise.
2402         (BB_VINFO_DATAREFS): Likewise.
2403         (BB_VINFO_DDRS): Likewise.
2404         (struct _stmt_vec_info): Add dr_aux member.
2405         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2406         (DR_MISALIGNMENT_UNINITIALIZED): New.
2407         (set_dr_misalignment): Adjust.
2408         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2409         (vect_analyze_loop): Adjust prototype.
2410         (vect_analyze_loop_form): Likewise.
2411         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2412         Compute dependences lazily.
2413         (vect_record_base_alignments): Use shared datarefs/ddrs.
2414         (vect_verify_datarefs_alignment): Likewise.
2415         (vect_analyze_data_refs_alignment): Likewise.
2416         (vect_analyze_data_ref_accesses): Likewise.
2417         (vect_analyze_data_refs): Likewise.
2418         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2419         constructor parameter for shared part.
2420         (vect_analyze_loop_form): Pass in shared part and adjust.
2421         (vect_analyze_loop_2): Pass in storage for the number of
2422         stmts.  Move loop nest finding to the caller.  Compute
2423         datarefs lazily.
2424         (vect_analyze_loop): Pass in shared part.
2425         (vect_transform_loop): Verify shared datarefs are unchanged.
2426         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2427         constructor parameter for shared part.
2428         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2429         (vect_slp_bb): Verify shared datarefs are unchanged before
2430         transform.
2431         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2432         change.
2433         (new_stmt_vec_info): Initialize DR_AUX misalignment to
2434         DR_MISALIGNMENT_UNINITIALIZED.
2435         * tree-vectorizer.c (vec_info::vec_info): Add constructor
2436         parameter for shared part.
2437         (vec_info::~vec_info): Adjust.
2438         (vec_info_shared::vec_info_shared): New.
2439         (vec_info_shared::~vec_info_shared): Likewise.
2440         (vec_info_shared::save_datarefs): Likewise.
2441         (vec_info_shared::check_datarefs): Likewise.
2442         (try_vectorize_loop_1): Construct shared part live for analyses
2443         of a single loop for multiple vector sizes.
2444         * tree-parloops.c (gather_scalar_reductions): Adjust.
2446 2018-06-25  Richard Biener  <rguenther@suse.de>
2448         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2449         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2450         (vect_analyze_data_refs): Remove similar code from here and
2451         simplify accordingly.
2453 2018-06-25  Richard Biener  <rguenther@suse.de>
2455         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2456         for reverse storage order accesses rather than asserting
2457         they cannot happen here.
2459 2018-06-25  Tom de Vries  <tdevries@suse.de>
2461         PR debug/86257
2462         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2463         Use data16 instead of .byte for insn prefix.
2465 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
2467         PR C++/86082
2468         * parser.c (make_char_string_pack): Pass this literal chars
2469         through cpp_interpret_string.
2470         (cp_parser_userdef_numeric_literal): Check the result of
2471         make_char_string_pack.
2473 2018-06-24  Maya Rashish  <coypu@sdf.org>
2475         * ginclude/stddef.h: Simplify conditions around avoiding
2476         re-definition of __size_t.
2478 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2480         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2481         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2483 2018-06-22  Maya Rashish  <coypu@sdf.org>
2485         * doc/invoke.texi (mno-fancy-math-387): Update for changes
2486         made to OpenBSD and NetBSD through the years.
2488 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2490         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2491         behavior of vec_pack (vector double, vector double) to match
2492         behavior of vec_float2 (vector double, vector double).
2494 2018-06-22  Olivier Hainque  <hainque@adacore.com>
2496         * gimplify.c (gimplify_function_tree): Prevent creation
2497         of a trampoline for the address of the current function
2498         passed to entry/exit instrumentation hooks.
2500 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
2502         PR target/86222
2503         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2504         correctly.
2506 2018-06-22  Martin Liska  <mliska@suse.cz>
2508         PR tree-optimization/86263
2509         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2510         Bail out if is_enabled is false.
2511         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2512         New declaration.
2513         (jump_table_cluster::is_enabled): New function.
2515 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2517         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2518         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2519         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2520         (lto_input_ts_binfo_tree_pointers): Likewise.
2521         * tree-streamer-out.c (streamer_write_tree_bitfields,
2522         write_ts_binfo_tree_pointers): Likewise.
2523         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2525 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2527         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2529 2018-06-22  Martin Liska  <mliska@suse.cz>
2531         * symbol-summary.h (get): Make it pure and inline move
2532         functionality from ::get function.
2533         (get): Remove and inline into ::get and ::get_create.
2534         (get_create): Move code from ::get function.
2536 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2538         PR target/85994
2539         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2540         -x assembler-with-cpp.
2542 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2544         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2545         _FILE_OFFSET_BITS=64 for C++.
2547 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
2549         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2550         conversion insn that shows up when pr85657-3.c is compiled using
2551         IEEE 128-bit long double.
2552         (neg<mode>2_internal): Use the correct mode to check whether the
2553         mode is IBM extended.
2554         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2555         multiply and divide external functions from being created more
2556         than once.
2558 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2560         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2561         functions.
2562         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
2563         the edge can be forwarded.
2564         (cfg_layout_merge_blocks): Likewise.
2566 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2568         * except.c (finish_eh_generation): Commit edge insertions only after
2569         the EH edges have been redirected from post-landing to landing pads.
2571 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2573         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2574         create_tmp_var_for to create the FRAME decl.
2575         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2577 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2579         * tree-inline.c (copy_edges_for_bb): Minor tweak.
2580         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2581         debug statement when resetting its value.
2582         (expand_call_inline): Copy the locus of the call onto the assignment
2583         of the return value, if any.  Use local variable in more cases.
2585 2018-06-21  Martin Liska  <mliska@suse.cz>
2587         * ipa-pure-const.c (propagate_nothrow): Use
2588         funct_state_summaries->get.
2589         (dump_malloc_lattice): Likewise.
2590         (propagate_malloc): Likewise.
2592 2018-06-21  Richard Biener  <rguenther@suse.de>
2594         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2595         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2596         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2597         comment.
2598         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2599         BLOCK_ABSTRACT_ORIGIN unconditionally.
2601 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
2603         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2604         deleting it.
2605         * ipa-reference.c (ipa_reference_c_finalize): Delete
2606         ipa_ref_opt_sum_summaries and set it to NULL.
2608 2018-06-21  Tom de Vries  <tdevries@suse.de>
2610         PR tree-optimization/85859
2611         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2612         test with comment from bb_no_side_effects_p.
2614 2018-06-21  Richard Biener  <rguenther@suse.de>
2616         PR tree-optimization/86232
2617         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2618         max for constant niter.
2620 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2622         * config/aarch64/aarch64-simd.md
2623         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2625 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2627         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2628         Make opernads of the unspec commutative.
2630 2018-06-21  Richard Biener  <rguenther@suse.de>
2632         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2633         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2634         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2635         (vect_analyze_data_ref_dependence): Re-order checks to deal with
2636         NULL DR_STEP.
2637         (vect_record_base_alignments): Do not record base alignment
2638         for gathers or scatters.
2639         (vect_compute_data_ref_alignment): Drop return value that is always
2640         true.  Bail out early for gathers or scatters.
2641         (vect_enhance_data_refs_alignment): Bail out early for gathers
2642         or scatters.
2643         (vect_find_same_alignment_drs): Likewise.
2644         (vect_analyze_data_refs_alignment): Remove dead code.
2645         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2646         (vect_analyze_data_refs): For possible gathers or scatters do
2647         not create an alternate DR, just check their possible validity
2648         and mark them.  Adjust DECL_NONALIASED handling to not rely
2649         on DR_BASE_ADDRESS.
2650         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2651         update inits of gathers or scatters.
2652         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2653         Also copy gather/scatter flag to pattern vinfo.
2655 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2657         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2658         behavior of vec_packsu (vector unsigned long long, vector unsigned
2659         long long) to match behavior of vec_packs with same signature.
2661 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
2662             Thomas Schwinge <thomas@codesourcery.com>
2663             Cesar Philippidis  <cesar@codesourcery.com>
2665         * gimplify.c (gimplify_scan_omp_clauses): Add support for
2666         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2667         (gimplify_adjust_omp_clauses): Likewise.
2668         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2669         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2670         (gimplify_omp_target_update): Update handling of acc update and
2671         enter/exit data.
2672         * omp-low.c (install_var_field): Remove unused parameter
2673         base_pointers_restrict.
2674         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2675         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2676         FINALIZE}
2677         (omp_target_base_pointers_restrict_p): Delete.
2678         (scan_omp_target): Update call to scan_sharing_clauses.
2679         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2680         FINALIZE}.
2681         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2682         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2683         (convert_local_omp_clauses): Likewise.
2684         * tree-pretty-print.c (dump_omp_clause): Likewise.
2685         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
2686         FINALIZE}.
2687         (omp_clause_code_name): Likewise.
2689 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2691         PR debug/86194
2692         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2693         be narrowed.
2695         PR tree-optimization/86231
2696         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
2697         anti-range don't overwrite *vr0min before using it to compute *vr0max.
2699 2018-06-20  Tom de Vries  <tdevries@suse.de>
2701         PR tree-optimization/86097
2702         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2703         iv type if signedness of iv type is not the same as that of *nit.
2705 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2707         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
2708         EDGE_EH edges, verify they are all EDGE_EH.
2710 2018-06-20  Maya Rashish  <coypu@sdf.org>
2712         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2714 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2716         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2717         * config/aarch64/aarch64.c (xgene1_tunings): Add
2718         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2719         (aarch64_mode_valid_for_sched_fusion_p):
2720         Allow 16-byte modes.
2721         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2722         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2723         128-bit modes.
2724         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2725         New pattern.
2726         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2727         * config/aarch64/iterators.md (VQ2): New mode iterator.
2729 2018-06-20  Martin Liska  <mliska@suse.cz>
2731         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2732         Change default ratio from 10 to 8.
2734 2018-06-20  Martin Liska  <mliska@suse.cz>
2736         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2737         New.
2738         (bit_test_cluster::find_bit_tests): Likewise.
2739         (switch_decision_tree::analyze_switch_statement): Find clusters.
2740         * tree-switch-conversion.h (struct jump_table_cluster): Document
2741         hierarchy.
2743 2018-06-20  Martin Liska  <mliska@suse.cz>
2745         * tree-switch-conversion.c (switch_conversion::collect):
2746         Record m_uniq property.
2747         (switch_conversion::expand): Bail out for special conditions.
2748         (group_cluster::~group_cluster): New.
2749         (group_cluster::group_cluster): Likewise.
2750         (group_cluster::dump): Likewise.
2751         (jump_table_cluster::emit): New.
2752         (switch_decision_tree::fix_phi_operands_for_edges): New.
2753         (struct case_node): Remove struct.
2754         (jump_table_cluster::can_be_handled): New.
2755         (case_values_threshold): Moved to header.
2756         (reset_out_edges_aux): Likewise.
2757         (jump_table_cluster::is_beneficial): New.
2758         (bit_test_cluster::can_be_handled): Likewise.
2759         (add_case_node): Remove.
2760         (bit_test_cluster::is_beneficial): New.
2761         (case_bit_test::cmp): New.
2762         (bit_test_cluster::emit): New.
2763         (expand_switch_as_decision_tree_p): Remove.
2764         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2765         (fix_phi_operands_for_edge): Likewise.
2766         (switch_decision_tree::analyze_switch_statement): New.
2767         (compute_cases_per_edge): Move ...
2768         (switch_decision_tree::compute_cases_per_edge): ... here.
2769         (try_switch_expansion): Likewise.
2770         (switch_decision_tree::try_switch_expansion): Likewise.
2771         (record_phi_operand_mapping): Likewise.
2772         (switch_decision_tree::record_phi_operand_mapping): Likewise.
2773         (emit_case_decision_tree): Likewise.
2774         (switch_decision_tree::emit): Likewise.
2775         (balance_case_nodes): Likewise.
2776         (switch_decision_tree::balance_case_nodes): Likewise.
2777         (dump_case_nodes): Likewise.
2778         (switch_decision_tree::dump_case_nodes): Likewise.
2779         (emit_jump): Likewise.
2780         (switch_decision_tree::emit_jump): Likewise.
2781         (emit_cmp_and_jump_insns): Likewise.
2782         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2783         (emit_case_nodes): Likewise.
2784         (switch_decision_tree::emit_case_nodes): Likewise.
2785         (conditional_probability): Remove.
2786         * tree-switch-conversion.h (enum cluster_type): New.
2787         (PRINT_CASE): New.
2788         (struct cluster): Likewise.
2789         (cluster::cluster): Likewise.
2790         (struct simple_cluster): Likewise.
2791         (simple_cluster::simple_cluster): Likewise.
2792         (struct group_cluster): Likewise.
2793         (struct jump_table_cluster): Likewise.
2794         (struct bit_test_cluster): Likewise.
2795         (struct min_cluster_item): Likewise.
2796         (struct case_tree_node): Likewise.
2797         (case_tree_node::case_tree_node): Likewise.
2798         (jump_table_cluster::case_values_threshold): Likewise.
2799         (struct case_bit_test): Likewise.
2800         (struct switch_decision_tree): Likewise.
2801         (struct switch_conversion): Likewise.
2802         (switch_decision_tree::reset_out_edges_aux): Likewise.
2804 2018-06-20  Martin Liska  <mliska@suse.cz>
2806         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2807         (hoist_edge_and_branch_if_true): Likewise.
2808         (expand_switch_using_bit_tests_p): Likewise.
2809         (struct case_bit_test): Likewise.
2810         (case_bit_test_cmp): Likewise.
2811         (emit_case_bit_tests): Likewise.
2812         (switch_conversion::switch_conversion): New class.
2813         (struct switch_conv_info): Remove old struct.
2814         (collect_switch_conv_info): More to ...
2815         (switch_conversion::collect): ... this.
2816         (check_range): Likewise.
2817         (switch_conversion::check_range): Likewise.
2818         (check_all_empty_except_final): Likewise.
2819         (switch_conversion::check_all_empty_except_final): Likewise.
2820         (check_final_bb): Likewise.
2821         (switch_conversion::check_final_bb): Likewise.
2822         (create_temp_arrays): Likewise.
2823         (switch_conversion::create_temp_arrays): Likewise.
2824         (free_temp_arrays): Likewise.
2825         (gather_default_values): Likewise.
2826         (switch_conversion::gather_default_values): Likewise.
2827         (build_constructors): Likewise.
2828         (switch_conversion::build_constructors): Likewise.
2829         (constructor_contains_same_values_p): Likewise.
2830         (switch_conversion::contains_same_values_p): Likewise.
2831         (array_value_type): Likewise.
2832         (switch_conversion::array_value_type): Likewise.
2833         (build_one_array): Likewise.
2834         (switch_conversion::build_one_array): Likewise.
2835         (build_arrays): Likewise.
2836         (switch_conversion::build_arrays): Likewise.
2837         (gen_def_assigns): Likewise.
2838         (switch_conversion::gen_def_assigns): Likewise.
2839         (prune_bbs): Likewise.
2840         (switch_conversion::prune_bbs): Likewise.
2841         (fix_phi_nodes): Likewise.
2842         (switch_conversion::fix_phi_nodes): Likewise.
2843         (gen_inbound_check): Likewise.
2844         (switch_conversion::gen_inbound_check): Likewise.
2845         (process_switch): Use the newly created class.
2846         (switch_conversion::expand): New.
2847         (switch_conversion::~switch_conversion): New.
2848         * tree-switch-conversion.h: New file.
2850 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2852         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2853         tree-vect-patterns.c.
2854         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2855         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
2856         (vect_recog_sad_pattern): Likewise.
2857         (vect_recog_widen_sum_pattern): Likewise.
2858         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
2859         (vect_recog_widen_shift_pattern): Remove the type_in argument.
2860         (vect_recog_rotate_pattern): Likewise.
2861         (vect_recog_mult_pattern): Likewise.
2862         (vect_recog_vector_vector_shift_pattern): Likewise.
2863         (vect_recog_divmod_pattern): Likewise.
2864         (vect_recog_mixed_size_cond_pattern): Likewise.
2865         (vect_recog_bool_pattern): Likewise.
2866         (vect_recog_mask_conversion_pattern): Likewise.
2867         (vect_try_gather_scatter_pattern): Likewise.
2868         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
2869         (vect_recog_over_widening_pattern): Likewise.
2870         (vect_recog_gather_scatter_pattern): Likewise.
2871         (vect_recog_func_ptr): Move from tree-vectorizer.h
2872         (vect_vect_recog_func_ptrs): Move further down the file.
2873         (vect_recog_func): Likewise.  Remove the third argument.
2874         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2875         (vect_pattern_recog_1): Expect the pattern function to do any
2876         necessary target tests.  Also expect it to provide a vector type.
2877         Remove the type_in handling.
2879 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2881         * tree-vect-patterns.c (vect_pattern_detected): New function.
2882         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2883         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2884         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2885         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2886         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2887         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2888         (vect_recog_mask_conversion_pattern)
2889         (vect_try_gather_scatter_pattern): Likewise.
2891 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2893         * tree-vect-patterns.c (vect_get_internal_def): New function.
2894         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2895         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2896         (search_type_for_mask_1): Use it.
2898 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2900         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2901         redundant WIDEN_SUM_EXPR handling.
2902         (vect_recog_sad_pattern): Likewise.
2904 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2906         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2907         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2908         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2909         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2910         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2912 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2914         * tree-vect-stmts.c (vectorizable_call): Make sure that we
2915         use the stmt_vec_info of the original bb statement for the
2916         new zero assignment, even if the call is part of a pattern.
2918 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2920         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2921         that the sequence is attached to the original statement rather
2922         than the pattern statement.
2923         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2924         PATTERN_DEF_SEQ from the original statement rather than
2925         the main pattern statement.
2926         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2927         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2928         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2930 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2932         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2933         definition statements before the early exit for statements that aren't
2934         live or relevant.
2935         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2936         split out from...
2937         (vect_transform_loop): ...here.  Process pattern definition
2938         statements without first checking whether the main pattern
2939         statement is live or relevant.
2941 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2943         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2944         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2946 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
2948         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2949         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2950         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2951         (expand_block_compare): Change select_block_compare_mode call.
2952         (expand_strncmp_align_check): Use new functions, fix comment.
2953         (emit_final_str_compare_gpr): New function.
2954         (expand_strn_compare): Refactor and clean up code.
2955         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2957 2018-06-19  Tony Reix  <tony.reix@atos.com>
2958             Damien Bergamini  <damien.bergamini@atos.com>
2959             David Edelsohn  <dje.gcc@gmail.com>
2961         * collect2.c (static_obj): New variable.
2962         (static_libs): New variable.
2963         (is_in_list): Uncomment declaration.
2964         (main): Track AIX libraries linked statically.
2965         (is_in_list): Uncomment definition.
2966         (scan_prog_file): Don't add AIX shared libraries initializer
2967         to constructor list if linking statically.
2969 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
2971         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2972         constant.
2973         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2975 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
2977         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2978         blocks.
2980 2018-06-19  Martin Liska  <mliska@suse.cz>
2982         * config/i386/i386.c (ix86_can_inline_p): Do not use
2983         ipa_fn_summaries::get_create.
2984         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2985         get.
2986         (devirtualization_time_bonus): Likewise.
2987         (ipcp_propagate_stage): Likewise.
2988         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2989         (edge_set_predicate): Likewise.
2990         (evaluate_conditions_for_known_args): Likewise.
2991         (evaluate_properties_for_edge): Likewise.
2992         (ipa_call_summary::reset): Tranform to ...
2993         (ipa_call_summary::~ipa_call_summary): ... this.
2994         (ipa_fn_summary::reset): Transform to ...
2995         (ipa_fn_summary::~ipa_fn_summary): ... this.
2996         (ipa_fn_summary_t::remove): Rename to ...
2997         (ipa_fn_summary_t::remove_callees): ... this.
2998         (ipa_fn_summary_t::duplicate): Use placement new
2999         instead of memory copy.
3000         (ipa_call_summary_t::duplicate): Likewise.
3001         (ipa_call_summary_t::remove): Remove.
3002         (dump_ipa_call_summary): Change get_create to get.
3003         (ipa_dump_fn_summary): Dump only when summary exists.
3004         (analyze_function_body): Use symbol_summary::get instead
3005         of get_create.
3006         (compute_fn_summary): Likewise.
3007         (estimate_edge_devirt_benefit): Likewise.
3008         (estimate_edge_size_and_time): Likewise.
3009         (inline_update_callee_summaries): Likewise.
3010         (remap_edge_change_prob): Likewise.
3011         (remap_edge_summaries): Likewise.
3012         (ipa_merge_fn_summary_after_inlining): Likewise.
3013         (write_ipa_call_summary): Likewise.
3014         (ipa_fn_summary_write): Likewise.
3015         (ipa_free_fn_summary): Likewise.
3016         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3017         (struct ipa_call_summary): Likewise.
3018         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3019         of get_create.
3020         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3021         (estimate_size_after_inlining): Likewise.
3022         (estimate_growth): Likewise.
3023         (growth_likely_positive): Likewise.
3024         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3025         (inline_call): Likewise.
3026         * ipa-inline.c (caller_growth_limits): Likewise.
3027         (can_inline_edge_p): Likewise.
3028         (can_inline_edge_by_limits_p): Likewise.
3029         (compute_uninlined_call_time): Likewise.
3030         (compute_inlined_call_time): Likewise.
3031         (want_inline_small_function_p): Likewise.
3032         (edge_badness): Likewise.
3033         (update_caller_keys): Likewise.
3034         (update_callee_keys): Likewise.
3035         (inline_small_functions): Likewise.
3036         (inline_to_all_callers_1): Likewise.
3037         (dump_overall_stats): Likewise.
3038         (early_inline_small_functions): Likewise.
3039         (early_inliner): Likewise.
3040         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3041         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3042         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3043         * ipa-split.c (execute_split_functions): Likewise.
3044         * symbol-summary.h: Likewise.
3045         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3047 2018-06-19  Richard Biener  <rguenther@suse.de>
3049         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3050         (vectorize_loops): ... here.  Fix dbgcnt handling.
3051         (try_vectorize_loop): Wrap try_vectorize_loop_1.
3053 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
3055         PR target/86197
3056         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3057         ieee128 argument takes up only one (vector) register, not two (floating
3058         point) registers.
3060 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3062         * gimplify.c (gimplify_init_constructor): Really never clear for an
3063         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3065 2018-06-19  Richard Biener  <rguenther@suse.de>
3067         PR tree-optimization/86179
3068         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3069         after failed recognition.
3071 2018-06-18  Martin Sebor  <msebor@redhat.com>
3073         PR middle-end/85602
3074         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3075         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3076         Handle integer subtraction.
3077         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3078         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3080 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3082         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3083         param from rtx to rtx_insn *.
3084         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3085         param.
3086         (frv_ifcvt_modify_insn): Likwise.
3087         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3088         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
3089         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3090         as_a <rtx_insn *> cast to local "unprotected_region" once
3091         it's been established that it's not NULL or pc_rtx.
3092         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3093         param "sethi" from rtx to rtx_insn *.
3094         (nds32_group_float_insns): Likewise for param "insn".
3095         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3096         param.
3097         (vax_output_int_subtract): Likewise.
3098         * config/vax/vax.c (vax_output_int_add): Likewise for param
3099         "insn".
3100         (vax_output_int_subtract): Likewise.
3101         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3102         (emit_pattern_after): Likewise for param "after".
3103         (emit_insn_after): Likewise.
3104         (emit_jump_insn_after): Likewise.
3105         (emit_call_insn_after): Likewise.
3106         (emit_debug_insn_after): Likewise.
3107         (emit_pattern_before): Likewise for param "before".
3108         (emit_insn_before): Likewise.
3109         (emit_jump_insn_before): Likewise.
3110         * final.c (get_insn_template): Likewise for param "insn", removing
3111         a cast.
3112         * output.h (get_insn_template): Likewise for 2nd param.
3113         * rtl.h (emit_insn_before): Likewise.
3114         (emit_jump_insn_before): Likewise.
3115         (emit_debug_insn_before_noloc): Likewise.
3116         (emit_insn_after): Likewise.
3117         (emit_jump_insn_after): Likewise.
3118         (emit_call_insn_after): Likewise.
3119         (emit_debug_insn_after): Likewise.
3120         (set_insn_deleted): Likewise for param.
3122 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
3124         PR target/85358
3125         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3126         floating point modes, so that IFmode is numerically greater than
3127         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3128         to declare the ordering.  This prevents IFmode from being
3129         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3130         machine.  Include rs6000-modes.h to share the fractional values
3131         between genmodes* and the rest of the compiler.
3132         (IFmode): Likewise.
3133         (KFmode): Likewise.
3134         (TFmode): Likewise.
3135         * config/rs6000/rs6000-modes.h: New file.
3136         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3137         meaning of rs6000_long_double_size so that 126..128 selects an
3138         appropriate 128-bit floating point type.
3139         (rs6000_option_override_internal): Likewise.
3140         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3141         (TARGET_LONG_DOUBLE_128): Change the meaning of
3142         rs6000_long_double_size so that 126..128 selects an appropriate
3143         128-bit floating point type.
3144         (LONG_DOUBLE_TYPE_SIZE): Update comment.
3145         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3146         source and destination to match the standard usage.
3147         (truncifkf2): Likewise.
3148         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3149         ISA 2.07 to use an explicit clobber, instead of passing in a
3150         temporary.
3151         (copysign<mode>3_soft): Likewise.
3153 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3155         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3156         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3157         (vect_slp_analyze_instance_dependence): Likewise.
3158         (vect_enhance_data_refs_alignment): Likewise.
3159         (vect_analyze_data_refs_alignment): Likewise.
3160         (vect_slp_analyze_and_verify_instance_alignment
3161         (vect_analyze_data_ref_accesses): Likewise.
3162         (vect_prune_runtime_alias_test_list): Likewise.
3163         (vect_analyze_data_refs): Likewise.
3164         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3165         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3166         (vect_analyze_scalar_cycles_1): Likewise.
3167         (vect_get_loop_niters): Likewise.
3168         (vect_analyze_loop_form_1): Likewise.
3169         (vect_update_vf_for_slp): Likewise.
3170         (vect_analyze_loop_operations): Likewise.
3171         (vect_analyze_loop): Likewise.
3172         (vectorizable_induction): Likewise.
3173         (vect_transform_loop): Likewise.
3174         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3175         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3176         (vect_make_slp_decision): Likewise.
3177         (vect_detect_hybrid_slp): Likewise.
3178         (vect_slp_analyze_operations): Likewise.
3179         (vect_slp_bb): Likewise.
3180         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3181         (vectorizable_bswap): Likewise.
3182         (vectorizable_call): Likewise.
3183         (vectorizable_simd_clone_call): Likewise.
3184         (vectorizable_conversion): Likewise.
3185         (vectorizable_assignment): Likewise.
3186         (vectorizable_shift): Likewise.
3187         (vectorizable_operation): Likewise.
3188         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3190 2018-06-18  Martin Sebor  <msebor@redhat.com>
3192         PR tree-optimization/81384
3193         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3194         * builtins.c (expand_builtin_strnlen): New function.
3195         (expand_builtin): Call it.
3196         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3197         * builtins.def (BUILT_IN_STRNLEN): New.
3198         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3199         Warn for bounds in excess of maximum object size.
3200         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3201         single-value ranges.  Handle strnlen.
3202         (handle_builtin_strlen): Handle strnlen.
3203         (strlen_check_and_optimize_stmt): Same.
3204         * doc/extend.texi (Other Builtins): Document strnlen.
3206 2018-06-18  Maya Rashish  <coypu@sdf.org>
3208         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3209         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3210         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3212         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3213         here to ...
3214         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3216 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3218         * tree.c (escaped_string::escape): Replace cast to char * by
3219         const_cast<char *> (unescaped).
3221 2018-06-18  Nick Clifton  <nickc@redhat.com>
3223         PR 84195
3224         * tree.c (escaped_string): New class.  Converts an unescaped
3225         string into its escaped equivalent.
3226         (warn_deprecated_use): Use the new class to convert the
3227         deprecation message, if present.
3228         (test_escaped_strings): New self test.
3229         (test_c_tests): Add test_escaped_strings.
3230         * doc/extend.texi (deprecated): Add a note that the
3231         deprecation message is affected by the -fmessage-length
3232         option, and that control characters will be escaped.
3233         (#pragma GCC error): Document this pragma.
3234         (#pragma GCC warning): Likewise.
3235         * doc/invoke.texi (-fmessage-length): Document this option's
3236         effect on the #warning and #error preprocessor directives and
3237         the deprecated attribute.
3239 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
3241         * tree.c (decl_value_expr_lookup): Revert latest change.
3242         (decl_value_expr_insert): Likewise.
3244 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
3246         * gimplify.c (nonlocal_vlas): Delete.
3247         (nonlocal_vla_vars): Likewise.
3248         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3249         referenced VLAs.
3250         (gimplify_body): Do not create and destroy nonlocal_vlas.
3251         * tree-nested.c: Include diagnostic.h.
3252         (use_pointer_in_frame): Tweak.
3253         (lookup_field_for_decl): Add assertion and declare the transformation.
3254         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3255         internal error when the reference is in a wrong context.  Do not
3256         create a debug decl by default.
3257         (note_nonlocal_block_vlas): Delete.
3258         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3259         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
3260         create a debug decl by default.
3261         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3262         call is in a wrong context.
3263         (fixup_vla_decls): New function.
3264         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
3265         debug variables were created.
3266         * tree.c (decl_value_expr_lookup): Add checking assertion.
3267         (decl_value_expr_insert): Likewise.
3269 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3271         PR middle-end/82479
3272         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3273         * tree-scalar-evolution.c (interpret_expr): Likewise.
3274         (expression_expensive_p): Likewise.
3275         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3276         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3277         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3278         (ssa_defined_by_minus_one_stmt_p): New.
3280 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3282         PR middle-end/64946
3283         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3284         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3285         * dojump.c (do_jump): Likewise.
3286         * expr.c (expand_expr_real_2): Check operand type's sign.
3287         * fold-const.c (const_unop): Handle ABSU_EXPR.
3288         (fold_abs_const): Likewise.
3289         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3290         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3291         (strip_sign_op_1): Likesise.
3292         * match.pd: Add new pattern to generate ABSU_EXPR.
3293         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3294         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3295         * tree-eh.c (operation_could_trap_helper_p): Likewise.
3296         * tree-inline.c (estimate_operator_cost): Likewise.
3297         * tree-pretty-print.c (dump_generic_node): Likewise.
3298         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3299         * tree.def (ABSU_EXPR): New.
3301 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
3303         PR middle-end/86095
3304         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3305         documented as preserved for backward compatibility only.
3306         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3308         PR rtl-optimization/86108
3309         * bb-reorder.c (create_forwarder_block): Renamed to ...
3310         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
3311         jump from new landing pad to the second part.
3312         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3313         Adjust callers.
3315 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
3317         PR middle-end/85878
3318         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3319         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3320         Only call store_expr for halves if the mode is the same.
3322         PR middle-end/86123
3323         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3324         Fix up comment formatting.
3326 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3328         * typed-splay-tree.h (typed_splay_tree::remove): New function.
3329         (typed_splay_tree::closure,
3330         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3331         (typed_splay_tree::typed_splay_tree,
3332         typed_splay_tree::operator =): Declared private.
3333         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3334         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3335         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3336         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3337         typed_splay_tree::splay_tree_splay,
3338         typed_splay_tree::splay_tree_foreach_helper,
3339         typed_splay_tree::splay_tree_insert,
3340         typed_splay_tree::splay_tree_remove,
3341         typed_splay_tree::splay_tree_lookup,
3342         typed_splay_tree::splay_tree_predecessor,
3343         typed_splay_tree::splay_tree_successor,
3344         typed_splay_tree::splay_tree_min,
3345         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3346         (typed_splay_tree::root, typed_splay_tree::comp,
3347         typed_splay_tree::delete_key,
3348         typed_splay_tree::delete_value): New data members.
3349         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3350         typed_splay_tree::remove.
3352 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
3354         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3355         -mginv and -mno-ginv to the assembler.
3356         * config/mips/mips.opt (-mcrc): New option.
3357         (-mginv): Likewise.
3358         * doc/invoke.text (-mcrc): Document.
3359         (-mginv): Likewise.
3361 2018-06-15  Nick Clifton  <nickc@redhat.com>
3363         PR 84195
3364         * tree.c (escaped_string): New class.  Converts an unescaped
3365         string into its escaped equivalent.
3366         (warn_deprecated_use): Use the new class to convert the
3367         deprecation message, if present.
3368         (test_escaped_strings): New self test.
3369         (test_c_tests): Add test_escaped_strings.
3370         * doc/extend.texi (deprecated): Add a note that the
3371         deprecation message is affected by the -fmessage-length
3372         option, and that control characters will be escaped.
3373         (#pragma GCC error): Document this pragma.
3374         (#pragma GCC warning): Likewise.
3375         * doc/invoke.texi (-fmessage-length): Document this option's
3376         effect on the #warning and #error preprocessor directives and
3377         the deprecated attribute.
3379 2018-06-15  Richard Biener  <rguenther@suse.de>
3381         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3382         here, also noting vector size used.
3383         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
3384         size used in MSG_OPTIMIZED_LOCATIONS dump.
3385         (pass_slp_vectorize::execute): Adjust.
3387 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
3389         PR target/85968
3390         * config/arc/arc.c (arc_return_address_register): Fix
3391         if-condition.
3393 2018-06-15  Richard Biener  <rguenther@suse.de>
3395         PR middle-end/86159
3396         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3397         leave useless conversion stripping to force_gimple_operand_gsi.
3398         (gimplify_build2): Likewise.
3399         (gimplify_build1): Likewise.
3401 2018-06-15  Richard Biener  <rguenther@suse.de>
3403         PR middle-end/86076
3404         * tree-cfg.c (move_stmt_op): unshare invariant addresses
3405         before adjusting their block.
3407 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3409         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3410         multilibs for *-*-rtems*.
3411         * config/riscv/t-rtems: New file.
3413 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
3415         PR middle-end/86122
3416         * match.pd ((A +- CST1) +- CST2): Punt if last resort
3417         unsigned_type_for returns NULL.
3419         PR target/85945
3420         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3421         subregs of multi-word pseudos unless the float mode has word size.
3423 2018-06-14  Richard Biener  <rguenther@suse.de>
3425         PR middle-end/86139
3426         * tree-vect-generic.c (build_word_mode_vector_type): Remove
3427         duplicate and harmful type_hash_canon.
3428         * tree.c (type_hash_canon): Assert we didn't find ourselves.
3430 2018-06-14  Richard Biener  <rguenther@suse.de>
3432         PR ipa/86124
3433         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3434         NULL cgraph_node.
3436 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3438         * config/rtems.h (STDINT_LONG32): Define.
3440 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
3441             Prachi Godbole  <prachi.godbole@imgtec.com>
3443         * config/mips/mips-cpus.def: Define P6600.
3444         * config/mips/mips-tables.opt: Regenerate.
3445         * config/mips/mips.c (mips_ucbranch_type): New enum.
3446         (mips_rtx_cost_data): Add support for P6600.
3447         (mips_issue_rate): Likewise.
3448         (mips_multipass_dfa_lookahead): Likewise.
3449         (mips_avoid_hazard): Likewise.
3450         (mips_reorg_process_insns): Likewise.
3451         (mips_classify_branch_p6600): New function.
3452         * config/mips/mips.h (TUNE_P6600): New define.
3453         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3454         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3455         * config/mips/mips.md: Include p6600.md.
3456         (processor): Add p6600.
3457         * config/mips/p6600.md: New file.
3458         * doc/invoke.texi: Add p6600 to supported architectures.
3460 2018-06-13  Martin Sebor  <msebor@redhat.com>
3462         PR tree-optimization/86114
3463         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3464         of integer types.
3465         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3467 2018-06-13  Richard Biener  <rguenther@suse.de>
3469         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3470         Properly set vector type of the intermediate stmt.
3471         * tree-vect-stmts.c (vectorizable_operation): The destination
3472         var always has vectype_out type.
3474 2018-06-13  Jeff Law  <law@redhat.com>
3476         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3477         integer 0 for argument to print_rtl_with_bb.
3478         (rl78_reorg): Likewise.
3480 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
3482         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3483         from rtx to rtx_insn *.
3484         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3485         "label".
3486         (add_sched_insns_for_speculation): Likewise for local "target",
3487         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3488         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3489         from rtx_insn ** to rtx_code_label **.
3490         (reorg_emit_nops): Likewise.
3491         (c6x_reorg): Likewise for local "call_labels".
3492         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3493         rtx to rtx_insn *.
3494         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3495         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3496         the loops over LABEL_REFS.
3497         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3498         braf_label.
3499         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3500         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3501         (split_branches): Strengthen local "olabel" from rtx to
3502         rtx_insn *, adding a safe_as_a cast.
3503         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3504         to "rtx_insn *".
3505         (add_insn_after): Likewise for first two params.
3506         (add_insn_before): Likewise.
3507         (remove_insn): Likewise for param.
3508         (emit_pattern_before_noloc): Likewise for second and third params.
3509         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3510         (emit_call_insn_before_noloc): Likewise.
3511         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3512         to "rtx_insn *".
3513         (emit_barrier_before): Likewise.
3514         (emit_label_before): Strengthen "label" param from "rtx" to
3515         "rtx_code_label *".  Strengthen "before" param from "rtx" to
3516         "rtx_insn *".
3517         (emit_insn_after_1): Strengthen "after" param from "rtx" to
3518         "rtx_insn *".
3519         (emit_pattern_after_noloc): Likewise.
3520         (emit_insn_after_noloc): Likewise.
3521         (emit_jump_insn_after_noloc): Likewise.
3522         (emit_call_insn_after_noloc): Likewise.
3523         (emit_debug_insn_after_noloc): Likewise.
3524         (emit_barrier_after): Likewise.
3525         (emit_label_after): Likewise for both params.
3526         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
3527         "loc" param from "int" to "location_t".
3528         (emit_insn_after_setloc): Likewise.
3529         (emit_jump_insn_after_setloc): Likewise.
3530         (emit_call_insn_after_setloc): Likewise.
3531         (emit_debug_insn_after_setloc): Likewise.
3532         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
3533         "loc" param from "int" to "location_t".
3534         (emit_pattern_before): Convert NULL_RTX to NULL.
3535         (emit_insn_before_setloc): Convert "loc" param from "int" to
3536         "location_t".
3537         (emit_jump_insn_before_setloc): Likewise.
3538         (emit_call_insn_before_setloc): Likewise.
3539         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3540         rtx_insn *.  Convert "loc" param from "int" to "location_t".
3541         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3542         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3543         Convert 3rd param from "int" to "location_t".
3544         (emit_barrier_before, emit_barrier_after, next_real_insn):
3545         Strengthen param from rtx to rtx_insn *.
3546         (emit_label_before): Strengthen 1st param from "rtx" to
3547         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
3548         "rtx_insn *".
3549         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3550         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3551         Strengthen 2nd param from "rtx" to "rtx_insn *".
3552         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3553         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3554         Likewise. Convert 3rd param from "int" to "location_t".
3555         (emit_label_after): Strengthen 1st param from "rtx" to
3556         "rtx_code_label *".
3557         (next_real_insn, remove_insn): Strengthen param from "rtx" to
3558         "rtx_insn *".
3559         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3560         from "rtx" to "rtx_insn *".
3562 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
3564         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3565         bodies streamed in with -Q.
3566         * dumpfile.c (dump_files): Add lto-stream-out dump file.
3567         * dumpfile.h (tree_dump_index): Add lto_stream_out.
3568         * gimple-streamer-out.c: Include gimple-pretty-print.h
3569         (output_bb): Dump stmts streamed.
3570         * lto-section-out.c: Include print-tree.h
3571         (lto_begin_section): Dump sections created.
3572         (lto_output_decl_index): Dump decl encoded.
3573         * lto-streamer-out.c: Include print-tree.h
3574         (create_output_block): Dump output block created.
3575         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3576         (output_function): Dump function output.
3577         (output_constructor): Dump constructor streamed.
3578         (write_global_stream): Output indexes encoded.
3579         (produce_asm_for_decls): Dump streams encoded.
3580         * lto-streamer.c (streamer_dump_file): New global var.
3581         * lto-streamer.h (streamer_dump_file): Declare.
3582         * passes.c (ipa_write_summaries): Initialize streamer dump.
3583         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3584         in.
3586 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
3588         PR target/86048
3589         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3590         offsets for register save directives.  Emit a second batch of save
3591         directives, if need be, when the function accesses prior frames.
3593 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3595         * config/arc/fpu.md (fmasf4): Force operand to register.
3596         (fnmasf4): Likewise.
3598 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3600         * config/arc/arc-protos.h (arc_pad_return): Remove.
3601         * config/arc/arc.c (machine_function): Remove force_short_suffix
3602         and size_reason.
3603         (arc_print_operand): Adjust printing of '&'.
3604         (arc_verify_short): Remove conditional printing of short suffix.
3605         (arc_final_prescan_insn): Remove reference to size_reason.
3606         (pad_return): New function.
3607         (arc_reorg): Call pad_return.
3608         (arc_pad_return): Remove.
3609         (arc_init_machine_status): Remove reference to force_short_suffix.
3610         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3611         (attr length): When attribute iscompact is true force to 2
3612         regardless; in the case of maybe check if we want to force the
3613         instruction to have 4 bytes length.
3614         (nopv): Change it to generate 4 byte long nop as well.
3615         (blockage): New pattern.
3616         (simple_return): Remove call to arc_pad_return.
3617         (p_return_i): Likewise.
3619 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3621         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3623 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3625         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3626         ARC cores.
3628 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3630         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3631         for ARC700 and ARCv2.
3633 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
3635         PR target/86076
3636         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3637         operands[2] instead of operands[1].
3640 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3642         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3643         case, check whether the outer register overlaps an unallocatable
3644         register, not just whether it fits the required class.
3646 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3648         * poly-int.h (can_div_trunc_p): Add new overload in which all values
3649         are poly_ints.
3650         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3651         (memrefs_conflict_p): Likewise.
3652         (init_alias_analysis): Likewise.
3653         * cfgexpand.c (expand_debug_expr): Likewise.
3654         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3655         * cse.c (fold_rtx): Likewise.
3656         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3657         * expr.c (emit_block_move_hints): Likewise.
3658         (clear_storage_hints, push_block, emit_push_insn): Likewise.
3659         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3660         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3661         (emit_group_store): Likewise.
3662         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
3663         to read the PRE/POST_MODIFY increment.
3664         * calls.c (store_one_arg): Use strip_offset.
3665         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3666         poly_int_rtx_p.
3667         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3668         by a VEC_SELECT.
3669         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3670         (simplify_binary_operation_1): Extend CONST_INT handling to
3671         poly_int_rtx_p.
3672         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3673         than a HOST_WIDE_INT.
3674         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3675         poly_int64.
3676         (adjust_mems, add_stores): Update accodingly.
3677         (vt_canonicalize_addr): Track polynomial offsets.
3678         (emit_note_insn_var_location): Likewise.
3679         (vt_add_function_parameter): Likewise.
3680         (vt_initialize): Likewise.
3682 2018-06-12  Jeff Law  <law@redhat.com>
3684         * config.gcc (alpha*-*-freebsd*): Remove.
3685         * config/alpha/freebsd.h: Remove.
3687 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
3689         PR other/69968
3690         * spellcheck-tree.c (levenshtein_distance): Rename to...
3691         (get_edit_distance): ...this, and update for underlying renaming.
3692         * spellcheck-tree.h (levenshtein_distance): Rename to...
3693         (get_edit_distance): ...this.
3694         * spellcheck.c (levenshtein_distance): Rename to...
3695         (get_edit_distance): ...this.  Convert from Levenshtein distance
3696         to Damerau-Levenshtein distance by supporting transpositions of
3697         adjacent characters.  Rename "v1" to "v_next" and "v0" to
3698         "v_one_ago".
3699         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3700         (selftest::test_edit_distance_unit_test_oneway): ...this, and
3701         update for underlying renaming.
3702         (selftest::levenshtein_distance_unit_test): Rename to...
3703         (selftest::test_get_edit_distance_unit): ...this, and update for
3704         underlying renaming.
3705         (selftest::test_find_closest_string): Add example from PR 69968
3706         where transposition helps
3707         (selftest::test_metric_conditions): Update for renaming.
3708         (selftest::test_metric_conditions): Likewise.
3709         (selftest::spellcheck_c_tests): Likewise.
3710         * spellcheck.h (levenshtein_distance): Rename both overloads to...
3711         (get_edit_distance): ...this.
3712         (best_match::consider): Update for renaming.
3714 2018-06-12  Martin Sebor  <msebor@redhat.com>
3716         PR tree-optimization/85259
3717         * builtins.c (compute_objsize): Handle constant offsets.
3718         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3719         true iff a warning has been issued.
3720         * gimple.h (gimple_nonartificial_location): New function.
3721         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3722         gimple_nonartificial_location and handle -Wno-system-headers.
3723         (handle_builtin_stxncpy): Same.
3725 2018-06-12  Martin Sebor  <msebor@redhat.com>
3727         PR c/85931
3728         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3730 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
3732         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3733         BUILTIN_VEC_XST entries for pointer to double and long long.
3735 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
3737         PR target/85990
3738         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3739         Update comments.
3740         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3741         Likewise.
3743 2018-06-12  Martin Liska  <mliska@suse.cz>
3745         * doc/options.texi: Document IntegerRange.
3747 2018-06-12  Martin Liska  <mliska@suse.cz>
3749         * config/i386/i386.opt: Make MPX-related options as Deprecated.
3750         * opt-functions.awk: Handle Deprecated flag.
3751         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3752         and report error.
3753         (read_cmdline_option): Report warning for a deprecated option.
3754         * opts.h (struct cl_option): Add new field cl_deprecated.
3755         (CL_ERR_DEPRECATED): New.
3757 2018-06-12  Martin Liska  <mliska@suse.cz>
3759         * doc/options.texi: Document Deprecated option flag.
3761 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3763         * config/arc/arc-arch.h (arc_extras): New enum.
3764         (arc_cpu_t):Add field extra.
3765         (arc_cpu_types): Consider the extras.
3766         * config/arc/arc-cpus.def: Add extras info.
3767         * config/arc/arc-opts.h (processor_type): Consider extra field.
3768         * config/arc/arc.c (arc_override_options): Handle extra field.
3770 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3772         * config/arc/arc-arch.h: Update ARC_OPTX macro.
3773         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3774         field.
3775         * config/arc/arc.c (arc_init): Update pic warning.
3776         (irq_range): Update irq range parsing warnings.
3777         (arc_override_options): Update various warning messages.
3778         (arc_handle_aux_attribute): Likewise.
3780 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
3782         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3784 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3786         * doc/sourcebuild.texi: Document usage of line number 0 in verify
3787         compiler messages directives.
3789 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
3791         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3792         * config/mips/mips-tables.opt: Regenerate.
3793         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3794         mips64r6.
3795         * doc/invoke.texi: Document -march=i6500.
3797 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
3799         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3800         (i6400_gpmul): Add cpu_unit.
3801         (i6400_gpdiv): Likewise.
3802         (i6400_msa_add_d): Update reservations.
3803         (i6400_msa_int_add) Likewise.
3804         (i6400_msa_short_logic3) Likewise.
3805         (i6400_msa_short_logic2) Likewise.
3806         (i6400_msa_short_logic) Likewise.
3807         (i6400_msa_move) Likewise.
3808         (i6400_msa_cmp) Likewise.
3809         (i6400_msa_short_float2) Likewise.
3810         (i6400_msa_div_d) Likewise.
3811         (i6400_msa_long_logic1) Likewise.
3812         (i6400_msa_long_logic2) Likewise.
3813         (i6400_msa_mult) Likewise.
3814         (i6400_msa_long_float2) Likewise.
3815         (i6400_msa_long_float4) Likewise.
3816         (i6400_msa_long_float5) Likewise.
3817         (i6400_msa_long_float8) Likewise.
3818         (i6400_fpu_fadd): Include frint type.
3819         (i6400_fpu_store): New define_insn_reservation.
3820         (i6400_fpu_load): Likewise.
3821         (i6400_fpu_move): Likewise.
3822         (i6400_fpu_fcmp): Likewise.
3823         (i6400_fpu_fmadd): Likewise.
3824         (i6400_int_mult): Include imul3nc type and update reservation.
3825         (i6400_int_div): Include idiv3 type and update reservation.
3826         (i6400_int_load): Update to check type not move_type.
3827         (i6400_int_store): Likewise.
3828         (i6400_int_prefetch): Set zero latency.
3830 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3832         * gcc.c: Document new %@{...} sequence.
3833         (LINK_COMMAND_SPEC): Use it for the -L switches.
3834         (cpp_unique_options): Use it for the -I switches.
3835         (at_file_argbuf): New global variable.
3836         (in_at_file): Likewise.
3837         (alloc_args): Create at_file_argbuf.
3838         (clear_args): Truncate at_file_argbuf.
3839         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3840         (open_at_file): New function.
3841         (close_at_file): Likewise.
3842         (create_at_file): Delete.
3843         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3844         <'o'>: Likewise.
3845         <'@'>: New case.
3846         (validate_switches_from_spec): Deal with %@{...} sequence.
3847         (validate_switches): Likewise.
3848         (driver::finalize): Call clear_args.
3850 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
3852         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3854 2018-06-11  Martin Sebor  <msebor@redhat.com>
3856         * doc/invoke.texi (-Wall): List -Wc++17-compat.
3857         (Wno-class-memaccess): Add @opindex.
3858         (Wno-templates, Wno-multiple-inheritance): Same.
3859         (Wno-virtual-inheritance, Wno-namespaces): Same.
3860         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3861         (Wno-format-overflow, Wno-format-truncation): Same.
3862         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3863         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3864         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3865         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3866         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3867         (Wno-misspelled-isr): Same.
3869 2018-06-11  Martin Sebor  <msebor@redhat.com>
3871         * PR tree-optimization/86083
3872         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3874 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3876         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3878 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
3880         PR target/85755
3881         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3882         on the correct operand.
3883         (*movdi_internal64): Ditto.
3885 2018-06-11  Martin Liska  <mliska@suse.cz>
3887         PR tree-optimization/86089
3888         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3890 2018-06-11  Julia Koval  <julia.koval@intel.com>
3892         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3893         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3894         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3896 2018-06-11  Olivier Hainque  <hainque@adacore.com>
3898         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3899         for Ada with strict dwarf2.
3901 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
3903         PR target/85755
3904         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3905         addresses.
3907 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
3909         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3911 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
3913         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3914         TARGET_ELF.
3916 2018-06-08  Martin Liska  <mliska@suse.cz>
3918         * tree-cfg.h (debug_function): Fix argument type to match
3919         implementation.
3921 2018-06-08  Martin Liska  <mliska@suse.cz>
3923         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3924         Remove usage of MPX-related (and removed) fields.
3925         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3927 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3929         * cfg.c (debug): Use TDF_NONE rather than 0.
3930         * cfghooks.c (debug): Likewise.
3931         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3932         (struct dump_option_value_info): Convert to...
3933         (struct kv_pair): ...this template type.
3934         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3935         rather than 0.
3936         (optinfo_verbosity_options): Likewise.
3937         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3938         OPTGROUP_NONE.
3939         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3940         than int for "optgroup_flags" param.
3941         (dump_generic_expr_loc): Use dump_flags_t rather than int for
3942         "dump_kind" param.
3943         (dump_dec): Likewise.
3944         (dump_finish): Use TDF_NONE rather than 0.
3945         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3946         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
3947         than 0.  Update for change to option_ptr.
3948         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3949         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
3950         0.  Update for changes to optinfo_verbosity_options and
3951         optgroup_options.
3952         (opt_info_switch_p): Convert optgroup_flags from int to
3953         optgroup_flags_t.
3954         (dump_basic_block): Use dump_flags_t rather than int
3955         for "dump_kind" param.
3956         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3957         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3958         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3959         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3960         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3961         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3962         TDF_NONE): Convert from macros to...
3963         (enum dump_flag): ...this new enum.
3964         (dump_flags_t): Update to use enum.
3965         (operator|, operator&, operator~, operator|=, operator&=):
3966         Implement for dump_flags_t.
3967         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3968         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3969         Convert from macros to...
3970         (enum optgroup_flag): ...this new enum.
3971         (optgroup_flags_t): New typedef.
3972         (operator|, operator|=): Implement for optgroup_flags_t.
3973         (struct dump_file_info): Convert field "alt_flags" to
3974         dump_flags_t.  Convert field "optgroup_flags" to
3975         optgroup_flags_t.
3976         (dump_basic_block): Use dump_flags_t rather than int for param.
3977         (dump_generic_expr_loc): Likewise.
3978         (dump_dec): Likewise.
3979         (dump_register): Convert param "optgroup_flags" to
3980         optgroup_flags_t.
3981         (opt_info_enable_passes): Likewise.
3982         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3983         than 0.
3984         * gimple-pretty-print.c (debug): Likewise.
3985         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3986         (merged_store_group::apply_stores): Likewise.
3987         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3988         * gimple.c (verify_gimple_pp): Likewise.
3989         * graphite-poly.c (print_pbb_body): Likewise.
3990         * passes.c (pass_manager::register_one_dump_file): Convert
3991         local "optgroup_flags" to optgroup_flags_t.
3992         * print-tree.c (print_node): Use TDF_NONE rather than 0.
3993         (debug): Likewise.
3994         (debug_body): Likewise.
3995         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3996         to optgroup_flags_t.
3997         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3998         than 0.
3999         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4000         (convert_mult_to_fma): Likewise.
4001         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4002         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4003         * tree-vect-data-refs.c (dump_lower_bound): Convert param
4004         "dump_kind" to dump_flags_t.
4006 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4008         * config/rs6000/rs6000.c (min, max): Delete.
4010 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4012         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4013         -mabi=spe and -mabi=no-spe.
4015 2018-06-08  Martin Liska  <mliska@suse.cz>
4017         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4018         where we expect an existing summary.
4020 2018-06-08  Martin Liska  <mliska@suse.cz>
4022         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4023         * ipa-inline.h (estimate_edge_growth): Likewise.
4025 2018-06-08  Martin Liska  <mliska@suse.cz>
4027         * cgraph.c (function_version_hasher::hash): Use
4028         cgraph_node::get_uid ().
4029         (function_version_hasher::equal):
4030         * cgraph.h (cgraph_node::get_uid): New method.
4031         * ipa-inline.c (update_caller_keys): Use
4032         cgraph_node::get_uid ().
4033         (update_callee_keys): Likewise.
4034         * ipa-utils.c (searchc): Likewise.
4035         (ipa_reduced_postorder): Likewise.
4036         * lto-cgraph.c (input_node): Likewise.
4037         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4038         * symbol-summary.h (symtab_insertion): Likewise.
4039         (symtab_removal): Likewise.
4040         (symtab_duplication): Likewise.
4041         * tree-pretty-print.c (dump_function_header): Likewise.
4042         * tree-sra.c (convert_callers_for_node): Likewise.
4044 2018-06-08  Martin Liska  <mliska@suse.cz>
4046         * cgraph.c (symbol_table::create_edge): Always assign a new
4047         unique number.
4048         (symbol_table::free_edge): Do not recycle numbers.
4049         * cgraph.h (cgraph_edge::get): New method.
4050         * symbol-summary.h (symtab_removal): Use it.
4051         (symtab_duplication): Likewise.
4052         (call_summary::hashable_uid): Remove.
4054 2018-06-08  Martin Liska  <mliska@suse.cz>
4056         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4057         (initialize_growth_caches): Remove.
4058         (free_growth_caches): Likewise.
4059         (do_estimate_edge_time): Use edge_growth_cache.
4060         (do_estimate_edge_size): Likewise.
4061         (do_estimate_edge_hints): Likewise.
4062         * ipa-inline.c (reset_edge_caches): Likewise.
4063         (recursive_inlining): Likewise.
4064         (inline_small_functions): Likewise.
4065         * ipa-inline.h (initialize_growth_caches): Remove.
4066         (estimate_edge_size): Likewise.
4067         (estimate_edge_time): Likewise.
4068         (estimate_edge_hints): Likewise.
4069         (reset_edge_growth_cache): Likewise.
4070         * symbol-summary.h (call_summary::remove): New method.
4072 2018-06-08  Martin Liska  <mliska@suse.cz>
4074         * ipa-cp.c (class edge_clone_summary): New summary.
4075         (grow_edge_clone_vectors): Remove.
4076         (ipcp_edge_duplication_hook): Remove.
4077         (class edge_clone_summary_t): New call_summary class.
4078         (ipcp_edge_removal_hook): Remove.
4079         (edge_clone_summary_t::duplicate): New function.
4080         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4081         (create_specialized_node): Likewise.
4082         (ipcp_driver): Initialize edge_clone_summaries and do not
4083         register hooks.
4085 2018-06-08  Martin Liska  <mliska@suse.cz>
4087         * symbol-summary.h (get): New function.
4088         (call_summary::m_initialize_when_cloning): New class member.
4090 2018-06-08  Martin Liska  <mliska@suse.cz>
4092         * cgraph.c (cgraph_node::remove): Do not recycle uid.
4093         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4094         (symbol_table::allocate_cgraph_symbol): Do not set uid.
4095         * passes.c (uid_hash_t): Record removed_nodes by their uids.
4096         (remove_cgraph_node_from_order): Use the removed_nodes set.
4097         (do_per_function_toporder): Likwise.
4098         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4099         instead of summary_uid.
4100         (symtab_removal): Likewise.
4101         (symtab_duplication): Likewise.
4103 2018-06-08  Martin Liska  <mliska@suse.cz>
4105         * ipa-cp.c (ipcp_store_bits_results): Use
4106         ipcp_transformation_sum.
4107         (ipcp_store_vr_results): Likewise.
4108         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4109         to ...
4110         (ipcp_transformation_initialize): ... this.
4111         (ipa_set_node_agg_value_chain):
4112         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4113         (write_ipcp_transformation_info): Likewise.
4114         (read_ipcp_transformation_info): Likewise.
4115         (ipcp_update_bits): Likewise.
4116         (ipcp_update_vr): Likewise.
4117         (ipcp_transform_function): Likewise.
4118         * ipa-prop.h: Rename ipcp_transformation_summary to
4119         ipcp_transformation.
4120         (class ipcp_transformation_t): New function summary.
4121         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4122         (ipa_get_agg_replacements_for_node): Likewise.
4124 2018-06-08  Martin Liska  <mliska@suse.cz>
4126         * ipa-pure-const.c (struct funct_state_d): Do it class instead
4127         of struct.
4128         (class funct_state_summary_t): New function_summary class.
4129         (has_function_state): Remove.
4130         (get_function_state): Likewise.
4131         (set_function_state): Likewise.
4132         (add_new_function): Likewise.
4133         (funct_state_summary_t::insert): New function.
4134         (duplicate_node_data): Remove.
4135         (remove_node_data): Remove.
4136         (funct_state_summary_t::duplicate): New function.
4137         (register_hooks): Create new funct_state_summaries.
4138         (pure_const_generate_summary): Use it.
4139         (pure_const_write_summary): Likewise.
4140         (pure_const_read_summary): Likewise.
4141         (propagate_pure_const): Likewise.
4142         (propagate_nothrow): Likewise.
4143         (dump_malloc_lattice): Likewise.
4144         (propagate_malloc): Likewise.
4145         (execute): Do not register hooks, just remove summary
4146         instead.
4147         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4148         constructor.
4150 2018-06-08  Martin Liska  <mliska@suse.cz>
4152         * ipa-reference.c (remove_node_data): Remove.
4153         (duplicate_node_data): Likewise.
4154         (class ipa_ref_var_info_summary_t): New class.
4155         (class ipa_ref_opt_summary_t): Likewise.
4156         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4157         (get_reference_optimization_summary): Use
4158         ipa_ref_opt_sum_summaries.
4159         (set_reference_vars_info): Remove.
4160         (set_reference_optimization_summary): Likewise.
4161         (ipa_init): Create summaries.
4162         (init_function_info): Use function summary.
4163         (ipa_ref_opt_summary_t::duplicate): New function.
4164         (ipa_ref_opt_summary_t::remove): New function.
4165         (get_read_write_all_from_node): Fix GNU coding style.
4166         (propagate): Use function summary.
4167         (write_node_summary_p): Fix GNU coding style.
4168         (stream_out_bitmap): Likewise.
4169         (ipa_reference_read_optimization_summary): Use function summary.
4170         (ipa_reference_c_finalize): Do not release hooks.
4172 2018-06-08  Martin Liska  <mliska@suse.cz>
4174         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4175         (analyze_function_body): Extract multiple calls of get_create.
4176         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4177         * ipa-inline.c (recursive_inlining): Use ::get method.
4178         * ipa-inline.h (estimate_edge_growth): Likewise.
4180 2018-06-08  Martin Liska  <mliska@suse.cz>
4182         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4183         HSA_INVALID.
4184         (hsa_function_summary::hsa_function_summary): Use the new enum
4185         value.
4186         (hsa_gpu_implementation_p): Use hsa_summaries::get.
4187         * hsa-gen.c (hsa_get_host_function): Likewise.
4188         (get_brig_function_name): Likewise.
4189         * ipa-hsa.c (process_hsa_functions): Likewise.
4190         (ipa_hsa_write_summary): Likewise.
4191         * symbol-summary.h (symtab_duplication): Use ::get function/
4192         (get): New function.
4194 2018-06-08  Martin Liska  <mliska@suse.cz>
4196         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4197         of get.
4198         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4199         (hsa_register_kernel): Likewise.
4200         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4201         * hsa-gen.c (hsa_get_host_function): Likewise.
4202         (get_brig_function_name): Likewise.
4203         (generate_hsa): Likewise.
4204         (pass_gen_hsail::execute): Likewise.
4205         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4206         (devirtualization_time_bonus): Likewise.
4207         (ipcp_propagate_stage): Likewise.
4208         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4209         (edge_set_predicate): Likewise.
4210         (evaluate_conditions_for_known_args): Likewise.
4211         (evaluate_properties_for_edge): Likewise.
4212         (ipa_fn_summary::reset): Likewise.
4213         (ipa_fn_summary_t::duplicate): Likewise.
4214         (dump_ipa_call_summary): Likewise.
4215         (ipa_dump_fn_summary): Likewise.
4216         (analyze_function_body): Likewise.
4217         (compute_fn_summary): Likewise.
4218         (estimate_edge_devirt_benefit): Likewise.
4219         (estimate_edge_size_and_time): Likewise.
4220         (estimate_calls_size_and_time): Likewise.
4221         (estimate_node_size_and_time): Likewise.
4222         (inline_update_callee_summaries): Likewise.
4223         (remap_edge_change_prob): Likewise.
4224         (remap_edge_summaries): Likewise.
4225         (ipa_merge_fn_summary_after_inlining): Likewise.
4226         (ipa_update_overall_fn_summary): Likewise.
4227         (read_ipa_call_summary): Likewise.
4228         (inline_read_section): Likewise.
4229         (write_ipa_call_summary): Likewise.
4230         (ipa_fn_summary_write): Likewise.
4231         (ipa_free_fn_summary): Likewise.
4232         * ipa-hsa.c (process_hsa_functions): Likewise.
4233         (ipa_hsa_write_summary): Likewise.
4234         (ipa_hsa_read_section): Likewise.
4235         * ipa-icf.c (sem_function::merge): Likewise.
4236         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4237         (do_estimate_edge_time): Likewise.
4238         (estimate_size_after_inlining): Likewise.
4239         (estimate_growth): Likewise.
4240         (growth_likely_positive): Likewise.
4241         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4242         (inline_call): Likewise.
4243         * ipa-inline.c (caller_growth_limits): Likewise.
4244         (can_inline_edge_p): Likewise.
4245         (can_inline_edge_by_limits_p): Likewise.
4246         (compute_uninlined_call_time): Likewise.
4247         (compute_inlined_call_time): Likewise.
4248         (want_inline_small_function_p): Likewise.
4249         (edge_badness): Likewise.
4250         (update_caller_keys): Likewise.
4251         (update_callee_keys): Likewise.
4252         (recursive_inlining): Likewise.
4253         (inline_small_functions): Likewise.
4254         (inline_to_all_callers_1): Likewise.
4255         (dump_overall_stats): Likewise.
4256         (early_inline_small_functions): Likewise.
4257         (early_inliner): Likewise.
4258         * ipa-inline.h (estimate_edge_growth): Likewise.
4259         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4260         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4261         * ipa-prop.h (IPA_NODE_REF): Likewise.
4262         (IPA_EDGE_REF): Likewise.
4263         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4264         (propagate_malloc): Likewise.
4265         * ipa-split.c (execute_split_functions): Likewise.
4266         * symbol-summary.h: Rename get to get_create.
4267         (get): Likewise.
4268         (get_create): Likewise.
4269         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4271 2018-06-08  Martin Liska  <mliska@suse.cz>
4273         * symbol-summary.h (release): Move definition out of class
4274         declaration.
4275         (symtab_removal): Likewise.
4276         (symtab_duplication): Likewise.
4278 2018-06-08  Martin Liska  <mliska@suse.cz>
4280         * symbol-summary.h (function_summary): Move constructor
4281         implementation out of class declaration.
4282         (release): Likewise.
4283         (symtab_insertion): Likewise.
4284         (symtab_removal): Likewise.
4285         (symtab_duplication): Likewise.
4286         (get): Likewise.
4288 2018-06-08  Martin Liska  <mliska@suse.cz>
4290         * Makefile.in: Remove support for MPX (macros, related functions,
4291         fields in cgraph_node, ...).
4292         * builtin-types.def (BT_BND): Likewise.
4293         (BT_FN_BND_CONST_PTR): Likewise.
4294         (BT_FN_CONST_PTR_BND): Likewise.
4295         (BT_FN_VOID_PTR_BND): Likewise.
4296         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4297         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4298         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4299         (expand_builtin_mempcpy_with_bounds): Likewise.
4300         (expand_builtin_memset_with_bounds): Likewise.
4301         (expand_builtin_memset_args): Likewise.
4302         (std_expand_builtin_va_start): Likewise.
4303         (expand_builtin): Likewise.
4304         (expand_builtin_with_bounds): Likewise.
4305         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4306         (DEF_LIB_BUILTIN_CHKP): Likewise.
4307         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4308         (DEF_CHKP_BUILTIN): Likewise.
4309         (BUILT_IN_MEMCPY): Likewise.
4310         (BUILT_IN_MEMMOVE): Likewise.
4311         (BUILT_IN_MEMPCPY): Likewise.
4312         (BUILT_IN_MEMSET): Likewise.
4313         (BUILT_IN_STPCPY): Likewise.
4314         (BUILT_IN_STRCAT): Likewise.
4315         (BUILT_IN_STRCHR): Likewise.
4316         (BUILT_IN_STRCPY): Likewise.
4317         (BUILT_IN_STRLEN): Likewise.
4318         (BUILT_IN_MEMCPY_CHK): Likewise.
4319         (BUILT_IN_MEMMOVE_CHK): Likewise.
4320         (BUILT_IN_MEMPCPY_CHK): Likewise.
4321         (BUILT_IN_MEMSET_CHK): Likewise.
4322         (BUILT_IN_STPCPY_CHK): Likewise.
4323         (BUILT_IN_STRCAT_CHK): Likewise.
4324         (BUILT_IN_STRCPY_CHK): Likewise.
4325         * calls.c (store_bounds): Likewise.
4326         (emit_call_1): Likewise.
4327         (special_function_p): Likewise.
4328         (maybe_warn_nonstring_arg): Likewise.
4329         (initialize_argument_information): Likewise.
4330         (finalize_must_preallocate): Likewise.
4331         (compute_argument_addresses): Likewise.
4332         (expand_call): Likewise.
4333         * cfgexpand.c (expand_call_stmt): Likewise.
4334         (expand_return): Likewise.
4335         (expand_gimple_stmt_1): Likewise.
4336         (pass_expand::execute): Likewise.
4337         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4338         (cgraph_node::remove): Likewise.
4339         (cgraph_node::dump): Likewise.
4340         (cgraph_node::verify_node): Likewise.
4341         * cgraph.h (chkp_function_instrumented_p): Likewise.
4342         (symtab_node::get_alias_target): Likewise.
4343         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4344         (cgraph_local_p): Likewise.
4345         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4346         (cgraph_edge::rebuild_references): Likewise.
4347         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4348         (walk_polymorphic_call_targets): Likewise.
4349         (cgraph_node::expand_thunk): Likewise.
4350         (symbol_table::output_weakrefs): Likewise.
4351         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4352         (ix86_handle_option): Likewise.
4353         * config/i386/constraints.md: Likewise.
4354         * config/i386/i386-builtin-types.def (BND): Likewise.
4355         (VOID): Likewise.
4356         (PVOID): Likewise.
4357         (ULONG): Likewise.
4358         * config/i386/i386-builtin.def (BDESC_END): Likewise.
4359         (BDESC_FIRST): Likewise.
4360         (BDESC): Likewise.
4361         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4362         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4363         * config/i386/i386.c (enum reg_class): Likewise.
4364         (ix86_target_string): Likewise.
4365         (ix86_option_override_internal): Likewise.
4366         (ix86_conditional_register_usage): Likewise.
4367         (ix86_valid_target_attribute_inner_p): Likewise.
4368         (ix86_set_indirect_branch_type): Likewise.
4369         (ix86_set_current_function): Likewise.
4370         (ix86_function_arg_regno_p): Likewise.
4371         (init_cumulative_args): Likewise.
4372         (ix86_function_arg_advance): Likewise.
4373         (ix86_function_arg): Likewise.
4374         (ix86_pass_by_reference): Likewise.
4375         (ix86_function_value_regno_p): Likewise.
4376         (ix86_function_value_1): Likewise.
4377         (ix86_function_value_bounds): Likewise.
4378         (ix86_return_in_memory): Likewise.
4379         (ix86_setup_incoming_vararg_bounds): Likewise.
4380         (ix86_va_start): Likewise.
4381         (indirect_thunk_need_prefix): Likewise.
4382         (print_reg): Likewise.
4383         (ix86_print_operand): Likewise.
4384         (ix86_expand_call): Likewise.
4385         (ix86_output_function_return): Likewise.
4386         (reg_encoded_number): Likewise.
4387         (BDESC_VERIFYS): Likewise.
4388         (ix86_init_mpx_builtins): Likewise.
4389         (ix86_init_builtins): Likewise.
4390         (ix86_emit_cmove): Likewise.
4391         (ix86_emit_move_max): Likewise.
4392         (ix86_expand_builtin): Likewise.
4393         (ix86_builtin_mpx_function): Likewise.
4394         (ix86_get_arg_address_for_bt): Likewise.
4395         (ix86_load_bounds): Likewise.
4396         (ix86_store_bounds): Likewise.
4397         (ix86_load_returned_bounds): Likewise.
4398         (ix86_store_returned_bounds): Likewise.
4399         (ix86_class_likely_spilled_p): Likewise.
4400         (ix86_hard_regno_mode_ok): Likewise.
4401         (x86_order_regs_for_local_alloc): Likewise.
4402         (ix86_mitigate_rop): Likewise.
4403         (ix86_bnd_prefixed_insn_p): Likewise.
4404         (ix86_mpx_bound_mode): Likewise.
4405         (ix86_make_bounds_constant): Likewise.
4406         (ix86_initialize_bounds): Likewise.
4407         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4408         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4409         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4410         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4411         (TARGET_CHKP_BOUND_MODE): Likewise.
4412         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4413         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4414         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4415         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4416         * config/i386/i386.h (TARGET_MPX): Likewise.
4417         (TARGET_MPX_P): Likewise.
4418         (VALID_BND_REG_MODE): Likewise.
4419         (FIRST_BND_REG): Likewise.
4420         (LAST_BND_REG): Likewise.
4421         (enum reg_class): Likewise.
4422         (BND_REG_P): Likewise.
4423         (BND_REGNO_P): Likewise.
4424         (BNDmode): Likewise.
4425         (ADJUST_INSN_LENGTH): Likewise.
4426         * config/i386/i386.md: Likewise.
4427         * config/i386/i386.opt: Likewise.
4428         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4429         (defined): Likewise.
4430         (LINK_MPX): Likewise.
4431         (MPX_SPEC): Likewise.
4432         (LIBMPX_SPEC): Likewise.
4433         (LIBMPXWRAPPERS_SPEC): Likewise.
4434         (CHKP_SPEC): Likewise.
4435         * config/i386/predicates.md: Likewise.
4436         * dbxout.c (dbxout_type): Likewise.
4437         * doc/extend.texi: Likewise.
4438         * doc/invoke.texi: Likewise.
4439         * doc/md.texi: Likewise.
4440         * doc/tm.texi: Likewise.
4441         * doc/tm.texi.in: Likewise.
4442         * dwarf2out.c (is_base_type): Likewise.
4443         (gen_formal_types_die): Likewise.
4444         (gen_subprogram_die): Likewise.
4445         (gen_type_die_with_usage): Likewise.
4446         (gen_decl_die): Likewise.
4447         (dwarf2out_late_global_decl): Likewise.
4448         * expr.c (expand_assignment): Likewise.
4449         (emit_storent_insn): Likewise.
4450         (store_expr_with_bounds): Likewise.
4451         (store_expr): Likewise.
4452         (expand_expr_real_1): Likewise.
4453         * expr.h (store_expr_with_bounds): Likewise.
4454         * function.c (use_register_for_decl): Likewise.
4455         (struct bounds_parm_data): Likewise.
4456         (assign_parms_augmented_arg_list): Likewise.
4457         (assign_parm_find_entry_rtl): Likewise.
4458         (assign_parm_is_stack_parm): Likewise.
4459         (assign_parm_load_bounds): Likewise.
4460         (assign_bounds): Likewise.
4461         (assign_parms): Likewise.
4462         (expand_function_start): Likewise.
4463         * gcc.c (CHKP_SPEC): Likewise.
4464         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4465         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4466         (wrestrict_dom_walker::check_call): Likewise.
4467         * gimple.c (gimple_build_call_from_tree): Likewise.
4468         * gimple.h (enum gf_mask): Likewise.
4469         (gimple_call_with_bounds_p): Likewise.
4470         (gimple_call_set_with_bounds): Likewise.
4471         * gimplify.c (gimplify_init_constructor): Likewise.
4472         * ipa-cp.c (initialize_node_lattices): Likewise.
4473         (propagate_constants_across_call): Likewise.
4474         (find_more_scalar_values_for_callers_subset): Likewise.
4475         * ipa-hsa.c (process_hsa_functions): Likewise.
4476         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4477         * ipa-icf.c (sem_function::merge): Likewise.
4478         * ipa-inline.c (early_inliner): Likewise.
4479         * ipa-pure-const.c (warn_function_noreturn): Likewise.
4480         (warn_function_cold): Likewise.
4481         (propagate_pure_const): Likewise.
4482         * ipa-ref.h (enum GTY): Likewise.
4483         * ipa-split.c (find_retbnd): Likewise.
4484         (consider_split): Likewise.
4485         (split_function): Likewise.
4486         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4487         * ipa.c (walk_polymorphic_call_targets): Likewise.
4488         (symbol_table::remove_unreachable_nodes): Likewise.
4489         (process_references): Likewise.
4490         (cgraph_build_static_cdtor_1): Likewise.
4491         * lto-cgraph.c (lto_output_node): Likewise.
4492         (output_refs): Likewise.
4493         (compute_ltrans_boundary): Likewise.
4494         (input_overwrite_node): Likewise.
4495         (input_node): Likewise.
4496         (input_cgraph_1): Likewise.
4497         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4498         * passes.c (pass_manager::execute_early_local_passes): Likewise.
4499         (class pass_chkp_instrumentation_passes): Likewise.
4500         (make_pass_chkp_instrumentation_passes): Likewise.
4501         * passes.def: Likewise.
4502         * rtl.h (struct GTY): Likewise.
4503         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4504         * stor-layout.c (layout_type): Likewise.
4505         * symtab.c: Likewise.
4506         * target.def: Likewise.
4507         * targhooks.c (default_chkp_bound_type): Likewise.
4508         (default_chkp_bound_mode): Likewise.
4509         (default_builtin_chkp_function): Likewise.
4510         (default_chkp_function_value_bounds): Likewise.
4511         (default_chkp_make_bounds_constant): Likewise.
4512         (default_chkp_initialize_bounds): Likewise.
4513         * targhooks.h (default_chkp_bound_type): Likewise.
4514         (default_chkp_bound_mode): Likewise.
4515         (default_builtin_chkp_function): Likewise.
4516         (default_chkp_function_value_bounds): Likewise.
4517         (default_chkp_make_bounds_constant): Likewise.
4518         (default_chkp_initialize_bounds): Likewise.
4519         * toplev.c (compile_file): Likewise.
4520         (process_options): Likewise.
4521         * tree-core.h (DEF_BUILTIN): Likewise.
4522         (DEF_BUILTIN_CHKP): Likewise.
4523         * tree-inline.c (declare_return_variable): Likewise.
4524         (remap_gimple_stmt): Likewise.
4525         (copy_bb): Likewise.
4526         (initialize_inlined_parameters): Likewise.
4527         (expand_call_inline): Likewise.
4528         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4529         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4530         (make_pass_ipa_chkp_produce_thunks): Likewise.
4531         (make_pass_chkp): Likewise.
4532         (make_pass_chkp_opt): Likewise.
4533         (make_pass_chkp_instrumentation_passes): Likewise.
4534         * tree-pretty-print.c (dump_generic_node): Likewise.
4535         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4536         * tree-ssa-dce.c (propagate_necessity): Likewise.
4537         (eliminate_unnecessary_stmts): Likewise.
4538         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4539         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4540         * tree-ssa-sccvn.h: Likewise.
4541         * tree-ssa-strlen.c (get_string_length): Likewise.
4542         (valid_builtin_call): Likewise.
4543         (adjust_last_stmt): Likewise.
4544         (handle_builtin_strchr): Likewise.
4545         (handle_builtin_strcpy): Likewise.
4546         (handle_builtin_stxncpy): Likewise.
4547         (handle_builtin_memcpy): Likewise.
4548         (handle_builtin_strcat): Likewise.
4549         (strlen_check_and_optimize_stmt): Likewise.
4550         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4551         * tree-streamer-in.c: Likewise.
4552         * tree-streamer.c (record_common_node): Likewise.
4553         * tree.c (tree_code_size): Likewise.
4554         (wide_int_to_tree_1): Likewise.
4555         (type_contains_placeholder_1): Likewise.
4556         (build_common_tree_nodes): Likewise.
4557         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4558         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4559         (POINTER_BOUNDS_P): Likewise.
4560         (BOUNDED_TYPE_P): Likewise.
4561         (BOUNDED_P): Likewise.
4562         (CALL_WITH_BOUNDS_P): Likewise.
4563         (pointer_bounds_type_node): Likewise.
4564         * value-prof.c (gimple_ic): Likewise.
4565         * var-tracking.c (vt_add_function_parameters): Likewise.
4566         * varasm.c (make_decl_rtl): Likewise.
4567         (assemble_start_function): Likewise.
4568         (output_constant): Likewise.
4569         (maybe_assemble_visibility): Likewise.
4570         * varpool.c (ctor_for_folding): Likewise.
4571         * chkp-builtins.def: Remove.
4572         * ipa-chkp.c: Remove.
4573         * ipa-chkp.h: Remove.
4574         * rtl-chkp.c: Remove.
4575         * rtl-chkp.h: Remove.
4576         * tree-chkp-opt.c: Remove.
4577         * tree-chkp.c: Remove.
4578         * tree-chkp.h: Remove.
4580 2018-06-07  Carl Love  <cel@us.ibm.com>
4582         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4583         vextract_fp_from_shortl): Add BE support.
4585 2018-06-07  Paul Koning  <ni1d@arrl.net>
4587         * compare-elim.c (try_merge_compare): Don't merge compare if
4588         address contains a side effect.
4589         (try_eliminate_compare): Likewise.
4591 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
4593         * config.gcc: Support "tremont".
4594         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4595         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4596         PROCESSOR_TREMONT.
4597         * config/i386/i386.c (m_TREMONT): Define.
4598         (processor_target_table): Add "tremont".
4599         (PTA_TREMONT): Define.
4600         (ix86_lea_outperforms): Add TARGET_TREMONT.
4601         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4602         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4603         and M_INTEL_GOLDMONT_PLUS.
4604         (fold_builtin_cpu): Add "tremont".
4605         (ix86_add_stmt_cost): Add TARGET_TREMONT.
4606         (ix86_option_override_internal): Add "tremont".
4607         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4608         (processor_type): Add PROCESSOR_TREMONT.
4609         * config/i386/x86-tune.def: Add m_TREMONT.
4610         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4612 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4614         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4615         symbol defined for msp430i* devices to be lower case.
4617         gcc/testsuite/gcc.target/msp430/
4618         * msp430i-device-symbol.c: New test.
4619         * msp430f-device-symbol.c: New test.
4620         * msp430.h: New test header file.
4622 2018-06-07  Richard Biener  <rguenther@suse.de>
4624         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4625         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
4626         Properly wrap signed arithmetic if overflow wraps.
4628 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
4630         PR tree-optimization/69615
4631         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4632         of a cast from a same precision integral SSA_NAME in a bb dominated
4633         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
4634         cast to utype if rhs2 has already a compatible type.
4636 2018-06-07  Richard Biener  <rguenther@suse.de>
4638         PR tree-optimization/85935
4639         * graphite-scop-detection.c (find_params_in_bb): Analyze
4640         condition operands with respect to the correct loop.  Assert
4641         the analysis doesn't fail.
4643 2018-06-04  Carl Love  <cel@us.ibm.com>
4645         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4646         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
4647         as it is slightly cheaper.
4648         (first_match_or_eos_index_<mode>):
4649         Calculate index using natural element order.
4650         (first_match_index_<mode>):
4651         Calculate index using natural element order.
4652         (first_match_or_eos_index_<mode>):
4653         Calculate index using natural order.
4654         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4655         for BE and LE modes.
4656         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4657         P9V_BUILTIN_VCLZLSBB_V16QI.
4658         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4659         specific.
4661 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4663         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4664         indentation and line wrap for many prototypes.  Add missing
4665         @smallexample directives around block of prototypes for vec_xl and
4666         vec_xst.
4668 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
4670         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4671         track if we pass or return IEEE 128-bit floating point.
4672         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4673         C++ mangling that is compatible with GCC 8.1.
4674         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4675         (init_cumulative_args): Note if we pass or return IEEE 128-bit
4676         floating point types.
4677         (rs6000_function_arg_advance_1): Likewise.
4678         (rs6000_mangle_type): Optionally generate mangled names that match
4679         what GCC 8.1 generated for IEEE 128-bit floating point types.
4680         (rs6000_globalize_decl_name): If we have an external function that
4681         passes or returns IEEE 128-bit types, generate a weak reference
4682         from the mangled name used in GCC 8.1 to the current mangled
4683         name.
4684         (rs6000_init_builtins): Make __ibm128 use the long double type if
4685         long double is IBM extended double.  Make __float128 use the long
4686         double type if long double is IEEE 128-bit.
4688         PR target/85657
4689         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4690         macro for __ibm128 built-in functions.
4691         (PACK_IF): Add __ibm128 pack/unpack functions.
4692         (UNPACK_IF): Likewise.
4693         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4694         enable long double built-in functions if long double is IEEE
4695         128-bit floating point.
4696         (rs6000_invalid_builtin): Update long double built-in function
4697         error message.
4698         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4699         functions, adjust the built-in function to use the long double
4700         built-in function if __ibm128 and long double are the same type.
4701         * doc/extend.texi (PowerPC builtins): Update documention for
4702         __builtin_{,un}pack_longdouble.  Add documentation for
4703         __builtin_{,un}pack_ibm128.
4705 2018-06-06  Jim Wilson  <jimw@sifive.com>
4707         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4708         (struct machine_function): New field interrupt_mode.
4709         (riscv_handle_type_attribute): New function.  Add forward declaration.
4710         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4711         (riscv_expand_epilogue): Check interrupt_mode field.
4712         (riscv_set_current_function): Check interrupt attribute args and
4713         set interrupt_mode field.
4714         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4715         (riscv_sret, riscv_uret): New.
4716         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4717         new arguments to interrupt attribute.
4719 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
4721         PR target/63177
4722         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4723         Don't handle -mcpu=power8 if -mpower9-vector is also used.
4725 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4727         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4728         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4729         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4730         several redundant entries.
4732 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
4734         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4735         type from "rtx" to "rtx_insn *".
4736         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4737         for local "call_insn", removing cast.
4738         (ix86_expand_call): Likewise, introducing a "call_insn" local.
4740 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4742         PR tree-optimization/86066
4743         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4744         for BIT_INSERT_EXPR stores.
4746 2018-06-06  Richard Biener  <rguenther@suse.de>
4748         PR tree-optimization/86062
4749         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4750         component refs ontop
4751         of to be offsetted base.
4753 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4755         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4756         to be static and remove check on interrupt attribute name.
4758         gcc/testsuite/gcc.target/msp430/
4759         * function-attributes-4.c: New test.
4760         * static-interrupts.c: New test.
4762 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4764         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4765         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4767 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
4769         PR target/79924
4770         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4771         second argument.
4772         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4773         Remove second argument, change how error is called.
4774         (aarch64_layout_arg): Remove second argument from
4775         aarch64_err_no_fpadvsimd call.
4776         (aarch64_init_cumulative_args): Ditto.
4777         (aarch64_gimplify_va_arg_expr): Ditto.
4778         * config/aarch64/aarch64.md (mov<mode>): Ditto.
4780 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
4782         * config/i386/i386.md (simple_return_indirect_internal): New expander.
4783         (*simple_return_indirect_internal<mode>): Rename from
4784         simple_return_indirect_internal.  Use W mode iterator.
4785         (rstorssp): New expander.
4786         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
4787         (clrssbsy): New expander.
4788         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
4790 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4792         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4793         __typeof__.
4794         (cmse_check_pointed_object): Likewise.
4796 2018-06-05  Martin Liska  <mliska@suse.cz>
4798         PR gcov-profile/47618
4799         * doc/invoke.texi: Document how -fprofile-dir format
4800         is extended.
4802 2018-06-05  Richard Biener  <rguenther@suse.de>
4804         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4805         removal pretend DOM info isn't available so we do not update
4806         it and only remove edges, not dominated blocks.  Actually free
4807         DOM info in case we removed something.  Remove unreachable blocks.
4808         (mfb_keep_latches): Work with either DOM info or marked backedges.
4809         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4810         first.  Mark backedges if DOM info isn't available.
4811         (Re-)compute DOM info after cleanup_control_flow_pre.
4813 2018-06-05  Richard Biener  <rguenther@suse.de>
4815         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4816         (locus_discrim_hasher::hash): Adjust.
4817         (locus_discrim_hasher::equal): Likewise.
4818         (next_discriminator_for_locus): Work on line directly.
4819         (same_line_p): Pass in expanded locus1 as well.
4820         (assign_discriminators): Avoid redundant location expansions.
4822 2018-06-05  Richard Biener  <rguenther@suse.de>
4824         PR tree-optimization/86046
4825         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4826         if required after clearing TREE_ADDRESSABLE.
4828 2018-06-05  Richard Biener  <rguenther@suse.de>
4830         PR tree-optimization/86047
4831         * tree-ssa-loop.c (for_each_index): Glob handling of all
4832         decls and constants and really handle all of them.
4834 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4836         PR target/81497
4837         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4838         qualifier_void_pointer and qualifier_const_void_pointer.
4839         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4840         (arm_init_builtins): Handle the above.
4841         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4842         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4843         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4844         void intrinsics.
4846 2018-06-05  Martin Liska  <mliska@suse.cz>
4848         * auto-profile.c (read_autofdo_file): Do not use
4849         gcov_ctr_summary struct.
4850         (afdo_callsite_hot_enough_for_early_inline): Likewise.
4851         * coverage.c (struct counts_entry): Likewise.
4852         (read_counts_file): Read just single summary entry.
4853         (get_coverage_counts): Use gcov_summary struct.
4854         * coverage.h (get_coverage_counts): Likewise.
4855         * gcov-dump.c (dump_working_sets): Likewise.
4856         (tag_summary): Dump just single summary.
4857         * gcov-io.c (gcov_write_summary): Write just histogram
4858         summary.
4859         (gcov_read_summary): Read just single summary.
4860         (compute_working_sets): Use gcov_summary struct.
4861         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4862         of GCOV_COUNTERS_SUMMABLE.
4863         (GCOV_COUNTERS_SUMMABLE): Remove.
4864         (GCOV_FIRST_VALUE_COUNTER): Replace with
4865         GCOV_COUNTER_V_INTERVAL.
4866         (struct gcov_ctr_summary): Remove.
4867         (struct gcov_summary): Directly use fields of former
4868         gcov_ctr_summary.
4869         (compute_working_sets): Use gcov_summary struct.
4870         * gcov.c (read_count_file): Do not use ctrs fields.
4871         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4872         struct.
4873         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4874         struct.
4875         * profile.c: Likewise.
4876         * profile.h: Likewise.
4878 2018-06-05  Martin Liska  <mliska@suse.cz>
4880         PR gcov-profile/84846
4881         * gcov.c (output_lines): Print working directory only
4882         in intermediate format.
4884 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
4886         * config/s390/s390-builtin-types.def: Add void function type.
4887         * config/s390/s390-builtins.def: Use the function type for the
4888         tbeginc builtin.
4890 2018-06-04  Jim Wilson  <jimw@sifive.com>
4892         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4893         to int.
4894         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4895         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
4896         handle EH_RETURN_DATA_REGNO registers properly.
4897         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4898         (riscv_expand_epilogue): Update comment.  Change argument name and
4899         type.  Update code to use new name and type.  Pass new args to
4900         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
4901         EXCEPTION_RETURN.
4902         * config/riscv/riscv.md (NORMAL_RETURN): New.
4903         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4904         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4905         (eh_return): Call gen_eh_return_internal and emit barrier.
4906         (eh_return_internal): Call riscv_expand_epilogue.
4908 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
4910         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4911         bit_insertion field and declare can_be_merged_into method.
4912         (merged_store_group::can_be_merged_into): New method.
4913         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4914         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
4915         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4917 2018-06-04  Richard Biener  <rguenther@suse.de>
4919         PR tree-optimization/85955
4920         * builtins.c (fold_builtin_sincos): Convert pointers to
4921         destination to appropriate type before dereferencing.
4923 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
4925         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4927 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
4929         * expr.c (expand_expr_real_1): Force the operand into memory if
4930         its TYPE_MODE is BLKmode and if there is no integer mode for
4931         the number of bits being extracted.
4933 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4935         PR target/85832
4936         PR target/86036
4937         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4938         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4940 2018-06-04  Richard Biener  <rguenther@suse.de>
4942         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4943         (cleanup_tree_cfg_noloop): ... single caller.  Do
4944         start_recording_case_labels later.
4946 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
4948         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4949         to _IMMINTRIN_H_INCLUDED.
4950         * config/i386/pconfigintrin.h: Ditto.
4951         * config/i386/waitpkgintrin.h: Ditto.
4952         * config/i386/immintrin.h: Add includes for sgxintrin.h,
4953         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4954         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4955         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4956         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4957         waitpkgintrin.h and cldemoteintrin.h.
4959 2018-06-04  Richard Biener  <rguenther@suse.de>
4961         PR tree-optimization/86038
4962         * tracer.c (find_best_successor): Check probability for
4963         being initialized, bail out if not.
4965 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
4967         PR target/86003
4968         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4969         of bits to ignore when comparing architectures.
4971 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4973         PR tree-optimization/69615
4974         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4975         maximum or minimum of the type, try to merge it also as if
4976         range1 is + [-, x - 1] or + [x + 1, -].
4978         PR c++/86025
4979         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4981 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
4983         PR tree-optimization/86034
4984         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4985         the unsigned bitfield type in a bit insertion sequence if it does not
4986         have a larger precision than the bitfield size.
4987         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4989 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
4991         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4993 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4995         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4996         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4997         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4998         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5000 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5002         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5003         Disable -fdelete-null-pointer-checks for ELF toolchain.
5005 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5006             Kito Cheng  <kito.cheng@gmail.com>
5008         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5009         (nds32le-*-*, nds32be-*-*): Integrate checking process.
5010         (nds32*-*-*): Add glibc and uclibc conditions.
5011         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5012         (TARGET_EXCEPT_UNWIND_INFO): Define.
5013         * config/nds32/elf.h: New file.
5014         * config/nds32/linux.h: New file.
5015         * config/nds32/nds32-elf.opt: New file.
5016         * config/nds32/nds32-linux.opt: New file.
5017         * config/nds32/nds32-fp-as-gp.c
5018         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5019         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5020         TARGET_LINUX_ABI.
5021         (nds32_asm_file_end): Ditto.
5022         (nds32_print_operand): Ditto.
5023         (nds32_insert_attributes): Ditto.
5024         (nds32_init_libfuncs): New function.
5025         (TARGET_HAVE_TLS): Define.
5026         (TARGET_INIT_LIBFUNCS): Define.
5027         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5028         spec content.
5029         (TARGET_ELF): Apply different mcmodel setting.
5030         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5031         been migrated into elf.h and linux.h files.
5032         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5033         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5034         (mcmodel): The content has been migrated into nds32-elf.opt and
5035         nds32-linux.opt files.
5036         * config/nds32/t-elf: New file.
5037         * config/nds32/t-linux: New file.
5039 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5040             Shiva Chen  <shiva0217@gmail.com>
5042         * config/nds32/constants.md (unspec_volatile_element): Add
5043         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5044         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5045         optimization.
5046         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5047         (make_pass_nds32_fp_as_gp): Declare.
5048         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5049         optmization pass.
5050         (nds32_asm_function_end_prologue): Remove unused asm output.
5051         (nds32_asm_function_begin_epilogue): Remove unused asm output.
5052         (nds32_asm_file_start): Output necessary fp_as_gp information.
5053         (nds32_option_override): Adjust register usage.
5054         (nds32_expand_prologue): Consider fp_as_gp situation.
5055         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5056         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5057         (epilogue): Ditto.
5058         (return): Ditto.
5059         (simple_return): Ditto.
5060         (omit_fp_begin): Output special directive for fp_as_gp.
5061         (omit_fp_end): Output special directive for fp_as_gp.
5062         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5063         mforbid-fp-as-gp): New options.
5065 2018-06-01  Mark Wielaard  <mark@klomp.org>
5067         * dwarf2out.c (dwarf2out_finish): Remove generation of
5068         DW_AT_loclists_base.
5070 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5072         * gimple-ssa-store-merging.c: Include gimple-fold.h.
5073         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5074         (struct merged_store_group): Add bit_insertion field.
5075         (dump_char_array): Use standard hexadecimal format.
5076         (merged_store_group::merged_store_group): Set bit_insertion to false.
5077         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
5078         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
5079         also print the mask in the dump file.
5080         (pass_store_merging::gate): Minor tweak.
5081         (imm_store_chain_info::coalesce_immediate): Fix wrong association
5082         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
5083         stores with INTEGER_CST stores.
5084         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5085         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5086         and use it throughout.  Generate bit insertion sequences if need be.
5087         (pass_store_merging::process_store): Remove redundant condition.
5088         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5090 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
5092         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5093         the 128-bit floating point types.  Fix function comment.
5095 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5097         * config/aarch64/aarch64-simd.md
5098         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5099         mnemonics.
5100         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5101         mnemonics.
5103 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5105         PR tree-optimization/85989
5106         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5107         variable.
5108         (backprop::intersect_uses): Check it when deciding whether this
5109         is a backedge reference.
5110         (backprop::process_block): Add each phi to m_visited_phis
5111         after visiting it, then clear it at the end.
5113 2018-06-01  Richard Biener  <rguenther@suse.de>
5115         * tree-vectorizer.h (vect_dr_stmt): New function.
5116         (vect_get_load_cost): Adjust.
5117         (vect_get_store_cost): Likewise.
5118         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5119         Use vect_dr_stmt instead of DR_SMTT.
5120         (vect_record_base_alignments): Likewise.
5121         (vect_calculate_target_alignment): Likewise.
5122         (vect_compute_data_ref_alignment): Likewise and make static.
5123         (vect_update_misalignment_for_peel): Likewise.
5124         (vect_verify_datarefs_alignment): Likewise.
5125         (vector_alignment_reachable_p): Likewise.
5126         (vect_get_data_access_cost): Likewise.  Pass down
5127         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5128         (vect_get_peeling_costs_all_drs): Likewise.
5129         (vect_peeling_hash_get_lowest_cost): Likewise.
5130         (vect_enhance_data_refs_alignment): Likewise.
5131         (vect_find_same_alignment_drs): Likewise.
5132         (vect_analyze_data_refs_alignment): Likewise.
5133         (vect_analyze_group_access_1): Likewise.
5134         (vect_analyze_group_access): Likewise.
5135         (vect_analyze_data_ref_access): Likewise.
5136         (vect_analyze_data_ref_accesses): Likewise.
5137         (vect_vfa_segment_size): Likewise.
5138         (vect_small_gap_p): Likewise.
5139         (vectorizable_with_step_bound_p): Likewise.
5140         (vect_prune_runtime_alias_test_list): Likewise.
5141         (vect_analyze_data_refs): Likewise.
5142         (vect_supportable_dr_alignment): Likewise.
5143         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5144         (vect_gen_prolog_loop_niters): Likewise.
5145         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5146         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5147         modify DR_STMT.
5148         (vect_recog_mask_conversion_pattern): Likewise.
5149         (vect_try_gather_scatter_pattern): Likewise.
5150         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5151         to vect_get_store_cost.
5152         (vect_get_store_cost): Get stmt_info instead of DR.
5153         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5154         (vect_get_load_cost): Get stmt_info instead of DR.
5156 2018-06-01  Richard Biener  <rguenther@suse.de>
5158         PR middle-end/86017
5159         * gimple-fold.c (var_decl_component_p): Also allow offsetted
5160         vars wrapped in MEM_REFs.
5162 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5164         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5165         Fix subreg tests so that we only return a choice between
5166         GENERAL_REGS and FP_REGS if the original classes included both.
5168 2018-06-01  Richard Biener  <rguenther@suse.de>
5170         PR ipa/85960
5171         * tree-ssa-structalias.c (get_function_part_constraint):
5172         Handle NULL fi->decl.
5173         (find_func_aliases_for_call): Properly handle indirect
5174         fi from direct call.
5175         (find_func_clobbers): Likewise.
5176         (ipa_pta_execute): Likewise.
5177         (create_variable_info_for): For functions that are ifunc_resolver
5178         resolve to a varinfo that contains the result of the resolver call.
5179         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5180         aliases.
5182 2018-05-31  Michael Collison  <michael.collison@arm.com>
5184         * config/aarch64/aarch64.md:
5185         (*fix_to_zero_extenddfdi2): New pattern.
5186         * gcc.target/aarch64/fix_extend1.c: New testcase.
5188 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
5190         PR middle-end/78809
5191         PR middle-end/83026
5192         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5193         and BUILT_IN_STRNCMP_EQ.
5194         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5195         BUILT_IN_STRNCMP_EQ.
5196         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5197         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5198         (gimple_fold_builtin): Likewise.
5199         * tree-ssa-strlen.c (compute_string_length): New function.
5200         (determine_min_obsize): New function.
5201         (handle_builtin_string_cmp): New function to handle calls to
5202         string compare functions.
5203         (strlen_optimize_stmt): Add handling to builtin string compare
5204         calls.
5205         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5206         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5207         * tree.c (build_common_builtin_nodes): Add new defines of
5208         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5210 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
5212         PR target/85984
5213         * bb-reorder.c (pass_partition_blocks::gate): Return false for
5214         functions with naked attribute.
5216 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5218         * config/i386/sse.md (avx_vec_concat<mode>):
5219         Substitute concat_tg_mode mode attribute with xtg_mode.
5220         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5221         (concat_tg_mode): Remove mode attribute.
5223 2018-05-31  Martin Sebor  <msebor@redhat.com>
5225         PR c/82063
5226         * calls.c (alloc_max_size): Correct a logic error/typo.
5227         Treat excessive arguments as infinite.  Warn for invalid arguments.
5228         * doc/invoke.texi (-Walloc-size-larger-than): Update.
5230 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
5232         PR target/85829
5233         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5234         and movx for Haswell.
5236 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
5237             Cesar Philippidis  <cesar@codesourcery.com>
5239         PR middle-end/85879
5240         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5241         when emitting error on private/firstprivate reductions.
5242         * omp-low.c (lower_omp_target): Avoid reference-type processing
5243         on pointers for firstprivate clause.
5245 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5247         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5248         (st1x2): Likewise.
5249         (st1x3): Likewise.
5250         * config/aarch64/aarch64-simd.md
5251         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5252         (aarch64_ld1_x3_<mode>): Likewise
5253         (aarch64_st1x2<VALLDIF:mode>): Likewise
5254         (aarch64_st1_x2_<mode>): Likewise
5255         (aarch64_st1x3<VALLDIF:mode>): Likewise
5256         (aarch64_st1_x3_<mode>): Likewise
5257         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5258         (vld1_s8_x3): Likewise.
5259         (vld1_u16_x3): Likewise.
5260         (vld1_s16_x3): Likewise.
5261         (vld1_u32_x3): Likewise.
5262         (vld1_s32_x3): Likewise.
5263         (vld1_u64_x3): Likewise.
5264         (vld1_s64_x3): Likewise.
5265         (vld1_f16_x3): Likewise.
5266         (vld1_f32_x3): Likewise.
5267         (vld1_f64_x3): Likewise.
5268         (vld1_p8_x3): Likewise.
5269         (vld1_p16_x3): Likewise.
5270         (vld1_p64_x3): Likewise.
5271         (vld1q_u8_x3): Likewise.
5272         (vld1q_s8_x3): Likewise.
5273         (vld1q_u16_x3): Likewise.
5274         (vld1q_s16_x3): Likewise.
5275         (vld1q_u32_x3): Likewise.
5276         (vld1q_s32_x3): Likewise.
5277         (vld1q_u64_x3): Likewise.
5278         (vld1q_s64_x3): Likewise.
5279         (vld1q_f16_x3): Likewise.
5280         (vld1q_f32_x3): Likewise.
5281         (vld1q_f64_x3): Likewise.
5282         (vld1q_p8_x3): Likewise.
5283         (vld1q_p16_x3): Likewise.
5284         (vld1q_p64_x3): Likewise.
5285         (vst1_s64_x2): Likewise.
5286         (vst1_u64_x2): Likewise.
5287         (vst1_f64_x2): Likewise.
5288         (vst1_s8_x2): Likewise.
5289         (vst1_p8_x2): Likewise.
5290         (vst1_s16_x2): Likewise.
5291         (vst1_p16_x2): Likewise.
5292         (vst1_s32_x2): Likewise.
5293         (vst1_u8_x2): Likewise.
5294         (vst1_u16_x2): Likewise.
5295         (vst1_u32_x2): Likewise.
5296         (vst1_f16_x2): Likewise.
5297         (vst1_f32_x2): Likewise.
5298         (vst1_p64_x2): Likewise.
5299         (vst1q_s8_x2): Likewise.
5300         (vst1q_p8_x2): Likewise.
5301         (vst1q_s16_x2): Likewise.
5302         (vst1q_p16_x2): Likewise.
5303         (vst1q_s32_x2): Likewise.
5304         (vst1q_s64_x2): Likewise.
5305         (vst1q_u8_x2): Likewise.
5306         (vst1q_u16_x2): Likewise.
5307         (vst1q_u32_x2): Likewise.
5308         (vst1q_u64_x2): Likewise.
5309         (vst1q_f16_x2): Likewise.
5310         (vst1q_f32_x2): Likewise.
5311         (vst1q_f64_x2): Likewise.
5312         (vst1q_p64_x2): Likewise.
5313         (vst1_s64_x3): Likewise.
5314         (vst1_u64_x3): Likewise.
5315         (vst1_f64_x3): Likewise.
5316         (vst1_s8_x3): Likewise.
5317         (vst1_p8_x3): Likewise.
5318         (vst1_s16_x3): Likewise.
5319         (vst1_p16_x3): Likewise.
5320         (vst1_s32_x3): Likewise.
5321         (vst1_u8_x3): Likewise.
5322         (vst1_u16_x3): Likewise.
5323         (vst1_u32_x3): Likewise.
5324         (vst1_f16_x3): Likewise.
5325         (vst1_f32_x3): Likewise.
5326         (vst1_p64_x3): Likewise.
5327         (vst1q_s8_x3): Likewise.
5328         (vst1q_p8_x3): Likewise.
5329         (vst1q_s16_x3): Likewise.
5330         (vst1q_p16_x3): Likewise.
5331         (vst1q_s32_x3): Likewise.
5332         (vst1q_s64_x3): Likewise.
5333         (vst1q_u8_x3): Likewise.
5334         (vst1q_u16_x3): Likewise.
5335         (vst1q_u32_x3): Likewise.
5336         (vst1q_u64_x3): Likewise.
5337         (vst1q_f16_x3): Likewise.
5338         (vst1q_f32_x3): Likewise.
5339         (vst1q_f64_x3): Likewise.
5340         (vst1q_p64_x3): Likewise.
5342 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5344         * config/msp430/msp430.c (msp430_output_labelref): Prepend
5345         user_label_prefix to name.
5347         * tree-core.h: Update comment about the format of NAME string
5348         passed to handler in attribute_spec.
5350         * config/msp430/msp430.md: Remove erroneous subreg expression from
5351         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5352         zero_extend{q,h}isi2.
5354 2018-05-30  Borislav Petkov  <bp@suse.de>
5356         * doc/extend.texi: Document some architecture specific
5357         constraints and sort entries.
5359 2018-05-30  Martin Sebor  <msebor@redhat.com>
5361         PR middle-end/85369
5362         * builtins.c (expand_builtin_stpcpy_1): New function.
5363         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5364         only if the former succeeds.
5366 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5368         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5369         in saphira.
5371 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5373         * doc/invoke.texi (-flinker-output): Document
5375 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5377         * passes.c (ipa_write_summaries): Only modify statements if body
5378         is in memory.
5379         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5380         incrementally linking.
5381         (ipa_passes): Likewise.
5382         * lto-cgraph.c (lto_output_node): When incrementally linking do not
5383         pass down resolution info.
5384         * common.opt (flag_incremental_link): Update info.
5385         * gcc.c (plugin specs): Turn flinker-output=* to
5386         -plugin-opt=-linker-output-known
5387         * toplev.c (compile_file): Also cut compilation when doing incremental
5388         link.
5389         * flag-types. (enum lto_partition_model): Add
5390         LTO_LINKER_OUTPUT_NOLTOREL.
5391         (invoke.texi): Add -flinker-output docs.
5392         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5393         link same way as WPA; do not stream in dead initializers.
5395         * dwarf2out.c (dwarf2out_die_ref_for_decl,
5396         darf2out_register_external_decl): Support incremental link.
5398 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5400         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5402 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5404         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5405         it down to simple_object_copy_lto_debug_sections.
5406         (run_gcc): Determine incremental LTO link time and configure
5407         lto1 into non-wpa mode, disable renaming of debug sections.
5409 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5411         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5412         descriptions of various incorrectly documented functions.
5414 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5416         Revert:
5417         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5418         address check not strict.
5420 2018-05-30  Richard Biener  <rguenther@suse.de>
5422         PR tree-optimization/85964
5423         * tracer.c (better_p): Drop initialized count check, we only
5424         call the function with initialized counts now.
5425         (find_best_successor): Do find a best edge if one
5426         has uninitialized count.
5427         (find_best_predecessor): Likewise.  Do BB frequency check only
5428         if count is initialized.
5430 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
5432         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5433         (aarch64_ldrstr_offset_compare): New.
5434         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5435         load/store orderings.
5436         (aarch64_gen_adjusted_ldpstp): Likewise.
5438 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
5440         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5441         Check for subset of GENERAL_REGS and FP_REGS.
5442         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5443         r=w alternative.
5445 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
5447         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5448         and wi::to_poly_offset.  Add the current offset and then check
5449         whether the sum fits, rather than using an unchecked addition of
5450         a checked term.  Check for a shwi rather than a uhwi.
5451         * expr.c (get_bit_range): Use tree_to_poly_uint64.
5452         (store_constructor): Use poly_int_tree_p.
5453         (expand_expr_real_1): Likewise.
5454         * function.c (assign_temp): Likewise.
5455         * fold-const.c (const_binop): Use poly_int_tree_p and
5456         wi::to_poly_offset.
5457         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
5458         division.
5459         * ipa-icf-gimple.c (func_checker::compare_operand): Use
5460         to_poly_offset for MEM offsets.
5461         * ipa-icf.c (sem_variable::equals): Likewise.
5462         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5463         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5464         wi::to_poly_offset for BIT_FIELD_REF offsets.
5465         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5466         wi::to_poly_offset.
5467         * var-tracking.c (emit_note_insn_var_location): Use
5468         tree_to_poly_uint64.
5470 2018-05-29  Jim Wilson  <jimw@sifive.com>
5472         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5474 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
5476         PR target/85950
5477         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5478         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5479         sequence.
5480         (sse4_1_round<mode>2): Use nonimmediate_operand
5481         for operand 1 predicate.
5483 2018-05-29  Martin Sebor  <msebor@redhat.com>
5484             Richard Biener  <rguenther@suse.de>
5486         PR testsuite/85888
5487         * calls.c (get_size_range): Call determine_value_range instead
5488         of get_value_range..
5489         * tree-vrp.h (determine_value_range): Declared new function.
5490         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5492 2018-05-29  Richard Biener  <rguenther@suse.de>
5494         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5495         sure to use non-pattern stmts for get_earlier_stmt arguments.
5496         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5497         called on pattern stmts.
5498         (get_later_stmt): Likewise.
5500 2018-05-29  Martin Liska  <mliska@suse.cz>
5502         PR gcov-profile/85759
5503         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5504         env variables.
5506 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
5508         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5509         VEC_UNPACK_*_EXPR.
5510         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5511         VEC_PACK_*_EXPR.
5513         PR target/85918
5514         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5515         VEC_PACK_FLOAT_EXPR): New tree codes.
5516         * tree-pretty-print.c (op_code_prio): Handle
5517         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5518         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5519         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5520         * tree-inline.c (estimate_operator_cost): Likewise.
5521         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5522         * fold-const.c (const_binop): Likewise.
5523         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5524         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5525         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5526         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5527         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5528         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5529         * expr.c (expand_expr_real_2): Likewise.
5530         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5531         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5532         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5533         optabs.
5534         * optabs.c (expand_widen_pattern_expr): For
5535         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5536         sign from result type rather than operand's type.
5537         (expand_binop_directly): For vec_packu_float_optab and
5538         vec_packs_float_optab allow result type to be different from operand's
5539         type.
5540         * optabs-tree.c (optab_for_tree_code): Handle
5541         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5542         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
5543         * tree-vect-generic.c (expand_vector_operations_1):  Handle
5544         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5545         VEC_PACK_FLOAT_EXPR.
5546         * tree-vect-stmts.c (supportable_widening_operation): Handle
5547         FIX_TRUNC_EXPR.
5548         (supportable_narrowing_operation): Handle FLOAT_EXPR.
5549         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5550         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5551         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
5552         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5553         mode attributes.
5554         (vec_pack<floatprefix>_float_<mode>): New expander.
5555         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5556         attributes.
5557         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5558         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5559         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5560         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5561         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5562         Document.
5563         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5564         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5565         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5566         VEC_PACK_FLOAT_EXPR): Document.
5568 2018-05-29  Richard Biener  <rguenther@suse.de>
5570         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5571         member.
5572         (stmt_vec_info_vec): Make pointer.
5573         (init_stmt_vec_info_vec): Remove.
5574         (free_stmt_vec_info_vec): Likewise.
5575         (set_stmt_vec_info_vec): New function.
5576         (free_stmt_vec_infos): Likewise.
5577         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5578         (set_vinfo_for_stmt): Likewise.
5579         (get_earlier_stmt): Likewise.
5580         (get_later_stmt): Likewise.
5581         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5582         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5583         (vec_info::~vec_info): Free stmt_vec_infos.
5584         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5585         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5586         (pass_slp_vectorize::execute): Likewise.
5587         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5588         (free_stmt_vec_info_vec): Likewise.
5589         (set_stmt_vec_info_vec): New function.
5590         (free_stmt_vec_infos): Likewise.
5591         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5592         the global stmt_vec_info_vec.
5593         * tree-parloops.c (gather_scalar_reductions): Use
5594         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5595         vector.
5597 2018-05-29  Richard Biener  <rguenther@suse.de>
5599         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5601 2018-05-29  Martin Liska  <mliska@suse.cz>
5602             David Malcolm  <dmalcolm@redhat.com>
5604         * vec.c (test_reverse): New.
5605         (vec_c_tests): Add new test.
5606         * vec.h (vl_ptr>::reverse): New function.
5608 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
5610         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5612         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5613         and later.
5615 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5617         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5619 2018-05-28  Richard Biener  <rguenther@suse.de>
5621         PR tree-optimization/85933
5622         * tree-vect-data-refs.c (vect_record_base_alignments): Only
5623         look at stmts marked as vectorizable.
5625 2018-05-28  Richard Biener  <rguenther@suse.de>
5627         PR tree-optimization/85934
5628         * tree-vect-generic.c (expand_vector_operations_1): Hoist
5629         vector boolean check before scalar optimization.
5631 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
5633         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5634         for armv5te.
5636 2018-05-28  Mark Wielaard  <mark@klomp.org>
5638         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5639         if it is an expression containing a minus sign.
5641 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
5643         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5645 2018-05-27  Paul Koning  <ni1d@arrl.net>
5647         * config/pdp11/pdp11.md (truncsihi2): Remove.
5649 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
5650             Chung-Ju Wu  <jasonwucj@gmail.com>
5652         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5653         implementation.
5654         (unaligned_store_dw): Ditto.
5655         * config/nds32/nds32-memory-manipulation.c
5656         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5657         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5658         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5659         (emit_setmem_word_loop): Rename to ...
5660         (emit_setmem_doubleword_loop): ... this.
5661         (nds32_gen_dup_4_byte_to_word_value): New function.
5662         (nds32_gen_dup_8_byte_to_double_word_value): New function.
5663         (nds32_expand_setmem_loop): Refine implementation.
5664         (nds32_expand_setmem_loop_v3m): Ditto.
5665         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5666         pattern.
5668 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5670         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5672 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5674         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5675         (nds32_init_machine_status): Initialize machine->attr_naked_p and
5676         machine->attr_no_prologue_p.
5677         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5678         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5679         (nds32_expand_epilogue): Consider attr_naked_p.
5680         (nds32_expand_epilogue_v3pop): Likewise.
5681         (nds32_can_use_return_insn): Likewise.
5682         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5683         attr_no_prologue_p fields.
5684         * config/nds32/nds32.opt (mret-in-naked-func): New option.
5686 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
5688         PR target/85918
5689         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5690         attributes.
5691         * config/i386/sse.md
5692         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5693         Rename to ...
5694         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5695         ... this.
5696         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5697         Rename to ...
5698         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5699         ... this.
5700         (*<floatsuffix>floatv2div2sf2): Rename to ...
5701         (*float<floatunssuffix>v2div2sf2): ... this.
5702         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5703         (float<floatunssuffix>v2div2sf2_mask): ... this.
5704         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5705         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5706         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5707         to ...
5708         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5709         ... this.
5710         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5711         Rename to ...
5712         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5713         ... this.
5714         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5715         Rename to ...
5716         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5717         ... this.
5718         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5719         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5720         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5721         gen_ufix_truncv8dfv8si2.
5722         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5723         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5724         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5725         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5726         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5727         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5728         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5729         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5731 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5733         PR target/85900
5734         PR target/85345
5735         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5737 2018-05-25  Jim Wilson  <jimw@sifive.com>
5739         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5740         * config/riscv/riscv.c (struct machine_function): Add
5741         interrupt_handler_p and attribute_checked_p fields.
5742         (riscv_attribute_table): Add interrupt.
5743         (riscv_interrupt_type_p): New.
5744         (riscv_save_reg_p): Save extra regs for interrupt handler.
5745         (riscv_use_save_libcall): Return false  for interrupt handler.
5746         (riscv_first_stack_step): Add forward declaration.
5747         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
5748         for interrupt handler with large frame.  Use it for saved reg list.
5749         (riscv_expand_prologue): Move flag_stack_usage_info support to
5750         eliminate duplication.
5751         (riscv_expand_epilogue): Generate mret for interrupt handler.
5752         (riscv_epilogue_uses): New.
5753         (riscv_can_use_return_insn): Return false for interrupt handler.
5754         (riscv_function_ok_for_sibcall): Likewise.
5755         (riscv_set_current_function): Add interrupt handler support.
5756         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5757         * config/riscv/riscv.md (UNSPECV_MRET): New.
5758         (GP_REGNUM): New.
5759         (riscv_frflags, riscv_fsflags): Use tab after opcode.
5760         (riscv_mret): New.
5761         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5763 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5765         PR tree-optimization/85712
5766         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5767         this candidate has already been replaced in-situ by a copy.
5769 2018-05-25  Jason Merrill  <jason@redhat.com>
5771         PR c++/80485 - inline function non-zero address.
5772         * symtab.c (nonzero_address): Check DECL_COMDAT.
5774 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
5776         PR target/83628
5777         * config/alpha/alpha.md (ashlsi3): New insn pattern.
5778         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
5779         extension of SImode operation.  Use const123_operand predicate.
5780         (*saddsi_1): Remove.
5781         (*saddl_se_1): Ditto.
5782         (*ssubsi_1): Ditto.
5783         (*ssubl_se_1): Ditto.
5784         * config/alpha/predicates.md (const123_operand): New predicate.
5785         * config/alpha/constraints.md (P): Use IN_RANGE.
5787 2018-05-25  Richard Biener  <rguenther@suse.de>
5789         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5790         defaulted to true.
5791         (ref_maybe_used_by_stmt_p): Likewise.
5792         (stmt_may_clobber_ref_p): Likewise.
5793         (stmt_may_clobber_ref_p_1): Likewise.
5794         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5795         and pass it along.
5796         (ref_maybe_used_by_stmt_p): Likewise.
5797         (stmt_may_clobber_ref_p): Likewise.
5798         (stmt_may_clobber_ref_p_1): Likewise.
5799         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5800         the alias oracle to disambiguate DRs with stmts DR analysis
5801         couldn't handle.
5802         (vect_analyze_data_refs): Do not give up on not analyzable
5803         DRs for BB vectorization.  Remove code truncating the dataref
5804         vector.
5806 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
5808         PR target/85832
5809         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5810         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
5811         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5813 2018-05-25  Richard Biener  <rguenther@suse.de>
5815         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5816         function, combining stmt data ref gathering and fatal analysis
5817         parts.
5818         (vect_analyze_data_refs): Remove now redudnant code and simplify.
5819         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5820         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5821         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5822         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5824 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5826         PR tree-optimization/85720
5827         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5828         SCC if all partitions are builtins.
5829         (version_loop_by_alias_check): New parameter.  Generate cancelable
5830         runtime alias check if all partitions are builtins.
5831         (distribute_loop): Update call to above function.
5833 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5835         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5836         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5837         (parm_default_def_partition_arg): Ditto.
5838         (set_parm_default_def_partition): Ditto.
5839         (get_parm_default_def_partitions): Ditto and make it static.
5840         (get_undefined_value_partitions): Ditto and make it static.
5841         (remove_ssa_form): Refactor call to init_var_map here.
5842         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5843         computation for loop region.
5844         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5845         (register_default_def): Delete.
5846         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5847         (parm_default_def_partition_arg): Ditto.
5848         (set_parm_default_def_partition): Ditto.
5849         (get_parm_default_def_partitions): Ditto and make it static.
5850         (get_undefined_value_partitions): Ditto and make it static.
5851         (coalesce_with_default, coalesce_with_default): Update comment.
5852         (create_coalesce_list_for_region): New func factored out from
5853         create_outofssa_var_map.
5854         (populate_coalesce_list_for_outofssa): New func factored out from
5855         create_outofssa_var_map and coalesce_ssa_name.
5856         (create_outofssa_var_map): Delete.
5857         (coalesce_ssa_name): Refactor to support live range computation.
5858         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5859         (get_parm_default_def_partitions): Delete.
5860         (get_undefined_value_partitions): Ditto.
5861         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5862         computation for loop region.
5863         (new_tree_live_info, loe_visit_block): Ditto.
5864         (live_worklist, set_var_live_on_entry): Ditto.
5865         (calculate_live_on_exit, verify_live_on_entry): Ditto.
5866         * tree-ssa-live.h (struct _var_map): New fields.
5867         (init_var_map): Change decl.
5868         (region_contains_p): New.
5870 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5872         * tree-ssa-live.h (live_merge_and_clear): Delete.
5874 2018-05-25  Richard Biener  <rguenther@suse.de>
5876         PR c++/85912
5877         * tree-dump.c (dequeue_and_dump): Remove access to removed
5878         operand 2 of a SWITCH_EXPR.
5880 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5882         * doc/sourcebuild.texi (vect_double_cond_arith): Include
5883         multiplication and division.
5884         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5885         (cond_udiv@var{m}, cond_umod@var{m}): Document.
5886         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5887         (cond_udiv_optab, cond_umod_optab): New optabs.
5888         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5889         (IFN_COND_RDIV): New internal functions.
5890         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5891         TRUNC_MOD_EXPR and RDIV_EXPR.
5892         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5893         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5894         New unspecs.
5895         (SVE_INT_BINARY): Include mult.
5896         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5897         (optab, sve_int_op): Handle mult.
5898         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5899         UNSPEC_COND_DIV.
5900         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5901         for SVE_INT_BINARY_SD.
5903 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5905         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5906         (optab, sve_int_op): Handle div and udiv.
5907         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5908         for SVE_INT_BINARY_SD.
5909         (*<optab><mode>3): New insn for the same.
5911 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5913         * tree-vect-patterns.c: Include predict.h.
5914         (vect_recog_divmod_pattern): Restrict check for division support
5915         to when optimizing for size.
5917 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5919         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5920         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5921         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5922         (gimple_match_op::set_op): Likewise.
5923         (gimple_resimplify4): Declare.
5924         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5925         (expr::gen_transform): Likewise.
5926         (decision_tree::gen): Generate a simplification routine for 4 operands.
5927         * gimple-match-head.c (gimple_simplify): Add an overload for
5928         4 operands.  In the top-level function, handle up to 4 call
5929         arguments and call gimple_resimplify4.
5930         (gimple_resimplify4): New function.
5931         (build_call_internal): Pass a fourth operand.
5932         (maybe_push_to_seq): Likewise.
5933         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5934         Fold VEC_COND_EXPRs of an operation and a default value into
5935         an IFN_COND_* function if possible.
5936         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5937         New unspecs.
5938         (SVE_COND_FP_BINARY): Include them.
5939         (optab, sve_fp_op): Handle them.
5940         (SVE_INT_BINARY_REV): New code iterator.
5941         (SVE_COND_FP_BINARY_REV): New int iterator.
5942         (commutative): New int attribute.
5943         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5944         Declare.
5945         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5946         function.
5947         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5948         (*cond_<optab><mode>): New patterns for reversed operands.
5950 2018-05-25  Richard Biener  <rguenther@suse.de>
5952         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5953         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5954         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5955         (STMT_VINFO_GROUPED_ACCESS): Adjust.
5956         * tree-vect-data-refs.c (everywhere): Adjust users.
5957         * tree-vect-loop.c (everywhere): Likewise.
5958         * tree-vect-slp.c (everywhere): Likewise.
5959         * tree-vect-stmts.c (everywhere): Likewise.
5960         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5962 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5964         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5965         Rename to...
5966         (gcc_cv_as_section_exclude): ... this.
5967         Try Solaris as #exclude syntax.
5968         * configure: Regenerate.
5969         * config.in: Regenerate.
5970         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5971         SECTION_EXCLUDE.
5972         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5973         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5975         * varasm.c (default_elf_asm_named_section): Don't check if
5976         HAVE_GAS_SECTION_EXCLUDE is defined.
5978 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5980         * doc/md.texi: Update the documentation of the cond_* optabs
5981         to mention the new final operand.  Fix GET_MODE_NUNITS call.
5982         Describe the scalar case too.
5983         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5984         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5985         instead of 2.
5986         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5987         (get_conditional_internal_fn): Update comment.
5988         * tree-vect-loop.c (vectorizable_reduction): Pass the original
5989         accumulator value as a final argument to conditional functions.
5990         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5991         a define_expand and add an "else" operand.  Assert for now that
5992         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
5993         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5994         (*cond_<optab><mode>): New patterns.
5995         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5996         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5997         (UNSPEC_COND_EOR): Delete.
5998         (optab): Remove associated mappings.
5999         (SVE_INT_BINARY): New code iterator.
6000         (sve_int_op): Remove int attribute and add "minus" to the code
6001         attribute.
6002         (SVE_COND_INT_OP): Delete.
6003         (SVE_COND_FP_OP): Rename to...
6004         (SVE_COND_FP_BINARY): ...this.
6006 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6008         * optabs.c (can_reuse_operands_p): New function.
6009         (maybe_legitimize_operands): Try to reuse the results for
6010         earlier operands.
6012 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6014         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6015         Add {q} suffix to insn mnemonic.
6017 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6019         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6020         (msp430_warn_func_return): New.
6022 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
6024         * fold-const.c (tree_nonzero_bits): New function.
6025         * fold-const.h (tree_nonzero_bits): Likewise.
6026         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6027         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6029 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6031         PR target/85900
6032         PR target/85345
6033         * varasm.c (assemble_alias): Check ifunc_resolver only on
6034         FUNCTION_DECL.
6036 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6038         PR target/85903
6039         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6040         when memory input operand is handled.
6042 2018-05-24  Luis Machado  <luis.machado@linaro.org>
6044         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6045         global.
6046         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6048 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6050         * match.pd: Delay FMA folds until after vectorization.
6052 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6054         PR target/83009
6055         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6056         address check not strict.
6058 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6060         * gimple-match.h (gimple_match_op): New class.
6061         (mprts_hook): Replace parameters with a gimple_match_op *.
6062         (maybe_build_generic_op): Likewise.
6063         (gimple_simplified_result_is_gimple_val): Replace parameters with
6064         a const gimple_match_op *.
6065         (gimple_simplify): Replace code_helper * and tree * parameters with
6066         a gimple_match_op * parameter.
6067         (gimple_resimplify1): Replace code_helper *, tree and tree *
6068         parameters with a gimple_match_op * parameter.
6069         (gimple_resimplify2): Likewise.
6070         (gimple_resimplify3): Likewise.
6071         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6072         parameters with a gimple_match_op * parameter.
6073         * gimple-match-head.c (gimple_simplify): Change prototypes of
6074         auto-generated functions to take a gimple_match_op * instead of
6075         separate code_helper * and tree * parameters.  Make the same
6076         change in the top-level overload and update calls to the
6077         gimple_resimplify routines.  Update calls to the auto-generated
6078         functions and to maybe_push_res_to_seq in the publicly-facing
6079         operation-specific gimple_simplify overloads.
6080         (gimple_match_op::MAX_NUM_OPS): Define.
6081         (gimple_resimplify1): Replace rcode and ops with a single res_op
6082         parameter.  Update call to gimple_simplify.
6083         (gimple_resimplify2): Likewise.
6084         (gimple_resimplify3): Likewise.
6085         (mprts_hook): Replace parameters with a gimple_match_op *.
6086         (maybe_build_generic_op): Likewise.
6087         (build_call_internal): Replace type, nargs and ops with
6088         a gimple_match_op *.
6089         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6090         with a single gimple_match_op *.  Update calls to mprts_hook,
6091         build_call_internal and gimple_simplified_result_is_gimple_val.
6092         Factor out code that is common to the tree_code and combined_fn cases.
6093         * genmatch.c (expr::gen_transform): Replace tem_code and
6094         tem_ops with a gimple_match_op called tem_op.  Update calls
6095         to the gimple_resimplify functions and maybe_push_res_to_seq.
6096         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6097         res_ops.  Update call to the gimple_resimplify functions.
6098         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6099         (decision_tree::gen): Make the functions take a gimple_match_op *
6100         called res_op instead of separate res_code and res_ops parameters.
6101         Update call accordingly.
6102         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6103         and ops with a single res_op parameter.  Update calls to
6104         maybe_build_generic_op and maybe_push_res_to_seq.
6105         (fold_stmt_1): Update calls to gimple_simplify and
6106         replace_stmt_with_simplification.
6107         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6108         and gimple_simplified_result_is_gimple_val.
6109         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6110         gimple_simplify.
6111         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6112         with a gimple_match_op *.
6113         (vn_nary_build_or_lookup): Likewise.  Update call to
6114         vn_nary_build_or_lookup_1.
6115         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6116         gimple_match_op *.  Update calls to the gimple_resimplify routines
6117         and to gimple_simplified_result_is_gimple_val.
6118         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6119         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6120         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6121         (visit_nary_op): Likewise.
6122         (visit_reference_op_load): Likewise.
6124 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6126         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6127         modifier for printing the step amount.
6129 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
6131         PR target/78849
6132         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6133         types.
6135 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
6137         * doc/sourcebuild.texi (Endianness): New subsubsection.
6139 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6141         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6142         <prefetch_dynamic_strides>: New const bool field.
6143         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6144         prefetch_dynamic_strides.
6145         (exynosm1_prefetch_tune): Likewise.
6146         (thunderxt88_prefetch_tune): Likewise.
6147         (thunderx_prefetch_tune): Likewise.
6148         (thunderx2t99_prefetch_tune): Likewise.
6149         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6150         false.
6151         (aarch64_override_options_internal): Update to set
6152         PARAM_PREFETCH_DYNAMIC_STRIDES.
6153         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6154         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6155         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6156         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6157         prefetch-dynamic-strides setting.
6159 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6161         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6162         <minimum_stride>: New const int field.
6163         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6164         minimum_stride field defaulting to -1.
6165         (exynosm1_prefetch_tune): Likewise.
6166         (thunderxt88_prefetch_tune): Likewise.
6167         (thunderx_prefetch_tune): Likewise.
6168         (thunderx2t99_prefetch_tune): Likewise.
6169         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6170         <default_opt_level>: Set to 3.
6171         (aarch64_override_options_internal): Update to set
6172         PARAM_PREFETCH_MINIMUM_STRIDE.
6173         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6174         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6175         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6176         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6177         stride is constant and is below the minimum stride threshold.
6179 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6181         * config/arm/arm-cpus.in (mode26): Delete.
6182         (armv4): Delete mode26 reference.
6183         * config/arm/arm.c (arm_configure_build_target): Delete use of
6184         isa_bit_mode26.
6186 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6188         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6189         New insn pattern.
6190         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6191         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
6192         for non-SSE modes.
6193         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
6194         (floatunsdidf2): Ditto.
6196 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6198         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6199         (fixuns_trunc<mode>si2_avx512f): Ditto.
6200         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6201         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6202         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6204 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6206         PR rtl-optimization/79985
6207         * df-scan.c (df_insn_refs_collect): Remove special case for
6208         global registers and asm statements.
6210 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6212         * extend.texi (Global Register Variables): Rewrite the bullet list.
6213         Note that the register is available for allocation. Note that access
6214         via inline asm must use constraints. Add note about async-signal
6215         handlers. Remove paragraph about automagic register selection.
6217 2018-05-23  Richard Biener  <rguenther@suse.de>
6219         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6220         of fixed offset from memset VN.
6222 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
6224         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6225         first_interp field.
6226         (alloc_cand_and_find_basis): Initialize first_interp field.
6227         (slsr_process_mul): Modify first_interp field.
6228         (slsr_process_add): Likewise.
6229         (slsr_process_cast): Modify first_interp field for each new
6230         interpretation.
6231         (slsr_process_copy): Likewise.
6232         (dump_candidate): Dump first_interp field.
6233         (replace_mult_candidate): Process all interpretations, not just
6234         subsequent ones.
6235         (replace_rhs_if_not_dup): Likewise.
6236         (replace_one_candidate): Likewise.
6238 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
6240         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6241         Add new boolean.
6242         (aarch64_needs_frame_chain): New function.
6243         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6245 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
6247         PR target/84882
6248         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6249         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6250         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6251         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6252         as true for strict-align.
6253         (aarch64_can_inline_p): Perform checks even when callee has no
6254         attributes to check for strict alignment.
6255         * doc/extend.texi (AArch64 Function Attributes): Document
6256         no-strict-align.
6257         * doc/invoke.texi: (AArch64 Options): Likewise.
6259 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
6261         PR tree-optimization/85853
6262         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6263         the handling of the root of the node to...
6264         (vect_slp_analyze_node_operations_1): ...this new function,
6265         and run the whole thing with the child nodes' def types
6266         set according to their SLP node's def type.
6268 2018-05-23  Richard Biener  <rguenther@suse.de>
6270         PR middle-end/85874
6271         * tree-data-ref.c (create_runtime_alias_checks): Defer
6272         and ignore overflow warnings.
6274 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
6276         PR tree-optimization/85822
6277         * tree-vrp.c (is_masked_range_test): Fix handling of negative
6278         constants.
6280 2018-05-23  Richard Biener  <rguenther@suse.de>
6282         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6283         memset constants via native_interpret_expr.
6285 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
6287         PR target/85345
6288         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6289         attribute.
6290         (cgraph_node::create_alias): Likewise.
6291         (cgraph_node::get_availability): Check ifunc_resolver instead
6292         of looking up ifunc attribute.
6293         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6294         * varasm.c (do_assemble_alias): Likewise.
6295         (assemble_alias): Likewise.
6296         (default_binds_local_p_3): Likewise.
6297         * cgraph.h (cgraph_node): Add ifunc_resolver.
6298         (cgraph_node::only_called_directly_or_aliased_p): Return false
6299         for IFUNC resolver.
6300         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6301         attribute.
6302         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6303         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6304         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6305         instead of looking up ifunc attribute.
6307 2018-05-22  Luis Machado  <luis.machado@linaro.org>
6309         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6311 2018-05-22  Martin Sebor  <msebor@redhat.com>
6313         PR middle-end/85359
6314         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6315         only when expasion succeeds.
6316         (expand_builtin_strcmp): Same.
6317         (expand_builtin_strncmp): Same.
6319 2018-05-22  Martin Sebor  <msebor@redhat.com>
6321         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6323 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6324             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6326         * config/aarch64/aarch64-ldpstp.md: Replace uses of
6327         aarch64_mem_pair_operand with memory_operand and delete operand swapping
6328         code.
6329         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6330         Add check for legitimate_address.
6331         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6332         (aarch64_swap_ldrstr_operands): New.
6333         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6334         Define prototype.
6336 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6337             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6339         * config/aarch64/aarch64.md: New patterns to generate stp
6340         and ldp.
6341         (store_pair_sw, store_pair_dw): New patterns to generate stp for
6342         single words and double words.
6343         (load_pair_sw, load_pair_dw): Likewise.
6344         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6345         Delete.
6346         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6347         Delete.
6348         * config/aarch64/aarch64-ldpstp.md: Modify peephole
6349         for different mode ldpstp and add peephole for merged zero stores.
6350         Likewise for loads.
6351         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6352         Add size check.
6353         (aarch64_gen_store_pair): Rename calls to match new patterns.
6354         (aarch64_gen_load_pair): Rename calls to match new patterns.
6355         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6356         (load_pair<DREG:mode><DREG2:mode>): ... This.
6357         (store_pair<mode>): Rename to...
6358         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6359         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6360         New mode iterators.
6361         (V_INT_EQUIV): Handle SImode.
6362         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6363         New predicate.
6365 2018-05-22  Martin Sebor  <msebor@redhat.com>
6367         PR c/85623
6368         * calls.c (maybe_warn_nonstring_arg): Use string length to set
6369         or ajust the presumed bound on an operation to avoid unnecessary
6370         warnings.
6372 2018-05-22  Martin Sebor  <msebor@redhat.com>
6374         PR tree-optimization/85826
6375         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6376         assuming that a DECL necesarily has a constant size.
6378 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
6380         PR middle-end/85862
6381         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6383 2018-05-22  Richard Biener  <rguenther@suse.de>
6385         PR tree-optimization/85834
6386         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6387         non-constant and non-zero memset arguments.
6389 2018-05-22  Martin Liska  <mliska@suse.cz>
6391         PR ipa/85607
6392         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6394 2018-05-22  Richard Biener  <rguenther@suse.de>
6396         PR tree-optimization/85863
6397         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6398         comparisons when vectype is specified.
6399         (vectorizable_condition): Do not specify vectype for
6400         vect_is_simple_cond when SLP vectorizing.
6402 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
6404         PR target/85657
6405         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6406         define __ibm128 as long double.
6407         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6408         as a distinct type when IEEE 128-bit support is enabled.
6409         (init_float128_ieee): Fix up conversions between IFmode and IEEE
6410         128-bit types to use the correct functions.
6411         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6412         convert between 128-bit floating point types that have different
6413         modes but the same representation, instead of using gen_lowpart to
6414         makean alias.
6415         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6416         KFmode.
6417         (IFKF_reg): New attributes to give the register constraints for
6418         IFmode and KFmode.
6419         (extend<mode>tf2_internal): New insns to mark an explicit
6420         conversion between 128-bit floating point types that have a
6421         different mode but share the same representation.
6423 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
6425         PR tree-optimization/85814
6426         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6427         a null return from get_strinfo when unsharing the next
6428         strinfo in the chain.
6430 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6432         PR gcc/84923
6433         * varasm.c (weak_finish): Clean up weak_decls.
6435 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6437         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6438         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6439         UNSPEC_UADALP values.
6440         * config/aarch64/iterators.md (ABAL): New int iterator.
6441         (ABDL2): Likewise.
6442         (ADALP): Likewise.
6443         (sur): Add mappings for the above.
6444         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6445         New define_insn.
6446         (aarch64_<sur>abal<mode>_4): Likewise.
6447         (aarch64_<sur>adalp<mode>_3): Likewise.
6448         (<sur>sadv16qi): New define_expand.
6450 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
6452         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6453         (*movdf_internal): Ditto.
6454         (*rcpsf2_sse): Ditto.
6455         (*rsqrtsf2_sse): Ditto.
6456         (*sqrt<mode>2_sse): Ditto.
6458 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
6460         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6461         eor3q<mode>4.
6462         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6463         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6464         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6465         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6466         vbcaxq_s64): New.
6467         * config/aarch64/arm_neon.h: Likewise.
6468         * config/aarch64/iterators.md (VQ_I): New.
6470 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
6472         * config.gcc: Add arc/t-multilib-linux to tmake_file for
6473         arc*-*-linux*.
6474         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6475         MULTILIB_DIRNAMES
6477 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
6479         * config/nds32/constraints.md (S): New constraint.
6480         * config/nds32/nds32.md (call_internal): Use constraint S.
6481         (call_value_internal): Likewise.
6482         (sibcall_internal): Likewise.
6483         (sibcall_value_internal): Likewise.
6485 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
6486             Chung-Ju Wu  <jasonwucj@gmail.com>
6488         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6489         into consideration.
6491 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
6492             Chung-Ju Wu  <jasonwucj@gmail.com>
6494         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6495         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6496         (nds32_rtx_costs_impl): Simplify.
6497         (nds32_address_cost_impl): Simplify.
6498         (nds32_init_rtx_costs): New function.
6499         (nds32_rtx_costs_speed_prefer): Likewise.
6500         (nds32_rtx_costs_size_prefer): Likewise.
6501         (nds32_address_cost_speed_prefer): Likewise.
6502         (nds32_address_cost_speed_fwprop): Likewise.
6503         (nds32_address_cost_size_prefer): Likewise.
6504         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6505         * config/nds32/nds32.c (nds32_option_override): Use
6506         nds32_init_rtx_costs function.
6508 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
6510         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6511         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6512         (TARGET_PIPELINE_N8): Likewise.
6513         (TARGET_PIPELINE_N10): Likewise.
6514         (TARGET_PIPELINE_N13): Likewise.
6515         (TARGET_PIPELINE_GRAYWOLF): Likewise.
6517 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
6519         * config/nds32/nds32-fpu.md: Update copyright year.
6521 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6523         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6525 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6527         * config/nds32/nds32.c
6528         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6529         * config/nds32/nds32.opt (minline-asm-r15): New option.
6531 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6533         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6534         MASK_HW_ABS.
6535         * config/nds32/nds32.md (abssi2): New pattern.
6537 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
6539         * config/i386/i386.md (rex64namesuffix): New mode attribute.
6540         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6541         Merge insn pattern from sse_cvtsi2ss<round_name> and
6542         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6543         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6544         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6545         using SWI48 mode iterator.
6546         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6547         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6548         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6549         pattern from sse_cvttss2si<round_saeonly_name>
6550         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6551         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6552         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6553         using SWI48 mode iterator.
6554         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6555         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6556         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6557         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6558         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6559         using SWI48 mode iterator.
6560         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6561         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6562         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6563         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6564         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6565         SWI48 mode iterator.
6566         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6567         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6568         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6569         pattern from sse_cvttsd2si<round_saeonly_name>
6570         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6572 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6574         * config/nds32/nds32-md-auxiliary.c
6575         (nds32_valid_smw_lwm_base_p): Refine.
6576         (nds32_output_smw_single_word): Refine.
6577         (nds32_output_smw_double_word): New.
6578         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6580 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6582         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6583         (nds32_output_stack_pop): Refine.
6584         (nds32_expand_unaligned_load): Refine.
6585         (nds32_expand_unaligned_store): Refine.
6587 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6588             Chung-Ju Wu  <jasonwucj@gmail.com>
6590         * config/nds32/constants.md: Add TP_REGNUM constant.
6591         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6592         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6593         UNSPEC_ADD32.
6594         * config/nds32/nds32-doubleword.md: Consider flag_pic.
6595         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6596         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6597         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6598         and PIC code generation.
6599         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6600         code generation.
6601         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6602         optimization.
6603         * config/nds32/nds32.md: Support TLS and PIC.
6604         * config/nds32/nds32.c: Support TLS and PIC.
6605         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6606         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6607         predicate.
6609 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6611         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6612         mode with E_ prefix.
6614 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6615             Chung-Ju Wu  <jasonwucj@gmail.com>
6617         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6618         * config/nds32/nds32-md-auxiliary.c
6619         (symbolic_reference_mentioned_p): New.
6620         (nds32_legitimize_ict_address): New.
6621         (nds32_expand_ict_move): New.
6622         (nds32_indirect_call_referenced_p): New.
6623         (nds32_symbol_binds_local_p): Delete.
6624         (nds32_long_call_p): Modify.
6625         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6626         * config/nds32/nds32-protos.h
6627         (symbolic_reference_mentioned_p): Declare.
6628         (nds32_legitimize_ict_address): Declare.
6629         (nds32_expand_ict_move): Declare.
6630         (nds32_indirect_call_referenced_p): Declare.
6631         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6632         (nds32_relax_group): Use nds32_ict_const_p as condition.
6633         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6634         (nds32_asm_file_start): Output ict_model directive in asm code.
6635         (nds32_legitimate_address_p): Consider indirect call.
6636         (nds32_print_operand): Consider indirect call.
6637         (nds32_print_operand_address): Consider indirect call.
6638         (nds32_insert_attributes): Handle "indirect_call" attribute.
6639         (TARGET_LEGITIMATE_ADDRESS_P): Define.
6640         (TARGET_LEGITIMATE_CONSTANT_P): Define.
6641         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6642         (TARGET_DELEGITIMIZE_ADDRESS): Define.
6643         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6644         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6645         (TARGET_ICT_MODEL_SMALL): Define.
6646         (TARGET_ICT_MODEL_LARGE): Define.
6647         * config/nds32/nds32.md (movsi): Consider ict model.
6648         (call, call_value): Consider ict model.
6649         (sibcall, sibcall_value): Consider ict model.
6650         * config/nds32/nds32.opt (mict-model): New option.
6651         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6652         model.
6654 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
6655             Monk Chiang  <sh.chiang04@gmail.com>
6656             Jim Wilson <jimw@sifive.com>
6658         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6659         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
6660         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6661         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6662         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
6663         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6664         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6665         compute save_libcall_adjustment properly.
6666         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6667         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6668         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6669         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6670         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6671         (ABI_SPEC): Handle mabi=ilp32e.
6672         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6673         (RVE): Add RVE mask.
6674         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6675         <-march>: Add rv32e as an example.
6677 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
6679         PR c++/82899
6680         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6681         (intra_create_variable_infos): Handle C++ constructors.
6683 2018-05-18  Martin Liska  <mliska@suse.cz>
6685         * passes.def: Remove a redundant pass.
6687 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
6689         PR bootstrap/85838
6690         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6692 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6694         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6695         (ARMv4): Update.
6696         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6697         (ARMv6m): Update.
6698         (armv2, armv2a, armv3, armv3m): Delete architectures.
6699         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6700         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6701         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6702         Delete cpus.
6703         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6704         (*mulsidi3adddi): Likewise.
6705         (mulsidi3): Likewise.
6706         (*mulsidi3_nov6): Likewise.
6707         (umulsidi3): Likewise.
6708         (umulsidi3_nov6): Likewise.
6709         (umaddsidi4): Likewise.
6710         (*umulsidi3adddi): Likewise.
6711         (smulsi3_highpart): Likewise.
6712         (*smulsi3_highpart_nov6): Likewise.
6713         (umulsi3_highpart): Likewise.
6714         (*umulsi3_highpart_nov6): Likewise.
6715         * config/arm/arm.h (arm_arch3m): Delete.
6716         * config/arm/arm.c (arm_arch3m): Delete.
6717         (arm_option_override_internal): Update armv3-related comment.
6718         (arm_configure_build_target): Delete use of isa_bit_mode32.
6719         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6720         (arm_rtx_costs_internal): Delete check of arm_arch3m.
6721         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6722         (mulsa3): Likewise.
6723         (mulusa3): Likewise.
6724         * config/arm/arm-protos.h (arm_arch3m): Delete.
6725         * config/arm/arm-tables.opt: Regenerate.
6726         * config/arm/arm-tune.md: Likewise.
6727         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6728         deleted architectures.
6730 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6732         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6733         (armv5t, armv5te): New features.
6734         (ARMv5, ARMv5e): Delete fgroups.
6735         (ARMv5t, ARMv5te): Adjust for above changes.
6736         (ARMv6m): Likewise.
6737         (armv5, armv5e): Delete arches.
6738         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6739         arm_arch5.
6740         (*call_reg_arm): Likewise.
6741         (*call_value_reg_armv5): Likewise.
6742         (*call_value_reg_arm): Likewise.
6743         (*call_symbol): Likewise.
6744         (*call_value_symbol): Likewise.
6745         (*sibcall_insn): Likewise.
6746         (*sibcall_value_insn): Likewise.
6747         (clzsi2): Likewise.
6748         (prefetch): Likewise.
6749         (define_split and define_peephole2 dependent on arm_arch5):
6750         Likewise.
6751         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6752         arm_arch5e.
6753         (TARGET_ARM_QBIT): Likewise.
6754         (TARGET_DSP_MULTIPLY): Likewise.
6755         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6756         (arm_arch5, arm_arch5e): Delete.
6757         (arm_arch5t, arm_arch5te): Declare.
6758         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6759         (arm_arch5t): Declare.
6760         (arm_option_reconfigure_globals): Update for the above.
6761         (arm_options_perform_arch_sanity_checks): Update comment, replace
6762         use of arm_arch5 with arm_arch5t.
6763         (use_return_insn): Likewise.
6764         (arm_emit_call_insn): Likewise.
6765         (output_return_instruction): Likewise.
6766         (arm_final_prescan_insn): Likewise.
6767         (arm_coproc_builtin_available): Likewise.
6768         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6769         arm_arch5e with arm_arch5t and arm_arch5te.
6770         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6771         (arm_arch5t, arm_arch5te): Declare.
6772         * config/arm/arm-tables.opt: Regenerate.
6773         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6774         * config/arm/t-multilib: Likewise.
6775         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6776         instead of arm_arch5.
6777         (*call_reg_thumb1): Likewise.
6778         (*call_value_reg_thumb1_v5): Likewise.
6779         (*call_value_reg_thumb1): Likewise.
6780         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6781         unreachable path.
6782         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6784 2018-05-18  Martin Liska  <mliska@suse.cz>
6786         PR gcov-profile/84846
6787         * doc/gcov.texi: Document -t option of gcov tool.
6789 2018-05-18  Martin Liska  <mliska@suse.cz>
6791         PR gcov-profile/84846
6792         * gcov.c (print_usage): Add new -t option.
6793         (process_args): Handle the option.
6794         (generate_results): Use stdout as output when requested by
6795         the option.
6797 2018-05-18  Martin Liska  <mliska@suse.cz>
6799         PR gcov-profile/84846
6800         * coverage.c (coverage_init): Write PWD to .gcno file.
6801         * doc/gcov.texi: Document how working directory is printed.
6802         * gcov-dump.c (dump_gcov_file): Print PWD.
6803         * gcov.c (output_intermediate_file): Likewise.
6804         (read_graph_file): Read PWD string.
6805         (output_lines): Print PWD.
6807 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6809         PR middle-end/85817
6810         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6811         for retval and return false if all args to phi are zero.
6813 2018-05-18  Richard Biener  <rguenther@suse.de>
6815         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6816         method.
6817         (evrp_dom_walker::before_dom_children): Call it.
6819 2018-05-18  Richard Biener  <rguenther@suse.de>
6821         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6822         results when processing array refs with variable index.
6824 2018-05-18  Toon Moene  <toon@moene.org>
6826         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6827         directly after that of -floop-interchange. Indicate that both
6828         options are enabled by default when specifying -O3.
6830 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6832         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6833         iterator.  Delete separate integer-mode vec_set<mode> expander.
6834         (aarch64_simd_vec_setv2di): Delete.
6835         (vec_setv2di): Delete.
6836         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6837         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
6838         the "w, r" alternative.
6840 2018-05-18  Martin Liska  <mliska@suse.cz>
6842         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6843         * tree-pass.h (make_pass_lower_switch_O0): New function.
6844         * tree-switch-conversion.c (node_has_low_bound): Remove.
6845         (node_has_high_bound): Likewise.
6846         (node_is_bounded): Likewise.
6847         (class pass_lower_switch): Make it a template type and create
6848         two instances.
6849         (pass_lower_switch::execute): Add template argument.
6850         (make_pass_lower_switch): New function.
6851         (make_pass_lower_switch_O0): New function.
6852         (do_jump_if_equal): Remove.
6853         (emit_case_nodes): Simplify to just handle all 3 cases and leave
6854         all the hard work to tree optimization passes.
6856 2018-05-18  Martin Liska  <mliska@suse.cz>
6858         * dbgcnt.c (limit_low): Renamed from limit.
6859         (limit_high): New variable.
6860         (dbg_cnt_is_enabled): Check for upper limit.
6861         (dbg_cnt): Adjust dumping.
6862         (dbg_cnt_set_limit_by_index): Add new argument for high
6863         value.
6864         (dbg_cnt_set_limit_by_name): Likewise.
6865         (dbg_cnt_process_single_pair): Parse new format.
6866         (dbg_cnt_process_opt): Use strtok.
6867         (dbg_cnt_list_all_counters): Remove 'value' and add
6868         'limit_high'.
6869         * doc/invoke.texi: Document changes.
6871 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
6873         * doc/sourcebuild.texi (scalar_all_fma): Document.
6874         * tree.def (FMA_EXPR): Delete.
6875         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6876         * internal-fn.c (ternary_direct): New macro.
6877         (expand_ternary_optab_fn): Likewise.
6878         (direct_ternary_optab_supported_p): Likewise.
6879         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6880         * builtins.c (fold_builtin_fma): Delete.
6881         (fold_builtin_3): Don't call it.
6882         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6883         * expr.c (expand_expr_real_2): Likewise.
6884         * fold-const.c (operand_equal_p): Likewise.
6885         (fold_ternary_loc): Likewise.
6886         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6887         * gimple.c (DEFTREECODE): Likewise.
6888         * gimplify.c (gimplify_expr): Likewise.
6889         * optabs-tree.c (optab_for_tree_code): Likewise.
6890         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6891         * tree-eh.c (operation_could_trap_p): Likewise.
6892         (stmt_could_throw_1_p): Likewise.
6893         * tree-inline.c (estimate_operator_cost): Likewise.
6894         * tree-pretty-print.c (dump_generic_node): Likewise.
6895         (op_code_prio): Likewise.
6896         * tree-ssa-loop-im.c (stmt_cost): Likewise.
6897         * tree-ssa-operands.c (get_expr_operands): Likewise.
6898         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6899         * fold-const-call.h (fold_fma): Delete.
6900         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6901         CFN_FNMA and CFN_FNMS.
6902         (fold_fma): Delete.
6903         * genmatch.c (combined_fn): New enum.
6904         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6905         (commutative_op): New function.
6906         (commutate): Use it.  Handle more than 2 operands.
6907         (dt_operand::gen_gimple_expr): Use commutative_op.
6908         (parser::parse_expr): Allow :c to be used with non-binary
6909         operators if the commutative operand is known.
6910         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6911         CFN_FMS, CFN_FNMA and CFN_FNMS.
6912         (backprop::process_assign_use): Remove FMA_EXPR handling.
6913         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6914         (gen_hsa_fma): New function.
6915         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6916         IFN_FNMA and IFN_FNMS.
6917         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6918         * gimple-fold.h (follow_all_ssa_edges): Declare.
6919         * gimple-fold.c (follow_all_ssa_edges): New function.
6920         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6921         gimple_build interface and use follow_all_ssa_edges to fold the result.
6922         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6923         instead of checking for optabs directly.
6924         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6925         rather than FMA_EXPRs.
6926         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6927         call to IFN_FMA instead of an FMA_EXPR.
6929 2018-05-17  Jim Wilson  <jimw@sifive.com>
6931         * expr.c (do_tablejump): When converting index to Pmode, if we have a
6932         sign extended promoted subreg, and the range does not have the sign bit
6933         set, then do a sign extend.
6935         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6936         test, check for sign extended subreg and/or constant operands, and
6937         do a sign extend in that case.
6939 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
6941         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6942         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6943         Add untyped.
6944         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6945         Change logics_shift_reg to logics_shift_imm.
6946         (thunderx2t99_fp_loadpair_basic): Delete.
6947         (thunderx2t99_fp_storepair_basic): Delete.
6948         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6949         (thunderx2t99_asimd_polynomial): Delete.
6950         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6951         and neon_fp_mul_d_scalar_q.
6952         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6953         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6954         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6955         (thunderx2t99_asimd_lut): Add missing tbl types.
6956         (thunderx2t99_asimd_ext): Delete.
6957         (thunderx2t99_asimd_load1_1_mult): Delete.
6958         (thunderx2t99_asimd_load1_2_mult): Delete.
6959         (thunderx2t99_asimd_load1_ldp): New.
6960         (thunderx2t99_asimd_load1): New.
6961         (thunderx2t99_asimd_load2): Add missing *load2* types.
6962         (thunderx2t99_asimd_load3): New.
6963         (thunderx2t99_asimd_load4): New.
6964         (thunderx2t99_asimd_store1_1_mult): Delete.
6965         (thunderx2t99_asimd_store1_2_mult): Delete.
6966         (thunderx2t99_asimd_store2_mult): Delete.
6967         (thunderx2t99_asimd_store2_onelane): Delete.
6968         (thunderx2t99_asimd_store_stp): New.
6969         (thunderx2t99_asimd_store1): New.
6970         (thunderx2t99_asimd_store2): New.
6971         (thunderx2t99_asimd_store3): New.
6972         (thunderx2t99_asimd_store4): New.
6974 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
6976         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6977         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
6979 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
6980             Segher Boessenkool  <segher@kernel.crashing.org>
6982         PR target/85698
6983         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6984         operand.
6986 2018-05-17  Richard Biener  <rguenther@suse.de>
6988         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6989         for pruning loop and prune defs feeding only already visited PHIs.
6991 2018-05-17  Richard Biener  <rguenther@suse.de>
6993         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6995 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
6996             Richard Biener  <rguenther@suse.de>
6998         PR tree-optimization/85793
6999         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7000         for VMAT_ELEMENTWISE.
7002 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7004         * internal-fn.h (lookup_internal_fn): Declare
7005         * internal-fn.c (lookup_internal_fn): New function.
7006         * gimple.c (gimple_build_call_from_tree): Handle calls to
7007         internal functions.
7008         * gimple-pretty-print.c (dump_gimple_call): Print "." before
7009         internal function names.
7010         * tree-pretty-print.c (dump_generic_node): Likewise.
7011         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7013 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7015         * gimple-fold.h (gimple_build): Make the function forms take
7016         combined_fn rather than built_in_function.
7017         (gimple_simplify): Likewise.
7018         * gimple-match-head.c (gimple_simplify): Likewise.
7019         * gimple-fold.c (gimple_build): Likewise.
7020         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7021         rather than gimple_build_call_internal.
7022         (get_initial_defs_for_reduction): Likewise.
7023         (vect_create_epilog_for_reduction): Likewise.
7024         (vectorizable_live_operation): Likewise.
7026 2018-05-17  Martin Liska  <mliska@suse.cz>
7028         * gimple-ssa-sprintf.c (format_directive): Do not use
7029         space in between 'G_' and '('.
7031 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
7033         PR target/85323
7034         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7035         even if the mask is not all ones.
7037         PR target/85323
7038         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7039         vector.
7040         (ix86_gimple_fold_builtin): Likewise.
7042         PR target/85323
7043         * config/i386/i386.c: Include tree-vector-builder.h.
7044         (ix86_vector_shift_count): New function.
7045         (ix86_fold_builtin): Fold shift builtins by scalar count.
7046         (ix86_gimple_fold_builtin): Likewise.
7048         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7049         _mm512_setzero): New intrinsics.
7051 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
7052             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7054         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7055         code generation for cases where splatting a value is not useful.
7056         * simplify-rtx.c (simplify_ternary_operation): Simplify
7057         vec_merge across a vec_duplicate and a paradoxical subreg forming
7058         a vector mode to a vec_concat.
7060 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
7062         * config.gcc: Support "goldmont-plus".
7063         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7064         "goldmont-plus".
7065         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7066         PROCESSOR_GOLDMONT_PLUS.
7067         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7068         (processor_target_table): Add "goldmont-plus".
7069         (PTA_GOLDMONT_PLUS): Define.
7070         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7071         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7072         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7073         (fold_builtin_cpu): Add "goldmont-plus".
7074         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7075         (ix86_option_override_internal): Add "goldmont-plus".
7076         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7077         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7078         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7079         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7081 2018-05-17  Richard Biener  <rguenther@suse.de>
7083         PR tree-optimization/85757
7084         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7085         remove defs that only feed that PHI from further processing.
7087 2018-05-16  Jim Wilson  <jimw@sifive.com>
7089         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7090         asterisk to name.
7091         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7093 2018-05-16  Mark Wielaard  <mark@klomp.org>
7095         * dwarf2out.c (count_index_strings): New function.
7096         (output_indirect_strings): Call count_index_strings and generate
7097         header for dwarf_version >= 5.
7099 2018-05-16  Mark Wielaard  <mark@klomp.org>
7101         * dwarf2out.c (dwarf_FORM): New function.
7102         (set_indirect_string): Use dwarf_FORM.
7103         (reset_indirect_string): Likewise.
7104         (size_of_die): Likewise.
7105         (value_format): Likewise.
7106         (output_die): Likewise.
7107         (add_skeleton_AT_string): Likewise.
7108         (output_macinfo_op): Likewise.
7109         (index_string): Likewise.
7110         (output_index_string_offset): Likewise.
7111         (output_index_string): Likewise.
7112         (count_index_strings): Likewise.
7114 2018-05-16  Carl Love  <cel@us.ibm.com>
7116         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7117         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7119 2018-05-16  Martin Jambor  <mjambor@suse.cz>
7121         * ipa-prop.c (ipa_free_all_edge_args): Remove.
7122         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7124 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
7126         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7127         (fnma<mode>4): Likewise.
7128         (fms<mode>4): Likewise.
7129         (fnms<mode>4): Likewise.
7130         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7131         (aarch64_fnma<mode>4): Likewise.
7132         (aarch64_fms<mode>4): Likewise.
7133         (aarch64_fnms<mode>4): Likewise.
7134         (aarch64_fnmadd<mode>4): Likewise.
7136 2018-05-16  Jason Merrill  <jason@redhat.com>
7138         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
7140 2018-05-16  Richard Biener  <rguenther@suse.de>
7142         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7143         (dump_stmt_cost): Declare.
7144         (add_stmt_cost): Dump cost we add.
7145         (add_stmt_costs): New function.
7146         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7147         No longer exported.
7148         (vect_analyze_stmt): Adjust prototype.
7149         (vectorizable_condition): Likewise.
7150         (vectorizable_live_operation): Likewise.
7151         (vectorizable_reduction): Likewise.
7152         (vectorizable_induction): Likewise.
7153         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7154         cost vector to pass to vectorizable_ and record afterwards.
7155         (vect_model_reduction_cost): Take cost vector argument and adjust.
7156         (vect_model_induction_cost): Likewise.
7157         (vectorizable_reduction): Likewise.
7158         (vectorizable_induction): Likewise.
7159         (vectorizable_live_operation): Likewise.
7160         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7161         SLP_TREE_NUMBER_OF_VEC_STMTS.
7162         (vect_analyze_slp_cost_1): Remove.
7163         (vect_analyze_slp_cost): Likewise.
7164         (vect_slp_analyze_node_operations): Take visited args and
7165         a target cost vector.  Avoid processing already visited stmt sets.
7166         (vect_slp_analyze_operations): Use a local cost vector to gather
7167         costs and register those of non-discarded instances.
7168         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7169         (vect_schedule_slp_instance): Remove copying of
7170         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
7171         zero.
7172         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7173         adding cost.  Record cost entry location.
7174         (vect_prologue_cost_for_slp_op): Function to compute cost of
7175         a constant or invariant generated for SLP vect in the prologue,
7176         split out from vect_analyze_slp_cost_1.
7177         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
7178         (vect_model_promotion_demotion_cost): Likewise.
7179         (vect_model_store_cost): Likewise, make static.
7180         (vect_model_load_cost): Likewise.
7181         (vectorizable_bswap): Add cost vector arg and adjust.
7182         (vectorizable_call): Likewise.
7183         (vectorizable_simd_clone_call): Likewise.
7184         (vectorizable_conversion): Likewise.
7185         (vectorizable_assignment): Likewise.
7186         (vectorizable_shift): Likewise.
7187         (vectorizable_operation): Likewise.
7188         (vectorizable_store): Likewise.
7189         (vectorizable_load): Likewise.
7190         (vectorizable_condition): Likewise.
7191         (vectorizable_comparison): Likewise.
7192         (can_vectorize_live_stmts): Likewise.
7193         (vect_analyze_stmt): Likewise.
7194         (vect_transform_stmt): Adjust calls to vectorizable_*.
7195         * tree-vectorizer.c: Include gimple-pretty-print.h.
7196         (dump_stmt_cost): New function.
7198 2018-05-16  Richard Biener  <rguenther@suse.de>
7200         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7201         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7202         * tree-ssa-dse.c: Include tree-ssa-loop.h.
7203         (check_name): New callback.
7204         (dse_classify_store): Track cycles via a visited bitmap of PHI
7205         defs and simplify handling of in-loop and across loop dead stores
7206         and properly fail for loop-variant refs.  Handle byte-tracking with
7207         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7208         limiting the walk.
7210 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
7212         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7213         (vect_get_mask_type_for_stmt): Likewise.
7214         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7215         split out from...
7216         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
7217         to determine the statement's vector type and the vector type that
7218         should be used for calculating nunits.  Deal with cases in which
7219         the type has to be deferred.
7220         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7221         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7222         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7223         (vect_determine_vf_for_stmt): New functions, split out from...
7224         (vect_determine_vectorization_factor): ...here.
7225         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7226         (vect_get_mask_type_for_stmt): New functions, split out from
7227         vect_determine_vectorization_factor.
7229 2018-05-16  Richard Biener  <rguenther@suse.de>
7231         * tree-cfg.c (verify_gimple_assign_ternary): Properly
7232         verify the [VEC_]COND_EXPR embedded comparison.
7234 2018-05-15  Martin Sebor  <msebor@redhat.com>
7236         PR tree-optimization/85753
7237         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7238         RECORD_TYPE in addition to ARRAY_TYPE.
7240 2018-05-15  Martin Sebor  <msebor@redhat.com>
7242         PR middle-end/85643
7243         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7245 2018-05-15  Richard Biener  <rguenther@suse.de>
7247         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7248         add by_clobber_p one.  Change algorithm to collect all defs
7249         representing uses we need to walk and try reducing them to
7250         a single one before failing.
7251         (dse_dom_walker::dse_optimize_stmt): Adjust.
7253 2018-05-13  Mark Wielaard  <mark@klomp.org>
7255         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7256         (size_of_loc_descr): Likewise.
7257         (output_loc_operands): Likewise.
7258         (output_loc_operands_raw): Likewise.
7259         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7260         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7261         (hash_loc_operands): Likewise.
7262         (compare_loc_operands): Likewise.
7264 2018-05-14  Mark Wielaard  <mark@klomp.org>
7266         * dwarf2out.c (count_index_addrs): New function.
7267         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7269 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7271         PR tree-optimization/83648
7272         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7273         return value as malloc candidate.
7275 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7277         PR ipa/85734
7278         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7279         param as true in call to suggest_attribute.
7281 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
7283         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7284         -mreadonly-in-sdata.
7286 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7288         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7289         New pattern.
7290         (aarch64_crypto_aesd_fused): Likewise.
7292 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
7294         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7295         (movsi_aarch64): Likewise.
7296         (load_pairsi): Likewise.
7297         (load_pairdi): Likewise.
7298         (store_pairsi): Likewise.
7299         (store_pairdi): Likewise.
7300         (load_pairsf): Likewise.
7301         (load_pairdf): Likewise.
7302         (store_pairsf): Likewise.
7303         (store_pairdf): Likewise.
7304         (zero_extend): Likewise.
7305         (trunc): Swap alternatives.
7306         (fcvt_target): Add '?' to prefer w over r.
7308 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
7310         PR target/85756
7311         * config/i386/i386.md: Disallow non-commutative arithmetics in
7312         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7313         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
7314         in the peephole2 before it.
7316 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
7318         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7319         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7320         (ix86_handle_option): Handle -mcldemote.
7321         * config.gcc: New header.
7322         * config/i386/cldemoteintrin.h: New file.
7323         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7324         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7325         -mcldemote.
7326         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7327         OPTION_MASK_ISA_CLDEMOTE.
7328         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7329         (ix86_valid_target_attribute_inner_p): Ditto.
7330         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7331         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7332         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7333         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7334         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7335         (cldemote): New.
7336         * config/i386/i386.opt: Add -mcldemote.
7337         * config/i386/x86intrin.h: New header.
7338         * doc/invoke.texi: Add -mcldemote.
7340 2018-05-14  Richard Biener  <rguenther@suse.de>
7342         * doc/match-and-simplify.texi: Adjust :s documentation.
7344 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
7346         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7347         intended memcpy size.
7348         (REORDER_45): Likewise.
7350 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
7352         * sort.cc: New file.
7353         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7354         * vec.c (qsort_chk): Use gcc_qsort.
7355         * Makefile.in (OBJS-libcommon): Add sort.o.
7356         (build/sort.o): New target.  Use it...
7357         (BUILD_RTL): ... here, and...
7358         (build/gencfn-macros): ... here, and...
7359         (build/genmatch): ... here.
7361 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7362             Chung-Ju Wu  <jasonwucj@gmail.com>
7364         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7365         * config/nds32/nds32-graywolf.md: New file.
7366         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7367         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7368         pipeline.
7369         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7370         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7371         * config/nds32/nds32.md (pipeline_model): Add graywolf.
7372         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7373         * config/nds32/pipelines.md: Include n15 settings.
7375 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7376             Chung-Ju Wu  <jasonwucj@gmail.com>
7378         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7379         * config/nds32/nds32-n13.md: New file.
7380         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7381         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7382         pipeline.
7383         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7384         * config/nds32/nds32.md (pipeline_model): Add n13.
7385         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7386         * config/nds32/pipelines.md: Include n13 settings.
7388 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7389             Chung-Ju Wu  <jasonwucj@gmail.com>
7391         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7392         * config/nds32/nds32-n10.md: New file.
7393         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7394         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7395         pipeline.
7396         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7397         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7398         * config/nds32/nds32.md (pipeline_model): Add n10.
7399         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7400         * config/nds32/pipelines.md: Include n10 settings.
7402 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
7403             Kito Cheng  <kito.cheng@gmail.com>
7404             Chung-Ju Wu  <jasonwucj@gmail.com>
7406         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7407         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7408         Add enum values for DSP extension instructions.
7409         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7410         New constraints.
7411         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7412         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7413         New code iterators.
7414         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7415         * config/nds32/nds32-dspext.md: New file for DSP implementation.
7416         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7417         * config/nds32/nds32-intrinsic.md: Likewise.
7418         * config/nds32/nds32_intrinsic.h: Likewise.
7419         * config/nds32/nds32-md-auxiliary.c: Likewise.
7420         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7421         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7422         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7423         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7424         * config/nds32/nds32-protos.h: New declarations for DSP extension.
7425         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7426         TYPE_DMAC in switch statement.
7427         * config/nds32/nds32.c: New checking and implementation for DSP
7428         extension instructions.
7429         * config/nds32/nds32.h: Likewise.
7430         * config/nds32/nds32.md: Likewise.
7431         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7432         * config/nds32/predicates.md: Implement new predicates for DSP
7433         extension.
7435 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
7437         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7438         Reformat alternatives and attributes so it is easier to identify
7439         which constraints/attributes go with which instruction.
7440         (mov<mode>_hardfloat32, FMOVE64): Likewise.
7441         (mov<mode>_softfloat32, FMOVE64): Likewise.
7442         (mov<mode>_hardfloat64, FMOVE64): Likewise.
7443         (mov<mode>_softfloat64, FMOVE64): Likewise.
7445 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7447         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7448         subsection.
7449         (Basic PowerPC Built-in Functions): The new name of the
7450         subsection previously known as "PowerPC Built-in Functions".
7451         (Basic PowerPC Built-in Functions Available on all Configurations):
7452         New subsubsection.
7453         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7454         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7455         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7456         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7458 2018-05-11  Martin Jambor  <mjambor@suse.cz>
7460         PR ipa/85655
7461         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7462         single const.
7464 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
7466         PR target/85733
7467         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7469 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
7471         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7472         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7473         (ix86_handle_option): Handle -mwaitpkg.
7474         * config.gcc: New header.
7475         * config/i386/cpuid.h (bit_WAITPKG): New bit.
7476         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7477         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7478         function type.
7479         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7480         OPTION_MASK_ISA_WAITPKG.
7481         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7482         (ix86_option_override_internal): Add PTA_WAITPKG.
7483         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7484         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7485         IX86_BUILTIN_TPAUSE.
7486         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7487         __builtin_ia32_umwait and __builtin_ia32_tpause.
7488         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7489         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7490         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7491         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7492         UNSPECV_TPAUSE): New.
7493         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7494         * config/i386/i386.opt: Add -mwaitpkg.
7495         * config/i386/waitpkgintrin.h: New file.
7496         * config/i386/x86intrin.h: New header.
7497         * doc/invoke.texi: Add -mwaitpkg.
7499 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
7501         PR target/85606
7502         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7503         equivalent.
7504         (cortex-m0): Use armv6s-m isa.
7505         (cortex-m0plus): Likewise.
7506         (cortex-m1): Likewise.
7507         (cortex-m0.small-multiply): Likewise.
7508         (cortex-m0plus.small-multiply): Likewise.
7509         (cortex-m1.small-multiply): Likewise.
7511 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
7512             Jakub Jelinek  <jakub@redhat.com>
7514         PR tree-optimization/85692
7515         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7516         source permute as well.
7518 2018-05-11  Martin Liska  <mliska@suse.cz>
7520         PR sanitizer/85556
7521         * doc/extend.texi: Document LLVM style format for no_sanitize
7522         attribute.
7524 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
7526         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7527         mode_supports_vsx_dform_quad to mode_supports_dq_form.
7528         (mode_supports_vsx_dform_quad): Likewise.
7529         (mode_supports_vmx_dform): Move these functions to be next to the
7530         other mode_supports functions.
7531         (mode_supports_dq_form): Likewise.
7532         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7533         mode_supports_dq_form.
7534         (reg_offset_addressing_ok_p): Likewise.
7535         (offsettable_ok_by_alignment): Likewise.
7536         (rs6000_legitimate_offset_address_p): Likewise.
7537         (legitimate_lo_sum_address_p): Likewise.
7538         (rs6000_legitimize_address): Likewise.
7539         (rs6000_legitimize_reload_address): Likewise.
7540         (rs6000_secondary_reload_inner): Likewise.
7541         (rs6000_preferred_reload_class): Likewise.
7542         (rs6000_output_move_128bit): Likewise.
7544 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7546         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7547         Generate SImode target register for null target.
7548         <case IX86_BUILTIN_XGETBV>: Ditto.
7549         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7550         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7552 2018-05-10  Carl Love  <cel@us.ibm.com>
7554         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7555         dcbtt and dcbtstt if operands[2] is 0.
7557 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7559         PR target/85693
7560         * config/i386/sse.md (usadv64qi): New expander.
7562 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
7564         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7565         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7566         -maltivec=be support.
7567         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7568         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7569         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7570         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7571         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7572         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7573         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7574         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7575         altivec_vsumsws): Adjust.
7576         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7577         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7578         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7579         support.
7580         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7581         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7582         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7583         (altivec_lve<VI_char>x): Delete expand.
7584         (*altivec_lve<VI_char>x_internal): Rename to...
7585         (altivec_lve<VI_char>x): ... this.
7586         (altivec_lvxl_<mode>): Delete expand.
7587         (*altivec_lvxl_<mode>_internal): Rename to ...
7588         (altivec_lvxl_<mode>): ... this.
7589         (altivec_stvxl_<mode>): Delete expand.
7590         (*altivec_stvxl_<mode>_internal): Rename to ...
7591         (altivec_stvxl_<mode>): ... this.
7592         (altivec_stve<VI_char>x): Delete expand.
7593         (*altivec_stve<VI_char>x_internal): Rename to ...
7594         (altivec_stve<VI_char>x): ... this.
7595         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7596         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7597         reduc_plus_scal_<mode>): Adjust.
7598         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7599         comment.
7600         (rs6000_cpu_cpp_builtins): Adjust.
7601         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7602         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7603         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7604         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7605         -maltivec=be support.
7606         (rs6000_split_vec_extract_var): Adjust.
7607         (rs6000_split_v4si_init): Adjust.
7608         (swap_selector_for_mode): Delete.
7609         (altivec_expand_lvx_be, altivec_expand_stvx_be,
7610         altivec_expand_stvex_be): Delete.
7611         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7612         -maltivec=be support.
7613         (rs6000_gimple_fold_builtin): Ditto.
7614         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7615         Adjust.
7616         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7617         (TARGET_DIRECT_MOVE_64BIT): Adjust.
7618         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7619         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7620         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7621         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7622         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7623         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7624         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7625         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7626         anonymous split): Adjust.
7627         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7628         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7630 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
7632         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7633         when --with-gxx-include-dir is also specified.
7634         * configure: Regenerate.
7636 2018-05-09  Jim Wilson  <jimw@sifive.com>
7638         PR target/84797
7639         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7640         * config/riscv/t-withmultilib: New.
7641         * config/riscv/withmultilib.h: New.
7642         * doc/install.texi: Document RISC-V --with-multilib-list support.
7644 2018-05-09  Richard Biener  <rguenther@suse.de>
7646         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7647         vector.
7648         (vect_bb_vectorization_profitable_p): Adjust.  Compute
7649         actual scalar cost using the cost vector and the add_stmt_cost
7650         machinery.
7652 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7654         PR rtl-optimization/85645
7655         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7656         in the REG_CFA_REGISTER note for LR, don't leave it empty.
7658 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7660         PR rtl-optimization/85645
7661         * shrink-wrap.c (spread_components): Return a boolean saying if
7662         anything was changed.
7663         (try_shrink_wrapping_separate): Iterate spread_components until
7664         nothing changes anymore.
7666 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7668         PR rtl-optimization/85645
7669         * regrename.c (build_def_use): Also kill the chains that include the
7670         destination of a REG_CFA_REGISTER note.
7672 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7674         PR rtl-optimization/85645
7675         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7676         insn that has a REG_CFA_REGISTER note.
7678 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
7680         * cfgexpand.c (expand_clobber): New function.
7681         (expand_gimple_stmt_1): Use it.
7682         * tree-vect-stmts.c (vect_clobber_variable): New function,
7683         split out from...
7684         (vectorizable_simd_clone_call): ...here.
7685         (vectorizable_store): Emit a clobber either side of an
7686         IFN_STORE_LANES sequence.
7687         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7689 2018-05-09  Tom de Vries  <tom@codesourcery.com>
7691         PR target/85626
7692         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7693         (define_insn "trap_if_false"): Add exit after trap.
7695 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
7697         PR rtl-optimization/85638
7698         * bb-reorder.c: Include common/common-target.h.
7699         (create_forwarder_block): New function extracted from...
7700         (fix_up_crossing_landing_pad): ...here.  Rename into...
7701         (dw2_fix_up_crossing_landing_pad): ...this.
7702         (sjlj_fix_up_crossing_landing_pad): New function.
7703         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7704         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7705         from both partitions and exit the loop after one iteration.
7707 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7709         Revert:
7710         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7711         subsection.
7712         (Basic PowerPC Built-in Functions): The new name of the
7713         subsection previously known as "PowerPC Built-in Functions".
7714         (Basic PowerPC Built-in Functions Available on all Configurations):
7715         New subsubsection.
7716         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7717         subsubsection.
7718         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7719         subsubsection.
7720         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7721         subsubsection.
7722         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7723         subsubsection.
7725 2018-05-08  Jim Wilson  <jimw@sifive.com>
7727         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7728         (LD_EMUL_SUFFIX): New.
7729         (LINK_SPEC): Use it.
7731 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7733         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7734         subsection.
7735         (Basic PowerPC Built-in Functions): The new name of the
7736         subsection previously known as "PowerPC Built-in Functions".
7737         (Basic PowerPC Built-in Functions Available on all Configurations):
7738         New subsubsection.
7739         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7740         subsubsection.
7741         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7742         subsubsection.
7743         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7744         subsubsection.
7745         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7746         subsubsection.
7748 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7750         PR target/85683
7751         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7752         after cmpelim optimization.
7754 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
7756         * config.gcc: Support "goldmont".
7757         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7758         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7759         PROCESSOR_GOLDMONT.
7760         * config/i386/i386.c (m_GOLDMONT): Define.
7761         (processor_target_table): Add "goldmont".
7762         (PTA_GOLDMONT): Define.
7763         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7764         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7765         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7766         (fold_builtin_cpu): Add "goldmont".
7767         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7768         (ix86_option_override_internal): Add "goldmont".
7769         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7770         (processor_type): Add PROCESSOR_GOLDMONT.
7771         * config/i386/i386.md: Add CPU "glm".
7772         * config/i386/glm.md: New file.
7773         * config/i386/x86-tune.def: Add m_GOLDMONT.
7774         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7776 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7778         PR target/85572
7779         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7780         E_V4DImode.
7781         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7782         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
7783         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
7785         PR target/85317
7786         * config/i386/i386.c (ix86_fold_builtin): Handle
7787         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7789         PR target/85480
7790         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7791         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7793 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
7795         PR target/85658
7796         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7797         (check_arch): Likewise.
7798         (check_fpu): Return the result rather than printing it.
7799         (end arch): Fix operator precedence.
7800         (end cpu): Likewise.
7801         (END): Print the result from check_fpu.
7803 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7804             Alan Hayward  <alan.hayward@arm.com>
7805             David Sherwood  <david.sherwood@arm.com>
7807         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7808         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7809         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7810         (*fcmuo<mode>_and): New patterns.
7812 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7814         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7815         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7816         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7817         (cmp_op, sve_imm_con): New code attributes.
7818         (SVE_COND_INT_CMP, imm_con): Delete.
7819         (cmp_op): Remove above unspecs from int attribute.
7820         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7821         to...
7822         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
7823         comparison-specific unspecs.
7824         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7825         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7826         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7827         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7828         (*vec_fcm<cmp_op><mode>): Rename to...
7829         (*fcm<cmp_op><mode>): ...this and adjust likewise.
7830         (*vec_fcmuo<mode>): Rename to...
7831         (*fcmuo<mode>): ...this and adjust likewise.
7832         (*pred_fcm<cmp_op><mode>): New pattern.
7833         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7834         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7835         functions.
7836         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7837         and UNORDERED.
7838         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7839         (aarch64_emit_sve_predicated_cond): New function.
7840         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7841         (aarch64_emit_unspec_cond_or): Replace with...
7842         (aarch64_emit_sve_or_conds): ...this new function.  Use
7843         aarch64_emit_sve_ptrue_op for the individual comparisons and
7844         aarch64_emit_binop to OR them together.
7845         (aarch64_emit_inverted_unspec_cond): Replace with...
7846         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
7847         aarch64_emit_sve_ptrue_op for the comparison and
7848         aarch64_emit_unop to invert the result.
7849         (aarch64_expand_sve_vec_cmp_float): Update after the above
7850         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
7852 2018-05-07  Nathan Sidwell  <nathan@acm.org>
7854         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7855         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7856         (Backwards Compatibility): Likewise.
7858 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7860         PR bootstrap/85681
7861         Revert:
7862         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7864         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7865         <prefetch_dynamic_strides>: New const bool field.
7866         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7867         prefetch_dynamic_strides.
7868         (exynosm1_prefetch_tune): Likewise.
7869         (thunderxt88_prefetch_tune): Likewise.
7870         (thunderx_prefetch_tune): Likewise.
7871         (thunderx2t99_prefetch_tune): Likewise.
7872         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7873         to false.
7874         (aarch64_override_options_internal): Update to set
7875         PARAM_PREFETCH_DYNAMIC_STRIDES.
7876         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7877         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7878         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7879         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7880         prefetch-dynamic-strides setting.
7882         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7884         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7885         <minimum_stride>: New const int field.
7886         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7887         minimum_stride field.
7888         (exynosm1_prefetch_tune): Likewise.
7889         (thunderxt88_prefetch_tune): Likewise.
7890         (thunderx_prefetch_tune): Likewise.
7891         (thunderx2t99_prefetch_tune): Likewise.
7892         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7893         (aarch64_override_options_internal): Update to set
7894         PARAM_PREFETCH_MINIMUM_STRIDE.
7895         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7896         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7897         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7898         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7899         stride is constant and is below the minimum stride threshold.
7901 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7903         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7904         to 512.
7906 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7908         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7909         <prefetch_dynamic_strides>: New const bool field.
7910         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7911         prefetch_dynamic_strides.
7912         (exynosm1_prefetch_tune): Likewise.
7913         (thunderxt88_prefetch_tune): Likewise.
7914         (thunderx_prefetch_tune): Likewise.
7915         (thunderx2t99_prefetch_tune): Likewise.
7916         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7917         to false.
7918         (aarch64_override_options_internal): Update to set
7919         PARAM_PREFETCH_DYNAMIC_STRIDES.
7920         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7921         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7922         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7923         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7924         prefetch-dynamic-strides setting.
7926 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7928         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7929         <minimum_stride>: New const int field.
7930         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7931         minimum_stride field.
7932         (exynosm1_prefetch_tune): Likewise.
7933         (thunderxt88_prefetch_tune): Likewise.
7934         (thunderx_prefetch_tune): Likewise.
7935         (thunderx2t99_prefetch_tune): Likewise.
7936         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7937         (aarch64_override_options_internal): Update to set
7938         PARAM_PREFETCH_MINIMUM_STRIDE.
7939         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7940         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7941         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7942         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7943         stride is constant and is below the minimum stride threshold.
7945 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
7947         PR c++/85659
7948         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7949         the type is addressable.  Don't force op into register if it has
7950         BLKmode.
7952 2018-05-05  Roland McGrath  <mcgrathr@google.com>
7954         PR other/77609
7955         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7956         any section for which we don't know a specific type it should have,
7957         regardless of name.  Previously this was done only for the exact
7958         names ".init_array", ".fini_array", and ".preinit_array".
7959         (default_elf_asm_named_section): Add comment about
7960         relationship with default_section_type_flags and SECTION_NOTYPE.
7961         (get_section): Don't consider it a type conflict if one side has
7962         SECTION_NOTYPE and the other doesn't, as long as neither has the
7963         SECTION_BSS et al used in the default_section_type_flags logic.
7965 2018-05-05  Tom de Vries  <tom@codesourcery.com>
7967         PR target/85653
7968         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7969         (workaround_barsyncs): New function.
7970         (nvptx_reorg): Use workaround_barsyncs.
7971         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7972         (define_expand "nvptx_membar_cta"): New define_expand.
7973         (define_insn "*nvptx_membar_cta"): New insn.
7975 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
7977         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7978         To improve optimization opportunities.
7979         * builtin-types.def: The new needed builtin types for the above.
7981 2018-05-04  Richard Biener  <rguenther@suse.de>
7983         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7984         * gimple-ssa-store-merging.c
7985         (imm_store_chain_info::output_merged_store): Remove redundant create,
7986         release split_store vector contents on failure.
7987         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7988         scalar stmt vector on cache hit.
7990 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
7992         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7993         Xilinx FP support.
7994         * config.gcc (powerpc-xilinx-eabi*): Remove.
7995         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7996         support.
7997         (fusion_addis_mem_combo_load): Ditto.
7998         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7999         FP support.
8000         (rs6000_cpu_cpp_builtins): Ditto.
8001         * config/rs6000/rs6000-linux.c
8002         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8003         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8004         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8005         support.
8006         (rs6000_setup_reg_addr_masks): Ditto.
8007         (rs6000_init_hard_regno_mode_ok): Ditto.
8008         (rs6000_option_override_internal): Ditto.
8009         (legitimate_lo_sum_address_p): Ditto.
8010         (rs6000_legitimize_address): Ditto.
8011         (rs6000_legitimize_reload_address): Ditto.
8012         (rs6000_legitimate_address_p): Ditto.
8013         (abi_v4_pass_in_fpr): Ditto.
8014         (setup_incoming_varargs): Ditto.
8015         (rs6000_gimplify_va_arg): Ditto.
8016         (rs6000_split_multireg_move): Ditto.
8017         (rs6000_savres_strategy): Ditto.
8018         (rs6000_emit_prologue_components): Ditto.
8019         (rs6000_emit_epilogue_components): Ditto.
8020         (rs6000_emit_prologue): Ditto.
8021         (rs6000_emit_epilogue): Ditto.
8022         (rs6000_elf_file_end): Ditto.
8023         (rs6000_function_value): Ditto.
8024         (rs6000_libcall_value): Ditto.
8025         * config/rs6000/rs6000.h: Ditto.
8026         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8027         (TARGET_MINMAX): ... this.  New.
8028         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8029         * config/rs6000/rs6000.md: Remove Xilinx FP support.
8030         (*movsi_internal1_single): Delete.
8031         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8032         mfpu=, mxilinx-fpu): Delete.
8033         * config/rs6000/singlefp.h: Delete.
8034         * config/rs6000/sysv4.h: Remove Xilinx FP support.
8035         * config/rs6000/t-rs6000: Ditto.
8036         * config/rs6000/t-xilinx: Delete.
8037         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
8038         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
8039         (VStype_simple): Delete.
8040         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8041         * config/rs6000/xfpu.h: Delete.
8042         * config/rs6000/xfpu.md: Delete.
8043         * config/rs6000/xilinx.h: Delete.
8044         * config/rs6000/xilinx.opt: Delete.
8045         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8046         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8048 2018-05-04  Tom de Vries  <tom@codesourcery.com>
8050         PR libgomp/85639
8051         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8052         if ignore == 0.
8054 2018-05-04  Richard Biener  <rguenther@suse.de>
8056         PR middle-end/85627
8057         * tree-complex.c (update_complex_assignment): We are always in SSA form.
8058         (expand_complex_div_wide): Likewise.
8059         (expand_complex_operations_1): Likewise.
8060         (expand_complex_libcall): Preserve EH info of the original stmt.
8061         (tree_lower_complex): Handle removed blocks.
8062         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8063         on complex multiplication and division libcall builtins.
8065 2018-05-04  Richard Biener  <rguenther@suse.de>
8067         PR middle-end/85574
8068         * fold-const.c (negate_expr_p): Restrict negation of operand
8069         zero of a division to when we know that can happen without
8070         overflow.
8071         (fold_negate_expr_1): Likewise.
8073 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
8075         PR libstdc++/85466
8076         * real.h (real_nextafter): Declare.
8077         * real.c (real_nextafter): New function.
8078         * fold-const-call.c (fold_const_nextafter): New function.
8079         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8080         CASE_CFN_NEXTTOWARD.
8081         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8082         even when arg1_mode is different from arg0_mode.
8084 2018-05-03  Nathan Sidwell  <nathan@acm.org>
8086         * doc/extend.texi (Deprecated Features): Remove
8087         -ffriend-injection.
8088         (Backwards Compatibility): Likewise.
8089         * doc/invoke.texi (C++ Language Options): Likewise.
8090         (C++ Dialect Options): Likewise.
8092 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
8094         PR target/85530
8095         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8096         _mm512_mask_mullox_epi64): New intrinsics.
8098 2018-05-03  Tom de Vries  <tom@codesourcery.com>
8100         PR testsuite/85106
8101         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8102         dump files): Add offload-tree.
8104 2018-05-03  Richard Biener  <rguenther@suse.de>
8106         PR tree-optimization/85615
8107         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8108         to loops not nested in BBs loop father to avoid creating multi-entry
8109         loops.
8111 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8113         PR tree-optimization/70291
8114         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8115         arguments.  Change return type to tree.  Emit libcall as a new
8116         statement rather than replacing existing one when inplace_p is true.
8117         (expand_complex_multiplication_components): New function.
8118         (expand_complex_multiplication): Expand floating-point complex
8119         multiplication using the above.
8120         (expand_complex_division): Rename inner_type parameter to type.
8121         Update expand_complex_libcall call-site.
8122         (expand_complex_operations_1): Update expand_complex_multiplication
8123         and expand_complex_division call-sites.
8125 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8127         PR target/85582
8128         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8129         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8130         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8131         the highest significant bit of the shift count mask is clear.  In
8132         check whether and[sq]i3 is needed verify that all significant bits
8133         of the shift count other than the highest are set.
8135 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8137         PR libgomp/82428
8138         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8139         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8140         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8141         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8142         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8143         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8144         __builtin_goacc_parlevel_size.
8146 2018-05-02  Richard Biener  <rguenther@suse.de>
8148         PR tree-optimization/85597
8149         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8150         do not use split vect_get_vec_defs call but call vect_get_slp_defs
8151         directly.
8153 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8155         PR testsuite/85106
8156         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8157         dump files): Add ltrans-tree.
8159 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8161         PR testsuite/85106
8162         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8163         dump files): Add wpa-ipa.
8165 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
8167         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
8168         powerpc*-*-linux*paired* target.
8169         * config/rs6000/750cl.h: Delete.
8170         * config/rs6000/paired.h: Delete.
8171         * config/rs6000/paired.md: Delete.
8172         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8173         float support.
8174         * config/rs6000/rs6000-builtin.def: Remove paired float support.
8175         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8176         comment.  Remove paired float support.
8177         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8178         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8179         VECTOR_PAIRED.
8180         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8181         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8182         declarations.
8183         * config/rs6000/rs6000.c: Remove paired float support.
8184         (paired_expand_vector_init, paired_expand_vector_move,
8185         paired_emit_vector_compare, paired_emit_vector_cond_expr,
8186         (paired_expand_lv_builtin, paired_expand_stv_builtin,
8187         paired_expand_builtin, paired_expand_predicate_builtin,
8188         paired_init_builtins): Delete.
8189         * config/rs6000/rs6000.h: Remove paired float support.
8190         * config/rs6000/rs6000.md: Remove paired float support.
8191         (move_from_CR_ov_bit): Delete.
8192         * config/rs6000/rs6000.opt (mpaired): Delete.
8193         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8194         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8196 2018-05-02  Richard Biener  <rguenther@suse.de>
8198         PR middle-end/85567
8199         * gimplify.c (gimplify_save_expr): When in SSA form allow
8200         SAVE_EXPRs to compute to SSA vars.
8202 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8204         PR target/85582
8205         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8206         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8207         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8208         clobber operands[2], instead use a new pseudo.  Formatting fixes.
8210 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
8212         PR tree-optimization/85586
8213         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8214         exit early for statements in the same group if the accesses are
8215         not strided.
8217 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8219         PR lto/85451
8220         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8221         error message.
8223 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
8225         PR tree-optimization/85143
8226         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8228 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8230         PR lto/85451
8231         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8232         not found" error message.
8234 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8236         PR other/83786
8237         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8238         * vec.c (test_ordered_remove_if): New function.
8239         (vec_c_tests): Call test_ordered_remove_if.
8240         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8241         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8242         * tree-vect-patterns.c (vect_pattern_recog_1): Use
8243         VEC_ORDERED_REMOVE_IF.
8245 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8247         PR tree-optimization/82665
8248         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8249         pointer subtraction where arguments come from a memchr call.
8251 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
8253         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8254         --push-state --as-needed and --pop-state instead of --as-needed and
8255         --no-as-needed if ld supports it.
8256         * configure: Regenerated.
8258         PR web/85578
8259         * doc/install.texi2html: Replace _002d with - and _002a with * in
8260         generated html files using sed.
8262 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8264         PR c++/85523
8265         * gcc-rich-location.c (blank_line_before_p): New function.
8266         (use_new_line): New function.
8267         (gcc_rich_location::add_fixit_insert_formatted): New function.
8268         * gcc-rich-location.h
8269         (gcc_rich_location::add_fixit_insert_formatted): New function.
8271 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8273         * selftest.c (assert_streq): Rename "expected" and "actual" to
8274         "val1" and "val2".  Extend NULL-handling to cover both inputs
8275         symmetrically, while still requiring both to be non-NULL for a pass.
8276         * selftest.h (assert_streq): Rename "expected" and "actual" to
8277         "val1" and "val2".
8278         (ASSERT_EQ): Likewise.
8279         (ASSERT_EQ_AT): Likewise.
8280         (ASSERT_KNOWN_EQ): Likewise.
8281         (ASSERT_KNOWN_EQ_AT): Likewise.
8282         (ASSERT_NE): Likewise.
8283         (ASSERT_MAYBE_NE): Likewise.
8284         (ASSERT_MAYBE_NE_AT): Likewise.
8285         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
8286         the assertion to pass.
8287         (ASSERT_STREQ_AT): Likewise.
8289 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8291         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8292         interaction with -pie.
8294 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8296         * selftest.h: Fix alphabetization of per-source-file selftest
8297         declarations.
8299 2018-04-30  Jason Merrill  <jason@redhat.com>
8301         PR c++/61982 - dead stores to destroyed objects.
8302         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8303         of clobber.
8305 2018-04-30  Jason Merrill  <jason@redhat.com>
8307         * tree.c (build_clobber): New.
8308         * tree.h: Declare it.
8309         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8311 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8313         * diagnostic-show-locus.c (layout::layout): Update for
8314         location_get_source_line returning a char_span.
8315         (struct char_span): Move to input.h.
8316         (struct correction): Update for fields in char_span becoming
8317         private.
8318         (struct source_line): Update for location_get_source_line
8319         returning a char_span.
8320         (layout::print_line): Likewise.
8321         * edit-context.c (edited_file::print_content): Likewise.
8322         (edited_file::print_diff_hunk): Likewise.
8323         (edited_file::print_run_of_changed_lines): Likewise.
8324         (edited_file::get_num_lines): Likewise.
8325         (edited_line::edited_line): Likewise.
8326         * final.c (asm_show_source): Likewise.
8327         * input.c (location_get_source_line): Convert return type
8328         from const char * to char_span, losing the final "line_len"
8329         param.
8330         (dump_location_info): Update for the above.
8331         (get_substring_ranges_for_loc): Likewise.  Use a char_span
8332         when handling the literal within the line.
8333         (test_reading_source_line): Update for location_get_source_line
8334         returning a char_span.
8335         * input.h (class char_span): Move here from
8336         diagnostic-show-locus.c, converting from a struct to a class.
8337         Make data members private.
8338         (char_span::operator bool): New.
8339         (char_span::length): New.
8340         (char_span::get_buffer): New.
8341         (char_span::operator[]): New.
8342         (char_span::subspan): Make const.
8343         (char_span::xstrdup): New.
8344         (location_get_source_line): Convert return type from const char *
8345         to char_span, losing the final "line_size" param.
8347 2018-04-30  Jan Hubicka  <jh@suse.cz>
8349         * lto-wrapper.c (ltrans_priorities): New static var.
8350         (cmp_priority): New.
8351         (run_gcc): Read priorities and if doing parallel build order
8352         the Makefile by them.
8354 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8356         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8358 2018-04-30  Richard Biener  <rguenther@suse.de>
8360         * tree-cfg.c (verify_address): Remove base argument, add
8361         flag whether to check TREE_ADDRESSABLE and do that.
8362         (verify_expr): Remove.
8363         (verify_types_in_gimple_reference): Add pieces from verify_expr.
8364         (verify_gimple_assign_single): Likewise.
8365         (verify_gimple_switch): Likewise.
8366         (verify_expr_location_1): Dereference tp once.  Add (disabled)
8367         piece from verify_expr.
8368         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8370 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8372         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8374 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8376         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8377         (small_data_pattern): Likewise.
8378         (arc_rewrite_small_data): Likewise.
8379         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8380         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8381         (get_symbol_alignment): New function.
8382         (legitimate_small_data_address_p): Likewise.
8383         (legitimate_scaled_address): Update, call
8384         legitimate_small_data_address_p.
8385         (output_sdata): New static variable.
8386         (arc_print_operand): Update how we handle small data operands.
8387         (arc_print_operand_address): Likewise.
8388         (arc_legitimate_address_p): Update, use
8389         legitimate_small_data_address_p.
8390         (arc_rewrite_small_data_p): Remove.
8391         (arc_rewrite_small_data_1): Likewise.
8392         (arc_rewrite_small_data): Likewise.
8393         (small_data_pattern): Likewise.
8394         (compact_sda_memory_operand): Update to use
8395         legitimate_small_data_address_p and get_symbol_alignment.
8396         (prepare_move_operands): Don't rewite sdata pattern.
8397         (prepare_extend_operands): Remove.
8398         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8399         pattern.
8400         (zero_extendqisi2): Likewise.
8401         (zero_extendhisi2): Likewise.
8402         (extendqihi2): Likewise.
8403         (extendqisi2): Likewise.
8404         (extendhisi2): Likewise.
8405         (addsi3): Likewise.
8406         (subsi3): Likewise.
8407         (andsi3): Likewise.
8408         * config/arc/constraints.md (Usd): Change it to memory constraint.
8410 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8412         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8413         as source of std instructions.
8414         * config/arc/arc.md (movsi_insn): Update pattern predicate to
8415         allow 6-bit constants as source for store instructions.
8416         (movdi_insn): Update instruction pattern to allow 6-bit constants
8417         as source for store instructions.
8419 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8421         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8423 2018-04-30  Nathan Sidwell  <nathan@acm.org>
8424             Sandra Loosemore <sandra@codesourcery.com>
8426         * dumpfile.c (dump_open): Allow '-' for stdout.
8427         * doc/invoke.texi (Developer Options): Document dump filename
8428         determination early.  Document stdin/stdout selection.
8430 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
8432         Microblaze Target: PIC data text relative
8434         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8435         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8436         Add declaration.
8437         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8438         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8439         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8440         New addressing mode for data-text relative position indepenedent code.
8441         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8442         'ADDRESS_SYMBOLIC_TXT_REL'.
8443         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8444         (microblaze_legitimate_pic_operand): Exclude function calls from
8445         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8446         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8447         addresses cases.
8448         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8449         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8450         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8451         for 'address + offset'.
8452         (microblaze_expand_prologue): Add new function prologue call for
8453         'r20' assignation.
8454         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8455         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8456         table in case of TARGET_PIC_DATA_TEXT_REL.
8457         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8458         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8459         Add new macros 'UNSPEC_TEXT',
8460         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8461         + exclude function calls from 'UNSPEC_PLT' in case of data text
8462         relative mode.
8463         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8464         new target hook for generating address diff vector tables in case of
8465         flag_pic.
8466         * doc/tm.texi : Regenerate.
8467         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8468         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8469         of addr diff vector generation.
8470         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8471         target hook definition.
8472         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8473         Add default function for generate_pic_addr_diff_vec -> flag_pic.
8474         * doc/invoke.texi (Add new pic option): Add new microblaze pic
8475         option for data text relative.
8477 2018-04-30  Richard Biener  <rguenther@suse.de>
8479         * tree-chrec.h (evolution_function_is_constant_p): Remove
8480         redundant check.
8481         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8483 2018-04-30  Richard Biener  <rguenther@suse.de>
8485         PR bootstrap/85571
8486         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8488 2018-04-30  Richard Biener  <rguenther@suse.de>
8490         PR tree-optimization/28364
8491         PR tree-optimization/85275
8492         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8493         copying first exit test.
8495 2018-04-28  Mark Wielaard  <mark@klomp.org>
8497         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8498         dwarf_version >= 5.
8499         (dwarf_AT): Handle DW_AT_addr_base.
8500         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8502 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
8504         PR target/84431
8505         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8506         (*ashl<dwi>3_doubleword_mask_1): Ditto.
8507         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8508         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8510 2018-04-28  Richard Biener  <rguenther@suse.de>
8512         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8513         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8514         to reflect use.  Only add interesting stmts.
8516 2018-04-27  Martin Jambor  <mjambor@suse.cz>
8518         PR ipa/85549
8519         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8520         the jump function allows for passing through aggregate values.
8522 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
8524         * input.h (in_system_header_at): Convert from macro to inline
8525         function.
8526         (from_macro_expansion_at): Likewise.
8527         (from_macro_definition_at): Likewise.
8529 2018-04-27  Jeff Law  <law@redhat.com>
8531         * config.gcc: Mark tile* targets as deprecated/obsolete.
8533 2018-04-27  Richard Biener  <rguenther@suse.de>
8535         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8536         fix for ILP32.
8538 2018-04-27  Richard Biener  <rguenther@suse.de>
8540         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8542 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
8544         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8545         with Yd constraint. Set "preferred_for_speed" attribute from
8546         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8547         with Yd constraint.
8548         (*movdi_internal): Ditto.
8549         (movti_interunit splitters): Remove
8550         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8551         (movdi_interunit splitters): Ditto.
8552         * config/i386/constraints.md (Ye): Remove.
8553         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8555 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8557         PR target/85512
8558         * config/aarch64/constraints.md (Usg): Limit to 31.
8559         (Usj): Limit to 63.
8561 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
8563         PR tree-optimization/85529
8564         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8565         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8566         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8567         zero extension or masking of the MSB bit.
8568         (optimize_range_tests): Add FIRST_BB argument, pass it through
8569         to optimize_range_tests_var_bound.
8570         (maybe_optimize_range_tests, reassociate_bb): Adjust
8571         optimize_range_tests callers.
8573 2018-04-26  Richard Biener  <rguenther@suse.de>
8574             Jakub Jelinek  <jakub@redhat.com>
8576         * cgraph.h (symbol_table): Just declare debug method here.
8577         * symtab.c (symbol_table::debug): Define.
8579 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
8581         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8583 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
8585         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8586         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8587         (*movdi_internal): Substitute Yi and Yj constraint with x
8588         and Ym and Yn constraint with y constraint.  Update "isa"
8589         attribute and set "preferred_for_speed" attribute from
8590         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8591         (*movsi_internal): Ditto.
8592         (*movdf_internal): Ditto.
8593         (*movsf_internal): Ditto.
8594         (*zero_extendsidi2): Ditto.
8595         * config/i386/sse.md (vec_set<mode>_0): Ditto.
8596         (sse2_loadld): Ditto.
8597         (*vec_extract<ssevecmodelower>_0): Ditto.
8598         (*vec_extractv4si_0_zext_sse4): Ditto.
8599         (vec_concatv2di): Ditto.
8600         (*vec_dup<mode>): Ditto.
8601         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8602         * config/i386/constraints.md (Yi): Remove.
8603         (Yj): Remove.
8604         (Ym): Remove.
8605         (Yn): Remove.
8607 2018-04-26  Nathan Sidwell  <nathan@acm.org>
8609         * dumpfile.c (dump_open): New.
8610         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8611         (dump_finish): Detect stdio/stderr by value not name.
8613 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
8615         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8617 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8619         PR target/84952
8620         * config/nvptx/nvptx.c (verify_neutering_jumps)
8621         (verify_neutering_labels): New function
8622         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8624 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8626         PR target/84025
8627         * config/nvptx/nvptx.c (needs_neutering_p): New function.
8628         (nvptx_single): Use needs_neutering_p to skip over insns that do not
8629         need neutering.
8631 2018-04-26  Richard Biener <rguenther@suse.de>
8632             Tom de Vries  <tom@codesourcery.com>
8634         PR lto/85422
8635         * lto-streamer-out.c (output_function): Fixup loops if required to match
8636         discovery done in the reader.
8638 2018-04-26  Richard Biener  <rguenther@suse.de>
8640         PR tree-optimization/85116
8641         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8642         have a loop exit from the single latch predecessor.  Remove
8643         case of header with just condition.
8644         (ch_base::copy_headers): Exclude infinite loops from any
8645         processing.
8646         (pass_ch::execute): Record exits.
8648 2018-04-26  Richard Biener  <rguenther@suse.de>
8650         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8651         prologue cost vector and pass it to vect_get_load_cost.
8652         (vect_get_peeling_costs_all_drs): Likewise.
8653         (vect_peeling_hash_get_lowest_cost): Likewise.
8654         (vect_enhance_data_refs_alignment): Likewise.
8656 2018-04-26  Richard Biener  <rguenther@suse.de>
8658         PR middle-end/85450
8659         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8660         checking of integer<->pointer conversions.
8661         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8662         sign-/zero-extending pointer types.
8663         (expand_omp_for_static_chunk): Likewise.
8665 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
8666             Jean Lee  <xiaoyur347@gmail.com>
8668         * config/mips/mips.c (mips_asan_shadow_offset): New function.
8669         (TARGET_ASAN_SHADOW_OFFSET): Define.
8670         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8671         true for -fsanitize=address.
8673 2018-04-25  Mark Wielaard  <mark@klomp.org>
8675         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8676         shorter ones.
8678 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8680         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8681         than "alu", remove explicit "memory" and "imm_disp" attributes.
8682         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8684         PR middle-end/85414
8685         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8686         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8687         gen_lowpart_no_emit.
8689 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
8691         PR target/85473
8692         * config/i386/i386.c (ix86_expand_builtin): Change memory
8693         operand to XI, extend p0 to Pmode.
8694         * config/i386/i386.md: Change unspec volatile and operand
8695         1 mode to XI, change operand 0 mode to P.
8697 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8699         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8700         GET_MODE_MASK before any checking.
8701         (nds32_can_use_bset_p): Likewise.
8702         (nds32_can_use_btgl_p): Likewise.
8704 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8706         * config/nds32/nds32-doubleword.md: New define_split pattern for
8707         illegal register number.
8709 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8711         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8713 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8715         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8717 2018-04-25  Richard Biener  <rguenther@suse.de>
8719         * lto-streamer.h (LTO_major_version): Bump to 8.
8721 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8723         * BASE-VER: Set to 9.0.0.
8725 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
8727         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8728         in __abskf2 and __powikf2.
8730 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8732         PR target/85512
8733         * config/aarch64/constraints.md (Usg, Usj): New constraints.
8734         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8735         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8736         Use the above on operand 2.  Reindent.
8737         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8739 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8741         PR target/85485
8742         * common/config/i386/i386-common.c (ix86_handle_option): Don't
8743         handle OPT_mcet.
8744         * config/i386/i386.opt (mcet): Removed.
8745         * doc/install.texi: Remove -mcet documentation.
8746         * doc/invoke.texi: Likewise.
8748 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8750         PR target/85485
8751         * doc/install.texi: Remove -mcet from bootstrap-cet.
8753 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8755         PR target/85511
8756         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8757         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8758         if TARGET_64BIT.
8760         PR target/85503
8761         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8762         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8763         containing a CONST_VECTOR.
8765 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
8767         * doc/install.texi: Update newlib dependency for nvptx.
8769 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8771         PR target/85508
8772         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8773         instead of INTVAL when shifting x left.
8775 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
8777         PR tree-optimization/85478
8778         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8779         vect_grouped_store_supported for single element vectors.
8781 2018-04-24  Richard Biener  <rguenther@suse.de>
8783         PR target/85491
8784         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8785         load cost increase to the case of non-constant step.
8787 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8789         PR target/84828
8790         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8791         destination if any_malformed_asm.
8793 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8795         PR middle-end/85496
8796         * expr.c (store_field): In the bitfield case, if the value comes from
8797         a function call and is returned in registers by means of a PARALLEL,
8798         do not change the mode of the temporary unless BLKmode and VOIDmode.
8800 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
8802         PR rtl-optimization/85423
8803         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8804         dependencies to debug insns when the previous insn is non-debug.
8806 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8808         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8809         enums into a single definition.
8810         (fls): Fix predicates and printing.
8811         (seti): Likewise.
8813 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8815         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8816         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8817         and short u6 immediate.
8818         (check_if_valid_sleep_operand): Remove.
8819         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8821 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8823         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8824         flag_always_save_lp condition.
8825         * config/nds32/nds32.opt (malways-save-lp): New option.
8827 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8829         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8830         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8831         * config/nds32/nds32.h
8832         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8833         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8835 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8837         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8838         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8840 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8841             Chung-Ju Wu  <jasonwucj@gmail.com>
8843         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8844         Declare.
8845         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8846         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8848 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8850         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8852 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8854         * config/nds32/nds32-protos.h (nds32_data_alignment,
8855         nds32_local_alignment): Declare.
8856         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8857         nds32_local_alignment): New functions.
8858         (TARGET_CONSTANT_ALIGNMENT): Define.
8859         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8861 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8863         * config/nds32/nds32.c
8864         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8865         (TARGET_MODES_TIEABLE_P): Likewise.
8867 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8869         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8870         level Ofast and Og.
8872 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
8873             Chung-Ju Wu  <jasonwucj@gmail.com>
8875         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8876         for unaligned access.
8877         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8878         unaligned access.
8879         * config/nds32/nds32-intrinsic.md: Likewise.
8880         * config/nds32/nds32_intrinsic.h: Likewise.
8881         * config/nds32/nds32.h (nds32_builtins): Likewise.
8882         * config/nds32/nds32.opt (munaligned-access): New option.
8883         * config/nds32/nds32.c (nds32_asm_file_start): Display
8884         flag_unaligned_access status.
8886 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8888         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8889         -mno-relax is present.
8890         * config/riscv/linux.h (LINK_SPEC): Ditto.
8892 2018-04-20  Martin Sebor  <msebor@redhat.com>
8894         PR c/85365
8895         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8896         for null pointers.
8897         (gimple_fold_builtin_stxcpy_chk): Same.
8898         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8900 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
8902         PR target/85456
8903         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8904         __powikf2 when long double is IEEE 128-bit.
8906 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8908         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8909         step to make sure stack always aligned.
8911 2018-04-20  Carl Love  <cel@us.ibm.com>
8913         PR target/83402
8914         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8915         size check for arg0.
8917 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8918             Tom de Vries  <tom@codesourcery.com>
8920         PR target/85445
8921         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8922         Emit insns for calls too.
8923         (nvptx_find_par): Always look for worker-level predecessor insn.
8924         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
8925         calls.
8926         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8927         (nvptx_process_pars): Propagate frames for calls.
8929 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
8931         PR target/85469
8932         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8933         Removed.
8934         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8935         (ix86_handle_option): Don't handle OPT_mibt.
8936         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8937         __SHSTK__.
8938         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8939         has_ibt and ibt.
8940         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8941         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8942         (ix86_target_macros): Define __CET__ with flag_cf_protection
8943         for -fcf-protection.
8944         * config/i386/i386.c (isa2_opts): Remove -mibt.
8945         * config/i386/i386.h (TARGET_IBT): Removed.
8946         (TARGET_IBT_P): Likewise.
8947         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8948         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8949         * config/i386/i386.opt (mcet): Update help message.
8950         (mshstk): Likewise.
8951         (mibt): Removed.
8952         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
8953         -mcet as an alias for -mshstk.
8955 2018-04-20  Richard Biener <rguenther@suse.de>
8957         PR middle-end/85475
8958         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8959         complexity by forcing a single use of the multiply operand.
8961 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8963         ipa/85449
8964         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8965         recursion dependency to only apply to non-clones.
8967 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8969         ipa/85447
8970         * ipa-cp.c (create_specialized_node): Check that clones of
8971         self-recursive edges exist during IPA-CP.
8973 2018-04-19  Toon Moene  <toon@moene.org>
8975         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8976         by -O3.
8978 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8980         PR tree-optimization/85467
8981         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8982         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
8983         VECTOR_CST element to type.
8985 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8987         PR target/85397
8988         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8989         * config/i386/i386.md (builtin_setjmp_setup): Removed.
8990         (builtin_longjmp): Likewise.
8991         (save_stack_nonlocal): New pattern.
8992         (restore_stack_nonlocal): Likewise.
8994 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8996         PR target/85404
8997         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8998         Replace ASM_OUTPUT_LABEL with fprintf.
9000 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9002         PR target/85417
9003         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9004         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9005         * config/i386/i386-c.c (ix86_target_macros_internal): Also
9006         define __IBT__ and __SHSTK__ for -fcf-protection.
9007         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9008         TARGET_IBT.
9009         (ix86_trampoline_init): Likewise.
9010         (x86_output_mi_thunk): Likewise.
9011         (ix86_notrack_prefixed_insn_p): Likewise.
9012         (ix86_option_override_internal): Don't disallow -fcf-protection.
9013         * config/i386/i386.md (rdssp<mode>): Also enable for
9014         -fcf-protection.
9015         (incssp<mode>): Likewise.
9016         (nop_endbr): Likewise.
9017         * config/i386/i386.opt (mcet): Change help message to built-in
9018         functions only.
9019         (mibt): Likewise.
9020         (mshstk): Likewise.
9021         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9022         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
9023         enable CET built-in functions.
9025 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
9027         * common/config/i386/i386-common.c
9028         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9029         OPTION_MASK_ISA_MOVDIRI_UNSET,
9030         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9031         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9032         * config.gcc (movdirintrin.h): New header.
9033         * config/i386/cpuid.h (bit_MOVDIRI,
9034         bit_MOVDIR64B): New bits.
9035         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9036         and -mmvodir64b.
9037         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9038         (VOID, PVOID, PCVOID)): New function types.
9039         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9040         __builtin_ia32_directstoreu_u64,
9041         __builtin_ia32_movdir64b): New builtins.
9042         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9043         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9044         and -mmovdiri.
9045         (ix86_valid_target_attribute_inner_p): Ditto.
9046         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9047         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9048         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9049         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9050         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9051         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9052         (movdiri<mode>, movdir64b_<mode>): New.
9053         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9054         * config/i386/immintrin.h: Include movdirintrin.h.
9055         * config/i386/movdirintrin.h: New file.
9056         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9058 2018-04-19  Richard Biener  <rguenther@suse.de>
9060         PR middle-end/85455
9061         * cfg.c (clear_bb_flags): When loop state says we have
9062         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9064 2018-04-19  Richard Biener  <rguenther@suse.de>
9066         PR tree-optimization/84737
9067         * tree-vect-data-refs.c (vect_copy_ref_info): New function
9068         copying restrict info.
9069         (vect_setup_realignment): Use it.
9070         * tree-vectorizer.h (vect_copy_ref_info): Declare.
9071         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9072         the first DR to all generated stores.
9073         (vectorizable_load): Likewise for loads.
9075 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9077         PR tree-optimization/85446
9078         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9079         the integral and pointer types to have the same precision.
9081         * doc/install.texi: Document --disable-cet being the default and
9082         --enable-cet=auto.
9084 2018-04-18  Martin Liska  <mliska@suse.cz>
9086         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9087         style.
9089 2018-04-18  Martin Liska  <mliska@suse.cz>
9091         Revert
9092         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9094         PR ipa/83983
9095         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9096         arguments if they are comparable.
9098 2018-04-18  Martin Liska  <mliska@suse.cz>
9100         Revert
9101         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9103         PR lto/84805
9104         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9105         incomplete types.
9107 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
9109         PR target/85388
9110         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9111         ENDBR after calling __morestack.
9113 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
9115         PR jit/85384
9116         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9117         by using gcc_base_ver to generate a gcc_driver_version, and use
9118         it when generating GCC_DRIVER_NAME.
9119         * configure: Regenerate.
9121 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
9123         PR target/81084
9124         * config.gcc: Obsolete powerpc*-*-*spe*.
9126 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9128         PR debug/84637
9129         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9130         (stabstr_D): Change type of unum from unsigned int to
9131         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
9132         type.
9134 2018-04-17  Jim Wilson  <jimw@sifive.com>
9136         PR 84856
9137         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9138         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9139         Set arg_pointer_offset after using pretend_args_size.
9141 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9143         PR rtl-optimization/85431
9144         * dse.c (record_store): Ignore zero width stores.
9146         PR sanitizer/85230
9147         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
9148         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9149         __builtin_stack_restore rather than after it.
9150         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9151         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9152         argument instead of virtual_dynamic_stack_rtx.
9154 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9156         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9157         New prototype.
9158         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9159         Add note to error message to explain internal mapping of overloaded
9160         built-in function name to non-overloaded built-in function name.
9161         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9162         function.
9164 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9166         PR target/85424
9167         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9168         where the inputs overlap with the output.
9170 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9172         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9173         (=v, v) alternative and explicit "memory" attribute.
9174         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
9175         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9176         attributes.
9177         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9178         "sselog1" type instead of "sselog".
9179         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9180         "sselog".  Remove explicit "memory" attribute.
9181         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9182         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9183         attributes.
9184         (vec_extract_hi_v32hi): Merge all alternatives into one, use
9185         "sselog1" type instead of "sselog".  Remove explicit "memory"
9186         attribute.
9187         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9188         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9189         attribute.
9190         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9191         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9192         attributes.
9193         (vec_extract_hi_v64qi): Merge all alternatives into one, use
9194         "sselog1" type instead of "sselog".  Remove explicit "memory"
9195         attribute.
9196         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9197         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9198         attribute.
9200         PR target/85430
9201         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9203         PR middle-end/85414
9204         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9205         on a SUBREG.
9207 2018-04-17  Martin Jambor  <mjambor@suse.cz>
9209         PR ipa/85421
9210         * ipa-cp.c (create_specialized_node): Call
9211         expand_all_artificial_thunks if necessary.
9213 2018-04-17  Martin Liska  <mliska@suse.cz>
9215         PR lto/85405
9216         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9217         in message, remote space in between '_G' and '('.
9219 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9221         PR target/85281
9222         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9223         avx512f_vmcmp<mode>3<round_saeonly_name>,
9224         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9225         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9226         avx512f_rndscale<mode><round_saeonly_name>,
9227         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9228         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9229         Use %<iptr>2 instead of %2 for -masm=intel.
9230         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9231         avx512f_vcvttss2usi<round_saeonly_name>,
9232         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9233         -masm=intel.
9234         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9235         avx512f_vcvttsd2usi<round_saeonly_name>,
9236         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9237         Use %q1 instead of %1 for -masm=intel.
9238         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9239         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9240         of %3 for -masm=intel.
9241         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9242         -masm=intel.
9243         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9244         -masm=intel.
9245         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9246         -masm=intel.
9247         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9248         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9249         %g1.
9250         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9251         -masm=intel.
9252         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9253         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9254         %g1 and one with %0 and %1.
9255         (avx512er_vmrcp28<mode><round_saeonly_name>,
9256         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9257         %1 for -masm=intel.
9258         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9259         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9260         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9261         of %0 and %{%4%} for -masm=intel.
9262         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9263         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9264         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9265         order of %0 and %{%5%}%{z%} for -masm=intel.
9267 2018-04-17  Jan Hubicka  <jh@suse.cz>
9269         PR lto/85405
9270         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9272 2018-04-17  Martin Liska  <mliska@suse.cz>
9274         PR ipa/85329
9275         * multiple_target.c (create_dispatcher_calls): Set apostrophes
9276         for target_clone error message.  Make default implementation
9277         clone to be a local declaration.
9278         (separate_attrs): Add new argument and check for an empty
9279         string.
9280         (expand_target_clones): Handle it.
9281         (ipa_target_clone): Make redirection just for target_clones
9282         functions.
9284 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
9285             Tom de Vries  <tom@codesourcery.com>
9287         PR middle-end/84955
9288         * omp-expand.c (expand_oacc_for): Add dummy false branch for
9289         tiled basic blocks without omp continue statements.
9291 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
9293         PR target/83660
9294         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9295         vec_extract expression as having side effects to make sure it gets
9296         a cleanup point.
9298 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
9300         PR target/85403
9301         * config/i386/i386.c (get_builtin_code_for_version): Check
9302         error_mark_node.
9304 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
9306         PR target/84331
9307         * gcc/config.gcc: Support "skylake".
9308         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9309         PROCESSOR_SKYLAKE.
9310         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9311         (processor_target_table): Add "skylake".
9312         (ix86_option_override_internal): Add "skylake".
9313         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9314         PROCESSOR_CANNONLAKE.
9315         (get_builtin_code_for_version): Fix priority for
9316         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9317         PROCESSOR_SKYLAKE-AVX512.
9318         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9319         (processor_type): Add PROCESSOR_SKYLAKE.
9321 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
9322             Jason Merrill  <jason@redhat.com>
9324         PR c++/85112
9325         * convert.c (convert_to_integer_1): Use direct recursion for
9326         enumeral types and types with a precision less than the number
9327         of bits in their mode.
9329 2018-04-16  Julia Koval  <julia.koval@intel.com>
9331         PR target/84413
9332         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9333         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9335 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
9337         PR target/85293
9338         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9339         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9340         and -mno-direct-move.
9342 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
9344         PR target/83402
9345         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9346         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9347         Ensure negative shifts result in {0}.
9349 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
9351         PR rtl-optimization/79916
9352         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9353         regs (if any) to define how to gnerate SD moves when LRA is in
9354         progress.
9356 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
9358         PR rtl-optimization/85393
9359         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9360         * except.c (expand_dw2_landing_pad_for_region): Make static.
9361         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9362         a label and unconditional jump to old_bb, rather than
9363         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9364         basic block.
9366         PR rtl-optimization/85376
9367         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9368         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9369         instead of a specific value.
9371 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9372             Bin Cheng  <bin.cheng@arm.com>
9374         PR tree-optimization/82965
9375         PR tree-optimization/83991
9376         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9377         by_profile_only parameter.
9378         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9379         information if the loop was predicted to iterate too many times.
9380         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9382 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9384         PR lto/71991
9385         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9386         always inline.
9388 2018-04-13  Martin Liska  <mliska@suse.cz>
9389             Jakub Jelinek  <jakub@redhat.com>
9391         PR middle-end/81657
9392         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9393         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9394         * builtins.c (expand_builtin_memory_copy_args): Use
9395         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9396         handle dest_addr == pc_rtx.
9398 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
9400         PR target/85291
9401         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9402         asked to not generate direct moves.
9403         (fix_trunc<mode>si2_stfiwx): Similar.
9404         (fix_trunc<mode>si2_internal): Similar.
9406 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9408         PR debug/83157
9409         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9410         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9411         lookup if dest in some wider mode is known to be const0_rtx and
9412         if so, record permanent equivalence for it to be ZERO_EXTEND of
9413         the narrower mode destination.
9415 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9417         * lto-streamer-out.c (output_function): Revert 259346.
9418         * omp-expand.c (expand_oacc_for): Likewise.
9420 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
9422         PR rtl-optimization/85354
9423         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9424         * sel-sched.c (sel_global_init): ... here.
9426 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
9428         PR target/85238
9429         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9430         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9431         mode for PE-COFF targets.
9432         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9433         (i386_pe_asm_lto_end): Likewise.
9434         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9435         (TARGET_ASM_LTO_END): Likewise.
9436         * config/i386/winnt.c (saved_debug_info_level): New static variable.
9437         (i386_pe_asm_lto_start): New function.
9438         (i386_pe_asm_lto_end): Likewise.
9440 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9441             Richard Biener  <rguenther@suse.de>
9443         PR middle-end/84955
9444         * lto-streamer-out.c (output_function): Fix CFG loop state before
9445         streaming out.
9446         * omp-expand.c (expand_oacc_for): Handle calls to internal
9447         functions like regular functions.
9449 2018-04-12  Richard Biener  <rguenther@suse.de>
9451         PR lto/85371
9452         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9453         for the early LTO debug to properly generate references to it
9454         during DIE emission.  Do not re-use that for the skeleton for
9455         split-dwarf.
9456         (dwarf2out_early_finish): Likewise.
9458 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9460         PR target/85328
9461         * config/i386/sse.md
9462         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9463         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9464         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9465         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9466         and output is a reg, avoid creating invalid lowpart subreg, but
9467         instead split into a 512-bit move.  Don't split if not AVX512VL,
9468         input is xmm16+ reg and output is a mem.
9469         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9470         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9471         xmm16+ reg and output is a mem.
9473 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9475         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9476         also for flag_dwarf2_cfi_asm.
9478 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9480         PR rtl-optimization/85342
9481         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9482         a bool scalar var inside of the loop instead.  Don't try to update
9483         recog_data.operand after failed apply_change_group.
9485 2018-04-12  Tom de Vries  <tom@codesourcery.com>
9487         PR target/85296
9488         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9489         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
9490         array with flexible array member as array without given dimension.
9491         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9492         argument for undefined param to true.
9494 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
9496         PR target/85321
9497         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9498         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9499         from PowerPC section.
9500         * config/rs6000/sysv4.opt (mcall-): Improve help text.
9501         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9502         help text that is too long.
9503         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9504         help text that is too long.
9505         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9506         help text that is too long.
9508 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
9510         * config/alpha/alpha.md (stack_probe_internal): Rename
9511         from "probe_stack".  Update all callers.
9513 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9515         PR rtl-optimization/84566
9516         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9517         sched_macro_fuse_insns.
9519 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9521         PR target/84301
9522         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9523         (compute_block_dependences): ... from here.
9525 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9527         PR tree-optimization/85331
9528         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9529         from int to HOST_WIDE_INT.
9531 2018-04-11  Martin Jambor  <mjambor@suse.cz>
9533         PR ipa/84149
9534         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9535         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9536         not the same as the source val.
9537         (cgraph_edge_brings_value_p): New parameter.
9538         (gather_edges_for_value): Pass destination value to
9539         cgraph_edge_brings_value_p.
9540         (perhaps_add_new_callers): Likewise.
9541         (get_info_about_necessary_edges): Likewise and exclude values brought
9542         only by self-recursive edges.
9543         (create_specialized_node): Redirect only clones of self-calling edges.
9544         (+self_recursive_pass_through_p): New function.
9545         (find_more_scalar_values_for_callers_subset): Use it.
9546         (find_aggregate_values_for_callers_subset): Likewise.
9547         (known_aggs_to_agg_replacement_list): Removed.
9548         (decide_whether_version_node): Re-calculate known constants for all
9549         remaining context clones.
9551 2018-04-11  Richard Biener  <rguenther@suse.de>
9553         PR lto/85339
9554         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9555         from early DWARF output.
9556         (dwarf2out_early_finish): Output line info unconditionally into
9557         early DWARF and add reference to it.
9559 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9561         PR target/85281
9562         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9563         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9564         other than V2DFmode using iptr mode attribute.
9565         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9567 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9569         PR rtl-optimization/84659
9570         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9572 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9574         PR debug/85302
9575         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9576         SIZEP is NULL.
9577         (output_loc_list): Pass address of a dummy size variable even in the
9578         locview handling loop.
9579         (index_location_lists): Add comment on why skip_loc_list_entry can't
9580         call size_of_locs.
9582 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9584         PR target/85261
9585         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9586         into register.
9588 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
9590         PR target/85321
9591         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9592         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9593         and -mstring-compare-inline-limit.
9595 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9597         PR target/85287
9598         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9599         for stack clash protection in a register whenever we need it to be in
9600         a register.
9602 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9604         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9605         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9607 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9609         PR target/85321
9610         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9611         the help text.
9612         (mlong-double-): Ditto.
9613         * config/rs6000/sysv4.opt (msdata=): Ditto.
9614         (mtls-size=): Ditto.
9616 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9618         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9619         erroneous entries for
9620         "vector int vec_ldl (int, long int *)", and
9621         "vector unsigned int vec_ldl (int, unsigned long int *)".
9622         Add comments and entries for
9623         "vector bool char vec_ldl (int, bool char *)",
9624         "vector bool short vec_ldl (int, bool short *)",
9625         "vector bool int vec_ldl (int, bool int *)",
9626         "vector bool long long vec_ldl (int, bool long long *)",
9627         "vector pixel vec_ldl (int, pixel *)",
9628         "vector long long vec_ldl (int, long long *)",
9629         "vector unsigned long long vec_ldl (int, unsigned long long *)".
9630         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9631         type tree bool_long_long_type_node and correct definition of
9632         bool_V2DI_type_node to make reference to this new type tree.
9633         (rs6000_mangle_type): Replace erroneous reference to
9634         bool_long_type_node with bool_long_long_type_node.
9635         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9636         comments to emphasize sign distinctions for char and int types and
9637         replace RS6000_BTI_bool_long constant with
9638         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
9639         use of RS6000_BTI_pixel.
9640         (bool_long_type_node): Remove this macro definition.
9641         (bool_long_long_type_node): New macro definition
9643 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9645         PR rtl-optimization/85300
9646         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9647         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9648         simplify_unary_operation fails.
9650 2018-04-10  Martin Liska  <mliska@suse.cz>
9652         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9653         cgraph_edge and ipa_ref.
9655 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9657         PR target/85177
9658         PR target/85255
9659         * config/i386/sse.md
9660         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9661         computation of the VEC_MERGE selector from mask.
9662         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9663         Fix decoding of the VEC_MERGE selector into mask.
9665 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9667         PR tree-optimization/85286
9668         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9670 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9672         * final.c (final_1): Set insn_last_address as well as
9673         insn_current_address.
9675 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9677         PR target/85173
9678         * explow.c (emit_stack_probe): Call validize_mem on memory location
9679         before passing it to gen_probe_stack.  Create address operand and
9680         legitimize it for the probe_stack_address case.
9682 2018-04-09  Jan Hubicka  <jh@suse.cz>
9684         PR lto/85078
9685         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9686         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9687         * tree.c (free_lang_data_in_type): Fix handling of binfos;
9688         walk basetypes.
9689         (free_lang_data): Rebuild type inheritance graph.
9691 2018-04-09  Martin Sebor  <msebor@redhat.com>
9693         * invoke.texi (-finline-small-functions): Mention other optimization
9694         options.
9695         (-findirect-inlining, -fpartial-inlining): Same.
9696         (-finline-functions-called-once): Same.
9697         (-freorder-blocks-and-partition): Same.
9699 2018-04-09  Jan Hubicka  <jh@suse.cz>
9701         PR rtl/84058
9702         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9703         jumps; choose last target that matches the criteria (i.e.
9704         no partition changes for non-crossing jumps).
9705         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9706         support for redirecting crossing jumps to non-crossing.
9708 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
9710         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9711         also for naked functions.
9713 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
9715         * config/arc/arc.md (add_shift): New pattern.
9716         (add_shift2): Likewise.
9717         (sub_shift): Likewise.
9718         (sub_shift_cmp0_noout): Likewise.
9719         (compare_si_ashiftsi): Likewise.
9720         (xbfu_cmp0_noout): New combine pattern.
9721         (xbfu_cmp0"): Likewise.
9722         (movsi_set_cc_insn): Place the predicable variant first.
9723         (commutative_binary_cmp0_noout): Remove clobber.
9724         (commutative_binary_cmp0): New pattern.
9725         (noncommutative_binary_cmp0): Likewise.
9726         (noncommutative_binary_cmp0_noout): Likewise.
9727         (noncommutative_binary_comparison_result_used): Removed.
9728         (rsub_cmp0): New pattern.
9729         (rsub_cmp0_noout): Likewise.
9730         (extzvsi): Changed, keep only meaningful variants.
9731         (SQH, SEZ): New iterators.
9732         (SQH_postfix): New mode attribute.
9733         (SEZ_prefix): New code attribute.
9734         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9735         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9736         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9737         of numerical value.
9738         (noncommutative_operator): Check the availability of barrel
9739         shifter option.
9741 2018-04-09  Richard Biener  <rguenther@suse.de>
9743         PR tree-optimization/85284
9744         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9745         Only use the niter constraining form of simple_iv when the exit
9746         is always executed.
9748 2018-04-09  Tom de Vries  <tom@codesourcery.com>
9750         PR target/84041
9751         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9752         (define_expand "*memory_barrier"): New define_expand.
9753         (define_insn "memory_barrier"): New insn.
9755 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9757         PR rtl-optimization/80463
9758         PR rtl-optimization/83972
9759         PR rtl-optimization/83480
9761         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9762         correct producer for the insn.
9763         (tidy_control_flow): Fixup seqnos in case of debug insns.
9765 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9767         PR rtl-optimization/83913
9769         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9770         different sched-times when merging exprs.
9772 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9774         PR rtl-optimization/83962
9776         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9777         tidy_fallthru_edge and tidy_control_flow.
9779 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9781         PR rtl-optimization/83530
9783         * sel-sched.c (force_next_insn): New global variable.
9784         (remove_insn_for_debug): When force_next_insn is true, also leave only
9785         next insn in the ready list.
9786         (sel_sched_region): When the region wasn't scheduled, make another pass
9787         over it with force_next_insn set to 1.
9789 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9791         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9792         into tm_file.
9793         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9794         for interrupt control.
9795         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9796         functions for interrupt control.
9797         * config/nds32/nds32-intrinsic.md: Likewise.
9798         * config/nds32/nds32_intrinsic.h: Likewise.
9799         * config/nds32/nds32.h (nds32_builtins): Likewise.
9801 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9803         * config/nds32/nds32.c (nds32_init_machine_status,
9804         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9805         strict_aligned_p field.
9806         (nds32_expand_to_rtl_hook): New function.
9807         (TARGET_EXPAND_TO_RTL_HOOK): Define.
9808         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9810 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9811             Chung-Ju Wu  <jasonwucj@gmail.com>
9813         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9814         * config/nds32/nds32-n7.md: New file.
9815         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9816         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9817         pipeline.
9818         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9819         * config/nds32/nds32.md (pipeline_model): Add n7.
9820         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9821         * config/nds32/pipelines.md: Include n7 settings.
9823 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9824             Chung-Ju Wu  <jasonwucj@gmail.com>
9826         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9827         * config/nds32/nds32-e8.md: New file.
9828         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9829         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9830         pipeline.
9831         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9832         * config/nds32/nds32.md (pipeline_model): Add e8.
9833         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9834         * config/nds32/pipelines.md: Include e8 settings.
9836 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9837             Chung-Ju Wu  <jasonwucj@gmail.com>
9839         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9840         * config/nds32/nds32-n8.md: New file.
9841         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9842         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9843         pipeline.
9844         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9845         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9846         * config/nds32/nds32.md (pipeline_model): Add n8.
9847         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9848         * config/nds32/pipelines.md: Include n8 settings.
9850 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9851             Chung-Ju Wu  <jasonwucj@gmail.com>
9853         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9854         * config/nds32/nds32-n9-2r1w.md: New file.
9855         * config/nds32/nds32-n9-3r2w.md: New file.
9856         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9857         nds32_register_ports): New or modify for cpu n9.
9858         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9859         pipeline.
9860         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9861         * config/nds32/nds32-utils.c: New file.
9862         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9863         TARGET_MUL_SLOW): Define.
9864         * config/nds32/nds32.md (pipeline_model): New attribute.
9865         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9866         New options that support cpu n9.
9867         * config/nds32/pipelines.md: Include n9 settings.
9868         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9870 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9872         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9873         information if necessary.
9874         (output_cond_branch_compare_zero): Likewise.
9875         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9876         (nds32_target_alignment): Refine for alignment.
9877         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9878         (FUNCTION_BOUNDARY): Modify.
9879         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9880         align case.
9881         * config/nds32/nds32.opt (malways-align, malign-functions): New.
9883 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9885         * config/nds32/constants.md (unspec_volatile_element): Add values for
9886         TLB operation and data prefetch.
9887         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9888         functions for TLB operation and data prefetch.
9889         * config/nds32/nds32-intrinsic.md: Likewise.
9890         * config/nds32/nds32_intrinsic.h: Likewise.
9891         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9892         (nds32_print_operand): Likewise.
9893         * config/nds32/nds32.h (nds32_builtins): Likewise.
9895 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
9896         Andrew Pinski <pinsika@gcc.gnu.org>
9898         PR middle-end/82976
9899         * match.pd: Use constant_boolean_node of correct type instead of
9900         boolean_true_node or boolean_false_node for simplifying
9901         pointer comparisons to zero.
9903 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9905         PR tree-optimization/80021
9906         * tree.c (verify_type_variant): Make error call in verify_variant_match
9907         translatable and remove final full stop.
9909 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9911         * config/nds32/constants.md (unspec_volatile_element): Add
9912         UNSPEC_VOLATILE_EH_RETURN.
9913         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9914         nds32_output_stack_pop): Support dwarf exception handling process.
9915         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9916         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9917         exception handling process.
9918         (nds32_compute_stack_frame): Likewise.
9919         (nds32_return_addr_rtx): Likewise.
9920         (nds32_initial_elimination_offset): Likewise.
9921         (nds32_expand_prologue): Likewise.
9922         (nds32_expand_epilogue): Likewise.
9923         (nds32_dynamic_chain_address): New function.
9924         * config/nds32/nds32.h (machine_function): Add fields for dwarf
9925         exception handling.
9926         (DYNAMIC_CHAIN_ADDRESS): Define.
9927         (EH_RETURN_DATA_REGNO): Define.
9928         (EH_RETURN_STACKADJ_RTX): Define.
9929         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9930         patterns for dwarf exception handling.
9932 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9934         * config/nds32/nds32.h: Clean up obsolete macros.
9936 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9938         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9939         Add enum values for particular instructions.
9940         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9941         particular intrinsic functions.
9942         * config/nds32/nds32-intrinsic.md: Likewise.
9943         * config/nds32/nds32_intrinsic.h: Likewise.
9944         * config/nds32/nds32.h (nds32_builtins): Likewise.
9945         * config/nds32/nds32.md (type): Add pbsad and pbsada.
9946         (btst, ave): New patterns for particular instructions.
9948 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9950         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9951         Add enum values for atomic load/store and memory sync.
9952         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9953         and memory sync.
9954         * config/nds32/nds32-intrinsic.md: Likewise.
9955         * config/nds32/nds32_intrinsic.h: Likewise.
9956         * config/nds32/nds32.h (nds32_builtins): Likewise.
9958 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9960         PR tree-optimization/85257
9961         * fold-const.c (native_encode_vector): If not all elts could fit
9962         and off is -1, return 0 rather than offset.
9963         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9964         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9965         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
9966         adjust buffer in native_interpret_expr call.
9968 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9970         * config/nds32/constants.md (unspec_volatile_element): Add cache
9971         control enum values.
9972         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9973         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9974         * config/nds32/nds32.c (nds32_cctl_names): New.
9975         (nds32_print_operand): Handle cache control register names.
9976         * config/nds32/nds32.h (nds32_builtins): New enum values.
9977         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9978         macros.
9979         * config/nds32/nds32.md (type): Add mmu.
9980         * config/nds32/pipelines.md (simple_insn): Add mmu.
9982 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9984         * config/nds32/nds32.md (type): Remove call.
9985         * config/nds32/pipelines.md (simple_insn): Likewise.
9987 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9989         * config/nds32/constants.md (unspec_volatile_element): Add
9990         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9991         UNSPEC_VOLATILE_FMFCFG.
9992         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9993         description for fmfcfg and fmfcsr.
9994         (bdesc_1arg): Add fmtcsr.
9995         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9996         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9997         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9998         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9999         unspec_fmfcfg): New patterns.
10000         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10001         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10002         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10003         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10004         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10005         __nds32__fmfcfg): Define.
10007 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10009         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10010         intrinsic register names.
10011         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10012         intrinsic register enum values and macros.
10014 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10016         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10017         for load/store addressing form.
10018         (nds32_print_operand_address): Likewise.
10020 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
10022         PR target/85196
10023         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10024         based on LABEL_REF.  Remove useless assertion.
10025         (pic_address_needs_scratch): Fix formatting.
10026         (sparc_legitimize_pic_address): Minor tweaks.
10027         (sparc_delegitimize_address): Adjust assertion accordingly.
10028         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10029         into symbolic_operand.
10030         (movsi_high_pic_label_ref): Likewise.
10031         (movsi_lo_sum_pic_label_ref): Likewise.
10032         (movdi_pic_label_ref): Likewise.
10033         (movdi_high_pic_label_ref): Likewise.
10034         (movdi_lo_sum_pic_label_ref): Likewise.
10036 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
10038         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10039         custom LIB_SPEC setup.
10041 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
10042             Kito Cheng  <kito.cheng@gmail.com>
10044         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10045         * config/riscv/freebsd.h: New.
10047 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10049         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10050         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10051         file.
10053 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10054             Kito Cheng  <kito.cheng@gmail.com>
10056         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10057         nds32_output_call, nds32_symbol_binds_local_p): New functions.
10058         * config/nds32/nds32-protos.h (nds32_output_call,
10059         nds32_output_return): Declare.
10060         * config/nds32/nds32.md: Refine all the call and return patterns.
10062 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10064         PR debug/85252
10065         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10066         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10068         PR rtl-optimization/84872
10069         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10070         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10071         EDGE_CROSSING edge.
10073 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
10075         * expr.c (copy_blkmode_to_reg): Revert 254862.
10076         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10078 2018-04-06  Richard Biener  <rguenther@suse.de>
10080         PR middle-end/85244
10081         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10082         after seeing a component reference with an adjacent field.  Treat
10083         refs to arrays at struct end of external decls similar to
10084         refs to unconstrained commons.
10086 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10088         PR sanitizer/85213
10089         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10090         look through SAVE_EXPRs with non-side-effects argument.  Adjust
10091         recursive calls.
10092         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10093         save_p here.
10095 2018-04-06  Richard Biener  <rguenther@suse.de>
10097         PR middle-end/85180
10098         * alias.c (find_base_term): New wrapper around find_base_term
10099         unwinding CSELIB_VAL_PTR changes.
10100         (find_base_term): Do not restore CSELIB_VAL_PTR during the
10101         recursion.
10103 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10105         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10106         instructions.
10107         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10108         constant definitions.
10109         ("nop"): lr 0,0 -> nopr r0
10110         ("nop_lr0", "nop_lr1"): New insn definitions.
10112 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10114         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10115         NDS32_V3PUSH_AVAILABLE_P macro.
10117 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
10118             Chung-Ju Wu  <jasonwucj@gmail.com>
10120         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10121         (nds32*-*-*): Add float and fpu_config into supported_defaults.
10122         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10123         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10124         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10125         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10126         * config/nds32/constraints.md: New constraints and checking for hard
10127         float configuration.
10128         * config/nds32/iterators.md: New mode iterator and attribute for hard
10129         float configuration.
10130         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10131         patterns.
10132         * config/nds32/nds32-fpu.md: New file.
10133         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10134         deal with hard float code generation.
10135         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10136         ARCH_V3S.
10137         (abi_type, float_reg_number): New enum type.
10138         * config/nds32/nds32-predicates.c: New predicates for hard float.
10139         * config/nds32/nds32-protos.h: Declare functions for hard float.
10140         * config/nds32/nds32.c: Implementation for hard float configuration.
10141         * config/nds32/nds32.h: Definitions for hard float configuration.
10142         * config/nds32/nds32.md: Include hard float machine description and
10143         modify patterns for hard float configuration.
10144         * config/nds32/nds32.opt: New options for hard float configuration.
10145         * config/nds32/predicates.md: New predicates for hard float
10146         configuration.
10148 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10150         * common/config/nds32/nds32-common.c
10151         (nds32_option_optimization_table): Enable -mreleax-hint by default.
10153 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
10155         PR middle-end/85195
10156         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10157         CONSTRUCTOR_ELT (ctor, ...)->value.
10159 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
10161         PR target/85193
10162         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10164 2018-04-05  Tom de Vries  <tom@codesourcery.com>
10166         PR target/85204
10167         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10168         cond jump.
10170 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10171             Kito Cheng  <kito.cheng@gmail.com>
10173         * config/nds32/constraints.md (U33): Fine-tune checking condition.
10174         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10175         * config/nds32/nds32.h (nds32_16bit_address_type): Add
10176         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10178 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10179             Kito Cheng  <kito.cheng@gmail.com>
10181         * config/nds32/constraints.md (Ufe): New memory constraint.
10182         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10183         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10184         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10185         operands.
10186         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10187         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10189 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10191         * config/nds32/nds32.md: Use optimize_size in the condition for
10192         alu-shift instructions.
10194 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10196         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10198 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10200         * config/nds32/nds32.md (negsi2): Refine pattern.
10202 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10203             Chung-Ju Wu  <jasonwucj@gmail.com>
10205         * config/nds32/iterators.md (shift_rotate): New code iterator.
10206         (shift): New code attribute.
10207         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10208         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10209         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10210         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10211         bit-wise operations.
10212         (andsi3, *andsi3): Ditto.
10213         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10214         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10215         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10216         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10217         nds32_ior_operand, nds32_xor_operand): New predicates.
10219 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10221         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10222         (addsi3, subsi3): ... this.
10224 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10226         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10228 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10230         * config/nds32/nds32.md: Adjust indention.
10232 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10234         * config/nds32/nds32.md (feature): New attribute.
10236 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10238         * config/nds32/nds32.md (subtype): New attribute.
10240 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10242         PR target/85203
10243         * config/arm/arm-builtins.c (arm_expand_builtin): Change
10244         expansion to perform a bitwise AND of the argument followed by a
10245         boolean negation of the result.
10247 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
10249         PR rtl-optimization/84878
10250         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10251         the basic block.  Assert the use reference is not artificial and that
10252         it has an associated insn.
10254 2018-04-04  Michael Matz  <matz@suse.de>
10256         * builtins.c (compute_objsize): Pass correct operand
10257         to array_at_struct_end_p.
10259 2018-04-04  Richard Biener  <rguenther@suse.de>
10261         PR lto/85176
10262         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10263         from contexts for DINFO_LEVEL_TERSE and below.
10265 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10267         * config/nds32/nds32-doubleword.md (move_<mode>): Require
10268         resiter_operand condition.
10269         * config/nds32/nds32.md (*move<mode>): Ditto.
10271 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10272             Monk Chiang  <sh.chiang04@gmail.com>
10274         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10276 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10278         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10280 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10281             Kito Cheng  <kito.cheng@gmail.com>
10283         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10284         nds32_cond_code_str, output_cond_branch,
10285         output_cond_branch_compare_zero, nds32_expand_cbranch,
10286         nds32_expand_cstore, nds32_expand_movcc,
10287         nds32_output_cbranchsi4_equality_zero,
10288         nds32_output_cbranchsi4_equality_reg,
10289         nds32_output_cbranchsi4_equality_reg_or_const_int,
10290         nds32_output_cbranchsi4_greater_less_zero: New functions.
10291         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10292         nds32_expand_cstore, nds32_expand_movcc,
10293         nds32_output_cbranchsi4_equality_zero,
10294         nds32_output_cbranchsi4_equality_reg,
10295         nds32_output_cbranchsi4_equality_reg_or_const_int,
10296         nds32_output_cbranchsi4_greater_less_zero): Declare.
10297         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10298         nds32_rimm11s_operand): New predicates.
10299         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10300         * config/nds32/nds32.md: Rewrite all the branch and conditional move
10301         patterns.
10303 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10305         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10306         * config/nds32/nds32.md: Ditto.
10307         * config/nds32/pipelines.md: Ditto.
10309 2018-04-04  Richard Biener  <rguenther@suse.de>
10311         PR tree-optimization/85168
10312         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10313         propagating abnormals.
10315 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10317         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10319 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10320             Kito Cheng  <kito.cheng@gmail.com>
10322         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10323         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10324         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10325         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10326         * config/nds32/nds32.md (sibcall_internal): New.
10327         (sibcall_register): Remove.
10328         (sibcall_immediate): Remove.
10329         (sibcall_value_internal): New.
10330         (sibcall_value_register): Remove.
10331         (sibcall_value_immediate): Remove.
10332         * config/nds32/predicates.md (nds32_general_register_operand): New.
10333         (nds32_call_address_operand): New.
10335 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10337         PR rtl-optimization/85167
10338         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10339         bb_defs if *split_p, instead preinitialize it to NULL.
10341         PR tree-optimization/85156
10342         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10343         evaluating the argument multiple times.
10345 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
10347         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10348         than vector.
10349         (_mm_cvtpd_ps): Likewise.
10350         (_mm_cvttpd_epi32): Likewise.
10351         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10352         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10353         vector, pixel, and bool following altivec.h include.
10355 2018-04-03  Martin Sebor  <msebor@redhat.com>
10357         * doc/extend.texi (Common Function Attributes): Clarify.
10358         (const attribute): Likewise.
10359         (pure attribute): Likewise.
10361 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10363         PR target/85169
10364         * config/i386/i386.c (ix86_expand_vector_set): Use
10365         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
10367 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
10369         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10370         instructions when changing rounding bits to preserve precision bits
10371         in the x87 control word.
10373 2018-04-03  Martin Liska  <mliska@suse.cz>
10375         PR tree-optimization/82491
10376         * rtl.h (strip_offset_and_add): Replace += suboffset with
10377         poly_uint64 () + suboffset.
10379 2018-03-29  Martin Liska  <mliska@suse.cz>
10380             Martin Jambor  <mjambor@suse.cz>
10382         PR ipa/84947
10383         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10384         param_type is not an integral or pointer type.
10386 2018-04-03  Richard Biener  <rguenther@suse.de>
10388         * sese.h (recompute_all_dominators): Remove.
10390 2018-04-02  Martin Sebor  <msebor@redhat.com>
10392         * doc/invoke.texi (-Wrestrict): Fix typos.
10394 2018-04-02  Jim Wilson  <jimw@sifive.com>
10396         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10397         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10398         (<optab>di3, <optab>si3_extend): Likewise.
10399         (<optab>si3_mask, <optab>si3_mask_1): New.
10400         (<optab>di3_mask, <optab>di3_mask_1): New.
10401         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10402         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10403         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10405 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
10407         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10408         example.
10410 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10412         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10413         (nds32_canonicalize_comparison): New function.
10415 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10416             Kito Cheng  <kito.cheng@gmail.com>
10417             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10419         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10420         * config/nds32/constants.md (unspec_volatile_element): Add
10421         UNSPEC_VOLATILE_RELAX_GROUP.
10422         * config/nds32/nds32-relax-opt.c: New file.
10423         * config/nds32/nds32-predicates.c
10424         (nds32_symbol_load_store_p): New function.
10425         * config/nds32/nds32-protos.h
10426         (nds32_symbol_load_store_p): Declare function.
10427         (make_pass_nds32_relax_opt): Declare new rtl pass function.
10428         * config/nds32/nds32.c
10429         (nds32_register_pass): New function to register pass.
10430         (nds32_register_passes): New function to register passes.
10431         * config/nds32/nds32.md (relax_group): New pattern.
10432         * config/nds32/nds32.opt (mrelax-hint): New option.
10433         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10435 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
10437         * config/nds32/t-nds32: Modify files dependency.
10439 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10441         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10442         (PROFILE_HOOK): Define its implementation.
10444 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10446         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10447         type and 32-bit size.
10449 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
10451         PR middle-end/85090
10452         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10453         (V_128_256): New mode iterator.
10454         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10455         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10456         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10457         of V.
10458         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10459         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10461 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
10463         PR target/83315
10464         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10465         NaN inputs correctly.
10467 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
10469         PR target/80546
10470         * config/rs6000/vsx.md (??r): New mode attribute.
10471         (*vsx_mov<mode>_64bit): Use it.
10472         (*vsx_mov<mode>_32bit): Likewise.
10474 2018-03-30  Martin Sebor  <msebor@redhat.com>
10476         PR tree-optimization/84818
10477         * builtins.c (check_access): Use warning_n.
10479 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10481         PR target/83822
10482         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10483         condition.
10484         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10485         condition.
10487 2018-03-30  Julia Koval  <julia.koval@intel.com>
10489         PR target/84413
10490         * x86-tune.def (movx, partial_reg_dependency): Enable for
10491         m_SKYLAKE_AVX512.
10493 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
10495         PR inline-asm/84985
10496         * lra-constraints.c (process_alt_operands): Move setting
10497         this_alternative_matches below.
10499 2018-03-29  Martin Liska  <mliska@suse.cz>
10501         PR lto/84995.
10502         * doc/invoke.texi: Document how LTO works with debug info.
10503         Describe auto-load support of binutils.  Mention 'x86-64'
10504         as valid option value of -march option.
10506 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
10508         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10510         PR c/85094
10511         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10512         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10513         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10514         checking.
10516 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10518         PR target/84912
10519         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10520         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10521         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10522         for RS6000_BTM_POWERPC64.
10523         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10524         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10525         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10526         definition.
10527         (DIVDE): Use it.
10528         (DIVDEU): Likewise.
10530 2018-03-28 Carl Love  <cel@us.ibm.com>
10532         Revert
10533         2017-09-27  Carl Love  <cel@us.ibm.com>
10535         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10536         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10537         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10538         fctiw instruction.
10540 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10542         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10543         instead of __vector bool.
10544         (_mm_max_pu8): Likewise.
10545         (_mm_min_pi16): Likewise.
10547 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10549         PR target/84912
10550         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10551         (DIVWEUO): Likewise.
10552         (DIVDEO): Likewise.
10553         (DIVDEUO): Likewise.
10554         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10555         DIVWEUO and DIVDEUO.
10556         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10557         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10558         (div_extend): Likewise.
10559         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10560         builtin function.
10561         (__builtin_divweuo): Likewise.
10562         (__builtin_divdeo): Likewise.
10563         (__builtin_divdeuo): Likewise.
10565 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10567         PR target/85095
10568         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10569         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10571         PR tree-optimization/82004
10572         * gimple-match-head.c (optimize_pow_to_exp): New function.
10573         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10574         Don't fold to exp if optimize_pow_to_exp is false.
10576 2018-03-28  Martin Liska  <mliska@suse.cz>
10578         PR other/84819
10579         * calls.c (initialize_argument_information): Fix trailing space.
10580         * common.opt: Fix typo and provide better explanation for
10581         -fsanitize-coverage option.
10582         * config/i386/i386.opt: Fix typo.
10584 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10585             Martin Liska  <mliska@suse.cz>
10587         PR sanitizer/85081
10588         * gimplify.c (asan_poison_variable): Don't do the check for
10589         gimplify_omp_ctxp here.
10590         (gimplify_decl_expr): Do it here.
10591         (gimplify_target_expr): Likewise.
10593 2018-03-28  Martin Liska  <mliska@suse.cz>
10595         PR target/84988
10596         * config/i386/i386.c (ix86_function_arg_advance): Do not call
10597         chkp_type_bounds_count if MPX is not enabled.
10599 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10601         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10603 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
10605         PR target/84914
10606         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10607         function to create the function decl for complex long double
10608         multiply and divide for -mabi=ieeelongdouble.
10609         (init_float128_ieee): Call it.
10611 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
10613         PR target/85044
10614         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10615         -fcf-protection=branch -mibt.
10616         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10618 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10620         PR target/81863
10621         * config/arm/arm.c (arm_valid_symbolic_address): Handle
10622         arm_word_relocations.
10624 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
10626         PR target/85056
10627         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10628         extern array declarations.
10630 2018-03-27  Richard Biener  <rguenther@suse.de>
10632         PR middle-end/84067
10633         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10634         explicit single_use checks.
10636 2018-03-27  Richard Biener  <rguenther@suse.de>
10638         PR tree-optimization/85082
10639         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10640         Valueize the VUSE.
10642 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10644         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10645         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10646         Turn on fasynchronous-unwind-tables and funwind-tables.
10648 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
10650         PR target/85073
10651         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10652         (*bmi_blsr_<mode>_ccz): Ditto.
10654 2018-03-26  Tom de Vries  <tom@codesourcery.com>
10656         PR tree-optimization/85063
10657         * omp-general.c (offloading_function_p): New function.  Factor out
10658         of ...
10659         * omp-offload.c (pass_omp_target_link::gate): ... here.
10660         * omp-general.h (offloading_function_p): Declare.
10661         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10662         with attribute omp declare target for offloading functions.
10664 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
10666         PR tree-optimization/84005
10667         * tree-data-ref.h (get_base_for_alignment): Declare.
10668         * tree-data-ref.c (get_base_for_alignment_1): New function.
10669         (get_base_for_alignment): Likewise.
10670         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10671         get_base_for_alignment to find a suitable base object, instead
10672         of always using drb->base_address.
10674 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10676         PR inline-asm/85022
10677         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10678         known size by default.
10680 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
10682         PR inline-asm/85030
10683         * lra-constraints.c (process_alt_operands): Don't match BLKmode
10684         and non BLKmode operands.
10686 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10688         PR target/85026
10689         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10690         Clean up attributes.
10692 2018-03-23  Richard Biener  <rguenther@suse.de>
10694         PR debug/85020
10695         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10696         we are going to emit early debug for LTO.
10698 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10700         PR inline-asm/85034
10701         * function.c (match_asm_constraints_1): Don't optimize if input
10702         doesn't satisfy general_operand predicate for output's mode.
10704         PR inline-asm/85022
10705         * alias.c (write_dependence_p): Don't require for x_canonicalized
10706         non-VOIDmode if x has VOIDmode.
10708         PR sanitizer/85029
10709         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10710         just don't try to optimize it rather than assert it never happens.
10712 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10714         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10715         macro expansions for definition of ST_INTERNAL_<mode> and
10716         LD_INTERNAL_<mode> builtins.
10717         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10718         Remove prototype.
10719         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10720         function.
10721         (altivec_expand_st_builtin): Likewise.
10722         (altivec_expand_builtin): Remove calls to deleted functions.
10723         (rs6000_address_for_altivec): Delete this function.
10724         * config/rs6000/vector.md: Remove expands for
10725         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10727 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
10729         PR target/84826
10730         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10731         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10732         re-computing once computed.
10733         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10734         (arm_init_machine_status): Initialize
10735         machine->static_chain_stack_bytes.
10737 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10739         PR target/84760
10740         * doc/extend.texi: Add four new prototypes for vec_ld.
10741         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10742         definitions for more logical presentation.
10743         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10744         entries for V1TI variants of __builtin_altivec_ld builtin.
10745         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10746         handling of V1TI variant of LVX icode pattern.
10747         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10748         (rs6000_gimple_fold_builtin): Likewise.
10749         (altivec_init_builtins): Add code to define
10750         __builtin_altivec_lvx_v1ti function.
10752 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10754         PR inline-asm/84941
10755         * function.c (match_asm_constraints_1): Don't do the optimization
10756         if input isn't a REG, SUBREG, MEM or constant.
10758 2018-03-22  Tom de Vries  <tom@codesourcery.com>
10760         PR tree-optimization/84956
10761         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10762         bb_has_abnormal_pred.
10764 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10766         PR sanitizer/85018
10767         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10768         DECL_INITIAL (decl) to decl at the end.
10769         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10770         adjust the comment.
10772 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
10774         * doc/extend.texi (__builtin_tgmath): Document when complex
10775         integer types are treated as _Complex _Float64.
10777 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10779         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10781 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10783         PR tree-optimization/84960
10784         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10785         if it is ENTRY block, move them into single succ of ENTRY in that case.
10787 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
10789         PR tree-optimization/84811
10790         * poly-int.h (poly_span_traits): Remove the T3 parameter and
10791         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10792         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10793         (known_subrange_p): Update accordingly.  Cast each value involved
10794         in the size comparison, rather than casting the result of the
10795         subtraction.
10797 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10799         PR tree-optimization/84982
10800         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10801         by flipping the least significant bit rather than all bits from
10802         bitpos to bitpos + bitsize - 1.
10804 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10806         * doc/extend.texi (Deprecated Features): Remove mention of
10807         long-deleted deprecations.
10809 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10811         PR jit/84288
10812         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10813         * configure: Regenerate.
10815 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10817         PR tree-optimization/83126
10818         * tree-parloops.c (num_phis): New function.
10819         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10821 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10823         * doc/extend.texi (Deprecated Features): Update deprecated flags,
10824         mention anon-struct/union members and trailing attributes.
10826 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
10828         PR tree-optimization/84969
10829         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10830         builtin memset partitions if they set different rhs values.
10832 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10834         PR rtl-optimization/84989
10835         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10836         VEC_DUPLICATE with scalar result mode.
10838 2018-03-21  Martin Liska  <mliska@suse.cz>
10840         PR ipa/84963
10841         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10842         not intended return statement.
10844 2018-03-21  Martin Liska  <mliska@suse.cz>
10846         PR target/84988
10847         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10848         (chkp_find_bound_slots_1): Limit number of iterations.
10850 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
10852         PR target/84838
10853         * Minor grammar fixes for x86 options.
10855 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10857         PR debug/84875
10858         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10859         holding REG_CFA_RESTORE notes, instead turn them into a USE.
10861 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
10863         PR target/83789
10864         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10865         (altivec_lvx_<mode>_1op): Likewise.
10866         (altivec_stvx_<mode>_2op): Likewise.
10867         (altivec_stvx_<mode>_1op): Likewise.
10868         (altivec_lvx_<VM2:mode>): New define_expand.
10869         (altivec_stvx_<VM2:mode>): Likewise.
10870         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10871         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10872         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10873         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10874         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10875         (rs6000_gen_lvx): Likewise.
10876         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10877         (altivec_expand_stv_builtin): Likewise.
10878         (altivec_expand_builtin): Likewise.
10879         * config/rs6000/vector.md: Likewise.
10881 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10883         PR target/82518
10884         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10885         BYTES_BIG_ENDIAN.
10887 2018-03-20  Richard Biener  <rguenther@suse.de>
10889         PR target/84986
10890         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10891         sign-conversions as zero, fall back to standard scalar_stmt
10892         cost for the rest.
10894 2018-03-20  Martin Liska  <mliska@suse.cz>
10896         PR ipa/84825
10897         * predict.c (rebuild_frequencies): Handle case when we have
10898         PROFILE_ABSENT, but flag_guess_branch_prob is false.
10900 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10902         PR target/84990
10903         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10904         flag_section_anchors.
10905         * varasm.c (use_blocks_for_decl_p): Remove hack for
10906         dw2_force_const_mem.
10908         PR target/84845
10909         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10910         to ...
10911         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
10912         be created, use lowpart_subreg of operands[0] rather than operands[0]
10913         itself.
10914         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10915         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10916         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10917         and n constraint instead of aarch64_shift_imm_di and Usd.
10918         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10919         (*aarch64_<optab>_reg_minus<mode>3): ... this.
10921 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
10923         PR target/82989
10924         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10925         to favor GPR over NEON registers.
10926         (<shift>di3_neon): Likewise.
10928 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10930         PR target/84952
10931         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10932         (nvptx_process_pars): Emit bar.sync asap and alap.
10934 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10936         PR target/84954
10937         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10938         seen_label if seen_label is already set.
10940 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10942         PR target/84945
10943         * config/i386/i386.c (fold_builtin_cpu): For features above 31
10944         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10945         Use 1U instead of 1.  Formatting fixes.
10947         PR c/84953
10948         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10949         instead of TREE_TYPE (s1) for the return value.
10951 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
10953         PR tree-optimization/84946
10954         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10955         bitsize + bitsize in poly_uint64 rather than poly_int64.
10957         PR sanitizer/78651
10958         * dwarf2asm.c: Include fold-const.c.
10959         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10960         of decl rather than decl itself.
10962         PR rtl-optimization/84643
10963         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10965 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
10967         PR sanitizer/78651
10968         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10969         calling assemble_variable.
10971 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
10973         PR target/81647
10974         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10975         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10977 2018-03-19  Jim Wilson  <jimw@sifive.com>
10979         PR bootstrap/84856
10980         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10981         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10982         (riscv_first_stack_step): Likewise.
10983         (riscv_option_override): Use STACK_BOUNDARY instead of
10984         MIN_STACK_BOUNDARY.
10985         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10986         MIN_STACK_BOUNDARY.
10987         (BIGGEST_ALIGNMENT): Set to 128.
10988         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10989         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10990         STACK_BOUNDARY.
10992 2018-03-19  Richard Biener  <rguenther@suse.de>
10994         PR tree-optimization/84933
10995         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10996         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10998 2018-03-19  Richard Biener  <rguenther@suse.de>
11000         PR tree-optimization/84859
11001         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11002         (cond_if_else_store_replacement): Perform sinking operation on
11003         single-store BBs regardless of MAX_STORES_TO_SINK setting.
11004         Generalize what a BB with a single eligible store is.
11006 2018-03-19  Richard Biener  <rguenther@suse.de>
11008         PR tree-optimization/84929
11009         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11010         chrec_is_positive against non-chrec arg.
11012 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
11014         PR target/84711
11015         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11017 2018-03-18  Martin Liska  <mliska@suse.cz>
11019         PR rtl-optimization/84635
11020         * regrename.c (build_def_use): Use matches_mode only when
11021         matches >= 0.
11023 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
11025         PR tree-optimization/84913
11026         * tree-vect-loop.c (vectorizable_reduction): Don't try to
11027         vectorize chains of COND_EXPRs.
11029 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11031         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11033 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11035         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11037 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11039         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11041 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11042             Kito Cheng  <kito.cheng@gmail.com>
11044         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11045         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11046         (nds32_adjust_reg_alloc_order): New function.
11047         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11049 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
11051         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11052         nds32_print_operand, nds32_print_operand_address): Use
11053         HOST_WIDE_INT_PRINT_DEC instead.
11055 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11057         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11059 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
11061         PR target/84902
11062         * config/i386/i386.c (initial_ix86_tune_features,
11063         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11064         unsigned long long.
11065         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11066         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11067         rather than 1u << ix86_tune.  Formatting fix.
11068         (ix86_option_override_internal): Change ix86_arch_mask from
11069         unsigned int to unsigned HOST_WIDE_INT, initialize to
11070         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11071         (ix86_function_specific_restore): Likewise.
11073 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11075         PR target/84899
11076         * postreload.c (reload_combine_recognize_pattern): Perform
11077         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11078         truncate_int_for_mode the result for the destination's mode.
11080         PR c/84909
11081         * hsa-gen.c (mem_type_for_type): Fix comment typo.
11082         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11083         Likewise.
11084         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11085         Likewise.
11087 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
11089         PR target/84876
11090         * lra-assigns.c (lra_split_hard_reg_for): Don't use
11091         regno_allocno_class_array and sorted_pseudos.
11092         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11093         insns where regno is used.
11095 2018-03-16  Martin Liska  <mliska@suse.cz>
11097         PR ipa/84833
11098         * multiple_target.c (create_dispatcher_calls): Redirect
11099         reference in the symbol table.
11101 2018-03-16  Martin Liska  <mliska@suse.cz>
11103         PR ipa/84722
11104         * multiple_target.c (create_dispatcher_calls): Redirect also
11105         an alias.
11107 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11109         PR c++/79937
11110         PR c++/82410
11111         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11112         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11113         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11115 2018-03-16  Julia Koval  <julia.koval@intel.com>
11117         * doc/invoke.texi (Skylake Server): Add CLWB.
11118         Cannonlake): Remove CLWB.
11120 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11122         PR tree-optimization/84841
11123         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11124         1 << 3.
11125         (FLOAT_ONE_CONST_TYPE): Define.
11126         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11127         (sort_by_operand_rank): Put entries with higher constant_type last
11128         rather than first to match comments.
11130 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
11132         * config/nios2/nios2.md (movsi_internal): Fix thinko in
11133         split predicate.
11135 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11137         PR c++/79085
11138         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11139         check and use address of target always.
11141 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
11143         PR target/84574
11144         * config/i386/i386.c (indirect_thunk_needed): Update comments.
11145         (indirect_thunk_bnd_needed): Likewise.
11146         (indirect_thunks_used): Likewise.
11147         (indirect_thunks_bnd_used): Likewise.
11148         (indirect_return_needed): New.
11149         (indirect_return_bnd_needed): Likewise.
11150         (output_indirect_thunk_function): Add a bool argument for
11151         function return.
11152         (output_indirect_thunk_function): Don't generate alias for
11153         function return thunk.
11154         (ix86_code_end): Call output_indirect_thunk_function to generate
11155         function return thunks.
11156         (ix86_output_function_return): Set indirect_return_bnd_needed
11157         and indirect_return_needed instead of indirect_thunk_bnd_needed
11158         and indirect_thunk_needed.
11160 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
11162         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11163         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11164         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11166 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
11167             Paul Hua <paul.hua.gm@gmail.com>
11169         PR c/84852
11170         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11172 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
11174         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11175         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11176         resp. SFmode cases.
11178 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
11180         PR target/84711
11181         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11182         instead of GET_MODE_SIZE when comparing Units.
11184 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11186         PR target/68256
11187         * varasm.c (hash_section): Return an unchangeble hash value
11188         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11189         Return !aarch64_can_use_per_function_literal_pools_p ().
11191 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11193         PR target/84860
11194         * optabs.c (emit_conditional_move): Pass address of cmode's copy
11195         rather than address of cmode as last argument to prepare_cmp_insn.
11197 2018-03-15  Julia Koval  <julia.koval@intel.com>
11199         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11200         F_AVX512VNNI, F_AVX512BITALG): New.
11202 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
11204         PR target/83451
11205         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
11206         insn for floating-point loads and stores.
11208 2018-03-14  Carl Love  <cel@us.ibm.com>
11210         * config/rs6000/rs6000-c.c: Add macro definitions for
11211         ALTIVEC_BUILTIN_VEC_PERMXOR.
11212         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11213         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11214         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11215         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11216         UNSPEC_VPERMXOR.
11217         * config/doc/extend.texi: Add prototypes for vec_permxor.
11219 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
11221         PR c/84852
11222         * diagnostic-show-locus.c (class layout_point): Convert m_line
11223         from int to linenum_type.
11224         (line_span::comparator): Use linenum "compare" function when
11225         comparing line numbers.
11226         (test_line_span): New function.
11227         (layout_range::contains_point): Convert param "row" from int to
11228         linenum_type.
11229         (layout_range::intersects_line_p): Likewise.
11230         (layout::will_show_line_p): Likewise.
11231         (layout::print_source_line): Likewise.
11232         (layout::should_print_annotation_line_p): Likewise.
11233         (layout::print_annotation_line): Likewise.
11234         (layout::print_leading_fixits): Likewise.
11235         (layout::annotation_line_showed_range_p): Likewise.
11236         (struct line_corrections): Likewise for field m_row.
11237         (line_corrections::line_corrections): Likewise for param "row".
11238         (layout::print_trailing_fixits): Likewise.
11239         (layout::get_state_at_point): Likewise.
11240         (layout::get_x_bound_for_row): Likewise.
11241         (layout::print_line): Likewise.
11242         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11243         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11244         * input.c (selftest::test_linenum_comparisons): New function.
11245         (selftest::input_c_tests): Call it.
11246         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11247         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11248         * selftest.h (ASSERT_GT): New macro.
11249         (ASSERT_GT_AT): New macro.
11250         (ASSERT_LT): New macro.
11251         (ASSERT_LT_AT): New macro.
11253 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
11255         PR rtl-optimization/84780
11256         * combine.c (distribute_links): Don't make a link based on pc_rtx.
11258 2018-03-14  Martin Liska  <mliska@suse.cz>
11260         * tree.c (record_node_allocation_statistics): Use
11261         get_stats_node_kind.
11262         (get_stats_node_kind): New function extracted from
11263         record_node_allocation_statistics.
11264         (free_node): Use get_stats_node_kind.
11266 2018-03-14  Richard Biener  <rguenther@suse.de>
11268         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11269         that the value-set of ANTIC_IN doesn't grow.
11271         Revert
11272         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11273         member.
11274         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11275         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11277 2018-03-14  Julia Koval  <julia.koval@intel.com>
11279         * config.gcc (icelake-client, icelake-server): New.
11280         (icelake): Remove.
11281         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11282         (initial_ix86_arch_features): Ditto.
11283         (PTA_SKYLAKE): Add SGX.
11284         (PTA_ICELAKE): Remove.
11285         (PTA_ICELAKE_CLIENT): New.
11286         (PTA_ICELAKE_SERVER): New.
11287         (ix86_option_override_internal): Split up icelake on icelake client and
11288         icelake server.
11289         (get_builtin_code_for_version): Ditto.
11290         (fold_builtin_cpu): Ditto.
11291         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11292         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11293         * config/i386/i386.h (processor_type): Ditto.
11294         * doc/invoke.texi: Ditto.
11296 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
11298         PR sanitizer/83392
11299         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11300         INTEGER_CST offset, add it together with bitpos / 8 and
11301         sign extend based on POINTER_SIZE.
11303         PR target/84844
11304         Revert
11305         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
11307         PR target/78090
11308         * config/i386/constraints.md (Yc): New register constraint.
11309         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11310         Use Yc constraint for alternative 2 of operand 0.  Remove
11311         preferred_for_speed attribute.
11313 2018-03-14  Richard Biener  <rguenther@suse.de>
11315         PR tree-optimization/84830
11316         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11317         with the old one to avoid oscillations.
11319 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
11321         PR target/83712
11322         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11323         pseudos.
11324         (assign_by_spills): Return a flag of reload assignment failure.
11325         Do not process the reload assignment failures.  Do not spill other
11326         reload pseudos if they has the same reg class.  Update n if
11327         necessary.
11328         (lra_assign): Add a return arg.  Set up from the result of
11329         assign_by_spills call.
11330         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11331         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11332         usage_insns if it is not NULL.
11333         (spill_hard_reg_in_range): New function.
11334         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11335         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11336         function prototypes.
11337         (lra_assign): Change prototype.
11338         * lra.c (lra): Add code to deal with fails by splitting hard reg
11339         live ranges.
11341 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
11343         * config/riscv/riscv.opt (mrelax): New option.
11344         * config/riscv/riscv.c (riscv_file_start): Emit ".option
11345         "norelax" when riscv_mrelax is disabled.
11346         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11348 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11350         PR target/84743
11351         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11352         reassociation for int modes.
11354 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11356         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11357         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11358         for big-endian.
11359         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11360         * config/aarch64/aarch64-sve.md
11361         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11362         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11363         (*extend<mode><Vwide>2): Rename to...
11364         (aarch64_sve_extend<mode><Vwide>2): ...this.
11365         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11366         renaming the old pattern to...
11367         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
11368         unsigned packs.
11369         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11370         define_expand, renaming the old pattern to...
11371         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11372         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11373         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11374         account when deciding which SVE instruction the optab should use.
11375         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11377 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11379         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11380         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11381         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11382         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11383         (tlsdesc_small_<mode>): Turn a define_expand and use
11384         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
11385         (tlsdesc_small_advsimd_<mode>): ...this.
11386         (tlsdesc_small_sve_<mode>): New pattern.
11388 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11390         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11391         (UNSPEC_UMUL_HIGHPART): New constants.
11392         (MUL_HIGHPART): New int iteraor.
11393         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11394         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11395         define_expand.
11396         (*<su>mul<mode>3_highpart): New define_insn.
11398 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11400         PR lto/84805
11401         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11402         incomplete types.
11404 2018-03-13  Martin Liska  <mliska@suse.cz>
11406         PR ipa/84658.
11407         * (sem_item_optimizer::sem_item_optimizer): Initialize new
11408         vector.
11409         (sem_item_optimizer::~sem_item_optimizer): Release it.
11410         (sem_item_optimizer::merge_classes): Register variable aliases.
11411         (sem_item_optimizer::fixup_pt_set): New function.
11412         (sem_item_optimizer::fixup_points_to_sets): Likewise.
11413         * ipa-icf.h: Declare new variables and functions.
11415 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
11417         PR middle-end/84834
11418         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11419         integer_pow2p@2 and test integer_pow2p in condition.
11420         (A < 0 ? C : 0): Similarly for @1.
11422         PR middle-end/84831
11423         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11424         characters starting at p contain '\0' character, don't look beyond
11425         that.
11427         PR target/84827
11428         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11429         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11431         PR target/84828
11432         * reg-stack.c (change_stack): Change update_end var from int to
11433         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11434         also call set_block_for_insn on the newly added insns and rescan.
11436         PR target/84786
11437         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11438         on the last operand.
11440         PR c++/84704
11441         * tree.c (stabilize_reference_1): Return save_expr (e) for
11442         STATEMENT_LIST even if it doesn't have side-effects.
11444 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
11446         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11448 2018-03-12  Renlin Li  <renlin.li@arm.com>
11450         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11451         aarch64_output_scalar_simd_mov_immediate.
11453 2018-03-12  Martin Sebor  <msebor@redhat.com>
11455         PR tree-optimization/83456
11456         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11457         for perfectly overlapping calls to memcpy.
11458         (gimple_fold_builtin_memory_chk): Same.
11459         (gimple_fold_builtin_strcpy): Handle no-warning.
11460         (gimple_fold_builtin_stxcpy_chk): Same.
11461         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11463 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
11465         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11466         parameter.  Use it for SFmode.
11467         (rs6000_function_arg_advance_1): Adjust.
11468         (rs6000_function_arg): Adjust.
11469         (rs6000_gimplify_va_arg): Pass false for that new parameter.
11471 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
11473         PR rtl-optimization/84169
11474         PR rtl-optimization/84780
11475         * combine.c (can_combine_p): Check for a 2-insn combination whether
11476         the destination register is used between the two insns, too.
11478 2018-03-12  Richard Biener  <rguenther@suse.de>
11480         PR tree-optimization/84803
11481         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11482         for refs DR analysis didn't process.
11484 2018-03-12  Richard Biener  <rguenther@suse.de>
11486         PR tree-optimization/84777
11487         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11488         force-vectorize loops ignore whether we are optimizing for size.
11490 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11492         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11493         (TARGET_MD_ASM_ADJUST): Define.
11495 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
11496             Kito Cheng  <kito.cheng@gmail.com>
11497             Chung-Ju Wu  <jasonwucj@gmail.com>
11499         * config/nds32/nds32.c (nds32_compute_stack_frame,
11500         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11501         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11502         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11503         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11504         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11505         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11506         * config/nds32/nds32.md (prologue, epilogue): Use macro
11507         NDS32_V3PUSH_AVAILABLE_P to do checking.
11509 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
11511         PR debug/58150
11512         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11513         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11514         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
11515         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
11516         addition of most attributes on !orig_type_die or the attribute not
11517         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11519 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11520             Chung-Ju Wu  <jasonwucj@gmail.com>
11522         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11523         __NDS32_VH__ macro.
11524         * config/nds32/nds32.opt (mvh): New option.
11526 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11527             Chung-Ju Wu  <jasonwucj@gmail.com>
11529         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11530         function.
11531         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11532         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11533         definition.
11535 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11536             Chung-Ju Wu  <jasonwucj@gmail.com>
11538         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11539         function.
11540         * config/nds32/nds32-multiple.md (strlensi): New pattern.
11541         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11543 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
11544             Kito Cheng  <kito.cheng@gmail.com>
11545             Chung-Ju Wu  <jasonwucj@gmail.com>
11547         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11548         UNSPEC_FFMISM and UNSPEC_FLMISM.
11549         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11550         for ffb, ffmism and flmism.
11551         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11552         (unspec_ffmism): Ditto.
11553         (unspec_flmism): Ditto.
11554         (nds32_expand_builtin_impl): Check if string extension is available.
11555         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11556         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11558 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
11560         Reverting patch:
11561         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11563         PR target/83712
11564         * lra-assigns.c (assign_by_spills): Return a flag of reload
11565         assignment failure.  Do not process the reload assignment
11566         failures.  Do not spill other reload pseudos if they has the same
11567         reg class.
11568         (lra_assign): Add a return arg.  Set up from the result of
11569         assign_by_spills call.
11570         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11571         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11572         usage_insns if it is not NULL.
11573         (spill_hard_reg_in_range): New function.
11574         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11575         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11576         function prototypes.
11577         (lra_assign): Change prototype.
11578         * lra.c (lra): Add code to deal with fails by splitting hard reg
11579         live ranges.
11581 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
11583         PR target/84807
11584         * config/i386/i386.opt: Replace Enforcment with Enforcement.
11586 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
11588         PR debug/84620
11589         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11590         (dw_val_node): Add val_symbolic_view.
11591         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11592         (symview_upper_bound): New.
11593         (new_line_info_table): Initialize symviews_since_reset.
11594         (dwarf2out_source_line): Count symviews_since_reset and set
11595         symview_upper_bound.
11596         (dw_val_equal_p): Handle symview.
11597         (add_AT_symview): New.
11598         (print_dw_val): Handle symview.
11599         (attr_checksum, attr_checksum_ordered): Likewise.
11600         (same_dw_val_p, size_of_die): Likewise.
11601         (value_format, output_die): Likewise.
11602         (add_high_low_attributes): Use add_AT_symview for entry_view.
11603         (dwarf2out_finish): Reset symview_upper_bound, clear
11604         zero_view_p.
11606 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
11608         PR target/83969
11609         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11610         Add strict argument and use it.
11611         (rs6000_split_multireg_move): Update for new strict argument.
11612         (mem_operand_gpr): Disallow all non-offsettable addresses.
11613         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11615 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
11617         PR target/84772
11618         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11619         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11620         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11622         PR c++/84767
11623         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11624         decl, use remap_type if we want to use the type.
11626 2018-03-09  Martin Sebor  <msebor@redhat.com>
11628         PR tree-optimization/84526
11629         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11630         Remove dead code.
11631         (builtin_access::generic_overlap): Be prepared to handle non-array
11632         base objects.
11634 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
11636         PR rtl-optimization/84682
11637         * lra-constraints.c (process_address_1): Check is_address flag
11638         for address constraints.
11639         (process_alt_operands): Likewise.
11640         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11641         preprocess_constraints.
11642         * recog.h (preprocess_constraints): Add oploc parameter.
11643         Adjust callers.
11644         * recog.c (preprocess_constraints): Test address_operand for
11645         CT_ADDRESS constraints.
11647 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11649         PR target/83712
11650         * lra-assigns.c (assign_by_spills): Return a flag of reload
11651         assignment failure.  Do not process the reload assignment
11652         failures.  Do not spill other reload pseudos if they has the same
11653         reg class.
11654         (lra_assign): Add a return arg.  Set up from the result of
11655         assign_by_spills call.
11656         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11657         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11658         usage_insns if it is not NULL.
11659         (spill_hard_reg_in_range): New function.
11660         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11661         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11662         function prototypes.
11663         (lra_assign): Change prototype.
11664         * lra.c (lra): Add code to deal with fails by splitting hard reg
11665         live ranges.
11667 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11669         PR target/83193
11670         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11671         Accept complain bool parameter.  Only emit errors if it is true.
11672         (arm_parse_cpu_option_name): Likewise.
11673         (arm_target_thumb_only): Adjust callers of the above.
11674         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11675         prototype to take a default true bool parameter.
11676         (arm_parse_arch_option_name): Likewise.
11678 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
11679             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
11681         PR jit/64089
11682         PR jit/84288
11683         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11684         * configure: Regenerate.
11685         * configure.ac ("linker --version-script option"): New.
11686         ("linker soname option"): New.
11688 2018-03-09  Richard Biener  <rguenther@suse.de>
11690         PR tree-optimization/84775
11691         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11692         immediate uses of predicate stmts and mark them modified.
11694         Revert
11695         PR tree-optimization/84178
11696         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11697         to caller.
11698         (version_loop_for_if_conversion): Delay update_ssa call.
11699         (tree_if_conversion): Delay update_ssa until after predicate
11700         insertion.
11702 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
11704         PR target/84763
11705         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11706         when the function accesses prior frames.
11708 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11710         PR debug/84456
11711         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11712         gen_llsym, otherwise call maybe_gen_llsym.
11714         PR inline-asm/84742
11715         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11716         has ',' character inside of it.
11718 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11720         PR target/84748
11721         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11722         as clobbering CC_REGNUM.
11724 2018-03-08  Richard Biener  <rguenther@suse.de>
11726         PR middle-end/84552
11727         * tree-scalar-evolution.c: Include tree-into-ssa.h.
11728         (follow_copies_to_constant): Do not follow SSA names registered
11729         for update.
11731 2018-03-08  Richard Biener  <rguenther@suse.de>
11733         PR tree-optimization/84178
11734         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11735         to caller.
11736         (version_loop_for_if_conversion): Delay update_ssa call.
11737         (tree_if_conversion): Delay update_ssa until after predicate
11738         insertion.
11740 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
11742         PR tree-optimization/84178
11743         * tree-if-conv.c (release_bb_predicate): Remove the
11744         the assertion that the stmts have NULL use_ops.
11745         Discard the statements, asserting that they haven't
11746         yet been added to a BB.
11748 2018-03-08  Richard Biener  <rguenther@suse.de>
11750         PR tree-optimization/84746
11751         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11752         (phi_translate): Pass in destination ANTIC_OUT set.
11753         (phi_translate_1): Likewise.  For a simplified result lookup
11754         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11755         (phi_translate_set): Adjust.
11756         (do_pre_regular_insertion): Likewise.
11757         (do_pre_partial_partial_insertion): Likewise.
11759 2018-03-08  Martin Liska  <mliska@suse.cz>
11761         PR gcov-profile/84735
11762         * doc/gcov.texi: Document usage of profile files.
11763         * gcov-io.h: Document changes in the format.
11765 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
11767         PR debug/84404
11768         PR debug/84408
11769         * dwarf2out.c (struct dw_line_info_table): Update comments for
11770         view == -1.
11771         (FORCE_RESET_NEXT_VIEW): New.
11772         (FORCE_RESETTING_VIEW_P): New.
11773         (RESETTING_VIEW_P): Check for -1 too.
11774         (ZERO_VIEW_P): Likewise.
11775         (new_line_info_table): Force-reset next view.
11776         (dwarf2out_begin_function): Likewise.
11777         (dwarf2out_source_line): Simplify zero_view_p initialization.
11778         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11779         view directly.  Omit view when omitting .loc at line 0.
11781 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11783         PR tree-optimization/84740
11784         * tree-switch-conversion.c (process_switch): Call build_constructors
11785         only if info.phi_count is non-zero.
11787         PR tree-optimization/84739
11788         * tree-tailcall.c (find_tail_calls): Check call arguments against
11789         DECL_ARGUMENTS (current_function_decl) rather than
11790         DECL_ARGUMENTS (func) when checking for tail recursion.
11792 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11794         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11795         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11796         Volker Reichelt's entry and add entries for people that perform
11797         GCC fuzzy testing and report numerous bugs.
11799 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
11801         PR target/82411
11802         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11803         readonly data in sdata, if that is disabled.
11804         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11805         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11806         -mreadonly-in-sdata option.
11808 2018-03-07  Martin Sebor  <msebor@redhat.com>
11810         PR tree-optimization/84468
11811         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11812         basic block when looking for nul assignment.
11814 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
11816         PR target/84277
11817         * except.h (output_function_exception_table): Adjust prototype.
11818         * except.c (output_function_exception_table): Remove FNNAME parameter
11819         and add SECTION parameter.  Ouput one part of the table at a time.
11820         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11821         the first part of the exception table and emit unwind directives.
11822         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11823         (i386_pe_seh_cold_init): Likewise.
11824         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11825         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11826         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11827         (ix86_output_call_insn): Emit a nop in one more case for SEH.
11828         * config/i386/winnt.c: Include except.h.
11829         (struct seh_frame_state): Add reg_offset, after_prologue and
11830         in_cold_section fields.
11831         (i386_pe_seh_end_prologue): Set seh->after_prologue.
11832         (i386_pe_seh_cold_init): New function.
11833         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11834         to seh->in_cold_section.
11835         (seh_emit_push): Record the offset of the push.
11836         (seh_emit_save): Record the offet of the save.
11837         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11838         Test seh->after_prologue to disregard the epilogue.
11839         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11840         (i386_pe_end_cold_function): New function.
11842 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11844         PR fortran/84565
11845         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11846         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11848         PR c++/84704
11849         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11850         on tmp_var.
11851         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11852         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11854         PR middle-end/84723
11855         * multiple_target.c: Include tree-inline.h and intl.h.
11856         (expand_target_clones): Diagnose and fail if node->definition and
11857         !tree_versionable_function_p (node->decl).
11859 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
11861         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11862         sprint_ul.
11863         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11864         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11865         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11867 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11869         PR target/84710
11870         * combine.c (try_combine): Use reg_or_subregno instead of handling
11871         just paradoxical SUBREGs and REGs.
11873 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
11875         * config/arc/arc.c (arc_finalize_pic): Remove function.
11876         (arc_must_save_register): We use single base PIC register, remove
11877         checks to save/restore the PIC register.
11878         (arc_expand_prologue): Likewise.
11879         * config/arc/arc-protos.h (arc_set_default_type_attributes):
11880         Remove.
11881         (arc_verify_short): Likewise.
11882         (arc_attr_type): Likewise.
11883         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11884         (walk_stores): Likewise.
11885         (arc_address_cost): Make it static.
11886         (arc_verify_short): Likewise.
11887         (branch_dest): Likewise.
11888         (arc_attr_type): Likewise.
11889         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11890         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11891         (arc_final_prescan_insn): Remove inserting the nops due to
11892         hardware hazards.  It is done in reorg step.
11893         (insn_length_variant_t): Remove.
11894         (insn_length_parameters_t): Likewise.
11895         (arc_insn_length_parameters): Likewise.
11896         (arc_get_insn_variants): Likewise.
11897         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11899 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11901         PR inline-asm/84683
11902         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11903         assertion failure.
11905         PR tree-optimization/84687
11906         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11907         on new_node->decl.
11908         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11910 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11912         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11913         Rename to ppc_speculation_barrier.
11914         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11915         __builtin_ppc_speculation_barrier.
11917 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11919         PR target/84700
11920         * combine.c (combine_simplify_rtx): Don't try to simplify if
11921         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11922         are equal to x.
11924 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
11926         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11927         to 32 bytes when compiling for POWER9.
11929 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11931         PR target/84564
11932         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11933         regparm >= 3 with no arg reg available also for calls with
11934         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
11936         PR target/84524
11937         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11938         orig,vex.
11939         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
11941 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
11943         PR target/84264
11944         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11946 2018-03-05  Richard Biener  <rguenther@suse.de>
11948         PR tree-optimization/84486
11949         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11950         When inserting a __builtin_assume_aligned call set the LHS
11951         SSA name alignment info accordingly.
11953 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
11955         PR tree-optimization/84114
11956         * config/aarch64/aarch64.c (aarch64_reassociation_width)
11957         Avoid reassociation of FLOAT_MODE addition.
11959 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
11961         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11962         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11963         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11964         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11965         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11966         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11967         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11968         and -mwbnoinvd.
11969         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11970         __builtin_ia32_wbinvd): New builtins.
11971         (SPECIAL_ARGS2): New.
11972         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11973         (SPECIAL_ARGS2): New.
11974         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11975         (ix86_valid_target_attribute_inner_p): Ditto.
11976         (ix86_init_mmx_sse_builtins): Add special_args2.
11977         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11978         TARGET_WBNOINVD_P): New.
11979         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11980         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11981         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11982         * config/i386/immintrin.h (_wbinvd): New intrinsic.
11983         * config/i386/pconfigintrin.h: New file.
11984         * config/i386/wbnoinvdintrin.h: Ditto.
11985         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11986         wbnoinvdintrin.h.
11987         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11989 2018-03-05  Richard Biener  <rguenther@suse.de>
11991         PR tree-optimization/84670
11992         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11993         member.
11994         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11995         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11996         (compute_antic_aux): Only assert the number of values in ANTIC_IN
11997         doesn't grow if all successors (recursively) were visited at least
11998         once.
12000 2018-03-05  Richard Biener  <rguenther@suse.de>
12002         PR tree-optimization/84650
12003         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12004         if executed in the loop pipeline.
12006 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
12008         * doc/configfiles.texi (Configuration Files): Move info about
12009         conditionalizing $target-protos.h to...
12010         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
12011         differs from $target-protos.h.
12013 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
12014             Chung-Ju Wu  <jasonwucj@gmail.com>
12016         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12017         * config/nds32/nds32-multiple.md (setmemsi): Define.
12018         * config/nds32/nds32-memory-manipulation.c
12019         (nds32_gen_dup_4_byte_to_word_value): New.
12020         (emit_setmem_word_loop): New.
12021         (emit_setmem_byte_loop): New.
12022         (nds32_expand_setmem_loop): New.
12023         (nds32_expand_setmem_loop_v3m): New.
12024         (nds32_expand_setmem_unroll): New.
12025         (nds32_expand_setmem): New.
12027 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12028             Chung-Ju Wu  <jasonwucj@gmail.com>
12030         * config/nds32/nds32-memory-manipulation.c
12031         (nds32_emit_load_store): New.
12032         (nds32_emit_post_inc_load_store): New.
12033         (nds32_emit_mem_move): New.
12034         (nds32_emit_mem_move_block): New.
12035         (nds32_expand_movmemsi_loop_unknown_size): New.
12036         (nds32_expand_movmemsi_loop_known_size): New.
12037         (nds32_expand_movmemsi_loop): New.
12038         (nds32_expand_movmemsi_unroll): New.
12039         (nds32_expand_movmemqi): Rename ...
12040         (nds32_expand_movmemsi): ... to this.
12041         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12042         (movmemsi): ... to this.
12043         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12044         (nds32_expand_movmemsi): ... to this.
12046 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12047             Monk Chiang  <sh.chiang04@gmail.com>
12048             Chung-Ju Wu  <jasonwucj@gmail.com>
12050         * config/nds32/nds32-protos.h
12051         (nds32_expand_load_multiple): New arguments.
12052         (nds32_expand_store_multiple): Ditto.
12053         (nds32_valid_multiple_load_store): Rename ...
12054         (nds32_valid_multiple_load_store_p): ... to this.
12055         * config/nds32/nds32-memory-manipulation.c
12056         (nds32_expand_load_multiple): Refine implementation.
12057         (nds32_expand_store_multiple): Ditto.
12058         * config/nds32/nds32-multiple.md
12059         (load_multiple): Update nds32_expand_load_multiple interface.
12060         (store_multiple): Update nds32_expand_store_multiple interface.
12061         * config/nds32/nds32-predicates.c
12062         (nds32_valid_multiple_load_store): Rename ...
12063         (nds32_valid_multiple_load_store_p): ... to this and refine
12064         implementation.
12065         * config/nds32/predicates.md
12066         (nds32_load_multiple_and_update_address_operation): New predicate.
12067         (nds32_store_multiple_and_update_address_operation): New predicate.
12069 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12070             Chung-Ju Wu  <jasonwucj@gmail.com>
12072         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12073         (combo): New attribute.
12074         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12076 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12078         * config/nds32/nds32.opt: Change -mcmodel= default value.
12080 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
12081             Monk Chiang  <sh.chiang04@gmail.com>
12082             Chung-Ju Wu  <jasonwucj@gmail.com>
12084         * config/nds32/constants.md (unspec_element): New enum.
12085         * config/nds32/constraints.md (Umw): New constraint.
12086         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12087         * config/nds32/nds32-intrinsic.md: Likewise.
12088         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12089         (nds32_valid_smw_lwm_base_p): New.
12090         (nds32_output_smw_single_word): New.
12091         (nds32_output_lmw_single_word): New.
12092         (nds32_expand_unaligned_load): New.
12093         (nds32_expand_unaligned_store): New.
12094         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12095         (nds32_output_smw_single_word): Declare.
12096         (nds32_output_lmw_single_word): Declare.
12097         (nds32_expand_unaligned_load): Declare.
12098         (nds32_expand_unaligned_store): Declare.
12099         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12100         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12101         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12102         NDS32_BUILTIN_UASTORE_DW.
12103         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12104         predicate.
12106 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
12107             Kito Cheng  <kito.cheng@gmail.com>
12108             Chung-Ju Wu  <jasonwucj@gmail.com>
12110         * config/nds32/nds32-intrinsic.c
12111         (nds32_expand_builtin_null_ftype_reg): Delete.
12112         (nds32_expand_builtin_reg_ftype_imm): Ditto.
12113         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12114         (nds32_read_argument): New.
12115         (nds32_legitimize_target): Ditto.
12116         (nds32_legitimize_argument): Ditto.
12117         (nds32_check_constant_argument): Ditto.
12118         (nds32_expand_unop_builtin): Ditto.
12119         (nds32_expand_unopimm_builtin): Ditto.
12120         (nds32_expand_binop_builtin): Ditto.
12121         (nds32_builtin_decl_impl): Ditto.
12122         (builtin_description): Ditto.
12123         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12124         (nds32_init_builtins_impl): Ditto.
12125         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12126         (nds32_builtin_decl): New.
12127         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12128         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12130 2018-03-02  Jeff Law  <law@redhat.com>
12132         * reorg.c (stop_search_p): Handle DEBUG_INSN.
12133         (redundant_insn, fill_simple_delay_slots): Likewise.
12134         (fill_slots_from_thread): Likewise.
12135         * resource.c (mark_referenced_resources): Likewise.
12136         (mark_set_resources, find_dead_or_set_registers): Likewise.
12138 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12140         * substring-locations.h (format_warning_va): Formatting fix for
12141         ATTRIBUTE_GCC_DIAG.
12142         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12143         argument.
12144         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12145         * substring-locations.c: Include intl.h.
12146         (format_warning_va): Turned into small wrapper around
12147         format_warning_n_va, renamed to ...
12148         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12149         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12150         use ngettext.
12151         (format_warning_at_substring_n): New function.
12152         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12153         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
12154         format_warning_at_substring with just a shorter name instead of
12155         const function pointer.
12156         (fmtwarn_n): New function.
12157         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12158         appropriate, get rid of all the fmtstr temporaries, move conditionals
12159         with G_() wrapped string literals directly into fmtwarn arguments,
12160         cast dir.len to (int), formatting fixes.
12162 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
12164         * doc/invoke.texi: Remove "Cilk Plus" references.
12166 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12167             Richard Biener  <rguenther@suse.de>
12169         PR ipa/84628
12170         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12171         for error or warning attributes if CALL_FROM_THUNK_P is set.
12172         Formatting fixes.
12174 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12176         PR target/56540
12177         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12178         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12180         PR target/56540
12181         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12182         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12184         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12185         instead of -1U in last predictors element's probability member.
12187 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12189         PR ipa/83983
12190         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12191         arguments if they are comparable.
12193 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12195         PR tree-optimization/84634
12196         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12197         masks and masked_loop_p with a single loop_masks, making sure it's
12198         null for bb vectorization.
12200 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12202         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12203         (vect_analyze_data_ref_access): Use loop->safe_len rather than
12204         loop->force_vectorize to check whether there is no alias.
12206 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12208         PR target/84614
12209         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12210         prototypes.
12211         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12212         comments.
12213         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12214         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12215         instead of a loop around prev_real_insn.
12216         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12217         prev_real_insn.
12219         PR inline-asm/84625
12220         * config/i386/i386.c (ix86_print_operand): Use conditional
12221         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12222         zero vector.
12224 2018-03-02  Richard Biener  <rguenther@suse.de>
12226         PR tree-optimization/84427
12227         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12228         (bitmap_set_subtract_values): Rewrite to handle multiple
12229         exprs per value.
12230         (clean): Likewise.
12231         (prune_clobbered_mems): Likewise.
12232         (phi_translate): Take edge instead of pred/phiblock.
12233         (phi_translate_1): Likewise.
12234         (phi_translate_set): Likewise.  Insert all translated
12235         exprs for a value into the set, keeping possibly multiple
12236         expressions per value.
12237         (compute_antic_aux): Adjust for phi_translate changes.
12238         When intersecting union the expressions and prune those
12239         not in the final value set, keeping possibly multiple
12240         expressions per value.  Do not use value-insertion
12241         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12242         all expressions.  Add verification that the value-sets
12243         only shrink during iteration.
12244         (compute_partial_antic_aux): Adjust for the phi_translate changes.
12245         (do_pre_regular_insertion): Likewise.
12246         (do_pre_partial_partial_insertion): Likewise.
12248 2018-03-02  Richard Biener  <rguenther@suse.de>
12250         PR target/82005
12251         * config/darwin.c (saved_debug_info_level): New static global.
12252         (darwin_asm_lto_start): Disable debug info generation for LTO out.
12253         (darwin_asm_lto_end): Restore debug info generation settings.
12255 2018-03-01  Martin Liska  <mliska@suse.cz>
12257         PR sanitizer/82484
12258         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12259         volatile arguments.
12261 2018-03-01  Richard Biener  <rguenther@suse.de>
12263         PR debug/84645
12264         * dwarf2out.c (gen_variable_die): Properly handle late VLA
12265         type annotation with LTO when debug was disabled at compile-time.
12267 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
12269         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12270         XINT with INTVAL.
12271         (mips_final_postscan_insn): Likewise.
12273 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
12275         PR rtl-optimization/84528
12276         * alias.c (init_alias_target): Add commentary.
12277         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12278         a unique base value if the frame pointer is not eliminated
12279         to the stack pointer.
12281 2018-03-01  Tom de Vries  <tom@codesourcery.com>
12283         PR rtl-optimization/83327
12284         * lra-int.h (hard_regs_spilled_into): Declare.
12285         * lra.c (hard_regs_spilled_into): Define.
12286         (init_reg_info): Init hard_regs_spilled_into.
12287         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12288         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12289         (process_bb_lives): Handle hard_regs_spilled_into.
12290         (lra_create_live_ranges_1): Before doing liveness propagation, clear
12291         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12293 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
12295         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12296         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12297         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12298         * config/rs6000/aix72.h: New file.
12300 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
12302         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12303         instead of warning_at with conditional singular and plural messages
12304         where possible.
12306         PR target/52991
12307         * stor-layout.c (update_alignment_for_field): For
12308         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12309         && !DECL_PACKED (field), do the alignment update, just use
12310         only desired_align instead of MAX (type_align, desired_align)
12311         as the alignment.
12312         (place_field): Don't do known_align < desired_align handling
12313         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12314         is non-NULL, instead do it after rli->prev_field handling and
12315         only if not within a bitfield word.  For DECL_PACKED (field)
12316         use type_align of BITS_PER_UNIT.
12318 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
12320         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12321         superfluous parentheses and trailing spaces.
12323 2018-02-28  Richard Biener  <rguenther@suse.de>
12325         PR tree-optimization/84584
12326         * graphite-scop-detection.c (scop_detection::add_scop): Discard
12327         SCoPs with fake exit edge.
12329 2018-02-28  Martin Liska  <mliska@suse.cz>
12331         PR testsuite/84597
12332         * timevar.c (timer::print): Fix format to properly print 100%
12333         values.
12335 2018-02-28  Richard Biener  <rguenther@suse.de>
12337         PR middle-end/84607
12338         * genmatch.c (capture_info::walk_match): Do not mark
12339         captured expressions without operands as expr_p given
12340         they act more like predicates and should be subject to
12341         "lost tail" side-effect preserving.
12343 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
12345         PR rtl-optimization/81611
12346         * auto-inc-dec.c (attempt_change): Move dead note from
12347         mem_insn if it's the next use of regno
12348         (find_address): Take address use of reg holding
12349         non-incremented value.  Add parm to limit search to the named
12350         reg only.
12351         (merge_in_block): Attempt to use a mem insn that is the next
12352         use of the original regno.
12354 2018-02-27  Martin Sebor  <msebor@redhat.com>
12356         PR c++/83871
12357         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12358         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12360 2018-02-27  Martin Sebor  <msebor@redhat.com>
12362         PR translation/84207
12363         * diagnostic-core.h (warning_n, error_n, inform_n): Change
12364         n argument to unsigned HOST_WIDE_INT.
12365         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12366         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
12367         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12368         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12370 2018-02-27  Richard Biener  <rguenther@suse.de>
12372         PR tree-optimization/84512
12373         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12374         Do not use the estimate returned from record_stmt_cost for
12375         the scalar iteration cost but sum properly using add_stmt_cost.
12377 2018-02-27  Richard Biener  <rguenther@suse.de>
12379         PR tree-optimization/84466
12380         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12381         Adjust last change to less strictly validate use operands.
12383 2018-02-27  Martin Liska  <mliska@suse.cz>
12385         PR gcov-profile/84548
12386         * gcov.c (process_file): Allow partial overlap and consider it
12387         also as group functions.
12388         (output_lines): Properly calculate range of lines for a group.
12390 2018-02-27  Martin Liska  <mliska@suse.cz>
12392         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12393         'ggc' suffixes.  Change first column width.
12394         (timer::print): Fix formatting of the column.
12396 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
12398         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12399         preserve inline entry blocks for the sake of debug inline
12400         entry point markers alone.
12401         (remove_unused_locals): Suggest in comments a better place to
12402         force the preservation of inline entry blocks that are
12403         otherwise unused, but do not preserve them.
12405 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12407         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12409 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12411         PR target/84039
12412         * config/i386/constraints.md (Bs): Replace
12413         ix86_indirect_branch_register with
12414         TARGET_INDIRECT_BRANCH_REGISTER.
12415         (Bw): Likewise.
12416         * config/i386/i386.md (indirect_jump): Likewise.
12417         (tablejump): Likewise.
12418         (*sibcall_memory): Likewise.
12419         (*sibcall_value_memory): Likewise.
12420         Peepholes of indirect call and jump via memory: Likewise.
12421         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12422         (*sibcall_value_GOT_32): Likewise.
12423         * config/i386/predicates.md (indirect_branch_operand): Likewise.
12424         (GOT_memory_operand): Likewise.
12425         (call_insn_operand): Likewise.
12426         (sibcall_insn_operand): Likewise.
12427         (GOT32_symbol_operand): Likewise.
12428         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12430 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
12432         PR rtl-optimization/83496
12433         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12434         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
12435         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12436         redundant insn, if any.
12437         (relax_delay_slots): Likewise.
12438         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12440 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
12442         PR tree-optimization/83965
12443         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12444         that grouped statements are part of a reduction chain.  Return
12445         true if the statement is not marked as a reduction itself but
12446         is part of a group.
12447         (vect_recog_dot_prod_pattern): Don't check whether the statement
12448         is part of a group here.
12449         (vect_recog_sad_pattern): Likewise.
12450         (vect_recog_widen_sum_pattern): Likewise.
12452 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
12454         PR debug/84545
12455         * final.c (rest_of_clean_state): Also look for calls inside sequences.
12457 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12459         PR target/84530
12460         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12461         the bool argument.
12462         (ix86_output_indirect_function_return): New prototype.
12463         (ix86_split_simple_return_pop_internal): Likewise.
12464         * config/i386/i386.c (indirect_return_via_cx): New.
12465         (indirect_return_via_cx_bnd): Likewise.
12466         (indirect_thunk_name): Handle return va CX_REG.
12467         (output_indirect_thunk_function): Create alias for
12468         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12469         (ix86_output_indirect_jmp): Remove the bool argument.
12470         (ix86_output_indirect_function_return): New function.
12471         (ix86_split_simple_return_pop_internal): Likewise.
12472         * config/i386/i386.md (*indirect_jump): Don't pass false
12473         to ix86_output_indirect_jmp.
12474         (*tablejump_1): Likewise.
12475         (simple_return_pop_internal): Change it to define_insn_and_split.
12476         Call ix86_split_simple_return_pop_internal to split it for
12477         -mfunction-return=.
12478         (simple_return_indirect_internal): Call
12479         ix86_output_indirect_function_return instead of
12480         ix86_output_indirect_jmp.
12482 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
12484         PR bootstrap/84405
12485         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12486         memset and value initialization afterwards.
12488 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
12490         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12492 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12494         PR target/84521
12495         * common/config/aarch64/aarch64-common.c
12496         (aarch_option_optimization_table[]): Switch
12497         off fomit-frame-pointer
12499 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
12500             Chung-Ju Wu  <jasonwucj@gmail.com>
12502         * config/nds32/nds32-multiple.md (load_multiple): Disallow
12503         volatile memory.
12504         (store_multiple): Ditto.
12506 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
12508         * config.gcc: Add --with-cpu support for nds32 target.
12509         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12510         * config/nds32/nds32.opt: Add -mcpu= option.
12512 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
12514         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12515         isel=yes): Warn for these deprecated options.
12517 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
12519         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12520         ISA_2_5_MASKS_EMBEDDED.
12522 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
12524         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12525         p->max as pointers rather than using iterative_hash_expr.
12527 2018-02-23  Carl Love  <cel@us.ibm.com>
12529         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12530         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12531         BU_P8V_OVERLOAD_2.
12532         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12533         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12534         P8V_BUILTIN_VEC_VUNSIGNED2.
12536 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
12538         PR target/81572
12539         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12540         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12541         LRA_UNKNOWN_ALT.
12542         * lra-constraints.c (curr_insn_transform): Set up
12543         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
12544         LRA_UNKNOWN_ALT.
12545         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12546         * lra-eliminations.c (spill_pseudos): Ditto.
12547         (process_insn_for_elimination): Ditto.
12548         * lra-lives.c (reg_early_clobber_p): Use the new macros.
12549         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12550         LRA_NON_CLOBBERED_ALT.
12552 2018-02-22  Martin Sebor  <msebor@redhat.com>
12554         PR tree-optimization/84480
12555         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12556         to maybe_diag_stxncpy_trunc.  Call it.
12557         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12558         from gimple_fold_builtin_strcpy.  Print inlining stack.
12559         (handle_builtin_stxncpy): Print inlining stack.
12560         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12562 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
12564         PR target/84176
12565         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12566         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12567         and -fcheck-pointer-bounds are used together.
12568         (indirect_thunk_prefix): New enum.
12569         (indirect_thunk_need_prefix): New function.
12570         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
12571         "_nt" instead of "_bnd" for NOTRACK prefix.
12572         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12573         (output_indirect_thunk_function): Likewise.
12574         (): Likewise.
12575         (ix86_code_end): Update output_indirect_thunk_function calls.
12576         (ix86_output_indirect_branch_via_reg): Replace
12577         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12578         (ix86_output_indirect_branch_via_push): Likewise.
12579         (ix86_output_function_return): Likewise.
12580         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12581         incompatible with -fcf-protection=branch and
12582         -fcheck-pointer-bounds.
12584 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12586         PR target/83335
12587         * config/aarch64/aarch64.c (aarch64_print_address_internal):
12588         Change gcc_assert call to output_operand_lossage.
12590 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12592         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12594 2018-02-22  DJ Delorie  <dj@redhat.com>
12595             Sebastian Perta  <sebastian.perta@renesas.com>
12596             Oleg Endo  <olegendo@gcc.gnu.org>
12598         * config/rx/rx.c (rx_rtx_costs): New function.
12599         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12601 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12603         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12605 2018-02-22  Martin Liska  <mliska@suse.cz>
12607         PR driver/83193
12608         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12609         Add "native" as a possible value.
12611 2018-02-22  Martin Liska  <mliska@suse.cz>
12613         PR driver/83193
12614         * config/i386/i386.c (ix86_option_override_internal):
12615         Add "native" as a possible value for -march and -mtune.
12617 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
12619         PR target/84502
12620         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12621         to all type variants.
12623         PR tree-optimization/84503
12624         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12625         width as info->bitpos + info->bitsize - start.
12626         (merged_store_group::merge_overlapping): Simplify width computation.
12627         (check_no_overlap): New function.
12628         (imm_store_chain_info::try_coalesce_bswap): Compute expected
12629         start + width and last_order of the group, fail if check_no_overlap
12630         fails.
12631         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12632         to group if check_no_overlap fails.
12634 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12636         * config/rs6000/altivec.md: Delete contraint arguments to
12637         define_expand, define_split, and define_peephole2, and in
12638         define_insn_and_split if always unused.
12639         * config/rs6000/darwin.md: Ditto.
12640         * config/rs6000/dfp.md: Ditto.
12641         * config/rs6000/rs6000.md: Ditto.
12642         * config/rs6000/sync.md: Ditto.
12643         * config/rs6000/vector.md: Ditto.
12644         * config/rs6000/vsx.md: Ditto.
12646 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12648         * config/rs6000/altivec.md: Write output control strings as braced
12649         blocks instead of double-quoted strings.
12650         * config/rs6000/darwin.md: Ditto.
12651         * config/rs6000/rs6000.md: Ditto.
12652         * config/rs6000/vector.md: Ditto.
12653         * config/rs6000/vsx.md: Ditto.
12655 2018-02-21  Jason Merrill  <jason@redhat.com>
12657         PR c++/84314 - ICE with templates and fastcall attribute.
12658         * attribs.c (build_type_attribute_qual_variant): Remove assert.
12660 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12662         * ipa-cp.c (determine_versionability): Fix comment typos.
12664 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12666         PR c/84229
12667         * ipa-cp.c (determine_versionability): Do not version functions caling
12668         va_arg_pack.
12670 2018-02-21  Martin Liska  <mliska@suse.cz>
12672         PR driver/83193
12673         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12674         Add "native" as a possible value.
12675         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
12676         the macro when native cpu detection is available.
12678 2018-02-21  Martin Liska  <mliska@suse.cz>
12680         PR driver/83193
12681         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12682         Add "native" as a possible value.
12683         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12684         when native cpu detection is available.
12686 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
12687             Martin Sebor  <msebor@redhat.com>
12689         PR tree-optimization/84478
12690         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12691         false.
12692         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12693         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12694         support which is conservatively correct, for 2 only stay conservative
12695         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
12696         argument to the 2 argument get_range_strlen, adjust 6 arg
12697         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12698         false.
12699         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12700         (gimple_fold_builtin_strlen): Pass true as last argument to
12701         get_range_strlen.
12703 2018-02-20  Martin Sebor  <msebor@redhat.com>
12705         PR middle-end/84095
12706         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12707         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
12708         (builtin_memref::builtin_memref): Factor out parts into
12709         set_base_and_offset and call it.
12711 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12713         PR middle-end/84406
12714         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12715         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12716         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
12717         search at the associated MODE_INT.
12719 2018-02-20  Jeff Law  <law@redhat.com>
12721         PR middle-end/82123
12722         PR tree-optimization/81592
12723         PR middle-end/79257
12724         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12725         for range data rather than using global data.
12726         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12727         range data rather than using global data.
12728         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12729         pass it to children as needed.
12730         (struct directive::fmtresult): Similarly.
12731         (struct directive::set_width): Similarly.
12732         (struct directive::set_precision): Similarly.
12733         (format_integer, format_directive, parse_directive): Similarly.
12734         (format_none): Accept unnamed vr_values parameter.
12735         (format_percent, format_floating, format_character): Similarly.
12736         (format_string, format_plain): Similarly.
12737         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12738         the EVRP range analyzer for range data rather than using global data.
12739         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12740         gimple-ssa-evrp-analyze.h
12741         (class sprintf_dom_walker): Add after_dom_children member function.
12742         Add evrp_range_analyzer member.
12743         (sprintf_dom_walker::before_dom_children): Call into the EVRP
12744         range analyzer as needed.
12745         (sprintf_dom_walker::after_dom_children): New member function.
12746         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12747         if not optimizing.
12748         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12749         (evrp_range_analyzer::pop_to_marker): Likewise.
12751 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12753         PR tree-optimization/84419
12754         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12755         with the required type if its current type is compatible but
12756         different.
12758 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
12760         PR middle-end/82004
12761         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12762         after vectorization.
12764 2018-02-20  Martin Liska  <mliska@suse.cz>
12766         PR driver/83193
12767         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12768         possible values if we don't have a hint.
12770 2018-02-20  Martin Liska  <mliska@suse.cz>
12772         PR c/84310
12773         PR target/79747
12774         * final.c (shorten_branches): Build align_tab array with one
12775         more element.
12776         * opts.c (finish_options): Add alignment option limit check.
12777         (MAX_CODE_ALIGN): Likewise.
12778         (MAX_CODE_ALIGN_VALUE): Likewise.
12779         * doc/invoke.texi: Document maximum allowed option value for
12780         all -falign-* options.
12782 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
12784         PR target/84146
12785         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12786         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12787         * var-tracking.c (emit_note_insn_var_location): Remove all references
12788         to NOTE_INSN_CALL_ARG_LOCATION.
12789         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12790         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12791         Use copy_rtx_if_shared.
12792         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12793         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12794         (dwarf2out_var_location): Remove handling of
12795         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12796         on call_insn.
12797         * final.c (final_scan_insn): Remove all references to
12798         NOTE_INSN_CALL_ARG_LOCATION.
12799         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
12800         before dumping final insns.
12801         * except.c (emit_note_eh_region_end): Remove all references to
12802         NOTE_INSN_CALL_ARG_LOCATION.
12803         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12804         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12805         * config/arc/arc.c (hwloop_optimize): Likewise.
12806         * config/arm/arm.c (create_fix_barrier): Likewise.
12807         * config/s390/s390.c (s390_chunkify_start): Likewise.
12808         * config/sh/sh.c (find_barrier): Likewise.
12809         * config/i386/i386.c (rest_of_insert_endbranch,
12810         ix86_seh_fixup_eh_fallthru): Likewise.
12811         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12812         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12813         * config/frv/frv.c (frv_function_prologue): Likewise.
12814         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
12815         reg note.
12816         (note_outside_basic_block_p): Remove all references to
12817         NOTE_INSN_CALL_ARG_LOCATION.
12818         * gengtype.c (adjust_field_rtx_def): Likewise.
12819         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12820         Likewise.
12821         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12822         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12824         PR c++/84444
12825         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12826         is ADDR_EXPR.
12828         PR tree-optimization/84452
12829         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12830         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12831         is NULL.
12833 2018-02-19  Martin Liska  <mliska@suse.cz>
12835         PR sanitizer/82183
12836         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12838 2018-02-19  Martin Liska  <mliska@suse.cz>
12839             Richard Sandiford  <richard.sandiford@linaro.org>
12841         PR tree-optimization/82491
12842         * gimple-fold.c (get_base_constructor): Make earlier bail out
12843         to prevent ubsan.
12845 2018-02-19  Carl Love  <cel@us.ibm.com>
12847         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12848         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12849         BU_P8V_OVERLOAD_1.
12850         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12851         P8V_BUILTIN_VEC_NEG.
12853 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
12855         * config/rl78/rl78.md (movdf): New define expand.
12857 2018-02-19  Martin Liska  <mliska@suse.cz>
12859         PR other/80589
12860         * doc/invoke.texi: Fix typo.
12861         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12863 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
12865         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12866         handle rs6000_single_float and rs6000_double_float specially for
12867         e500 family CPUs.
12869 2018-02-16  Jeff Law  <law@redhat.com>
12871         * config/rx/rx.c (add_pop_cfi_notes): New function.;
12872         (pop_regs): Use it.
12874 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12876         PR ipa/84425
12877         * ipa-inline.c (inline_small_functions): Fix a typo.
12879 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12881         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12883 2018-02-16  Carl Love  <cel@us.ibm.com>
12885         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12886         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12887         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12888         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12889         expansion to P8V_BUILTIN_VEC_FLOAT2.
12891 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
12893         PR rtl-optimization/70023
12894         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12895         src_regno into account.
12897 2018-02-16  Carl Love  <cel@us.ibm.com>
12899         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12900         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12901         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12902         * config/rs6000/rs6000.c: Remove case statements for
12903         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12904         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12905         and P9V_BUILTIN_VEC_VINSERT4B.
12906         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12907         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12908         * config/rs6000/vsx.md:
12909         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12910         vec_insert4b.
12912 2018-02-16  Carl Love  <cel@us.ibm.com>
12914         * config/rs6000/altivec.h: Add builtin names vec_extract4b
12915         vec_insert4b.
12916         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12917         definitions.
12918         * config/rs6000/rs6000-c.c: Add the definitions for
12919         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12920         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12921         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12922         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
12923         definition for insert4b and define insn *insert3b_internal.
12924         * doc/extend.texi: Add documentation for vec_extract4b.
12926 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12928         * doc/extend.texi (Backwards Compatibility): Mention friend
12929         injection.  Note for-scope is deprecated.
12930         * doc/invoke.texi (-ffriend-injection): Deprecate.
12932 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
12934         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12935         that moved to I2, also allow destinations that are a paradoxical
12936         subreg (instead of a normal reg).
12938 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
12940         PR target/83831
12941         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12942         to QImode.
12944 2018-02-16  Richard Biener  <rguenther@suse.de>
12946         PR tree-optimization/84037
12947         PR tree-optimization/84016
12948         PR target/82862
12949         * config/i386/i386.c (ix86_builtin_vectorization_cost):
12950         Adjust vec_construct for the fact we need additional higher latency
12951         128bit inserts for AVX256 and AVX512 vector builds.
12952         (ix86_add_stmt_cost): Scale vector construction cost for
12953         elementwise loads.
12955 2018-02-16  Richard Biener  <rguenther@suse.de>
12957         PR tree-optimization/84417
12958         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12959         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12960         (non_rewritable_lvalue_p): Likewise, use poly-ints.
12962 2018-02-16  Martin Liska  <mliska@suse.cz>
12964         PR sanitizer/84307
12965         * internal-fn.def (ASAN_CHECK): Set proper flags.
12966         (ASAN_MARK): Likewise.
12968 2018-02-16  Julia Koval  <julia.koval@intel.com>
12970         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12971         from PTA_CANNONLAKE.
12973 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12975         PR target/84272
12976         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12977         Use ++iter rather than iter++ for std::list iterators.
12978         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
12979         defer deleting them until all nodes in the forest are processed.  Do
12980         free even leaf nodes.  Change to_process into auto_vec.
12982         PR bootstrap/84405
12983         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12984         * vec.h (vec_default_construct): Use memset instead of placement new
12985         if BROKEN_VALUE_INITIALIZATION is defined.
12986         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12987         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12988         is defined.
12990         PR rtl-optimization/83723
12991         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12992         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
12993         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
12994         recursive calls.
12995         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12996         callers.
12997         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12999 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
13001         PR rtl-optimization/81443
13002         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13003         from inner REGs to paradoxical SUBREGs.
13005 2018-02-16  Richard Biener  <rguenther@suse.de>
13007         PR tree-optimization/84399
13008         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13009         For operands we can analyze at their definition make sure we can
13010         analyze them at each use as well.
13012 2018-02-16  Richard Biener  <rguenther@suse.de>
13014         PR tree-optimization/84190
13015         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13016         volatile accesses if the decl isn't volatile.
13018 2018-02-15  Jason Merrill  <jason@redhat.com>
13020         PR c++/84314 - ICE with templates and fastcall attribute.
13021         * attribs.c (build_type_attribute_qual_variant): Don't clobber
13022         TYPE_CANONICAL on an existing type.
13024 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
13026         PR tree-optimization/84383
13027         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13028         dstoff nor call operand_equal_p if dstbase is NULL.
13030         PR tree-optimization/84334
13031         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13032         also a CONSTANT_CLASS_P, punt.
13034 2018-02-14  Jim Wilson  <jimw@sifive.com>
13036         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13037         first SMALL_OPERAND check.  New local min_second_step.  Move assert
13038         to where locals are set.  Add TARGET_RVC support.
13039         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13041 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
13043         * doc/invoke.texi: Correct -Wformat-overflow code sample.
13045 2018-02-14  Martin Sebor  <msebor@redhat.com>
13047         PR tree-optimization/83698
13048         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13049         arrays constrain the offset range to their bounds.
13050         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13051         (builtin_access::overlap): Avoid setting the size of overlap if it's
13052         already been set.
13053         (maybe_diag_overlap): Also consider arrays when deciding what values
13054         of offsets to include in diagnostics.
13056 2018-02-14  Martin Sebor  <msebor@redhat.com>
13058         PR c/84108
13059         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13060         that correspond to the kind of a declaration.
13062 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
13064         PR target/83984
13065         * config/pa/pa.md: Load address of PIC label using the linkage table
13066         if the label is nonlocal.
13068 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13070         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13071         warning message if user requests -maltivec=be.
13072         * doc/invoke.texi: Document deprecation of -maltivec=be.
13074 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
13076         PR target/84220
13077         * config/rs6000/rs6000-c.c: Update definitions for
13078         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13079         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13081 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13083         PR target/84239
13084         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13085         add _get_ssp intrinsics. Remove argument from
13086         __builtin_ia32_rdssp[d|q].
13087         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13088         * config/i386/i386-builtin.def: Remove argument from
13089         __builtin_ia32_rdssp[d|q].
13090         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13091         ix86_expand_special_args_builtin for _rdssp[d|q].
13092         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13093         Clear register before usage.
13094         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13095         Add documentation for new _get_ssp and _inc_ssp intrinsics.
13097 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
13099         PR tree-optimization/84357
13100         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13101         operand 1 of an ARRAY_REF too.
13103 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
13105         PR target/83831
13106         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13107         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13108         declarations.
13109         (set_of_reg): New struct.
13110         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13111         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13112         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13113         functions.
13114         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13115         Split into bitclr, bitset, bitinvert patterns if appropriate.
13116         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13117         use rx_fuse_in_memory_bitop.
13118         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13119         to named insn, correct maximum insn length.
13121 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
13123         PR target/79242
13124         * machmode.def: Define a complex mode for PARTIAL_INT.
13125         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13126         MODE_PARTIAL_INT.
13127         * doc/rtl.texi: Document CSPImode.
13128         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13129         handling.
13130         (msp430_hard_regno_nregs_with_padding): Likewise.
13132 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
13134         PR target/84279
13135         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13137 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
13139         PR rtl-optimization/84169
13140         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
13141         we generated a parallel as new i3 and we split that to new i2 and i3
13142         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
13143         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
13144         those to i2, not i1.  Partially rewrite this scan code.
13146 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13148         PR c/82210
13149         * stor-layout.c (place_field): For variable length fields, adjust
13150         offset_align afterwards not just based on the field's alignment,
13151         but also on the size.
13153         PR middle-end/84309
13154         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13155         of exps and logs in the use_exp2 case.
13157 2018-02-13  Jeff Law  <law@redhat.com>
13159         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13160         entry for "vector".
13162         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13163         ARGS as unused.
13165 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
13167         PR debug/84342
13168         PR debug/84319
13169         * common.opt (gas-loc-support, gas-locview-support): New.
13170         (ginline-points, ginternal-reset-location-views): New.
13171         * doc/invoke.texi: Document them.  Use @itemx where intended.
13172         (gvariable-location-views): Adjust.
13173         * target.def (reset_location_view): New.
13174         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13175         (TARGET_RESET_LOCATION_VIEW): New.
13176         * doc/tm.texi: Rebuilt.
13177         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13178         (dwarf2out_default_as_locview_support): New.
13179         (output_asm_line_debug_info): Use option variables.
13180         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13181         (output_loc_list): Likewise.
13182         (add_high_low_attributes): Check option variables.
13183         Don't output entry view attribute in strict mode.
13184         (gen_inlined_subroutine_die): Check option variables.
13185         (dwarf2out_inline_entry): Likewise.
13186         (init_sections_and_labels): Likewise.
13187         (dwarf2out_early_finish): Likewise.
13188         (maybe_reset_location_view): New, from...
13189         (dwarf2out_var_location): ... here.  Call it.
13190         * debug.h (dwarf2out_default_as_loc_support): Declare.
13191         (dwarf2out_default_as_locview_support): Declare.
13192         * hooks.c (hook_int_rtx_insn_0): New.
13193         * hooks.h (hook_int_rtx_insn_0): Declare.
13194         * toplev.c (process_options): Take -gas-loc-support and
13195         -gas-locview-support from dwarf2out.  Enable
13196         -gvariable-location-views by default only with locview
13197         assembler support.  Enable -ginternal-reset-location-views by
13198         default only if the target defines the corresponding hook.
13199         Enable -ginline-points by default if location views are
13200         enabled; force it disabled if statement frontiers are
13201         disabled.
13202         * tree-inline.c (expand_call_inline): Check option variables.
13203         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13205 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
13207         PR tree-optimization/84321
13208         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13209         handling.  Also check whether the anti-range contains any values
13210         that satisfy the mask; switch to a VR_RANGE if not.
13212 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
13214         PR sanitizer/84340
13215         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13217 2018-02-13  Martin Jambor  <mjambor@suse.cz>
13219         PR c++/83990
13220         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13221         of call statements, also set location of a load to a temporary.
13223 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
13225         * config/rl78/rl78.c (add_vector_labels): New function.
13226         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13227         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13228         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13229         which checks that no arguments are passed.
13230         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13231         * doc/extend.texi: Documentation for the new attribute.
13233 2018-02-13  Andreas Schwab  <schwab@suse.de>
13235         * config/riscv/linux.h (CPP_SPEC): Define.
13237 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13239         PR target/84335
13240         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13241         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13242         OPTION_MASK_ISA_AES as first argument to def_builtin_const
13243         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13244         instead of OPTION_MASK_ISA_PCLMUL as first argument to
13245         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13246         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13247         temporarily for AES and PCLMUL builtins.
13249         PR tree-optimization/84339
13250         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13251         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13252         Formatting fixes.
13254         PR middle-end/84309
13255         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13256         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13257         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13258         inline function.
13259         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13260         inline function.
13261         * omp-simd-clone.h: New file.
13262         * omp-simd-clone.c: Include omp-simd-clone.h.
13263         (expand_simd_clones): No longer static.
13264         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13265         cgraph.h and omp-simd-clone.h.
13266         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13267         (vect_recog_widen_shift_pattern): Formatting fix.
13268         (vect_pattern_recog_1): Don't check optab for calls.
13270         PR target/84336
13271         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13272         operands[2] into a REG before using gen_lowpart on it.
13274 2018-02-12  Jeff Law  <law@redhat.com>
13276         PR target/83760
13277         * config/sh/sh.c (find_barrier): Consider a sibling call
13278         a barrier as well.
13280         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13281         successfully back substituting a reg.
13283 2018-02-12  Richard Biener  <rguenther@suse.de>
13285         PR tree-optimization/84037
13286         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13287         parameter, move visited init to caller.
13288         (vect_slp_analyze_operations): Separate cost from validity
13289         check, initialize visited once for all instances.
13290         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13291         for all instances.
13292         * tree-vect-stmts.c (vect_model_simple_cost): Make early
13293         out an assert.
13294         (vect_model_promotion_demotion_cost): Likewise.
13295         (vectorizable_bswap): Guard cost modeling with !slp_node
13296         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13297         SLP stmts.
13298         (vectorizable_call): Likewise.
13299         (vectorizable_conversion): Likewise.
13300         (vectorizable_assignment): Likewise.
13301         (vectorizable_shift): Likewise.
13302         (vectorizable_operation): Likewise.
13303         (vectorizable_store): Likewise.
13304         (vectorizable_load): Likewise.
13305         (vectorizable_condition): Likewise.
13306         (vectorizable_comparison): Likewise.
13308 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
13310         PR sanitizer/84307
13311         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13312         (ASAN_MARK): Fix fnspec to account for return value, change pointer
13313         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13315 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13317         PR middle-end/83665
13318         * params.def (inline-min-speedup): Increase from 8 to 15.
13319         (max-inline-insns-auto): Decrease from 40 to 30.
13320         * ipa-split.c (consider_split): Add some buffer for function to
13321         be considered inlining candidate.
13322         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13323         default values.
13325 2018-02-12  Richard Biener  <rguenther@suse.de>
13327         PR tree-optimization/84037
13328         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13329         matched stmts if we cannot swap the non-matched ones.
13331 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13333         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13334         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13335         _mm_maskz_scalef_round_ss): New intrinsics.
13336         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13337         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13338         __builtin_ia32_scalefss_round): Remove.
13339         (__builtin_ia32_scalefsd_mask_round,
13340         __builtin_ia32_scalefss_mask_round): New intrinsics.
13341         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13342         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13343         ((match_operand:VF_128 2 "<round_nimm_predicate>"
13344         "<round_constraint>")): Changed to ...
13345         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13346         "<round_scalar_constraint>")): ... this.
13347         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13348         %0, %1, %2<round_op3>}"): Changed to ...
13349         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13350         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13351         %2<round_scalar_mask_op3>}"): ... this.
13352         * config/i386/subst.md (round_scalar_nimm_predicate): New.
13354 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13356         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13357         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13358         (_mm_maskz_sqrt_round_ss): New intrinsics.
13359         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13360         (__builtin_ia32_sqrtsd_mask_round)
13361         (__builtin_ia32_sqrtss_mask_round): New builtins.
13362         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13363         (__builtin_ia32_sqrtss_round): Remove.
13364         (__builtin_ia32_sqrtsd_mask_round)
13365         (__builtin_ia32_sqrtss_mask_round): New builtins.
13366         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13367         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13368         ((match_operand:VF_128 1 "vector_operand"
13369         "xBm,<round_constraint>")): Changed to ...
13370         ((match_operand:VF_128 1 "vector_operand"
13371         "xBm,<round_scalar_constraint>")): ... this.
13372         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13373         %0, %2, %<iptr>1<round_op3>}): Changed to ...
13374         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13375         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13376         %<iptr>1<round_scalar_mask_op3>}): ... this.
13377         ((set_attr "prefix" "<round_prefix>")): Changed to ...
13378         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13380 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
13382         PR target/84266
13383         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13384         Cast vec_cmpeq result to correct type.
13385         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13386         Cast vec_cmpgt result to correct type.
13388 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
13390         * final.c (final_scan_insn_1): Renamed from...
13391         (final_scan_insn): ... this.  New wrapper, to recover
13392         seen from the outermost call in recursive ones.
13393         * config/sparc/sparc.c (output_return): Drop seen from call.
13394         (output_sibcall): Likewise.
13395         * config/visium/visium.c (output_branch): Likewise.
13397 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
13399         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13400         function label.
13402 2018-02-10  Alan Modra  <amodra@gmail.com>
13404         PR target/84300
13405         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13406         Specify LR as an input.
13408 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
13410         PR sanitizer/83987
13411         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13412         remove_member_access_dummy_vars): New functions.
13413         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13414         lower_omp_1, execute_lower_omp): Use them.
13416         PR rtl-optimization/84308
13417         * shrink-wrap.c (spread_components): Release todo vector.
13419 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
13421         PR rtl-optimization/57193
13422         * ira-color.c (struct allocno_color_data): Add member
13423         conflict_allocno_hard_prefs.
13424         (update_conflict_allocno_hard_prefs): New.
13425         (bucket_allocno_compare_func): Add a preference based on
13426         conflict_allocno_hard_prefs.
13427         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13428         (color_allocnos): Remove a dead code.  Initiate
13429         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
13431 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
13433         PR target/84226
13434         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13435         constraint from =wa to wa.  Avoid a subreg on the output operand,
13436         instead use a pseudo and subreg it in a move.
13437         (p9_xxbrd_<mode>): Changed to ...
13438         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13439         (p9_xxbrd_v2df): New expander.
13440         (p9_xxbrw_<mode>): Changed to ...
13441         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13442         (p9_xxbrw_v4sf): New expander.
13444 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
13446         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13448 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
13450         PR target/83926
13451         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13452         multiply in 32-bit mode.
13453         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13454         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13455         mode.
13457 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
13459         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13460         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13461         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13462         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13464 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
13466         PR lto/84213
13467         * dwarf2out.c (is_trivial_indirect_ref): New function.
13468         (dwarf2out_late_global_decl): Do not generate a location
13469         attribute for variables that have a non-trivial DECL_VALUE_EXPR
13470         and that are not defined in the current unit.
13472 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
13474         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13475         instead of a libcall for UNORDERED.
13477 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
13479         PR target/82641
13480         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13481         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13483 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13485         PR target/PR84295
13486         * config/s390/s390.c (s390_set_current_function): Invoke
13487         s390_indirect_branch_settings also if fndecl didn't change.
13489 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
13491         * config/rs6000/rs6000.md (blockage): Set length to zero.
13493 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
13495         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13497 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
13499         PR sanitizer/84285
13500         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13501         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13502         -static-lib*san.
13504         PR debug/84252
13505         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13506         PARALLEL incoming that failed vt_get_decl_and_offset check.
13508         PR middle-end/84237
13509         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13510         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13511         TREE_READONLY bit.
13512         (get_variable_section): For decls in named .bss* sections pass true as
13513         second argument to bss_initializer_p.
13515 2018-02-09  Marek Polacek  <polacek@redhat.com>
13516             Jakub Jelinek  <jakub@redhat.com>
13518         PR c++/83659
13519         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13520         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
13521         Sync some changes from cxx_fold_indirect_ref.
13523 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
13525         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13526         markers.
13527         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13528         (BLOCK_INLINE_ENTRY_LABEL): New.
13529         (dwarf2out_var_location): Disregard inline entry markers.
13530         (inline_entry_data): New struct.
13531         (inline_entry_data_hasher): New hashtable type.
13532         (inline_entry_data_hasher::hash): New.
13533         (inline_entry_data_hasher::equal): New.
13534         (inline_entry_data_table): New variable.
13535         (add_high_low_attributes): Add DW_AT_entry_pc and
13536         DW_AT_GNU_entry_view attributes if a pending entry is found
13537         in inline_entry_data_table.  Add old entry_pc attribute only
13538         if debug nonbinding markers are disabled.
13539         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13540         markers are enabled.
13541         (block_within_block_p, dwarf2out_inline_entry): New.
13542         (dwarf2out_finish): Check that no entries remained in
13543         inline_entry_data_table.
13544         * final.c (reemit_insn_block_notes): Handle inline entry notes.
13545         (final_scan_insn, notice_source_line): Likewise.
13546         (rest_of_clean_state): Skip inline entry markers.
13547         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13548         markers.
13549         * gimple.c (gimple_build_debug_inline_entry): New.
13550         * gimple.h (enum gimple_debug_subcode): Add
13551         GIMPLE_DEBUG_INLINE_ENTRY.
13552         (gimple_build_debug_inline_entry): Declare.
13553         (gimple_debug_inline_entry_p): New.
13554         (gimple_debug_nonbind_marker_p): Adjust.
13555         * insn-notes.def (INLINE_ENTRY): New.
13556         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13557         inline entry marker notes.
13558         (print_insn): Likewise.
13559         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13560         (INSN_DEBUG_MARKER_KIND): Likewise.
13561         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13562         * tree-inline.c (expand_call_inline): Build and insert
13563         debug_inline_entry stmt.
13564         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13565         inline entry blocks early, if nonbind markers are enabled.
13566         (dump_scope_block): Dump fragment info.
13567         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13568         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13569         (gimple_build_debug_inline_entry): New.
13570         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13571         Enable/disable inline entry points too.
13572         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13573         (DEBUG_INSN): Describe inline entry markers.
13575         * common.opt (gvariable-location-views): New.
13576         (gvariable-location-views=incompat5): New.
13577         * config.in: Rebuilt.
13578         * configure: Rebuilt.
13579         * configure.ac: Test assembler for view support.
13580         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13581         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13582         * dwarf2out.c (var_loc_view): New typedef.
13583         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13584         (dwarf2out_locviews_in_attribute): New.
13585         (dwarf2out_locviews_in_loclist): New.
13586         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13587         (enum dw_line_info_opcode): Add LI_adv_address.
13588         (struct dw_line_info_table): Add view.
13589         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13590         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13591         (zero_view_p): New variable.
13592         (ZERO_VIEW_P): New macro.
13593         (output_asm_line_debug_info): New.
13594         (struct var_loc_node): Add view.
13595         (add_AT_view_list, AT_loc_list): New.
13596         (add_var_loc_to_decl): Add view param.  Test it against last.
13597         (new_loc_list): Add view params.  Record them.
13598         (AT_loc_list_ptr): Handle loc and view lists.
13599         (view_list_to_loc_list_val_node): New.
13600         (print_dw_val): Handle dw_val_class_view_list.
13601         (size_of_die): Likewise.
13602         (value_format): Likewise.
13603         (loc_list_has_views): New.
13604         (gen_llsym): Set vl_symbol too.
13605         (maybe_gen_llsym, skip_loc_list_entry): New.
13606         (dwarf2out_maybe_output_loclist_view_pair): New.
13607         (output_loc_list): Output view list or entries too.
13608         (output_view_list_offset): New.
13609         (output_die): Handle dw_val_class_view_list.
13610         (output_dwarf_version): New.
13611         (output_compilation_unit_header): Use it.
13612         (output_skeleton_debug_sections): Likewise.
13613         (output_rnglists, output_line_info): Likewise.
13614         (output_pubnames, output_aranges): Update version comments.
13615         (output_one_line_info_table): Output view numbers in asm comments.
13616         (dw_loc_list): Determine current endview, pass it to new_loc_list.
13617         Call maybe_gen_llsym.
13618         (loc_list_from_tree_1): Adjust.
13619         (add_AT_location_description): Create view list attribute if
13620         needed, check it's absent otherwise.
13621         (convert_cfa_to_fb_loc_list): Adjust.
13622         (maybe_emit_file): Call output_asm_line_debug_info for test.
13623         (dwarf2out_var_location): Reset views as needed.  Precompute
13624         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
13625         attribute.  Set view.
13626         (new_line_info_table): Reset next view.
13627         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13628         (dwarf2out_source_line): Likewise.  Output view resets and labels to
13629         the assembler, or select appropriate line info opcodes.
13630         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13631         (optimize_string_length): Catch it.  Adjust.
13632         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
13633         dw_val_class_view_list, and remove it if no longer needed.
13634         (hash_loc_list): Hash view numbers.
13635         (loc_list_hasher::equal): Compare them.
13636         (optimize_location_lists): Check whether a view list symbol is
13637         needed, and whether the locview attribute is present, and
13638         whether they match.  Remove the locview attribute if no longer
13639         needed.
13640         (index_location_lists): Call skip_loc_list_entry for test.
13641         (dwarf2out_finish): Call output_asm_line_debug_info for test.
13642         Use output_dwarf_version.
13643         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13644         (struct dw_val_node): Add val_view_list.
13645         * final.c (SEEN_NEXT_VIEW): New.
13646         (set_next_view_needed): New.
13647         (clear_next_view_needed): New.
13648         (maybe_output_next_view): New.
13649         (final_start_function): Rename to...
13650         (final_start_function_1): ... this.  Take pointer to FIRST,
13651         add SEEN parameter.  Emit param bindings in the initial view.
13652         (final_start_function): Reintroduce SEEN-less interface.
13653         (final): Rename to...
13654         (final_1): ... this.  Take SEEN parameter.  Output final pending
13655         next view at the end.
13656         (final): Reintroduce seen-less interface.
13657         (final_scan_insn): Output pending next view before switching
13658         sections or ending a block.  Mark the next view as needed when
13659         outputting variable locations.  Notify debug backend of section
13660         changes, and of location view changes.
13661         (rest_of_handle_final): Adjust.
13662         * toplev.c (process_options): Autodetect value for debug variable
13663         location views option.  Warn on incompat5 without -gdwarf-5.
13664         * doc/invoke.texi (gvariable-location-views): New.
13665         (gvariable-location-views=incompat5): New.
13666         (gno-variable-location-views): New.
13668 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
13670         PR tree-optimization/84136
13671         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13672         that the result of find_edge is non-NULL.
13674 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13676         PR target/83008
13677         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13678         storing integer register in SImode.  Fix cost of 256 and 512
13679         byte aligned SSE register store.
13681 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13683         * config/i386/i386.c (ix86_multiplication_cost): Fix
13684         multiplication cost for TARGET_AVX512DQ.
13686 2018-02-08  Marek Polacek  <polacek@redhat.com>
13688         PR tree-optimization/84238
13689         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13690         get_range_strlen.
13692 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13694         PR tree-optimization/84265
13695         * tree-vect-stmts.c (vectorizable_store): Don't treat
13696         VMAT_CONTIGUOUS accesses as grouped.
13697         (vectorizable_load): Likewise.
13699 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13701         PR tree-optimization/81635
13702         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13703         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13704         (test_round_for_mask): New functions.
13705         (wide_int_cc_tests): Call test_round_for_mask.
13706         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13707         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13708         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13709         range returned by get_range_info.
13711 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13713         PR ipa/81360
13714         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13715         * symtab.c: Include builtins.h
13716         (symtab_node::output_to_lto_symbol_table_p): Move here
13717         from lto-streamer-out.c:output_symbol_p.
13718         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13719         (output_symbol_p): Move all logic to symtab.c
13720         (produce_symtab): Update.
13722 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13724         * config/s390/s390-opts.h (enum indirect_branch): Define.
13725         * config/s390/s390-protos.h (s390_return_addr_from_memory)
13726         (s390_indirect_branch_via_thunk)
13727         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13728         (enum s390_indirect_branch_type): Define.
13729         * config/s390/s390.c (struct s390_frame_layout, struct
13730         machine_function): Remove.
13731         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13732         (indirect_branch_table_label_no, indirect_branch_table_name):
13733         Define variables.
13734         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13735         (enum s390_indirect_branch_option): Define.
13736         (s390_return_addr_from_memory): New function.
13737         (s390_handle_string_attribute): New function.
13738         (s390_attribute_table): Add new attribute handler.
13739         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13740         (s390_indirect_branch_via_thunk): New function.
13741         (s390_indirect_branch_via_inline_thunk): New function.
13742         (s390_function_ok_for_sibcall): When jumping via thunk disallow
13743         sibling call optimization for non z10 compiles.
13744         (s390_emit_call): Force indirect branch target to be a single
13745         register.  Add r1 clobber for non-z10 compiles.
13746         (s390_emit_epilogue): Emit return jump via return_use expander.
13747         (s390_reorg): Handle JUMP_INSNs as execute targets.
13748         (s390_option_override_internal): Perform validity checks for the
13749         new command line options.
13750         (s390_indirect_branch_attrvalue): New function.
13751         (s390_indirect_branch_settings): New function.
13752         (s390_set_current_function): Invoke s390_indirect_branch_settings.
13753         (s390_output_indirect_thunk_function):  New function.
13754         (s390_code_end): Implement target hook.
13755         (s390_case_values_threshold): Implement target hook.
13756         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13757         macros.
13758         * config/s390/s390.h (struct s390_frame_layout)
13759         (struct machine_function): Move here from s390.c.
13760         (TARGET_INDIRECT_BRANCH_NOBP_RET)
13761         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13762         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13763         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13764         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13765         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13766         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13767         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13768         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13769         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13770         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13771         (mnemonic attribute): Add values which aren't recognized
13772         automatically.
13773         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13774         pattern for branch conversion.  Fix mnemonic attribute.
13775         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13776         indirect branch via thunk if requested.
13777         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13778         ("*indirect_jump"): Disable for branch conversion using out of
13779         line thunks.
13780         ("indirect_jump_via_thunk<mode>_z10")
13781         ("indirect_jump_via_thunk<mode>")
13782         ("indirect_jump_via_inlinethunk<mode>_z10")
13783         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13784         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13785         ("casesi_jump_via_inlinethunk<mode>_z10")
13786         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13787         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13788         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13789         ("*indirect2_jump"): Disable for branch conversion.
13790         ("casesi_jump"): Turn into expander and expand patterns for branch
13791         conversion.
13792         ("return_use"): New expander.
13793         ("*return"): Emit return via thunk and rename it to ...
13794         ("*return<mode>"): ... this one.
13795         * config/s390/s390.opt: Add new options and and enum for the
13796         option values.
13798 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13800         * lra-constraints.c (match_reload): Unconditionally use
13801         gen_lowpart_SUBREG, rather than selecting between that
13802         and equivalent gen_rtx_SUBREG code.
13804 2018-02-08  Richard Biener  <rguenther@suse.de>
13806         PR tree-optimization/84233
13807         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13808         changed flag instead of boguously re-using phi_inserted.
13810 2018-02-08  Martin Jambor  <mjambor@suse.cz>
13812         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13813         static local variables.
13815 2018-02-08  Richard Biener  <rguenther@suse.de>
13817         PR tree-optimization/84278
13818         * tree-vect-stmts.c (vectorizable_store): When looking for
13819         smaller vector types to perform grouped strided loads/stores
13820         make sure the mode is supported by the target.
13821         (vectorizable_load): Likewise.
13823 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13825         * config/aarch64/aarch64.c (aarch64_components_for_bb):
13826         Increase LDP/STP opportunities by adding adjacent callee-saves.
13828 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13830         PR rtl-optimization/84068
13831         PR rtl-optimization/83459
13832         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13834 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
13836         PR tree-optimization/84224
13837         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13838         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13839         non-zero arguments.
13841 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
13843         PR target/84113
13844         * config/rs6000/altivec.md (*restore_world): Remove LR use.
13845         * config/rs6000/predicates.md (restore_world_operation): Adjust op
13846         count, remove one USE.
13848 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13850         * doc/install.texi (Configuration): Document the
13851         --with-long-double-format={ibm,ieee} PowerPC configuration
13852         options.
13854         PR target/84154
13855         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13856         Convert from define_expand to be define_insn_and_split.  Rework
13857         float/double/_Float128 conversions to QI/HI/SImode to work with
13858         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
13859         conversions to QI/HImode types did a store and then a load to
13860         truncate the value.  For conversions to VSX registers, don't split
13861         the insn, instead emit the code directly.  Use the code iterator
13862         any_fix to combine signed and unsigned conversions.
13863         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13864         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13865         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13866         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13867         (fix_<mode>di2_hw): Likewise.
13868         (fixuns_<mode>di2_hw): Likewise.
13869         (fix_<mode>si2_hw): Likewise.
13870         (fixuns_<mode>si2_hw): Likewise.
13871         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13872         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13873         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13874         fix<uns>_trunc<SFDF:mode>si2_p8.
13875         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13876         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13877         (fix<uns>_<mode>_mem): Likewise.
13878         (fctiw<u>z_<mode>_mem): Likewise.
13879         (fix<uns>_<mode>_mem): Likewise.
13880         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13881         the register allocator from doing a direct move to the GPRs to do
13882         a store, and instead use the ISA 3.0 store byte/half-word from
13883         vector register instruction.  For IEEE 128-bit floating point,
13884         also optimize stores of 32-bit ints.
13885         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13887 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
13889         * genextract.c (push_pathstr_operand): New function to support
13890         [a-zA-Z].
13891         (walk_rtx): Call push_pathstr_operand.
13892         (print_path): Support [a-zA-Z].
13894 2018-02-07  Richard Biener  <rguenther@suse.de>
13896         PR tree-optimization/84037
13897         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13898         (cse_and_gimplify_to_preheader): Declare.
13899         (vect_get_place_in_interleaving_chain): Likewise.
13900         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13901         ivexpr_map.
13902         (_loop_vec_info::~_loop_vec_info): Delete it.
13903         (cse_and_gimplify_to_preheader): New function.
13904         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13905         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13906         (vectorizable_load): Likewise.  For grouped stores always base
13907         the IV on the first element.
13908         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13909         condition before gimplifying.
13911 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13913         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13914         *DIV_EXPR and *MOD_EXPR.
13916 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
13918         PR target/84248
13919         * config/i386/i386.c (ix86_option_override_internal): Mask out
13920         the CF_SET bit when checking -fcf-protection.
13922 2018-02-07  Tom de Vries  <tom@codesourcery.com>
13924         PR libgomp/84217
13925         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13926         enough.
13928 2018-02-07  Richard Biener  <rguenther@suse.de>
13930         PR tree-optimization/84204
13931         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13932         this place.
13934         PR tree-optimization/84205
13935         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13936         special-case isl_ast_op_zdiv_r.
13938         PR tree-optimization/84223
13939         * graphite-scop-detection.c (gather_bbs::before_dom_children):
13940         Only add conditions from within the region.
13941         (gather_bbs::after_dom_children): Adjust.
13943 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
13945         PR target/84209
13946         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13947         * config/avr/avr.md: Only post-reload split REG-REG moves if
13948         either register is GENERAL_REG_P.
13950 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13952         PR tree-optimization/84235
13953         * tree-ssa-scopedtables.c
13954         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13955         if the subtraction is performed in floating point type where NaNs are
13956         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13957         build 1.  Formatting fix.
13959 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
13961         PR target/84146
13962         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13963         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13964         and skip it regardless of bb boundaries.  Use CALL_P macro,
13965         don't test INSN_P (insn) together with CALL_P or JUMP_P check
13966         unnecessarily, formatting fix.
13968 2018-02-06  Michael Collison  <michael.collison@arm.com>
13970         * config/arm/thumb2.md:
13971         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13972         (*thumb_mov_notscc): Ditto.
13974 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
13976         PR target/84154
13977         * config/rs6000/rs6000.md (su code attribute): Use "u" for
13978         unsigned_fix, not "s".
13980 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13982         * configure.ac (gcc_fn_eh_frame_ro): New function.
13983         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13984         correct .eh_frame permissions.
13985         * configure: Regenerate.
13987 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
13989         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13990         irrelevant options.
13992 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13994         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13995         Display warning message for -mno-speculate-indirect-jumps.
13997 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
13999         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14000         Undocumented.
14001         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14003 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
14005         PR tree-optimization/84225
14006         * tree-eh.c (find_trapping_overflow): Only call
14007         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14009 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14011         PR target/84145
14012         * config/i386/i386.c: Reimplement the check of possible options
14013         -mibt/-mshstk conbination. Change error messages.
14014         * doc/invoke.texi: Fix a typo: remove extra '='.
14016 2018-02-06  Marek Polacek  <polacek@redhat.com>
14018         PR tree-optimization/84228
14019         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14021 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
14023         PR target/82641
14024         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14025         emitted arch directives.
14026         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14027         __ARM_FEATURE_COPROC before changing architectures.
14029 2018-02-06  Richard Biener  <rguenther@suse.de>
14031         * config/i386/i386.c (print_reg): Fix typo.
14032         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14034 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
14036         * configure: Regenerate.
14038 2018-02-05  Martin Sebor  <msebor@redhat.com>
14040         PR tree-optimization/83369
14041         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14042         inlining context.
14044 2018-02-05  Martin Liska  <mliska@suse.cz>
14046         * doc/invoke.texi: Cherry-pick upstream r323995.
14048 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
14050         * ira.c (ira_init_register_move_cost): Adjust comment.
14052 2018-02-05  Martin Liska  <mliska@suse.cz>
14054         PR gcov-profile/84137
14055         * doc/gcov.texi: Fix typo in documentation.
14057 2018-02-05  Martin Liska  <mliska@suse.cz>
14059         PR gcov-profile/83879
14060         * doc/gcov.texi: Document necessity of --dynamic-list-data when
14061         using dlopen functionality.
14063 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
14065         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14066         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14067         _mm_maskz_range_ss, _mm_mask_range_round_ss,
14068         _mm_maskz_range_round_ss): New intrinsics.
14069         (__builtin_ia32_rangesd128_round)
14070         (__builtin_ia32_rangess128_round): Remove.
14071         (__builtin_ia32_rangesd128_mask_round,
14072         __builtin_ia32_rangess128_mask_round): New builtins.
14073         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14074         __builtin_ia32_rangess128_round): Remove.
14075         (__builtin_ia32_rangesd128_mask_round,
14076         __builtin_ia32_rangess128_mask_round): New builtins.
14077         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14078         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14079         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14080         "<round_saeonly_constraint>")): Changed to ...
14081         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14082         "<round_saeonly_scalar_constraint>")): ... this.
14083         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14084         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14085         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14086         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14087         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14089 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
14091         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14092         options.
14093         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14094         Remove all values except native, 8540 and 8548.
14096 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
14098         * config/i386/i386.c (ix86_output_function_return): Pass
14099         INVALID_REGNUM, instead of -1, as invalid register number to
14100         indirect_thunk_name and output_indirect_thunk.
14102 2018-02-02  Julia Koval  <julia.koval@intel.com>
14104         * config.gcc: Add -march=icelake.
14105         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14106         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14107         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14108         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14109         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14110         (processor_target_table): Add icelake.
14111         (ix86_option_override_internal): Handle new PTAs.
14112         (get_builtin_code_for_version): Handle icelake.
14113         (M_INTEL_COREI7_ICELAKE): New.
14114         (fold_builtin_cpu): Handle icelake.
14115         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14116         * doc/invoke.texi: Add -march=icelake.
14118 2018-02-02  Julia Koval  <julia.koval@intel.com>
14120         * config/i386/i386.c (ix86_option_override_internal): Change flags type
14121         to wide_int_bitmask.
14122         * wide-int-bitmask.h: New.
14124 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14126         PR target/84066
14127         * config/i386/i386.md: Replace Pmode with word_mode in
14128         builtin_setjmp_setup and builtin_longjmp to support x32.
14130 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
14132         PR target/56010
14133         PR target/83743
14134         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14135         #include "opts.h".
14136         (rs6000_supported_cpu_names): New static variable.
14137         (linux_cpu_translation_table): Likewise.
14138         (elf_platform) <cpu>: Define new static variable and use it.
14139         Translate kernel AT_PLATFORM name to canonical name if needed.
14140         Error if platform name is unknown.
14142 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
14144         PR target/84089
14145         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14147 2018-02-01  Jeff Law  <law@redhat.com>
14149         PR target/84128
14150         * config/i386/i386.c (release_scratch_register_on_entry): Add new
14151         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
14152         the scratch if RELEASE_VIA_POP is false.
14153         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14154         If we have to save a temporary register, decrement SIZE appropriately.
14155         Pass new arguments to release_scratch_register_on_entry.
14156         (ix86_adjust_stack_and_probe): Likewise.
14157         (ix86_emit_probe_stack_range): Pass new arguments to
14158         release_scratch_register_on_entry.
14160 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
14162         PR rtl-optimization/84157
14163         * combine.c (change_zero_ext): Use REG_P predicate in
14164         front of HARD_REGISTER_P predicate.
14166 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
14168         * config/avr/avr.c (avr_option_override): Move disabling of
14169         -fdelete-null-pointer-checks to...
14170         * common/config/avr/avr-common.c (avr_option_optimization_table):
14171         ...here.
14173 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14175         PR tree-optimization/81635
14176         * tree-data-ref.c (split_constant_offset_1): For types that
14177         wrap on overflow, try to use range info to prove that wrapping
14178         cannot occur.
14180 2018-02-01  Renlin Li  <renlin.li@arm.com>
14182         PR target/83370
14183         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14184         TAILCALL_ADDR_REGS.
14185         (aarch64_register_move_cost): Likewise.
14186         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14187         TAILCALL_ADDR_REGS.
14188         (REG_CLASS_NAMES): Likewise.
14189         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14190         TAILCALL_ADDR_REGS. Remove IP registers.
14191         * config/aarch64/aarch64.md (Ucs): Update register constraint.
14193 2018-02-01  Richard Biener  <rguenther@suse.de>
14195         * domwalk.h (dom_walker::dom_walker): Add additional constructor
14196         for specifying RPO order and allow NULL for that.
14197         * domwalk.c (dom_walker::dom_walker): Likewise.
14198         (dom_walker::walk): Handle NULL RPO order.
14199         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14200         in RPO order.
14201         (rewrite_update_dom_walker): Likewise.
14202         (mark_def_dom_walker): Likewise.
14204 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14206         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14207         (aarch64_maybe_expand_sve_subreg_move): Declare.
14208         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14209         * config/aarch64/predicates.md (aarch64_any_register_operand): New
14210         predicate.
14211         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14212         that are semantically a reverse operation.
14213         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14214         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14215         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14216         functions.
14217         (aarch64_can_change_mode_class): For big-endian, forbid changes
14218         between two SVE modes if they have different element sizes.
14220 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14222         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14223         the TImode handling for big-endian targets.
14225 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14227         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14228         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
14229         not just bytes.
14230         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14231         Remove BSWAP handing for big-endian targets and use the form of
14232         LD1RQ appropariate for the mode.
14234 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14236         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14237         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14238         duplicated element.
14240 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14242         PR tearget/83845
14243         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14244         check for operands that need to go through aarch64_sve_reload_be.
14246 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
14248         PR tree-optimization/81661
14249         PR tree-optimization/84117
14250         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14251         * tree-eh.c: Include gimplify.h.
14252         (find_trapping_overflow, replace_trapping_overflow,
14253         rewrite_to_non_trapping_overflow): New functions.
14254         * tree-vect-loop.c: Include tree-eh.h.
14255         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14256         * tree-data-ref.c: Include tree-eh.h.
14257         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14259 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
14261         PR rtl-optimization/84123
14262         * combine.c (change_zero_ext): Check if hard register satisfies
14263         can_change_dest_mode before calling gen_lowpart_SUBREG.
14265 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
14267         PR target/82444
14268         * ira.c (ira_init_register_move_cost): Remove assert.
14270 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14272         PR rtl-optimization/84071
14273         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14274         * doc/tm.texi: Regenerate.
14276 2018-01-31  Richard Biener  <rguenther@suse.de>
14278         PR tree-optimization/84132
14279         * tree-data-ref.c (analyze_miv_subscript): Properly
14280         check whether evolution_function_is_affine_multivariate_p
14281         before calling gcd_of_steps_may_divide_p.
14283 2018-01-31  Julia Koval  <julia.koval@intel.com>
14285         PR target/83618
14286         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14287         * config/i386/i386.md (rdpid_rex64) New.
14288         (rdpid): Make 32bit only.
14290 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
14292         PR lto/84105
14293         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14294         an IDENTIFIER_NODE for FUNCTION_TYPE's.
14296 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14298         Revert
14299         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14301         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14303 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14305         PR rtl-optimization/84071
14306         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14307         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14309 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14311         * config/arc/arc.c (arc_handle_aux_attribute): New function.
14312         (arc_attribute_table): Add 'aux' attribute.
14313         (arc_in_small_data_p): Consider aux like variables.
14314         (arc_is_aux_reg_p): New function.
14315         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14316         (arc_get_aux_arg): New function.
14317         (prepare_move_operands): Handle aux-register access.
14318         (arc_handle_aux_attribute): New function.
14319         * doc/extend.texi (ARC Variable attributes): Add subsection.
14321 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14323         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14324         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14325         (arc_attribute_table): Add 'uncached' attribute.
14326         (arc_print_operand): Print '.di' flag for uncached memory
14327         accesses.
14328         (arc_in_small_data_p): Do not consider for small data the uncached
14329         types.
14330         (arc_is_uncached_mem_p): New function.
14331         * config/arc/predicates.md (compact_store_memory_operand): Check
14332         for uncached memory accesses.
14333         (nonvol_nonimm_operand): Likewise.
14334         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14336 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
14338         PR c/84100
14339         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14340         falign-loops=): Add Optimization flag.
14342 2018-01-30  Jeff Law  <law@redhat.com>
14344         PR target/84064
14345         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14346         INT_REGISTERS_SAVED.  Check it prior to calling
14347         get_scratch_register_on_entry.
14348         (ix86_adjust_stack_and_probe): Similarly.
14349         (ix86_emit_probe_stack_range): Similarly.
14350         (ix86_expand_prologue): Corresponding changes.
14352 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14354         PR target/40411
14355         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14356         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14358 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
14360         PR target/84112
14361         * lra-constraints.c (curr_insn_transform): Process AND in the
14362         address.
14364 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
14366         PR rtl-optimization/83986
14367         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14368         dependence against last_pending_memory_flush in addition to
14369         pending_jump_insns.
14371 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
14373         PR tree-optimization/81611
14374         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14375         copies.
14377 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14379         PR target/83758
14380         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14381         a reg rtx.
14383 2018-01-30  Richard Biener  <rguenther@suse.de>
14384             Jakub Jelinek  <jakub@redhat.com>
14386         PR tree-optimization/84111
14387         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14388         inner loops added during recursion, as they don't have up-to-date
14389         SSA form.
14391 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14393         PR ipa/81360
14394         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14395         (can_inline_edge_by_limits_p): ... here.
14396         (can_early_inline_edge_p, check_callers,
14397         update_caller_keys, update_callee_keys, recursive_inlining,
14398         add_new_edges_to_heap, speculation_useful_p,
14399         inline_small_functions,
14400         inline_small_functions, flatten_function,
14401         inline_to_all_callers_1): Update.
14403 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14405         * profile-count.c (profile_count::combine_with_ipa_count): Handle
14406         zeros correctly.
14408 2018-01-30  Richard Biener  <rguenther@suse.de>
14410         PR tree-optimization/83008
14411         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14412         invariant and constant vector uses in stmts when they need
14413         more than one stmt.
14415 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14417         PR bootstrap/84017
14418         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14419         * configure: Regenerate.
14421 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14423         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14424         pattern.
14425         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14426         Use gen_rtx_REG rather than gen_lowpart.
14428 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14430         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14431         rather than 0 when creating partial subregs.
14433 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14435         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14436         of usage.
14438 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
14440         PR target/81550
14441         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14442         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14443         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14444         flags.  This restores the settings used before the 2017-07-24.
14445         Turning off pre increment/decrement/modify allows IVOPTS to
14446         optimize DF/SF loops where the index is an int.
14448 2018-01-29  Richard Biener  <rguenther@suse.de>
14449             Kelvin Nilsen  <kelvin@gcc.gnu.org>
14451         PR bootstrap/80867
14452         * tree-vect-stmts.c (vectorizable_call): Don't call
14453         targetm.vectorize_builtin_md_vectorized_function if callee is
14454         NULL.
14456 2018-01-22  Carl Love  <cel@us.ibm.com>
14458         * doc/extend.tex: Fix typo in second arg in
14459         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14461 2018-01-29  Richard Biener  <rguenther@suse.de>
14463         PR tree-optimization/84086
14464         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14465         (flush_ssaname_freelist): When SSA names were released reset
14466         the SCEV hash table.
14468 2018-01-29  Richard Biener  <rguenther@suse.de>
14470         PR tree-optimization/84057
14471         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14472         removed paths when removing edges.
14474 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
14476         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14477         -mfunction-return=@var{choice}.
14479 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14481         PR diagnostic/84034
14482         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14483         Handle CR like TAB.
14484         (layout::print_source_line): Likewise.
14485         (test_get_line_width_without_trailing_whitespace): Add test cases.
14487 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
14489         PR middle-end/84040
14490         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14491         debug insns.
14493 2018-01-26  Jim Wilson  <jimw@sifive.com>
14495         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14497         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14498         specified.
14500 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14502         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14503         and CMP + SUB-immediate -> SUBS.
14505 2018-01-26  Martin Sebor  <msebor@redhat.com>
14507         PR tree-optimization/83896
14508         * tree-ssa-strlen.c (get_string_len): Rename...
14509         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
14510         Avoid assuming length is constant.
14511         (handle_char_store): Use HOST_WIDE_INT for string length.
14513 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
14515         PR target/81763
14516         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14517         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14519 2018-01-26  Richard Biener  <rguenther@suse.de>
14521         PR rtl-optimization/84003
14522         * dse.c (record_store): Only record redundant stores when
14523         the earlier store aliases at least all accesses the later one does.
14525 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
14527         PR rtl-optimization/83985
14528         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14529         REG_CFA_RESTORE insns.
14530         (delete_unmarked_insns): Don't ignore separate shrink wrapping
14531         REG_CFA_RESTORE insns here.
14533         PR c/83989
14534         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14535         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14537 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14539         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14540         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14541         (arc_init): Likewise.
14542         (arc_override_options): Likewise.
14543         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14544         value.
14545         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14546         support.
14547         * config/arc/arc.h (TARGET_DBNZ): Define.
14548         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14549         properly set the tune attribute.
14550         (dbnz): Use TARGET_DBNZ guard.
14551         * config/arc/arc.opt (mtune): Add core3 option.
14553 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14555         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14556         recognize new pic like addresses.
14557         (arc_delegitimize_address): Clean up.
14559 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14561         * config/arc/arc-arches.def: Option mrf16 valid for all
14562         architectures.
14563         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14564         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14565         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14566         * config/arc/arc-tables.opt: Regenerate.
14567         * config/arc/arc.c (arc_conditional_register_usage): Handle
14568         reduced register file case.
14569         (arc_file_start): Set must have build attributes.
14570         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14571         mrf16 option value.
14572         * config/arc/arc.opt (mrf16): Add new option.
14573         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14574         * config/arc/genmultilib.awk: Handle new mrf16 option.
14575         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14576         * config/arc/t-multilib: Regenerate.
14577         * doc/invoke.texi (ARC Options): Document mrf16 option.
14579 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14581         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14582         * config/arc/arc.c (arc_handle_secure_attribute): New function.
14583         (arc_attribute_table): Add 'secure_call' attribute.
14584         (arc_print_operand): Print secure call operand.
14585         (arc_function_ok_for_sibcall): Don't optimize tail calls when
14586         secure.
14587         (arc_is_secure_call_p): New function.  * config/arc/arc.md
14588         (call_i): Add support for sjli instruction.
14589         (call_value_i): Likewise.
14590         * config/arc/constraints.md (Csc): New constraint.
14592 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14593             John Eric Martin  <John.Martin@emmicro-us.com>
14595         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14596         * config/arc/arc.c (_arc_jli_section): New struct.
14597         (arc_jli_section): New type.
14598         (rc_jli_sections): New static variable.
14599         (arc_handle_jli_attribute): New function.
14600         (arc_attribute_table): Add jli_always and jli_fixed attribute.
14601         (arc_file_end): New function.
14602         (TARGET_ASM_FILE_END): Define.
14603         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14604         (arc_add_jli_section): New function.
14605         (jli_call_scan): Likewise.
14606         (arc_reorg): Call jli_call_scan.
14607         (arc_output_addsi): Remove 'S' from printing asm operand.
14608         (arc_is_jli_call_p): New function.
14609         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14610         operand.
14611         (movhi_insn): Likewise.
14612         (movsi_insn): Likewise.
14613         (movsi_set_cc_insn): Likewise.
14614         (loadqi_update): Likewise.
14615         (load_zeroextendqisi_update): Likewise.
14616         (load_signextendqisi_update): Likewise.
14617         (loadhi_update): Likewise.
14618         (load_zeroextendhisi_update): Likewise.
14619         (load_signextendhisi_update): Likewise.
14620         (loadsi_update): Likewise.
14621         (loadsf_update): Likewise.
14622         (movsicc_insn): Likewise.
14623         (bset_insn): Likewise.
14624         (bxor_insn): Likewise.
14625         (bclr_insn): Likewise.
14626         (bmsk_insn): Likewise.
14627         (bicsi3_insn): Likewise.
14628         (cmpsi_cc_c_insn): Likewise.
14629         (movsi_ne): Likewise.
14630         (movsi_cond_exec): Likewise.
14631         (clrsbsi2): Likewise.
14632         (norm_f): Likewise.
14633         (normw): Likewise.
14634         (swap): Likewise.
14635         (divaw): Likewise.
14636         (flag): Likewise.
14637         (sr): Likewise.
14638         (kflag): Likewise.
14639         (ffs): Likewise.
14640         (ffs_f): Likewise.
14641         (fls): Likewise.
14642         (call_i): Remove 'S' asm letter, add jli instruction.
14643         (call_value_i): Likewise.
14644         * config/arc/arc.op (mjli-always): New option.
14645         * config/arc/constraints.md (Cji): New constraint.
14646         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14647         operand.
14648         (subsf3_fpx): Likewise.
14649         (mulsf3_fpx): Likewise.
14650         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14651         asm operand.
14652         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14653         function attrbutes.
14654         * doc/invoke.texi (ARC): Document mjli-always option.
14656 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
14658         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14659         avoid addition with 0 and use incw and decw where possible.
14661 2018-01-26  Richard Biener  <rguenther@suse.de>
14663         PR tree-optimization/81082
14664         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14665         association if it requires casting to unsigned.
14666         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14667         from fold_plusminus_mult_expr to catch important cases late when
14668         range info is available.
14670 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14672         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14673         * configure.ac (hidden_linkonce): New test.
14674         * configure: Regenerate.
14675         * config.in: Regenerate.
14677 2018-01-26  Julia Koval  <julia.koval@intel.com>
14679         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14680         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14681         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14682         _mm_mask_bitshuffle_epi64_mask): Fix type.
14683         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14684         USI_FTYPE_V4DI_V4DI_USI): Remove.
14685         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14686         __builtin_ia32_vpshufbitqmb256_mask,
14687         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14688         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14689         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14691 2018-01-26  Alan Modra  <amodra@gmail.com>
14693         PR target/84033
14694         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14695         UNSPEC_VBPERMQ.  Sort other unspecs.
14697 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
14699         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14701 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
14703         PR middle-end/83055
14704         * predict.c (drop_profile): Do not push/pop cfun; update also
14705         node->count.
14706         (handle_missing_profiles): Fix logic looking for zero profiles.
14708 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
14710         PR middle-end/83977
14711         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14712         on functions with #pragma omp declare simd or functions with simd
14713         attribute.
14714         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14715         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14716         Remove trailing \n from warning_at calls.
14718 2018-01-25  Tom de Vries  <tom@codesourcery.com>
14720         PR target/84028
14721         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14722         for neutered workers.
14724 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
14726         PR target/68467
14727         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14728         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14730 2018-01-24  Jeff Law  <law@redhat.com>
14732         PR target/83994
14733         * i386.c (get_probe_interval): Move to earlier point.
14734         (ix86_compute_frame_layout): If -fstack-clash-protection and
14735         the frame is larger than the probe interval, then use pushes
14736         to save registers rather than reg->mem moves.
14737         (ix86_expand_prologue): Remove conditional for int_registers_saved
14738         assertion.
14740 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
14742         PR target/84014
14743         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14744         min/max for never referenced object.
14746 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
14748         PR middle-end/83977
14749         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14750         here.
14751         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14752         attributes from DECL_ATTRIBUTES (decl) without affecting
14753         DECL_ATTRIBUTES (current_function_decl).
14754         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14755         functions with non-NULL DECL_ABSTRACT_ORIGIN.
14757 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
14759         PR tree-optimization/83979
14760         * fold-const.c (fold_comparison): Use constant_boolean_node
14761         instead of boolean_{true,false}_node.
14763 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
14765         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14766         with zero counts.
14768 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14770         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14771         Simplify the clause that sets the length attribute.
14772         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14773         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14774         clause that sets the length attribute.
14775         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14777 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14779         PR target/83589
14780         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14781         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14782         Add strict parameter.
14783         (prevent_branch_around_nothing): Insert dummy insn between branch to
14784         label and label with no ptx insn inbetween.
14785         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14787 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14789         PR target/81352
14790         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14791         for neutered threads in warp.
14792         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14794 2018-01-24  Richard Biener  <rguenther@suse.de>
14796         PR tree-optimization/83176
14797         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14798         operands.
14800 2018-01-24  Richard Biener  <rguenther@suse.de>
14802         PR tree-optimization/82819
14803         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14804         code generating pluses that are no-ops in the target precision.
14806 2018-01-24  Richard Biener  <rguenther@suse.de>
14808         PR middle-end/84000
14809         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14811 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14813         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14814         to merge probabilities.
14815         * predict.c (probably_never_executed): Also mark as cold functions
14816         with global 0 profile and guessed local profile.
14817         * profile-count.c (profile_probability::combine_with_count): New
14818         member function.
14819         * profile-count.h (profile_probability::operator*,
14820         profile_probability::operator*=, profile_probability::operator/,
14821         profile_probability::operator/=): Reduce precision to adjusted
14822         and set value to guessed on contradictory divisions.
14823         (profile_probability::combine_with_freq): Remove.
14824         (profile_probability::combine_wiht_count): Declare.
14825         (profile_count::force_nonzero):: Set to adjusted.
14826         (profile_count::probability_in):: Set quality to adjusted.
14827         * tree-ssa-tail-merge.c (replace_block_by): Use
14828         combine_with_count.
14830 2018-01-23  Andrew Waterman  <andrew@sifive.com>
14831             Jim Wilson  <jimw@sifive.com>
14833         * config/riscv/riscv.c (riscv_stack_boundary): New.
14834         (riscv_option_override): Set riscv_stack_boundary.  Handle
14835         riscv_preferred_stack_boundary_arg.
14836         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14837         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14838         (STACK_BOUNDARY): Set to riscv_stack_boundary.
14839         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14840         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14841         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14843 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
14845         PR target/83905
14846         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14847         of struct ix86_frame.
14848         (ix86_expand_epilogue): Likewise.  Add a local variable for
14849         the reg_save_offset field in struct ix86_frame.
14851 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
14853         PR tree-optimization/82604
14854         * tree-loop-distribution.c (enum partition_kind): New enum item
14855         PKIND_PARTIAL_MEMSET.
14856         (partition_builtin_p): Support above new enum item.
14857         (generate_code_for_partition): Ditto.
14858         (compute_access_range): Differentiate cases that equality can be
14859         proven at all loops, the innermost loops or no loops.
14860         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14861         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
14862         (finalize_partitions, distribute_loop): Don't fuse partition of
14863         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14864         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14865         parloop is enabled.
14867 2018-01-23  Martin Liska  <mliska@suse.cz>
14869         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14870         order to ignore the predictor.
14871         (PRED_POLYMORPHIC_CALL): Likewise.
14872         (PRED_RECURSIVE_CALL): Likewise.
14874 2018-01-23  Martin Liska  <mliska@suse.cz>
14876         * tree-profile.c (tree_profiling): Print function header to
14877         aware reader which function we are working on.
14878         * value-prof.c (gimple_find_values_to_profile): Do not print
14879         not interesting value histograms.
14881 2018-01-23  Martin Liska  <mliska@suse.cz>
14883         * profile-count.h (enum profile_quality): Add
14884         profile_uninitialized as the first value. Do not number values
14885         as they are zero based.
14886         (profile_count::verify): Update sanity check.
14887         (profile_probability::verify): Likewise.
14889 2018-01-23  Nathan Sidwell  <nathan@acm.org>
14891         * doc/invoke.texi (ffor-scope): Deprecate.
14893 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14895         PR tree-optimization/83510
14896         * domwalk.c (set_all_edges_as_executable): New function.
14897         (dom_walker::dom_walker): Convert bool param
14898         "skip_unreachable_blocks" to enum reachability.  Move setup of
14899         edge flags to set_all_edges_as_executable and only do it when
14900         reachability is REACHABLE_BLOCKS.
14901         * domwalk.h (enum dom_walker::reachability): New enum.
14902         (dom_walker::dom_walker): Convert bool param
14903         "skip_unreachable_blocks" to enum reachability.
14904         (set_all_edges_as_executable): New decl.
14905         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
14906         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14907         "reachability".
14908         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14909         but converting true to REACHABLE_BLOCKS.
14910         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14911         * tree-vrp.c
14912         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14913         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14914         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14915         REACHABLE_BLOCKS.
14916         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14917         if check_all_array_refs will be called.
14919 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14921         * tree.c (selftest::test_location_wrappers): Add more test
14922         coverage.
14924 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14926         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14927         (selftest::test_bit_in_range): Likewise.
14929 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14931         PR testsuite/83888
14932         * doc/sourcebuild.texi (vect_float): Say that the selector
14933         only describes the situation when -funsafe-math-optimizations is on.
14934         (vect_float_strict): Document.
14936 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14938         PR tree-optimization/83965
14939         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14940         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14941         instead of checking only for a reduction.
14942         (vect_recog_widen_sum_pattern): Likewise.
14944 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14946         * predict.c (probably_never_executed): Only use precise profile info.
14947         (compute_function_frequency): Skip after inlining hack since we now
14948         have quality checking.
14950 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14952         * profile-count.h (profile_probability::very_unlikely,
14953         profile_probability::unlikely, profile_probability::even): Set
14954         precision to guessed.
14956 2018-01-23  Richard Biener  <rguenther@suse.de>
14958         PR tree-optimization/83963
14959         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14960         Properly terminate dominator walk when crossing the exit edge not
14961         when visiting its source block.
14963 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
14965         PR c++/83918
14966         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14967         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14969 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
14971         PR tree-optimization/83957
14972         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
14973         semicolon after for body surrounded by braces.
14975         PR tree-optimization/83081
14976         * profile-count.h (profile_probability::split): New method.
14977         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14978         Use profile_probability::split.
14979         (do_compare_rtx_and_jump): Fix adjustment of probabilities
14980         when splitting a single conditional jump into 2.
14982 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
14984         PR tree-optimization/69452
14985         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14986         decl.
14988 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14990         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14991         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14992         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14994 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14996         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14997         declaration.
14998         * config/rl78/rl78.md (movdi): New define_expand.
14999         * config/rl78/rl78.c (rl78_split_movdi): New function.
15001 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
15003         PR target/83862
15004         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15005         no longer used.
15006         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15007         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15008         128-bit to produce an UNSPEC move to get the double word with the
15009         signbit and then a shift directly to do signbit.
15010         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15011         implementation with a new version that just does either a direct
15012         move or a regular move.  Move memory interface to separate insns.
15013         Move insns so they are next to the expander.
15014         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15015         with signbit move.  Split big and little endian case.
15016         (signbit<mode>2_dm_mem_le): Likewise.
15017         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15018         (signbit<mode>2_dm2): Likewise.
15020 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15022         * config/rl78/rl78.md (anddi3): New define_expand.
15024 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15026         * config/rl78/rl78.md (umindi3): New define_expand.
15028 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15030         * config/rl78/rl78.md (smindi3): New define_expand.
15032 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15034         * config/rl78/rl78.md (smaxdi3): New define_expand.
15036 2018-01-22  Carl Love  <cel@us.ibm.com>
15038         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15039         LVX_V1TI): Add macro expansion.
15040         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15041         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15042         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15043         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15044         Change check to determine if the instruction is a byte reversing
15045         entry.  Fix typo in comment.
15046         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15047         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15048         Add def_builtin calls for new builtins.
15049         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15050         Add define_insn expansion.
15052 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15054         * config/rl78/rl78.md (umaxdi3): New define_expand.
15056 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15058         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15059         for non-QImode registers.
15061 2018-01-22  Richard Biener  <rguenther@suse.de>
15063         PR tree-optimization/83963
15064         * graphite-scop-detection.c (scop_detection::get_sese): Delay
15065         including the loop exit block.
15066         (scop_detection::merge_sese): Likewise.
15067         (scop_detection::add_scop): Do it here instead.
15069 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15071         * doc/sourcebuild.texi (arm_softfloat): Document.
15073 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
15075         PR gcc/77734
15076         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15077         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15078         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15080 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15081             David Edelsohn  <dje.gcc@gmail.com>
15083         PR target/83946
15084         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15085         Change "crset eq" to "crset 2".
15086         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15087         (*call_indirect_aix<mode>_nospec): Likewise.
15088         (*call_value_indirect_aix<mode>_nospec): Likewise.
15089         (*call_indirect_elfv2<mode>_nospec): Likewise.
15090         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15091         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15092         change assembly output from . to $.
15093         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15094         (indirect_jump<mode>_nospec): Change assembly output from . to $.
15095         (*tablejump<mode>_internal1_nospec): Likewise.
15097 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
15099         PR target/80870
15100         * config/sh/sh_optimize_sett_clrt.cc:
15101         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15103 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
15105         PR tree-optimization/83940
15106         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15107         offset_dt to vect_constant_def rather than vect_unknown_def_type.
15108         (vect_check_load_store_mask): Add a mask_dt_out parameter and
15109         use it to pass back the definition type.
15110         (vect_check_store_rhs): Likewise rhs_dt_out.
15111         (vect_build_gather_load_calls): Add a mask_dt argument and use
15112         it instead of a call to vect_is_simple_use.
15113         (vectorizable_store): Update calls to vect_check_load_store_mask
15114         and vect_check_store_rhs.  Use the dt returned by the latter instead
15115         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
15116         instead of calls to vect_is_simple_use.  Pass the scalar rather
15117         than the vector operand to vect_is_simple_use when handling
15118         second and subsequent copies of an rhs value.
15119         (vectorizable_load): Update calls to vect_check_load_store_mask
15120         and vect_build_gather_load_calls.  Use the cached mask_dt and
15121         gs_info.offset_dt instead of calls to vect_is_simple_use.
15123 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
15125         PR middle-end/83945
15126         * tree-emutls.c: Include gimplify.h.
15127         (lower_emutls_2): New function.
15128         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15129         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15130         it before further processing.
15132         PR target/83930
15133         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15134         UINTVAL (trueop1) instead of INTVAL (op1).
15136 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
15138         PR debug/81570
15139         PR debug/83728
15140         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15141         INCOMING_FRAME_SP_OFFSET if not defined.
15142         (scan_trace): Add ENTRY argument.  If true and
15143         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15144         emit a note to adjust the CFA offset.
15145         (create_cfi_notes): Adjust scan_trace callers.
15146         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15147         INCOMING_FRAME_SP_OFFSET in the CIE.
15148         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15149         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15150         Likewise.
15151         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15152         * doc/tm.texi: Regenerated.
15154 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15156         PR rtl-optimization/83147
15157         * lra-constraints.c (remove_inheritance_pseudos): Use
15158         lra_substitute_pseudo_within_insn.
15160 2018-01-19  Tom de Vries  <tom@codesourcery.com>
15161             Cesar Philippidis  <cesar@codesourcery.com>
15163         PR target/83920
15164         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15166 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
15168         PR target/83790
15169         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15170         spaces for function labels.
15172 2018-01-19  Martin Liska  <mliska@suse.cz>
15174         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15175         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15176         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15177         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15178         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15179         (PRED_CONST_RETURN): Change from 69 to 65.
15180         (PRED_NULL_RETURN): Change from 91 to 71.
15181         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15182         (PRED_LOOP_GUARD): Change from 66 to 73.
15184 2018-01-19  Martin Liska  <mliska@suse.cz>
15186         * predict.c (predict_insn_def): Add new assert.
15187         (struct branch_predictor): Change type to signed integer.
15188         (test_prediction_value_range): Amend test to cover
15189         PROB_UNINITIALIZED.
15190         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15191         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15192         (PRED_LOOP_ITERATIONS_MAX): Likewise.
15193         (PRED_LOOP_IV_COMPARE): Likewise.
15194         * predict.h (PROB_UNINITIALIZED): Define new constant.
15196 2018-01-19  Martin Liska  <mliska@suse.cz>
15198         * predict.c (dump_prediction): Add new format for
15199         analyze_brprob.py script which is enabled with -details
15200         suboption.
15201         * profile-count.h (precise_p): New function.
15203 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15205         PR tree-optimization/83922
15206         * tree-vect-loop.c (vect_verify_full_masking): Return false if
15207         there are no statements that need masking.
15208         (vect_active_double_reduction_p): New function.
15209         (vect_analyze_loop_operations): Use it when handling phis that
15210         are not in the loop header.
15212 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15214         PR tree-optimization/83914
15215         * tree-vect-loop.c (vectorizable_induction): Don't convert
15216         init_expr or apply the peeling adjustment for inductions
15217         that are nested within the vectorized loop.
15219 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15221         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15222         instead of NEG.
15224 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15226         PR sanitizer/81715
15227         PR testsuite/83882
15228         * function.h (gimplify_parameters): Add gimple_seq * argument.
15229         * function.c: Include gimple.h and options.h.
15230         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15231         for the added local temporaries if needed.
15232         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15233         if there are any parameter cleanups, wrap whole body into a
15234         try/finally with the cleanups.
15236 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
15238         PR target/82964
15239         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15240         Use GET_MODE_CLASS for scalar floating point.
15242 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15244         PR ipa/82256
15245         patch by PaX Team
15246         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15247         Fix call of call_cgraph_insertion_hooks.
15249 2018-01-18  Martin Sebor  <msebor@redhat.com>
15251         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15253 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15255         PR ipa/83619
15256         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15257         frequencies.
15259 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
15261         PR other/70268
15262         * common.opt: (-ffile-prefix-map): New option.
15263         * opts.c (common_handle_option): Defer it.
15264         * opts-global.c (handle_common_deferred_options): Handle it.
15265         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15266         * file-prefix-map.h: New file.
15267         (remap_debug_filename, add_debug_prefix_map): ...here.
15268         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15269         * final.c (debug_prefix_map, add_debug_prefix_map
15270         remap_debug_filename): Move to...
15271         * file-prefix-map.c: New file.
15272         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15273         generalize, get rid of alloca(), use strrchr() instead of strchr().
15274         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15275         Implement in terms of add_prefix_map().
15276         (remap_macro_filename, remap_debug_filename): Implement in term of
15277         remap_filename().
15278         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15279         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15280         * dbxout.c: Include file-prefix-map.h.
15281         * varasm.c: Likewise.
15282         * vmsdbgout.c: Likewise.
15283         * xcoffout.c: Likewise.
15284         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15285         * doc/cppopts.texi (-fmacro-prefix-map): Document.
15286         * doc/invoke.texi (-ffile-prefix-map): Document.
15287         (-fdebug-prefix-map): Update description.
15289 2018-01-18  Martin Liska  <mliska@suse.cz>
15291         * config/i386/i386.c (indirect_thunk_name): Document that also
15292         lfence is emitted.
15293         (output_indirect_thunk): Document why both instructions
15294         (pause and lfence) are generated.
15296 2018-01-18  Richard Biener  <rguenther@suse.de>
15298         PR tree-optimization/83887
15299         * graphite-scop-detection.c
15300         (scop_detection::get_nearest_dom_with_single_entry): Remove.
15301         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15302         (scop_detection::merge_sese): Re-implement with a flood-fill
15303         algorithm that properly finds a SESE region if it exists.
15305 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15307         PR c/61240
15308         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15309         pointer_diff optimizations use view_convert instead of convert.
15311 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15313         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15314         Generate different code for -mno-speculate-indirect-jumps.
15315         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15316         (*call_indirect_aix<mode>): Disable for
15317         -mno-speculate-indirect-jumps.
15318         (*call_indirect_aix<mode>_nospec): New define_insn.
15319         (*call_value_indirect_aix<mode>): Disable for
15320         -mno-speculate-indirect-jumps.
15321         (*call_value_indirect_aix<mode>_nospec): New define_insn.
15322         (*sibcall_nonlocal_sysv<mode>): Generate different code for
15323         -mno-speculate-indirect-jumps.
15324         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15326 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
15328         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15329         long double type, set the flags for noting the default long double
15330         type, even if we don't pass or return a long double type.
15332 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
15334         PR ipa/83051
15335         * ipa-inline.c (flatten_function): Do not overwrite final inlining
15336         failure.
15338 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
15340         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15341         support for merge[hl].
15342         (fold_mergehl_helper): New helper function.
15343         (tree-vector-builder.h): New #include for tree_vector_builder usage.
15344         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15345         (altivec_vmrglw_direct): Add xxmrglw insn.
15347 2018-01-17  Andrew Waterman  <andrew@sifive.com>
15349         * config/riscv/riscv.c (riscv_conditional_register_usage): If
15350         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15352 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
15354         PR lto/83121
15355         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15356         call the lto_location_cache before reading the
15357         DECL_SOURCE_LOCATION of the types.
15359 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
15360             Richard Sandiford  <richard.sandiford@linaro.org>
15362         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15363         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15364         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15365         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15366         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15367         Add declaration.
15368         * config/aarch64/constraints.md (aarch64_movti_operand):
15369         Limit immediates.
15370         * config/aarch64/predicates.md (Uti): Add new constraint.
15372 2018-01-17 Carl Love  <cel@us.ibm.com>
15374         * config/rs6000/vsx.md (define_expand xl_len_r,
15375         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15376         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15377         lxvll.
15378         (define_expand, define_insn): Move the shift left from  the
15379         define_insn to the define_expand for lxvl and stxvl instructions.
15380         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15381         and XL_LEN_R definitions to PURE.
15383 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
15385         * config/i386/i386.c (indirect_thunk_name): Declare regno
15386         as unsigned int.  Compare regno with INVALID_REGNUM.
15387         (output_indirect_thunk): Ditto.
15388         (output_indirect_thunk_function): Ditto.
15389         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
15390         in the call to output_indirect_thunk_function.
15392 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
15394         PR middle-end/83884
15395         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15396         rather than the size of inner_type to determine the stack slot size
15397         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15399 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
15401         PR target/83546
15402         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15403         to PTA_SILVERMONT.
15405 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
15407         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15408         endian Linux systems to optionally enable multilibs for selecting
15409         the long double type if the user configured an explicit type.
15410         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15411         have no long double multilibs if not defined.
15412         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15413         warn if the user used -mabi={ieee,ibm}longdouble and we built
15414         multilibs for long double.
15415         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15416         appropriate multilib option.
15417         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15418         multilib options.
15419         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15420         for building long double multilibs.
15421         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15423 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
15425         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15426         copies.
15428         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15429         64 bits.
15430         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15431         128 bits.
15433         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15434         variables.
15436         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15437         return value.
15439 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
15441         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15442         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15444 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15446         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15447         different rtl trees depending on TARGET_64BIT.
15448         (rs6000_gen_lvx): Likewise.
15450 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
15452         * config/visium/visium.md (nop): Tweak comment.
15453         (hazard_nop): Likewise.
15455 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15457         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15458         -mspeculate-indirect-jumps.
15459         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15460         for -mno-speculate-indirect-jumps.
15461         (*call_indirect_elfv2<mode>_nospec): New define_insn.
15462         (*call_value_indirect_elfv2<mode>): Disable for
15463         -mno-speculate-indirect-jumps.
15464         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15465         (indirect_jump): Emit different RTL for
15466         -mno-speculate-indirect-jumps.
15467         (*indirect_jump<mode>): Disable for
15468         -mno-speculate-indirect-jumps.
15469         (*indirect_jump<mode>_nospec): New define_insn.
15470         (tablejump): Emit different RTL for
15471         -mno-speculate-indirect-jumps.
15472         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15473         (tablejumpsi_nospec): New define_expand.
15474         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15475         (tablejumpdi_nospec): New define_expand.
15476         (*tablejump<mode>_internal1): Disable for
15477         -mno-speculate-indirect-jumps.
15478         (*tablejump<mode>_internal1_nospec): New define_insn.
15479         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15480         option.
15482 2018-01-16  Artyom Skrobov tyomitch@gmail.com
15484         * caller-save.c (insert_save): Drop unnecessary parameter.  All
15485         callers updated.
15487 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15488             Richard Biener  <rguenth@suse.de>
15490         PR libgomp/83590
15491         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15492         return early, inline manually is_gimple_sizepos.  Make sure if we
15493         call gimplify_expr we don't end up with a gimple constant.
15494         * tree.c (variably_modified_type_p): Don't return true for
15495         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
15496         * gimplify.h (is_gimple_sizepos): Remove.
15498 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15500         PR tree-optimization/83857
15501         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15502         vectorizable_live_operation for pure SLP statements.
15503         (vectorizable_live_operation): Handle PHIs.
15505 2018-01-16  Richard Biener  <rguenther@suse.de>
15507         PR tree-optimization/83867
15508         * tree-vect-stmts.c (vect_transform_stmt): Precompute
15509         nested_in_vect_loop_p since the scalar stmt may get invalidated.
15511 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15513         PR c/83844
15514         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15515         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15516         If off is not INTEGER_CST, issue a may not be aligned warning
15517         rather than isn't aligned.  Use isn%'t rather than isn't.
15518         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15519         into MULT_EXPR.
15520         <case MULT_EXPR>: Improve the case when bottom and one of the
15521         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15522         operand, in that case check if the other operand is multiple of
15523         bottom divided by the INTEGER_CST operand.
15525 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15527         PR target/83858
15528         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15529         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15530         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15531         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15532         * config/pa/pa.c (pa_function_arg_advance): Likewise.
15533         (pa_function_arg, pa_arg_partial_bytes): Likewise.
15534         (pa_function_arg_size): New function.
15536 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15538         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15539         in a separate statement.
15541 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15543         PR tree-optimization/83847
15544         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15545         group gathers and scatters.
15547 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15549         PR rtl-optimization/86620
15550         * params.def (max-sched-ready-insns): Bump minimum value to 1.
15552         PR rtl-optimization/83213
15553         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15554         to last if both are JUMP_INSNs.
15556         PR tree-optimization/83843
15557         * gimple-ssa-store-merging.c
15558         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15559         store_immediate_info for bswap/nop orig_stores.
15561 2018-01-15  Andrew Waterman  <andrew@sifive.com>
15563         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15564         !TARGET_MUL.
15565         <UDIV>: Increase cost if !TARGET_DIV.
15567 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
15569         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15570         (define_attr "cr_logical_3op"): New.
15571         (cceq_ior_compare): Adjust.
15572         (cceq_ior_compare_complement): Adjust.
15573         (*cceq_rev_compare): Adjust.
15574         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15575         (is_cracked_insn): Adjust.
15576         (insn_must_be_first_in_group): Adjust.
15577         * config/rs6000/40x.md: Adjust.
15578         * config/rs6000/440.md: Adjust.
15579         * config/rs6000/476.md: Adjust.
15580         * config/rs6000/601.md: Adjust.
15581         * config/rs6000/603.md: Adjust.
15582         * config/rs6000/6xx.md: Adjust.
15583         * config/rs6000/7450.md: Adjust.
15584         * config/rs6000/7xx.md: Adjust.
15585         * config/rs6000/8540.md: Adjust.
15586         * config/rs6000/cell.md: Adjust.
15587         * config/rs6000/e300c2c3.md: Adjust.
15588         * config/rs6000/e500mc.md: Adjust.
15589         * config/rs6000/e500mc64.md: Adjust.
15590         * config/rs6000/e5500.md: Adjust.
15591         * config/rs6000/e6500.md: Adjust.
15592         * config/rs6000/mpc.md: Adjust.
15593         * config/rs6000/power4.md: Adjust.
15594         * config/rs6000/power5.md: Adjust.
15595         * config/rs6000/power6.md: Adjust.
15596         * config/rs6000/power7.md: Adjust.
15597         * config/rs6000/power8.md: Adjust.
15598         * config/rs6000/power9.md: Adjust.
15599         * config/rs6000/rs64.md: Adjust.
15600         * config/rs6000/titan.md: Adjust.
15602 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15604         * config/i386/predicates.md (indirect_branch_operand): Rewrite
15605         ix86_indirect_branch_register logic.
15607 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15609         * config/i386/constraints.md (Bs): Update
15610         ix86_indirect_branch_register check.  Don't check
15611         ix86_indirect_branch_register with GOT_memory_operand.
15612         (Bw): Likewise.
15613         * config/i386/predicates.md (GOT_memory_operand): Don't check
15614         ix86_indirect_branch_register here.
15615         (GOT32_symbol_operand): Likewise.
15617 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15619         * config/i386/predicates.md (constant_call_address_operand):
15620         Rewrite ix86_indirect_branch_register logic.
15621         (sibcall_insn_operand): Likewise.
15623 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15625         * config/i386/constraints.md (Bs): Replace
15626         ix86_indirect_branch_thunk_register with
15627         ix86_indirect_branch_register.
15628         (Bw): Likewise.
15629         * config/i386/i386.md (indirect_jump): Likewise.
15630         (tablejump): Likewise.
15631         (*sibcall_memory): Likewise.
15632         (*sibcall_value_memory): Likewise.
15633         Peepholes of indirect call and jump via memory: Likewise.
15634         * config/i386/i386.opt: Likewise.
15635         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15636         (GOT_memory_operand): Likewise.
15637         (call_insn_operand): Likewise.
15638         (sibcall_insn_operand): Likewise.
15639         (GOT32_symbol_operand): Likewise.
15641 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15643         PR middle-end/83837
15644         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15645         type rather than type addr's type points to.
15646         (expand_omp_atomic_mutex): Likewise.
15647         (expand_omp_atomic): Likewise.
15649 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15651         PR target/83839
15652         * config/i386/i386.c (output_indirect_thunk_function): Use
15653         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15654         for  __x86_return_thunk.
15656 2018-01-15  Richard Biener  <rguenther@suse.de>
15658         PR middle-end/83850
15659         * expmed.c (extract_bit_field_1): Fix typo.
15661 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15663         PR target/83687
15664         * config/arm/iterators.md (VF): New mode iterator.
15665         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15666         Remove integer-related logic from pattern.
15667         (neon_vabd<mode>_3): Likewise.
15669 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15671         PR middle-end/82694
15672         * common.opt (fstrict-overflow): No longer an alias.
15673         (fwrapv-pointer): New option.
15674         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15675         also for pointer types based on flag_wrapv_pointer.
15676         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15677         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15678         opts->x_flag_wrapv got set.
15679         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15680         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15681         POINTER_TYPE_OVERFLOW_UNDEFINED.
15682         * match.pd: Likewise in address comparison pattern.
15683         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15685 2018-01-15  Richard Biener  <rguenther@suse.de>
15687         PR lto/83804
15688         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15689         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
15690         Reset type names to their identifier if their TYPE_DECL doesn't
15691         have linkage (and thus is used for ODR and devirt).
15692         (save_debug_info_for_decl): Remove.
15693         (save_debug_info_for_type): Likewise.
15694         (add_tree_to_fld_list): Adjust.
15695         * tree-pretty-print.c (dump_generic_node): Make dumping of
15696         type names more robust.
15698 2018-01-15  Richard Biener  <rguenther@suse.de>
15700         * BASE-VER: Bump to 8.0.1.
15702 2018-01-14  Martin Sebor  <msebor@redhat.com>
15704         PR other/83508
15705         * builtins.c (check_access): Avoid warning when the no-warning bit
15706         is set.
15708 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
15710         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15711         * ira-color (allocno_hard_regs_compare): Likewise.
15713 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
15715         PR target/83013
15716         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15717         Use .pushsection/.popsection.
15719 2018-01-14  Martin Sebor  <msebor@redhat.com>
15721         PR c++/81327
15722         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15724 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
15726         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15727         entry from extra_headers.
15728         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15729         extra_headers, make the list bitwise identical to the i?86-*-* one.
15731 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15733         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15734         -mcmodel=large with -mindirect-branch=thunk,
15735         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15736         -mfunction-return=thunk-extern.
15737         * doc/invoke.texi: Document -mcmodel=large is incompatible with
15738         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15739         -mfunction-return=thunk and -mfunction-return=thunk-extern.
15741 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15743         * config/i386/i386.c (print_reg): Print the name of the full
15744         integer register without '%'.
15745         (ix86_print_operand): Handle 'V'.
15746         * doc/extend.texi: Document 'V' modifier.
15748 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15750         * config/i386/constraints.md (Bs): Disallow memory operand for
15751         -mindirect-branch-register.
15752         (Bw): Likewise.
15753         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15754         (GOT_memory_operand): Likewise.
15755         (call_insn_operand): Likewise.
15756         (sibcall_insn_operand): Likewise.
15757         (GOT32_symbol_operand): Likewise.
15758         * config/i386/i386.md (indirect_jump): Call convert_memory_address
15759         for -mindirect-branch-register.
15760         (tablejump): Likewise.
15761         (*sibcall_memory): Likewise.
15762         (*sibcall_value_memory): Likewise.
15763         Disallow peepholes of indirect call and jump via memory for
15764         -mindirect-branch-register.
15765         (*call_pop): Replace m with Bw.
15766         (*call_value_pop): Likewise.
15767         (*sibcall_pop_memory): Replace m with Bs.
15768         * config/i386/i386.opt (mindirect-branch-register): New option.
15769         * doc/invoke.texi: Document -mindirect-branch-register option.
15771 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15773         * config/i386/i386-protos.h (ix86_output_function_return): New.
15774         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15775         set function_return_type.
15776         (indirect_thunk_name): Add ret_p to indicate thunk for function
15777         return.
15778         (output_indirect_thunk_function): Pass false to
15779         indirect_thunk_name.
15780         (ix86_output_indirect_branch_via_reg): Likewise.
15781         (ix86_output_indirect_branch_via_push): Likewise.
15782         (output_indirect_thunk_function): Create alias for function
15783         return thunk if regno < 0.
15784         (ix86_output_function_return): New function.
15785         (ix86_handle_fndecl_attribute): Handle function_return.
15786         (ix86_attribute_table): Add function_return.
15787         * config/i386/i386.h (machine_function): Add
15788         function_return_type.
15789         * config/i386/i386.md (simple_return_internal): Use
15790         ix86_output_function_return.
15791         (simple_return_internal_long): Likewise.
15792         * config/i386/i386.opt (mfunction-return=): New option.
15793         (indirect_branch): Mention -mfunction-return=.
15794         * doc/extend.texi: Document function_return function attribute.
15795         * doc/invoke.texi: Document -mfunction-return= option.
15797 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15799         * config/i386/i386-opts.h (indirect_branch): New.
15800         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15801         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15802         with local indirect jump when converting indirect call and jump.
15803         (ix86_set_indirect_branch_type): New.
15804         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15805         (indirectlabelno): New.
15806         (indirect_thunk_needed): Likewise.
15807         (indirect_thunk_bnd_needed): Likewise.
15808         (indirect_thunks_used): Likewise.
15809         (indirect_thunks_bnd_used): Likewise.
15810         (INDIRECT_LABEL): Likewise.
15811         (indirect_thunk_name): Likewise.
15812         (output_indirect_thunk): Likewise.
15813         (output_indirect_thunk_function): Likewise.
15814         (ix86_output_indirect_branch_via_reg): Likewise.
15815         (ix86_output_indirect_branch_via_push): Likewise.
15816         (ix86_output_indirect_branch): Likewise.
15817         (ix86_output_indirect_jmp): Likewise.
15818         (ix86_code_end): Call output_indirect_thunk_function if needed.
15819         (ix86_output_call_insn): Call ix86_output_indirect_branch if
15820         needed.
15821         (ix86_handle_fndecl_attribute): Handle indirect_branch.
15822         (ix86_attribute_table): Add indirect_branch.
15823         * config/i386/i386.h (machine_function): Add indirect_branch_type
15824         and has_local_indirect_jump.
15825         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15826         to true.
15827         (tablejump): Likewise.
15828         (*indirect_jump): Use ix86_output_indirect_jmp.
15829         (*tablejump_1): Likewise.
15830         (simple_return_indirect_internal): Likewise.
15831         * config/i386/i386.opt (mindirect-branch=): New option.
15832         (indirect_branch): New.
15833         (keep): Likewise.
15834         (thunk): Likewise.
15835         (thunk-inline): Likewise.
15836         (thunk-extern): Likewise.
15837         * doc/extend.texi: Document indirect_branch function attribute.
15838         * doc/invoke.texi: Document -mindirect-branch= option.
15840 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
15842         PR ipa/83051
15843         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15845 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
15847         * ipa-inline.c (want_inline_small_function_p): Return false if
15848         inlining has already failed with CIF_FINAL_ERROR.
15849         (update_caller_keys): Call want_inline_small_function_p before
15850         can_inline_edge_p.
15851         (update_callee_keys): Likewise.
15853 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15855         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15856         New function.
15857         (rs6000_quadword_masked_address_p): Likewise.
15858         (quad_aligned_load_p): Likewise.
15859         (quad_aligned_store_p): Likewise.
15860         (const_load_sequence_p): Add comment to describe the outer-most loop.
15861         (mimic_memory_attributes_and_flags): New function.
15862         (rs6000_gen_stvx): Likewise.
15863         (replace_swapped_aligned_store): Likewise.
15864         (rs6000_gen_lvx): Likewise.
15865         (replace_swapped_aligned_load): Likewise.
15866         (replace_swapped_load_constant): Capitalize argument name in
15867         comment describing this function.
15868         (rs6000_analyze_swaps): Add a third pass to search for vector loads
15869         and stores that access quad-word aligned addresses and replace
15870         with stvx or lvx instructions when appropriate.
15871         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15872         New function prototype.
15873         (rs6000_quadword_masked_address_p): Likewise.
15874         (rs6000_gen_lvx): Likewise.
15875         (rs6000_gen_stvx): Likewise.
15876         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15877         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15878         when memory address is aligned.
15879         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15880         this split to select lvx instruction when memory address is aligned.
15881         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15882         instruction when memory address is aligned.
15883         (*vsx_le_perm_load_v16qi): Likewise.
15884         (four unnamed splitters): Modify to select the stvx instruction
15885         when memory is aligned.
15887 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
15889         * predict.c (determine_unlikely_bbs): Handle correctly BBs
15890         which appears in the queue multiple times.
15892 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15893             Alan Hayward  <alan.hayward@arm.com>
15894             David Sherwood  <david.sherwood@arm.com>
15896         * tree-vectorizer.h (vec_lower_bound): New structure.
15897         (_loop_vec_info): Add check_nonzero and lower_bounds.
15898         (LOOP_VINFO_CHECK_NONZERO): New macro.
15899         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15900         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15901         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15902         fields.  Make seg_len the distance travelled, not including the
15903         access size.
15904         (dr_direction_indicator): Declare.
15905         (dr_zero_step_indicator): Likewise.
15906         (dr_known_forward_stride_p): Likewise.
15907         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15908         tree-ssanames.h.
15909         (runtime_alias_check_p): Allow runtime alias checks with
15910         variable strides.
15911         (operator ==): Compare access_size and align.
15912         (prune_runtime_alias_test_list): Rework for new distinction between
15913         the access_size and seg_len.
15914         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
15915         segment lengths.
15916         (get_segment_min_max): New function.
15917         (create_intersect_range_checks): Use it.
15918         (dr_step_indicator): New function.
15919         (dr_direction_indicator): Likewise.
15920         (dr_zero_step_indicator): Likewise.
15921         (dr_known_forward_stride_p): Likewise.
15922         * tree-loop-distribution.c (data_ref_segment_size): Return
15923         DR_STEP * (niters - 1).
15924         (compute_alias_check_pairs): Update call to the dr_with_seg_len
15925         constructor.
15926         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15927         (vect_preserves_scalar_order_p): New function, split out from...
15928         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
15929         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15930         (vect_vfa_access_size): New function.
15931         (vect_vfa_align): Likewise.
15932         (vect_compile_time_alias): Take access_size_a and access_b arguments.
15933         (dump_lower_bound): New function.
15934         (vect_check_lower_bound): Likewise.
15935         (vect_small_gap_p): Likewise.
15936         (vectorizable_with_step_bound_p): Likewise.
15937         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15938         depencies if the vectorization factor is 1.  Convert the checks
15939         for nonzero steps into checks on the bounds of DR_STEP.  Try using
15940         a bunds check for variable steps if the minimum required step is
15941         relatively small. Update calls to the dr_with_seg_len
15942         constructor and to vect_compile_time_alias.
15943         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15944         function.
15945         (vect_loop_versioning): Call it.
15946         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15947         when retrying.
15948         (vect_estimate_min_profitable_iters): Account for any bounds checks.
15950 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15951             Alan Hayward  <alan.hayward@arm.com>
15952             David Sherwood  <david.sherwood@arm.com>
15954         * doc/sourcebuild.texi (vect_scatter_store): Document.
15955         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15956         optabs.
15957         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15958         Document.
15959         * genopinit.c (main): Add supports_vec_scatter_store and
15960         supports_vec_scatter_store_cached to target_optabs.
15961         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15962         IFN_MASK_SCATTER_STORE.
15963         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15964         functions.
15965         * internal-fn.h (internal_store_fn_p): Declare.
15966         (internal_fn_stored_value_index): Likewise.
15967         * internal-fn.c (scatter_store_direct): New macro.
15968         (expand_scatter_store_optab_fn): New function.
15969         (direct_scatter_store_optab_supported_p): New macro.
15970         (internal_store_fn_p): New function.
15971         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15972         IFN_MASK_SCATTER_STORE.
15973         (internal_fn_mask_index): Likewise.
15974         (internal_fn_stored_value_index): New function.
15975         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15976         for scatter stores.
15977         * optabs-query.h (supports_vec_scatter_store_p): Declare.
15978         * optabs-query.c (supports_vec_scatter_store_p): New function.
15979         * tree-vectorizer.h (vect_get_store_rhs): Declare.
15980         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15981         true for scatter stores.
15982         (vect_gather_scatter_fn_p): Handle scatter stores too.
15983         (vect_check_gather_scatter): Consider using scatter stores if
15984         supports_vec_scatter_store_p.
15985         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15986         scatter stores too.
15987         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15988         internal_fn_stored_value_index.
15989         (check_load_store_masking): Handle scatter stores too.
15990         (vect_get_store_rhs): Make public.
15991         (vectorizable_call): Use internal_store_fn_p.
15992         (vectorizable_store): Handle scatter store internal functions.
15993         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15994         when deciding whether the end of the group has been reached.
15995         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15996         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15997         (mask_scatter_store<mode>): New insns.
15999 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16000             Alan Hayward  <alan.hayward@arm.com>
16001             David Sherwood  <david.sherwood@arm.com>
16003         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16004         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16005         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16006         function.
16007         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16008         Use vect_truncate_gather_scatter_offset if we can't treat the
16009         operation as a normal gather load or scatter store.
16010         (get_group_load_store_type): Take the gather_scatter_info
16011         as argument.  Try using a gather load or scatter store for
16012         single-element groups.
16013         (get_load_store_type): Update calls to get_group_load_store_type
16014         and vect_use_strided_gather_scatters_p.
16016 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16017             Alan Hayward  <alan.hayward@arm.com>
16018             David Sherwood  <david.sherwood@arm.com>
16020         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16021         optional tree argument.
16022         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16023         null target hooks.
16024         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16025         but continue to use the current value as a fallback.
16026         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16027         to compare the updates.
16028         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16029         (get_load_store_type): Use it when handling a strided access.
16030         (vect_get_strided_load_store_ops): New function.
16031         (vect_get_data_ptr_increment): Likewise.
16032         (vectorizable_load): Handle strided gather loads.  Always pass
16033         a step to vect_create_data_ref_ptr and bump_vector_ptr.
16035 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16036             Alan Hayward  <alan.hayward@arm.com>
16037             David Sherwood  <david.sherwood@arm.com>
16039         * doc/md.texi (gather_load@var{m}): Document.
16040         (mask_gather_load@var{m}): Likewise.
16041         * genopinit.c (main): Add supports_vec_gather_load and
16042         supports_vec_gather_load_cached to target_optabs.
16043         * optabs-tree.c (init_tree_optimization_optabs): Use
16044         ggc_cleared_alloc to allocate target_optabs.
16045         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16046         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16047         functions.
16048         * internal-fn.h (internal_load_fn_p): Declare.
16049         (internal_gather_scatter_fn_p): Likewise.
16050         (internal_fn_mask_index): Likewise.
16051         (internal_gather_scatter_fn_supported_p): Likewise.
16052         * internal-fn.c (gather_load_direct): New macro.
16053         (expand_gather_load_optab_fn): New function.
16054         (direct_gather_load_optab_supported_p): New macro.
16055         (direct_internal_fn_optab): New function.
16056         (internal_load_fn_p): Likewise.
16057         (internal_gather_scatter_fn_p): Likewise.
16058         (internal_fn_mask_index): Likewise.
16059         (internal_gather_scatter_fn_supported_p): Likewise.
16060         * optabs-query.c (supports_at_least_one_mode_p): New function.
16061         (supports_vec_gather_load_p): Likewise.
16062         * optabs-query.h (supports_vec_gather_load_p): Declare.
16063         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16064         and memory_type field.
16065         (NUM_PATTERNS): Bump to 15.
16066         * tree-vect-data-refs.c: Include internal-fn.h.
16067         (vect_gather_scatter_fn_p): New function.
16068         (vect_describe_gather_scatter_call): Likewise.
16069         (vect_check_gather_scatter): Try using internal functions for
16070         gather loads.  Recognize existing calls to a gather load function.
16071         (vect_analyze_data_refs): Consider using gather loads if
16072         supports_vec_gather_load_p.
16073         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16074         (vect_get_gather_scatter_offset_type): Likewise.
16075         (vect_convert_mask_for_vectype): Likewise.
16076         (vect_add_conversion_to_patterm): Likewise.
16077         (vect_try_gather_scatter_pattern): Likewise.
16078         (vect_recog_gather_scatter_pattern): New pattern recognizer.
16079         (vect_vect_recog_func_ptrs): Add it.
16080         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16081         internal_fn_mask_index and internal_gather_scatter_fn_p.
16082         (check_load_store_masking): Take the gather_scatter_info as an
16083         argument and handle gather loads.
16084         (vect_get_gather_scatter_ops): New function.
16085         (vectorizable_call): Check internal_load_fn_p.
16086         (vectorizable_load): Likewise.  Handle gather load internal
16087         functions.
16088         (vectorizable_store): Update call to check_load_store_masking.
16089         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16090         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16091         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16092         (aarch64_gather_scale_operand_d): New predicates.
16093         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16094         (mask_gather_load<mode>): New insns.
16096 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16097             Alan Hayward  <alan.hayward@arm.com>
16098             David Sherwood  <david.sherwood@arm.com>
16100         * optabs.def (fold_left_plus_optab): New optab.
16101         * doc/md.texi (fold_left_plus_@var{m}): Document.
16102         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16103         * internal-fn.c (fold_left_direct): Define.
16104         (expand_fold_left_optab_fn): Likewise.
16105         (direct_fold_left_optab_supported_p): Likewise.
16106         * fold-const-call.c (fold_const_fold_left): New function.
16107         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16108         * tree-parloops.c (valid_reduction_p): New function.
16109         (gather_scalar_reductions): Use it.
16110         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16111         (vect_finish_replace_stmt): Declare.
16112         * tree-vect-loop.c (fold_left_reduction_fn): New function.
16113         (needs_fold_left_reduction_p): New function, split out from...
16114         (vect_is_simple_reduction): ...here.  Accept reductions that
16115         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16116         (vect_force_simple_reduction): Also store the reduction type in
16117         the assignment's STMT_VINFO_REDUC_TYPE.
16118         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16119         (merge_with_identity): New function.
16120         (vect_expand_fold_left): Likewise.
16121         (vectorize_fold_left_reduction): Likewise.
16122         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
16123         scalar phi in place for it.  Check for target support and reject
16124         cases that would reassociate the operation.  Defer the transform
16125         phase to vectorize_fold_left_reduction.
16126         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16127         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16128         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16130 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16132         * tree-if-conv.c (predicate_mem_writes): Remove redundant
16133         call to ifc_temp_var.
16135 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16136             Alan Hayward  <alan.hayward@arm.com>
16137             David Sherwood  <david.sherwood@arm.com>
16139         * target.def (legitimize_address_displacement): Take the original
16140         offset as a poly_int.
16141         * targhooks.h (default_legitimize_address_displacement): Update
16142         accordingly.
16143         * targhooks.c (default_legitimize_address_displacement): Likewise.
16144         * doc/tm.texi: Regenerate.
16145         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16146         as an argument, moving assert of ad->disp == ad->disp_term to...
16147         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
16148         Try calling targetm.legitimize_address_displacement before expanding
16149         the address rather than afterwards, and adjust for the new interface.
16150         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16151         Match the new hook interface.  Handle SVE addresses.
16152         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16153         new hook interface.
16155 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16157         * Makefile.in (OBJS): Add early-remat.o.
16158         * target.def (select_early_remat_modes): New hook.
16159         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16160         * doc/tm.texi: Regenerate.
16161         * targhooks.h (default_select_early_remat_modes): Declare.
16162         * targhooks.c (default_select_early_remat_modes): New function.
16163         * timevar.def (TV_EARLY_REMAT): New timevar.
16164         * passes.def (pass_early_remat): New pass.
16165         * tree-pass.h (make_pass_early_remat): Declare.
16166         * early-remat.c: New file.
16167         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16168         function.
16169         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16171 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16172             Alan Hayward  <alan.hayward@arm.com>
16173             David Sherwood  <david.sherwood@arm.com>
16175         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16176         vfm1 with a bound_epilog parameter.
16177         (vect_do_peeling): Update calls accordingly, and move the prologue
16178         call earlier in the function.  Treat the base bound_epilog as 0 for
16179         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
16180         this base when peeling for gaps.
16181         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16182         with fully-masked loops.
16183         (vect_estimate_min_profitable_iters): Handle the single peeled
16184         iteration in that case.
16186 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16187             Alan Hayward  <alan.hayward@arm.com>
16188             David Sherwood  <david.sherwood@arm.com>
16190         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16191         single-element interleaving even if the size is not a power of 2.
16192         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16193         accesses for single-element interleaving if the group size is
16194         not a power of 2.
16196 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16197             Alan Hayward  <alan.hayward@arm.com>
16198             David Sherwood  <david.sherwood@arm.com>
16200         * doc/md.texi (fold_extract_last_@var{m}): Document.
16201         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16202         * optabs.def (fold_extract_last_optab): New optab.
16203         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16204         * internal-fn.c (fold_extract_direct): New macro.
16205         (expand_fold_extract_optab_fn): Likewise.
16206         (direct_fold_extract_optab_supported_p): Likewise.
16207         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16208         * tree-vect-loop.c (vect_model_reduction_cost): Handle
16209         EXTRACT_LAST_REDUCTION.
16210         (get_initial_def_for_reduction): Do not create an initial vector
16211         for EXTRACT_LAST_REDUCTION reductions.
16212         (vectorizable_reduction): Leave the scalar phi in place for
16213         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
16214         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
16215         epilogue code for EXTRACT_LAST_REDUCTION and defer the
16216         transform phase to vectorizable_condition.
16217         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16218         split out from...
16219         (vect_finish_stmt_generation): ...here.
16220         (vect_finish_replace_stmt): New function.
16221         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16222         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16223         pattern.
16224         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16226 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16227             Alan Hayward  <alan.hayward@arm.com>
16228             David Sherwood  <david.sherwood@arm.com>
16230         * doc/md.texi (extract_last_@var{m}): Document.
16231         * optabs.def (extract_last_optab): New optab.
16232         * internal-fn.def (EXTRACT_LAST): New internal function.
16233         * internal-fn.c (cond_unary_direct): New macro.
16234         (expand_cond_unary_optab_fn): Likewise.
16235         (direct_cond_unary_optab_supported_p): Likewise.
16236         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16237         loops using EXTRACT_LAST.
16238         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16239         (extract_last_<mode>): ...this optab.
16240         (vec_extract<mode><Vel>): Update accordingly.
16242 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16243             Alan Hayward  <alan.hayward@arm.com>
16244             David Sherwood  <david.sherwood@arm.com>
16246         * target.def (empty_mask_is_expensive): New hook.
16247         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16248         * doc/tm.texi: Regenerate.
16249         * targhooks.h (default_empty_mask_is_expensive): Declare.
16250         * targhooks.c (default_empty_mask_is_expensive): New function.
16251         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16252         if the target says that empty masks are expensive.
16253         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16254         New function.
16255         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16257 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16258             Alan Hayward  <alan.hayward@arm.com>
16259             David Sherwood  <david.sherwood@arm.com>
16261         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16262         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16263         (vect_use_loop_mask_for_alignment_p): New function.
16264         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16265         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16266         niters_skip argument.  Make sure that the first niters_skip elements
16267         of the first iteration are inactive.
16268         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16269         Update call to vect_set_loop_masks_directly.
16270         (get_misalign_in_elems): New function, split out from...
16271         (vect_gen_prolog_loop_niters): ...here.
16272         (vect_update_init_of_dr): Take a code argument that specifies whether
16273         the adjustment should be added or subtracted.
16274         (vect_update_init_of_drs): Likewise.
16275         (vect_prepare_for_masked_peels): New function.
16276         (vect_do_peeling): Skip prologue peeling if we're using a mask
16277         instead.  Update call to vect_update_inits_of_drs.
16278         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16279         mask_skip_niters.
16280         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16281         alignment.  Do not include the number of peeled iterations in
16282         the minimum threshold in that case.
16283         (vectorizable_induction): Adjust the start value down by
16284         LOOP_VINFO_MASK_SKIP_NITERS iterations.
16285         (vect_transform_loop): Call vect_prepare_for_masked_peels.
16286         Take the number of skipped iterations into account when calculating
16287         the loop bounds.
16288         * tree-vect-stmts.c (vect_gen_while_not): New function.
16290 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16291             Alan Hayward  <alan.hayward@arm.com>
16292             David Sherwood  <david.sherwood@arm.com>
16294         * doc/sourcebuild.texi (vect_fully_masked): Document.
16295         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16296         default value to 0.
16297         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16298         split out from...
16299         (vect_analyze_loop_2): ...here. Don't check the vectorization
16300         factor against the number of loop iterations if the loop is
16301         fully-masked.
16303 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16304             Alan Hayward  <alan.hayward@arm.com>
16305             David Sherwood  <david.sherwood@arm.com>
16307         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16308         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16309         (dump_groups): Update accordingly.
16310         (iv_use::mem_type): New member variable.
16311         (address_p): New function.
16312         (record_use): Add a mem_type argument and initialize the new
16313         mem_type field.
16314         (record_group_use): Add a mem_type argument.  Use address_p.
16315         Remove obsolete null checks of base_object.  Update call to record_use.
16316         (find_interesting_uses_op): Update call to record_group_use.
16317         (find_interesting_uses_cond): Likewise.
16318         (find_interesting_uses_address): Likewise.
16319         (get_mem_type_for_internal_fn): New function.
16320         (find_address_like_use): Likewise.
16321         (find_interesting_uses_stmt): Try find_address_like_use before
16322         calling find_interesting_uses_op.
16323         (addr_offset_valid_p): Use the iv mem_type field as the type
16324         of the addressed memory.
16325         (add_autoinc_candidates): Likewise.
16326         (get_address_cost): Likewise.
16327         (split_small_address_groups_p): Use address_p.
16328         (split_address_groups): Likewise.
16329         (add_iv_candidate_for_use): Likewise.
16330         (autoinc_possible_for_pair): Likewise.
16331         (rewrite_groups): Likewise.
16332         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16333         (determine_group_iv_cost): Update after split of USE_ADDRESS.
16334         (get_alias_ptr_type_for_ptr_address): New function.
16335         (rewrite_use_address): Rewrite address uses in calls that were
16336         identified by find_address_like_use.
16338 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16339             Alan Hayward  <alan.hayward@arm.com>
16340             David Sherwood  <david.sherwood@arm.com>
16342         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16343         TARGET_MEM_REFs.
16344         * gimple-expr.h (is_gimple_addressable: Likewise.
16345         * gimple-expr.c (is_gimple_address): Likewise.
16346         * internal-fn.c (expand_call_mem_ref): New function.
16347         (expand_mask_load_optab_fn): Use it.
16348         (expand_mask_store_optab_fn): Likewise.
16350 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16351             Alan Hayward  <alan.hayward@arm.com>
16352             David Sherwood  <david.sherwood@arm.com>
16354         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16355         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16356         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16357         (cond_umax@var{mode}): Document.
16358         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16359         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16360         (cond_umin_optab, cond_umax_optab): New optabs.
16361         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16362         (COND_IOR, COND_XOR): New internal functions.
16363         * internal-fn.h (get_conditional_internal_fn): Declare.
16364         * internal-fn.c (cond_binary_direct): New macro.
16365         (expand_cond_binary_optab_fn): Likewise.
16366         (direct_cond_binary_optab_supported_p): Likewise.
16367         (get_conditional_internal_fn): New function.
16368         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16369         Cope with reduction statements that are vectorized as calls rather
16370         than assignments.
16371         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16372         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16373         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16374         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16375         (UNSPEC_COND_EOR): New unspecs.
16376         (optab): Add mappings for them.
16377         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16378         (sve_int_op, sve_fp_op): New int attributes.
16380 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16381             Alan Hayward  <alan.hayward@arm.com>
16382             David Sherwood  <david.sherwood@arm.com>
16384         * optabs.def (while_ult_optab): New optab.
16385         * doc/md.texi (while_ult@var{m}@var{n}): Document.
16386         * internal-fn.def (WHILE_ULT): New internal function.
16387         * internal-fn.h (direct_internal_fn_supported_p): New override
16388         that takes two types as argument.
16389         * internal-fn.c (while_direct): New macro.
16390         (expand_while_optab_fn): New function.
16391         (convert_optab_supported_p): Likewise.
16392         (direct_while_optab_supported_p): New macro.
16393         * wide-int.h (wi::udiv_ceil): New function.
16394         * tree-vectorizer.h (rgroup_masks): New structure.
16395         (vec_loop_masks): New typedef.
16396         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16397         and fully_masked_p.
16398         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16399         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16400         (vect_max_vf): New function.
16401         (slpeel_make_loop_iterate_ntimes): Delete.
16402         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16403         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16404         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16405         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16406         internal-fn.h, stor-layout.h and optabs-query.h.
16407         (vect_set_loop_mask): New function.
16408         (add_preheader_seq): Likewise.
16409         (add_header_seq): Likewise.
16410         (interleave_supported_p): Likewise.
16411         (vect_maybe_permute_loop_masks): Likewise.
16412         (vect_set_loop_masks_directly): Likewise.
16413         (vect_set_loop_condition_masked): Likewise.
16414         (vect_set_loop_condition_unmasked): New function, split out from
16415         slpeel_make_loop_iterate_ntimes.
16416         (slpeel_make_loop_iterate_ntimes): Rename to..
16417         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
16418         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16419         (vect_do_peeling): Update call accordingly.
16420         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16421         loops.
16422         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16423         mask_compare_type, can_fully_mask_p and fully_masked_p.
16424         (release_vec_loop_masks): New function.
16425         (_loop_vec_info): Use it to free the loop masks.
16426         (can_produce_all_loop_masks_p): New function.
16427         (vect_get_max_nscalars_per_iter): Likewise.
16428         (vect_verify_full_masking): Likewise.
16429         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16430         retries, and free the mask rgroups before retrying.  Check loop-wide
16431         reasons for disallowing fully-masked loops.  Make the final decision
16432         about whether use a fully-masked loop or not.
16433         (vect_estimate_min_profitable_iters): Do not assume that peeling
16434         for the number of iterations will be needed for fully-masked loops.
16435         (vectorizable_reduction): Disable fully-masked loops.
16436         (vectorizable_live_operation): Likewise.
16437         (vect_halve_mask_nunits): New function.
16438         (vect_double_mask_nunits): Likewise.
16439         (vect_record_loop_mask): Likewise.
16440         (vect_get_loop_mask): Likewise.
16441         (vect_transform_loop): Handle the case in which the final loop
16442         iteration might handle a partial vector.  Call vect_set_loop_condition
16443         instead of slpeel_make_loop_iterate_ntimes.
16444         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16445         (check_load_store_masking): New function.
16446         (prepare_load_store_mask): Likewise.
16447         (vectorizable_store): Handle fully-masked loops.
16448         (vectorizable_load): Likewise.
16449         (supportable_widening_operation): Use vect_halve_mask_nunits for
16450         booleans.
16451         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16452         (vect_gen_while): New function.
16453         * config/aarch64/aarch64.md (umax<mode>3): New expander.
16454         (aarch64_uqdec<mode>): New insn.
16456 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16457             Alan Hayward  <alan.hayward@arm.com>
16458             David Sherwood  <david.sherwood@arm.com>
16460         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16461         (reduc_xor_scal_optab): New optabs.
16462         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16463         (reduc_xor_scal_@var{m}): Document.
16464         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16465         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16466         internal functions.
16467         * fold-const-call.c (fold_const_call): Handle them.
16468         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16469         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16470         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16471         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16472         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16473         (UNSPEC_XORV): New unspecs.
16474         (optab): Add entries for them.
16475         (BITWISEV): New int iterator.
16476         (bit_reduc_op): New int attributes.
16478 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16479             Alan Hayward  <alan.hayward@arm.com>
16480             David Sherwood  <david.sherwood@arm.com>
16482         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16483         * internal-fn.def (VEC_SHL_INSERT): New internal function.
16484         * optabs.def (vec_shl_insert_optab): New optab.
16485         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16486         (duplicate_and_interleave): Likewise.
16487         * tree-vect-loop.c: Include internal-fn.h.
16488         (neutral_op_for_slp_reduction): New function, split out from
16489         get_initial_defs_for_reduction.
16490         (get_initial_def_for_reduction): Handle option 2 for variable-length
16491         vectors by loading the neutral value into a vector and then shifting
16492         the initial value into element 0.
16493         (get_initial_defs_for_reduction): Replace the code argument with
16494         the neutral value calculated by neutral_op_for_slp_reduction.
16495         Use gimple_build_vector for constant-length vectors.
16496         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16497         but the first group_size elements have a neutral value.
16498         Use duplicate_and_interleave otherwise.
16499         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16500         Update call to get_initial_defs_for_reduction.  Handle SLP
16501         reductions for variable-length vectors by creating one vector
16502         result for each scalar result, with the elements associated
16503         with other scalar results stubbed out with the neutral value.
16504         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16505         Require IFN_VEC_SHL_INSERT for double reductions on
16506         variable-length vectors, or SLP reductions that have
16507         a neutral value.  Require can_duplicate_and_interleave_p
16508         support for variable-length unchained SLP reductions if there
16509         is no neutral value, such as for MIN/MAX reductions.  Also require
16510         the number of vector elements to be a multiple of the number of
16511         SLP statements when doing variable-length unchained SLP reductions.
16512         Update call to vect_create_epilog_for_reduction.
16513         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16514         and remove initial values.
16515         (duplicate_and_interleave): Make public.
16516         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16517         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16519 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16520             Alan Hayward  <alan.hayward@arm.com>
16521             David Sherwood  <david.sherwood@arm.com>
16523         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16524         (can_duplicate_and_interleave_p): New function.
16525         (vect_get_and_check_slp_defs): Take the vector of statements
16526         rather than just the current one.  Remove excess parentheses.
16527         Restriction rejectinon of vect_constant_def and vect_external_def
16528         for variable-length vectors to boolean types, or types for which
16529         can_duplicate_and_interleave_p is false.
16530         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16531         (duplicate_and_interleave): New function.
16532         (vect_get_constant_vectors): Use gimple_build_vector for
16533         constant-length vectors and suitable variable-length constant
16534         vectors.  Use duplicate_and_interleave for other variable-length
16535         vectors.  Don't defer the update when inserting new statements.
16537 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16538             Alan Hayward  <alan.hayward@arm.com>
16539             David Sherwood  <david.sherwood@arm.com>
16541         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16542         min_profitable_iters doesn't go negative.
16544 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16545             Alan Hayward  <alan.hayward@arm.com>
16546             David Sherwood  <david.sherwood@arm.com>
16548         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16549         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16550         * optabs.def (vec_mask_load_lanes_optab): New optab.
16551         (vec_mask_store_lanes_optab): Likewise.
16552         * internal-fn.def (MASK_LOAD_LANES): New internal function.
16553         (MASK_STORE_LANES): Likewise.
16554         * internal-fn.c (mask_load_lanes_direct): New macro.
16555         (mask_store_lanes_direct): Likewise.
16556         (expand_mask_load_optab_fn): Handle masked operations.
16557         (expand_mask_load_lanes_optab_fn): New macro.
16558         (expand_mask_store_optab_fn): Handle masked operations.
16559         (expand_mask_store_lanes_optab_fn): New macro.
16560         (direct_mask_load_lanes_optab_supported_p): Likewise.
16561         (direct_mask_store_lanes_optab_supported_p): Likewise.
16562         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16563         parameter.
16564         (vect_load_lanes_supported): Likewise.
16565         * tree-vect-data-refs.c (strip_conversion): New function.
16566         (can_group_stmts_p): Likewise.
16567         (vect_analyze_data_ref_accesses): Use it instead of checking
16568         for a pair of assignments.
16569         (vect_store_lanes_supported): Take a masked_p parameter.
16570         (vect_load_lanes_supported): Likewise.
16571         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16572         vect_store_lanes_supported and vect_load_lanes_supported.
16573         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16574         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16575         parameter.  Don't allow gaps for masked accesses.
16576         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
16577         and vect_load_lanes_supported.
16578         (get_load_store_type): Take a masked_p parameter and update
16579         call to get_group_load_store_type.
16580         (vectorizable_store): Update call to get_load_store_type.
16581         Handle IFN_MASK_STORE_LANES.
16582         (vectorizable_load): Update call to get_load_store_type.
16583         Handle IFN_MASK_LOAD_LANES.
16585 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16586             Alan Hayward  <alan.hayward@arm.com>
16587             David Sherwood  <david.sherwood@arm.com>
16589         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16590         modes for SVE.
16591         * config/aarch64/aarch64-protos.h
16592         (aarch64_sve_struct_memory_operand_p): Declare.
16593         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16594         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16595         (VPRED, vpred): Handle SVE structure modes.
16596         * config/aarch64/constraints.md (Utx): New constraint.
16597         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16598         (aarch64_sve_struct_nonimmediate_operand): New predicates.
16599         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16600         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16601         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16602         structure modes.  Split into pieces after RA.
16603         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16604         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16605         New patterns.
16606         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16607         SVE structure modes.
16608         (aarch64_classify_address): Likewise.
16609         (sizetochar): Move earlier in file.
16610         (aarch64_print_operand): Handle SVE register lists.
16611         (aarch64_array_mode): New function.
16612         (aarch64_sve_struct_memory_operand_p): Likewise.
16613         (TARGET_ARRAY_MODE): Redefine.
16615 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16616             Alan Hayward  <alan.hayward@arm.com>
16617             David Sherwood  <david.sherwood@arm.com>
16619         * target.def (array_mode): New target hook.
16620         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16621         * doc/tm.texi: Regenerate.
16622         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16623         * hooks.c (hook_optmode_mode_uhwi_none): New function.
16624         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16625         targetm.array_mode.
16626         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
16627         type sizes.
16629 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16630             Alan Hayward  <alan.hayward@arm.com>
16631             David Sherwood  <david.sherwood@arm.com>
16633         * fold-const.c (fold_binary_loc): Check the argument types
16634         rather than the result type when testing for a vector operation.
16636 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16638         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16639         * doc/tm.texi: Regenerate.
16641 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16642             Alan Hayward  <alan.hayward@arm.com>
16643             David Sherwood  <david.sherwood@arm.com>
16645         * doc/invoke.texi (-msve-vector-bits=): Document new option.
16646         (sve): Document new AArch64 extension.
16647         * doc/md.texi (w): Extend the description of the AArch64
16648         constraint to include SVE vectors.
16649         (Upl, Upa): Document new AArch64 predicate constraints.
16650         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16651         enum.
16652         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16653         (msve-vector-bits=): New option.
16654         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16655         SVE when these are disabled.
16656         (sve): New extension.
16657         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16658         modes.  Adjust their number of units based on aarch64_sve_vg.
16659         (MAX_BITSIZE_MODE_ANY_MODE): Define.
16660         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16661         aarch64_addr_query_type.
16662         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16663         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16664         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16665         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16666         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16667         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16668         (aarch64_simd_imm_zero_p): Delete.
16669         (aarch64_check_zero_based_sve_index_immediate): Declare.
16670         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16671         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16672         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16673         (aarch64_sve_float_mul_immediate_p): Likewise.
16674         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16675         rather than an rtx.
16676         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16677         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16678         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16679         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16680         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16681         (aarch64_regmode_natural_size): Likewise.
16682         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16683         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16684         left one place.
16685         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16686         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16687         for VG and the SVE predicate registers.
16688         (V_ALIASES): Add a "z"-prefixed alias.
16689         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16690         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16691         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16692         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16693         (REG_CLASS_NAMES): Add entries for them.
16694         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
16695         and the predicate registers.
16696         (aarch64_sve_vg): Declare.
16697         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16698         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16699         (REGMODE_NATURAL_SIZE): Define.
16700         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16701         SVE macros.
16702         * config/aarch64/aarch64.c: Include cfgrtl.h.
16703         (simd_immediate_info): Add a constructor for series vectors,
16704         and an associated step field.
16705         (aarch64_sve_vg): New variable.
16706         (aarch64_dbx_register_number): Handle VG and the predicate registers.
16707         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16708         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16709         (VEC_ANY_DATA, VEC_STRUCT): New constants.
16710         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16711         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16712         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16713         (aarch64_get_mask_mode): New functions.
16714         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16715         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16716         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
16717         predicate modes and predicate registers.  Explicitly restrict
16718         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
16719         to store a vector mode if it is recognized by
16720         aarch64_classify_vector_mode.
16721         (aarch64_regmode_natural_size): New function.
16722         (aarch64_hard_regno_caller_save_mode): Return the original mode
16723         for predicates.
16724         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16725         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16726         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16727         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16728         functions.
16729         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
16730         does not overlap dest if the function is frame-related.  Handle
16731         SVE constants.
16732         (aarch64_split_add_offset): New function.
16733         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16734         them aarch64_add_offset.
16735         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16736         and update call to aarch64_sub_sp.
16737         (aarch64_add_cfa_expression): New function.
16738         (aarch64_expand_prologue): Pass extra temporary registers to the
16739         functions above.  Handle the case in which we need to emit new
16740         DW_CFA_expressions for registers that were originally saved
16741         relative to the stack pointer, but now have to be expressed
16742         relative to the frame pointer.
16743         (aarch64_output_mi_thunk): Pass extra temporary registers to the
16744         functions above.
16745         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
16746         IP0 and IP1 values for SVE frames.
16747         (aarch64_expand_vec_series): New function.
16748         (aarch64_expand_sve_widened_duplicate): Likewise.
16749         (aarch64_expand_sve_const_vector): Likewise.
16750         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16751         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
16752         into the register, rather than emitting a SET directly.
16753         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16754         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16755         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16756         (offset_9bit_signed_scaled_p): New functions.
16757         (aarch64_replicate_bitmask_imm): New function.
16758         (aarch64_bitmask_imm): Use it.
16759         (aarch64_cannot_force_const_mem): Reject expressions involving
16760         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
16761         (aarch64_classify_index): Handle SVE indices, by requiring
16762         a plain register index with a scale that matches the element size.
16763         (aarch64_classify_address): Handle SVE addresses.  Assert that
16764         the mode of the address is VOIDmode or an integer mode.
16765         Update call to aarch64_classify_symbol.
16766         (aarch64_classify_symbolic_expression): Update call to
16767         aarch64_classify_symbol.
16768         (aarch64_const_vec_all_in_range_p): New function.
16769         (aarch64_print_vector_float_operand): Likewise.
16770         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
16771         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
16772         and the FP immediates 1.0 and 0.5.
16773         (aarch64_print_address_internal): Handle SVE addresses.
16774         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16775         (aarch64_regno_regclass): Handle predicate registers.
16776         (aarch64_secondary_reload): Handle big-endian reloads of SVE
16777         data modes.
16778         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16779         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16780         (aarch64_convert_sve_vector_bits): New function.
16781         (aarch64_override_options): Use it to handle -msve-vector-bits=.
16782         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16783         rather than an rtx.
16784         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16785         Handle SVE vector and predicate modes.  Accept VL-based constants
16786         that need only one temporary register, and VL offsets that require
16787         no temporary registers.
16788         (aarch64_conditional_register_usage): Mark the predicate registers
16789         as fixed if SVE isn't available.
16790         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16791         Return true for SVE vector and predicate modes.
16792         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16793         rather than an unsigned int.  Handle SVE modes.
16794         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
16795         SVE modes.
16796         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16797         if SVE is enabled.
16798         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16799         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16800         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16801         (aarch64_sve_float_mul_immediate_p): New functions.
16802         (aarch64_sve_valid_immediate): New function.
16803         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16804         Explicitly reject structure modes.  Check for INDEX constants.
16805         Handle PTRUE and PFALSE constants.
16806         (aarch64_check_zero_based_sve_index_immediate): New function.
16807         (aarch64_simd_imm_zero_p): Delete.
16808         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16809         vector modes.  Accept constants in the range of CNT[BHWD].
16810         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16811         ask for an Advanced SIMD mode.
16812         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16813         (aarch64_simd_vector_alignment): Handle SVE predicates.
16814         (aarch64_vectorize_preferred_vector_alignment): New function.
16815         (aarch64_simd_vector_alignment_reachable): Use it instead of
16816         the vector size.
16817         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16818         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16819         functions.
16820         (MAX_VECT_LEN): Delete.
16821         (expand_vec_perm_d): Add a vec_flags field.
16822         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16823         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16824         (aarch64_evpc_ext): Don't apply a big-endian lane correction
16825         for SVE modes.
16826         (aarch64_evpc_rev): Rename to...
16827         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
16828         (aarch64_evpc_rev_global): New function.
16829         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16830         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16831         MAX_VECT_LEN.
16832         (aarch64_evpc_sve_tbl): New function.
16833         (aarch64_expand_vec_perm_const_1): Update after rename of
16834         aarch64_evpc_rev.  Handle SVE permutes too, trying
16835         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16836         than aarch64_evpc_tbl.
16837         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16838         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16839         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16840         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16841         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16842         (aarch64_expand_sve_vcond): New functions.
16843         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16844         of aarch64_vector_mode_p.
16845         (aarch64_dwarf_poly_indeterminate_value): New function.
16846         (aarch64_compute_pressure_classes): Likewise.
16847         (aarch64_can_change_mode_class): Likewise.
16848         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16849         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16850         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16851         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16852         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16853         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16854         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16855         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16856         constraints.
16857         (Dn, Dl, Dr): Accept const as well as const_vector.
16858         (Dz): Likewise.  Compare against CONST0_RTX.
16859         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16860         of "vector" where appropriate.
16861         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16862         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16863         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16864         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16865         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16866         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16867         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16868         (v_int_equiv): Extend to SVE modes.
16869         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16870         mode attributes.
16871         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16872         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16873         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16874         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16875         (SVE_COND_FP_CMP): New int iterators.
16876         (perm_hilo): Handle the new unpack unspecs.
16877         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16878         attributes.
16879         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16880         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16881         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16882         (aarch64_equality_operator, aarch64_constant_vector_operand)
16883         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16884         (aarch64_sve_nonimmediate_operand): Likewise.
16885         (aarch64_sve_general_operand): Likewise.
16886         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16887         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16888         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16889         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16890         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16891         (aarch64_sve_float_arith_immediate): Likewise.
16892         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16893         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16894         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16895         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16896         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16897         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16898         (aarch64_sve_float_arith_operand): Likewise.
16899         (aarch64_sve_float_arith_with_sub_operand): Likewise.
16900         (aarch64_sve_float_mul_operand): Likewise.
16901         (aarch64_sve_vec_perm_operand): Likewise.
16902         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16903         (aarch64_mov_operand): Accept const_poly_int and const_vector.
16904         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16905         as well as const_vector.
16906         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16907         in file.  Use CONST0_RTX and CONSTM1_RTX.
16908         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
16909         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16910         Use aarch64_simd_imm_zero.
16911         * config/aarch64/aarch64-sve.md: New file.
16912         * config/aarch64/aarch64.md: Include it.
16913         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16914         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16915         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16916         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16917         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16918         (sve): New attribute.
16919         (enabled): Disable instructions with the sve attribute unless
16920         TARGET_SVE.
16921         (movqi, movhi): Pass CONST_POLY_INT operaneds through
16922         aarch64_expand_mov_immediate.
16923         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16924         CNT[BHSD] immediates.
16925         (movti): Split CONST_POLY_INT moves into two halves.
16926         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16927         Split additions that need a temporary here if the destination
16928         is the stack pointer.
16929         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16930         (*add<mode>3_poly_1): New instruction.
16931         (set_clobber_cc): New expander.
16933 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16935         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16936         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
16937         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16938         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16939         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
16940         Change innermode from fixed_mode_size to machine_mode.
16941         (simplify_subreg): Update call accordingly.  Handle a constant-sized
16942         subreg of a variable-length CONST_VECTOR.
16944 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16945             Alan Hayward  <alan.hayward@arm.com>
16946             David Sherwood  <david.sherwood@arm.com>
16948         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16949         (add_offset_to_base): New function, split out from...
16950         (create_mem_ref): ...here.  When handling a scale other than 1,
16951         check first whether the address is valid without the offset.
16952         Add it into the base if so, leaving the index and scale as-is.
16954 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16956         PR c++/83778
16957         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16958         fold_for_warn before checking if arg2 is INTEGER_CST.
16960 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
16962         * config/rs6000/predicates.md (load_multiple_operation): Delete.
16963         (store_multiple_operation): Delete.
16964         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16965         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16966         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16967         guarded by TARGET_STRING.
16968         (rs6000_output_load_multiple): Delete.
16969         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16970         OPTION_MASK_STRING / TARGET_STRING handling.
16971         (print_operand) <'N', 'O'>: Add comment that these are unused now.
16972         (const rs6000_opt_masks) <"string">: Change mask to 0.
16973         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16974         (MASK_STRING): Delete.
16975         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16976         parts.  Simplify.
16977         (load_multiple): Delete.
16978         (*ldmsi8): Delete.
16979         (*ldmsi7): Delete.
16980         (*ldmsi6): Delete.
16981         (*ldmsi5): Delete.
16982         (*ldmsi4): Delete.
16983         (*ldmsi3): Delete.
16984         (store_multiple): Delete.
16985         (*stmsi8): Delete.
16986         (*stmsi7): Delete.
16987         (*stmsi6): Delete.
16988         (*stmsi5): Delete.
16989         (*stmsi4): Delete.
16990         (*stmsi3): Delete.
16991         (movmemsi_8reg): Delete.
16992         (corresponding unnamed define_insn): Delete.
16993         (movmemsi_6reg): Delete.
16994         (corresponding unnamed define_insn): Delete.
16995         (movmemsi_4reg): Delete.
16996         (corresponding unnamed define_insn): Delete.
16997         (movmemsi_2reg): Delete.
16998         (corresponding unnamed define_insn): Delete.
16999         (movmemsi_1reg): Delete.
17000         (corresponding unnamed define_insn): Delete.
17001         * config/rs6000/rs6000.opt (mno-string): New.
17002         (mstring): Replace by deprecation warning stub.
17003         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17005 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17007         * regrename.c (regrename_do_replace): If replacing the same
17008         reg multiple times, try to reuse last created gen_raw_REG.
17010         PR debug/81155
17011         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17012         main to workaround a bug in GDB.
17014 2018-01-12  Tom de Vries  <tom@codesourcery.com>
17016         PR target/83737
17017         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17019 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
17021         PR rtl-optimization/80481
17022         * ira-color.c (get_cap_member): New function.
17023         (allocnos_conflict_by_live_ranges_p): Use it.
17024         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17025         (setup_slot_coalesced_allocno_live_ranges): Ditto.
17027 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
17029         PR target/83628
17030         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17031         (*saddl_se_1): Ditto.
17032         (*ssubsi_1): Ditto.
17033         (*ssubl_se_1): Ditto.
17035 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17037         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17038         rather than wi::to_widest for DR_INITs.
17039         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17040         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17041         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17042         INTEGER_CSTs.
17043         (vect_analyze_group_access_1): Note that here.
17045 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17047         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17048         polynomial type sizes.
17050 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17052         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17053         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17054         (gimple_add_tmp_var): Likewise.
17056 2018-01-12  Martin Liska  <mliska@suse.cz>
17058         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17059         (gimple_alloc_sizes): Likewise.
17060         (dump_gimple_statistics): Use PRIu64 in printf format.
17061         * gimple.h: Change uint64_t to int.
17063 2018-01-12  Martin Liska  <mliska@suse.cz>
17065         * tree-core.h: Use uint64_t instead of int.
17066         * tree.c (tree_node_counts): Likewise.
17067         (tree_node_sizes): Likewise.
17068         (dump_tree_statistics): Use PRIu64 in printf format.
17070 2018-01-12  Martin Liska  <mliska@suse.cz>
17072         * Makefile.in: As qsort_chk is implemented in vec.c, add
17073         vec.o to linkage of gencfn-macros.
17074         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17075         passing the info to record_node_allocation_statistics.
17076         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17077         and pass the info.
17078         * ggc-common.c (struct ggc_usage): Add operator== and use
17079         it in operator< and compare function.
17080         * mem-stats.h (struct mem_usage): Likewise.
17081         * vec.c (struct vec_usage): Remove operator< and compare
17082         function. Can be simply inherited.
17084 2018-01-12  Martin Jambor  <mjambor@suse.cz>
17086         PR target/81616
17087         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17088         * tree-ssa-math-opts.c: Include domwalk.h.
17089         (convert_mult_to_fma_1): New function.
17090         (fma_transformation_info): New type.
17091         (fma_deferring_state): Likewise.
17092         (cancel_fma_deferring): New function.
17093         (result_of_phi): Likewise.
17094         (last_fma_candidate_feeds_initial_phi): Likewise.
17095         (convert_mult_to_fma): Added deferring logic, split actual
17096         transformation to convert_mult_to_fma_1.
17097         (math_opts_dom_walker): New type.
17098         (math_opts_dom_walker::after_dom_children): New method, body moved
17099         here from pass_optimize_widening_mul::execute, added deferring logic
17100         bits.
17101         (pass_optimize_widening_mul::execute): Moved most of code to
17102         math_opts_dom_walker::after_dom_children.
17103         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17104         * config/i386/i386.c (ix86_option_override_internal): Added
17105         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17107 2018-01-12  Richard Biener  <rguenther@suse.de>
17109         PR debug/83157
17110         * dwarf2out.c (gen_variable_die): Do not reset old_die for
17111         inline instance vars.
17113 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
17115         PR target/81819
17116         * config/rx/rx.c (rx_is_restricted_memory_address):
17117         Handle SUBREG case.
17119 2018-01-12  Richard Biener  <rguenther@suse.de>
17121         PR tree-optimization/80846
17122         * target.def (split_reduction): New target hook.
17123         * targhooks.c (default_split_reduction): New function.
17124         * targhooks.h (default_split_reduction): Declare.
17125         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17126         target requests first reduce vectors by combining low and high
17127         parts.
17128         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17129         (get_vectype_for_scalar_type_and_size): Export.
17130         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17131         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17132         * doc/tm.texi: Regenerate.
17133         * config/i386/i386.c (ix86_split_reduction): Implement
17134         TARGET_VECTORIZE_SPLIT_REDUCTION.
17136 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17138         PR target/83368
17139         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17140         in PIC mode except for TARGET_VXWORKS_RTP.
17141         * config/sparc/sparc.c: Include cfgrtl.h.
17142         (TARGET_INIT_PIC_REG): Define.
17143         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17144         (sparc_pic_register_p): New predicate.
17145         (sparc_legitimate_address_p): Use it.
17146         (sparc_legitimize_pic_address): Likewise.
17147         (sparc_delegitimize_address): Likewise.
17148         (sparc_mode_dependent_address_p): Likewise.
17149         (gen_load_pcrel_sym): Remove 4th parameter.
17150         (load_got_register): Adjust call to above.  Remove obsolete stuff.
17151         (sparc_expand_prologue): Do not call load_got_register here.
17152         (sparc_flat_expand_prologue): Likewise.
17153         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17154         (sparc_use_pseudo_pic_reg): New function.
17155         (sparc_init_pic_reg): Likewise.
17156         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17157         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17159 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
17161         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17162         Add item for branch_cost.
17164 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17166         PR rtl-optimization/83565
17167         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17168         not extend the result to a larger mode for rotate operations.
17169         (num_sign_bit_copies1): Likewise.
17171 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17173         PR target/40411
17174         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17175         -symbolic.
17176         Use values-Xc.o for -pedantic.
17177         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17179 2018-01-12  Martin Liska  <mliska@suse.cz>
17181         PR ipa/83054
17182         * ipa-devirt.c (final_warning_record::grow_type_warnings):
17183         New function.
17184         (possible_polymorphic_call_targets): Use it.
17185         (ipa_devirt): Likewise.
17187 2018-01-12  Martin Liska  <mliska@suse.cz>
17189         * profile-count.h (enum profile_quality): Use 0 as invalid
17190         enum value of profile_quality.
17192 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17194         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17195         -mext-string options.
17197 2018-01-12  Richard Biener  <rguenther@suse.de>
17199         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17200         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17201         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17202         Likewise.
17203         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17205 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17207         * configure.ac (--with-long-double-format): Add support for the
17208         configuration option to change the default long double format on
17209         PowerPC systems.
17210         * config.gcc (powerpc*-linux*-*): Likewise.
17211         * configure: Regenerate.
17212         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17213         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17214         used without modification.
17216 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17218         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17219         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17220         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17221         MISC_BUILTIN_SPEC_BARRIER.
17222         (rs6000_init_builtins): Likewise.
17223         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17224         enum value.
17225         (speculation_barrier): New define_insn.
17226         * doc/extend.texi: Document __builtin_speculation_barrier.
17228 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17230         PR target/83203
17231         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17232         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17233         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17234         iterators.
17235         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
17236         integral modes instead of "ss" and "sd".
17237         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17238         vectors with 32-bit and 64-bit elements.
17239         (vecdupssescalarmodesuffix): New mode attribute.
17240         (vec_dup<mode>): Use it.
17242 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
17244         PR target/83330
17245         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17246         frame if argument is passed on stack.
17248 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17250         PR target/82682
17251         * ree.c (combine_reaching_defs): Optimize also
17252         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17253         reg2=any_extend(exp); reg1=reg2;, formatting fix.
17255 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17257         PR middle-end/83189
17258         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17260 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17262         PR middle-end/83718
17263         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17264         after they are computed.
17266 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
17268         PR tree-optimization/83695
17269         * gimple-loop-linterchange.cc
17270         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17271         reset cached scev information after interchange.
17272         (pass_linterchange::execute): Remove call to scev_reset_htab.
17274 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17276         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17277         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17278         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17279         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17280         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17281         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17282         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17283         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17284         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17285         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17286         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17287         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17288         (V_lane_reg): Likewise.
17289         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17290         New define_expand.
17291         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17292         (vfmal_lane_low<mode>_intrinsic,
17293         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17294         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17295         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17296         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17297         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17298         vfmsl_lane_high<mode>_intrinsic): New define_insns.
17300 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17302         * config/arm/arm-cpus.in (fp16fml): New feature.
17303         (ALL_SIMD): Add fp16fml.
17304         (armv8.2-a): Add fp16fml as an option.
17305         (armv8.3-a): Likewise.
17306         (armv8.4-a): Add fp16fml as part of fp16.
17307         * config/arm/arm.h (TARGET_FP16FML): Define.
17308         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17309         when appropriate.
17310         * config/arm/arm-modes.def (V2HF): Define.
17311         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17312         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17313         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17314         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17315         vfmsl_low, vfmsl_high): New set of builtins.
17316         * config/arm/iterators.md (PLUSMINUS): New code iterator.
17317         (vfml_op): New code attribute.
17318         (VFMLHALVES): New int iterator.
17319         (VFML, VFMLSEL): New mode attributes.
17320         (V_reg): Define mapping for V2HF.
17321         (V_hi, V_lo): New mode attributes.
17322         (VF_constraint): Likewise.
17323         (vfml_half, vfml_half_selector): New int attributes.
17324         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17325         define_expand.
17326         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17327         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17328         New define_insn.
17329         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17330         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17331         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17332         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
17333         documentation.
17334         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17335         Document new effective target and option set.
17337 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17339         * config/arm/arm-cpus.in (armv8_4): New feature.
17340         (ARMv8_4a): New fgroup.
17341         (armv8.4-a): New arch.
17342         * config/arm/arm-tables.opt: Regenerate.
17343         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17344         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17345         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17346         Add matching rules for -march=armv8.4-a and extensions.
17347         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17349 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
17351         PR target/81821
17352         * config/rx/rx.md (BW): New mode attribute.
17353         (sync_lock_test_and_setsi): Add mode suffix to insn output.
17355 2018-01-11  Richard Biener  <rguenther@suse.de>
17357         PR tree-optimization/83435
17358         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17359         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17360         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17362 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17363             Alan Hayward  <alan.hayward@arm.com>
17364             David Sherwood  <david.sherwood@arm.com>
17366         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17367         field.
17368         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
17369         (aarch64_print_address_internal): Use it to check for a zero offset.
17371 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17372             Alan Hayward  <alan.hayward@arm.com>
17373             David Sherwood  <david.sherwood@arm.com>
17375         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17376         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17377         Return a poly_int64 rather than a HOST_WIDE_INT.
17378         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17379         rather than a HOST_WIDE_INT.
17380         * config/aarch64/aarch64.h (aarch64_frame): Protect with
17381         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
17382         hard_fp_offset, frame_size, initial_adjust, callee_offset and
17383         final_offset from HOST_WIDE_INT to poly_int64.
17384         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17385         to_constant when getting the number of units in an Advanced SIMD
17386         mode.
17387         (aarch64_builtin_vectorized_function): Check for a constant number
17388         of units.
17389         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17390         GET_MODE_SIZE.
17391         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17392         attribute instead of GET_MODE_NUNITS.
17393         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17394         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17395         GET_MODE_SIZE for fixed-size registers.
17396         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17397         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17398         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17399         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17400         (aarch64_print_operand, aarch64_print_address_internal)
17401         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17402         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17403         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17404         Handle polynomial GET_MODE_SIZE.
17405         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
17406         wider than SImode without modification.
17407         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17408         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17409         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17410         passing and returning SVE modes.
17411         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17412         rather than GEN_INT.
17413         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17414         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17415         (aarch64_allocate_and_probe_stack_space): Likewise.
17416         (aarch64_layout_frame): Cope with polynomial offsets.
17417         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17418         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
17419         polynomial offsets.
17420         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17421         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17422         poly_int64 rather than a HOST_WIDE_INT.
17423         (aarch64_get_separate_components, aarch64_process_components)
17424         (aarch64_expand_prologue, aarch64_expand_epilogue)
17425         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17426         (aarch64_anchor_offset): New function, split out from...
17427         (aarch64_legitimize_address): ...here.
17428         (aarch64_builtin_vectorization_cost): Handle polynomial
17429         TYPE_VECTOR_SUBPARTS.
17430         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17431         GET_MODE_NUNITS.
17432         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17433         number of elements from the PARALLEL rather than the mode.
17434         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17435         rather than GET_MODE_BITSIZE.
17436         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17437         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17438         (aarch64_expand_vec_perm_const_1): Handle polynomial
17439         d->perm.length () and d->perm elements.
17440         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
17441         Apply to_constant to d->perm elements.
17442         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17443         polynomial CONST_VECTOR_NUNITS.
17444         (aarch64_move_pointer): Take amount as a poly_int64 rather
17445         than an int.
17446         (aarch64_progress_pointer): Avoid temporary variable.
17447         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17448         the mode attribute instead of GET_MODE.
17450 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17451             Alan Hayward  <alan.hayward@arm.com>
17452             David Sherwood  <david.sherwood@arm.com>
17454         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17455         x exists before using it.
17456         (aarch64_add_constant_internal): Rename to...
17457         (aarch64_add_offset_1): ...this.  Replace regnum with separate
17458         src and dest rtxes.  Handle the case in which they're different,
17459         including when the offset is zero.  Replace scratchreg with an rtx.
17460         Use 2 additions if there is no spare register into which we can
17461         move a 16-bit constant.
17462         (aarch64_add_constant): Delete.
17463         (aarch64_add_offset): Replace reg with separate src and dest
17464         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
17465         Use aarch64_add_offset_1.
17466         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17467         an rtx rather than an int.  Take the delta as a poly_int64
17468         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
17469         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17470         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17471         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17472         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17473         and aarch64_add_sp.
17474         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17475         aarch64_add_constant.
17477 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17479         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17480         Use scalar_float_mode.
17482 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17484         * config/aarch64/aarch64-simd.md
17485         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17486         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17487         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17488         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17489         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17490         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17491         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17492         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17493         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17494         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17496 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17498         PR target/83514
17499         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17500         targ_options->x_arm_arch_string is non NULL.
17502 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
17504         * config/aarch64/aarch64.h
17505         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
17507 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
17509         PR target/82096
17510         * expmed.c (emit_store_flag_force): Swap if const op0
17511         and change VOIDmode to mode of op0.
17513 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17515         PR rtl-optimization/83761
17516         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17517         than bytes to mode_for_size.
17519 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17521         PR middle-end/83189
17522         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17523         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17524         profile.
17526 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17528         PR middle-end/83575
17529         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17530         when in layout mode.
17531         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17532         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17533         partition fixup.
17535 2018-01-10  Michael Collison  <michael.collison@arm.com>
17537         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17538         * config/aarch64/aarch64-option-extension.def: Add
17539         AARCH64_OPT_EXTENSION of 'fp16fml'.
17540         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17541         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17542         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17543         * config/aarch64/constraints.md (Ui7): New constraint.
17544         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17545         (VFMLA_SEL_W): Ditto.
17546         (f16quad): Ditto.
17547         (f16mac1): Ditto.
17548         (VFMLA16_LOW): New int iterator.
17549         (VFMLA16_HIGH): Ditto.
17550         (UNSPEC_FMLAL): New unspec.
17551         (UNSPEC_FMLSL): Ditto.
17552         (UNSPEC_FMLAL2): Ditto.
17553         (UNSPEC_FMLSL2): Ditto.
17554         (f16mac): New code attribute.
17555         * config/aarch64/aarch64-simd-builtins.def
17556         (aarch64_fmlal_lowv2sf): Ditto.
17557         (aarch64_fmlsl_lowv2sf): Ditto.
17558         (aarch64_fmlalq_lowv4sf): Ditto.
17559         (aarch64_fmlslq_lowv4sf): Ditto.
17560         (aarch64_fmlal_highv2sf): Ditto.
17561         (aarch64_fmlsl_highv2sf): Ditto.
17562         (aarch64_fmlalq_highv4sf): Ditto.
17563         (aarch64_fmlslq_highv4sf): Ditto.
17564         (aarch64_fmlal_lane_lowv2sf): Ditto.
17565         (aarch64_fmlsl_lane_lowv2sf): Ditto.
17566         (aarch64_fmlal_laneq_lowv2sf): Ditto.
17567         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17568         (aarch64_fmlalq_lane_lowv4sf): Ditto.
17569         (aarch64_fmlsl_lane_lowv4sf): Ditto.
17570         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17571         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17572         (aarch64_fmlal_lane_highv2sf): Ditto.
17573         (aarch64_fmlsl_lane_highv2sf): Ditto.
17574         (aarch64_fmlal_laneq_highv2sf): Ditto.
17575         (aarch64_fmlsl_laneq_highv2sf): Ditto.
17576         (aarch64_fmlalq_lane_highv4sf): Ditto.
17577         (aarch64_fmlsl_lane_highv4sf): Ditto.
17578         (aarch64_fmlalq_laneq_highv4sf): Ditto.
17579         (aarch64_fmlsl_laneq_highv4sf): Ditto.
17580         * config/aarch64/aarch64-simd.md:
17581         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17582         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17583         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17584         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17585         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17586         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17587         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17588         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17589         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17590         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17591         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17592         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17593         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17594         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17595         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17596         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17597         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17598         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17599         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17600         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17601         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17602         (vfmlsl_low_u32): Ditto.
17603         (vfmlalq_low_u32): Ditto.
17604         (vfmlslq_low_u32): Ditto.
17605         (vfmlal_high_u32): Ditto.
17606         (vfmlsl_high_u32): Ditto.
17607         (vfmlalq_high_u32): Ditto.
17608         (vfmlslq_high_u32): Ditto.
17609         (vfmlal_lane_low_u32): Ditto.
17610         (vfmlsl_lane_low_u32): Ditto.
17611         (vfmlal_laneq_low_u32): Ditto.
17612         (vfmlsl_laneq_low_u32): Ditto.
17613         (vfmlalq_lane_low_u32): Ditto.
17614         (vfmlslq_lane_low_u32): Ditto.
17615         (vfmlalq_laneq_low_u32): Ditto.
17616         (vfmlslq_laneq_low_u32): Ditto.
17617         (vfmlal_lane_high_u32): Ditto.
17618         (vfmlsl_lane_high_u32): Ditto.
17619         (vfmlal_laneq_high_u32): Ditto.
17620         (vfmlsl_laneq_high_u32): Ditto.
17621         (vfmlalq_lane_high_u32): Ditto.
17622         (vfmlslq_lane_high_u32): Ditto.
17623         (vfmlalq_laneq_high_u32): Ditto.
17624         (vfmlslq_laneq_high_u32): Ditto.
17625         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17626         (AARCH64_FL_FOR_ARCH8_4): New.
17627         (AARCH64_ISA_F16FML): New ISA flag.
17628         (TARGET_F16FML): New feature flag for fp16fml.
17629         (doc/invoke.texi): Document new fp16fml option.
17631 2018-01-10  Michael Collison  <michael.collison@arm.com>
17633         * config/aarch64/aarch64-builtins.c:
17634         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17635         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17636         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17637         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17638         (AARCH64_ISA_SHA3): New ISA flag.
17639         (TARGET_SHA3): New feature flag for sha3.
17640         * config/aarch64/iterators.md (sha512_op): New int attribute.
17641         (CRYPTO_SHA512): New int iterator.
17642         (UNSPEC_SHA512H): New unspec.
17643         (UNSPEC_SHA512H2): Ditto.
17644         (UNSPEC_SHA512SU0): Ditto.
17645         (UNSPEC_SHA512SU1): Ditto.
17646         * config/aarch64/aarch64-simd-builtins.def
17647         (aarch64_crypto_sha512hqv2di): New builtin.
17648         (aarch64_crypto_sha512h2qv2di): Ditto.
17649         (aarch64_crypto_sha512su0qv2di): Ditto.
17650         (aarch64_crypto_sha512su1qv2di): Ditto.
17651         (aarch64_eor3qv8hi): Ditto.
17652         (aarch64_rax1qv2di): Ditto.
17653         (aarch64_xarqv2di): Ditto.
17654         (aarch64_bcaxqv8hi): Ditto.
17655         * config/aarch64/aarch64-simd.md:
17656         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17657         (aarch64_crypto_sha512su0qv2di): Ditto.
17658         (aarch64_crypto_sha512su1qv2di): Ditto.
17659         (aarch64_eor3qv8hi): Ditto.
17660         (aarch64_rax1qv2di): Ditto.
17661         (aarch64_xarqv2di): Ditto.
17662         (aarch64_bcaxqv8hi): Ditto.
17663         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17664         (vsha512h2q_u64): Ditto.
17665         (vsha512su0q_u64): Ditto.
17666         (vsha512su1q_u64): Ditto.
17667         (veor3q_u16): Ditto.
17668         (vrax1q_u64): Ditto.
17669         (vxarq_u64): Ditto.
17670         (vbcaxq_u16): Ditto.
17671         * config/arm/types.md (crypto_sha512): New type attribute.
17672         (crypto_sha3): Ditto.
17673         (doc/invoke.texi): Document new sha3 option.
17675 2018-01-10  Michael Collison  <michael.collison@arm.com>
17677         * config/aarch64/aarch64-builtins.c:
17678         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17679         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17680         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17681         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17682         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17683         (AARCH64_ISA_SM4): New ISA flag.
17684         (TARGET_SM4): New feature flag for sm4.
17685         * config/aarch64/aarch64-simd-builtins.def
17686         (aarch64_sm3ss1qv4si): Ditto.
17687         (aarch64_sm3tt1aq4si): Ditto.
17688         (aarch64_sm3tt1bq4si): Ditto.
17689         (aarch64_sm3tt2aq4si): Ditto.
17690         (aarch64_sm3tt2bq4si): Ditto.
17691         (aarch64_sm3partw1qv4si): Ditto.
17692         (aarch64_sm3partw2qv4si): Ditto.
17693         (aarch64_sm4eqv4si): Ditto.
17694         (aarch64_sm4ekeyqv4si): Ditto.
17695         * config/aarch64/aarch64-simd.md:
17696         (aarch64_sm3ss1qv4si): Ditto.
17697         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17698         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17699         (aarch64_sm4eqv4si): Ditto.
17700         (aarch64_sm4ekeyqv4si): Ditto.
17701         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17702         (sm3part_op): Ditto.
17703         (CRYPTO_SM3TT): Ditto.
17704         (CRYPTO_SM3PART): Ditto.
17705         (UNSPEC_SM3SS1): New unspec.
17706         (UNSPEC_SM3TT1A): Ditto.
17707         (UNSPEC_SM3TT1B): Ditto.
17708         (UNSPEC_SM3TT2A): Ditto.
17709         (UNSPEC_SM3TT2B): Ditto.
17710         (UNSPEC_SM3PARTW1): Ditto.
17711         (UNSPEC_SM3PARTW2): Ditto.
17712         (UNSPEC_SM4E): Ditto.
17713         (UNSPEC_SM4EKEY): Ditto.
17714         * config/aarch64/constraints.md (Ui2): New constraint.
17715         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17716         * config/arm/types.md (crypto_sm3): New type attribute.
17717         (crypto_sm4): Ditto.
17718         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17719         (vsm3tt1aq_u32): Ditto.
17720         (vsm3tt1bq_u32): Ditto.
17721         (vsm3tt2aq_u32): Ditto.
17722         (vsm3tt2bq_u32): Ditto.
17723         (vsm3partw1q_u32): Ditto.
17724         (vsm3partw2q_u32): Ditto.
17725         (vsm4eq_u32): Ditto.
17726         (vsm4ekeyq_u32): Ditto.
17727         (doc/invoke.texi): Document new sm4 option.
17729 2018-01-10  Michael Collison  <michael.collison@arm.com>
17731         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17732         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17733         (AARCH64_FL_FOR_ARCH8_4): New.
17734         (AARCH64_FL_V8_4): New flag.
17735         (doc/invoke.texi): Document new armv8.4-a option.
17737 2018-01-10  Michael Collison  <michael.collison@arm.com>
17739         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17740         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17741         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17742         * config/aarch64/aarch64-option-extension.def: Add
17743         AARCH64_OPT_EXTENSION of 'sha2'.
17744         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17745         (crypto): Disable sha2 and aes if crypto disabled.
17746         (crypto): Enable aes and sha2 if enabled.
17747         (simd): Disable sha2 and aes if simd disabled.
17748         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17749         New flags.
17750         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17751         (TARGET_SHA2): New feature flag for sha2.
17752         (TARGET_AES): New feature flag for aes.
17753         * config/aarch64/aarch64-simd.md:
17754         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17755         conditional on TARGET_AES.
17756         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17757         (aarch64_crypto_sha1hsi): Make pattern conditional
17758         on TARGET_SHA2.
17759         (aarch64_crypto_sha1hv4si): Ditto.
17760         (aarch64_be_crypto_sha1hv4si): Ditto.
17761         (aarch64_crypto_sha1su1v4si): Ditto.
17762         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17763         (aarch64_crypto_sha1su0v4si): Ditto.
17764         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17765         (aarch64_crypto_sha256su0v4si): Ditto.
17766         (aarch64_crypto_sha256su1v4si): Ditto.
17767         (doc/invoke.texi): Document new aes and sha2 options.
17769 2018-01-10  Martin Sebor  <msebor@redhat.com>
17771         PR tree-optimization/83781
17772         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17773         as string arrays.
17775 2018-01-11  Martin Sebor  <msebor@gmail.com>
17776             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17778         PR tree-optimization/83501
17779         PR tree-optimization/81703
17781         * tree-ssa-strlen.c (get_string_cst): Rename...
17782         (get_string_len): ...to this.  Handle global constants.
17783         (handle_char_store): Adjust.
17785 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
17786             Jim Wilson  <jimw@sifive.com>
17788         * config/riscv/riscv-protos.h (riscv_output_return): New.
17789         * config/riscv/riscv.c (struct machine_function): New naked_p field.
17790         (riscv_attribute_table, riscv_output_return),
17791         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17792         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17793         (riscv_compute_frame_info): Only compute frame->mask if not a naked
17794         function.
17795         (riscv_expand_prologue): Add early return for naked function.
17796         (riscv_expand_epilogue): Likewise.
17797         (riscv_function_ok_for_sibcall): Return false for naked function.
17798         (riscv_set_current_function): New.
17799         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17800         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17801         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17802         * doc/extend.texi (RISC-V Function Attributes): New.
17804 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17806         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17807         check for 128-bit long double before checking TCmode.
17808         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17809         128-bit long doubles before checking TFmode or TCmode.
17810         (FLOAT128_IBM_P): Likewise.
17812 2018-01-10  Martin Sebor  <msebor@redhat.com>
17814         PR tree-optimization/83671
17815         * builtins.c (c_strlen): Unconditionally return zero for the empty
17816         string.
17817         Use -Warray-bounds for warnings.
17818         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17819         for non-constant array indices with COMPONENT_REF, arrays of
17820         arrays, and pointers to arrays.
17821         (gimple_fold_builtin_strlen): Determine and set length range for
17822         non-constant character arrays.
17824 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
17826         PR middle-end/81897
17827         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17828         empty blocks.
17830 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
17832         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17834 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17836         PR target/83399
17837         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17838         VECTOR_MEM_ALTIVEC_OR_VSX_P.
17839         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17840         indexed_or_indirect_operand predicate.
17841         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17842         (*vsx_le_perm_load_v8hi): Likewise.
17843         (*vsx_le_perm_load_v16qi): Likewise.
17844         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17845         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17846         (*vsx_le_perm_store_v8hi): Likewise.
17847         (*vsx_le_perm_store_v16qi): Likewise.
17848         (eight unnamed splitters): Likewise.
17850 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17852         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17853         * config/rs6000/emmintrin.h: Likewise.
17854         * config/rs6000/mmintrin.h: Likewise.
17855         * config/rs6000/xmmintrin.h: Likewise.
17857 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
17859         PR c++/43486
17860         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17861         "public_flag".
17862         * tree.c (tree_nop_conversion): Return true for location wrapper
17863         nodes.
17864         (maybe_wrap_with_location): New function.
17865         (selftest::check_strip_nops): New function.
17866         (selftest::test_location_wrappers): New function.
17867         (selftest::tree_c_tests): Call it.
17868         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17869         (maybe_wrap_with_location): New decl.
17870         (EXPR_LOCATION_WRAPPER_P): New macro.
17871         (location_wrapper_p): New inline function.
17872         (tree_strip_any_location_wrapper): New inline function.
17874 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
17876         PR target/83735
17877         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17878         stack_realign_offset for the largest alignment of stack slot
17879         actually used.
17880         (ix86_find_max_used_stack_alignment): New function.
17881         (ix86_finalize_stack_frame_flags): Use it.  Set
17882         max_used_stack_alignment if we don't realign stack.
17883         * config/i386/i386.h (machine_function): Add
17884         max_used_stack_alignment.
17886 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
17888         * config/arm/arm.opt (-mbranch-cost): New option.
17889         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17890         account.
17892 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
17894         PR target/83629
17895         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17896         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17898 2018-01-10  Richard Biener  <rguenther@suse.de>
17900         PR debug/83765
17901         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17902         early out so it also covers the case where we have a non-NULL
17903         origin.
17905 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17907         PR tree-optimization/83753
17908         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17909         for non-strided grouped accesses if the number of elements is 1.
17911 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17913         PR target/81616
17914         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17915         * i386.h (TARGET_USE_GATHER): Define.
17916         * x86-tune.def (X86_TUNE_USE_GATHER): New.
17918 2018-01-10  Martin Liska  <mliska@suse.cz>
17920         PR bootstrap/82831
17921         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17922         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17923         partitioning.
17924         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17925         CLEANUP_NO_PARTITIONING is not set.
17927 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17929         * doc/rtl.texi: Remove documentation of (const ...) wrappers
17930         for vectors, as a partial revert of r254296.
17931         * rtl.h (const_vec_p): Delete.
17932         (const_vec_duplicate_p): Don't test for vector CONSTs.
17933         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17934         * expmed.c (make_tree): Likewise.
17936         Revert:
17937         * common.md (E, F): Use CONSTANT_P instead of checking for
17938         CONST_VECTOR.
17939         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17940         checking for CONST_VECTOR.
17942 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17944         PR middle-end/83575
17945         * predict.c (force_edge_cold): Handle in more sane way edges
17946         with no prediction.
17948 2018-01-09  Carl Love  <cel@us.ibm.com>
17950         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17951         V4SI, V4SF types.
17952         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17953         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17954         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17955         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
17956         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17957         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
17958         * config/rs6000/rs6000-protos.h: Add extern defition for
17959         rs6000_generate_float2_double_code.
17960         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17961         function.
17962         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17963         (float2_v2df): Add define_expand.
17965 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
17967         PR target/83628
17968         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17969         op_mode in the force_to_mode call.
17971 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17973         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17974         instead of checking each element individually.
17975         (aarch64_evpc_uzp): Likewise.
17976         (aarch64_evpc_zip): Likewise.
17977         (aarch64_evpc_ext): Likewise.
17978         (aarch64_evpc_rev): Likewise.
17979         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17980         instead of checking each element individually.  Return true without
17981         generating rtl if
17982         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17983         whether all selected elements come from the same input, instead of
17984         checking each element individually.  Remove calls to gen_rtx_REG,
17985         start_sequence and end_sequence and instead assert that no rtl is
17986         generated.
17988 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17990         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17991         order of HIGH and CONST checks.
17993 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17995         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17996         if the destination isn't an SSA_NAME.
17998 2018-01-09  Richard Biener  <rguenther@suse.de>
18000         PR tree-optimization/83668
18001         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18002         move prologue...
18003         (canonicalize_loop_form): ... here, renamed from ...
18004         (canonicalize_loop_closed_ssa_form): ... this and amended to
18005         swap successor edges for loop exit blocks to make us use
18006         the RPO order we need for initial schedule generation.
18008 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
18010         PR tree-optimization/64811
18011         * match.pd: When optimizing comparisons with Inf, avoid
18012         introducing or losing exceptions from comparisons with NaN.
18014 2018-01-09  Martin Liska  <mliska@suse.cz>
18016         PR sanitizer/82517
18017         * asan.c (shadow_mem_size): Add gcc_assert.
18019 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
18021         Don't save registers in main().
18023         PR target/83738
18024         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18025         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18026         * config/avr/avr.c (avr_set_current_function): Don't error if
18027         naked, OS_task or OS_main are specified at the same time.
18028         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18029         OS_main.
18030         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18031         attribute.
18032         * common/config/avr/avr-common.c (avr_option_optimization_table):
18033         Switch on -mmain-is-OS_task for optimizing compilations.
18035 2018-01-09  Richard Biener  <rguenther@suse.de>
18037         PR tree-optimization/83572
18038         * graphite.c: Include cfganal.h.
18039         (graphite_transform_loops): Connect infinite loops to exit
18040         and remove fake edges at the end.
18042 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18044         * ipa-inline.c (edge_badness): Revert accidental checkin.
18046 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18048         PR ipa/80763
18049         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18050         symbols; not inline clones.
18052 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
18054         PR target/83507
18055         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18056         hard registers.  Formatting fixes.
18058         PR preprocessor/83722
18059         * gcc.c (try_generate_repro): Pass
18060         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18061         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18062         do_report_bug.
18064 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
18065             Kito Cheng  <kito.cheng@gmail.com>
18067         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18068         (riscv_leaf_function_p): Delete.
18069         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18071 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18073         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18074         function.
18075         (do_ifelse): New function.
18076         (do_isel): New function.
18077         (do_sub3): New function.
18078         (do_add3): New function.
18079         (do_load_mask_compare): New function.
18080         (do_overlap_load_compare): New function.
18081         (expand_compare_loop): New function.
18082         (expand_block_compare): Call expand_compare_loop() when appropriate.
18083         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18084         option description.
18085         (-mblock-compare-inline-loop-limit): New option.
18087 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18089         PR target/83677
18090         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18091         Reverse order of second and third operands in first alternative.
18092         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18093         of first and second elements in UNSPEC_VPERMR vector.
18094         (altivec_expand_vec_perm_le): Likewise.
18096 2018-01-08  Jeff Law  <law@redhat.com>
18098         PR rtl-optimizatin/81308
18099         * tree-switch-conversion.c (cfg_altered): New file scoped static.
18100         (process_switch): If group_case_labels makes a change, then set
18101         cfg_altered.
18102         (pass_convert_switch::execute): If a switch is converted, then
18103         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
18105         PR rtl-optimization/81308
18106         * recog.c (split_all_insns): Conditionally cleanup the CFG after
18107         splitting insns.
18109 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
18111         PR target/83663 - Revert r255946
18112         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18113         generation for cases where splatting a value is not useful.
18114         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18115         across a vec_duplicate and a paradoxical subreg forming a vector
18116         mode to a vec_concat.
18118 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18120         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18121         -march=armv8.3-a variants.
18122         * config/arm/t-multilib: Likewise.
18123         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
18125 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18127         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18128         to generate rtl.
18129         (cceq_ior_compare_complement): Give it a name so I can use it, and
18130         change boolean_or_operator predicate to boolean_operator so it can
18131         be used to generate a crand.
18132         (eqne): New code iterator.
18133         (bd/bd_neg): New code_attrs.
18134         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18135         a single define_insn.
18136         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18137         decrement (bdnzt/bdnzf/bdzt/bdzf).
18138         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18139         with the new names of the branch decrement patterns, and added the
18140         names of the branch decrement conditional patterns.
18142 2018-01-08  Richard Biener  <rguenther@suse.de>
18144         PR tree-optimization/83563
18145         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18146         cache.
18148 2018-01-08  Richard Biener  <rguenther@suse.de>
18150         PR middle-end/83713
18151         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18153 2018-01-08  Richard Biener  <rguenther@suse.de>
18155         PR tree-optimization/83685
18156         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18157         references to abnormals.
18159 2018-01-08  Richard Biener  <rguenther@suse.de>
18161         PR lto/83719
18162         * dwarf2out.c (output_indirect_strings): Handle empty
18163         skeleton_debug_str_hash.
18164         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18166 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18168         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18169         (emit_store_direct): Likewise.
18170         (arc_trampoline_adjust_address): Likewise.
18171         (arc_asm_trampoline_template): New function.
18172         (arc_initialize_trampoline): Use asm_trampoline_template.
18173         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18174         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18175         * config/arc/arc.md (flush_icache): Delete pattern.
18177 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18179         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18180         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18181         munaligned-access.
18183 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18185         PR target/83681
18186         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18187         by not USED_FOR_TARGET.
18188         (make_pass_resolve_sw_modes): Likewise.
18190 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18192         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18193         USED_FOR_TARGET.
18195 2018-01-08  Richard Biener  <rguenther@suse.de>
18197         PR middle-end/83580
18198         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18200 2018-01-08  Richard Biener  <rguenther@suse.de>
18202         PR middle-end/83517
18203         * match.pd ((t * 2) / 2) -> t): Add missing :c.
18205 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
18207         PR middle-end/81897
18208         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18209         basic blocks with a small number of successors.
18210         (convert_control_dep_chain_into_preds): Improve handling of
18211         forwarder blocks.
18212         (dump_predicates): Split apart into...
18213         (dump_pred_chain): ...here...
18214         (dump_pred_info): ...and here.
18215         (can_one_predicate_be_invalidated_p): Add debugging printfs.
18216         (can_chain_union_be_invalidated_p): Improve check for invalidation
18217         of paths.
18218         (uninit_uses_cannot_happen): Avoid unnecessary if
18219         convert_control_dep_chain_into_preds yielded nothing.
18221 2018-01-06  Martin Sebor  <msebor@redhat.com>
18223         PR tree-optimization/83640
18224         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18225         subtracting negative offset from size.
18226         (builtin_access::overlap): Adjust offset bounds of the access to fall
18227         within the size of the object if possible.
18229 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
18231         PR rtl-optimization/83699
18232         * expmed.c (extract_bit_field_1): Restrict the vector usage of
18233         extract_bit_field_as_subreg to cases in which the extracted
18234         value is also a vector.
18236         * lra-constraints.c (process_alt_operands): Test for the equivalence
18237         substitutions when detecting a possible reload cycle.
18239 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
18241         PR debug/83480
18242         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18243         by default if flag_selective_schedling{,2}.  Formatting fixes.
18245         PR rtl-optimization/83682
18246         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18247         if it has non-VECTOR_MODE element mode.
18248         (vec_duplicate_p): Likewise.
18250         PR middle-end/83694
18251         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18252         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18254 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18256         PR target/83604
18257         * config/i386/i386-builtin.def
18258         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18259         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18260         Require also OPTION_MASK_ISA_AVX512F in addition to
18261         OPTION_MASK_ISA_GFNI.
18262         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18263         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18264         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18265         to OPTION_MASK_ISA_GFNI.
18266         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18267         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18268         OPTION_MASK_ISA_AVX512BW.
18269         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18270         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18271         addition to OPTION_MASK_ISA_GFNI.
18272         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18273         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18274         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18275         to OPTION_MASK_ISA_GFNI.
18276         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18277         a requirement for all ISAs rather than any of them with a few
18278         exceptions.
18279         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18280         processing.
18281         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18282         bitmasks to be enabled with 3 exceptions, instead of requiring any
18283         enabled ISA with lots of exceptions.
18284         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18285         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18286         Change avx512bw in isa attribute to avx512f.
18287         * config/i386/sgxintrin.h: Add license boilerplate.
18288         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
18289         to __AVX512F__ and __AVX512VL to __AVX512VL__.
18290         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18291         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18292         defined.
18293         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18294         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18295         temporarily sse2 rather than sse if not enabled already.
18297         PR target/83604
18298         * config/i386/sse.md (VI248_VLBW): Rename to ...
18299         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
18300         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18301         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18302         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18303         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18304         mode iterator instead of VI248_VLBW.
18306 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
18308         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18309         (record_modified): Skip clobbers; add debug output.
18310         (param_change_prob): Use sreal frequencies.
18312 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18314         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18315         punt for user-aligned variables.
18317 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18319         * tree-chrec.c (chrec_contains_symbols): Return true for
18320         POLY_INT_CST.
18322 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
18324         PR target/82439
18325         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18326         of (x|y) == x for BICS pattern.
18328 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18330         PR tree-optimization/83605
18331         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18332         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18333         can throw.
18335 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18337         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18338         * config/epiphany/rtems.h: New file.
18340 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18341             Uros Bizjak  <ubizjak@gmail.com>
18343         PR target/83554
18344         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18345         QIreg_operand instead of register_operand predicate.
18346         * config/i386/i386.c (ix86_rop_should_change_byte_p,
18347         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18348         comments instead of -fmitigate[-_]rop.
18350 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18352         PR bootstrap/81926
18353         * cgraphunit.c (symbol_table::compile): Switch to text_section
18354         before calling assembly_start debug hook.
18355         * run-rtl-passes.c (run_rtl_passes): Likewise.
18356         Include output.h.
18358 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18360         * tree-vrp.c (extract_range_from_binary_expr_1): Check
18361         range_int_cst_p rather than !symbolic_range_p before calling
18362         extract_range_from_multiplicative_op_1.
18364 2018-01-04  Jeff Law  <law@redhat.com>
18366         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18367         redundant test in assertion.
18369 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18371         * doc/rtl.texi: Document machine_mode wrapper classes.
18373 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18375         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18376         using tree_to_uhwi.
18378 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18380         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18381         the VEC_PERM_EXPR fold to fail.
18383 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18385         PR debug/83585
18386         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18387         to switched_sections.
18389 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18391         PR target/83680
18392         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18393         test for d.testing.
18395 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
18397         PR target/83387
18398         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18399         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18401 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18403         PR debug/83666
18404         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18405         is BLKmode and bitpos not zero or mode change is needed.
18407 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18409         PR target/83675
18410         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18411         TARGET_VIS2.
18413 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
18415         PR target/83628
18416         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18417         instead of MULT rtx.  Update all corresponding splitters.
18418         (*saddl_se): Ditto.
18419         (*ssub<modesuffix>): Ditto.
18420         (*ssubl_se): Ditto.
18421         (*cmp_sadd_di): Update split patterns.
18422         (*cmp_sadd_si): Ditto.
18423         (*cmp_sadd_sidi): Ditto.
18424         (*cmp_ssub_di): Ditto.
18425         (*cmp_ssub_si): Ditto.
18426         (*cmp_ssub_sidi): Ditto.
18427         * config/alpha/predicates.md (const23_operand): New predicate.
18428         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18429         Look for ASHIFT, not MULT inner operand.
18430         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18432 2018-01-04  Martin Liska  <mliska@suse.cz>
18434         PR gcov-profile/83669
18435         * gcov.c (output_intermediate_file): Add version to intermediate
18436         gcov file.
18437         * doc/gcov.texi: Document new field 'version' in intermediate
18438         file format. Fix location of '-k' option of gcov command.
18440 2018-01-04  Martin Liska  <mliska@suse.cz>
18442         PR ipa/82352
18443         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18445 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18447         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18449 2018-01-03  Martin Sebor  <msebor@redhat.com>
18451         PR tree-optimization/83655
18452         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18453         checking calls with invalid arguments.
18455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18457         * tree-vect-stmts.c (vect_get_store_rhs): New function.
18458         (vectorizable_mask_load_store): Delete.
18459         (vectorizable_call): Return false for masked loads and stores.
18460         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
18461         instead of gimple_assign_rhs1.
18462         (vectorizable_load): Handle IFN_MASK_LOAD.
18463         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18465 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18467         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18468         split out from..,
18469         (vectorizable_mask_load_store): ...here.
18470         (vectorizable_load): ...and here.
18472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18474         * tree-vect-stmts.c (vect_build_all_ones_mask)
18475         (vect_build_zero_merge_argument): New functions, split out from...
18476         (vectorizable_load): ...here.
18478 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18480         * tree-vect-stmts.c (vect_check_store_rhs): New function,
18481         split out from...
18482         (vectorizable_mask_load_store): ...here.
18483         (vectorizable_store): ...and here.
18485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18487         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18488         split out from...
18489         (vectorizable_mask_load_store): ...here.
18491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18493         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18494         (vect_model_store_cost): Take a vec_load_store_type instead of a
18495         vect_def_type.
18496         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18497         (vect_model_store_cost): Take a vec_load_store_type instead of a
18498         vect_def_type.
18499         (vectorizable_mask_load_store): Update accordingly.
18500         (vectorizable_store): Likewise.
18501         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18503 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18505         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18506         IFN_MASK_LOAD calls here rather than...
18507         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18509 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18510             Alan Hayward  <alan.hayward@arm.com>
18511             David Sherwood  <david.sherwood@arm.com>
18513         * expmed.c (extract_bit_field_1): For vector extracts,
18514         fall back to extract_bit_field_as_subreg if vec_extract
18515         isn't available.
18517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18518             Alan Hayward  <alan.hayward@arm.com>
18519             David Sherwood  <david.sherwood@arm.com>
18521         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18522         they are variable or constant sized.
18523         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18524         slots for constant-sized data.
18526 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18527             Alan Hayward  <alan.hayward@arm.com>
18528             David Sherwood  <david.sherwood@arm.com>
18530         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18531         handling COND_EXPRs with boolean comparisons, try to find a better
18532         basis for the mask type than the boolean itself.
18534 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18536         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18537         is calculated and how it can be overridden.
18538         * genmodes.c (max_bitsize_mode_any_mode): New variable.
18539         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18540         if defined.
18541         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18542         if nonzero.
18544 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18545             Alan Hayward  <alan.hayward@arm.com>
18546             David Sherwood  <david.sherwood@arm.com>
18548         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18549         Remove the mode argument.
18550         (aarch64_simd_valid_immediate): Remove the mode and inverse
18551         arguments.
18552         * config/aarch64/iterators.md (bitsize): New iterator.
18553         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18554         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18555         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18556         aarch64_simd_valid_immediate.
18557         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18558         (aarch64_reg_or_bic_imm): Likewise.
18559         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18560         with an insn_type enum and msl with a modifier_type enum.
18561         Replace element_width with a scalar_mode.  Change the shift
18562         to unsigned int.  Add constructors for scalar_float_mode and
18563         scalar_int_mode elements.
18564         (aarch64_vect_float_const_representable_p): Delete.
18565         (aarch64_can_const_movi_rtx_p)
18566         (aarch64_simd_scalar_immediate_valid_for_move)
18567         (aarch64_simd_make_constant): Update call to
18568         aarch64_simd_valid_immediate.
18569         (aarch64_advsimd_valid_immediate_hs): New function.
18570         (aarch64_advsimd_valid_immediate): Likewise.
18571         (aarch64_simd_valid_immediate): Remove mode and inverse
18572         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
18573         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18574         and aarch64_float_const_representable_p on the result.
18575         (aarch64_output_simd_mov_immediate): Remove mode argument.
18576         Update call to aarch64_simd_valid_immediate and use of
18577         simd_immediate_info.
18578         (aarch64_output_scalar_simd_mov_immediate): Update call
18579         accordingly.
18581 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18582             Alan Hayward  <alan.hayward@arm.com>
18583             David Sherwood  <david.sherwood@arm.com>
18585         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18586         (mode_nunits): Likewise CONST_MODE_NUNITS.
18587         * machmode.def (ADJUST_NUNITS): Document.
18588         * genmodes.c (mode_data::need_nunits_adj): New field.
18589         (blank_mode): Update accordingly.
18590         (adj_nunits): New variable.
18591         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18592         parameter.
18593         (emit_mode_size_inline): Set need_bytesize_adj for all modes
18594         listed in adj_nunits.
18595         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18596         listed in adj_nunits.  Don't emit case statements for such modes.
18597         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18598         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
18599         nothing if adj_nunits is nonnull.
18600         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18601         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18602         (emit_mode_fbit): Update use of print_maybe_const_decl.
18603         (emit_move_size): Likewise.  Treat the array as non-const
18604         if adj_nunits.
18605         (emit_mode_adjustments): Handle adj_nunits.
18607 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18609         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18610         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18611         (VECTOR_MODES): Use it.
18612         (make_vector_modes): Take the prefix as an argument.
18614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18615             Alan Hayward  <alan.hayward@arm.com>
18616             David Sherwood  <david.sherwood@arm.com>
18618         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18619         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18620         for MODE_VECTOR_BOOL.
18621         * machmode.def (VECTOR_BOOL_MODE): Document.
18622         * genmodes.c (VECTOR_BOOL_MODE): New macro.
18623         (make_vector_bool_mode): New function.
18624         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18625         MODE_VECTOR_BOOL.
18626         * lto-streamer-in.c (lto_input_mode_table): Likewise.
18627         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18628         Likewise.
18629         * stor-layout.c (int_mode_for_mode): Likewise.
18630         * tree.c (build_vector_type_for_mode): Likewise.
18631         * varasm.c (output_constant_pool_2): Likewise.
18632         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18633         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
18634         for MODE_VECTOR_BOOL.
18635         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18636         of mode class checks.
18637         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18638         instead of a list of mode class checks.
18639         (expand_vector_scalar_condition): Likewise.
18640         (type_for_widest_vector_mode): Handle BImode as an inner mode.
18642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18643             Alan Hayward  <alan.hayward@arm.com>
18644             David Sherwood  <david.sherwood@arm.com>
18646         * machmode.h (mode_size): Change from unsigned short to
18647         poly_uint16_pod.
18648         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18649         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18650         or if measurement_type is not polynomial.
18651         (fixed_size_mode::includes_p): Check for constant-sized modes.
18652         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18653         return a poly_uint16 rather than an unsigned short.
18654         (emit_mode_size): Change the type of mode_size from unsigned short
18655         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
18656         (emit_mode_adjustments): Cope with polynomial vector sizes.
18657         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18658         for GET_MODE_SIZE.
18659         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18660         for GET_MODE_SIZE.
18661         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18662         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18663         * caller-save.c (setup_save_areas): Likewise.
18664         (replace_reg_with_saved_mem): Likewise.
18665         * calls.c (emit_library_call_value_1): Likewise.
18666         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18667         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18668         (gen_lowpart_for_combine): Likewise.
18669         * convert.c (convert_to_integer_1): Likewise.
18670         * cse.c (equiv_constant, cse_insn): Likewise.
18671         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18672         (cselib_subst_to_values): Likewise.
18673         * dce.c (word_dce_process_block): Likewise.
18674         * df-problems.c (df_word_lr_mark_ref): Likewise.
18675         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18676         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18677         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18678         (rtl_for_decl_location): Likewise.
18679         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18680         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18681         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18682         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18683         (expand_expr_real_1): Likewise.
18684         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18685         (pad_below): Likewise.
18686         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18687         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18688         * ira.c (get_subreg_tracking_sizes): Likewise.
18689         * ira-build.c (ira_create_allocno_objects): Likewise.
18690         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18691         (ira_sort_regnos_for_alter_reg): Likewise.
18692         * ira-costs.c (record_operand_costs): Likewise.
18693         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18694         (resolve_simple_move): Likewise.
18695         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18696         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18697         (lra_constraints): Likewise.
18698         (CONST_POOL_OK_P): Reject variable-sized modes.
18699         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18700         (add_pseudo_to_slot, lra_spill): Likewise.
18701         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18702         * optabs-query.c (get_best_extraction_insn): Likewise.
18703         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18704         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18705         (expand_mult_highpart, valid_multiword_target_p): Likewise.
18706         * recog.c (offsettable_address_addr_space_p): Likewise.
18707         * regcprop.c (maybe_mode_change): Likewise.
18708         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18709         * regrename.c (build_def_use): Likewise.
18710         * regstat.c (dump_reg_info): Likewise.
18711         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18712         (find_reloads, find_reloads_subreg_address): Likewise.
18713         * reload1.c (eliminate_regs_1): Likewise.
18714         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18715         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18716         (simplify_binary_operation_1, simplify_subreg): Likewise.
18717         * targhooks.c (default_function_arg_padding): Likewise.
18718         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18719         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18720         (verify_gimple_assign_ternary): Likewise.
18721         * tree-inline.c (estimate_move_cost): Likewise.
18722         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18723         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18724         (get_address_cost_ainc): Likewise.
18725         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18726         (vect_supportable_dr_alignment): Likewise.
18727         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18728         (vectorizable_reduction): Likewise.
18729         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18730         (vectorizable_operation, vectorizable_load): Likewise.
18731         * tree.c (build_same_sized_truth_vector_type): Likewise.
18732         * valtrack.c (cleanup_auto_inc_dec): Likewise.
18733         * var-tracking.c (emit_note_insn_var_location): Likewise.
18734         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18735         (ADDR_VEC_ALIGN): Likewise.
18737 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18738             Alan Hayward  <alan.hayward@arm.com>
18739             David Sherwood  <david.sherwood@arm.com>
18741         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18742         unsigned short.
18743         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18744         or if measurement_type is polynomial.
18745         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18746         * combine.c (make_extraction): Likewise.
18747         * dse.c (find_shift_sequence): Likewise.
18748         * dwarf2out.c (mem_loc_descriptor): Likewise.
18749         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18750         (extract_bit_field, extract_low_bits): Likewise.
18751         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18752         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18753         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18754         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18755         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18756         * reload.c (find_reloads): Likewise.
18757         * reload1.c (alter_reg): Likewise.
18758         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18759         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18760         * tree-if-conv.c (predicate_mem_writes): Likewise.
18761         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18762         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18763         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18764         * valtrack.c (dead_debug_insert_temp): Likewise.
18765         * varasm.c (mergeable_constant_section): Likewise.
18766         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18769             Alan Hayward  <alan.hayward@arm.com>
18770             David Sherwood  <david.sherwood@arm.com>
18772         * expr.c (expand_assignment): Cope with polynomial mode sizes
18773         when assigning to a CONCAT.
18775 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18776             Alan Hayward  <alan.hayward@arm.com>
18777             David Sherwood  <david.sherwood@arm.com>
18779         * machmode.h (mode_precision): Change from unsigned short to
18780         poly_uint16_pod.
18781         (mode_to_precision): Return a poly_uint16 rather than an unsigned
18782         short.
18783         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18784         or if measurement_type is not polynomial.
18785         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
18786         in which the mode is already known to be a scalar_int_mode.
18787         * genmodes.c (emit_mode_precision): Change the type of mode_precision
18788         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
18789         initializer.
18790         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18791         for GET_MODE_PRECISION.
18792         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18793         for GET_MODE_PRECISION.
18794         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18795         as polynomial.
18796         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18797         (expand_field_assignment, make_extraction): Likewise.
18798         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18799         (get_last_value): Likewise.
18800         * convert.c (convert_to_integer_1): Likewise.
18801         * cse.c (cse_insn): Likewise.
18802         * expr.c (expand_expr_real_1): Likewise.
18803         * lra-constraints.c (simplify_operand_subreg): Likewise.
18804         * optabs-query.c (can_atomic_load_p): Likewise.
18805         * optabs.c (expand_atomic_load): Likewise.
18806         (expand_atomic_store): Likewise.
18807         * ree.c (combine_reaching_defs): Likewise.
18808         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18809         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18810         * tree.h (type_has_mode_precision_p): Likewise.
18811         * ubsan.c (instrument_si_overflow): Likewise.
18813 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18814             Alan Hayward  <alan.hayward@arm.com>
18815             David Sherwood  <david.sherwood@arm.com>
18817         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18818         polynomial numbers of units.
18819         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18820         (valid_vector_subparts_p): New function.
18821         (build_vector_type): Remove temporary shim and take the number
18822         of units as a poly_uint64 rather than an int.
18823         (build_opaque_vector_type): Take the number of units as a
18824         poly_uint64 rather than an int.
18825         * tree.c (build_vector_from_ctor): Handle polynomial
18826         TYPE_VECTOR_SUBPARTS.
18827         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18828         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18829         (build_vector_from_val): If the number of units is variable,
18830         use build_vec_duplicate_cst for constant operands and
18831         VEC_DUPLICATE_EXPR otherwise.
18832         (make_vector_type): Remove temporary is_constant ().
18833         (build_vector_type, build_opaque_vector_type): Take the number of
18834         units as a poly_uint64 rather than an int.
18835         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18836         VECTOR_CST_NELTS.
18837         * cfgexpand.c (expand_debug_expr): Likewise.
18838         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18839         (store_constructor, expand_expr_real_1): Likewise.
18840         (const_scalar_mask_from_tree): Likewise.
18841         * fold-const-call.c (fold_const_reduction): Likewise.
18842         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18843         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18844         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18845         (fold_relational_const): Likewise.
18846         (native_interpret_vector): Likewise.  Change the size from an
18847         int to an unsigned int.
18848         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18849         TYPE_VECTOR_SUBPARTS.
18850         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18851         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18852         duplicating a non-constant operand into a variable-length vector.
18853         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18854         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18855         * ipa-icf.c (sem_variable::equals): Likewise.
18856         * match.pd: Likewise.
18857         * omp-simd-clone.c (simd_clone_subparts): Likewise.
18858         * print-tree.c (print_node): Likewise.
18859         * stor-layout.c (layout_type): Likewise.
18860         * targhooks.c (default_builtin_vectorization_cost): Likewise.
18861         * tree-cfg.c (verify_gimple_comparison): Likewise.
18862         (verify_gimple_assign_binary): Likewise.
18863         (verify_gimple_assign_ternary): Likewise.
18864         (verify_gimple_assign_single): Likewise.
18865         * tree-pretty-print.c (dump_generic_node): Likewise.
18866         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18867         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18868         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18869         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18870         (vect_shift_permute_load_chain): Likewise.
18871         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18872         (expand_vector_condition, optimize_vector_constructor): Likewise.
18873         (lower_vec_perm, get_compute_type): Likewise.
18874         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18875         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18876         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18877         (vect_recog_mask_conversion_pattern): Likewise.
18878         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18879         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18880         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18881         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18882         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18883         (vectorizable_shift, vectorizable_operation, vectorizable_store)
18884         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18885         (supportable_widening_operation): Likewise.
18886         (supportable_narrowing_operation): Likewise.
18887         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18888         Likewise.
18889         * varasm.c (output_constant): Likewise.
18891 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18892             Alan Hayward  <alan.hayward@arm.com>
18893             David Sherwood  <david.sherwood@arm.com>
18895         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18896         so that both the length == 3 and length != 3 cases set up their
18897         own permute vectors.  Add comments explaining why we know the
18898         number of elements is constant.
18899         (vect_permute_load_chain): Likewise.
18901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18902             Alan Hayward  <alan.hayward@arm.com>
18903             David Sherwood  <david.sherwood@arm.com>
18905         * machmode.h (mode_nunits): Change from unsigned char to
18906         poly_uint16_pod.
18907         (ONLY_FIXED_SIZE_MODES): New macro.
18908         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18909         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18910         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18911         New typedefs.
18912         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18913         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18914         or if measurement_type is not polynomial.
18915         * genmodes.c (ZERO_COEFFS): New macro.
18916         (emit_mode_nunits_inline): Make mode_nunits_inline return a
18917         poly_uint16.
18918         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18919         Use ZERO_COEFFS when emitting initializers.
18920         * data-streamer.h (bp_pack_poly_value): New function.
18921         (bp_unpack_poly_value): Likewise.
18922         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18923         for GET_MODE_NUNITS.
18924         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18925         for GET_MODE_NUNITS.
18926         * tree.c (make_vector_type): Remove temporary shim and make
18927         the real function take the number of units as a poly_uint64
18928         rather than an int.
18929         (build_vector_type_for_mode): Handle polynomial nunits.
18930         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18931         * emit-rtl.c (const_vec_series_p_1): Likewise.
18932         (gen_rtx_CONST_VECTOR): Likewise.
18933         * fold-const.c (test_vec_duplicate_folding): Likewise.
18934         * genrecog.c (validate_pattern): Likewise.
18935         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18936         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18937         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18938         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18939         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18940         * rtlanal.c (subreg_get_info): Likewise.
18941         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18942         (vect_grouped_load_supported): Likewise.
18943         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18944         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18945         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18946         (simplify_const_unary_operation, simplify_binary_operation_1)
18947         (simplify_const_binary_operation, simplify_ternary_operation)
18948         (test_vector_ops_duplicate, test_vector_ops): Likewise.
18949         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18950         instead of CONST_VECTOR_NUNITS.
18951         * varasm.c (output_constant_pool_2): Likewise.
18952         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18953         explicit-encoded elements in the XVEC for variable-length vectors.
18955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18957         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18960             Alan Hayward  <alan.hayward@arm.com>
18961             David Sherwood  <david.sherwood@arm.com>
18963         * coretypes.h (fixed_size_mode): Declare.
18964         (fixed_size_mode_pod): New typedef.
18965         * builtins.h (target_builtins::x_apply_args_mode)
18966         (target_builtins::x_apply_result_mode): Change type to
18967         fixed_size_mode_pod.
18968         * builtins.c (apply_args_size, apply_result_size, result_vector)
18969         (expand_builtin_apply_args_1, expand_builtin_apply)
18970         (expand_builtin_return): Update accordingly.
18972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18974         * cse.c (hash_rtx_cb): Hash only the encoded elements.
18975         * cselib.c (cselib_hash_rtx): Likewise.
18976         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18977         CONST_VECTOR encoding.
18979 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18980             Jeff Law  <law@redhat.com>
18982         PR target/83641
18983         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18984         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18985         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18986         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18988         PR target/83641
18989         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18990         explicitly probe *sp in a noreturn function if there were any callee
18991         register saves or frame pointer is needed.
18993 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18995         PR debug/83621
18996         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18997         BLKmode for ternary, binary or unary expressions.
18999         PR debug/83645
19000         * var-tracking.c (delete_vta_debug_insn): New inline function.
19001         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19002         insns from get_insns () to NULL instead of each bb separately.
19003         Use delete_vta_debug_insn.  No longer static.
19004         (vt_debug_insns_local, variable_tracking_main_1): Adjust
19005         delete_vta_debug_insns callers.
19006         * rtl.h (delete_vta_debug_insns): Declare.
19007         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19008         instead of variable_tracking_main.
19010 2018-01-03  Martin Sebor  <msebor@redhat.com>
19012         PR tree-optimization/83603
19013         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19014         arguments past the endof the argument list in functions declared
19015         without a prototype.
19016         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19017         Avoid checking when arguments are null.
19019 2018-01-03  Martin Sebor  <msebor@redhat.com>
19021         PR c/83559
19022         * doc/extend.texi (attribute const): Fix a typo.
19023         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19024         issuing -Wsuggest-attribute for void functions.
19026 2018-01-03  Martin Sebor  <msebor@redhat.com>
19028         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19029         offset_int::from instead of wide_int::to_shwi.
19030         (maybe_diag_overlap): Remove assertion.
19031         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19032         * gimple-ssa-sprintf.c (format_directive): Same.
19033         (parse_directive): Same.
19034         (sprintf_dom_walker::compute_format_length): Same.
19035         (try_substitute_return_value): Same.
19037 2018-01-03  Jeff Law  <law@redhat.com>
19039         PR middle-end/83654
19040         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19041         non-constant residual for zero at runtime and avoid probing in
19042         that case.  Reorganize code for trailing problem to mirror handling
19043         of the residual.
19045 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19047         PR tree-optimization/83501
19048         * tree-ssa-strlen.c (get_string_cst): New.
19049         (handle_char_store): Call get_string_cst.
19051 2018-01-03  Martin Liska  <mliska@suse.cz>
19053         PR tree-optimization/83593
19054         * tree-ssa-strlen.c: Include tree-cfg.h.
19055         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19056         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19057         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19058         to false.
19059         (strlen_dom_walker::before_dom_children): Call
19060         gimple_purge_dead_eh_edges. Dump tranformation with details
19061         dump flags.
19062         (strlen_dom_walker::before_dom_children): Update call by adding
19063         new argument cleanup_eh.
19064         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19066 2018-01-03  Martin Liska  <mliska@suse.cz>
19068         PR ipa/83549
19069         * cif-code.def (VARIADIC_THUNK): New enum value.
19070         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19071         thunks.
19073 2018-01-03  Jan Beulich  <jbeulich@suse.com>
19075         * sse.md (mov<mode>_internal): Tighten condition for when to use
19076         vmovdqu<ssescalarsize> for TI and OI modes.
19078 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19080         Update copyright years.
19082 2018-01-03  Martin Liska  <mliska@suse.cz>
19084         PR ipa/83594
19085         * ipa-visibility.c (function_and_variable_visibility): Skip
19086         functions with noipa attribure.
19088 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19090         * gcc.c (process_command): Update copyright notice dates.
19091         * gcov-dump.c (print_version): Ditto.
19092         * gcov.c (print_version): Ditto.
19093         * gcov-tool.c (print_version): Ditto.
19094         * gengtype.c (create_file): Ditto.
19095         * doc/cpp.texi: Bump @copying's copyright year.
19096         * doc/cppinternals.texi: Ditto.
19097         * doc/gcc.texi: Ditto.
19098         * doc/gccint.texi: Ditto.
19099         * doc/gcov.texi: Ditto.
19100         * doc/install.texi: Ditto.
19101         * doc/invoke.texi: Ditto.
19103 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19105         * vector-builder.h (vector_builder::m_full_nelts): Change from
19106         unsigned int to poly_uint64.
19107         (vector_builder::full_nelts): Update prototype accordingly.
19108         (vector_builder::new_vector): Likewise.
19109         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19110         (vector_builder::operator ==): Likewise.
19111         (vector_builder::finalize): Likewise.
19112         * int-vector-builder.h (int_vector_builder::int_vector_builder):
19113         Take the number of elements as a poly_uint64 rather than an
19114         unsigned int.
19115         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19116         from unsigned int to poly_uint64.
19117         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19118         (vec_perm_indices::new_vector): Likewise.
19119         (vec_perm_indices::length): Likewise.
19120         (vec_perm_indices::nelts_per_input): Likewise.
19121         (vec_perm_indices::input_nelts): Likewise.
19122         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19123         number of elements per input as a poly_uint64 rather than an
19124         unsigned int.  Use the original encoding for variable-length
19125         vectors, rather than clamping each individual element.
19126         For the second and subsequent elements in each pattern,
19127         clamp the step and base before clamping their sum.
19128         (vec_perm_indices::series_p): Handle polynomial element counts.
19129         (vec_perm_indices::all_in_range_p): Likewise.
19130         (vec_perm_indices_to_tree): Likewise.
19131         (vec_perm_indices_to_rtx): Likewise.
19132         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19133         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19134         (tree_vector_builder::new_binary_operation): Handle polynomial
19135         element counts.  Return false if we need to know the number
19136         of elements at compile time.
19137         * fold-const.c (fold_vec_perm): Punt if the number of elements
19138         isn't known at compile time.
19140 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19142         * vec-perm-indices.h (vec_perm_builder): Change element type
19143         from HOST_WIDE_INT to poly_int64.
19144         (vec_perm_indices::element_type): Update accordingly.
19145         (vec_perm_indices::clamp): Handle polynomial element_types.
19146         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19147         (vec_perm_indices::all_in_range_p): Likewise.
19148         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19149         than shwi trees.
19150         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19151         polynomial vec_perm_indices element types.
19152         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19153         * fold-const.c (fold_vec_perm): Likewise.
19154         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19155         * tree-vect-generic.c (lower_vec_perm): Likewise.
19156         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19157         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19158         element type to HOST_WIDE_INT.
19160 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19161             Alan Hayward  <alan.hayward@arm.com>
19162             David Sherwood  <david.sherwood@arm.com>
19164         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19165         rather than an int.  Use plus_constant.
19166         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19167         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19170             Alan Hayward  <alan.hayward@arm.com>
19171             David Sherwood  <david.sherwood@arm.com>
19173         * calls.c (emit_call_1, expand_call): Change struct_value_size from
19174         a HOST_WIDE_INT to a poly_int64.
19176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19177             Alan Hayward  <alan.hayward@arm.com>
19178             David Sherwood  <david.sherwood@arm.com>
19180         * calls.c (load_register_parameters): Cope with polynomial
19181         mode sizes.  Require a constant size for BLKmode parameters
19182         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
19183         forces a parameter to be padded at the lsb end in order to
19184         fill a complete number of words, require the parameter size
19185         to be ordered wrt UNITS_PER_WORD.
19187 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19188             Alan Hayward  <alan.hayward@arm.com>
19189             David Sherwood  <david.sherwood@arm.com>
19191         * reload1.c (spill_stack_slot_width): Change element type
19192         from unsigned int to poly_uint64_pod.
19193         (alter_reg): Treat mode sizes as polynomial.
19195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19196             Alan Hayward  <alan.hayward@arm.com>
19197             David Sherwood  <david.sherwood@arm.com>
19199         * reload.c (complex_word_subreg_p): New function.
19200         (reload_inner_reg_of_subreg, push_reload): Use it.
19202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19203             Alan Hayward  <alan.hayward@arm.com>
19204             David Sherwood  <david.sherwood@arm.com>
19206         * lra-constraints.c (process_alt_operands): Reject matched
19207         operands whose sizes aren't ordered.
19208         (match_reload): Refer to this check here.
19210 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19211             Alan Hayward  <alan.hayward@arm.com>
19212             David Sherwood  <david.sherwood@arm.com>
19214         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19215         that the mode size is in the set {1, 2, 4, 8, 16}.
19217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19218             Alan Hayward  <alan.hayward@arm.com>
19219             David Sherwood  <david.sherwood@arm.com>
19221         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19222         Use plus_constant instead of gen_rtx_PLUS.
19224 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19225             Alan Hayward  <alan.hayward@arm.com>
19226             David Sherwood  <david.sherwood@arm.com>
19228         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19229         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19230         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19231         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19232         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19233         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19234         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19235         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19236         * config/i386/i386.c (ix86_push_rounding): ...this new function.
19237         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19238         a poly_int64.
19239         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19240         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19241         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19242         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19243         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19244         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19245         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19246         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19247         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19248         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19249         function.
19250         * expr.c (emit_move_resolve_push): Treat the input and result
19251         of PUSH_ROUNDING as a poly_int64.
19252         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19253         (emit_push_insn): Likewise.
19254         * lra-eliminations.c (mark_not_eliminable): Likewise.
19255         * recog.c (push_operand): Likewise.
19256         * reload1.c (elimination_effects): Likewise.
19257         * rtlanal.c (nonzero_bits1): Likewise.
19258         * calls.c (store_one_arg): Likewise.  Require the padding to be
19259         known at compile time.
19261 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19262             Alan Hayward  <alan.hayward@arm.com>
19263             David Sherwood  <david.sherwood@arm.com>
19265         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19266         Use plus_constant instead of gen_rtx_PLUS.
19268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19269             Alan Hayward  <alan.hayward@arm.com>
19270             David Sherwood  <david.sherwood@arm.com>
19272         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19273         rather than an int.
19275 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19276             Alan Hayward  <alan.hayward@arm.com>
19277             David Sherwood  <david.sherwood@arm.com>
19279         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19280         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19281         via stack temporaries.  Treat the mode size as polynomial too.
19283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19284             Alan Hayward  <alan.hayward@arm.com>
19285             David Sherwood  <david.sherwood@arm.com>
19287         * expr.c (expand_expr_real_2): When handling conversions involving
19288         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19289         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
19290         as a poly_uint64 too.
19292 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19293             Alan Hayward  <alan.hayward@arm.com>
19294             David Sherwood  <david.sherwood@arm.com>
19296         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19299             Alan Hayward  <alan.hayward@arm.com>
19300             David Sherwood  <david.sherwood@arm.com>
19302         * combine.c (can_change_dest_mode): Handle polynomial
19303         REGMODE_NATURAL_SIZE.
19304         * expmed.c (store_bit_field_1): Likewise.
19305         * expr.c (store_constructor): Likewise.
19306         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19307         and polynomial REGMODE_NATURAL_SIZE.
19308         (gen_lowpart_common): Likewise.
19309         * reginfo.c (record_subregs_of_mode): Likewise.
19310         * rtlanal.c (read_modify_subreg_p): Likewise.
19312 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19313             Alan Hayward  <alan.hayward@arm.com>
19314             David Sherwood  <david.sherwood@arm.com>
19316         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19317         numbers of elements.
19319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19320             Alan Hayward  <alan.hayward@arm.com>
19321             David Sherwood  <david.sherwood@arm.com>
19323         * match.pd: Cope with polynomial numbers of vector elements.
19325 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19326             Alan Hayward  <alan.hayward@arm.com>
19327             David Sherwood  <david.sherwood@arm.com>
19329         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19330         in a POINTER_PLUS_EXPR.
19332 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19333             Alan Hayward  <alan.hayward@arm.com>
19334             David Sherwood  <david.sherwood@arm.com>
19336         * omp-simd-clone.c (simd_clone_subparts): New function.
19337         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19338         (ipa_simd_modify_function_body): Likewise.
19340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19341             Alan Hayward  <alan.hayward@arm.com>
19342             David Sherwood  <david.sherwood@arm.com>
19344         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19345         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19346         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19347         (expand_vector_condition, vector_element): Likewise.
19348         (subparts_gt): New function.
19349         (get_compute_type): Use subparts_gt.
19350         (count_type_subparts): Delete.
19351         (expand_vector_operations_1): Use subparts_gt instead of
19352         count_type_subparts.
19354 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19355             Alan Hayward  <alan.hayward@arm.com>
19356             David Sherwood  <david.sherwood@arm.com>
19358         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19359         (vect_compile_time_alias): ...this new function.  Do the calculation
19360         on poly_ints rather than trees.
19361         (vect_prune_runtime_alias_test_list): Update call accordingly.
19363 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19364             Alan Hayward  <alan.hayward@arm.com>
19365             David Sherwood  <david.sherwood@arm.com>
19367         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19368         numbers of units.
19369         (vect_schedule_slp_instance): Likewise.
19371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19372             Alan Hayward  <alan.hayward@arm.com>
19373             David Sherwood  <david.sherwood@arm.com>
19375         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19376         constant and extern definitions for variable-length vectors.
19377         (vect_get_constant_vectors): Note that the number of units
19378         is known to be constant.
19380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19381             Alan Hayward  <alan.hayward@arm.com>
19382             David Sherwood  <david.sherwood@arm.com>
19384         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19385         of units as polynomial.  Choose between WIDE and NARROW based
19386         on multiple_p.
19388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19389             Alan Hayward  <alan.hayward@arm.com>
19390             David Sherwood  <david.sherwood@arm.com>
19392         * tree-vect-stmts.c (simd_clone_subparts): New function.
19393         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19395 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19396             Alan Hayward  <alan.hayward@arm.com>
19397             David Sherwood  <david.sherwood@arm.com>
19399         * tree-vect-stmts.c (vectorizable_call): Treat the number of
19400         vectors as polynomial.  Use build_index_vector for
19401         IFN_GOMP_SIMD_LANE.
19403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19404             Alan Hayward  <alan.hayward@arm.com>
19405             David Sherwood  <david.sherwood@arm.com>
19407         * tree-vect-stmts.c (get_load_store_type): Treat the number of
19408         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19409         for variable-length vectors.
19410         (vectorizable_mask_load_store): Treat the number of units as
19411         polynomial, asserting that it is constant if the condition has
19412         already been enforced.
19413         (vectorizable_store, vectorizable_load): Likewise.
19415 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19416             Alan Hayward  <alan.hayward@arm.com>
19417             David Sherwood  <david.sherwood@arm.com>
19419         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19420         of units as polynomial.  Punt if we can't tell at compile time
19421         which vector contains the final result.
19423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19424             Alan Hayward  <alan.hayward@arm.com>
19425             David Sherwood  <david.sherwood@arm.com>
19427         * tree-vect-loop.c (vectorizable_induction): Treat the number
19428         of units as polynomial.  Punt on SLP inductions.  Use an integer
19429         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
19430         cast of such a series for variable-length floating-point
19431         reductions.
19433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19434             Alan Hayward  <alan.hayward@arm.com>
19435             David Sherwood  <david.sherwood@arm.com>
19437         * tree.h (build_index_vector): Declare.
19438         * tree.c (build_index_vector): New function.
19439         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19440         of units as polynomial, forcibly converting it to a constant if
19441         vectorizable_reduction has already enforced the condition.
19442         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
19443         to create a {1,2,3,...} vector.
19444         (vectorizable_reduction): Treat the number of units as polynomial.
19445         Choose vectype_in based on the largest scalar element size rather
19446         than the smallest number of units.  Enforce the restrictions
19447         relied on above.
19449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19450             Alan Hayward  <alan.hayward@arm.com>
19451             David Sherwood  <david.sherwood@arm.com>
19453         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19454         number of units as polynomial.
19456 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19457             Alan Hayward  <alan.hayward@arm.com>
19458             David Sherwood  <david.sherwood@arm.com>
19460         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19461         * target.def (autovectorize_vector_sizes): Return the vector sizes
19462         by pointer, using vector_sizes rather than a bitmask.
19463         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19464         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19465         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19466         Likewise.
19467         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19468         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19469         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19470         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19471         * omp-general.c (omp_max_vf): Likewise.
19472         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19473         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19474         * tree-vect-loop.c (vect_analyze_loop): Likewise.
19475         * tree-vect-slp.c (vect_slp_bb): Likewise.
19476         * doc/tm.texi: Regenerate.
19477         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19478         to a poly_uint64.
19479         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19480         the vector size as a poly_uint64 rather than an unsigned int.
19481         (current_vector_size): Change from an unsigned int to a poly_uint64.
19482         (get_vectype_for_scalar_type): Update accordingly.
19483         * tree.h (build_truth_vector_type): Take the size and number of
19484         units as a poly_uint64 rather than an unsigned int.
19485         (build_vector_type): Add a temporary overload that takes
19486         the number of units as a poly_uint64 rather than an unsigned int.
19487         * tree.c (make_vector_type): Likewise.
19488         (build_truth_vector_type): Take the number of units as a poly_uint64
19489         rather than an unsigned int.
19491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19492             Alan Hayward  <alan.hayward@arm.com>
19493             David Sherwood  <david.sherwood@arm.com>
19495         * target.def (get_mask_mode): Take the number of units and length
19496         as poly_uint64s rather than unsigned ints.
19497         * targhooks.h (default_get_mask_mode): Update accordingly.
19498         * targhooks.c (default_get_mask_mode): Likewise.
19499         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19500         * doc/tm.texi: Regenerate.
19502 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19503             Alan Hayward  <alan.hayward@arm.com>
19504             David Sherwood  <david.sherwood@arm.com>
19506         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19507         * omp-general.c (omp_max_vf): Likewise.
19508         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19509         (expand_omp_simd): Handle polynomial safelen.
19510         * omp-low.c (omplow_simd_context): Add a default constructor.
19511         (omplow_simd_context::max_vf): Change from int to poly_uint64.
19512         (lower_rec_simd_input_clauses): Update accordingly.
19513         (lower_rec_input_clauses): Likewise.
19515 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19516             Alan Hayward  <alan.hayward@arm.com>
19517             David Sherwood  <david.sherwood@arm.com>
19519         * tree-vectorizer.h (vect_nunits_for_cost): New function.
19520         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19521         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19522         (vect_analyze_slp_cost): Likewise.
19523         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19524         (vect_model_load_cost): Likewise.
19526 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19527             Alan Hayward  <alan.hayward@arm.com>
19528             David Sherwood  <david.sherwood@arm.com>
19530         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19531         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19532         from an unsigned int * to a poly_uint64_pod *.
19533         (calculate_unrolling_factor): New function.
19534         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
19536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19537             Alan Hayward  <alan.hayward@arm.com>
19538             David Sherwood  <david.sherwood@arm.com>
19540         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19541         from an unsigned int to a poly_uint64.
19542         (_loop_vec_info::slp_unrolling_factor): Likewise.
19543         (_loop_vec_info::vectorization_factor): Change from an int
19544         to a poly_uint64.
19545         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19546         (vect_get_num_vectors): New function.
19547         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19548         (vect_get_num_copies): Use vect_get_num_vectors.
19549         (vect_analyze_data_ref_dependences): Change max_vf from an int *
19550         to an unsigned int *.
19551         (vect_analyze_data_refs): Change min_vf from an int * to a
19552         poly_uint64 *.
19553         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19554         than an unsigned HOST_WIDE_INT.
19555         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19556         (vect_analyze_data_ref_dependence): Change max_vf from an int *
19557         to an unsigned int *.
19558         (vect_analyze_data_ref_dependences): Likewise.
19559         (vect_compute_data_ref_alignment): Handle polynomial vf.
19560         (vect_enhance_data_refs_alignment): Likewise.
19561         (vect_prune_runtime_alias_test_list): Likewise.
19562         (vect_shift_permute_load_chain): Likewise.
19563         (vect_supportable_dr_alignment): Likewise.
19564         (dependence_distance_ge_vf): Take the vectorization factor as a
19565         poly_uint64 rather than an unsigned HOST_WIDE_INT.
19566         (vect_analyze_data_refs): Change min_vf from an int * to a
19567         poly_uint64 *.
19568         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19569         vfm1 as a poly_uint64 rather than an int.  Make the same change
19570         for the returned bound_scalar.
19571         (vect_gen_vector_loop_niters): Handle polynomial vf.
19572         (vect_do_peeling): Likewise.  Update call to
19573         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19574         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19575         be constant.
19576         * tree-vect-loop.c (vect_determine_vectorization_factor)
19577         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19578         (vect_get_known_peeling_cost): Likewise.
19579         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19580         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19581         (vect_transform_loop): Likewise.  Use the lowest possible VF when
19582         updating the upper bounds of the loop.
19583         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
19584         rather than an int.
19585         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19586         polynomial unroll factors.
19587         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19588         (vect_make_slp_decision): Likewise.
19589         (vect_supported_load_permutation_p): Likewise, and polynomial
19590         vf too.
19591         (vect_analyze_slp_cost): Handle polynomial vf.
19592         (vect_slp_analyze_node_operations): Likewise.
19593         (vect_slp_analyze_bb_1): Likewise.
19594         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19595         than an unsigned HOST_WIDE_INT.
19596         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19597         (vectorizable_load): Handle polynomial vf.
19598         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19599         a poly_uint64.
19600         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19603             Alan Hayward  <alan.hayward@arm.com>
19604             David Sherwood  <david.sherwood@arm.com>
19606         * match.pd: Handle bit operations involving three constants
19607         and try to fold one pair.
19609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19611         * tree-vect-loop-manip.c: Include gimple-fold.h.
19612         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19613         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
19614         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19615         Add a path that uses a step of VF instead of 1, but disable it
19616         for now.
19617         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19618         and niters_no_overflow parameters.  Update calls to
19619         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19620         Create a new SSA name if the latter choses to use a ste other
19621         than zero, and return it via niters_vector_mult_vf_var.
19622         * tree-vect-loop.c (vect_transform_loop): Update calls to
19623         vect_do_peeling, vect_gen_vector_loop_niters and
19624         slpeel_make_loop_iterate_ntimes.
19625         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19626         (vect_gen_vector_loop_niters): Update declarations after above changes.
19628 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
19630         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19631         128-bit round to integer instructions.
19632         (ceil<mode>2): Likewise.
19633         (btrunc<mode>2): Likewise.
19634         (round<mode>2): Likewise.
19636 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19638         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19639         unaligned VSX load/store on P8/P9.
19640         (expand_block_clear): Allow the use of unaligned VSX
19641         load/store on P8/P9.
19643 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19645         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19646         New function.
19647         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19648         swap associated with both a load and a store.
19650 2018-01-02  Andrew Waterman  <andrew@sifive.com>
19652         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19653         * config/riscv/riscv.md (clear_cache): Use it.
19655 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
19657         * web.c: Remove out-of-date comment.
19659 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19661         * expr.c (fixup_args_size_notes): Check that any existing
19662         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19663         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19664         (emit_single_push_insn): ...here.
19666 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19668         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19669         (const_vector_encoded_nelts): New function.
19670         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19671         (const_vector_int_elt, const_vector_elt): Declare.
19672         * emit-rtl.c (const_vector_int_elt_1): New function.
19673         (const_vector_elt): Likewise.
19674         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19675         of CONST_VECTOR_ELT.
19677 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19679         * expr.c: Include rtx-vector-builder.h.
19680         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19681         directly on the tree encoding.
19682         (const_vector_from_tree): Likewise.
19683         * optabs.c: Include rtx-vector-builder.h.
19684         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19685         sequence of "u" values.
19686         * vec-perm-indices.c: Include rtx-vector-builder.h.
19687         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19688         directly on the vec_perm_indices encoding.
19690 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19692         * doc/rtl.texi (const_vector): Describe new encoding scheme.
19693         * Makefile.in (OBJS): Add rtx-vector-builder.o.
19694         * rtx-vector-builder.h: New file.
19695         * rtx-vector-builder.c: Likewise.
19696         * rtl.h (rtx_def::u2): Add a const_vector field.
19697         (CONST_VECTOR_NPATTERNS): New macro.
19698         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19699         (CONST_VECTOR_DUPLICATE_P): Likewise.
19700         (CONST_VECTOR_STEPPED_P): Likewise.
19701         (CONST_VECTOR_ENCODED_ELT): Likewise.
19702         (const_vec_duplicate_p): Check for a duplicated vector encoding.
19703         (unwrap_const_vec_duplicate): Likewise.
19704         (const_vec_series_p): Check for a non-duplicated vector encoding.
19705         Say that the function only returns true for integer vectors.
19706         * emit-rtl.c: Include rtx-vector-builder.h.
19707         (gen_const_vec_duplicate_1): Delete.
19708         (gen_const_vector): Call gen_const_vec_duplicate instead of
19709         gen_const_vec_duplicate_1.
19710         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19711         (gen_const_vec_duplicate): Use rtx_vector_builder.
19712         (gen_const_vec_series): Likewise.
19713         (gen_rtx_CONST_VECTOR): Likewise.
19714         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19715         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19716         Build a new vector rather than modifying a CONST_VECTOR in-place.
19717         (handle_special_swappables): Update call accordingly.
19718         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19719         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19720         Build a new vector rather than modifying a CONST_VECTOR in-place.
19721         (handle_special_swappables): Update call accordingly.
19723 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19725         * simplify-rtx.c (simplify_const_binary_operation): Use
19726         CONST_VECTOR_ELT instead of XVECEXP.
19728 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19730         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19731         the selector elements to be different from the data elements
19732         if the selector is a VECTOR_CST.
19733         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19734         ssizetype for the selector.
19736 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19738         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19739         before testing each element individually.
19740         * tree-vect-generic.c (lower_vec_perm): Likewise.
19742 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19744         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19745         * selftest-run-tests.c (selftest::run_tests): Call it.
19746         * vector-builder.h (vector_builder::operator ==): New function.
19747         (vector_builder::operator !=): Likewise.
19748         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19749         (vec_perm_indices::all_from_input_p): New function.
19750         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19751         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19752         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19753         instead of reading the VECTOR_CST directly.  Detect whether both
19754         vector inputs are the same before constructing the vec_perm_indices,
19755         and update the number of inputs argument accordingly.  Use the
19756         utility functions added above.  Only construct sel2 if we need to.
19758 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19760         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19761         the broadcast of the low byte.
19762         (expand_mult_highpart): Use an explicit encoding for the permutes.
19763         * optabs-query.c (can_mult_highpart_p): Likewise.
19764         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19765         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19766         (vectorizable_bswap): Likewise.
19767         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19768         explicit encoding for the power-of-2 permutes.
19769         (vect_permute_store_chain): Likewise.
19770         (vect_grouped_load_supported): Likewise.
19771         (vect_permute_load_chain): Likewise.
19773 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19775         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19776         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19777         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19778         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19779         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19780         (vect_gen_perm_mask_any): Likewise.
19782 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19784         * int-vector-builder.h: New file.
19785         * vec-perm-indices.h: Include int-vector-builder.h.
19786         (vec_perm_indices): Redefine as an int_vector_builder.
19787         (auto_vec_perm_indices): Delete.
19788         (vec_perm_builder): Redefine as a stand-alone class.
19789         (vec_perm_indices::vec_perm_indices): New function.
19790         (vec_perm_indices::clamp): Likewise.
19791         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19792         (vec_perm_indices::new_vector): New function.
19793         (vec_perm_indices::new_expanded_vector): Update for new
19794         vec_perm_indices class.
19795         (vec_perm_indices::rotate_inputs): New function.
19796         (vec_perm_indices::all_in_range_p): Operate directly on the
19797         encoded form, without computing elided elements.
19798         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19799         encoding.  Update for new vec_perm_indices class.
19800         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19801         the given vec_perm_builder.
19802         (expand_vec_perm_var): Update vec_perm_builder constructor.
19803         (expand_mult_highpart): Use vec_perm_builder instead of
19804         auto_vec_perm_indices.
19805         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19806         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
19807         or double series encoding as appropriate.
19808         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19809         vec_perm_indices instead of auto_vec_perm_indices.
19810         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19811         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19812         (vect_permute_store_chain): Likewise.
19813         (vect_grouped_load_supported): Likewise.
19814         (vect_permute_load_chain): Likewise.
19815         (vect_shift_permute_load_chain): Likewise.
19816         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19817         (vect_transform_slp_perm_load): Likewise.
19818         (vect_schedule_slp_instance): Likewise.
19819         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19820         (vectorizable_mask_load_store): Likewise.
19821         (vectorizable_bswap): Likewise.
19822         (vectorizable_store): Likewise.
19823         (vectorizable_load): Likewise.
19824         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19825         vec_perm_indices instead of auto_vec_perm_indices.  Use
19826         tree_to_vec_perm_builder to read the vector from a tree.
19827         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19828         vec_perm_builder instead of a vec_perm_indices.
19829         (have_whole_vector_shift): Use vec_perm_builder and
19830         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
19831         truncation to calc_vec_perm_mask_for_shift.
19832         (vect_create_epilog_for_reduction): Likewise.
19833         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19834         from auto_vec_perm_indices to vec_perm_indices.
19835         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19836         instead of changing individual elements.
19837         (aarch64_vectorize_vec_perm_const): Use new_vector to install
19838         the vector in d.perm.
19839         * config/arm/arm.c (expand_vec_perm_d::perm): Change
19840         from auto_vec_perm_indices to vec_perm_indices.
19841         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19842         instead of changing individual elements.
19843         (arm_vectorize_vec_perm_const): Use new_vector to install
19844         the vector in d.perm.
19845         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19846         Update vec_perm_builder constructor.
19847         (rs6000_expand_interleave): Likewise.
19848         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19849         (rs6000_expand_interleave): Likewise.
19851 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19853         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19854         to qimode could truncate the indices.
19855         * optabs.c (expand_vec_perm_var): Likewise.
19857 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19859         * Makefile.in (OBJS): Add vec-perm-indices.o.
19860         * vec-perm-indices.h: New file.
19861         * vec-perm-indices.c: Likewise.
19862         * target.h (vec_perm_indices): Replace with a forward class
19863         declaration.
19864         (auto_vec_perm_indices): Move to vec-perm-indices.h.
19865         * optabs.h: Include vec-perm-indices.h.
19866         (expand_vec_perm): Delete.
19867         (selector_fits_mode_p, expand_vec_perm_var): Declare.
19868         (expand_vec_perm_const): Declare.
19869         * target.def (vec_perm_const_ok): Replace with...
19870         (vec_perm_const): ...this new hook.
19871         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19872         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19873         * doc/tm.texi: Regenerate.
19874         * optabs.def (vec_perm_const): Delete.
19875         * doc/md.texi (vec_perm_const): Likewise.
19876         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19877         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19878         expand_vec_perm for constant permutation vectors.  Assert that
19879         the mode of variable permutation vectors is the integer equivalent
19880         of the mode that is being permuted.
19881         * optabs-query.h (selector_fits_mode_p): Declare.
19882         * optabs-query.c: Include vec-perm-indices.h.
19883         (selector_fits_mode_p): New function.
19884         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19885         is defined, instead of checking whether the vec_perm_const_optab
19886         exists.  Use targetm.vectorize.vec_perm_const instead of
19887         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
19888         fit in the vector mode before using a variable permute.
19889         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19890         vec_perm_indices instead of an rtx.
19891         (expand_vec_perm): Replace with...
19892         (expand_vec_perm_const): ...this new function.  Take the selector
19893         as a vec_perm_indices rather than an rtx.  Also take the mode of
19894         the selector.  Update call to shift_amt_for_vec_perm_mask.
19895         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19896         Use vec_perm_indices::new_expanded_vector to expand the original
19897         selector into bytes.  Check whether the indices fit in the vector
19898         mode before using a variable permute.
19899         (expand_vec_perm_var): Make global.
19900         (expand_mult_highpart): Use expand_vec_perm_const.
19901         * fold-const.c: Includes vec-perm-indices.h.
19902         * tree-ssa-forwprop.c: Likewise.
19903         * tree-vect-data-refs.c: Likewise.
19904         * tree-vect-generic.c: Likewise.
19905         * tree-vect-loop.c: Likewise.
19906         * tree-vect-slp.c: Likewise.
19907         * tree-vect-stmts.c: Likewise.
19908         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19909         Delete.
19910         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19911         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19912         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19913         (aarch64_vectorize_vec_perm_const): ...this new function.
19914         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19915         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19916         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19917         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19918         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19919         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19920         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19921         into...
19922         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
19923         check for NEON modes.
19924         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19925         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19926         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19927         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19928         into...
19929         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
19930         the old VEC_PERM_CONST conditions.
19931         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19932         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19933         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19934         (ia64_vectorize_vec_perm_const_ok): Merge into...
19935         (ia64_vectorize_vec_perm_const): ...this new function.
19936         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19937         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19938         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19939         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19940         * config/mips/mips.c (mips_expand_vec_perm_const)
19941         (mips_vectorize_vec_perm_const_ok): Merge into...
19942         (mips_vectorize_vec_perm_const): ...this new function.
19943         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19944         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19945         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19946         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19947         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19948         (rs6000_expand_vec_perm_const): Delete.
19949         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19950         Delete.
19951         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19952         (altivec_expand_vec_perm_const_le): Take each operand individually.
19953         Operate on constant selectors rather than rtxes.
19954         (altivec_expand_vec_perm_const): Likewise.  Update call to
19955         altivec_expand_vec_perm_const_le.
19956         (rs6000_expand_vec_perm_const): Delete.
19957         (rs6000_vectorize_vec_perm_const_ok): Delete.
19958         (rs6000_vectorize_vec_perm_const): New function.
19959         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19960         an element count and rtx array.
19961         (rs6000_expand_extract_even): Update call accordingly.
19962         (rs6000_expand_interleave): Likewise.
19963         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19964         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19965         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19966         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19967         (rs6000_expand_vec_perm_const): Delete.
19968         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19969         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19970         (altivec_expand_vec_perm_const_le): Take each operand individually.
19971         Operate on constant selectors rather than rtxes.
19972         (altivec_expand_vec_perm_const): Likewise.  Update call to
19973         altivec_expand_vec_perm_const_le.
19974         (rs6000_expand_vec_perm_const): Delete.
19975         (rs6000_vectorize_vec_perm_const_ok): Delete.
19976         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
19977         reference to the SPE evmerge intructions.
19978         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19979         an element count and rtx array.
19980         (rs6000_expand_extract_even): Update call accordingly.
19981         (rs6000_expand_interleave): Likewise.
19982         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19983         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19984         new function.
19985         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19987 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19989         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19990         vector mode and that that mode matches the mode of the data
19991         being permuted.
19992         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19993         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
19994         directly using expand_vec_perm_1 when forcing selectors into
19995         registers.
19996         (expand_vec_perm_var): New function, split out from expand_vec_perm.
19998 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20000         * optabs-query.h (can_vec_perm_p): Delete.
20001         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20002         * optabs-query.c (can_vec_perm_p): Split into...
20003         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20004         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20005         particular selector is valid.
20006         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20007         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20008         (vect_grouped_load_supported): Likewise.
20009         (vect_shift_permute_load_chain): Likewise.
20010         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20011         (vect_transform_slp_perm_load): Likewise.
20012         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20013         (vectorizable_bswap): Likewise.
20014         (vect_gen_perm_mask_checked): Likewise.
20015         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
20016         implementations of variable permutation vectors into account
20017         when deciding which selector to use.
20018         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20019         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20020         with a false third argument.
20021         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20022         to test whether the constant selector is valid and can_vec_perm_var_p
20023         to test whether a variable selector is valid.
20025 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20027         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20028         * optabs-query.c (can_vec_perm_p): Likewise.
20029         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20030         instead of vec_perm_indices.
20031         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20032         (vect_gen_perm_mask_checked): Likewise,
20033         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20034         (vect_gen_perm_mask_checked): Likewise,
20036 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20038         * optabs-query.h (qimode_for_vec_perm): Declare.
20039         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20040         (qimode_for_vec_perm): ...this new function.
20041         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20043 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20045         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20046         does not have a conditional at the top.
20048 2018-01-02  Richard Biener  <rguenther@suse.de>
20050         * ipa-inline.c (big_speedup_p): Fix expression.
20052 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20054         PR target/81616
20055         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20056         for generic 4->6.
20058 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20060         PR target/81616
20061         Generic tuning.
20062         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20063         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20064         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20065         cond_taken_branch_cost 3->4.
20067 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
20069         PR tree-optimization/83581
20070         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20071         TODO_cleanup_cfg if any changes have been made.
20073         PR middle-end/83608
20074         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20075         convert_modes if target mode has the right side, but different mode
20076         class.
20078         PR middle-end/83609
20079         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20080         last argument when extracting from CONCAT.  If either from_real or
20081         from_imag is NULL, use expansion through memory.  If result is not
20082         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20083         the parts directly to inner mode, if even that fails, use expansion
20084         through memory.
20086         PR middle-end/83623
20087         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20088         check for bswap in mode rather than HImode and use that in expand_unop
20089         too.
20091 Copyright (C) 2018 Free Software Foundation, Inc.
20093 Copying and distribution of this file, with or without modification,
20094 are permitted in any medium without royalty provided the copyright
20095 notice and this notice are preserved.