PR tree-optimization/86010
[official-gcc.git] / gcc / ChangeLog
blobbccc0c76b04842414a206d1348a9bc7f09e59897
1 2018-07-17  Jeff Law  <law@redhat.com>
3         PR tree-optimization/86010
4         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6         * config/mips/mips.c (vr4130_align_insns): Update for recent
7         changes to label_to_alignment.
9         * config/frv/frv.c (frv_label_align): Update for recent changes
10         to label_to_alignment.
12         * config/nios2/nios2.c (nios2_label_align): Update for recent
13         changes which dropped ALIGN_LABELS_LOG.
15 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
17         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
18         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
20 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
22         * config/arc/arc.c (arc_label_align): Use align_labels instead of
23         deprecated align_labels_log.
25 2018-07-17  Richard Biener  <rguenther@suse.de>
27         PR lto/86456
28         * dwarf2out.c (init_sections_and_labels): Always generate
29         a debug_line_str_section for early LTO debug.
30         (dwarf2out_finish): Reset debug_line_str_hash output early.
31         Bump counter for extra dwarf5 .debug_loc labels to not conflict
32         with fat LTO part.
33         (dwarf2out_early_finish): Output debug_line_str.
35 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
37         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
38         index register on z196 or later.
40 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
42         * config/s390/s390.c (s390_default_align): Set default function
43         alignment to 16.
44         (s390_override_options_after_change): Call s390_default align.
45         (s390_option_override_internal): Call s390_default_align.
46         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
48 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
50         PR middle-end/86542
51         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
52         to _looptemp_ clauses, other than the first two.
54 2018-07-17  Martin Liska  <mliska@suse.cz>
56         * opts.c: Do not enable OPT_falign_* for -Os.
58 2018-07-17  Martin Liska  <mliska@suse.cz>
60         * align.h (MAX_CODE_ALIGN): New.
61         (MAX_CODE_ALIGN_VALUE): New.
62         * common/config/i386/i386-common.c (ix86_handle_option):
63         (MAX_CODE_ALIGN): Moved to align.h.
64         * final.c (MAX_CODE_ALIGN): Likewise.
65         * opts.c (parse_and_check_align_values):
66         (MAX_CODE_ALIGN): Likewise.
67         (MAX_CODE_ALIGN_VALUE): Likewise.
69 2018-07-17  Martin Liska  <mliska@suse.cz>
71         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
72         in order to fulfil coding style.
73         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
74         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
75         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
76         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
77         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
78         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
79         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
80         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
81         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
83 2018-07-17  Martin Liska  <mliska@suse.cz>
85         * align.h: New file.
86         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
87         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
88         align_flags of label_to_alignment.
89         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
90         class.
91         * config/m68k/m68k.c: Do not use removed align_labels_value and
92         align_loops_value.
93         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
94         (LOOP_ALIGN): Likewise.
95         (LABEL_ALIGN): Likewise.
96         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
97         Remove not used macro.
98         (rs6000_loop_align): Change return type to align_flags.
99         (rs6000_loop_align_max_skip): Remove.
100         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
101         Change return type to align_flags.
102         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
103         Remove not used macro.
104         (rs6000_loop_align):  Change return type to align_flags.
105         (rs6000_loop_align_max_skip): Remove.
106         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
107         * config/rx/rx-protos.h (rx_align_for_label): Make it
108         static function.
109         * config/rx/rx.c (rx_align_for_label): Change return type
110         to align_flags.
111         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
112         macro definitions.
113         into align_flags class.
114         (LABEL_ALIGN): Likewise.
115         (LOOP_ALIGN): Likewise.
116         * config/s390/s390.c (s390_label_align): Use align_flags
117         class member.
118         (s390_asm_output_function_label): Likewise.
119         * config/sh/sh.c (sh_override_options_after_change):
120         Use align_flags class directly without macros.
121         (find_barrier): Likewise.
122         (barrier_align): Likewise.
123         (sh_loop_align): Likewise.
124         * config/spu/spu.c (spu_option_override):
125         Use align_flags_tuple::get_value instead of removed macros.
126         (spu_sched_init): Likewise.
127         * config/spu/spu.h (GTY): Likewise.
128         * config/visium/visium.c (visium_option_override):
129         Set "8" as default secondary alignment.
130         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
131         in order to guarantee secondary alignment of 8.
132         * coretypes.h: Include align.h header file.
133         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
134         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
135         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
136         * doc/tm.texi.in: Likewise.
137         * final.c (struct label_alignment): Remove not used structure.
138         (LABEL_ALIGN): Change type to align_flags.
139         (LOOP_ALIGN): Likewise.
140         (JUMP_ALIGN): Likewise.
141         (default_loop_align_max_skip): Remove.
142         (default_label_align_max_skip): Likewise.
143         (default_jump_align_max_skip): Likewise.
144         (default_label_align_after_barrier_max_skip):
145         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
146         (LABEL_TO_MAX_SKIP): Remove.
147         (label_to_alignment): Return align_flags type instead of integer.
148         (label_to_max_skip): Remove.
149         (align_fuzz): Use align_flags type.
150         (compute_alignments): Use align_flags type and use align_flags::max
151         to combine multiple alignments.
152         (grow_label_align): Grow vec instead of C array.
153         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
154         (shorten_branches):  Use align_flags type and use align_flags::max
155         to combine multiple alignments.
156         (final_scan_insn_1): Remove usage of secondary alignment that comes
157         from label alignment, but instead use proper secondary alignment
158         which is computed in grow_label_align.
159         * flags.h (struct align_flags_tuple): Move to align.h.
160         (struct align_flags): Likewise.
161         (state_align_loops): Rename to align_loops.
162         (state_align_jumps): Rename to align_jumps.
163         (state_align_labels): Rename to align_labels.
164         (state_align_functions): Rename to align_functions.
165         (align_loops_log): Remove.
166         (align_jumps_log): Remove.
167         (align_labels_log): Remove.
168         (align_functions_log): Remove.
169         (align_loops_max_skip): Remove.
170         (align_jumps_max_skip): Remove.
171         (align_labels_max_skip): Remove.
172         (align_functions_max_skip): Remove.
173         (align_loops_value): Remove.
174         (align_jumps_value): Remove.
175         (align_labels_value): Remove.
176         (align_functions_value): Remove.
177         * output.h (label_to_alignment): Change return type to align_flags.
178         (label_to_max_skip): Remove.
179         * target.def: Remove loop_align_max_skip, label_align_max_skip,
180         jump_align_max_skip macros.
181         * targhooks.h (default_loop_align_max_skip): Remove.
182         (default_label_align_max_skip): Likewise.
183         (default_jump_align_max_skip): Likewise.
184         (default_label_align_after_barrier_max_skip): Remove.
185         * toplev.c (read_log_maxskip): Use ::normalize function.
186         (parse_N_M): Remove not used argument and also call ::normalize.
187         (parse_alignment_opts): Do not pass unused arguments.
188         * varasm.c (assemble_start_function): Use directly align_functions
189         instead of removed macros.
190         * system.h: Do not poison removed macros.
192 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
194         PR middle-end/86539
195         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
196         and cond temporaries don't have reference type if iterator has
197         pointer type.  For init use &for_pre_body instead of pre_p if
198         for_pre_body is non-empty.
200 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
202         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
203         double-double modes to SFmode directly directly.
204         (trunc<mode>sf2_fprs): Delete.
206 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
208         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
209         for conversions between IFmode and the decimal floating point modes.
210         (init_float128_ieee): Use the correct names for conversions between
211         KFmode and the decimal floating point modes.
213 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
215         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
216         for the conversions between TDmode and IFmode.
217         (init_float128_ieee): Use more correct names for the conversions
218         between TDmode and KFmode.
220 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
222         PR tree-optimization/86526
223         * builtins.c (expand_builtin_memcmp): Formatting fixes.
224         (inline_expand_builtin_string_cmp): Likewise.
225         (inline_string_cmp): Likewise.  Use c_readstr instead of
226         builtin_memcpy_read_str.  Add unit_mode temporary.
228 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
230         PR middle-end/86528
231         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
232         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
234 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
236         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
237         Alphabetize prototypes of built-in functions, separating out
238         built-in functions that are listed in this section but should be
239         described elsewhere.
241 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
243         PR target/86511
244         * expmed.c (emit_store_flag): Do not emit setcc followed by a
245         conditional move when trapping comparison was split to a
246         non-trapping one (and vice versa).
248 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
250         * config/s390/s390.c (s390_function_profiler): Generate nops
251         instead of profiler call sequences.
252         * config/s390/s390.opt: Add the new option.
254 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
256         * config/s390/s390.c (s390_function_profiler): Generate
257         __mcount_loc section.
258         * config/s390/s390.opt: Add the new option.
260 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
262         * common.opt: Add the new warning.
263         * config/s390/s390.c (s390_function_profiler): Emit "brasl
264         %r0,__fentry__" when -mfentry is specified.
265         (s390_option_override_internal): Disallow -mfentry for 31-bit
266         CPUs.
267         * config/s390/s390.opt: Add the new option.
269 2018-07-16  Richard Biener  <rguenther@suse.de>
271         PR lto/86523
272         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
273         for function-local FUNCTION_DECL and RESULT_DECL immediately.
275 2018-07-16  Martin Liska  <mliska@suse.cz>
277         PR ipa/86529
278         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
279         to ::get_create.
281 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
283         * config/arc/arcHS.md: Update ARCHS scheduling rules.
285 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
287         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
288         for ARCHS4x.
289         * config/arc/arc-cpus.def (hs4x): New cpu.
290         (hs4xd): Likewise.
291         * config/arc/arc-tables.opt: Regenerate.
292         * config/arc/arc.c (arc_sched_issue_rate): New function.
293         (TARGET_SCHED_ISSUE_RATE): Define.
294         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
295         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
296         fpu_cvt.
297         (attr tune): Add ARCHS4x tune values.
298         (attr tune_dspmpy): Define.
299         (*tst): Correct instruction type.
300         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
301         * config/arc/arcHS4x.md: New file.
302         * config/arc/fpu.md: Update instruction type attributes.
303         * config/arc/t-multilib: Regenerate.
305 2018-07-16  Tom de Vries  <tdevries@suse.de>
307         PR debug/86455
308         * var-tracking.c (vt_initialize): Fix pre_dec handling.
310 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
312         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
313         early clobber.
315 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
317         PR tree-optimization/86514
318         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
319         conversion to a boolean type from a type with greater precision.
321 2018-07-16  Tom de Vries  <tdevries@suse.de>
323         * var-tracking.c (vt_initialize): Print adjusted insn slim if
324         dump_flags request TDF_SLIM.
326 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
328         * fold-const.c (int_const_binop_1): Abstract...
329         (wide_int_binop): ...wide int code here.
330         (poly_int_binop): ...poly int code here.
331         Abstract the rest of int_const_binop_1 into int_const_binop.
332         * fold-const.h (wide_int_binop): New.
333         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
334         Remove useless PLUS/MINUS_EXPR case.
335         (zero_nonzero_bits_from_vr): Move wide int code...
336         (zero_nonzero_bits_from_bounds): ...here.
337         (extract_range_from_binary_expr_1): Move mask optimization code...
338         (range_easy_mask_min_max): ...here.
339         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
340         (range_easy_mask_min_max): New.
342 2018-07-15  Jeff Law  <law@redhat.com>
344         PR target/85993
345         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
346         block.
348 2018-07-14  Jim Wilson  <jimw@sifive.com>
350         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
352 2018-07-14  Paul Koning  <ni1d@arrl.net>
354         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
356 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
358         * lto-streamer-out.c (copy_function_or_variable): Dump info about
359         copying section.
361 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
362             Steve Munroe  <munroesj52@gmail.com>
364         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
365         (_mm_andnot_si128): Likewise.
366         (_mm_or_si128): Likewise.
367         (_mm_xor_si128): Likewise.
369 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
371         PR middle-end/78809
372         * builtins.c (expand_builtin_memcmp): Inline the calls first
373         when result_eq is false.
374         (expand_builtin_strcmp): Inline the calls first.
375         (expand_builtin_strncmp): Likewise.
376         (inline_string_cmp): New routine. Expand a string compare
377         call by using a sequence of char comparison.
378         (inline_expand_builtin_string_cmp): New routine. Inline expansion
379         a call to str(n)cmp/memcmp.
380         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
381         New option.
382         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
384 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
386         * config/arm/driver-arm.c: Include arm-native.h.
387         (host_detect_local_cpu): Use auto-generated data tables.
388         (vendors, arm_cpu_table): Delete.  Move part information to ...
389         * config/arm/arm-cpus.in: ... here.
390         * config/arm/parsecpu.awk (gen_native): New function.
391         (vendor, part): New CPU fields.
392         (END): Add support for building the native CPU detection tables.
393         * config/arm/t-arm (arm-native.h): Add build rule.
394         (driver-arm.o): Add dependency on arm-native.h.
396 2018-07-13  Richard Biener  <rguenther@suse.de>
398         PR middle-end/85974
399         * match.pd (addr1 - addr2): Allow either of the operand to
400         have a conversion.
402 2018-07-13  Tom de Vries  <tdevries@suse.de>
404         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
405         in remap_ssa_name.
407 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
409         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
410         arrays instead of numbered variables.
412 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
414         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
415         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
417 2018-07-13  Richard Biener  <rguenther@suse.de>
419         PR debug/86452
420         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
421         instead of get_context_die.
423 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
424             Richard Biener  <rguenther@suse.de>
426         PR middle-end/86489
427         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
428         that the loop latch destination where phi is defined.
430 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
432         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
433         (riscv_expand_epilogue): Add assertion to check interrupt mode.
434         (riscv_set_current_function): Extract getting interrupt type to new
435         function.
436         (riscv_get_interrupt_type): New function.
437         (riscv_merge_decl_attributes): New function, checking interrupt type is
438         same.
439         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
441 2018-07-12  Paul Koning  <ni1d@arrl.net>
443         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
444         directive.
446 2018-07-12  Paul Koning  <ni1d@arrl.net>
448         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
449         zero reference, add doloop_end instead.
450         * doc/md.texi (decrement_and_branch_until_zero): Remove.
451         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
452         detail for doloop_end.
454 2018-07-12  Martin Sebor  <msebor@redhat.com>
456         PR c/86453
457         * attribs.c (decl_attributes): Reject conflicting attributes before
458         calling attribute handlers.
460 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
462         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
463          parameter.
464         (gcc::dump_manager::get_dump_file_name): likewise.
465         (dump_begin): Likewise.
466         * dumpfile.h (dump_begin): Update prototype.
467         (gcc::dump_manager::get_dump_file_name,
468         gcc::dump_manager::get_dump_file_name): Update prototype.
470 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
472         * internal-fn.h (vectorizable_internal_fn_p): New function.
473         * tree-vect-slp.c (compatible_calls_p): Likewise.
474         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
475         to internal functions.
476         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
478 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
480         * fold-const.h (inverse_conditions_p): Declare.
481         * fold-const.c (inverse_conditions_p): New function.
482         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
483         that test the inverse condition of a conditional internal function.
484         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
485         * internal-fn.c (internal_fn_mask_index): Handle conditional
486         internal functions.
487         (vectorized_internal_fn_supported_p): New function.
488         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
489         (any_pred_load_store): Replace with...
490         (need_to_predicate): ...this new variable.
491         (redundant_ssa_names): New variable.
492         (ifcvt_can_use_mask_load_store): Move initial checks to...
493         (ifcvt_can_predicate): ...this new function.  Handle tree codes
494         for which a conditional internal function exists.
495         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
496         instead of ifcvt_can_use_mask_load_store.  Update after variable
497         name change.
498         (predicate_load_or_store): New function, split out from
499         predicate_mem_writes.
500         (check_redundant_cond_expr): New function.
501         (value_available_p): Likewise.
502         (predicate_rhs_code): Likewise.
503         (predicate_mem_writes): Rename to...
504         (predicate_statements): ...this.  Use predicate_load_or_store
505         and predicate_rhs_code.
506         (combine_blocks, tree_if_conversion): Update after above name changes.
507         (ifcvt_local_dce): Handle redundant_ssa_names.
508         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
509         general conditional functions.
510         * tree-vect-stmts.c (vectorizable_call): Likewise.
512 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
513             Alan Hayward  <alan.hayward@arm.com>
514             David Sherwood  <david.sherwood@arm.com>
516         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
517         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
518         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
519         plus and minus and convert them into IFN_COND_FMA-based sequences.
520         (convert_mult_to_fma): Handle conditional plus and minus.
522 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
524         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
525         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
526         (cond_fnms_optab): New optabs.
527         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
528         internal functions.
529         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
530         * internal-fn.h (get_conditional_internal_fn): Declare.
531         (get_unconditional_internal_fn): Likewise.
532         * internal-fn.c (cond_ternary_direct): New macro.
533         (expand_cond_ternary_optab_fn): Likewise.
534         (direct_cond_ternary_optab_supported_p): Likewise.
535         (FOR_EACH_COND_FN_PAIR): Likewise.
536         (get_conditional_internal_fn): New function.
537         (get_unconditional_internal_fn): Likewise.
538         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
539         (gimple_match_op::gimple_match_op): Add a new overload for 5
540         operands.
541         (gimple_match_op::set_op): Likewise.
542         (gimple_resimplify5): Declare.
543         * genmatch.c (decision_tree::gen): Generate simplifications for
544         5 operands.
545         * gimple-match-head.c (gimple_simplify): Define an overload for
546         5 operands.  Handle calls with 5 arguments in the top-level overload.
547         (convert_conditional_op): Handle conversions from unconditional
548         internal functions to conditional ones.
549         (gimple_resimplify5): New function.
550         (build_call_internal): Pass a fifth operand.
551         (maybe_push_res_to_seq): Likewise.
552         (try_conditional_simplification): Try converting conditional
553         internal functions to unconditional internal functions.
554         Handle 3-operand unconditional forms.
555         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
556         Define ternary equivalents of the current rules for binary conditional
557         internal functions.
558         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
559         ternary operations.
560         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
561         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
562         (optab): Handle them.
563         (SVE_COND_FP_TERNARY): New int iterator.
564         (sve_fmla_op, sve_fmad_op): New int attributes.
565         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
566         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
567         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
569 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
571         * target.def (preferred_else_value): New target hook.
572         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
573         * doc/tm.texi: Regenerate.
574         * targhooks.h (default_preferred_else_value): Declare.
575         * targhooks.c (default_preferred_else_value): New function.
576         * internal-fn.h (conditional_internal_fn_code): Declare.
577         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
578         (get_conditional_internal_fn): Use it.
579         (conditional_internal_fn_code): New function.
580         * gimple-match.h (gimple_match_cond): New struct.
581         (gimple_match_op): Add a cond member function.
582         (gimple_match_op::gimple_match_op): Update all forms to take a
583         gimple_match_cond.
584         * genmatch.c (expr::gen_transform): Use the same condition as res_op
585         for the suboperation, but don't specify a particular else_value.
586         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
587         (visit_nary_op, visit_reference_op_load): Pass
588         gimple_match_cond::UNCOND to the gimple_match_op constructor.
589         * gimple-match-head.c: Include tree-eh.h
590         (convert_conditional_op): New function.
591         (maybe_resimplify_conditional_op): Likewise.
592         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
593         (gimple_resimplify2): Likewise.
594         (gimple_resimplify3): Likewise.
595         (gimple_resimplify4): Likewise.
596         (maybe_push_res_to_seq): Return null for conditional operations.
597         (try_conditional_simplification): New function.
598         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
599         constructor.
600         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
601         IFN_COND_* call.
602         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
603         function.
604         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
606 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
608         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
609         DECL_FCONTEXT
610         (hash_tree): Do not hash DECL_FCONTEXT
611         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
612         Do not stream DECL_FCONTEXT.
613         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
614         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
616 2018-07-12  Richard Biener  <rguenther@suse.de>
618         PR debug/86462
619         * dwarf2out.c (gen_block_die): Only output blocks when they have
620         at least one !DECL_IGNORED_P variable.
622 2018-07-12  Richard Biener  <rguenther@suse.de>
624         PR target/84829
625         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
626         Remove -mieee-fp handling.
628 2018-07-12  Richard Biener  <rguenther@suse.de>
630         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
631         left-over from last patch.
633 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
635         PR tree-optimization/86492
636         * gimple-ssa-store-merging.c
637         (imm_store_chain_info::coalesce_immediate_stores): Call
638         check_no_overlap even for the merge_overlapping case.  Formatting fix.
640 2018-07-12  Richard Biener  <rguenther@suse.de>
642         PR middle-end/86479
643         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
644         move possibly trapping operations into the conditional.
646 2018-07-12  Richard Biener  <rguenther@suse.de>
648         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
649         (vn_lookup_simplify_result): Remove recursion limit applied
650         here.
651         (vn_nary_build_or_lookup_1): Adjust.
652         (try_to_simplify): Likewise.
653         * gimple-match-head.c (gimple_resimplify1): Instead apply one
654         here.
655         (gimple_resimplify2): Likewise.
656         (gimple_resimplify3): Likewise.
657         (gimple_resimplify4): Likewise.
659 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
661         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
662         Use __mmask64 type instead of __mmask8 for __M argument.
663         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
664         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
665         __U argument.
666         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
667         __mmask16 for __M argument.
668         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
669         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
670         to __mmask16 instead of __mmask8.
671         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
672         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
673         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
674         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
675         instead of __mmask16 for __U argument.
676         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
677         __mmask16 instead of __mmask8 for __U argument.
678         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
679         __U argument.
680         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
681         __mmask16.
682         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
683         argument.
684         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
685         __U argument.
686         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
687         __mmask16.
688         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
689         of __mmask16.
690         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
691         __U argument.
692         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
693         __U argument.
694         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
695         __U argument.
696         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
697         __U argument.
698         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
699         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
700         return type as well as __M argument type and all casts from __mmask8
701         to __mmask32.
702         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
703         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
704         return type as well as __M argument type and all casts from __mmask8
705         to __mmask16.
706         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
707         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
708         return type as well as __M argument type and all casts from __mmask8
709         to __mmask32.
710         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
711         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
712         return type as well as __M argument type and all casts from __mmask8
713         to __mmask16.
714         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
715         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
716         __mmask16.
718 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
720         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
721         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
722         for __U argument.
724 2018-07-11  Paul Koning  <ni1d@arrl.net>
726         * doc/md.texi (define_subst): Document how multiple occurrences of
727         the same argument in the replacement pattern are handled.
729 2018-07-11  Paul Koning  <ni1d@arrl.net>
731         * doc/extend.texi (Common Variable Attributes): Move "mode" into
732         alphabetical order.
733         (Common Type Attributes): Add "mode" attribute.
735 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
737         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
738         stream DECL_ORIGINAL_TYPE.
739         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
740         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
741         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
742         Do not walk original type.
743         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
744         external decls.
745         (write_ts_decl_non_common_tree_pointers): Do not stream
746         DECL_ORIGINAL_TYPE
747         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
748         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
750 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
752         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
753         thread twice from the same starting edge.
755 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
757         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
758         * gimple.c (gimple_call_nonnull_result_p): ...here...
759         (gimple_call_nonnull_arg): ...and here.
760         * gimple.h (gimple_call_nonnull_result_p): New.
761         (gimple_call_nonnull_arg): New.
763 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
765         * config/arm/arm-cpus.in: Move information from fpu field of each
766         cpu definition to the isa field.
767         * config/arm/parsecpu.awk (fpu): Delete match rule.
768         (gen_comm_data): Don't add bits from the CPU's FPU entry.
770 2018-07-11  Richard Biener  <rguenther@suse.de>
772         PR debug/86457
773         * dwarf2out.c (init_sections_and_labels): Use
774         output_asm_line_debug_info consistently.
775         (dwarf2out_early_finish): Likewise.
776         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
777         type units.
779 2018-07-11  Richard Biener  <rguenther@suse.de>
781         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
782         Rework father_bb setting in a way to avoid propagating constants
783         multiple times on a loop body.
785 2018-07-10  Mark Wielaard  <mark@klomp.org>
787         PR debug/86459
788         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
790 2018-07-10  Richard Biener  <rguenther@suse.de>
792         * hash-map.h (hash_map::iterator::operator*): Return
793         references to key and value.
795 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
797         PR c++/86443
798         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
799         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
800         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
801         (gimplify_omp_for): For composite loops, move outer
802         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
803         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
804         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
805         TREE_LIST for both the original class iterator and the "last" helper
806         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
807         loop, remember has_decl_expr from outer composite loops for the
808         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
810 2018-07-09  Martin Sebor  <msebor@redhat.com>
812         PR middle-end/77357
813         PR middle-end/86428
814         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
815         accessing implicitly initialized array elements.
816         * expr.c (string_constant): Handle string initializers of
817         character arrays within aggregates.
818         * gimple-fold.c (fold_array_ctor_reference): Add argument.
819         Store element offset.  As a special case, handle zero size.
820         (fold_nonarray_ctor_reference): Same.
821         (fold_ctor_reference): Add argument.  Store subobject offset.
822         * gimple-fold.h (fold_ctor_reference): Add argument.
824 2018-07-09  Paul Koning  <ni1d@arrl.net>
826         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
827         (pdp11_insn_cost): New function.
828         (pdp11_md_asm_adjust): New function.
829         (TARGET_INVALID_WITHIN_DOLOOP): Define.
830         (pdp11_rtx_costs): Update to match machine better.
831         (output_addr_const_pdp11): Correct format mismatch warnings.
832         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
833         * config/pdp11/pdp11.md: General change to add base_cost and/or
834         length attributes for use by new pdp11_insn_cost function.
835         (MIN_BRANCH): Correct definition.
836         (MIN_SOB): Ditto.
837         (doloop_end): Use standard pattern name for looping pattern.
838         (doloop_end_nocc): New.
839         (movsf): Add another constraint alternative.
840         (zero_extendqihi2): Add constraint alternatives for not in place
841         extend.
842         (zero_extendhisi2): Remove.
843         (shift patterns): Add CC handling variants.
844         (bswaphi2): New.
845         (bswapsi2): New.
846         (rothi3): New.
847         (define_peephole2): New peephole to recognize mov that sets CC for
848         subsequent test.
850 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
852         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
853         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
854         wi::add.
856 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
858         PR c/86420
859         * real.c (real_nextafter): Return true if result is denormal.
861 2018-07-09  Martin Liska  <mliska@suse.cz>
863         * common.opt: Add back wrongly removed attribute.
865 2018-07-09  Richard Biener  <rguenther@suse.de>
867         PR debug/86413
868         * dwarf2out.c (gen_block_die): For an early generated DIE
869         always output high/low PC attributes.
871 2018-07-09  Tom de Vries  <tdevries@suse.de>
873         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
874         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
875         onto VAR_DECL with abstract origin.
877 2018-07-07  Jim Wilson  <jimw@sifive.com>
879         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
881 2018-07-07  Tom de Vries  <tdevries@suse.de>
883         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
885 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
887         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
888         overflow_type.
889         (combine_bound): Use wide-int overflow calculation instead of
890         rolling our own.
891         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
892         overflow_type.
893         * fold-const.c (int_const_binop_2): Same.
894         (extract_muldiv_1): Same.
895         (fold_div_compare): Same.
896         (fold_abs_const): Same.
897         * match.pd: Same.
898         * poly-int.h (add): Same.
899         (sub): Same.
900         (neg): Same.
901         (mul): Same.
902         * predict.c (predict_iv_comparison): Same.
903         * profile-count.c (slow_safe_scale_64bit): Same.
904         * simplify-rtx.c (simplify_const_binary_operation): Same.
905         * tree-chrec.c (tree_fold_binomial): Same.
906         * tree-data-ref.c (split_constant_offset_1): Same.
907         * tree-if-conv.c (idx_within_array_bound): Same.
908         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
909         * tree-ssa-phiopt.c (minmax_replacement): Same.
910         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
911         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
912         * vr-values.c (vr_values::adjust_range_with_scev): Same.
913         * wide-int.cc (wi::add_large): Same.
914         (wi::mul_internal): Same.
915         (wi::sub_large): Same.
916         (wi::divmod_internal): Same.
917         * wide-int.h: Change overflow type to overflow_type for neg, add,
918         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
919         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
920         mul_internal, divmod_internal.
921         (overflow_type): New enum.
922         (accumulate_overflow): New.
924 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
926         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
927         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
929 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
931         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
932         argument is checked for zero before entering loop, avoid checking again.
934 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
936         * gimplify.h (generic_expr_could_trap_p): Set as global function.
937         * gimplify.h (generic_expr_could_trap_p): Likwise.
938         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
940 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
942         PR tree-optimization/86401
943         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
944         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
945         (fold_bit_and_mask): ... here.  New helper function for match.pd.
946         * fold-const.h (fold_bit_and_mask): Declare.
947         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
949 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
951         PR target/86324
952         * target.def (translate_mode_attribute): New hook.
953         * targhooks.h (default_translate_mode_attribute): Declare.
954         * targhooks.c (default_translate_mode_attribute): New function.
955         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
956         * doc/tm.texi: Regenerate.
957         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
958         (rs6000_translate_mode_attribute): New function.
960 2018-07-06  Paul Koning  <ni1d@arrl.net>
962         * doc/md.texi (define_split): Document DONE and FAIL.
963         (define_peephole2): Ditto.
965 2018-07-05  Jeff Law  <law@redhat.com>
967         PR tree-optimization/86010
968         * tree-ssa-dse.c (compute_trims): More aggressively trim at
969         both the head and tail of mem* and str* calls.
971 2018-07-05  Jim Wilson  <jimw@sifive.com>
973         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
975 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
977         * config/aarch64/aarch64-simd.md: correct flags text for
978         MIN_EXPR replacement.
980 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
982         * configure: Regenerated.
984 2018-07-05  Carl Love  <cel@us.ibm.com>
986         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
987         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
988         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
989         VSX_BUILTIN_DOUBLEL_V4SF.
991 2018-07-05  Martin Sebor  <msebor@redhat.com>
993         PR c++/86400
994         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
995         than its domain to compute its the upper bound of a char array.
997 2018-07-05  Nathan Sidwell  <nathan@acm.org>
999         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1000         * doc/cpp.texi: Update comment.
1001         * doc/tm.texi: Rebuilt.
1002         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1003         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1004         * doc/extend.texi (Backwards Compatibility): Clarify it is system
1005         headers affected by extern "C".
1006         * system.h: Poison NO_IMPLICIT_EXTERN_C.
1007         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1008         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1009         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1010         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1011         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1012         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1013         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1014         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1015         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1016         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1017         config/sparc/sp64-elf.h, config/spu/spu.h,
1018         config/stormy16/stormy16.h, config/v850/v850.h,
1019         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1020         define NO_IMPLICIT_EXTERN_C.
1021         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1023 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1025         PR target/84711
1026         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1027         instead of GET_MODE_SIZE when comparing Units.
1029 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1031         PR target/84711
1032         * rtlanal.c (set_noop_p): Constrain on mode change,
1033         include hard-reg-set.h
1035 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1037         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1039 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
1041         Revert
1042         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1044         PR sanitizer/84250
1045         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1046         libasan.
1047         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1049 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1051         PR sanitizer/84250
1052         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1053         libasan.
1054         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1056 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
1058         PR middle-end/86380
1059         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1061 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
1063         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1064         neg_*_op* variables.
1066 2018-07-04  Martin Liska  <mliska@suse.cz>
1068         * tree-switch-conversion.c: Define
1069         max_ratio_for_speed and max_ratio_for_size constants.
1071 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1072             Martin Liska  <mliska@suse.cz>
1074         PR middle-end/66240
1075         PR target/45996
1076         PR c/84100
1077         * common.opt: Rename align options with 'str_' prefix.
1078         * common/config/i386/i386-common.c (set_malign_value): New
1079         function.
1080         (ix86_handle_option): Use it to set -falign-* options/
1081         * config/aarch64/aarch64-protos.h (struct tune_params): Change
1082         type from int to string.
1083         * config/aarch64/aarch64.c: Update default values from int
1084         to string.
1085         * config/alpha/alpha.c (alpha_override_options_after_change):
1086         Likewise.
1087         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1088         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1089         max skip conditionally.
1090         * config/i386/freebsd.h (SUBALIGN_LOG): New.
1091         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1092         max skip conditionally.
1093         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1094         max skip conditionally.
1095         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1096         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1097         max skip conditionally.
1098         * config/i386/i386.c (struct ptt): Change type from int to
1099         string.
1100         (ix86_default_align): Set default values.
1101         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1102         max skip conditionally.
1103         * config/i386/iamcu.h (SUBALIGN_LOG): New.
1104         (ASM_OUTPUT_MAX_SKIP_ALIGN):
1105         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1106         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1107         max skip conditionally.
1108         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1109         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1110         * config/i386/x86-64.h (SUBALIGN_LOG): New.
1111         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1112         max skip conditionally.
1113         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1114         * config/ia64/ia64.c (ia64_option_override): Set default values
1115         for alignment options.
1116         * config/m68k/m68k.c: Handle new str_align_* options.
1117         * config/mips/mips.c (mips_set_compression_mode): Change
1118         type of constants.
1119         (mips_option_override): Set default values for options.
1120         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1121         Likewise.
1122         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1123         Likewise.
1124         * config/rx/rx.c (rx_option_override): Likewise.
1125         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1126         (LABEL_ALIGN): Use align_labels_log.
1127         (LOOP_ALIGN): Use align_loops_align.
1128         * config/s390/s390.c (s390_asm_output_function_label): Use new
1129         macros.
1130         * config/sh/sh.c (sh_override_options_after_change):
1131         Change type of constants.
1132         * config/spu/spu.c (spu_sched_init): Likewise.
1133         * config/sparc/sparc.c (sparc_option_override): Set default
1134         values for options.
1135         * config/visium/visium.c (visium_option_override): Likewise.
1136         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1137         emit p2align format with last argument if it's not needed.
1138         * doc/invoke.texi: Document extended format of -falign-*.
1139         * final.c: Use align_labels alignment.
1140         * flags.h (struct target_flag_state): Change type to use
1141         align_flags.
1142         (struct align_flags_tuple): New.
1143         (struct align_flags): Likewise.
1144         (align_loops_log): Redefine macro to use new types.
1145         (align_loops_max_skip): Redefine macro to use new types.
1146         (align_jumps_log): Redefine macro to use new types.
1147         (align_jumps_max_skip): Redefine macro to use new types.
1148         (align_labels_log): Redefine macro to use new types.
1149         (align_labels_max_skip): Redefine macro to use new types.
1150         (align_functions_log): Redefine macro to use new types.
1151         (align_loops): Redefine macro to use new types.
1152         (align_jumps): Redefine macro to use new types.
1153         (align_labels): Redefine macro to use new types.
1154         (align_functions): Redefine macro to use new types.
1155         (align_functions_max_skip): Redefine macro to use new types.
1156         (align_loops_value): New macro.
1157         (align_jumps_value): New macro.
1158         (align_labels_value): New macro.
1159         (align_functions_value): New macro.
1160         * function.c (invoke_set_current_function_hook): Propagate
1161         alignment values from flags to global variables default in
1162         topleev.h.
1163         * ipa-icf.c (sem_function::equals_wpa): Use
1164         cl_optimization_option_eq instead of memcmp.
1165         * lto-streamer.h (cl_optimization_stream_out): Support streaming
1166         of string types.
1167         (cl_optimization_stream_in): Likewise.
1168         * optc-save-gen.awk: Support strings in cl_optimization.
1169         * opth-gen.awk: Likewise.
1170         * opts.c (finish_options): Remove error checking of invalid
1171         value ranges.
1172         (MAX_CODE_ALIGN): Remove.
1173         (MAX_CODE_ALIGN_VALUE): Likewise.
1174         (parse_and_check_align_values): New function.
1175         (check_alignment_argument): Likewise.
1176         (common_handle_option): Use check_alignment_argument.
1177         * opts.h (parse_and_check_align_values): Declare.
1178         * toplev.c (init_alignments): Remove.
1179         (read_log_maxskip): New.
1180         (parse_N_M): Likewise.
1181         (parse_alignment_opts): Likewise.
1182         (backend_init_target): Remove usage of init_alignments.
1183         * toplev.h (parse_alignment_opts): Declare.
1184         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1185         argument.
1186         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1187         * tree.c (cl_option_hasher::equal): New.
1188         * varasm.c: Use new global macros.
1190 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1192         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1193         Use a simpler align directive also if MAXSKIP = ALIGN-1.
1194         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1195         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1196         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1197         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1198         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1199         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1200         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1201         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1202         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1203         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1204         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1206 2018-07-04  Martin Liska  <mliska@suse.cz>
1207             Jonathan Wakely  <jwakely@redhat.com>
1209         * coverage.c: Use correct type.
1210         * doc/invoke.texi: Language correction.
1212 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1214         PR target/85620
1215         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1216         ENDBRANCH for non-tail call which may return via indirect branch.
1217         * doc/extend.texi: Document indirect_return attribute.
1219 2018-07-03  Martin Sebor  <msebor@redhat.com>
1221         PR tree-optimization/86274
1222         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1223         precondition.
1224         (format_floating): Correct handling of infinities and NaNs.
1226 2018-07-03  Martin Sebor  <msebor@redhat.com>
1228         * print-tree.c (print_real_cst): New function.
1229         (print_node_brief): Call it.
1230         (print_node): Ditto.
1232 2018-07-03  Jeff Law  <law@redhat.com>
1234         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1235         into a single pattern.
1237         * config/h8300/h8300.md (ors code_iterator): New.
1238         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1239         a single pattern and single splitter.
1240         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1241         (iorqi3_1, xorqi3_1): Likewise.
1242         (iorqi3, xorqi3 expanders): Similarly.
1244         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1245         (movmd_internal) into a single pattern using the P mode iterator.
1246         (movmd splitters): Similarly.
1247         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1248         (movsd splitters): Similarly.
1250         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1251         ADDB, ADDW and ADDL into a single ADD attribute which selects the
1252         right table based on the size of the operand.
1253         * config/h8300/h8300.md (length_table): Corresponding changes. All
1254         references to "addb", "addw" and "addl" changed to "add".
1255         (btst patterns): Merge two variants into a single pattern.
1256         (tstqi, tsthi): Likewise.
1257         (addhi3_incdec, addsi3_incdec): Likewise.
1258         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1259         (mulhi3, mulsi3): Likewise.
1260         (udivhi3, udivsi3): Likewise.
1261         (divhi3, divsi3): Likewise.
1262         (andorqi3, andorhi3, andorsi3): Likewise.
1264 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
1266         PR target/85694
1267         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1268         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1270 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1272         PR tree-optimization/85694
1273         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1274         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1275         UNSPEC_URHADD.
1276         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1277         (<u>avg<mode>3_ceil): New patterns.
1279 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
1281         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1282         scan-tree-dump directive.
1283         * gcc.dg/vect/slp-perm-2.c: Likewise.
1284         * gcc.dg/vect/slp-perm-3.c: Likewise.
1285         * gcc.dg/vect/slp-perm-5.c: Likewise.
1286         * gcc.dg/vect/slp-perm-6.c: Likewise.
1287         * gcc.dg/vect/slp-perm-7.c: Likewise.
1288         * gcc.dg/vect/slp-perm-8.c: Likewise.
1290 2018-07-03  Marek Polacek  <polacek@redhat.com>
1292         PR middle-end/86202
1293         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1295 2018-07-03  Richard Biener  <rguenther@suse.de>
1297         PR ipa/86389
1298         * tree-ssa-structalias.c (find_func_clobbers): Properly
1299         handle indirect calls.
1301 2018-07-03  Jeff Law  <law@redhat.com>
1303         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1304         (shifts): New code iterator.
1305         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1306         expander.  Fix HImode handling on H8/SX.
1307         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1308         (subqi3, subhi3, subsi3 expanders): Likewise.
1309         (andqi3, andhi3, andsi3 expanders): Likewise.
1310         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1311         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1312         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1313         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1314         (zero_extendqihi2, zero_extendqisi2): Likewise.
1315         (extendqihi2, extendqisi2): Likewise.
1316         (rotlqi3, rotlhi3, rotlsi3): Likewise.
1317         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1318         (rotlqi3_1, rotlhi3_1): Likewise.
1319         (logicalhi3_sn, logicalsi3_sn): Likewise.
1320         (logicalhi3, logicalsi3): Likewise.
1322 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1324         * tree-vect-patterns.c (vect_recog_rotate_pattern)
1325         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1326         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1327         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1328         type to append_pattern_def_seq instead of creating a stmt_vec_info
1329         directly.
1330         (build_mask_conversion): Likewise.  Remove vinfo argument.
1331         (vect_add_conversion_to_patterm): Likewise, renaming to...
1332         (vect_add_conversion_to_pattern): ...this.
1333         (vect_recog_mask_conversion_pattern): Update call to
1334         build_mask_conversion.  Pass the vector type to
1335         append_pattern_def_seq here too.
1336         (vect_recog_gather_scatter_pattern): Update call to
1337         vect_add_conversion_to_pattern.
1339 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1341         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1342         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1343         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1344         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1345         STMT_VINFO_PATTERN_DEF_SEQ to null here.
1346         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1347         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1348         append_pattern_def_seq instead of new_pattern_def_seq.
1349         (vect_recog_divmod_pattern): Do both of the above.
1350         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1351         is null.
1353 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1355         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1356         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1357         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1358         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1359         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1360         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1361         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1362         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1363         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1364         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1365         parameter with a single stmt_vec_info.
1366         (vect_recog_func_ptr): Likewise.
1367         (vect_recog_gather_scatter_pattern): Likewise, folding in...
1368         (vect_try_gather_scatter_pattern): ...this.
1369         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1370         the stmt_vec_info of the statement to be matched.  Don't clear
1371         STMT_VINFO_RELATED_STMT.
1372         (vect_pattern_recog): Update call accordingly.
1374 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1376         PR tree-optimization/85694
1377         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1378         (uavgM3_ceil): Document new optabs.
1379         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1380         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1381         functions.
1382         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1383         (savg_ceil_optab): New optabs.
1384         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1385         (vect_vect_recog_func_ptrs): Add it.
1386         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1387         constant directly from the associated lhs.
1389 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1391         * tree-vect-patterns.c (vect_split_statement): New function.
1392         (vect_convert_input): Use it to try to split an existing cast.
1394 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1396         * poly-int.h (print_hex): New function.
1397         * dumpfile.h (dump_dec, dump_hex): Declare.
1398         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1399         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1400         min_input_precision, operation_precision and operation_sign.
1401         * tree-vect-patterns.c (vect_get_range_info): New function.
1402         (vect_same_loop_or_bb_p, vect_single_imm_use)
1403         (vect_operation_fits_smaller_type): Delete.
1404         (vect_look_through_possible_promotion): Add an optional
1405         single_use_p parameter.
1406         (vect_recog_over_widening_pattern): Rewrite to use new
1407         stmt_vec_info infomration.  Handle one operation at a time.
1408         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1409         (vect_truncatable_operation_p, vect_set_operation_type)
1410         (vect_set_min_input_precision): New functions.
1411         (vect_determine_min_output_precision_1): Likewise.
1412         (vect_determine_min_output_precision): Likewise.
1413         (vect_determine_precisions_from_range): Likewise.
1414         (vect_determine_precisions_from_users): Likewise.
1415         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1416         (vect_vect_recog_func_ptrs): Put over_widening first.
1417         Add cast_forwprop.
1418         (vect_pattern_recog): Call vect_determine_precisions.
1420 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1422         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1423         statements that have been replaced by further pattern statements.
1424         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1426 2018-07-03  Richard Biener  <rguenther@suse.de>
1428         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1429         always set *dt.  Dump vectype in vectype overload.
1430         * dumpfile.h (dump_gimple_expr): New function.
1431         (dump_gimple_expr_loc): Likewise.
1432         * dumpfile.c (dump_gimple_expr): New function.
1433         (dump_gimple_expr_loc): Likewise.
1435 2018-07-02  Jeff Law  <law@redhat.com>
1437         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1438         the H8/300, H8/300H and H8/S variants into a single pattern.
1439         (movhi_h8300, movqi_h8300hs): Similarly.
1440         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1441         (QHI mode iterator): New.
1443         * config/h8300/h8300.md: Remove trailing whitespace.
1445 2018-07-02  Jim Wilson  <jimw@sifive.com>
1447         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1448         instead of emit_insn for interrupt returns.
1449         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1450         (riscv_sret, riscv_uret): Likewise.
1452 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
1454         * pretty-print.c (selftest::test_pp_format): Move save and restore
1455         of quotes to class auto_fix_quotes, and add an instance.
1456         * selftest.c: Include "intl.h".
1457         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1458         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1459         * selftest.h (selftest::auto_fix_quotes): New class.
1461 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
1463         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1464         (aarch64_sve_prepare_conditional_op): Remove.
1465         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1466         Allow aarch64_simd_reg_or_zero as select operand; remove
1467         the aarch64_sve_prepare_conditional_op call.
1468         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1469         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1470         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1471         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1472         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1473         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1474         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1475         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1476         and a splitters to match all of the *_any patterns.
1477         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1479         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1480         (SVE_COND_FP_BINARY_REV): Remove.
1481         (sve_int_op_rev, sve_fp_op_rev): New.
1482         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1483         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1484         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1485         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1486         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1487         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1488         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1489         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1490         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1492         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1493         Remove match_dup 1 from the inner unspec.
1494         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1496         * config/aarch64/aarch64.md (movprfx): New attr.
1497         (length): Default movprfx to 8.
1498         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1499         (*madd<SVE_I>, *msub<SVE_I): Likewise.
1500         (*<su>mul<SVE_I>3_highpart): Likewise.
1501         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1502         (*v<ASHIFT><SVE_I>3): Likewise.
1503         (*<su><MAXMIN><SVE_I>3): Likewise.
1504         (*<su><MAXMIN><SVE_F>3): Likewise.
1505         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1506         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1507         (*div<SVE_F>4): Likewise.
1509 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
1511         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1512         in dump string.
1514 2018-07-02  Richard Biener  <rguenther@suse.de>
1516         PR tree-optimization/86363
1517         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1518         memset argument refers to a non-variable address.
1520 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
1522         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1523         {PLUS,MINUS}_EXPR code to...
1524         (adjust_symbolic_bound): ...here,
1525         (combine_bound): ...here,
1526         (set_value_range_with_overflow): ...and here.
1528 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
1530         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1531         code...
1532         (extract_range_from_abs_expr): ...here.
1534 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
1536         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1537         -fno-omit-frame-pointer when not optimizing.
1539 2018-07-02  Martin Liska  <mliska@suse.cz>
1541         PR ipa/86279
1542         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1543         (propagate_nothrow): Likewise.
1545 2018-07-02  Martin Liska  <mliska@suse.cz>
1547         PR ipa/86323
1548         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1550 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
1552         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1553         function in r262149, changing "loc" param from source_location to
1554         const dump_location_t &.
1555         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1556         declaration, as above.
1558 2018-07-01  Paul Koning  <ni1d@arrl.net>
1560         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1561         -munit-asm, -mgnu-asm, -mdec-asm.
1562         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1563         (pdp11_output_labelref): New.
1564         (pdp11_output_def): New.
1565         (pdp11_output_addr_vec_elt): New.
1566         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
1567         %# and %@ format codes.
1568         (pdp11_option_override): New.
1569         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1570         (pdp11_output_ident): New.
1571         (pdp11_asm_named_section): New.
1572         (pdp11_asm_init_sections): New.
1573         (pdp11_file_start): New.
1574         (pdp11_file_end): New.
1575         (output_ascii): Use .ascii/.asciz for -mdec-asm.
1576         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
1577         %o, like %c but octal.
1578         (pdp11_option_override): New.
1579         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1580         -mdec-asm.
1581         (DATA_SECTION_ASM_OP): Ditto.
1582         (READONLY_DATA_SECTION_ASM_OP): New.
1583         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1584         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1585         (ASM_OUTPUT_LABELREF): Ditto.
1586         (ASM_OUTPUT_DEF): Ditto.
1587         (ASM_OUTPUT_EXTERNAL): New.
1588         (ASM_OUTPUT_SOURCE_FILENAME): New.
1589         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1590         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1591         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
1592         %# and %@ format codes.
1593         * config/pdp11/pdp11.opt (mgnu-asm): New.
1594         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1595         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1596         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1598 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
1600         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1601         dereferencing path[] beyond its length.
1602         (debug_path): New.
1603         (debug_all_paths): New.
1604         (rewire_first_differing_edge): New.
1605         (adjust_paths_after_duplication): New.
1606         (duplicate_thread_path): Call adjust_paths_after_duplication.
1607         Add new argument.
1608         (thread_through_all_blocks): Add new argument to
1609         duplicate_thread_path.
1611 2018-06-30  Jim Wilson  <jimw@sifive.com>
1613         * config/riscv/predicates.md (p2m1_shift_operand): New.
1614         (high_mask_shift_operand): New.
1615         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1616         pattern using p2m1_shift_operand.
1617         (lshsi3_zero_extend_3+2): New combiner pattern using
1618         high_mask_shift_operand.
1620 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1622         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1623         split out from...
1624         (vect_recog_rotate_pattern): ...here.
1625         (vect_convert_input): Try to insert casts of invariants in the
1626         preheader.
1627         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1628         preheader to be empty.
1630 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1632         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1633         vector type.  If given, install it in the new statement's
1634         STMT_VINFO_VECTYPE.
1635         (vect_element_precision): New function.
1636         (vect_unpromoted_value): New struct.
1637         (vect_unpromoted_value::vect_unpromoted_value): New function.
1638         (vect_unpromoted_value::set_op): Likewise.
1639         (vect_look_through_possible_promotion): Likewise.
1640         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1641         (vect_widened_op_tree, vect_convert_input): Likewise.
1642         (vect_convert_inputs, vect_convert_output): Likewise.
1643         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1644         to handle the optional cast of the multiplication result and
1645         vect_widened_op_tree to detect the widened multiplication itself.
1646         Do not require the input and output of promotion casts to have
1647         the same sign, but base the signedness of the operation on the
1648         input rather than the result.  If the pattern includes two
1649         promotions, check that those promotions have the same sign.
1650         Do not restrict the MULT_EXPR handling to a double-width result;
1651         handle quadruple-width results and wider.  Use vect_convert_inputs
1652         to convert the inputs to the common type.
1653         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
1654         to handle the optional cast of the ABS result.  Also allow a sign
1655         change or a sign extension between the ABS and MINUS.
1656         Use vect_widened_op_tree to detect the widened subtraction and use
1657         vect_convert_inputs to convert the inputs to the common type.
1658         (vect_handle_widen_op_by_const): Delete.
1659         (vect_recog_widen_op_pattern): New function.
1660         (vect_recog_widen_mult_pattern): Use it.
1661         (vect_recog_widen_shift_pattern): Likewise.
1662         (vect_recog_widen_sum_pattern): Use
1663         vect_look_through_possible_promotion to handle the promoted
1664         PLUS_EXPR operand.
1666 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1668         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1669         the containing gimple_seq *.
1670         * gimple-iterator.h (gsi_for_stmt): Declare it.
1671         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1672         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1673         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1674         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1675         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1676         checks.
1677         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1678         split out from...
1679         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
1680         statement being replaced is part of an existing pattern
1681         definition sequence, inserting the new pattern statements before
1682         the original one.
1683         (vect_pattern_recog_1): Don't return a bool.  If the statement
1684         is already part of a pattern, instead apply pattern matching
1685         to the pattern definition statements.  Don't clear the
1686         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1687         (vect_pattern_recog): Don't break after the first match;
1688         continue processing the pattern definition statements instead.
1689         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1691 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1693         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1694         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1695         (vect_recog_widen_sum_pattern): Use it.
1697 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1699         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1700         phi is not a pattern statement and has not been replaced by
1701         a pattern statement.
1702         * tree-vect-patterns.c (type_conversion_p): Don't check
1703         STMT_VINFO_IN_PATTERN_P.
1704         (vect_recog_vector_vector_shift_pattern): Likewise.
1705         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1706         the pattern statement rather than the original statement; check
1707         directly for a WIDEN_MULT_EXPR here.
1708         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1709         vect_is_simple_use to return the pattern statement rather
1710         than the original statement; use is_pattern_stmt_p to check
1711         for such a pattern statement.
1712         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1713         to return the pattern statement rather than the original statement;
1714         don't do the same transformation here.
1715         (vect_is_simple_use): If the defining statement has been replaced
1716         by a pattern statement, return the pattern statement instead.
1717         Remove the corresponding (local) transformation from the vectype
1718         overload.
1720 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1722         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1723         end and default to null.
1724         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1725         (vectorizable_reduction): Update calls accordingly, dropping the
1726         gimple ** argument if the passed-back statement isn't needed.
1727         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1728         (vect_recog_rotate_pattern): Likewise.
1729         (vect_recog_mask_conversion_pattern): Likewise.
1730         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1731         (vect_mask_constant_operand_p): Likewise.
1732         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1733         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1734         (get_group_load_store_type, get_load_store_type): Likewise.
1735         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1736         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1737         (vectorizable_conversion, vectorizable_assignment): Likewise.
1738         (vectorizable_shift, vectorizable_operation): Likewise.
1739         (vectorizable_store, vect_is_simple_cond): Likewise.
1740         (vectorizable_condition, vectorizable_comparison): Likewise.
1741         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1742         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1743         and move it to the end.  Cope with null def_stmt_outs.
1745 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1747         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1749 2018-06-29  Jeff Law  <law@redhat.com>
1751         * config/v850/v850.c (v850_legitimate_address_p): Handle large
1752         displacements for TARGET_V850E2V3 and newer.
1753         (TARGET_LRA_P): Remove.  Defaults to LRA now.
1754         * config/v850/v850.md (sign23byte_load): Remove.
1755         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1756         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1758 2018-06-29  Martin Liska  <mliska@suse.cz>
1760         PR lto/85759
1761         * coverage.c (coverage_init): Mangle full path name.
1762         * doc/invoke.texi: Document the change.
1763         * gcov-io.c (mangle_path): New.
1764         * gcov-io.h (mangle_path): Likewise.
1765         * gcov.c (mangle_name): Use mangle_path for path mangling.
1767 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1769         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1770         if starting source register is not even.
1772 2018-06-29  Martin Liska  <mliska@suse.cz>
1774         PR tree-optimization/86263
1775         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1776         Make edge redirection.
1778 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
1780         * dumpfile.c (dump_loc): Add indentation based on scope depth.
1781         (dump_scope_depth): New variable.
1782         (get_dump_scope_depth): New function.
1783         (dump_begin_scope): New function.
1784         (dump_end_scope): New function.
1785         * dumpfile.h (get_dump_scope_depth): New declaration.
1786         (dump_begin_scope): New declaration.
1787         (dump_end_scope): New declaration.
1788         (class auto_dump_scope): New class.
1789         (AUTO_DUMP_SCOPE): New macro.
1790         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1791         AUTO_DUMP_SCOPE.
1793 2018-06-29  Richard Biener  <rguenther@suse.de>
1795         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1796         compute_all_dependences succeeds.
1797         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1798         exceed --param loop-max-datarefs-for-datadeps.
1800 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
1802         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1804 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
1806         PR target/86348
1807         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1808         alternative 0 in preferred_for_speed attribute.
1810 2018-06-28  Paul Koning  <ni1d@arrl.net>
1812         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1813         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1814         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1815         * config/pdp11/pdp11.md: Correct "length" attribute calculation
1816         for shift insn patterns.
1818 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
1820         * cgraph.c (cgraph_node::get_body): Replace assignments to
1821         "dump_file" with calls to set_dump_file.
1822         * dumpfile.c (alt_dump_file): Make static, and group with...
1823         (alt_flags): ...this definition.
1824         (dumps_are_enabled): New variable.
1825         (refresh_dumps_are_enabled): New function.
1826         (set_dump_file): New function.
1827         (set_alt_dump_file): New function.
1828         (gcc::dump_manager::dump_start): Replace assignments to
1829         "dump_file" and "alt_dump_file" with calls to set_dump_file and
1830         set_alt_dump_file.
1831         (gcc::dump_manager::dump_finish): Likewise.
1832         * dumpfile.h (alt_dump_file): Delete decl.
1833         (dumps_are_enabled): New variable decl.
1834         (set_dump_file): New function decl.
1835         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1836         global.
1837         * tree-nested.c (lower_nested_functions): Replace assignments to
1838         "dump_file" with calls to set_dump_file.
1840 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1842         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1843         goto_locus of each outgoing edge of each basic block.
1845 2018-06-28  Richard Biener  <rguenther@suse.de>
1847         * dwarf2out.c (decl_scope_table): Remove.
1848         (push_decl_scope): Likewise.
1849         (pop_decl_scope): Likewise.
1850         (gen_type_die_for_member): Do not call push/pop_decl_scope.
1851         (gen_struct_or_union_type_die): Likewise.
1852         (gen_tagged_type_die): Likewise.
1853         (dwarf2out_init): Do not initialize decl_scope_table.
1854         (dwarf2out_c_finalize): Do not free it.
1856 2018-06-28  Richard Biener  <rguenther@suse.de>
1858         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1859         deciding whether to not re-use a DIE.
1861 2018-06-28  Richard Biener  <rguenther@suse.de>
1863         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1864         DW_AT_abstract_origin attribute.
1866 2018-06-28  Martin Liska  <mliska@suse.cz>
1868         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1869         Use newly introduced constants.
1870         * tree-switch-conversion.h (struct jump_table_cluster):
1871         Define max_ratio_for_size and max_ratio_for_speed.
1873 2018-06-28  Martin Liska  <mliska@suse.cz>
1875         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1876         Add new checking assert to catch invalid state.
1877         (jump_table_cluster::can_be_handled): Handle single case
1878         clusters.
1879         (jump_table_cluster::is_beneficial): Bail out for such case.
1880         (bit_test_cluster::find_bit_tests):
1881         Add new checking assert to catch invalid state.
1882         (bit_test_cluster::can_be_handled): Handle single case
1883         clusters.
1884         (bit_test_cluster::is_beneficial): Bail out for such case.
1885         (switch_decision_tree::analyze_switch_statement):
1886         Fix comment.
1888 2018-06-28  Martin Liska  <mliska@suse.cz>
1890         * common.opt: Introduce -completion option.
1891         * gcc.c (driver_handle_option): Handle it.
1892         (driver::main): Print completions if completion
1893         is set.
1894         * opt-suggestions.c (option_proposer::get_completions):
1895         New function.
1896         (option_proposer::suggest_completion): Likewise.
1897         (option_proposer::find_param_completions): Likewise.
1898         (verify_autocompletions): Likewise.
1899         (test_completion_valid_options): Likewise.
1900         (test_completion_valid_params): Likewise.
1901         (in_completion_p): Likewise.
1902         (empty_completion_p): Likewise.
1903         (test_completion_partial_match): Likewise.
1904         (test_completion_garbage): Likewise.
1905         (opt_proposer_c_tests): Likewise.
1906         * opt-suggestions.h: Declare new functions.
1907         * opts.c (common_handle_option): Handle OPT__completion_.
1908         * selftest-run-tests.c (selftest::run_tests): Add
1909         opt_proposer_c_tests.
1910         * selftest.c (assert_str_startswith): New.
1911         * selftest.h (assert_str_startswith): Likewise.
1912         (opt_proposer_c_tests): New.
1913         (ASSERT_STR_STARTSWITH): Likewise.
1915 2018-06-28  Martin Liska  <mliska@suse.cz>
1917         * Makefile.in: Add opt-suggestions.o.
1918         * gcc-main.c: Include opt-suggestions.h.
1919         * gcc.c (driver::driver): Likewise.
1920         (driver::~driver): Remove m_option_suggestions.
1921         (driver::build_option_suggestions): Moved to option_proposer.
1922         (driver::suggest_option): Likewise.
1923         (driver::handle_unrecognized_options): Use option_proposer.
1924         * gcc.h (class driver): Add new memver m_option_proposer.
1925         * opt-suggestions.c: New file.
1926         * opt-suggestions.h: New file.
1928 2018-06-28  Martin Liska  <mliska@suse.cz>
1930         * vec.h (class auto_string_vec): New (moved from auto_argvec).
1931         (auto_string_vec::~auto_string_vec): Likewise.
1933 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1935         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1936         prevent_decl_creation_for_types fields up and add reset_location field.
1937         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1938         statement if id->reset_location is true.
1939         (copy_edges_for_bb): Do not set goto_locus on the new edges if
1940         id->reset_location is true.
1941         (copy_phis_for_bb): Force input_location on the arguments if
1942         id->reset_location is true.
1943         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1944         is set on the function to be inlined.
1946 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
1948         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1950 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
1952         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1953         registers for Pmode.
1954         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1955         hard registers for the clobbered pseudo.
1957 2018-06-27  Paul Koning  <ni1d@arrl.net>
1959         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1960         mutually exclusive options.
1961         * config/pdp11/constraints.md (h): New constraint.
1962         (O): Update definition to match shift code generation.
1963         (D): New constraint.
1964         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1965         (CCFP): Remove.
1966         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1967         function.
1968         (output_jump): Change arguments.
1969         (pdp11_fixed_cc_regs): New function.
1970         (pdp11_cc_mode): Ditto.
1971         (pdp11_expand_shift): Ditto.
1972         (pdp11_assemble_shift): Ditto.
1973         (pdp11_small_shift): Ditto.
1974         (pdp11_branch_cost): Remove.
1975         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1976         from output.
1977         (pdp11_register_move_cost): Update for CC registers.
1978         (pdp11_rtx_costs): Add case for LSHIFTRT.
1979         (pdp11_output_jump): Add CCNZ mode conditional branches.
1980         (notice_update_cc_on_set): Remove.
1981         (pdp11_cc_mode): New function.
1982         (simple_memory_operand): Correct pre/post decrement case.
1983         (no_side_effect_operand): New function.
1984         (pdp11_regno_reg_class): Add CC_REGS class.
1985         (pdp11_fixed_cc_regs): New function.
1986         (pdp11_small_shift): New function.
1987         (pdp11_expand_shift): New function to expand shift insns.
1988         (pdp11_assemble_shift): New function to output shifts.
1989         (pdp11_branch_cost): Remove.
1990         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1991         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1992         (WCHAR_TYPE): Ditto.
1993         (PTRDIFF_TYPE): Ditto.
1994         (ADJUST_INSN_LENGTH): New macro.
1995         (FIXED_REGISTERS): Add CC registers.
1996         (CALL_USED_REGISTERS): Ditto.
1997         (reg_class): Ditto.
1998         (REG_CLASS_NAMES): Ditto.
1999         (REG_CLASS_CONTENTS): Ditto.
2000         (SELECT_CC_MODE): Use new function.
2001         (TARGET_FLAGS_REGNUM): New macro.
2002         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2003         (cc0_reg_rtx): Remove.
2004         (CC_STATUS_MDEP): Remove.
2005         (CC_STATUS_MDEFP_INIT): Remove.
2006         (CC_IN_FPU): Remove.
2007         (NOTICE_UPDATE_CC): Remove.
2008         (REGISTER_NAMES): Add CC registers.
2009         (BRANCH_COST): Change to constant 1.
2010         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2011         handling.
2012         * config/pdp11/pdp11.opt (mbcopy): Remove.
2013         (mbcopy-builtin): Remove.
2014         (mbranch-cheap): Remove.
2015         (mbranch-expensive): Remove.
2016         * config/pdp11/predicates.md (expand_shift_operand): Update to
2017         match shift code generation.
2018         (ccnz_operator): New predicate.
2019         * doc/invoke.texi (PDP-11 Options): Remove deleted options
2020         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2021         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
2022         exclusive options.
2023         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
2024         description of O constraint.
2026 2018-06-27  Jeff Law  <law@redhat.com>
2027             Austin Law  <austinklaw@gmail.com>
2029         * config/v850/v850.md (addsi3_set_flags): New pattern.
2030         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2031         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2032         (zero_extendhisi2_v850_set_flags): Likewise.
2033         (zero_extendqisi2_v850_set_flags): Likewise.
2034         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2035         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2036         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2038         * config/v850/v850-protos.h (notice_update_cc): Remove.
2039         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2040         (v850_print_operand): Handle 'D' and "d".
2041         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2042         Add handling of arithmetic/logical operations compared against zero.
2043         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2044         Do not look at v850_compare_op, instead get mode from last argument.
2045         (v850_gen_compare): Remove
2046         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2047         after reload for prologue insns.
2048         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2049         patterns.
2050         (construct_save_jarl): Likewise.
2051         (TARGET_FLAGS_REGNUM): Define.
2052         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2053         (NOTICE_UPDATE_CC): Remove.
2054         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2055         than cc0.  Conditionalize on reload_completed.
2056         (cmpsi_insn, setfcc_insn): Likewise.
2057         (tst1 splitter): Turn into define_and_split which sets the flags
2058         after reload.
2059         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2060         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2061         (cstoresf4, cstoredf4): Clobber the flags.
2062         (cmpsi, cmpsf, cmpdf): Remove expanders.
2063         (setf_insn): Remove pattern.
2064         (addsi3): Turn into define_and_split which clobbers the flags after
2065         reload and a suitable pattern (addsi3_clobber_flags) for use after
2066         reload.
2067         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2068         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2069         (ashrsi3, ashrsi3_v850e2): Likewise.
2070         (bins): Clobber the flags.
2071         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2072         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2073         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2074         (call_value_internal_short, call_value_internal_long): Likewise.
2075         (callt_save_interrupt, callt_return_interrupt): Likewise.
2076         (save_interrupt, return_interrupt): Likewise.
2077         (callt_save_all_interrupt, save_all_interrupt): Likewise.
2078         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2079         (restore_all_interrupt, _restore_all_interrupt): Likewise.
2080         (All FP comparisons): Only allow after reload has completed.
2081         (trfsr): Likewise.
2082         (divh, divhu): Tweak output template.
2083         (branch_z_normal, branch_z_invert): Remove
2084         (branch_nz_normal, branch_nz_invert): Likewise.
2085         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2087         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2088         * config/v850/v850.c (notice_update_cc): Remove.
2089         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
2090         (CC_NO_CARRY): Likewise.
2091         (NOTICE_UPDATE_CC): Define to nothing.
2092         * config/v850/v850.md: Remove block comment on cc0 handling
2093         Remove "cc" attribute from all patterns.  Remove cc_status handling
2094         from all patterns.  Minor formatting fixes.
2096 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2098         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2099         (cortex-a76.cortex-a55): Likewise.
2100         * config/aarch64/aarch64-tune.md: Regenerate.
2101         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2102         cortex-a76.cortex-a55.
2104 2018-06-27  Jeff Law  <law@redhat.com>
2106         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2107         (MULTILIB_DIRNAMES): Similarly.
2109 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
2111         * gimple.h (gimple_return_retbnd): Delete.
2112         (gimple_return_set_retbnd): Likewise.
2113         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2114         gimple_return_set_retbnd.
2115         * gimple-pretty-print.c (dump_gimple_return): Remove call to
2116         gimple_return_retbnd and adjust.
2117         * tree-inline.h (struct copy_body_data): Remove retbnd field.
2118         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2119         Explicitly return NULL in a couple more cases.  Move assertion
2120         on debug statements and remove unreachable code.
2121         (reset_debug_binding): Do not test id->retbnd.
2122         (expand_call_inline): Do not set it.
2124 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2126         * configure.ac: Add --disable-gcov option.
2127         * configure: Regenerate.
2128         * Makefile.in: Honour @enable_gcov@.
2129         * doc/install.texi: Document --disable-gcov.
2131 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2133         * config/arm/arm-cpus.in (cortex-a76): New entry.
2134         (cortex-a76.cortex-a55): Likewise.
2135         * config/arm/arm-tables.opt: Regenerate.
2136         * config/arm/arm-tune.md: Likewise.
2137         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2138         * doc/invoke.texi (ARM Options): Document cortex-a76 and
2139         cortex-a76.cortex-a55.
2141 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
2143         PR target/85769
2144         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2146 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2148         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2149         comment.
2150         (EPILOGUE_USES): Likewise.
2152 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2154         * tree-inline.c (remap_location): New function extracted from...
2155         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
2156         (copy_phis_for_bb): ...here.  Call remap_location.
2157         (copy_cfg_body): Adjust call to copy_edges_for_bb.
2159 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2161         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2162         unaligned vsx for 16B memset.
2164 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
2166         PR target/86285
2167         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2168         ieee128_float_type_node to long_double_type_node unless
2169         TARGET_LONG_DOUBLE_128 is set.
2171 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
2173         * cfgloop.c (get_loop_location): Convert return type from
2174         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2175         by implicit construction from rtx_insn *, and using
2176         dump_user_location_t::from_function_decl for the fallback case.
2177         * cfgloop.h (get_loop_location): Convert return type from
2178         location_t to dump_user_location_t.
2179         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2180         dump_printf_loc to pass in a dump_location_t rather than a
2181         location_t, via the gimple stmt.
2182         * coverage.c (get_coverage_counts): Update calls to
2183         dump_printf_loc to pass in dump_location_t rather than a
2184         location_t.
2185         * doc/optinfo.texi (Dump types): Convert example of
2186         dump_printf_loc from taking "locus" to taking "insn".  Update
2187         description of the "_loc" calls to cover dump_location_t.
2188         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2189         "selftest.h".
2190         (dump_user_location_t::dump_user_location_t): New constructors,
2191         from gimple *stmt and rtx_insn *.
2192         (dump_user_location_t::from_function_decl): New function.
2193         (dump_loc): Make static.
2194         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2195         const dump_location_t &.
2196         (dump_generic_expr_loc): Delete.
2197         (dump_printf_loc): Convert param "loc" from location_t to
2198         const dump_location_t &.
2199         (selftest::test_impl_location): New function.
2200         (selftest::dumpfile_c_tests): New function.
2201         * dumpfile.h: Include "profile-count.h".
2202         (class dump_user_location_t): New class.
2203         (struct dump_impl_location_t): New struct.
2204         (class dump_location_t): New class.
2205         (dump_printf_loc): Convert 2nd param from source_location to
2206         const dump_location_t &.
2207         (dump_generic_expr_loc): Delete.
2208         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2209         const dump_location_t &.
2210         * gimple-fold.c (fold_gimple_assign): Update call to
2211         dump_printf_loc to pass in a dump_location_t rather than a
2212         location_t, via the gimple stmt.
2213         (gimple_fold_call): Likewise.
2214         * gimple-loop-interchange.cc
2215         (loop_cand::analyze_iloop_reduction_var): Update for change to
2216         check_reduction_path.
2217         (tree_loop_interchange::interchange): Update for change to
2218         find_loop_location.
2219         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2220         change in return-type of find_loop_location.
2221         (graphite_regenerate_ast_isl): Likewise.
2222         * graphite-optimize-isl.c (optimize_isl): Likewise.
2223         * graphite.c (graphite_transform_loops): Likewise.
2224         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2225         pass in a dump_location_t rather than a location_t, via the
2226         gimple stmt.
2227         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2228         * ipa.c (walk_polymorphic_call_targets): Likewise.
2229         * loop-unroll.c (report_unroll): Convert "locus" param from
2230         location_t to dump_location_t.
2231         (decide_unrolling): Update for change to get_loop_location's
2232         return type.
2233         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2234         location_t to dump_user_location_t.
2235         (grid_find_single_omp_among_assignments_1): Updates calls to
2236         dump_printf_loc to pass in a dump_location_t rather than a
2237         location_t, via the gimple stmt.
2238         (grid_parallel_clauses_gridifiable): Convert "tloc" from
2239         location_t to dump_location_t.  Updates calls to dump_printf_loc
2240         to pass in a dump_location_t rather than a location_t, via the
2241         gimple stmt.
2242         (grid_inner_loop_gridifiable_p): Likewise.
2243         (grid_dist_follows_simple_pattern): Likewise.
2244         (grid_gfor_follows_tiling_pattern): Likewise.
2245         (grid_target_follows_gridifiable_pattern): Likewise.
2246         (grid_attempt_target_gridification): Convert initialization
2247         of local "grid" from memset to zero-initialization; FIXME: does
2248         this require C++11?  Update call to dump_printf_loc to pass in a
2249         optinfo_location rather than a location_t, via the gimple stmt.
2250         * profile.c (read_profile_edge_counts): Updates call to
2251         dump_printf_loc to pass in a dump_location_t rather than a
2252         location_t
2253         (compute_branch_probabilities): Likewise.
2254         * selftest-run-tests.c (selftest::run_tests): Call
2255         dumpfile_c_tests.
2256         * selftest.h (dumpfile_c_tests): New decl.
2257         * tree-loop-distribution.c (pass_loop_distribution::execute):
2258         Update for change in return type of find_loop_location.
2259         * tree-parloops.c (parallelize_loops): Likewise.
2260         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2261         "locus" from location_t to dump_user_location_t.
2262         (canonicalize_loop_induction_variables): Likewise.
2263         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2264         for change in return type of find_loop_location.
2265         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2266         to dump_printf_loc to pass in a dump_location_t rather than a
2267         location_t, via the stmt.
2268         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2269         Likewise.
2270         * tree-vect-loop-manip.c (find_loop_location): Convert return
2271         type from source_location to dump_user_location_t.
2272         (vect_do_peeling): Update for above change.
2273         (vect_loop_versioning): Update for change in type of
2274         vect_location.
2275         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2276         from location_t to dump_user_location_t.
2277         (vect_estimate_min_profitable_iters): Update for change in type
2278         of vect_location.
2279         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2280         location_t to dump_location_t.
2281         (vect_slp_bb): Update for change in type of vect_location.
2282         * tree-vectorizer.c (vect_location): Convert from source_location
2283         to dump_user_location_t.
2284         (try_vectorize_loop_1): Update for change in vect_location's type.
2285         (vectorize_loops): Likewise.
2286         (increase_alignment): Likewise.
2287         * tree-vectorizer.h (vect_location): Convert from source_location
2288         to dump_user_location_t.
2289         (find_loop_location): Convert return type from source_location to
2290         dump_user_location_t.
2291         (check_reduction_path): Convert 1st param from location_t to
2292         dump_user_location_t.
2293         * value-prof.c (check_counter): Update call to dump_printf_loc to
2294         pass in a dump_user_location_t rather than a location_t; update
2295         call to error_at for change in type of "locus".
2296         (check_ic_target): Update call to dump_printf_loc to
2297         pass in a dump_user_location_t rather than a location_t, via the
2298         call_stmt.
2300 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
2302         * config/s390/s390.h (enum processor_flags): Do not use
2303         default tune parameter when -march was specified.
2305 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
2307         PR target/86314
2308         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2309         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2310         operands.
2312 2018-06-26  Richard Biener  <rguenther@suse.de>
2314         PR tree-optimization/86287
2315         PR bootstrap/86316
2316         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2317         (vect_analyze_loop): Initialize n_stmts.
2319 2018-06-26  Richard Biener  <rguenther@suse.de>
2321         PR middle-end/86271
2322         * fold-const.c (fold_convertible_p): Pointer extension
2323         isn't valid.
2325 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
2327         PR debug/86064
2328         * dwarf2out.c (loc_list_has_views): Adjust comments.
2329         (dw_loc_list): Split single cross-partition range with
2330         nonzero locview.
2332 2018-06-25  Jeff Law  <law@redhat.com>
2334         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2335         on -mbig-switch by default.
2337         * config/v850/predicates.md (const_float_1_operand): Fix match_code
2338         test.
2339         (const_float_0_operand): Remove unused predicate.
2340         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2341         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2342         (recipsf2): New expander.  Original pattern now called
2343         (recipsf2_insn).
2344         (recipdf2, recipdf2_insn): Similarly.
2345         (rsqrtsf2, rsqrtsf2_insn): Similarly
2346         (rsqrtdf2, rsqrtdf2_insn): Similarly
2348 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
2350         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2351         Simplify logic for FreeBSD (twice).
2353 2018-06-25  Martin Sebor  <msebor@redhat.com>
2355         PR tree-optimization/86204
2356         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2357         a strnlen result if it's less than the length of the string.
2359 2018-06-25  Martin Sebor  <msebor@redhat.com>
2361         PR tree-optimization/85700
2362         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2363         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2364         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2366 2018-06-25  Martin Sebor  <msebor@redhat.com>
2368         * doc/extend.texi (Zero-length arrays): Update and clarify.
2370 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
2372         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2373         added IEEE/IBM long double multilib support on PowerPC little
2374         endian Linux systems.
2375         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2376         (MULTILIB_DEFAULTS): Likewise.
2377         * config/rs6000/rs6000.c (rs6000_option_override_internal):
2378         Likewise.
2379         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2380         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2381         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2383 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
2385         PR middle-end/86311
2386         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2387         (REORDER_45): Likewise.
2389 2018-06-25  Jeff Law  <law@redhat.com>
2391         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2392         dividend to 32 bits.  Adjust length.
2393         (udivmodhi4): Cleanup output template.  Fix length.
2395 2018-06-25  Carl Love  <cel@us.ibm.com>
2397         * config/rs6000/vsx.md: Change word selector to prefered location.
2399 2018-06-25  Richard Biener  <rguenther@suse.de>
2401         PR tree-optimization/86304
2402         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2403         epilogue-if-converted loops as well.
2405 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
2407         * lto-section-out.c (lto_begin_section): Do not print section
2408         name for noaddr and unnumbered dumps.
2410 2018-06-25  Richard Biener  <rguenther@suse.de>
2412         * tree-vectorizer.h (struct vec_info_shared): New structure
2413         with parts split out from struct vec_info and loop_nest from
2414         struct _loop_vec_info.
2415         (struct vec_info): Adjust accordingly.
2416         (struct _loop_vec_info): Likewise.
2417         (LOOP_VINFO_LOOP_NEST): Adjust.
2418         (LOOP_VINFO_DATAREFS): Likewise.
2419         (LOOP_VINFO_DDRS): Likewise.
2420         (struct _bb_vec_info): Likewise.
2421         (BB_VINFO_DATAREFS): Likewise.
2422         (BB_VINFO_DDRS): Likewise.
2423         (struct _stmt_vec_info): Add dr_aux member.
2424         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2425         (DR_MISALIGNMENT_UNINITIALIZED): New.
2426         (set_dr_misalignment): Adjust.
2427         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2428         (vect_analyze_loop): Adjust prototype.
2429         (vect_analyze_loop_form): Likewise.
2430         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2431         Compute dependences lazily.
2432         (vect_record_base_alignments): Use shared datarefs/ddrs.
2433         (vect_verify_datarefs_alignment): Likewise.
2434         (vect_analyze_data_refs_alignment): Likewise.
2435         (vect_analyze_data_ref_accesses): Likewise.
2436         (vect_analyze_data_refs): Likewise.
2437         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2438         constructor parameter for shared part.
2439         (vect_analyze_loop_form): Pass in shared part and adjust.
2440         (vect_analyze_loop_2): Pass in storage for the number of
2441         stmts.  Move loop nest finding to the caller.  Compute
2442         datarefs lazily.
2443         (vect_analyze_loop): Pass in shared part.
2444         (vect_transform_loop): Verify shared datarefs are unchanged.
2445         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2446         constructor parameter for shared part.
2447         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2448         (vect_slp_bb): Verify shared datarefs are unchanged before
2449         transform.
2450         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2451         change.
2452         (new_stmt_vec_info): Initialize DR_AUX misalignment to
2453         DR_MISALIGNMENT_UNINITIALIZED.
2454         * tree-vectorizer.c (vec_info::vec_info): Add constructor
2455         parameter for shared part.
2456         (vec_info::~vec_info): Adjust.
2457         (vec_info_shared::vec_info_shared): New.
2458         (vec_info_shared::~vec_info_shared): Likewise.
2459         (vec_info_shared::save_datarefs): Likewise.
2460         (vec_info_shared::check_datarefs): Likewise.
2461         (try_vectorize_loop_1): Construct shared part live for analyses
2462         of a single loop for multiple vector sizes.
2463         * tree-parloops.c (gather_scalar_reductions): Adjust.
2465 2018-06-25  Richard Biener  <rguenther@suse.de>
2467         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2468         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2469         (vect_analyze_data_refs): Remove similar code from here and
2470         simplify accordingly.
2472 2018-06-25  Richard Biener  <rguenther@suse.de>
2474         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2475         for reverse storage order accesses rather than asserting
2476         they cannot happen here.
2478 2018-06-25  Tom de Vries  <tdevries@suse.de>
2480         PR debug/86257
2481         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2482         Use data16 instead of .byte for insn prefix.
2484 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
2486         PR C++/86082
2487         * parser.c (make_char_string_pack): Pass this literal chars
2488         through cpp_interpret_string.
2489         (cp_parser_userdef_numeric_literal): Check the result of
2490         make_char_string_pack.
2492 2018-06-24  Maya Rashish  <coypu@sdf.org>
2494         * ginclude/stddef.h: Simplify conditions around avoiding
2495         re-definition of __size_t.
2497 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2499         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2500         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2502 2018-06-22  Maya Rashish  <coypu@sdf.org>
2504         * doc/invoke.texi (mno-fancy-math-387): Update for changes
2505         made to OpenBSD and NetBSD through the years.
2507 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2509         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2510         behavior of vec_pack (vector double, vector double) to match
2511         behavior of vec_float2 (vector double, vector double).
2513 2018-06-22  Olivier Hainque  <hainque@adacore.com>
2515         * gimplify.c (gimplify_function_tree): Prevent creation
2516         of a trampoline for the address of the current function
2517         passed to entry/exit instrumentation hooks.
2519 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
2521         PR target/86222
2522         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2523         correctly.
2525 2018-06-22  Martin Liska  <mliska@suse.cz>
2527         PR tree-optimization/86263
2528         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2529         Bail out if is_enabled is false.
2530         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2531         New declaration.
2532         (jump_table_cluster::is_enabled): New function.
2534 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2536         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2537         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2538         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2539         (lto_input_ts_binfo_tree_pointers): Likewise.
2540         * tree-streamer-out.c (streamer_write_tree_bitfields,
2541         write_ts_binfo_tree_pointers): Likewise.
2542         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2544 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2546         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2548 2018-06-22  Martin Liska  <mliska@suse.cz>
2550         * symbol-summary.h (get): Make it pure and inline move
2551         functionality from ::get function.
2552         (get): Remove and inline into ::get and ::get_create.
2553         (get_create): Move code from ::get function.
2555 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2557         PR target/85994
2558         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2559         -x assembler-with-cpp.
2561 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2563         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2564         _FILE_OFFSET_BITS=64 for C++.
2566 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
2568         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2569         conversion insn that shows up when pr85657-3.c is compiled using
2570         IEEE 128-bit long double.
2571         (neg<mode>2_internal): Use the correct mode to check whether the
2572         mode is IBM extended.
2573         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2574         multiply and divide external functions from being created more
2575         than once.
2577 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2579         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2580         functions.
2581         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
2582         the edge can be forwarded.
2583         (cfg_layout_merge_blocks): Likewise.
2585 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2587         * except.c (finish_eh_generation): Commit edge insertions only after
2588         the EH edges have been redirected from post-landing to landing pads.
2590 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2592         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2593         create_tmp_var_for to create the FRAME decl.
2594         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2596 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2598         * tree-inline.c (copy_edges_for_bb): Minor tweak.
2599         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2600         debug statement when resetting its value.
2601         (expand_call_inline): Copy the locus of the call onto the assignment
2602         of the return value, if any.  Use local variable in more cases.
2604 2018-06-21  Martin Liska  <mliska@suse.cz>
2606         * ipa-pure-const.c (propagate_nothrow): Use
2607         funct_state_summaries->get.
2608         (dump_malloc_lattice): Likewise.
2609         (propagate_malloc): Likewise.
2611 2018-06-21  Richard Biener  <rguenther@suse.de>
2613         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2614         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2615         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2616         comment.
2617         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2618         BLOCK_ABSTRACT_ORIGIN unconditionally.
2620 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
2622         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2623         deleting it.
2624         * ipa-reference.c (ipa_reference_c_finalize): Delete
2625         ipa_ref_opt_sum_summaries and set it to NULL.
2627 2018-06-21  Tom de Vries  <tdevries@suse.de>
2629         PR tree-optimization/85859
2630         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2631         test with comment from bb_no_side_effects_p.
2633 2018-06-21  Richard Biener  <rguenther@suse.de>
2635         PR tree-optimization/86232
2636         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2637         max for constant niter.
2639 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2641         * config/aarch64/aarch64-simd.md
2642         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2644 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2646         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2647         Make opernads of the unspec commutative.
2649 2018-06-21  Richard Biener  <rguenther@suse.de>
2651         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2652         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2653         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2654         (vect_analyze_data_ref_dependence): Re-order checks to deal with
2655         NULL DR_STEP.
2656         (vect_record_base_alignments): Do not record base alignment
2657         for gathers or scatters.
2658         (vect_compute_data_ref_alignment): Drop return value that is always
2659         true.  Bail out early for gathers or scatters.
2660         (vect_enhance_data_refs_alignment): Bail out early for gathers
2661         or scatters.
2662         (vect_find_same_alignment_drs): Likewise.
2663         (vect_analyze_data_refs_alignment): Remove dead code.
2664         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2665         (vect_analyze_data_refs): For possible gathers or scatters do
2666         not create an alternate DR, just check their possible validity
2667         and mark them.  Adjust DECL_NONALIASED handling to not rely
2668         on DR_BASE_ADDRESS.
2669         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2670         update inits of gathers or scatters.
2671         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2672         Also copy gather/scatter flag to pattern vinfo.
2674 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2676         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2677         behavior of vec_packsu (vector unsigned long long, vector unsigned
2678         long long) to match behavior of vec_packs with same signature.
2680 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
2681             Thomas Schwinge <thomas@codesourcery.com>
2682             Cesar Philippidis  <cesar@codesourcery.com>
2684         * gimplify.c (gimplify_scan_omp_clauses): Add support for
2685         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2686         (gimplify_adjust_omp_clauses): Likewise.
2687         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2688         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2689         (gimplify_omp_target_update): Update handling of acc update and
2690         enter/exit data.
2691         * omp-low.c (install_var_field): Remove unused parameter
2692         base_pointers_restrict.
2693         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2694         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2695         FINALIZE}
2696         (omp_target_base_pointers_restrict_p): Delete.
2697         (scan_omp_target): Update call to scan_sharing_clauses.
2698         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2699         FINALIZE}.
2700         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2701         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2702         (convert_local_omp_clauses): Likewise.
2703         * tree-pretty-print.c (dump_omp_clause): Likewise.
2704         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
2705         FINALIZE}.
2706         (omp_clause_code_name): Likewise.
2708 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2710         PR debug/86194
2711         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2712         be narrowed.
2714         PR tree-optimization/86231
2715         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
2716         anti-range don't overwrite *vr0min before using it to compute *vr0max.
2718 2018-06-20  Tom de Vries  <tdevries@suse.de>
2720         PR tree-optimization/86097
2721         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2722         iv type if signedness of iv type is not the same as that of *nit.
2724 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2726         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
2727         EDGE_EH edges, verify they are all EDGE_EH.
2729 2018-06-20  Maya Rashish  <coypu@sdf.org>
2731         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2733 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2735         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2736         * config/aarch64/aarch64.c (xgene1_tunings): Add
2737         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2738         (aarch64_mode_valid_for_sched_fusion_p):
2739         Allow 16-byte modes.
2740         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2741         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2742         128-bit modes.
2743         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2744         New pattern.
2745         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2746         * config/aarch64/iterators.md (VQ2): New mode iterator.
2748 2018-06-20  Martin Liska  <mliska@suse.cz>
2750         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2751         Change default ratio from 10 to 8.
2753 2018-06-20  Martin Liska  <mliska@suse.cz>
2755         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2756         New.
2757         (bit_test_cluster::find_bit_tests): Likewise.
2758         (switch_decision_tree::analyze_switch_statement): Find clusters.
2759         * tree-switch-conversion.h (struct jump_table_cluster): Document
2760         hierarchy.
2762 2018-06-20  Martin Liska  <mliska@suse.cz>
2764         * tree-switch-conversion.c (switch_conversion::collect):
2765         Record m_uniq property.
2766         (switch_conversion::expand): Bail out for special conditions.
2767         (group_cluster::~group_cluster): New.
2768         (group_cluster::group_cluster): Likewise.
2769         (group_cluster::dump): Likewise.
2770         (jump_table_cluster::emit): New.
2771         (switch_decision_tree::fix_phi_operands_for_edges): New.
2772         (struct case_node): Remove struct.
2773         (jump_table_cluster::can_be_handled): New.
2774         (case_values_threshold): Moved to header.
2775         (reset_out_edges_aux): Likewise.
2776         (jump_table_cluster::is_beneficial): New.
2777         (bit_test_cluster::can_be_handled): Likewise.
2778         (add_case_node): Remove.
2779         (bit_test_cluster::is_beneficial): New.
2780         (case_bit_test::cmp): New.
2781         (bit_test_cluster::emit): New.
2782         (expand_switch_as_decision_tree_p): Remove.
2783         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2784         (fix_phi_operands_for_edge): Likewise.
2785         (switch_decision_tree::analyze_switch_statement): New.
2786         (compute_cases_per_edge): Move ...
2787         (switch_decision_tree::compute_cases_per_edge): ... here.
2788         (try_switch_expansion): Likewise.
2789         (switch_decision_tree::try_switch_expansion): Likewise.
2790         (record_phi_operand_mapping): Likewise.
2791         (switch_decision_tree::record_phi_operand_mapping): Likewise.
2792         (emit_case_decision_tree): Likewise.
2793         (switch_decision_tree::emit): Likewise.
2794         (balance_case_nodes): Likewise.
2795         (switch_decision_tree::balance_case_nodes): Likewise.
2796         (dump_case_nodes): Likewise.
2797         (switch_decision_tree::dump_case_nodes): Likewise.
2798         (emit_jump): Likewise.
2799         (switch_decision_tree::emit_jump): Likewise.
2800         (emit_cmp_and_jump_insns): Likewise.
2801         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2802         (emit_case_nodes): Likewise.
2803         (switch_decision_tree::emit_case_nodes): Likewise.
2804         (conditional_probability): Remove.
2805         * tree-switch-conversion.h (enum cluster_type): New.
2806         (PRINT_CASE): New.
2807         (struct cluster): Likewise.
2808         (cluster::cluster): Likewise.
2809         (struct simple_cluster): Likewise.
2810         (simple_cluster::simple_cluster): Likewise.
2811         (struct group_cluster): Likewise.
2812         (struct jump_table_cluster): Likewise.
2813         (struct bit_test_cluster): Likewise.
2814         (struct min_cluster_item): Likewise.
2815         (struct case_tree_node): Likewise.
2816         (case_tree_node::case_tree_node): Likewise.
2817         (jump_table_cluster::case_values_threshold): Likewise.
2818         (struct case_bit_test): Likewise.
2819         (struct switch_decision_tree): Likewise.
2820         (struct switch_conversion): Likewise.
2821         (switch_decision_tree::reset_out_edges_aux): Likewise.
2823 2018-06-20  Martin Liska  <mliska@suse.cz>
2825         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2826         (hoist_edge_and_branch_if_true): Likewise.
2827         (expand_switch_using_bit_tests_p): Likewise.
2828         (struct case_bit_test): Likewise.
2829         (case_bit_test_cmp): Likewise.
2830         (emit_case_bit_tests): Likewise.
2831         (switch_conversion::switch_conversion): New class.
2832         (struct switch_conv_info): Remove old struct.
2833         (collect_switch_conv_info): More to ...
2834         (switch_conversion::collect): ... this.
2835         (check_range): Likewise.
2836         (switch_conversion::check_range): Likewise.
2837         (check_all_empty_except_final): Likewise.
2838         (switch_conversion::check_all_empty_except_final): Likewise.
2839         (check_final_bb): Likewise.
2840         (switch_conversion::check_final_bb): Likewise.
2841         (create_temp_arrays): Likewise.
2842         (switch_conversion::create_temp_arrays): Likewise.
2843         (free_temp_arrays): Likewise.
2844         (gather_default_values): Likewise.
2845         (switch_conversion::gather_default_values): Likewise.
2846         (build_constructors): Likewise.
2847         (switch_conversion::build_constructors): Likewise.
2848         (constructor_contains_same_values_p): Likewise.
2849         (switch_conversion::contains_same_values_p): Likewise.
2850         (array_value_type): Likewise.
2851         (switch_conversion::array_value_type): Likewise.
2852         (build_one_array): Likewise.
2853         (switch_conversion::build_one_array): Likewise.
2854         (build_arrays): Likewise.
2855         (switch_conversion::build_arrays): Likewise.
2856         (gen_def_assigns): Likewise.
2857         (switch_conversion::gen_def_assigns): Likewise.
2858         (prune_bbs): Likewise.
2859         (switch_conversion::prune_bbs): Likewise.
2860         (fix_phi_nodes): Likewise.
2861         (switch_conversion::fix_phi_nodes): Likewise.
2862         (gen_inbound_check): Likewise.
2863         (switch_conversion::gen_inbound_check): Likewise.
2864         (process_switch): Use the newly created class.
2865         (switch_conversion::expand): New.
2866         (switch_conversion::~switch_conversion): New.
2867         * tree-switch-conversion.h: New file.
2869 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2871         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2872         tree-vect-patterns.c.
2873         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2874         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
2875         (vect_recog_sad_pattern): Likewise.
2876         (vect_recog_widen_sum_pattern): Likewise.
2877         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
2878         (vect_recog_widen_shift_pattern): Remove the type_in argument.
2879         (vect_recog_rotate_pattern): Likewise.
2880         (vect_recog_mult_pattern): Likewise.
2881         (vect_recog_vector_vector_shift_pattern): Likewise.
2882         (vect_recog_divmod_pattern): Likewise.
2883         (vect_recog_mixed_size_cond_pattern): Likewise.
2884         (vect_recog_bool_pattern): Likewise.
2885         (vect_recog_mask_conversion_pattern): Likewise.
2886         (vect_try_gather_scatter_pattern): Likewise.
2887         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
2888         (vect_recog_over_widening_pattern): Likewise.
2889         (vect_recog_gather_scatter_pattern): Likewise.
2890         (vect_recog_func_ptr): Move from tree-vectorizer.h
2891         (vect_vect_recog_func_ptrs): Move further down the file.
2892         (vect_recog_func): Likewise.  Remove the third argument.
2893         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2894         (vect_pattern_recog_1): Expect the pattern function to do any
2895         necessary target tests.  Also expect it to provide a vector type.
2896         Remove the type_in handling.
2898 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2900         * tree-vect-patterns.c (vect_pattern_detected): New function.
2901         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2902         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2903         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2904         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2905         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2906         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2907         (vect_recog_mask_conversion_pattern)
2908         (vect_try_gather_scatter_pattern): Likewise.
2910 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2912         * tree-vect-patterns.c (vect_get_internal_def): New function.
2913         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2914         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2915         (search_type_for_mask_1): Use it.
2917 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2919         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2920         redundant WIDEN_SUM_EXPR handling.
2921         (vect_recog_sad_pattern): Likewise.
2923 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2925         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2926         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2927         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2928         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2929         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2931 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2933         * tree-vect-stmts.c (vectorizable_call): Make sure that we
2934         use the stmt_vec_info of the original bb statement for the
2935         new zero assignment, even if the call is part of a pattern.
2937 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2939         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2940         that the sequence is attached to the original statement rather
2941         than the pattern statement.
2942         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2943         PATTERN_DEF_SEQ from the original statement rather than
2944         the main pattern statement.
2945         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2946         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2947         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2949 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2951         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2952         definition statements before the early exit for statements that aren't
2953         live or relevant.
2954         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2955         split out from...
2956         (vect_transform_loop): ...here.  Process pattern definition
2957         statements without first checking whether the main pattern
2958         statement is live or relevant.
2960 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2962         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2963         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2965 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
2967         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2968         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2969         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2970         (expand_block_compare): Change select_block_compare_mode call.
2971         (expand_strncmp_align_check): Use new functions, fix comment.
2972         (emit_final_str_compare_gpr): New function.
2973         (expand_strn_compare): Refactor and clean up code.
2974         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2976 2018-06-19  Tony Reix  <tony.reix@atos.com>
2977             Damien Bergamini  <damien.bergamini@atos.com>
2978             David Edelsohn  <dje.gcc@gmail.com>
2980         * collect2.c (static_obj): New variable.
2981         (static_libs): New variable.
2982         (is_in_list): Uncomment declaration.
2983         (main): Track AIX libraries linked statically.
2984         (is_in_list): Uncomment definition.
2985         (scan_prog_file): Don't add AIX shared libraries initializer
2986         to constructor list if linking statically.
2988 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
2990         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2991         constant.
2992         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2994 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
2996         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2997         blocks.
2999 2018-06-19  Martin Liska  <mliska@suse.cz>
3001         * config/i386/i386.c (ix86_can_inline_p): Do not use
3002         ipa_fn_summaries::get_create.
3003         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3004         get.
3005         (devirtualization_time_bonus): Likewise.
3006         (ipcp_propagate_stage): Likewise.
3007         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3008         (edge_set_predicate): Likewise.
3009         (evaluate_conditions_for_known_args): Likewise.
3010         (evaluate_properties_for_edge): Likewise.
3011         (ipa_call_summary::reset): Tranform to ...
3012         (ipa_call_summary::~ipa_call_summary): ... this.
3013         (ipa_fn_summary::reset): Transform to ...
3014         (ipa_fn_summary::~ipa_fn_summary): ... this.
3015         (ipa_fn_summary_t::remove): Rename to ...
3016         (ipa_fn_summary_t::remove_callees): ... this.
3017         (ipa_fn_summary_t::duplicate): Use placement new
3018         instead of memory copy.
3019         (ipa_call_summary_t::duplicate): Likewise.
3020         (ipa_call_summary_t::remove): Remove.
3021         (dump_ipa_call_summary): Change get_create to get.
3022         (ipa_dump_fn_summary): Dump only when summary exists.
3023         (analyze_function_body): Use symbol_summary::get instead
3024         of get_create.
3025         (compute_fn_summary): Likewise.
3026         (estimate_edge_devirt_benefit): Likewise.
3027         (estimate_edge_size_and_time): Likewise.
3028         (inline_update_callee_summaries): Likewise.
3029         (remap_edge_change_prob): Likewise.
3030         (remap_edge_summaries): Likewise.
3031         (ipa_merge_fn_summary_after_inlining): Likewise.
3032         (write_ipa_call_summary): Likewise.
3033         (ipa_fn_summary_write): Likewise.
3034         (ipa_free_fn_summary): Likewise.
3035         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3036         (struct ipa_call_summary): Likewise.
3037         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3038         of get_create.
3039         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3040         (estimate_size_after_inlining): Likewise.
3041         (estimate_growth): Likewise.
3042         (growth_likely_positive): Likewise.
3043         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3044         (inline_call): Likewise.
3045         * ipa-inline.c (caller_growth_limits): Likewise.
3046         (can_inline_edge_p): Likewise.
3047         (can_inline_edge_by_limits_p): Likewise.
3048         (compute_uninlined_call_time): Likewise.
3049         (compute_inlined_call_time): Likewise.
3050         (want_inline_small_function_p): Likewise.
3051         (edge_badness): Likewise.
3052         (update_caller_keys): Likewise.
3053         (update_callee_keys): Likewise.
3054         (inline_small_functions): Likewise.
3055         (inline_to_all_callers_1): Likewise.
3056         (dump_overall_stats): Likewise.
3057         (early_inline_small_functions): Likewise.
3058         (early_inliner): Likewise.
3059         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3060         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3061         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3062         * ipa-split.c (execute_split_functions): Likewise.
3063         * symbol-summary.h: Likewise.
3064         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3066 2018-06-19  Richard Biener  <rguenther@suse.de>
3068         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3069         (vectorize_loops): ... here.  Fix dbgcnt handling.
3070         (try_vectorize_loop): Wrap try_vectorize_loop_1.
3072 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
3074         PR target/86197
3075         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3076         ieee128 argument takes up only one (vector) register, not two (floating
3077         point) registers.
3079 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3081         * gimplify.c (gimplify_init_constructor): Really never clear for an
3082         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3084 2018-06-19  Richard Biener  <rguenther@suse.de>
3086         PR tree-optimization/86179
3087         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3088         after failed recognition.
3090 2018-06-18  Martin Sebor  <msebor@redhat.com>
3092         PR middle-end/85602
3093         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3094         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3095         Handle integer subtraction.
3096         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3097         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3099 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3101         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3102         param from rtx to rtx_insn *.
3103         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3104         param.
3105         (frv_ifcvt_modify_insn): Likwise.
3106         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3107         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
3108         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3109         as_a <rtx_insn *> cast to local "unprotected_region" once
3110         it's been established that it's not NULL or pc_rtx.
3111         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3112         param "sethi" from rtx to rtx_insn *.
3113         (nds32_group_float_insns): Likewise for param "insn".
3114         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3115         param.
3116         (vax_output_int_subtract): Likewise.
3117         * config/vax/vax.c (vax_output_int_add): Likewise for param
3118         "insn".
3119         (vax_output_int_subtract): Likewise.
3120         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3121         (emit_pattern_after): Likewise for param "after".
3122         (emit_insn_after): Likewise.
3123         (emit_jump_insn_after): Likewise.
3124         (emit_call_insn_after): Likewise.
3125         (emit_debug_insn_after): Likewise.
3126         (emit_pattern_before): Likewise for param "before".
3127         (emit_insn_before): Likewise.
3128         (emit_jump_insn_before): Likewise.
3129         * final.c (get_insn_template): Likewise for param "insn", removing
3130         a cast.
3131         * output.h (get_insn_template): Likewise for 2nd param.
3132         * rtl.h (emit_insn_before): Likewise.
3133         (emit_jump_insn_before): Likewise.
3134         (emit_debug_insn_before_noloc): Likewise.
3135         (emit_insn_after): Likewise.
3136         (emit_jump_insn_after): Likewise.
3137         (emit_call_insn_after): Likewise.
3138         (emit_debug_insn_after): Likewise.
3139         (set_insn_deleted): Likewise for param.
3141 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
3143         PR target/85358
3144         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3145         floating point modes, so that IFmode is numerically greater than
3146         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3147         to declare the ordering.  This prevents IFmode from being
3148         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3149         machine.  Include rs6000-modes.h to share the fractional values
3150         between genmodes* and the rest of the compiler.
3151         (IFmode): Likewise.
3152         (KFmode): Likewise.
3153         (TFmode): Likewise.
3154         * config/rs6000/rs6000-modes.h: New file.
3155         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3156         meaning of rs6000_long_double_size so that 126..128 selects an
3157         appropriate 128-bit floating point type.
3158         (rs6000_option_override_internal): Likewise.
3159         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3160         (TARGET_LONG_DOUBLE_128): Change the meaning of
3161         rs6000_long_double_size so that 126..128 selects an appropriate
3162         128-bit floating point type.
3163         (LONG_DOUBLE_TYPE_SIZE): Update comment.
3164         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3165         source and destination to match the standard usage.
3166         (truncifkf2): Likewise.
3167         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3168         ISA 2.07 to use an explicit clobber, instead of passing in a
3169         temporary.
3170         (copysign<mode>3_soft): Likewise.
3172 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3174         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3175         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3176         (vect_slp_analyze_instance_dependence): Likewise.
3177         (vect_enhance_data_refs_alignment): Likewise.
3178         (vect_analyze_data_refs_alignment): Likewise.
3179         (vect_slp_analyze_and_verify_instance_alignment
3180         (vect_analyze_data_ref_accesses): Likewise.
3181         (vect_prune_runtime_alias_test_list): Likewise.
3182         (vect_analyze_data_refs): Likewise.
3183         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3184         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3185         (vect_analyze_scalar_cycles_1): Likewise.
3186         (vect_get_loop_niters): Likewise.
3187         (vect_analyze_loop_form_1): Likewise.
3188         (vect_update_vf_for_slp): Likewise.
3189         (vect_analyze_loop_operations): Likewise.
3190         (vect_analyze_loop): Likewise.
3191         (vectorizable_induction): Likewise.
3192         (vect_transform_loop): Likewise.
3193         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3194         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3195         (vect_make_slp_decision): Likewise.
3196         (vect_detect_hybrid_slp): Likewise.
3197         (vect_slp_analyze_operations): Likewise.
3198         (vect_slp_bb): Likewise.
3199         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3200         (vectorizable_bswap): Likewise.
3201         (vectorizable_call): Likewise.
3202         (vectorizable_simd_clone_call): Likewise.
3203         (vectorizable_conversion): Likewise.
3204         (vectorizable_assignment): Likewise.
3205         (vectorizable_shift): Likewise.
3206         (vectorizable_operation): Likewise.
3207         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3209 2018-06-18  Martin Sebor  <msebor@redhat.com>
3211         PR tree-optimization/81384
3212         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3213         * builtins.c (expand_builtin_strnlen): New function.
3214         (expand_builtin): Call it.
3215         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3216         * builtins.def (BUILT_IN_STRNLEN): New.
3217         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3218         Warn for bounds in excess of maximum object size.
3219         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3220         single-value ranges.  Handle strnlen.
3221         (handle_builtin_strlen): Handle strnlen.
3222         (strlen_check_and_optimize_stmt): Same.
3223         * doc/extend.texi (Other Builtins): Document strnlen.
3225 2018-06-18  Maya Rashish  <coypu@sdf.org>
3227         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3228         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3229         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3231         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3232         here to ...
3233         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3235 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3237         * tree.c (escaped_string::escape): Replace cast to char * by
3238         const_cast<char *> (unescaped).
3240 2018-06-18  Nick Clifton  <nickc@redhat.com>
3242         PR 84195
3243         * tree.c (escaped_string): New class.  Converts an unescaped
3244         string into its escaped equivalent.
3245         (warn_deprecated_use): Use the new class to convert the
3246         deprecation message, if present.
3247         (test_escaped_strings): New self test.
3248         (test_c_tests): Add test_escaped_strings.
3249         * doc/extend.texi (deprecated): Add a note that the
3250         deprecation message is affected by the -fmessage-length
3251         option, and that control characters will be escaped.
3252         (#pragma GCC error): Document this pragma.
3253         (#pragma GCC warning): Likewise.
3254         * doc/invoke.texi (-fmessage-length): Document this option's
3255         effect on the #warning and #error preprocessor directives and
3256         the deprecated attribute.
3258 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
3260         * tree.c (decl_value_expr_lookup): Revert latest change.
3261         (decl_value_expr_insert): Likewise.
3263 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
3265         * gimplify.c (nonlocal_vlas): Delete.
3266         (nonlocal_vla_vars): Likewise.
3267         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3268         referenced VLAs.
3269         (gimplify_body): Do not create and destroy nonlocal_vlas.
3270         * tree-nested.c: Include diagnostic.h.
3271         (use_pointer_in_frame): Tweak.
3272         (lookup_field_for_decl): Add assertion and declare the transformation.
3273         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3274         internal error when the reference is in a wrong context.  Do not
3275         create a debug decl by default.
3276         (note_nonlocal_block_vlas): Delete.
3277         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3278         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
3279         create a debug decl by default.
3280         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3281         call is in a wrong context.
3282         (fixup_vla_decls): New function.
3283         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
3284         debug variables were created.
3285         * tree.c (decl_value_expr_lookup): Add checking assertion.
3286         (decl_value_expr_insert): Likewise.
3288 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3290         PR middle-end/82479
3291         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3292         * tree-scalar-evolution.c (interpret_expr): Likewise.
3293         (expression_expensive_p): Likewise.
3294         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3295         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3296         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3297         (ssa_defined_by_minus_one_stmt_p): New.
3299 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3301         PR middle-end/64946
3302         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3303         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3304         * dojump.c (do_jump): Likewise.
3305         * expr.c (expand_expr_real_2): Check operand type's sign.
3306         * fold-const.c (const_unop): Handle ABSU_EXPR.
3307         (fold_abs_const): Likewise.
3308         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3309         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3310         (strip_sign_op_1): Likesise.
3311         * match.pd: Add new pattern to generate ABSU_EXPR.
3312         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3313         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3314         * tree-eh.c (operation_could_trap_helper_p): Likewise.
3315         * tree-inline.c (estimate_operator_cost): Likewise.
3316         * tree-pretty-print.c (dump_generic_node): Likewise.
3317         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3318         * tree.def (ABSU_EXPR): New.
3320 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
3322         PR middle-end/86095
3323         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3324         documented as preserved for backward compatibility only.
3325         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3327         PR rtl-optimization/86108
3328         * bb-reorder.c (create_forwarder_block): Renamed to ...
3329         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
3330         jump from new landing pad to the second part.
3331         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3332         Adjust callers.
3334 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
3336         PR middle-end/85878
3337         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3338         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3339         Only call store_expr for halves if the mode is the same.
3341         PR middle-end/86123
3342         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3343         Fix up comment formatting.
3345 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3347         * typed-splay-tree.h (typed_splay_tree::remove): New function.
3348         (typed_splay_tree::closure,
3349         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3350         (typed_splay_tree::typed_splay_tree,
3351         typed_splay_tree::operator =): Declared private.
3352         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3353         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3354         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3355         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3356         typed_splay_tree::splay_tree_splay,
3357         typed_splay_tree::splay_tree_foreach_helper,
3358         typed_splay_tree::splay_tree_insert,
3359         typed_splay_tree::splay_tree_remove,
3360         typed_splay_tree::splay_tree_lookup,
3361         typed_splay_tree::splay_tree_predecessor,
3362         typed_splay_tree::splay_tree_successor,
3363         typed_splay_tree::splay_tree_min,
3364         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3365         (typed_splay_tree::root, typed_splay_tree::comp,
3366         typed_splay_tree::delete_key,
3367         typed_splay_tree::delete_value): New data members.
3368         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3369         typed_splay_tree::remove.
3371 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
3373         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3374         -mginv and -mno-ginv to the assembler.
3375         * config/mips/mips.opt (-mcrc): New option.
3376         (-mginv): Likewise.
3377         * doc/invoke.text (-mcrc): Document.
3378         (-mginv): Likewise.
3380 2018-06-15  Nick Clifton  <nickc@redhat.com>
3382         PR 84195
3383         * tree.c (escaped_string): New class.  Converts an unescaped
3384         string into its escaped equivalent.
3385         (warn_deprecated_use): Use the new class to convert the
3386         deprecation message, if present.
3387         (test_escaped_strings): New self test.
3388         (test_c_tests): Add test_escaped_strings.
3389         * doc/extend.texi (deprecated): Add a note that the
3390         deprecation message is affected by the -fmessage-length
3391         option, and that control characters will be escaped.
3392         (#pragma GCC error): Document this pragma.
3393         (#pragma GCC warning): Likewise.
3394         * doc/invoke.texi (-fmessage-length): Document this option's
3395         effect on the #warning and #error preprocessor directives and
3396         the deprecated attribute.
3398 2018-06-15  Richard Biener  <rguenther@suse.de>
3400         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3401         here, also noting vector size used.
3402         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
3403         size used in MSG_OPTIMIZED_LOCATIONS dump.
3404         (pass_slp_vectorize::execute): Adjust.
3406 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
3408         PR target/85968
3409         * config/arc/arc.c (arc_return_address_register): Fix
3410         if-condition.
3412 2018-06-15  Richard Biener  <rguenther@suse.de>
3414         PR middle-end/86159
3415         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3416         leave useless conversion stripping to force_gimple_operand_gsi.
3417         (gimplify_build2): Likewise.
3418         (gimplify_build1): Likewise.
3420 2018-06-15  Richard Biener  <rguenther@suse.de>
3422         PR middle-end/86076
3423         * tree-cfg.c (move_stmt_op): unshare invariant addresses
3424         before adjusting their block.
3426 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3428         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3429         multilibs for *-*-rtems*.
3430         * config/riscv/t-rtems: New file.
3432 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
3434         PR middle-end/86122
3435         * match.pd ((A +- CST1) +- CST2): Punt if last resort
3436         unsigned_type_for returns NULL.
3438         PR target/85945
3439         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3440         subregs of multi-word pseudos unless the float mode has word size.
3442 2018-06-14  Richard Biener  <rguenther@suse.de>
3444         PR middle-end/86139
3445         * tree-vect-generic.c (build_word_mode_vector_type): Remove
3446         duplicate and harmful type_hash_canon.
3447         * tree.c (type_hash_canon): Assert we didn't find ourselves.
3449 2018-06-14  Richard Biener  <rguenther@suse.de>
3451         PR ipa/86124
3452         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3453         NULL cgraph_node.
3455 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3457         * config/rtems.h (STDINT_LONG32): Define.
3459 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
3460             Prachi Godbole  <prachi.godbole@imgtec.com>
3462         * config/mips/mips-cpus.def: Define P6600.
3463         * config/mips/mips-tables.opt: Regenerate.
3464         * config/mips/mips.c (mips_ucbranch_type): New enum.
3465         (mips_rtx_cost_data): Add support for P6600.
3466         (mips_issue_rate): Likewise.
3467         (mips_multipass_dfa_lookahead): Likewise.
3468         (mips_avoid_hazard): Likewise.
3469         (mips_reorg_process_insns): Likewise.
3470         (mips_classify_branch_p6600): New function.
3471         * config/mips/mips.h (TUNE_P6600): New define.
3472         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3473         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3474         * config/mips/mips.md: Include p6600.md.
3475         (processor): Add p6600.
3476         * config/mips/p6600.md: New file.
3477         * doc/invoke.texi: Add p6600 to supported architectures.
3479 2018-06-13  Martin Sebor  <msebor@redhat.com>
3481         PR tree-optimization/86114
3482         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3483         of integer types.
3484         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3486 2018-06-13  Richard Biener  <rguenther@suse.de>
3488         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3489         Properly set vector type of the intermediate stmt.
3490         * tree-vect-stmts.c (vectorizable_operation): The destination
3491         var always has vectype_out type.
3493 2018-06-13  Jeff Law  <law@redhat.com>
3495         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3496         integer 0 for argument to print_rtl_with_bb.
3497         (rl78_reorg): Likewise.
3499 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
3501         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3502         from rtx to rtx_insn *.
3503         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3504         "label".
3505         (add_sched_insns_for_speculation): Likewise for local "target",
3506         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3507         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3508         from rtx_insn ** to rtx_code_label **.
3509         (reorg_emit_nops): Likewise.
3510         (c6x_reorg): Likewise for local "call_labels".
3511         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3512         rtx to rtx_insn *.
3513         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3514         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3515         the loops over LABEL_REFS.
3516         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3517         braf_label.
3518         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3519         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3520         (split_branches): Strengthen local "olabel" from rtx to
3521         rtx_insn *, adding a safe_as_a cast.
3522         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3523         to "rtx_insn *".
3524         (add_insn_after): Likewise for first two params.
3525         (add_insn_before): Likewise.
3526         (remove_insn): Likewise for param.
3527         (emit_pattern_before_noloc): Likewise for second and third params.
3528         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3529         (emit_call_insn_before_noloc): Likewise.
3530         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3531         to "rtx_insn *".
3532         (emit_barrier_before): Likewise.
3533         (emit_label_before): Strengthen "label" param from "rtx" to
3534         "rtx_code_label *".  Strengthen "before" param from "rtx" to
3535         "rtx_insn *".
3536         (emit_insn_after_1): Strengthen "after" param from "rtx" to
3537         "rtx_insn *".
3538         (emit_pattern_after_noloc): Likewise.
3539         (emit_insn_after_noloc): Likewise.
3540         (emit_jump_insn_after_noloc): Likewise.
3541         (emit_call_insn_after_noloc): Likewise.
3542         (emit_debug_insn_after_noloc): Likewise.
3543         (emit_barrier_after): Likewise.
3544         (emit_label_after): Likewise for both params.
3545         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
3546         "loc" param from "int" to "location_t".
3547         (emit_insn_after_setloc): Likewise.
3548         (emit_jump_insn_after_setloc): Likewise.
3549         (emit_call_insn_after_setloc): Likewise.
3550         (emit_debug_insn_after_setloc): Likewise.
3551         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
3552         "loc" param from "int" to "location_t".
3553         (emit_pattern_before): Convert NULL_RTX to NULL.
3554         (emit_insn_before_setloc): Convert "loc" param from "int" to
3555         "location_t".
3556         (emit_jump_insn_before_setloc): Likewise.
3557         (emit_call_insn_before_setloc): Likewise.
3558         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3559         rtx_insn *.  Convert "loc" param from "int" to "location_t".
3560         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3561         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3562         Convert 3rd param from "int" to "location_t".
3563         (emit_barrier_before, emit_barrier_after, next_real_insn):
3564         Strengthen param from rtx to rtx_insn *.
3565         (emit_label_before): Strengthen 1st param from "rtx" to
3566         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
3567         "rtx_insn *".
3568         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3569         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3570         Strengthen 2nd param from "rtx" to "rtx_insn *".
3571         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3572         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3573         Likewise. Convert 3rd param from "int" to "location_t".
3574         (emit_label_after): Strengthen 1st param from "rtx" to
3575         "rtx_code_label *".
3576         (next_real_insn, remove_insn): Strengthen param from "rtx" to
3577         "rtx_insn *".
3578         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3579         from "rtx" to "rtx_insn *".
3581 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
3583         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3584         bodies streamed in with -Q.
3585         * dumpfile.c (dump_files): Add lto-stream-out dump file.
3586         * dumpfile.h (tree_dump_index): Add lto_stream_out.
3587         * gimple-streamer-out.c: Include gimple-pretty-print.h
3588         (output_bb): Dump stmts streamed.
3589         * lto-section-out.c: Include print-tree.h
3590         (lto_begin_section): Dump sections created.
3591         (lto_output_decl_index): Dump decl encoded.
3592         * lto-streamer-out.c: Include print-tree.h
3593         (create_output_block): Dump output block created.
3594         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3595         (output_function): Dump function output.
3596         (output_constructor): Dump constructor streamed.
3597         (write_global_stream): Output indexes encoded.
3598         (produce_asm_for_decls): Dump streams encoded.
3599         * lto-streamer.c (streamer_dump_file): New global var.
3600         * lto-streamer.h (streamer_dump_file): Declare.
3601         * passes.c (ipa_write_summaries): Initialize streamer dump.
3602         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3603         in.
3605 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
3607         PR target/86048
3608         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3609         offsets for register save directives.  Emit a second batch of save
3610         directives, if need be, when the function accesses prior frames.
3612 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3614         * config/arc/fpu.md (fmasf4): Force operand to register.
3615         (fnmasf4): Likewise.
3617 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3619         * config/arc/arc-protos.h (arc_pad_return): Remove.
3620         * config/arc/arc.c (machine_function): Remove force_short_suffix
3621         and size_reason.
3622         (arc_print_operand): Adjust printing of '&'.
3623         (arc_verify_short): Remove conditional printing of short suffix.
3624         (arc_final_prescan_insn): Remove reference to size_reason.
3625         (pad_return): New function.
3626         (arc_reorg): Call pad_return.
3627         (arc_pad_return): Remove.
3628         (arc_init_machine_status): Remove reference to force_short_suffix.
3629         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3630         (attr length): When attribute iscompact is true force to 2
3631         regardless; in the case of maybe check if we want to force the
3632         instruction to have 4 bytes length.
3633         (nopv): Change it to generate 4 byte long nop as well.
3634         (blockage): New pattern.
3635         (simple_return): Remove call to arc_pad_return.
3636         (p_return_i): Likewise.
3638 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3640         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3642 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3644         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3645         ARC cores.
3647 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3649         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3650         for ARC700 and ARCv2.
3652 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
3654         PR target/86076
3655         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3656         operands[2] instead of operands[1].
3659 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3661         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3662         case, check whether the outer register overlaps an unallocatable
3663         register, not just whether it fits the required class.
3665 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3667         * poly-int.h (can_div_trunc_p): Add new overload in which all values
3668         are poly_ints.
3669         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3670         (memrefs_conflict_p): Likewise.
3671         (init_alias_analysis): Likewise.
3672         * cfgexpand.c (expand_debug_expr): Likewise.
3673         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3674         * cse.c (fold_rtx): Likewise.
3675         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3676         * expr.c (emit_block_move_hints): Likewise.
3677         (clear_storage_hints, push_block, emit_push_insn): Likewise.
3678         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3679         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3680         (emit_group_store): Likewise.
3681         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
3682         to read the PRE/POST_MODIFY increment.
3683         * calls.c (store_one_arg): Use strip_offset.
3684         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3685         poly_int_rtx_p.
3686         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3687         by a VEC_SELECT.
3688         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3689         (simplify_binary_operation_1): Extend CONST_INT handling to
3690         poly_int_rtx_p.
3691         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3692         than a HOST_WIDE_INT.
3693         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3694         poly_int64.
3695         (adjust_mems, add_stores): Update accodingly.
3696         (vt_canonicalize_addr): Track polynomial offsets.
3697         (emit_note_insn_var_location): Likewise.
3698         (vt_add_function_parameter): Likewise.
3699         (vt_initialize): Likewise.
3701 2018-06-12  Jeff Law  <law@redhat.com>
3703         * config.gcc (alpha*-*-freebsd*): Remove.
3704         * config/alpha/freebsd.h: Remove.
3706 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
3708         PR other/69968
3709         * spellcheck-tree.c (levenshtein_distance): Rename to...
3710         (get_edit_distance): ...this, and update for underlying renaming.
3711         * spellcheck-tree.h (levenshtein_distance): Rename to...
3712         (get_edit_distance): ...this.
3713         * spellcheck.c (levenshtein_distance): Rename to...
3714         (get_edit_distance): ...this.  Convert from Levenshtein distance
3715         to Damerau-Levenshtein distance by supporting transpositions of
3716         adjacent characters.  Rename "v1" to "v_next" and "v0" to
3717         "v_one_ago".
3718         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3719         (selftest::test_edit_distance_unit_test_oneway): ...this, and
3720         update for underlying renaming.
3721         (selftest::levenshtein_distance_unit_test): Rename to...
3722         (selftest::test_get_edit_distance_unit): ...this, and update for
3723         underlying renaming.
3724         (selftest::test_find_closest_string): Add example from PR 69968
3725         where transposition helps
3726         (selftest::test_metric_conditions): Update for renaming.
3727         (selftest::test_metric_conditions): Likewise.
3728         (selftest::spellcheck_c_tests): Likewise.
3729         * spellcheck.h (levenshtein_distance): Rename both overloads to...
3730         (get_edit_distance): ...this.
3731         (best_match::consider): Update for renaming.
3733 2018-06-12  Martin Sebor  <msebor@redhat.com>
3735         PR tree-optimization/85259
3736         * builtins.c (compute_objsize): Handle constant offsets.
3737         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3738         true iff a warning has been issued.
3739         * gimple.h (gimple_nonartificial_location): New function.
3740         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3741         gimple_nonartificial_location and handle -Wno-system-headers.
3742         (handle_builtin_stxncpy): Same.
3744 2018-06-12  Martin Sebor  <msebor@redhat.com>
3746         PR c/85931
3747         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3749 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
3751         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3752         BUILTIN_VEC_XST entries for pointer to double and long long.
3754 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
3756         PR target/85990
3757         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3758         Update comments.
3759         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3760         Likewise.
3762 2018-06-12  Martin Liska  <mliska@suse.cz>
3764         * doc/options.texi: Document IntegerRange.
3766 2018-06-12  Martin Liska  <mliska@suse.cz>
3768         * config/i386/i386.opt: Make MPX-related options as Deprecated.
3769         * opt-functions.awk: Handle Deprecated flag.
3770         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3771         and report error.
3772         (read_cmdline_option): Report warning for a deprecated option.
3773         * opts.h (struct cl_option): Add new field cl_deprecated.
3774         (CL_ERR_DEPRECATED): New.
3776 2018-06-12  Martin Liska  <mliska@suse.cz>
3778         * doc/options.texi: Document Deprecated option flag.
3780 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3782         * config/arc/arc-arch.h (arc_extras): New enum.
3783         (arc_cpu_t):Add field extra.
3784         (arc_cpu_types): Consider the extras.
3785         * config/arc/arc-cpus.def: Add extras info.
3786         * config/arc/arc-opts.h (processor_type): Consider extra field.
3787         * config/arc/arc.c (arc_override_options): Handle extra field.
3789 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3791         * config/arc/arc-arch.h: Update ARC_OPTX macro.
3792         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3793         field.
3794         * config/arc/arc.c (arc_init): Update pic warning.
3795         (irq_range): Update irq range parsing warnings.
3796         (arc_override_options): Update various warning messages.
3797         (arc_handle_aux_attribute): Likewise.
3799 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
3801         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3803 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3805         * doc/sourcebuild.texi: Document usage of line number 0 in verify
3806         compiler messages directives.
3808 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
3810         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3811         * config/mips/mips-tables.opt: Regenerate.
3812         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3813         mips64r6.
3814         * doc/invoke.texi: Document -march=i6500.
3816 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
3818         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3819         (i6400_gpmul): Add cpu_unit.
3820         (i6400_gpdiv): Likewise.
3821         (i6400_msa_add_d): Update reservations.
3822         (i6400_msa_int_add) Likewise.
3823         (i6400_msa_short_logic3) Likewise.
3824         (i6400_msa_short_logic2) Likewise.
3825         (i6400_msa_short_logic) Likewise.
3826         (i6400_msa_move) Likewise.
3827         (i6400_msa_cmp) Likewise.
3828         (i6400_msa_short_float2) Likewise.
3829         (i6400_msa_div_d) Likewise.
3830         (i6400_msa_long_logic1) Likewise.
3831         (i6400_msa_long_logic2) Likewise.
3832         (i6400_msa_mult) Likewise.
3833         (i6400_msa_long_float2) Likewise.
3834         (i6400_msa_long_float4) Likewise.
3835         (i6400_msa_long_float5) Likewise.
3836         (i6400_msa_long_float8) Likewise.
3837         (i6400_fpu_fadd): Include frint type.
3838         (i6400_fpu_store): New define_insn_reservation.
3839         (i6400_fpu_load): Likewise.
3840         (i6400_fpu_move): Likewise.
3841         (i6400_fpu_fcmp): Likewise.
3842         (i6400_fpu_fmadd): Likewise.
3843         (i6400_int_mult): Include imul3nc type and update reservation.
3844         (i6400_int_div): Include idiv3 type and update reservation.
3845         (i6400_int_load): Update to check type not move_type.
3846         (i6400_int_store): Likewise.
3847         (i6400_int_prefetch): Set zero latency.
3849 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3851         * gcc.c: Document new %@{...} sequence.
3852         (LINK_COMMAND_SPEC): Use it for the -L switches.
3853         (cpp_unique_options): Use it for the -I switches.
3854         (at_file_argbuf): New global variable.
3855         (in_at_file): Likewise.
3856         (alloc_args): Create at_file_argbuf.
3857         (clear_args): Truncate at_file_argbuf.
3858         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3859         (open_at_file): New function.
3860         (close_at_file): Likewise.
3861         (create_at_file): Delete.
3862         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3863         <'o'>: Likewise.
3864         <'@'>: New case.
3865         (validate_switches_from_spec): Deal with %@{...} sequence.
3866         (validate_switches): Likewise.
3867         (driver::finalize): Call clear_args.
3869 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
3871         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3873 2018-06-11  Martin Sebor  <msebor@redhat.com>
3875         * doc/invoke.texi (-Wall): List -Wc++17-compat.
3876         (Wno-class-memaccess): Add @opindex.
3877         (Wno-templates, Wno-multiple-inheritance): Same.
3878         (Wno-virtual-inheritance, Wno-namespaces): Same.
3879         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3880         (Wno-format-overflow, Wno-format-truncation): Same.
3881         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3882         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3883         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3884         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3885         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3886         (Wno-misspelled-isr): Same.
3888 2018-06-11  Martin Sebor  <msebor@redhat.com>
3890         * PR tree-optimization/86083
3891         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3893 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3895         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3897 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
3899         PR target/85755
3900         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3901         on the correct operand.
3902         (*movdi_internal64): Ditto.
3904 2018-06-11  Martin Liska  <mliska@suse.cz>
3906         PR tree-optimization/86089
3907         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3909 2018-06-11  Julia Koval  <julia.koval@intel.com>
3911         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3912         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3913         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3915 2018-06-11  Olivier Hainque  <hainque@adacore.com>
3917         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3918         for Ada with strict dwarf2.
3920 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
3922         PR target/85755
3923         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3924         addresses.
3926 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
3928         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3930 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
3932         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3933         TARGET_ELF.
3935 2018-06-08  Martin Liska  <mliska@suse.cz>
3937         * tree-cfg.h (debug_function): Fix argument type to match
3938         implementation.
3940 2018-06-08  Martin Liska  <mliska@suse.cz>
3942         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3943         Remove usage of MPX-related (and removed) fields.
3944         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3946 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3948         * cfg.c (debug): Use TDF_NONE rather than 0.
3949         * cfghooks.c (debug): Likewise.
3950         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3951         (struct dump_option_value_info): Convert to...
3952         (struct kv_pair): ...this template type.
3953         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3954         rather than 0.
3955         (optinfo_verbosity_options): Likewise.
3956         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3957         OPTGROUP_NONE.
3958         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3959         than int for "optgroup_flags" param.
3960         (dump_generic_expr_loc): Use dump_flags_t rather than int for
3961         "dump_kind" param.
3962         (dump_dec): Likewise.
3963         (dump_finish): Use TDF_NONE rather than 0.
3964         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3965         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
3966         than 0.  Update for change to option_ptr.
3967         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3968         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
3969         0.  Update for changes to optinfo_verbosity_options and
3970         optgroup_options.
3971         (opt_info_switch_p): Convert optgroup_flags from int to
3972         optgroup_flags_t.
3973         (dump_basic_block): Use dump_flags_t rather than int
3974         for "dump_kind" param.
3975         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3976         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3977         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3978         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3979         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3980         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3981         TDF_NONE): Convert from macros to...
3982         (enum dump_flag): ...this new enum.
3983         (dump_flags_t): Update to use enum.
3984         (operator|, operator&, operator~, operator|=, operator&=):
3985         Implement for dump_flags_t.
3986         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3987         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3988         Convert from macros to...
3989         (enum optgroup_flag): ...this new enum.
3990         (optgroup_flags_t): New typedef.
3991         (operator|, operator|=): Implement for optgroup_flags_t.
3992         (struct dump_file_info): Convert field "alt_flags" to
3993         dump_flags_t.  Convert field "optgroup_flags" to
3994         optgroup_flags_t.
3995         (dump_basic_block): Use dump_flags_t rather than int for param.
3996         (dump_generic_expr_loc): Likewise.
3997         (dump_dec): Likewise.
3998         (dump_register): Convert param "optgroup_flags" to
3999         optgroup_flags_t.
4000         (opt_info_enable_passes): Likewise.
4001         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4002         than 0.
4003         * gimple-pretty-print.c (debug): Likewise.
4004         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4005         (merged_store_group::apply_stores): Likewise.
4006         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4007         * gimple.c (verify_gimple_pp): Likewise.
4008         * graphite-poly.c (print_pbb_body): Likewise.
4009         * passes.c (pass_manager::register_one_dump_file): Convert
4010         local "optgroup_flags" to optgroup_flags_t.
4011         * print-tree.c (print_node): Use TDF_NONE rather than 0.
4012         (debug): Likewise.
4013         (debug_body): Likewise.
4014         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4015         to optgroup_flags_t.
4016         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4017         than 0.
4018         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4019         (convert_mult_to_fma): Likewise.
4020         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4021         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4022         * tree-vect-data-refs.c (dump_lower_bound): Convert param
4023         "dump_kind" to dump_flags_t.
4025 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4027         * config/rs6000/rs6000.c (min, max): Delete.
4029 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4031         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4032         -mabi=spe and -mabi=no-spe.
4034 2018-06-08  Martin Liska  <mliska@suse.cz>
4036         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4037         where we expect an existing summary.
4039 2018-06-08  Martin Liska  <mliska@suse.cz>
4041         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4042         * ipa-inline.h (estimate_edge_growth): Likewise.
4044 2018-06-08  Martin Liska  <mliska@suse.cz>
4046         * cgraph.c (function_version_hasher::hash): Use
4047         cgraph_node::get_uid ().
4048         (function_version_hasher::equal):
4049         * cgraph.h (cgraph_node::get_uid): New method.
4050         * ipa-inline.c (update_caller_keys): Use
4051         cgraph_node::get_uid ().
4052         (update_callee_keys): Likewise.
4053         * ipa-utils.c (searchc): Likewise.
4054         (ipa_reduced_postorder): Likewise.
4055         * lto-cgraph.c (input_node): Likewise.
4056         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4057         * symbol-summary.h (symtab_insertion): Likewise.
4058         (symtab_removal): Likewise.
4059         (symtab_duplication): Likewise.
4060         * tree-pretty-print.c (dump_function_header): Likewise.
4061         * tree-sra.c (convert_callers_for_node): Likewise.
4063 2018-06-08  Martin Liska  <mliska@suse.cz>
4065         * cgraph.c (symbol_table::create_edge): Always assign a new
4066         unique number.
4067         (symbol_table::free_edge): Do not recycle numbers.
4068         * cgraph.h (cgraph_edge::get): New method.
4069         * symbol-summary.h (symtab_removal): Use it.
4070         (symtab_duplication): Likewise.
4071         (call_summary::hashable_uid): Remove.
4073 2018-06-08  Martin Liska  <mliska@suse.cz>
4075         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4076         (initialize_growth_caches): Remove.
4077         (free_growth_caches): Likewise.
4078         (do_estimate_edge_time): Use edge_growth_cache.
4079         (do_estimate_edge_size): Likewise.
4080         (do_estimate_edge_hints): Likewise.
4081         * ipa-inline.c (reset_edge_caches): Likewise.
4082         (recursive_inlining): Likewise.
4083         (inline_small_functions): Likewise.
4084         * ipa-inline.h (initialize_growth_caches): Remove.
4085         (estimate_edge_size): Likewise.
4086         (estimate_edge_time): Likewise.
4087         (estimate_edge_hints): Likewise.
4088         (reset_edge_growth_cache): Likewise.
4089         * symbol-summary.h (call_summary::remove): New method.
4091 2018-06-08  Martin Liska  <mliska@suse.cz>
4093         * ipa-cp.c (class edge_clone_summary): New summary.
4094         (grow_edge_clone_vectors): Remove.
4095         (ipcp_edge_duplication_hook): Remove.
4096         (class edge_clone_summary_t): New call_summary class.
4097         (ipcp_edge_removal_hook): Remove.
4098         (edge_clone_summary_t::duplicate): New function.
4099         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4100         (create_specialized_node): Likewise.
4101         (ipcp_driver): Initialize edge_clone_summaries and do not
4102         register hooks.
4104 2018-06-08  Martin Liska  <mliska@suse.cz>
4106         * symbol-summary.h (get): New function.
4107         (call_summary::m_initialize_when_cloning): New class member.
4109 2018-06-08  Martin Liska  <mliska@suse.cz>
4111         * cgraph.c (cgraph_node::remove): Do not recycle uid.
4112         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4113         (symbol_table::allocate_cgraph_symbol): Do not set uid.
4114         * passes.c (uid_hash_t): Record removed_nodes by their uids.
4115         (remove_cgraph_node_from_order): Use the removed_nodes set.
4116         (do_per_function_toporder): Likwise.
4117         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4118         instead of summary_uid.
4119         (symtab_removal): Likewise.
4120         (symtab_duplication): Likewise.
4122 2018-06-08  Martin Liska  <mliska@suse.cz>
4124         * ipa-cp.c (ipcp_store_bits_results): Use
4125         ipcp_transformation_sum.
4126         (ipcp_store_vr_results): Likewise.
4127         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4128         to ...
4129         (ipcp_transformation_initialize): ... this.
4130         (ipa_set_node_agg_value_chain):
4131         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4132         (write_ipcp_transformation_info): Likewise.
4133         (read_ipcp_transformation_info): Likewise.
4134         (ipcp_update_bits): Likewise.
4135         (ipcp_update_vr): Likewise.
4136         (ipcp_transform_function): Likewise.
4137         * ipa-prop.h: Rename ipcp_transformation_summary to
4138         ipcp_transformation.
4139         (class ipcp_transformation_t): New function summary.
4140         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4141         (ipa_get_agg_replacements_for_node): Likewise.
4143 2018-06-08  Martin Liska  <mliska@suse.cz>
4145         * ipa-pure-const.c (struct funct_state_d): Do it class instead
4146         of struct.
4147         (class funct_state_summary_t): New function_summary class.
4148         (has_function_state): Remove.
4149         (get_function_state): Likewise.
4150         (set_function_state): Likewise.
4151         (add_new_function): Likewise.
4152         (funct_state_summary_t::insert): New function.
4153         (duplicate_node_data): Remove.
4154         (remove_node_data): Remove.
4155         (funct_state_summary_t::duplicate): New function.
4156         (register_hooks): Create new funct_state_summaries.
4157         (pure_const_generate_summary): Use it.
4158         (pure_const_write_summary): Likewise.
4159         (pure_const_read_summary): Likewise.
4160         (propagate_pure_const): Likewise.
4161         (propagate_nothrow): Likewise.
4162         (dump_malloc_lattice): Likewise.
4163         (propagate_malloc): Likewise.
4164         (execute): Do not register hooks, just remove summary
4165         instead.
4166         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4167         constructor.
4169 2018-06-08  Martin Liska  <mliska@suse.cz>
4171         * ipa-reference.c (remove_node_data): Remove.
4172         (duplicate_node_data): Likewise.
4173         (class ipa_ref_var_info_summary_t): New class.
4174         (class ipa_ref_opt_summary_t): Likewise.
4175         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4176         (get_reference_optimization_summary): Use
4177         ipa_ref_opt_sum_summaries.
4178         (set_reference_vars_info): Remove.
4179         (set_reference_optimization_summary): Likewise.
4180         (ipa_init): Create summaries.
4181         (init_function_info): Use function summary.
4182         (ipa_ref_opt_summary_t::duplicate): New function.
4183         (ipa_ref_opt_summary_t::remove): New function.
4184         (get_read_write_all_from_node): Fix GNU coding style.
4185         (propagate): Use function summary.
4186         (write_node_summary_p): Fix GNU coding style.
4187         (stream_out_bitmap): Likewise.
4188         (ipa_reference_read_optimization_summary): Use function summary.
4189         (ipa_reference_c_finalize): Do not release hooks.
4191 2018-06-08  Martin Liska  <mliska@suse.cz>
4193         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4194         (analyze_function_body): Extract multiple calls of get_create.
4195         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4196         * ipa-inline.c (recursive_inlining): Use ::get method.
4197         * ipa-inline.h (estimate_edge_growth): Likewise.
4199 2018-06-08  Martin Liska  <mliska@suse.cz>
4201         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4202         HSA_INVALID.
4203         (hsa_function_summary::hsa_function_summary): Use the new enum
4204         value.
4205         (hsa_gpu_implementation_p): Use hsa_summaries::get.
4206         * hsa-gen.c (hsa_get_host_function): Likewise.
4207         (get_brig_function_name): Likewise.
4208         * ipa-hsa.c (process_hsa_functions): Likewise.
4209         (ipa_hsa_write_summary): Likewise.
4210         * symbol-summary.h (symtab_duplication): Use ::get function/
4211         (get): New function.
4213 2018-06-08  Martin Liska  <mliska@suse.cz>
4215         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4216         of get.
4217         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4218         (hsa_register_kernel): Likewise.
4219         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4220         * hsa-gen.c (hsa_get_host_function): Likewise.
4221         (get_brig_function_name): Likewise.
4222         (generate_hsa): Likewise.
4223         (pass_gen_hsail::execute): Likewise.
4224         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4225         (devirtualization_time_bonus): Likewise.
4226         (ipcp_propagate_stage): Likewise.
4227         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4228         (edge_set_predicate): Likewise.
4229         (evaluate_conditions_for_known_args): Likewise.
4230         (evaluate_properties_for_edge): Likewise.
4231         (ipa_fn_summary::reset): Likewise.
4232         (ipa_fn_summary_t::duplicate): Likewise.
4233         (dump_ipa_call_summary): Likewise.
4234         (ipa_dump_fn_summary): Likewise.
4235         (analyze_function_body): Likewise.
4236         (compute_fn_summary): Likewise.
4237         (estimate_edge_devirt_benefit): Likewise.
4238         (estimate_edge_size_and_time): Likewise.
4239         (estimate_calls_size_and_time): Likewise.
4240         (estimate_node_size_and_time): Likewise.
4241         (inline_update_callee_summaries): Likewise.
4242         (remap_edge_change_prob): Likewise.
4243         (remap_edge_summaries): Likewise.
4244         (ipa_merge_fn_summary_after_inlining): Likewise.
4245         (ipa_update_overall_fn_summary): Likewise.
4246         (read_ipa_call_summary): Likewise.
4247         (inline_read_section): Likewise.
4248         (write_ipa_call_summary): Likewise.
4249         (ipa_fn_summary_write): Likewise.
4250         (ipa_free_fn_summary): Likewise.
4251         * ipa-hsa.c (process_hsa_functions): Likewise.
4252         (ipa_hsa_write_summary): Likewise.
4253         (ipa_hsa_read_section): Likewise.
4254         * ipa-icf.c (sem_function::merge): Likewise.
4255         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4256         (do_estimate_edge_time): Likewise.
4257         (estimate_size_after_inlining): Likewise.
4258         (estimate_growth): Likewise.
4259         (growth_likely_positive): Likewise.
4260         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4261         (inline_call): Likewise.
4262         * ipa-inline.c (caller_growth_limits): Likewise.
4263         (can_inline_edge_p): Likewise.
4264         (can_inline_edge_by_limits_p): Likewise.
4265         (compute_uninlined_call_time): Likewise.
4266         (compute_inlined_call_time): Likewise.
4267         (want_inline_small_function_p): Likewise.
4268         (edge_badness): Likewise.
4269         (update_caller_keys): Likewise.
4270         (update_callee_keys): Likewise.
4271         (recursive_inlining): Likewise.
4272         (inline_small_functions): Likewise.
4273         (inline_to_all_callers_1): Likewise.
4274         (dump_overall_stats): Likewise.
4275         (early_inline_small_functions): Likewise.
4276         (early_inliner): Likewise.
4277         * ipa-inline.h (estimate_edge_growth): Likewise.
4278         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4279         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4280         * ipa-prop.h (IPA_NODE_REF): Likewise.
4281         (IPA_EDGE_REF): Likewise.
4282         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4283         (propagate_malloc): Likewise.
4284         * ipa-split.c (execute_split_functions): Likewise.
4285         * symbol-summary.h: Rename get to get_create.
4286         (get): Likewise.
4287         (get_create): Likewise.
4288         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4290 2018-06-08  Martin Liska  <mliska@suse.cz>
4292         * symbol-summary.h (release): Move definition out of class
4293         declaration.
4294         (symtab_removal): Likewise.
4295         (symtab_duplication): Likewise.
4297 2018-06-08  Martin Liska  <mliska@suse.cz>
4299         * symbol-summary.h (function_summary): Move constructor
4300         implementation out of class declaration.
4301         (release): Likewise.
4302         (symtab_insertion): Likewise.
4303         (symtab_removal): Likewise.
4304         (symtab_duplication): Likewise.
4305         (get): Likewise.
4307 2018-06-08  Martin Liska  <mliska@suse.cz>
4309         * Makefile.in: Remove support for MPX (macros, related functions,
4310         fields in cgraph_node, ...).
4311         * builtin-types.def (BT_BND): Likewise.
4312         (BT_FN_BND_CONST_PTR): Likewise.
4313         (BT_FN_CONST_PTR_BND): Likewise.
4314         (BT_FN_VOID_PTR_BND): Likewise.
4315         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4316         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4317         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4318         (expand_builtin_mempcpy_with_bounds): Likewise.
4319         (expand_builtin_memset_with_bounds): Likewise.
4320         (expand_builtin_memset_args): Likewise.
4321         (std_expand_builtin_va_start): Likewise.
4322         (expand_builtin): Likewise.
4323         (expand_builtin_with_bounds): Likewise.
4324         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4325         (DEF_LIB_BUILTIN_CHKP): Likewise.
4326         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4327         (DEF_CHKP_BUILTIN): Likewise.
4328         (BUILT_IN_MEMCPY): Likewise.
4329         (BUILT_IN_MEMMOVE): Likewise.
4330         (BUILT_IN_MEMPCPY): Likewise.
4331         (BUILT_IN_MEMSET): Likewise.
4332         (BUILT_IN_STPCPY): Likewise.
4333         (BUILT_IN_STRCAT): Likewise.
4334         (BUILT_IN_STRCHR): Likewise.
4335         (BUILT_IN_STRCPY): Likewise.
4336         (BUILT_IN_STRLEN): Likewise.
4337         (BUILT_IN_MEMCPY_CHK): Likewise.
4338         (BUILT_IN_MEMMOVE_CHK): Likewise.
4339         (BUILT_IN_MEMPCPY_CHK): Likewise.
4340         (BUILT_IN_MEMSET_CHK): Likewise.
4341         (BUILT_IN_STPCPY_CHK): Likewise.
4342         (BUILT_IN_STRCAT_CHK): Likewise.
4343         (BUILT_IN_STRCPY_CHK): Likewise.
4344         * calls.c (store_bounds): Likewise.
4345         (emit_call_1): Likewise.
4346         (special_function_p): Likewise.
4347         (maybe_warn_nonstring_arg): Likewise.
4348         (initialize_argument_information): Likewise.
4349         (finalize_must_preallocate): Likewise.
4350         (compute_argument_addresses): Likewise.
4351         (expand_call): Likewise.
4352         * cfgexpand.c (expand_call_stmt): Likewise.
4353         (expand_return): Likewise.
4354         (expand_gimple_stmt_1): Likewise.
4355         (pass_expand::execute): Likewise.
4356         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4357         (cgraph_node::remove): Likewise.
4358         (cgraph_node::dump): Likewise.
4359         (cgraph_node::verify_node): Likewise.
4360         * cgraph.h (chkp_function_instrumented_p): Likewise.
4361         (symtab_node::get_alias_target): Likewise.
4362         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4363         (cgraph_local_p): Likewise.
4364         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4365         (cgraph_edge::rebuild_references): Likewise.
4366         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4367         (walk_polymorphic_call_targets): Likewise.
4368         (cgraph_node::expand_thunk): Likewise.
4369         (symbol_table::output_weakrefs): Likewise.
4370         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4371         (ix86_handle_option): Likewise.
4372         * config/i386/constraints.md: Likewise.
4373         * config/i386/i386-builtin-types.def (BND): Likewise.
4374         (VOID): Likewise.
4375         (PVOID): Likewise.
4376         (ULONG): Likewise.
4377         * config/i386/i386-builtin.def (BDESC_END): Likewise.
4378         (BDESC_FIRST): Likewise.
4379         (BDESC): Likewise.
4380         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4381         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4382         * config/i386/i386.c (enum reg_class): Likewise.
4383         (ix86_target_string): Likewise.
4384         (ix86_option_override_internal): Likewise.
4385         (ix86_conditional_register_usage): Likewise.
4386         (ix86_valid_target_attribute_inner_p): Likewise.
4387         (ix86_set_indirect_branch_type): Likewise.
4388         (ix86_set_current_function): Likewise.
4389         (ix86_function_arg_regno_p): Likewise.
4390         (init_cumulative_args): Likewise.
4391         (ix86_function_arg_advance): Likewise.
4392         (ix86_function_arg): Likewise.
4393         (ix86_pass_by_reference): Likewise.
4394         (ix86_function_value_regno_p): Likewise.
4395         (ix86_function_value_1): Likewise.
4396         (ix86_function_value_bounds): Likewise.
4397         (ix86_return_in_memory): Likewise.
4398         (ix86_setup_incoming_vararg_bounds): Likewise.
4399         (ix86_va_start): Likewise.
4400         (indirect_thunk_need_prefix): Likewise.
4401         (print_reg): Likewise.
4402         (ix86_print_operand): Likewise.
4403         (ix86_expand_call): Likewise.
4404         (ix86_output_function_return): Likewise.
4405         (reg_encoded_number): Likewise.
4406         (BDESC_VERIFYS): Likewise.
4407         (ix86_init_mpx_builtins): Likewise.
4408         (ix86_init_builtins): Likewise.
4409         (ix86_emit_cmove): Likewise.
4410         (ix86_emit_move_max): Likewise.
4411         (ix86_expand_builtin): Likewise.
4412         (ix86_builtin_mpx_function): Likewise.
4413         (ix86_get_arg_address_for_bt): Likewise.
4414         (ix86_load_bounds): Likewise.
4415         (ix86_store_bounds): Likewise.
4416         (ix86_load_returned_bounds): Likewise.
4417         (ix86_store_returned_bounds): Likewise.
4418         (ix86_class_likely_spilled_p): Likewise.
4419         (ix86_hard_regno_mode_ok): Likewise.
4420         (x86_order_regs_for_local_alloc): Likewise.
4421         (ix86_mitigate_rop): Likewise.
4422         (ix86_bnd_prefixed_insn_p): Likewise.
4423         (ix86_mpx_bound_mode): Likewise.
4424         (ix86_make_bounds_constant): Likewise.
4425         (ix86_initialize_bounds): Likewise.
4426         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4427         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4428         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4429         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4430         (TARGET_CHKP_BOUND_MODE): Likewise.
4431         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4432         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4433         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4434         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4435         * config/i386/i386.h (TARGET_MPX): Likewise.
4436         (TARGET_MPX_P): Likewise.
4437         (VALID_BND_REG_MODE): Likewise.
4438         (FIRST_BND_REG): Likewise.
4439         (LAST_BND_REG): Likewise.
4440         (enum reg_class): Likewise.
4441         (BND_REG_P): Likewise.
4442         (BND_REGNO_P): Likewise.
4443         (BNDmode): Likewise.
4444         (ADJUST_INSN_LENGTH): Likewise.
4445         * config/i386/i386.md: Likewise.
4446         * config/i386/i386.opt: Likewise.
4447         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4448         (defined): Likewise.
4449         (LINK_MPX): Likewise.
4450         (MPX_SPEC): Likewise.
4451         (LIBMPX_SPEC): Likewise.
4452         (LIBMPXWRAPPERS_SPEC): Likewise.
4453         (CHKP_SPEC): Likewise.
4454         * config/i386/predicates.md: Likewise.
4455         * dbxout.c (dbxout_type): Likewise.
4456         * doc/extend.texi: Likewise.
4457         * doc/invoke.texi: Likewise.
4458         * doc/md.texi: Likewise.
4459         * doc/tm.texi: Likewise.
4460         * doc/tm.texi.in: Likewise.
4461         * dwarf2out.c (is_base_type): Likewise.
4462         (gen_formal_types_die): Likewise.
4463         (gen_subprogram_die): Likewise.
4464         (gen_type_die_with_usage): Likewise.
4465         (gen_decl_die): Likewise.
4466         (dwarf2out_late_global_decl): Likewise.
4467         * expr.c (expand_assignment): Likewise.
4468         (emit_storent_insn): Likewise.
4469         (store_expr_with_bounds): Likewise.
4470         (store_expr): Likewise.
4471         (expand_expr_real_1): Likewise.
4472         * expr.h (store_expr_with_bounds): Likewise.
4473         * function.c (use_register_for_decl): Likewise.
4474         (struct bounds_parm_data): Likewise.
4475         (assign_parms_augmented_arg_list): Likewise.
4476         (assign_parm_find_entry_rtl): Likewise.
4477         (assign_parm_is_stack_parm): Likewise.
4478         (assign_parm_load_bounds): Likewise.
4479         (assign_bounds): Likewise.
4480         (assign_parms): Likewise.
4481         (expand_function_start): Likewise.
4482         * gcc.c (CHKP_SPEC): Likewise.
4483         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4484         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4485         (wrestrict_dom_walker::check_call): Likewise.
4486         * gimple.c (gimple_build_call_from_tree): Likewise.
4487         * gimple.h (enum gf_mask): Likewise.
4488         (gimple_call_with_bounds_p): Likewise.
4489         (gimple_call_set_with_bounds): Likewise.
4490         * gimplify.c (gimplify_init_constructor): Likewise.
4491         * ipa-cp.c (initialize_node_lattices): Likewise.
4492         (propagate_constants_across_call): Likewise.
4493         (find_more_scalar_values_for_callers_subset): Likewise.
4494         * ipa-hsa.c (process_hsa_functions): Likewise.
4495         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4496         * ipa-icf.c (sem_function::merge): Likewise.
4497         * ipa-inline.c (early_inliner): Likewise.
4498         * ipa-pure-const.c (warn_function_noreturn): Likewise.
4499         (warn_function_cold): Likewise.
4500         (propagate_pure_const): Likewise.
4501         * ipa-ref.h (enum GTY): Likewise.
4502         * ipa-split.c (find_retbnd): Likewise.
4503         (consider_split): Likewise.
4504         (split_function): Likewise.
4505         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4506         * ipa.c (walk_polymorphic_call_targets): Likewise.
4507         (symbol_table::remove_unreachable_nodes): Likewise.
4508         (process_references): Likewise.
4509         (cgraph_build_static_cdtor_1): Likewise.
4510         * lto-cgraph.c (lto_output_node): Likewise.
4511         (output_refs): Likewise.
4512         (compute_ltrans_boundary): Likewise.
4513         (input_overwrite_node): Likewise.
4514         (input_node): Likewise.
4515         (input_cgraph_1): Likewise.
4516         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4517         * passes.c (pass_manager::execute_early_local_passes): Likewise.
4518         (class pass_chkp_instrumentation_passes): Likewise.
4519         (make_pass_chkp_instrumentation_passes): Likewise.
4520         * passes.def: Likewise.
4521         * rtl.h (struct GTY): Likewise.
4522         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4523         * stor-layout.c (layout_type): Likewise.
4524         * symtab.c: Likewise.
4525         * target.def: Likewise.
4526         * targhooks.c (default_chkp_bound_type): Likewise.
4527         (default_chkp_bound_mode): Likewise.
4528         (default_builtin_chkp_function): Likewise.
4529         (default_chkp_function_value_bounds): Likewise.
4530         (default_chkp_make_bounds_constant): Likewise.
4531         (default_chkp_initialize_bounds): Likewise.
4532         * targhooks.h (default_chkp_bound_type): Likewise.
4533         (default_chkp_bound_mode): Likewise.
4534         (default_builtin_chkp_function): Likewise.
4535         (default_chkp_function_value_bounds): Likewise.
4536         (default_chkp_make_bounds_constant): Likewise.
4537         (default_chkp_initialize_bounds): Likewise.
4538         * toplev.c (compile_file): Likewise.
4539         (process_options): Likewise.
4540         * tree-core.h (DEF_BUILTIN): Likewise.
4541         (DEF_BUILTIN_CHKP): Likewise.
4542         * tree-inline.c (declare_return_variable): Likewise.
4543         (remap_gimple_stmt): Likewise.
4544         (copy_bb): Likewise.
4545         (initialize_inlined_parameters): Likewise.
4546         (expand_call_inline): Likewise.
4547         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4548         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4549         (make_pass_ipa_chkp_produce_thunks): Likewise.
4550         (make_pass_chkp): Likewise.
4551         (make_pass_chkp_opt): Likewise.
4552         (make_pass_chkp_instrumentation_passes): Likewise.
4553         * tree-pretty-print.c (dump_generic_node): Likewise.
4554         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4555         * tree-ssa-dce.c (propagate_necessity): Likewise.
4556         (eliminate_unnecessary_stmts): Likewise.
4557         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4558         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4559         * tree-ssa-sccvn.h: Likewise.
4560         * tree-ssa-strlen.c (get_string_length): Likewise.
4561         (valid_builtin_call): Likewise.
4562         (adjust_last_stmt): Likewise.
4563         (handle_builtin_strchr): Likewise.
4564         (handle_builtin_strcpy): Likewise.
4565         (handle_builtin_stxncpy): Likewise.
4566         (handle_builtin_memcpy): Likewise.
4567         (handle_builtin_strcat): Likewise.
4568         (strlen_check_and_optimize_stmt): Likewise.
4569         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4570         * tree-streamer-in.c: Likewise.
4571         * tree-streamer.c (record_common_node): Likewise.
4572         * tree.c (tree_code_size): Likewise.
4573         (wide_int_to_tree_1): Likewise.
4574         (type_contains_placeholder_1): Likewise.
4575         (build_common_tree_nodes): Likewise.
4576         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4577         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4578         (POINTER_BOUNDS_P): Likewise.
4579         (BOUNDED_TYPE_P): Likewise.
4580         (BOUNDED_P): Likewise.
4581         (CALL_WITH_BOUNDS_P): Likewise.
4582         (pointer_bounds_type_node): Likewise.
4583         * value-prof.c (gimple_ic): Likewise.
4584         * var-tracking.c (vt_add_function_parameters): Likewise.
4585         * varasm.c (make_decl_rtl): Likewise.
4586         (assemble_start_function): Likewise.
4587         (output_constant): Likewise.
4588         (maybe_assemble_visibility): Likewise.
4589         * varpool.c (ctor_for_folding): Likewise.
4590         * chkp-builtins.def: Remove.
4591         * ipa-chkp.c: Remove.
4592         * ipa-chkp.h: Remove.
4593         * rtl-chkp.c: Remove.
4594         * rtl-chkp.h: Remove.
4595         * tree-chkp-opt.c: Remove.
4596         * tree-chkp.c: Remove.
4597         * tree-chkp.h: Remove.
4599 2018-06-07  Carl Love  <cel@us.ibm.com>
4601         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4602         vextract_fp_from_shortl): Add BE support.
4604 2018-06-07  Paul Koning  <ni1d@arrl.net>
4606         * compare-elim.c (try_merge_compare): Don't merge compare if
4607         address contains a side effect.
4608         (try_eliminate_compare): Likewise.
4610 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
4612         * config.gcc: Support "tremont".
4613         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4614         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4615         PROCESSOR_TREMONT.
4616         * config/i386/i386.c (m_TREMONT): Define.
4617         (processor_target_table): Add "tremont".
4618         (PTA_TREMONT): Define.
4619         (ix86_lea_outperforms): Add TARGET_TREMONT.
4620         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4621         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4622         and M_INTEL_GOLDMONT_PLUS.
4623         (fold_builtin_cpu): Add "tremont".
4624         (ix86_add_stmt_cost): Add TARGET_TREMONT.
4625         (ix86_option_override_internal): Add "tremont".
4626         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4627         (processor_type): Add PROCESSOR_TREMONT.
4628         * config/i386/x86-tune.def: Add m_TREMONT.
4629         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4631 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4633         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4634         symbol defined for msp430i* devices to be lower case.
4636         gcc/testsuite/gcc.target/msp430/
4637         * msp430i-device-symbol.c: New test.
4638         * msp430f-device-symbol.c: New test.
4639         * msp430.h: New test header file.
4641 2018-06-07  Richard Biener  <rguenther@suse.de>
4643         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4644         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
4645         Properly wrap signed arithmetic if overflow wraps.
4647 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
4649         PR tree-optimization/69615
4650         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4651         of a cast from a same precision integral SSA_NAME in a bb dominated
4652         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
4653         cast to utype if rhs2 has already a compatible type.
4655 2018-06-07  Richard Biener  <rguenther@suse.de>
4657         PR tree-optimization/85935
4658         * graphite-scop-detection.c (find_params_in_bb): Analyze
4659         condition operands with respect to the correct loop.  Assert
4660         the analysis doesn't fail.
4662 2018-06-04  Carl Love  <cel@us.ibm.com>
4664         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4665         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
4666         as it is slightly cheaper.
4667         (first_match_or_eos_index_<mode>):
4668         Calculate index using natural element order.
4669         (first_match_index_<mode>):
4670         Calculate index using natural element order.
4671         (first_match_or_eos_index_<mode>):
4672         Calculate index using natural order.
4673         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4674         for BE and LE modes.
4675         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4676         P9V_BUILTIN_VCLZLSBB_V16QI.
4677         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4678         specific.
4680 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4682         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4683         indentation and line wrap for many prototypes.  Add missing
4684         @smallexample directives around block of prototypes for vec_xl and
4685         vec_xst.
4687 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
4689         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4690         track if we pass or return IEEE 128-bit floating point.
4691         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4692         C++ mangling that is compatible with GCC 8.1.
4693         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4694         (init_cumulative_args): Note if we pass or return IEEE 128-bit
4695         floating point types.
4696         (rs6000_function_arg_advance_1): Likewise.
4697         (rs6000_mangle_type): Optionally generate mangled names that match
4698         what GCC 8.1 generated for IEEE 128-bit floating point types.
4699         (rs6000_globalize_decl_name): If we have an external function that
4700         passes or returns IEEE 128-bit types, generate a weak reference
4701         from the mangled name used in GCC 8.1 to the current mangled
4702         name.
4703         (rs6000_init_builtins): Make __ibm128 use the long double type if
4704         long double is IBM extended double.  Make __float128 use the long
4705         double type if long double is IEEE 128-bit.
4707         PR target/85657
4708         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4709         macro for __ibm128 built-in functions.
4710         (PACK_IF): Add __ibm128 pack/unpack functions.
4711         (UNPACK_IF): Likewise.
4712         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4713         enable long double built-in functions if long double is IEEE
4714         128-bit floating point.
4715         (rs6000_invalid_builtin): Update long double built-in function
4716         error message.
4717         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4718         functions, adjust the built-in function to use the long double
4719         built-in function if __ibm128 and long double are the same type.
4720         * doc/extend.texi (PowerPC builtins): Update documention for
4721         __builtin_{,un}pack_longdouble.  Add documentation for
4722         __builtin_{,un}pack_ibm128.
4724 2018-06-06  Jim Wilson  <jimw@sifive.com>
4726         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4727         (struct machine_function): New field interrupt_mode.
4728         (riscv_handle_type_attribute): New function.  Add forward declaration.
4729         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4730         (riscv_expand_epilogue): Check interrupt_mode field.
4731         (riscv_set_current_function): Check interrupt attribute args and
4732         set interrupt_mode field.
4733         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4734         (riscv_sret, riscv_uret): New.
4735         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4736         new arguments to interrupt attribute.
4738 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
4740         PR target/63177
4741         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4742         Don't handle -mcpu=power8 if -mpower9-vector is also used.
4744 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4746         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4747         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4748         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4749         several redundant entries.
4751 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
4753         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4754         type from "rtx" to "rtx_insn *".
4755         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4756         for local "call_insn", removing cast.
4757         (ix86_expand_call): Likewise, introducing a "call_insn" local.
4759 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4761         PR tree-optimization/86066
4762         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4763         for BIT_INSERT_EXPR stores.
4765 2018-06-06  Richard Biener  <rguenther@suse.de>
4767         PR tree-optimization/86062
4768         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4769         component refs ontop
4770         of to be offsetted base.
4772 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4774         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4775         to be static and remove check on interrupt attribute name.
4777         gcc/testsuite/gcc.target/msp430/
4778         * function-attributes-4.c: New test.
4779         * static-interrupts.c: New test.
4781 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4783         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4784         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4786 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
4788         PR target/79924
4789         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4790         second argument.
4791         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4792         Remove second argument, change how error is called.
4793         (aarch64_layout_arg): Remove second argument from
4794         aarch64_err_no_fpadvsimd call.
4795         (aarch64_init_cumulative_args): Ditto.
4796         (aarch64_gimplify_va_arg_expr): Ditto.
4797         * config/aarch64/aarch64.md (mov<mode>): Ditto.
4799 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
4801         * config/i386/i386.md (simple_return_indirect_internal): New expander.
4802         (*simple_return_indirect_internal<mode>): Rename from
4803         simple_return_indirect_internal.  Use W mode iterator.
4804         (rstorssp): New expander.
4805         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
4806         (clrssbsy): New expander.
4807         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
4809 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4811         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4812         __typeof__.
4813         (cmse_check_pointed_object): Likewise.
4815 2018-06-05  Martin Liska  <mliska@suse.cz>
4817         PR gcov-profile/47618
4818         * doc/invoke.texi: Document how -fprofile-dir format
4819         is extended.
4821 2018-06-05  Richard Biener  <rguenther@suse.de>
4823         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4824         removal pretend DOM info isn't available so we do not update
4825         it and only remove edges, not dominated blocks.  Actually free
4826         DOM info in case we removed something.  Remove unreachable blocks.
4827         (mfb_keep_latches): Work with either DOM info or marked backedges.
4828         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4829         first.  Mark backedges if DOM info isn't available.
4830         (Re-)compute DOM info after cleanup_control_flow_pre.
4832 2018-06-05  Richard Biener  <rguenther@suse.de>
4834         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4835         (locus_discrim_hasher::hash): Adjust.
4836         (locus_discrim_hasher::equal): Likewise.
4837         (next_discriminator_for_locus): Work on line directly.
4838         (same_line_p): Pass in expanded locus1 as well.
4839         (assign_discriminators): Avoid redundant location expansions.
4841 2018-06-05  Richard Biener  <rguenther@suse.de>
4843         PR tree-optimization/86046
4844         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4845         if required after clearing TREE_ADDRESSABLE.
4847 2018-06-05  Richard Biener  <rguenther@suse.de>
4849         PR tree-optimization/86047
4850         * tree-ssa-loop.c (for_each_index): Glob handling of all
4851         decls and constants and really handle all of them.
4853 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4855         PR target/81497
4856         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4857         qualifier_void_pointer and qualifier_const_void_pointer.
4858         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4859         (arm_init_builtins): Handle the above.
4860         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4861         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4862         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4863         void intrinsics.
4865 2018-06-05  Martin Liska  <mliska@suse.cz>
4867         * auto-profile.c (read_autofdo_file): Do not use
4868         gcov_ctr_summary struct.
4869         (afdo_callsite_hot_enough_for_early_inline): Likewise.
4870         * coverage.c (struct counts_entry): Likewise.
4871         (read_counts_file): Read just single summary entry.
4872         (get_coverage_counts): Use gcov_summary struct.
4873         * coverage.h (get_coverage_counts): Likewise.
4874         * gcov-dump.c (dump_working_sets): Likewise.
4875         (tag_summary): Dump just single summary.
4876         * gcov-io.c (gcov_write_summary): Write just histogram
4877         summary.
4878         (gcov_read_summary): Read just single summary.
4879         (compute_working_sets): Use gcov_summary struct.
4880         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4881         of GCOV_COUNTERS_SUMMABLE.
4882         (GCOV_COUNTERS_SUMMABLE): Remove.
4883         (GCOV_FIRST_VALUE_COUNTER): Replace with
4884         GCOV_COUNTER_V_INTERVAL.
4885         (struct gcov_ctr_summary): Remove.
4886         (struct gcov_summary): Directly use fields of former
4887         gcov_ctr_summary.
4888         (compute_working_sets): Use gcov_summary struct.
4889         * gcov.c (read_count_file): Do not use ctrs fields.
4890         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4891         struct.
4892         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4893         struct.
4894         * profile.c: Likewise.
4895         * profile.h: Likewise.
4897 2018-06-05  Martin Liska  <mliska@suse.cz>
4899         PR gcov-profile/84846
4900         * gcov.c (output_lines): Print working directory only
4901         in intermediate format.
4903 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
4905         * config/s390/s390-builtin-types.def: Add void function type.
4906         * config/s390/s390-builtins.def: Use the function type for the
4907         tbeginc builtin.
4909 2018-06-04  Jim Wilson  <jimw@sifive.com>
4911         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4912         to int.
4913         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4914         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
4915         handle EH_RETURN_DATA_REGNO registers properly.
4916         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4917         (riscv_expand_epilogue): Update comment.  Change argument name and
4918         type.  Update code to use new name and type.  Pass new args to
4919         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
4920         EXCEPTION_RETURN.
4921         * config/riscv/riscv.md (NORMAL_RETURN): New.
4922         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4923         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4924         (eh_return): Call gen_eh_return_internal and emit barrier.
4925         (eh_return_internal): Call riscv_expand_epilogue.
4927 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
4929         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4930         bit_insertion field and declare can_be_merged_into method.
4931         (merged_store_group::can_be_merged_into): New method.
4932         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4933         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
4934         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4936 2018-06-04  Richard Biener  <rguenther@suse.de>
4938         PR tree-optimization/85955
4939         * builtins.c (fold_builtin_sincos): Convert pointers to
4940         destination to appropriate type before dereferencing.
4942 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
4944         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4946 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
4948         * expr.c (expand_expr_real_1): Force the operand into memory if
4949         its TYPE_MODE is BLKmode and if there is no integer mode for
4950         the number of bits being extracted.
4952 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4954         PR target/85832
4955         PR target/86036
4956         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4957         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4959 2018-06-04  Richard Biener  <rguenther@suse.de>
4961         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4962         (cleanup_tree_cfg_noloop): ... single caller.  Do
4963         start_recording_case_labels later.
4965 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
4967         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4968         to _IMMINTRIN_H_INCLUDED.
4969         * config/i386/pconfigintrin.h: Ditto.
4970         * config/i386/waitpkgintrin.h: Ditto.
4971         * config/i386/immintrin.h: Add includes for sgxintrin.h,
4972         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4973         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4974         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4975         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4976         waitpkgintrin.h and cldemoteintrin.h.
4978 2018-06-04  Richard Biener  <rguenther@suse.de>
4980         PR tree-optimization/86038
4981         * tracer.c (find_best_successor): Check probability for
4982         being initialized, bail out if not.
4984 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
4986         PR target/86003
4987         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4988         of bits to ignore when comparing architectures.
4990 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4992         PR tree-optimization/69615
4993         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4994         maximum or minimum of the type, try to merge it also as if
4995         range1 is + [-, x - 1] or + [x + 1, -].
4997         PR c++/86025
4998         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5000 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5002         PR tree-optimization/86034
5003         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5004         the unsigned bitfield type in a bit insertion sequence if it does not
5005         have a larger precision than the bitfield size.
5006         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5008 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
5010         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5012 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5014         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5015         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5016         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5017         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5019 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5021         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5022         Disable -fdelete-null-pointer-checks for ELF toolchain.
5024 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5025             Kito Cheng  <kito.cheng@gmail.com>
5027         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5028         (nds32le-*-*, nds32be-*-*): Integrate checking process.
5029         (nds32*-*-*): Add glibc and uclibc conditions.
5030         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5031         (TARGET_EXCEPT_UNWIND_INFO): Define.
5032         * config/nds32/elf.h: New file.
5033         * config/nds32/linux.h: New file.
5034         * config/nds32/nds32-elf.opt: New file.
5035         * config/nds32/nds32-linux.opt: New file.
5036         * config/nds32/nds32-fp-as-gp.c
5037         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5038         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5039         TARGET_LINUX_ABI.
5040         (nds32_asm_file_end): Ditto.
5041         (nds32_print_operand): Ditto.
5042         (nds32_insert_attributes): Ditto.
5043         (nds32_init_libfuncs): New function.
5044         (TARGET_HAVE_TLS): Define.
5045         (TARGET_INIT_LIBFUNCS): Define.
5046         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5047         spec content.
5048         (TARGET_ELF): Apply different mcmodel setting.
5049         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5050         been migrated into elf.h and linux.h files.
5051         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5052         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5053         (mcmodel): The content has been migrated into nds32-elf.opt and
5054         nds32-linux.opt files.
5055         * config/nds32/t-elf: New file.
5056         * config/nds32/t-linux: New file.
5058 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5059             Shiva Chen  <shiva0217@gmail.com>
5061         * config/nds32/constants.md (unspec_volatile_element): Add
5062         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5063         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5064         optimization.
5065         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5066         (make_pass_nds32_fp_as_gp): Declare.
5067         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5068         optmization pass.
5069         (nds32_asm_function_end_prologue): Remove unused asm output.
5070         (nds32_asm_function_begin_epilogue): Remove unused asm output.
5071         (nds32_asm_file_start): Output necessary fp_as_gp information.
5072         (nds32_option_override): Adjust register usage.
5073         (nds32_expand_prologue): Consider fp_as_gp situation.
5074         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5075         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5076         (epilogue): Ditto.
5077         (return): Ditto.
5078         (simple_return): Ditto.
5079         (omit_fp_begin): Output special directive for fp_as_gp.
5080         (omit_fp_end): Output special directive for fp_as_gp.
5081         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5082         mforbid-fp-as-gp): New options.
5084 2018-06-01  Mark Wielaard  <mark@klomp.org>
5086         * dwarf2out.c (dwarf2out_finish): Remove generation of
5087         DW_AT_loclists_base.
5089 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5091         * gimple-ssa-store-merging.c: Include gimple-fold.h.
5092         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5093         (struct merged_store_group): Add bit_insertion field.
5094         (dump_char_array): Use standard hexadecimal format.
5095         (merged_store_group::merged_store_group): Set bit_insertion to false.
5096         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
5097         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
5098         also print the mask in the dump file.
5099         (pass_store_merging::gate): Minor tweak.
5100         (imm_store_chain_info::coalesce_immediate): Fix wrong association
5101         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
5102         stores with INTEGER_CST stores.
5103         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5104         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5105         and use it throughout.  Generate bit insertion sequences if need be.
5106         (pass_store_merging::process_store): Remove redundant condition.
5107         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5109 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
5111         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5112         the 128-bit floating point types.  Fix function comment.
5114 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5116         * config/aarch64/aarch64-simd.md
5117         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5118         mnemonics.
5119         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5120         mnemonics.
5122 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5124         PR tree-optimization/85989
5125         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5126         variable.
5127         (backprop::intersect_uses): Check it when deciding whether this
5128         is a backedge reference.
5129         (backprop::process_block): Add each phi to m_visited_phis
5130         after visiting it, then clear it at the end.
5132 2018-06-01  Richard Biener  <rguenther@suse.de>
5134         * tree-vectorizer.h (vect_dr_stmt): New function.
5135         (vect_get_load_cost): Adjust.
5136         (vect_get_store_cost): Likewise.
5137         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5138         Use vect_dr_stmt instead of DR_SMTT.
5139         (vect_record_base_alignments): Likewise.
5140         (vect_calculate_target_alignment): Likewise.
5141         (vect_compute_data_ref_alignment): Likewise and make static.
5142         (vect_update_misalignment_for_peel): Likewise.
5143         (vect_verify_datarefs_alignment): Likewise.
5144         (vector_alignment_reachable_p): Likewise.
5145         (vect_get_data_access_cost): Likewise.  Pass down
5146         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5147         (vect_get_peeling_costs_all_drs): Likewise.
5148         (vect_peeling_hash_get_lowest_cost): Likewise.
5149         (vect_enhance_data_refs_alignment): Likewise.
5150         (vect_find_same_alignment_drs): Likewise.
5151         (vect_analyze_data_refs_alignment): Likewise.
5152         (vect_analyze_group_access_1): Likewise.
5153         (vect_analyze_group_access): Likewise.
5154         (vect_analyze_data_ref_access): Likewise.
5155         (vect_analyze_data_ref_accesses): Likewise.
5156         (vect_vfa_segment_size): Likewise.
5157         (vect_small_gap_p): Likewise.
5158         (vectorizable_with_step_bound_p): Likewise.
5159         (vect_prune_runtime_alias_test_list): Likewise.
5160         (vect_analyze_data_refs): Likewise.
5161         (vect_supportable_dr_alignment): Likewise.
5162         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5163         (vect_gen_prolog_loop_niters): Likewise.
5164         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5165         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5166         modify DR_STMT.
5167         (vect_recog_mask_conversion_pattern): Likewise.
5168         (vect_try_gather_scatter_pattern): Likewise.
5169         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5170         to vect_get_store_cost.
5171         (vect_get_store_cost): Get stmt_info instead of DR.
5172         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5173         (vect_get_load_cost): Get stmt_info instead of DR.
5175 2018-06-01  Richard Biener  <rguenther@suse.de>
5177         PR middle-end/86017
5178         * gimple-fold.c (var_decl_component_p): Also allow offsetted
5179         vars wrapped in MEM_REFs.
5181 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5183         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5184         Fix subreg tests so that we only return a choice between
5185         GENERAL_REGS and FP_REGS if the original classes included both.
5187 2018-06-01  Richard Biener  <rguenther@suse.de>
5189         PR ipa/85960
5190         * tree-ssa-structalias.c (get_function_part_constraint):
5191         Handle NULL fi->decl.
5192         (find_func_aliases_for_call): Properly handle indirect
5193         fi from direct call.
5194         (find_func_clobbers): Likewise.
5195         (ipa_pta_execute): Likewise.
5196         (create_variable_info_for): For functions that are ifunc_resolver
5197         resolve to a varinfo that contains the result of the resolver call.
5198         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5199         aliases.
5201 2018-05-31  Michael Collison  <michael.collison@arm.com>
5203         * config/aarch64/aarch64.md:
5204         (*fix_to_zero_extenddfdi2): New pattern.
5205         * gcc.target/aarch64/fix_extend1.c: New testcase.
5207 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
5209         PR middle-end/78809
5210         PR middle-end/83026
5211         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5212         and BUILT_IN_STRNCMP_EQ.
5213         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5214         BUILT_IN_STRNCMP_EQ.
5215         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5216         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5217         (gimple_fold_builtin): Likewise.
5218         * tree-ssa-strlen.c (compute_string_length): New function.
5219         (determine_min_obsize): New function.
5220         (handle_builtin_string_cmp): New function to handle calls to
5221         string compare functions.
5222         (strlen_optimize_stmt): Add handling to builtin string compare
5223         calls.
5224         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5225         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5226         * tree.c (build_common_builtin_nodes): Add new defines of
5227         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5229 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
5231         PR target/85984
5232         * bb-reorder.c (pass_partition_blocks::gate): Return false for
5233         functions with naked attribute.
5235 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5237         * config/i386/sse.md (avx_vec_concat<mode>):
5238         Substitute concat_tg_mode mode attribute with xtg_mode.
5239         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5240         (concat_tg_mode): Remove mode attribute.
5242 2018-05-31  Martin Sebor  <msebor@redhat.com>
5244         PR c/82063
5245         * calls.c (alloc_max_size): Correct a logic error/typo.
5246         Treat excessive arguments as infinite.  Warn for invalid arguments.
5247         * doc/invoke.texi (-Walloc-size-larger-than): Update.
5249 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
5251         PR target/85829
5252         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5253         and movx for Haswell.
5255 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
5256             Cesar Philippidis  <cesar@codesourcery.com>
5258         PR middle-end/85879
5259         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5260         when emitting error on private/firstprivate reductions.
5261         * omp-low.c (lower_omp_target): Avoid reference-type processing
5262         on pointers for firstprivate clause.
5264 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5266         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5267         (st1x2): Likewise.
5268         (st1x3): Likewise.
5269         * config/aarch64/aarch64-simd.md
5270         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5271         (aarch64_ld1_x3_<mode>): Likewise
5272         (aarch64_st1x2<VALLDIF:mode>): Likewise
5273         (aarch64_st1_x2_<mode>): Likewise
5274         (aarch64_st1x3<VALLDIF:mode>): Likewise
5275         (aarch64_st1_x3_<mode>): Likewise
5276         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5277         (vld1_s8_x3): Likewise.
5278         (vld1_u16_x3): Likewise.
5279         (vld1_s16_x3): Likewise.
5280         (vld1_u32_x3): Likewise.
5281         (vld1_s32_x3): Likewise.
5282         (vld1_u64_x3): Likewise.
5283         (vld1_s64_x3): Likewise.
5284         (vld1_f16_x3): Likewise.
5285         (vld1_f32_x3): Likewise.
5286         (vld1_f64_x3): Likewise.
5287         (vld1_p8_x3): Likewise.
5288         (vld1_p16_x3): Likewise.
5289         (vld1_p64_x3): Likewise.
5290         (vld1q_u8_x3): Likewise.
5291         (vld1q_s8_x3): Likewise.
5292         (vld1q_u16_x3): Likewise.
5293         (vld1q_s16_x3): Likewise.
5294         (vld1q_u32_x3): Likewise.
5295         (vld1q_s32_x3): Likewise.
5296         (vld1q_u64_x3): Likewise.
5297         (vld1q_s64_x3): Likewise.
5298         (vld1q_f16_x3): Likewise.
5299         (vld1q_f32_x3): Likewise.
5300         (vld1q_f64_x3): Likewise.
5301         (vld1q_p8_x3): Likewise.
5302         (vld1q_p16_x3): Likewise.
5303         (vld1q_p64_x3): Likewise.
5304         (vst1_s64_x2): Likewise.
5305         (vst1_u64_x2): Likewise.
5306         (vst1_f64_x2): Likewise.
5307         (vst1_s8_x2): Likewise.
5308         (vst1_p8_x2): Likewise.
5309         (vst1_s16_x2): Likewise.
5310         (vst1_p16_x2): Likewise.
5311         (vst1_s32_x2): Likewise.
5312         (vst1_u8_x2): Likewise.
5313         (vst1_u16_x2): Likewise.
5314         (vst1_u32_x2): Likewise.
5315         (vst1_f16_x2): Likewise.
5316         (vst1_f32_x2): Likewise.
5317         (vst1_p64_x2): Likewise.
5318         (vst1q_s8_x2): Likewise.
5319         (vst1q_p8_x2): Likewise.
5320         (vst1q_s16_x2): Likewise.
5321         (vst1q_p16_x2): Likewise.
5322         (vst1q_s32_x2): Likewise.
5323         (vst1q_s64_x2): Likewise.
5324         (vst1q_u8_x2): Likewise.
5325         (vst1q_u16_x2): Likewise.
5326         (vst1q_u32_x2): Likewise.
5327         (vst1q_u64_x2): Likewise.
5328         (vst1q_f16_x2): Likewise.
5329         (vst1q_f32_x2): Likewise.
5330         (vst1q_f64_x2): Likewise.
5331         (vst1q_p64_x2): Likewise.
5332         (vst1_s64_x3): Likewise.
5333         (vst1_u64_x3): Likewise.
5334         (vst1_f64_x3): Likewise.
5335         (vst1_s8_x3): Likewise.
5336         (vst1_p8_x3): Likewise.
5337         (vst1_s16_x3): Likewise.
5338         (vst1_p16_x3): Likewise.
5339         (vst1_s32_x3): Likewise.
5340         (vst1_u8_x3): Likewise.
5341         (vst1_u16_x3): Likewise.
5342         (vst1_u32_x3): Likewise.
5343         (vst1_f16_x3): Likewise.
5344         (vst1_f32_x3): Likewise.
5345         (vst1_p64_x3): Likewise.
5346         (vst1q_s8_x3): Likewise.
5347         (vst1q_p8_x3): Likewise.
5348         (vst1q_s16_x3): Likewise.
5349         (vst1q_p16_x3): Likewise.
5350         (vst1q_s32_x3): Likewise.
5351         (vst1q_s64_x3): Likewise.
5352         (vst1q_u8_x3): Likewise.
5353         (vst1q_u16_x3): Likewise.
5354         (vst1q_u32_x3): Likewise.
5355         (vst1q_u64_x3): Likewise.
5356         (vst1q_f16_x3): Likewise.
5357         (vst1q_f32_x3): Likewise.
5358         (vst1q_f64_x3): Likewise.
5359         (vst1q_p64_x3): Likewise.
5361 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5363         * config/msp430/msp430.c (msp430_output_labelref): Prepend
5364         user_label_prefix to name.
5366         * tree-core.h: Update comment about the format of NAME string
5367         passed to handler in attribute_spec.
5369         * config/msp430/msp430.md: Remove erroneous subreg expression from
5370         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5371         zero_extend{q,h}isi2.
5373 2018-05-30  Borislav Petkov  <bp@suse.de>
5375         * doc/extend.texi: Document some architecture specific
5376         constraints and sort entries.
5378 2018-05-30  Martin Sebor  <msebor@redhat.com>
5380         PR middle-end/85369
5381         * builtins.c (expand_builtin_stpcpy_1): New function.
5382         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5383         only if the former succeeds.
5385 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5387         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5388         in saphira.
5390 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5392         * doc/invoke.texi (-flinker-output): Document
5394 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5396         * passes.c (ipa_write_summaries): Only modify statements if body
5397         is in memory.
5398         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5399         incrementally linking.
5400         (ipa_passes): Likewise.
5401         * lto-cgraph.c (lto_output_node): When incrementally linking do not
5402         pass down resolution info.
5403         * common.opt (flag_incremental_link): Update info.
5404         * gcc.c (plugin specs): Turn flinker-output=* to
5405         -plugin-opt=-linker-output-known
5406         * toplev.c (compile_file): Also cut compilation when doing incremental
5407         link.
5408         * flag-types. (enum lto_partition_model): Add
5409         LTO_LINKER_OUTPUT_NOLTOREL.
5410         (invoke.texi): Add -flinker-output docs.
5411         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5412         link same way as WPA; do not stream in dead initializers.
5414         * dwarf2out.c (dwarf2out_die_ref_for_decl,
5415         darf2out_register_external_decl): Support incremental link.
5417 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5419         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5421 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5423         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5424         it down to simple_object_copy_lto_debug_sections.
5425         (run_gcc): Determine incremental LTO link time and configure
5426         lto1 into non-wpa mode, disable renaming of debug sections.
5428 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5430         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5431         descriptions of various incorrectly documented functions.
5433 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5435         Revert:
5436         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5437         address check not strict.
5439 2018-05-30  Richard Biener  <rguenther@suse.de>
5441         PR tree-optimization/85964
5442         * tracer.c (better_p): Drop initialized count check, we only
5443         call the function with initialized counts now.
5444         (find_best_successor): Do find a best edge if one
5445         has uninitialized count.
5446         (find_best_predecessor): Likewise.  Do BB frequency check only
5447         if count is initialized.
5449 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
5451         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5452         (aarch64_ldrstr_offset_compare): New.
5453         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5454         load/store orderings.
5455         (aarch64_gen_adjusted_ldpstp): Likewise.
5457 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
5459         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5460         Check for subset of GENERAL_REGS and FP_REGS.
5461         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5462         r=w alternative.
5464 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
5466         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5467         and wi::to_poly_offset.  Add the current offset and then check
5468         whether the sum fits, rather than using an unchecked addition of
5469         a checked term.  Check for a shwi rather than a uhwi.
5470         * expr.c (get_bit_range): Use tree_to_poly_uint64.
5471         (store_constructor): Use poly_int_tree_p.
5472         (expand_expr_real_1): Likewise.
5473         * function.c (assign_temp): Likewise.
5474         * fold-const.c (const_binop): Use poly_int_tree_p and
5475         wi::to_poly_offset.
5476         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
5477         division.
5478         * ipa-icf-gimple.c (func_checker::compare_operand): Use
5479         to_poly_offset for MEM offsets.
5480         * ipa-icf.c (sem_variable::equals): Likewise.
5481         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5482         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5483         wi::to_poly_offset for BIT_FIELD_REF offsets.
5484         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5485         wi::to_poly_offset.
5486         * var-tracking.c (emit_note_insn_var_location): Use
5487         tree_to_poly_uint64.
5489 2018-05-29  Jim Wilson  <jimw@sifive.com>
5491         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5493 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
5495         PR target/85950
5496         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5497         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5498         sequence.
5499         (sse4_1_round<mode>2): Use nonimmediate_operand
5500         for operand 1 predicate.
5502 2018-05-29  Martin Sebor  <msebor@redhat.com>
5503             Richard Biener  <rguenther@suse.de>
5505         PR testsuite/85888
5506         * calls.c (get_size_range): Call determine_value_range instead
5507         of get_value_range..
5508         * tree-vrp.h (determine_value_range): Declared new function.
5509         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5511 2018-05-29  Richard Biener  <rguenther@suse.de>
5513         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5514         sure to use non-pattern stmts for get_earlier_stmt arguments.
5515         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5516         called on pattern stmts.
5517         (get_later_stmt): Likewise.
5519 2018-05-29  Martin Liska  <mliska@suse.cz>
5521         PR gcov-profile/85759
5522         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5523         env variables.
5525 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
5527         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5528         VEC_UNPACK_*_EXPR.
5529         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5530         VEC_PACK_*_EXPR.
5532         PR target/85918
5533         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5534         VEC_PACK_FLOAT_EXPR): New tree codes.
5535         * tree-pretty-print.c (op_code_prio): Handle
5536         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5537         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5538         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5539         * tree-inline.c (estimate_operator_cost): Likewise.
5540         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5541         * fold-const.c (const_binop): Likewise.
5542         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5543         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5544         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5545         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5546         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5547         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5548         * expr.c (expand_expr_real_2): Likewise.
5549         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5550         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5551         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5552         optabs.
5553         * optabs.c (expand_widen_pattern_expr): For
5554         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5555         sign from result type rather than operand's type.
5556         (expand_binop_directly): For vec_packu_float_optab and
5557         vec_packs_float_optab allow result type to be different from operand's
5558         type.
5559         * optabs-tree.c (optab_for_tree_code): Handle
5560         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5561         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
5562         * tree-vect-generic.c (expand_vector_operations_1):  Handle
5563         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5564         VEC_PACK_FLOAT_EXPR.
5565         * tree-vect-stmts.c (supportable_widening_operation): Handle
5566         FIX_TRUNC_EXPR.
5567         (supportable_narrowing_operation): Handle FLOAT_EXPR.
5568         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5569         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5570         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
5571         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5572         mode attributes.
5573         (vec_pack<floatprefix>_float_<mode>): New expander.
5574         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5575         attributes.
5576         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5577         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5578         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5579         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5580         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5581         Document.
5582         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5583         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5584         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5585         VEC_PACK_FLOAT_EXPR): Document.
5587 2018-05-29  Richard Biener  <rguenther@suse.de>
5589         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5590         member.
5591         (stmt_vec_info_vec): Make pointer.
5592         (init_stmt_vec_info_vec): Remove.
5593         (free_stmt_vec_info_vec): Likewise.
5594         (set_stmt_vec_info_vec): New function.
5595         (free_stmt_vec_infos): Likewise.
5596         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5597         (set_vinfo_for_stmt): Likewise.
5598         (get_earlier_stmt): Likewise.
5599         (get_later_stmt): Likewise.
5600         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5601         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5602         (vec_info::~vec_info): Free stmt_vec_infos.
5603         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5604         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5605         (pass_slp_vectorize::execute): Likewise.
5606         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5607         (free_stmt_vec_info_vec): Likewise.
5608         (set_stmt_vec_info_vec): New function.
5609         (free_stmt_vec_infos): Likewise.
5610         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5611         the global stmt_vec_info_vec.
5612         * tree-parloops.c (gather_scalar_reductions): Use
5613         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5614         vector.
5616 2018-05-29  Richard Biener  <rguenther@suse.de>
5618         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5620 2018-05-29  Martin Liska  <mliska@suse.cz>
5621             David Malcolm  <dmalcolm@redhat.com>
5623         * vec.c (test_reverse): New.
5624         (vec_c_tests): Add new test.
5625         * vec.h (vl_ptr>::reverse): New function.
5627 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
5629         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5631         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5632         and later.
5634 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5636         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5638 2018-05-28  Richard Biener  <rguenther@suse.de>
5640         PR tree-optimization/85933
5641         * tree-vect-data-refs.c (vect_record_base_alignments): Only
5642         look at stmts marked as vectorizable.
5644 2018-05-28  Richard Biener  <rguenther@suse.de>
5646         PR tree-optimization/85934
5647         * tree-vect-generic.c (expand_vector_operations_1): Hoist
5648         vector boolean check before scalar optimization.
5650 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
5652         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5653         for armv5te.
5655 2018-05-28  Mark Wielaard  <mark@klomp.org>
5657         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5658         if it is an expression containing a minus sign.
5660 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
5662         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5664 2018-05-27  Paul Koning  <ni1d@arrl.net>
5666         * config/pdp11/pdp11.md (truncsihi2): Remove.
5668 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
5669             Chung-Ju Wu  <jasonwucj@gmail.com>
5671         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5672         implementation.
5673         (unaligned_store_dw): Ditto.
5674         * config/nds32/nds32-memory-manipulation.c
5675         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5676         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5677         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5678         (emit_setmem_word_loop): Rename to ...
5679         (emit_setmem_doubleword_loop): ... this.
5680         (nds32_gen_dup_4_byte_to_word_value): New function.
5681         (nds32_gen_dup_8_byte_to_double_word_value): New function.
5682         (nds32_expand_setmem_loop): Refine implementation.
5683         (nds32_expand_setmem_loop_v3m): Ditto.
5684         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5685         pattern.
5687 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5689         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5691 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5693         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5694         (nds32_init_machine_status): Initialize machine->attr_naked_p and
5695         machine->attr_no_prologue_p.
5696         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5697         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5698         (nds32_expand_epilogue): Consider attr_naked_p.
5699         (nds32_expand_epilogue_v3pop): Likewise.
5700         (nds32_can_use_return_insn): Likewise.
5701         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5702         attr_no_prologue_p fields.
5703         * config/nds32/nds32.opt (mret-in-naked-func): New option.
5705 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
5707         PR target/85918
5708         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5709         attributes.
5710         * config/i386/sse.md
5711         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5712         Rename to ...
5713         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5714         ... this.
5715         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5716         Rename to ...
5717         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5718         ... this.
5719         (*<floatsuffix>floatv2div2sf2): Rename to ...
5720         (*float<floatunssuffix>v2div2sf2): ... this.
5721         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5722         (float<floatunssuffix>v2div2sf2_mask): ... this.
5723         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5724         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5725         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5726         to ...
5727         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5728         ... this.
5729         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5730         Rename to ...
5731         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5732         ... this.
5733         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5734         Rename to ...
5735         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5736         ... this.
5737         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5738         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5739         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5740         gen_ufix_truncv8dfv8si2.
5741         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5742         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5743         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5744         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5745         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5746         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5747         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5748         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5750 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5752         PR target/85900
5753         PR target/85345
5754         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5756 2018-05-25  Jim Wilson  <jimw@sifive.com>
5758         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5759         * config/riscv/riscv.c (struct machine_function): Add
5760         interrupt_handler_p and attribute_checked_p fields.
5761         (riscv_attribute_table): Add interrupt.
5762         (riscv_interrupt_type_p): New.
5763         (riscv_save_reg_p): Save extra regs for interrupt handler.
5764         (riscv_use_save_libcall): Return false  for interrupt handler.
5765         (riscv_first_stack_step): Add forward declaration.
5766         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
5767         for interrupt handler with large frame.  Use it for saved reg list.
5768         (riscv_expand_prologue): Move flag_stack_usage_info support to
5769         eliminate duplication.
5770         (riscv_expand_epilogue): Generate mret for interrupt handler.
5771         (riscv_epilogue_uses): New.
5772         (riscv_can_use_return_insn): Return false for interrupt handler.
5773         (riscv_function_ok_for_sibcall): Likewise.
5774         (riscv_set_current_function): Add interrupt handler support.
5775         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5776         * config/riscv/riscv.md (UNSPECV_MRET): New.
5777         (GP_REGNUM): New.
5778         (riscv_frflags, riscv_fsflags): Use tab after opcode.
5779         (riscv_mret): New.
5780         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5782 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5784         PR tree-optimization/85712
5785         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5786         this candidate has already been replaced in-situ by a copy.
5788 2018-05-25  Jason Merrill  <jason@redhat.com>
5790         PR c++/80485 - inline function non-zero address.
5791         * symtab.c (nonzero_address): Check DECL_COMDAT.
5793 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
5795         PR target/83628
5796         * config/alpha/alpha.md (ashlsi3): New insn pattern.
5797         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
5798         extension of SImode operation.  Use const123_operand predicate.
5799         (*saddsi_1): Remove.
5800         (*saddl_se_1): Ditto.
5801         (*ssubsi_1): Ditto.
5802         (*ssubl_se_1): Ditto.
5803         * config/alpha/predicates.md (const123_operand): New predicate.
5804         * config/alpha/constraints.md (P): Use IN_RANGE.
5806 2018-05-25  Richard Biener  <rguenther@suse.de>
5808         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5809         defaulted to true.
5810         (ref_maybe_used_by_stmt_p): Likewise.
5811         (stmt_may_clobber_ref_p): Likewise.
5812         (stmt_may_clobber_ref_p_1): Likewise.
5813         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5814         and pass it along.
5815         (ref_maybe_used_by_stmt_p): Likewise.
5816         (stmt_may_clobber_ref_p): Likewise.
5817         (stmt_may_clobber_ref_p_1): Likewise.
5818         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5819         the alias oracle to disambiguate DRs with stmts DR analysis
5820         couldn't handle.
5821         (vect_analyze_data_refs): Do not give up on not analyzable
5822         DRs for BB vectorization.  Remove code truncating the dataref
5823         vector.
5825 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
5827         PR target/85832
5828         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5829         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
5830         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5832 2018-05-25  Richard Biener  <rguenther@suse.de>
5834         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5835         function, combining stmt data ref gathering and fatal analysis
5836         parts.
5837         (vect_analyze_data_refs): Remove now redudnant code and simplify.
5838         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5839         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5840         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5841         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5843 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5845         PR tree-optimization/85720
5846         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5847         SCC if all partitions are builtins.
5848         (version_loop_by_alias_check): New parameter.  Generate cancelable
5849         runtime alias check if all partitions are builtins.
5850         (distribute_loop): Update call to above function.
5852 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5854         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5855         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5856         (parm_default_def_partition_arg): Ditto.
5857         (set_parm_default_def_partition): Ditto.
5858         (get_parm_default_def_partitions): Ditto and make it static.
5859         (get_undefined_value_partitions): Ditto and make it static.
5860         (remove_ssa_form): Refactor call to init_var_map here.
5861         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5862         computation for loop region.
5863         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5864         (register_default_def): Delete.
5865         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5866         (parm_default_def_partition_arg): Ditto.
5867         (set_parm_default_def_partition): Ditto.
5868         (get_parm_default_def_partitions): Ditto and make it static.
5869         (get_undefined_value_partitions): Ditto and make it static.
5870         (coalesce_with_default, coalesce_with_default): Update comment.
5871         (create_coalesce_list_for_region): New func factored out from
5872         create_outofssa_var_map.
5873         (populate_coalesce_list_for_outofssa): New func factored out from
5874         create_outofssa_var_map and coalesce_ssa_name.
5875         (create_outofssa_var_map): Delete.
5876         (coalesce_ssa_name): Refactor to support live range computation.
5877         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5878         (get_parm_default_def_partitions): Delete.
5879         (get_undefined_value_partitions): Ditto.
5880         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5881         computation for loop region.
5882         (new_tree_live_info, loe_visit_block): Ditto.
5883         (live_worklist, set_var_live_on_entry): Ditto.
5884         (calculate_live_on_exit, verify_live_on_entry): Ditto.
5885         * tree-ssa-live.h (struct _var_map): New fields.
5886         (init_var_map): Change decl.
5887         (region_contains_p): New.
5889 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5891         * tree-ssa-live.h (live_merge_and_clear): Delete.
5893 2018-05-25  Richard Biener  <rguenther@suse.de>
5895         PR c++/85912
5896         * tree-dump.c (dequeue_and_dump): Remove access to removed
5897         operand 2 of a SWITCH_EXPR.
5899 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5901         * doc/sourcebuild.texi (vect_double_cond_arith): Include
5902         multiplication and division.
5903         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5904         (cond_udiv@var{m}, cond_umod@var{m}): Document.
5905         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5906         (cond_udiv_optab, cond_umod_optab): New optabs.
5907         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5908         (IFN_COND_RDIV): New internal functions.
5909         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5910         TRUNC_MOD_EXPR and RDIV_EXPR.
5911         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5912         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5913         New unspecs.
5914         (SVE_INT_BINARY): Include mult.
5915         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5916         (optab, sve_int_op): Handle mult.
5917         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5918         UNSPEC_COND_DIV.
5919         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5920         for SVE_INT_BINARY_SD.
5922 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5924         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5925         (optab, sve_int_op): Handle div and udiv.
5926         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5927         for SVE_INT_BINARY_SD.
5928         (*<optab><mode>3): New insn for the same.
5930 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5932         * tree-vect-patterns.c: Include predict.h.
5933         (vect_recog_divmod_pattern): Restrict check for division support
5934         to when optimizing for size.
5936 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5938         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5939         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5940         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5941         (gimple_match_op::set_op): Likewise.
5942         (gimple_resimplify4): Declare.
5943         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5944         (expr::gen_transform): Likewise.
5945         (decision_tree::gen): Generate a simplification routine for 4 operands.
5946         * gimple-match-head.c (gimple_simplify): Add an overload for
5947         4 operands.  In the top-level function, handle up to 4 call
5948         arguments and call gimple_resimplify4.
5949         (gimple_resimplify4): New function.
5950         (build_call_internal): Pass a fourth operand.
5951         (maybe_push_to_seq): Likewise.
5952         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5953         Fold VEC_COND_EXPRs of an operation and a default value into
5954         an IFN_COND_* function if possible.
5955         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5956         New unspecs.
5957         (SVE_COND_FP_BINARY): Include them.
5958         (optab, sve_fp_op): Handle them.
5959         (SVE_INT_BINARY_REV): New code iterator.
5960         (SVE_COND_FP_BINARY_REV): New int iterator.
5961         (commutative): New int attribute.
5962         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5963         Declare.
5964         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5965         function.
5966         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5967         (*cond_<optab><mode>): New patterns for reversed operands.
5969 2018-05-25  Richard Biener  <rguenther@suse.de>
5971         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5972         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5973         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5974         (STMT_VINFO_GROUPED_ACCESS): Adjust.
5975         * tree-vect-data-refs.c (everywhere): Adjust users.
5976         * tree-vect-loop.c (everywhere): Likewise.
5977         * tree-vect-slp.c (everywhere): Likewise.
5978         * tree-vect-stmts.c (everywhere): Likewise.
5979         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5981 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5983         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5984         Rename to...
5985         (gcc_cv_as_section_exclude): ... this.
5986         Try Solaris as #exclude syntax.
5987         * configure: Regenerate.
5988         * config.in: Regenerate.
5989         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5990         SECTION_EXCLUDE.
5991         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5992         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5994         * varasm.c (default_elf_asm_named_section): Don't check if
5995         HAVE_GAS_SECTION_EXCLUDE is defined.
5997 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5999         * doc/md.texi: Update the documentation of the cond_* optabs
6000         to mention the new final operand.  Fix GET_MODE_NUNITS call.
6001         Describe the scalar case too.
6002         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6003         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6004         instead of 2.
6005         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6006         (get_conditional_internal_fn): Update comment.
6007         * tree-vect-loop.c (vectorizable_reduction): Pass the original
6008         accumulator value as a final argument to conditional functions.
6009         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6010         a define_expand and add an "else" operand.  Assert for now that
6011         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
6012         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6013         (*cond_<optab><mode>): New patterns.
6014         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6015         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6016         (UNSPEC_COND_EOR): Delete.
6017         (optab): Remove associated mappings.
6018         (SVE_INT_BINARY): New code iterator.
6019         (sve_int_op): Remove int attribute and add "minus" to the code
6020         attribute.
6021         (SVE_COND_INT_OP): Delete.
6022         (SVE_COND_FP_OP): Rename to...
6023         (SVE_COND_FP_BINARY): ...this.
6025 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6027         * optabs.c (can_reuse_operands_p): New function.
6028         (maybe_legitimize_operands): Try to reuse the results for
6029         earlier operands.
6031 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6033         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6034         Add {q} suffix to insn mnemonic.
6036 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6038         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6039         (msp430_warn_func_return): New.
6041 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
6043         * fold-const.c (tree_nonzero_bits): New function.
6044         * fold-const.h (tree_nonzero_bits): Likewise.
6045         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6046         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6048 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6050         PR target/85900
6051         PR target/85345
6052         * varasm.c (assemble_alias): Check ifunc_resolver only on
6053         FUNCTION_DECL.
6055 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6057         PR target/85903
6058         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6059         when memory input operand is handled.
6061 2018-05-24  Luis Machado  <luis.machado@linaro.org>
6063         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6064         global.
6065         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6067 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6069         * match.pd: Delay FMA folds until after vectorization.
6071 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6073         PR target/83009
6074         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6075         address check not strict.
6077 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6079         * gimple-match.h (gimple_match_op): New class.
6080         (mprts_hook): Replace parameters with a gimple_match_op *.
6081         (maybe_build_generic_op): Likewise.
6082         (gimple_simplified_result_is_gimple_val): Replace parameters with
6083         a const gimple_match_op *.
6084         (gimple_simplify): Replace code_helper * and tree * parameters with
6085         a gimple_match_op * parameter.
6086         (gimple_resimplify1): Replace code_helper *, tree and tree *
6087         parameters with a gimple_match_op * parameter.
6088         (gimple_resimplify2): Likewise.
6089         (gimple_resimplify3): Likewise.
6090         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6091         parameters with a gimple_match_op * parameter.
6092         * gimple-match-head.c (gimple_simplify): Change prototypes of
6093         auto-generated functions to take a gimple_match_op * instead of
6094         separate code_helper * and tree * parameters.  Make the same
6095         change in the top-level overload and update calls to the
6096         gimple_resimplify routines.  Update calls to the auto-generated
6097         functions and to maybe_push_res_to_seq in the publicly-facing
6098         operation-specific gimple_simplify overloads.
6099         (gimple_match_op::MAX_NUM_OPS): Define.
6100         (gimple_resimplify1): Replace rcode and ops with a single res_op
6101         parameter.  Update call to gimple_simplify.
6102         (gimple_resimplify2): Likewise.
6103         (gimple_resimplify3): Likewise.
6104         (mprts_hook): Replace parameters with a gimple_match_op *.
6105         (maybe_build_generic_op): Likewise.
6106         (build_call_internal): Replace type, nargs and ops with
6107         a gimple_match_op *.
6108         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6109         with a single gimple_match_op *.  Update calls to mprts_hook,
6110         build_call_internal and gimple_simplified_result_is_gimple_val.
6111         Factor out code that is common to the tree_code and combined_fn cases.
6112         * genmatch.c (expr::gen_transform): Replace tem_code and
6113         tem_ops with a gimple_match_op called tem_op.  Update calls
6114         to the gimple_resimplify functions and maybe_push_res_to_seq.
6115         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6116         res_ops.  Update call to the gimple_resimplify functions.
6117         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6118         (decision_tree::gen): Make the functions take a gimple_match_op *
6119         called res_op instead of separate res_code and res_ops parameters.
6120         Update call accordingly.
6121         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6122         and ops with a single res_op parameter.  Update calls to
6123         maybe_build_generic_op and maybe_push_res_to_seq.
6124         (fold_stmt_1): Update calls to gimple_simplify and
6125         replace_stmt_with_simplification.
6126         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6127         and gimple_simplified_result_is_gimple_val.
6128         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6129         gimple_simplify.
6130         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6131         with a gimple_match_op *.
6132         (vn_nary_build_or_lookup): Likewise.  Update call to
6133         vn_nary_build_or_lookup_1.
6134         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6135         gimple_match_op *.  Update calls to the gimple_resimplify routines
6136         and to gimple_simplified_result_is_gimple_val.
6137         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6138         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6139         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6140         (visit_nary_op): Likewise.
6141         (visit_reference_op_load): Likewise.
6143 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6145         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6146         modifier for printing the step amount.
6148 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
6150         PR target/78849
6151         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6152         types.
6154 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
6156         * doc/sourcebuild.texi (Endianness): New subsubsection.
6158 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6160         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6161         <prefetch_dynamic_strides>: New const bool field.
6162         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6163         prefetch_dynamic_strides.
6164         (exynosm1_prefetch_tune): Likewise.
6165         (thunderxt88_prefetch_tune): Likewise.
6166         (thunderx_prefetch_tune): Likewise.
6167         (thunderx2t99_prefetch_tune): Likewise.
6168         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6169         false.
6170         (aarch64_override_options_internal): Update to set
6171         PARAM_PREFETCH_DYNAMIC_STRIDES.
6172         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6173         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6174         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6175         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6176         prefetch-dynamic-strides setting.
6178 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6180         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6181         <minimum_stride>: New const int field.
6182         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6183         minimum_stride field defaulting to -1.
6184         (exynosm1_prefetch_tune): Likewise.
6185         (thunderxt88_prefetch_tune): Likewise.
6186         (thunderx_prefetch_tune): Likewise.
6187         (thunderx2t99_prefetch_tune): Likewise.
6188         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6189         <default_opt_level>: Set to 3.
6190         (aarch64_override_options_internal): Update to set
6191         PARAM_PREFETCH_MINIMUM_STRIDE.
6192         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6193         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6194         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6195         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6196         stride is constant and is below the minimum stride threshold.
6198 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6200         * config/arm/arm-cpus.in (mode26): Delete.
6201         (armv4): Delete mode26 reference.
6202         * config/arm/arm.c (arm_configure_build_target): Delete use of
6203         isa_bit_mode26.
6205 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6207         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6208         New insn pattern.
6209         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6210         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
6211         for non-SSE modes.
6212         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
6213         (floatunsdidf2): Ditto.
6215 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6217         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6218         (fixuns_trunc<mode>si2_avx512f): Ditto.
6219         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6220         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6221         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6223 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6225         PR rtl-optimization/79985
6226         * df-scan.c (df_insn_refs_collect): Remove special case for
6227         global registers and asm statements.
6229 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6231         * extend.texi (Global Register Variables): Rewrite the bullet list.
6232         Note that the register is available for allocation. Note that access
6233         via inline asm must use constraints. Add note about async-signal
6234         handlers. Remove paragraph about automagic register selection.
6236 2018-05-23  Richard Biener  <rguenther@suse.de>
6238         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6239         of fixed offset from memset VN.
6241 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
6243         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6244         first_interp field.
6245         (alloc_cand_and_find_basis): Initialize first_interp field.
6246         (slsr_process_mul): Modify first_interp field.
6247         (slsr_process_add): Likewise.
6248         (slsr_process_cast): Modify first_interp field for each new
6249         interpretation.
6250         (slsr_process_copy): Likewise.
6251         (dump_candidate): Dump first_interp field.
6252         (replace_mult_candidate): Process all interpretations, not just
6253         subsequent ones.
6254         (replace_rhs_if_not_dup): Likewise.
6255         (replace_one_candidate): Likewise.
6257 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
6259         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6260         Add new boolean.
6261         (aarch64_needs_frame_chain): New function.
6262         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6264 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
6266         PR target/84882
6267         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6268         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6269         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6270         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6271         as true for strict-align.
6272         (aarch64_can_inline_p): Perform checks even when callee has no
6273         attributes to check for strict alignment.
6274         * doc/extend.texi (AArch64 Function Attributes): Document
6275         no-strict-align.
6276         * doc/invoke.texi: (AArch64 Options): Likewise.
6278 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
6280         PR tree-optimization/85853
6281         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6282         the handling of the root of the node to...
6283         (vect_slp_analyze_node_operations_1): ...this new function,
6284         and run the whole thing with the child nodes' def types
6285         set according to their SLP node's def type.
6287 2018-05-23  Richard Biener  <rguenther@suse.de>
6289         PR middle-end/85874
6290         * tree-data-ref.c (create_runtime_alias_checks): Defer
6291         and ignore overflow warnings.
6293 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
6295         PR tree-optimization/85822
6296         * tree-vrp.c (is_masked_range_test): Fix handling of negative
6297         constants.
6299 2018-05-23  Richard Biener  <rguenther@suse.de>
6301         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6302         memset constants via native_interpret_expr.
6304 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
6306         PR target/85345
6307         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6308         attribute.
6309         (cgraph_node::create_alias): Likewise.
6310         (cgraph_node::get_availability): Check ifunc_resolver instead
6311         of looking up ifunc attribute.
6312         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6313         * varasm.c (do_assemble_alias): Likewise.
6314         (assemble_alias): Likewise.
6315         (default_binds_local_p_3): Likewise.
6316         * cgraph.h (cgraph_node): Add ifunc_resolver.
6317         (cgraph_node::only_called_directly_or_aliased_p): Return false
6318         for IFUNC resolver.
6319         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6320         attribute.
6321         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6322         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6323         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6324         instead of looking up ifunc attribute.
6326 2018-05-22  Luis Machado  <luis.machado@linaro.org>
6328         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6330 2018-05-22  Martin Sebor  <msebor@redhat.com>
6332         PR middle-end/85359
6333         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6334         only when expasion succeeds.
6335         (expand_builtin_strcmp): Same.
6336         (expand_builtin_strncmp): Same.
6338 2018-05-22  Martin Sebor  <msebor@redhat.com>
6340         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6342 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6343             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6345         * config/aarch64/aarch64-ldpstp.md: Replace uses of
6346         aarch64_mem_pair_operand with memory_operand and delete operand swapping
6347         code.
6348         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6349         Add check for legitimate_address.
6350         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6351         (aarch64_swap_ldrstr_operands): New.
6352         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6353         Define prototype.
6355 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6356             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6358         * config/aarch64/aarch64.md: New patterns to generate stp
6359         and ldp.
6360         (store_pair_sw, store_pair_dw): New patterns to generate stp for
6361         single words and double words.
6362         (load_pair_sw, load_pair_dw): Likewise.
6363         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6364         Delete.
6365         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6366         Delete.
6367         * config/aarch64/aarch64-ldpstp.md: Modify peephole
6368         for different mode ldpstp and add peephole for merged zero stores.
6369         Likewise for loads.
6370         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6371         Add size check.
6372         (aarch64_gen_store_pair): Rename calls to match new patterns.
6373         (aarch64_gen_load_pair): Rename calls to match new patterns.
6374         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6375         (load_pair<DREG:mode><DREG2:mode>): ... This.
6376         (store_pair<mode>): Rename to...
6377         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6378         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6379         New mode iterators.
6380         (V_INT_EQUIV): Handle SImode.
6381         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6382         New predicate.
6384 2018-05-22  Martin Sebor  <msebor@redhat.com>
6386         PR c/85623
6387         * calls.c (maybe_warn_nonstring_arg): Use string length to set
6388         or ajust the presumed bound on an operation to avoid unnecessary
6389         warnings.
6391 2018-05-22  Martin Sebor  <msebor@redhat.com>
6393         PR tree-optimization/85826
6394         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6395         assuming that a DECL necesarily has a constant size.
6397 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
6399         PR middle-end/85862
6400         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6402 2018-05-22  Richard Biener  <rguenther@suse.de>
6404         PR tree-optimization/85834
6405         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6406         non-constant and non-zero memset arguments.
6408 2018-05-22  Martin Liska  <mliska@suse.cz>
6410         PR ipa/85607
6411         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6413 2018-05-22  Richard Biener  <rguenther@suse.de>
6415         PR tree-optimization/85863
6416         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6417         comparisons when vectype is specified.
6418         (vectorizable_condition): Do not specify vectype for
6419         vect_is_simple_cond when SLP vectorizing.
6421 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
6423         PR target/85657
6424         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6425         define __ibm128 as long double.
6426         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6427         as a distinct type when IEEE 128-bit support is enabled.
6428         (init_float128_ieee): Fix up conversions between IFmode and IEEE
6429         128-bit types to use the correct functions.
6430         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6431         convert between 128-bit floating point types that have different
6432         modes but the same representation, instead of using gen_lowpart to
6433         makean alias.
6434         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6435         KFmode.
6436         (IFKF_reg): New attributes to give the register constraints for
6437         IFmode and KFmode.
6438         (extend<mode>tf2_internal): New insns to mark an explicit
6439         conversion between 128-bit floating point types that have a
6440         different mode but share the same representation.
6442 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
6444         PR tree-optimization/85814
6445         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6446         a null return from get_strinfo when unsharing the next
6447         strinfo in the chain.
6449 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6451         PR gcc/84923
6452         * varasm.c (weak_finish): Clean up weak_decls.
6454 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6456         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6457         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6458         UNSPEC_UADALP values.
6459         * config/aarch64/iterators.md (ABAL): New int iterator.
6460         (ABDL2): Likewise.
6461         (ADALP): Likewise.
6462         (sur): Add mappings for the above.
6463         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6464         New define_insn.
6465         (aarch64_<sur>abal<mode>_4): Likewise.
6466         (aarch64_<sur>adalp<mode>_3): Likewise.
6467         (<sur>sadv16qi): New define_expand.
6469 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
6471         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6472         (*movdf_internal): Ditto.
6473         (*rcpsf2_sse): Ditto.
6474         (*rsqrtsf2_sse): Ditto.
6475         (*sqrt<mode>2_sse): Ditto.
6477 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
6479         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6480         eor3q<mode>4.
6481         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6482         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6483         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6484         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6485         vbcaxq_s64): New.
6486         * config/aarch64/arm_neon.h: Likewise.
6487         * config/aarch64/iterators.md (VQ_I): New.
6489 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
6491         * config.gcc: Add arc/t-multilib-linux to tmake_file for
6492         arc*-*-linux*.
6493         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6494         MULTILIB_DIRNAMES
6496 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
6498         * config/nds32/constraints.md (S): New constraint.
6499         * config/nds32/nds32.md (call_internal): Use constraint S.
6500         (call_value_internal): Likewise.
6501         (sibcall_internal): Likewise.
6502         (sibcall_value_internal): Likewise.
6504 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
6505             Chung-Ju Wu  <jasonwucj@gmail.com>
6507         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6508         into consideration.
6510 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
6511             Chung-Ju Wu  <jasonwucj@gmail.com>
6513         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6514         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6515         (nds32_rtx_costs_impl): Simplify.
6516         (nds32_address_cost_impl): Simplify.
6517         (nds32_init_rtx_costs): New function.
6518         (nds32_rtx_costs_speed_prefer): Likewise.
6519         (nds32_rtx_costs_size_prefer): Likewise.
6520         (nds32_address_cost_speed_prefer): Likewise.
6521         (nds32_address_cost_speed_fwprop): Likewise.
6522         (nds32_address_cost_size_prefer): Likewise.
6523         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6524         * config/nds32/nds32.c (nds32_option_override): Use
6525         nds32_init_rtx_costs function.
6527 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
6529         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6530         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6531         (TARGET_PIPELINE_N8): Likewise.
6532         (TARGET_PIPELINE_N10): Likewise.
6533         (TARGET_PIPELINE_N13): Likewise.
6534         (TARGET_PIPELINE_GRAYWOLF): Likewise.
6536 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
6538         * config/nds32/nds32-fpu.md: Update copyright year.
6540 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6542         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6544 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6546         * config/nds32/nds32.c
6547         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6548         * config/nds32/nds32.opt (minline-asm-r15): New option.
6550 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6552         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6553         MASK_HW_ABS.
6554         * config/nds32/nds32.md (abssi2): New pattern.
6556 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
6558         * config/i386/i386.md (rex64namesuffix): New mode attribute.
6559         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6560         Merge insn pattern from sse_cvtsi2ss<round_name> and
6561         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6562         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6563         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6564         using SWI48 mode iterator.
6565         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6566         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6567         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6568         pattern from sse_cvttss2si<round_saeonly_name>
6569         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6570         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6571         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6572         using SWI48 mode iterator.
6573         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6574         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6575         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6576         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6577         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6578         using SWI48 mode iterator.
6579         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6580         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6581         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6582         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6583         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6584         SWI48 mode iterator.
6585         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6586         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6587         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6588         pattern from sse_cvttsd2si<round_saeonly_name>
6589         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6591 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6593         * config/nds32/nds32-md-auxiliary.c
6594         (nds32_valid_smw_lwm_base_p): Refine.
6595         (nds32_output_smw_single_word): Refine.
6596         (nds32_output_smw_double_word): New.
6597         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6599 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6601         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6602         (nds32_output_stack_pop): Refine.
6603         (nds32_expand_unaligned_load): Refine.
6604         (nds32_expand_unaligned_store): Refine.
6606 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6607             Chung-Ju Wu  <jasonwucj@gmail.com>
6609         * config/nds32/constants.md: Add TP_REGNUM constant.
6610         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6611         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6612         UNSPEC_ADD32.
6613         * config/nds32/nds32-doubleword.md: Consider flag_pic.
6614         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6615         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6616         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6617         and PIC code generation.
6618         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6619         code generation.
6620         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6621         optimization.
6622         * config/nds32/nds32.md: Support TLS and PIC.
6623         * config/nds32/nds32.c: Support TLS and PIC.
6624         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6625         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6626         predicate.
6628 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6630         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6631         mode with E_ prefix.
6633 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6634             Chung-Ju Wu  <jasonwucj@gmail.com>
6636         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6637         * config/nds32/nds32-md-auxiliary.c
6638         (symbolic_reference_mentioned_p): New.
6639         (nds32_legitimize_ict_address): New.
6640         (nds32_expand_ict_move): New.
6641         (nds32_indirect_call_referenced_p): New.
6642         (nds32_symbol_binds_local_p): Delete.
6643         (nds32_long_call_p): Modify.
6644         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6645         * config/nds32/nds32-protos.h
6646         (symbolic_reference_mentioned_p): Declare.
6647         (nds32_legitimize_ict_address): Declare.
6648         (nds32_expand_ict_move): Declare.
6649         (nds32_indirect_call_referenced_p): Declare.
6650         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6651         (nds32_relax_group): Use nds32_ict_const_p as condition.
6652         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6653         (nds32_asm_file_start): Output ict_model directive in asm code.
6654         (nds32_legitimate_address_p): Consider indirect call.
6655         (nds32_print_operand): Consider indirect call.
6656         (nds32_print_operand_address): Consider indirect call.
6657         (nds32_insert_attributes): Handle "indirect_call" attribute.
6658         (TARGET_LEGITIMATE_ADDRESS_P): Define.
6659         (TARGET_LEGITIMATE_CONSTANT_P): Define.
6660         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6661         (TARGET_DELEGITIMIZE_ADDRESS): Define.
6662         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6663         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6664         (TARGET_ICT_MODEL_SMALL): Define.
6665         (TARGET_ICT_MODEL_LARGE): Define.
6666         * config/nds32/nds32.md (movsi): Consider ict model.
6667         (call, call_value): Consider ict model.
6668         (sibcall, sibcall_value): Consider ict model.
6669         * config/nds32/nds32.opt (mict-model): New option.
6670         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6671         model.
6673 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
6674             Monk Chiang  <sh.chiang04@gmail.com>
6675             Jim Wilson <jimw@sifive.com>
6677         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6678         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
6679         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6680         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6681         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
6682         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6683         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6684         compute save_libcall_adjustment properly.
6685         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6686         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6687         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6688         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6689         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6690         (ABI_SPEC): Handle mabi=ilp32e.
6691         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6692         (RVE): Add RVE mask.
6693         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6694         <-march>: Add rv32e as an example.
6696 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
6698         PR c++/82899
6699         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6700         (intra_create_variable_infos): Handle C++ constructors.
6702 2018-05-18  Martin Liska  <mliska@suse.cz>
6704         * passes.def: Remove a redundant pass.
6706 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
6708         PR bootstrap/85838
6709         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6711 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6713         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6714         (ARMv4): Update.
6715         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6716         (ARMv6m): Update.
6717         (armv2, armv2a, armv3, armv3m): Delete architectures.
6718         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6719         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6720         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6721         Delete cpus.
6722         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6723         (*mulsidi3adddi): Likewise.
6724         (mulsidi3): Likewise.
6725         (*mulsidi3_nov6): Likewise.
6726         (umulsidi3): Likewise.
6727         (umulsidi3_nov6): Likewise.
6728         (umaddsidi4): Likewise.
6729         (*umulsidi3adddi): Likewise.
6730         (smulsi3_highpart): Likewise.
6731         (*smulsi3_highpart_nov6): Likewise.
6732         (umulsi3_highpart): Likewise.
6733         (*umulsi3_highpart_nov6): Likewise.
6734         * config/arm/arm.h (arm_arch3m): Delete.
6735         * config/arm/arm.c (arm_arch3m): Delete.
6736         (arm_option_override_internal): Update armv3-related comment.
6737         (arm_configure_build_target): Delete use of isa_bit_mode32.
6738         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6739         (arm_rtx_costs_internal): Delete check of arm_arch3m.
6740         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6741         (mulsa3): Likewise.
6742         (mulusa3): Likewise.
6743         * config/arm/arm-protos.h (arm_arch3m): Delete.
6744         * config/arm/arm-tables.opt: Regenerate.
6745         * config/arm/arm-tune.md: Likewise.
6746         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6747         deleted architectures.
6749 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6751         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6752         (armv5t, armv5te): New features.
6753         (ARMv5, ARMv5e): Delete fgroups.
6754         (ARMv5t, ARMv5te): Adjust for above changes.
6755         (ARMv6m): Likewise.
6756         (armv5, armv5e): Delete arches.
6757         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6758         arm_arch5.
6759         (*call_reg_arm): Likewise.
6760         (*call_value_reg_armv5): Likewise.
6761         (*call_value_reg_arm): Likewise.
6762         (*call_symbol): Likewise.
6763         (*call_value_symbol): Likewise.
6764         (*sibcall_insn): Likewise.
6765         (*sibcall_value_insn): Likewise.
6766         (clzsi2): Likewise.
6767         (prefetch): Likewise.
6768         (define_split and define_peephole2 dependent on arm_arch5):
6769         Likewise.
6770         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6771         arm_arch5e.
6772         (TARGET_ARM_QBIT): Likewise.
6773         (TARGET_DSP_MULTIPLY): Likewise.
6774         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6775         (arm_arch5, arm_arch5e): Delete.
6776         (arm_arch5t, arm_arch5te): Declare.
6777         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6778         (arm_arch5t): Declare.
6779         (arm_option_reconfigure_globals): Update for the above.
6780         (arm_options_perform_arch_sanity_checks): Update comment, replace
6781         use of arm_arch5 with arm_arch5t.
6782         (use_return_insn): Likewise.
6783         (arm_emit_call_insn): Likewise.
6784         (output_return_instruction): Likewise.
6785         (arm_final_prescan_insn): Likewise.
6786         (arm_coproc_builtin_available): Likewise.
6787         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6788         arm_arch5e with arm_arch5t and arm_arch5te.
6789         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6790         (arm_arch5t, arm_arch5te): Declare.
6791         * config/arm/arm-tables.opt: Regenerate.
6792         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6793         * config/arm/t-multilib: Likewise.
6794         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6795         instead of arm_arch5.
6796         (*call_reg_thumb1): Likewise.
6797         (*call_value_reg_thumb1_v5): Likewise.
6798         (*call_value_reg_thumb1): Likewise.
6799         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6800         unreachable path.
6801         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6803 2018-05-18  Martin Liska  <mliska@suse.cz>
6805         PR gcov-profile/84846
6806         * doc/gcov.texi: Document -t option of gcov tool.
6808 2018-05-18  Martin Liska  <mliska@suse.cz>
6810         PR gcov-profile/84846
6811         * gcov.c (print_usage): Add new -t option.
6812         (process_args): Handle the option.
6813         (generate_results): Use stdout as output when requested by
6814         the option.
6816 2018-05-18  Martin Liska  <mliska@suse.cz>
6818         PR gcov-profile/84846
6819         * coverage.c (coverage_init): Write PWD to .gcno file.
6820         * doc/gcov.texi: Document how working directory is printed.
6821         * gcov-dump.c (dump_gcov_file): Print PWD.
6822         * gcov.c (output_intermediate_file): Likewise.
6823         (read_graph_file): Read PWD string.
6824         (output_lines): Print PWD.
6826 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6828         PR middle-end/85817
6829         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6830         for retval and return false if all args to phi are zero.
6832 2018-05-18  Richard Biener  <rguenther@suse.de>
6834         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6835         method.
6836         (evrp_dom_walker::before_dom_children): Call it.
6838 2018-05-18  Richard Biener  <rguenther@suse.de>
6840         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6841         results when processing array refs with variable index.
6843 2018-05-18  Toon Moene  <toon@moene.org>
6845         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6846         directly after that of -floop-interchange. Indicate that both
6847         options are enabled by default when specifying -O3.
6849 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6851         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6852         iterator.  Delete separate integer-mode vec_set<mode> expander.
6853         (aarch64_simd_vec_setv2di): Delete.
6854         (vec_setv2di): Delete.
6855         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6856         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
6857         the "w, r" alternative.
6859 2018-05-18  Martin Liska  <mliska@suse.cz>
6861         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6862         * tree-pass.h (make_pass_lower_switch_O0): New function.
6863         * tree-switch-conversion.c (node_has_low_bound): Remove.
6864         (node_has_high_bound): Likewise.
6865         (node_is_bounded): Likewise.
6866         (class pass_lower_switch): Make it a template type and create
6867         two instances.
6868         (pass_lower_switch::execute): Add template argument.
6869         (make_pass_lower_switch): New function.
6870         (make_pass_lower_switch_O0): New function.
6871         (do_jump_if_equal): Remove.
6872         (emit_case_nodes): Simplify to just handle all 3 cases and leave
6873         all the hard work to tree optimization passes.
6875 2018-05-18  Martin Liska  <mliska@suse.cz>
6877         * dbgcnt.c (limit_low): Renamed from limit.
6878         (limit_high): New variable.
6879         (dbg_cnt_is_enabled): Check for upper limit.
6880         (dbg_cnt): Adjust dumping.
6881         (dbg_cnt_set_limit_by_index): Add new argument for high
6882         value.
6883         (dbg_cnt_set_limit_by_name): Likewise.
6884         (dbg_cnt_process_single_pair): Parse new format.
6885         (dbg_cnt_process_opt): Use strtok.
6886         (dbg_cnt_list_all_counters): Remove 'value' and add
6887         'limit_high'.
6888         * doc/invoke.texi: Document changes.
6890 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
6892         * doc/sourcebuild.texi (scalar_all_fma): Document.
6893         * tree.def (FMA_EXPR): Delete.
6894         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6895         * internal-fn.c (ternary_direct): New macro.
6896         (expand_ternary_optab_fn): Likewise.
6897         (direct_ternary_optab_supported_p): Likewise.
6898         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6899         * builtins.c (fold_builtin_fma): Delete.
6900         (fold_builtin_3): Don't call it.
6901         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6902         * expr.c (expand_expr_real_2): Likewise.
6903         * fold-const.c (operand_equal_p): Likewise.
6904         (fold_ternary_loc): Likewise.
6905         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6906         * gimple.c (DEFTREECODE): Likewise.
6907         * gimplify.c (gimplify_expr): Likewise.
6908         * optabs-tree.c (optab_for_tree_code): Likewise.
6909         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6910         * tree-eh.c (operation_could_trap_p): Likewise.
6911         (stmt_could_throw_1_p): Likewise.
6912         * tree-inline.c (estimate_operator_cost): Likewise.
6913         * tree-pretty-print.c (dump_generic_node): Likewise.
6914         (op_code_prio): Likewise.
6915         * tree-ssa-loop-im.c (stmt_cost): Likewise.
6916         * tree-ssa-operands.c (get_expr_operands): Likewise.
6917         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6918         * fold-const-call.h (fold_fma): Delete.
6919         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6920         CFN_FNMA and CFN_FNMS.
6921         (fold_fma): Delete.
6922         * genmatch.c (combined_fn): New enum.
6923         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6924         (commutative_op): New function.
6925         (commutate): Use it.  Handle more than 2 operands.
6926         (dt_operand::gen_gimple_expr): Use commutative_op.
6927         (parser::parse_expr): Allow :c to be used with non-binary
6928         operators if the commutative operand is known.
6929         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6930         CFN_FMS, CFN_FNMA and CFN_FNMS.
6931         (backprop::process_assign_use): Remove FMA_EXPR handling.
6932         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6933         (gen_hsa_fma): New function.
6934         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6935         IFN_FNMA and IFN_FNMS.
6936         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6937         * gimple-fold.h (follow_all_ssa_edges): Declare.
6938         * gimple-fold.c (follow_all_ssa_edges): New function.
6939         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6940         gimple_build interface and use follow_all_ssa_edges to fold the result.
6941         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6942         instead of checking for optabs directly.
6943         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6944         rather than FMA_EXPRs.
6945         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6946         call to IFN_FMA instead of an FMA_EXPR.
6948 2018-05-17  Jim Wilson  <jimw@sifive.com>
6950         * expr.c (do_tablejump): When converting index to Pmode, if we have a
6951         sign extended promoted subreg, and the range does not have the sign bit
6952         set, then do a sign extend.
6954         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6955         test, check for sign extended subreg and/or constant operands, and
6956         do a sign extend in that case.
6958 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
6960         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6961         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6962         Add untyped.
6963         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6964         Change logics_shift_reg to logics_shift_imm.
6965         (thunderx2t99_fp_loadpair_basic): Delete.
6966         (thunderx2t99_fp_storepair_basic): Delete.
6967         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6968         (thunderx2t99_asimd_polynomial): Delete.
6969         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6970         and neon_fp_mul_d_scalar_q.
6971         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6972         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6973         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6974         (thunderx2t99_asimd_lut): Add missing tbl types.
6975         (thunderx2t99_asimd_ext): Delete.
6976         (thunderx2t99_asimd_load1_1_mult): Delete.
6977         (thunderx2t99_asimd_load1_2_mult): Delete.
6978         (thunderx2t99_asimd_load1_ldp): New.
6979         (thunderx2t99_asimd_load1): New.
6980         (thunderx2t99_asimd_load2): Add missing *load2* types.
6981         (thunderx2t99_asimd_load3): New.
6982         (thunderx2t99_asimd_load4): New.
6983         (thunderx2t99_asimd_store1_1_mult): Delete.
6984         (thunderx2t99_asimd_store1_2_mult): Delete.
6985         (thunderx2t99_asimd_store2_mult): Delete.
6986         (thunderx2t99_asimd_store2_onelane): Delete.
6987         (thunderx2t99_asimd_store_stp): New.
6988         (thunderx2t99_asimd_store1): New.
6989         (thunderx2t99_asimd_store2): New.
6990         (thunderx2t99_asimd_store3): New.
6991         (thunderx2t99_asimd_store4): New.
6993 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
6995         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6996         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
6998 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
6999             Segher Boessenkool  <segher@kernel.crashing.org>
7001         PR target/85698
7002         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7003         operand.
7005 2018-05-17  Richard Biener  <rguenther@suse.de>
7007         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7008         for pruning loop and prune defs feeding only already visited PHIs.
7010 2018-05-17  Richard Biener  <rguenther@suse.de>
7012         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7014 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
7015             Richard Biener  <rguenther@suse.de>
7017         PR tree-optimization/85793
7018         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7019         for VMAT_ELEMENTWISE.
7021 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7023         * internal-fn.h (lookup_internal_fn): Declare
7024         * internal-fn.c (lookup_internal_fn): New function.
7025         * gimple.c (gimple_build_call_from_tree): Handle calls to
7026         internal functions.
7027         * gimple-pretty-print.c (dump_gimple_call): Print "." before
7028         internal function names.
7029         * tree-pretty-print.c (dump_generic_node): Likewise.
7030         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7032 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7034         * gimple-fold.h (gimple_build): Make the function forms take
7035         combined_fn rather than built_in_function.
7036         (gimple_simplify): Likewise.
7037         * gimple-match-head.c (gimple_simplify): Likewise.
7038         * gimple-fold.c (gimple_build): Likewise.
7039         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7040         rather than gimple_build_call_internal.
7041         (get_initial_defs_for_reduction): Likewise.
7042         (vect_create_epilog_for_reduction): Likewise.
7043         (vectorizable_live_operation): Likewise.
7045 2018-05-17  Martin Liska  <mliska@suse.cz>
7047         * gimple-ssa-sprintf.c (format_directive): Do not use
7048         space in between 'G_' and '('.
7050 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
7052         PR target/85323
7053         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7054         even if the mask is not all ones.
7056         PR target/85323
7057         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7058         vector.
7059         (ix86_gimple_fold_builtin): Likewise.
7061         PR target/85323
7062         * config/i386/i386.c: Include tree-vector-builder.h.
7063         (ix86_vector_shift_count): New function.
7064         (ix86_fold_builtin): Fold shift builtins by scalar count.
7065         (ix86_gimple_fold_builtin): Likewise.
7067         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7068         _mm512_setzero): New intrinsics.
7070 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
7071             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7073         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7074         code generation for cases where splatting a value is not useful.
7075         * simplify-rtx.c (simplify_ternary_operation): Simplify
7076         vec_merge across a vec_duplicate and a paradoxical subreg forming
7077         a vector mode to a vec_concat.
7079 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
7081         * config.gcc: Support "goldmont-plus".
7082         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7083         "goldmont-plus".
7084         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7085         PROCESSOR_GOLDMONT_PLUS.
7086         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7087         (processor_target_table): Add "goldmont-plus".
7088         (PTA_GOLDMONT_PLUS): Define.
7089         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7090         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7091         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7092         (fold_builtin_cpu): Add "goldmont-plus".
7093         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7094         (ix86_option_override_internal): Add "goldmont-plus".
7095         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7096         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7097         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7098         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7100 2018-05-17  Richard Biener  <rguenther@suse.de>
7102         PR tree-optimization/85757
7103         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7104         remove defs that only feed that PHI from further processing.
7106 2018-05-16  Jim Wilson  <jimw@sifive.com>
7108         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7109         asterisk to name.
7110         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7112 2018-05-16  Mark Wielaard  <mark@klomp.org>
7114         * dwarf2out.c (count_index_strings): New function.
7115         (output_indirect_strings): Call count_index_strings and generate
7116         header for dwarf_version >= 5.
7118 2018-05-16  Mark Wielaard  <mark@klomp.org>
7120         * dwarf2out.c (dwarf_FORM): New function.
7121         (set_indirect_string): Use dwarf_FORM.
7122         (reset_indirect_string): Likewise.
7123         (size_of_die): Likewise.
7124         (value_format): Likewise.
7125         (output_die): Likewise.
7126         (add_skeleton_AT_string): Likewise.
7127         (output_macinfo_op): Likewise.
7128         (index_string): Likewise.
7129         (output_index_string_offset): Likewise.
7130         (output_index_string): Likewise.
7131         (count_index_strings): Likewise.
7133 2018-05-16  Carl Love  <cel@us.ibm.com>
7135         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7136         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7138 2018-05-16  Martin Jambor  <mjambor@suse.cz>
7140         * ipa-prop.c (ipa_free_all_edge_args): Remove.
7141         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7143 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
7145         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7146         (fnma<mode>4): Likewise.
7147         (fms<mode>4): Likewise.
7148         (fnms<mode>4): Likewise.
7149         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7150         (aarch64_fnma<mode>4): Likewise.
7151         (aarch64_fms<mode>4): Likewise.
7152         (aarch64_fnms<mode>4): Likewise.
7153         (aarch64_fnmadd<mode>4): Likewise.
7155 2018-05-16  Jason Merrill  <jason@redhat.com>
7157         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
7159 2018-05-16  Richard Biener  <rguenther@suse.de>
7161         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7162         (dump_stmt_cost): Declare.
7163         (add_stmt_cost): Dump cost we add.
7164         (add_stmt_costs): New function.
7165         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7166         No longer exported.
7167         (vect_analyze_stmt): Adjust prototype.
7168         (vectorizable_condition): Likewise.
7169         (vectorizable_live_operation): Likewise.
7170         (vectorizable_reduction): Likewise.
7171         (vectorizable_induction): Likewise.
7172         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7173         cost vector to pass to vectorizable_ and record afterwards.
7174         (vect_model_reduction_cost): Take cost vector argument and adjust.
7175         (vect_model_induction_cost): Likewise.
7176         (vectorizable_reduction): Likewise.
7177         (vectorizable_induction): Likewise.
7178         (vectorizable_live_operation): Likewise.
7179         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7180         SLP_TREE_NUMBER_OF_VEC_STMTS.
7181         (vect_analyze_slp_cost_1): Remove.
7182         (vect_analyze_slp_cost): Likewise.
7183         (vect_slp_analyze_node_operations): Take visited args and
7184         a target cost vector.  Avoid processing already visited stmt sets.
7185         (vect_slp_analyze_operations): Use a local cost vector to gather
7186         costs and register those of non-discarded instances.
7187         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7188         (vect_schedule_slp_instance): Remove copying of
7189         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
7190         zero.
7191         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7192         adding cost.  Record cost entry location.
7193         (vect_prologue_cost_for_slp_op): Function to compute cost of
7194         a constant or invariant generated for SLP vect in the prologue,
7195         split out from vect_analyze_slp_cost_1.
7196         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
7197         (vect_model_promotion_demotion_cost): Likewise.
7198         (vect_model_store_cost): Likewise, make static.
7199         (vect_model_load_cost): Likewise.
7200         (vectorizable_bswap): Add cost vector arg and adjust.
7201         (vectorizable_call): Likewise.
7202         (vectorizable_simd_clone_call): Likewise.
7203         (vectorizable_conversion): Likewise.
7204         (vectorizable_assignment): Likewise.
7205         (vectorizable_shift): Likewise.
7206         (vectorizable_operation): Likewise.
7207         (vectorizable_store): Likewise.
7208         (vectorizable_load): Likewise.
7209         (vectorizable_condition): Likewise.
7210         (vectorizable_comparison): Likewise.
7211         (can_vectorize_live_stmts): Likewise.
7212         (vect_analyze_stmt): Likewise.
7213         (vect_transform_stmt): Adjust calls to vectorizable_*.
7214         * tree-vectorizer.c: Include gimple-pretty-print.h.
7215         (dump_stmt_cost): New function.
7217 2018-05-16  Richard Biener  <rguenther@suse.de>
7219         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7220         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7221         * tree-ssa-dse.c: Include tree-ssa-loop.h.
7222         (check_name): New callback.
7223         (dse_classify_store): Track cycles via a visited bitmap of PHI
7224         defs and simplify handling of in-loop and across loop dead stores
7225         and properly fail for loop-variant refs.  Handle byte-tracking with
7226         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7227         limiting the walk.
7229 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
7231         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7232         (vect_get_mask_type_for_stmt): Likewise.
7233         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7234         split out from...
7235         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
7236         to determine the statement's vector type and the vector type that
7237         should be used for calculating nunits.  Deal with cases in which
7238         the type has to be deferred.
7239         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7240         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7241         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7242         (vect_determine_vf_for_stmt): New functions, split out from...
7243         (vect_determine_vectorization_factor): ...here.
7244         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7245         (vect_get_mask_type_for_stmt): New functions, split out from
7246         vect_determine_vectorization_factor.
7248 2018-05-16  Richard Biener  <rguenther@suse.de>
7250         * tree-cfg.c (verify_gimple_assign_ternary): Properly
7251         verify the [VEC_]COND_EXPR embedded comparison.
7253 2018-05-15  Martin Sebor  <msebor@redhat.com>
7255         PR tree-optimization/85753
7256         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7257         RECORD_TYPE in addition to ARRAY_TYPE.
7259 2018-05-15  Martin Sebor  <msebor@redhat.com>
7261         PR middle-end/85643
7262         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7264 2018-05-15  Richard Biener  <rguenther@suse.de>
7266         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7267         add by_clobber_p one.  Change algorithm to collect all defs
7268         representing uses we need to walk and try reducing them to
7269         a single one before failing.
7270         (dse_dom_walker::dse_optimize_stmt): Adjust.
7272 2018-05-13  Mark Wielaard  <mark@klomp.org>
7274         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7275         (size_of_loc_descr): Likewise.
7276         (output_loc_operands): Likewise.
7277         (output_loc_operands_raw): Likewise.
7278         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7279         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7280         (hash_loc_operands): Likewise.
7281         (compare_loc_operands): Likewise.
7283 2018-05-14  Mark Wielaard  <mark@klomp.org>
7285         * dwarf2out.c (count_index_addrs): New function.
7286         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7288 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7290         PR tree-optimization/83648
7291         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7292         return value as malloc candidate.
7294 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7296         PR ipa/85734
7297         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7298         param as true in call to suggest_attribute.
7300 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
7302         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7303         -mreadonly-in-sdata.
7305 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7307         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7308         New pattern.
7309         (aarch64_crypto_aesd_fused): Likewise.
7311 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
7313         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7314         (movsi_aarch64): Likewise.
7315         (load_pairsi): Likewise.
7316         (load_pairdi): Likewise.
7317         (store_pairsi): Likewise.
7318         (store_pairdi): Likewise.
7319         (load_pairsf): Likewise.
7320         (load_pairdf): Likewise.
7321         (store_pairsf): Likewise.
7322         (store_pairdf): Likewise.
7323         (zero_extend): Likewise.
7324         (trunc): Swap alternatives.
7325         (fcvt_target): Add '?' to prefer w over r.
7327 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
7329         PR target/85756
7330         * config/i386/i386.md: Disallow non-commutative arithmetics in
7331         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7332         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
7333         in the peephole2 before it.
7335 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
7337         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7338         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7339         (ix86_handle_option): Handle -mcldemote.
7340         * config.gcc: New header.
7341         * config/i386/cldemoteintrin.h: New file.
7342         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7343         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7344         -mcldemote.
7345         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7346         OPTION_MASK_ISA_CLDEMOTE.
7347         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7348         (ix86_valid_target_attribute_inner_p): Ditto.
7349         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7350         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7351         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7352         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7353         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7354         (cldemote): New.
7355         * config/i386/i386.opt: Add -mcldemote.
7356         * config/i386/x86intrin.h: New header.
7357         * doc/invoke.texi: Add -mcldemote.
7359 2018-05-14  Richard Biener  <rguenther@suse.de>
7361         * doc/match-and-simplify.texi: Adjust :s documentation.
7363 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
7365         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7366         intended memcpy size.
7367         (REORDER_45): Likewise.
7369 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
7371         * sort.cc: New file.
7372         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7373         * vec.c (qsort_chk): Use gcc_qsort.
7374         * Makefile.in (OBJS-libcommon): Add sort.o.
7375         (build/sort.o): New target.  Use it...
7376         (BUILD_RTL): ... here, and...
7377         (build/gencfn-macros): ... here, and...
7378         (build/genmatch): ... here.
7380 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7381             Chung-Ju Wu  <jasonwucj@gmail.com>
7383         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7384         * config/nds32/nds32-graywolf.md: New file.
7385         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7386         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7387         pipeline.
7388         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7389         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7390         * config/nds32/nds32.md (pipeline_model): Add graywolf.
7391         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7392         * config/nds32/pipelines.md: Include n15 settings.
7394 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7395             Chung-Ju Wu  <jasonwucj@gmail.com>
7397         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7398         * config/nds32/nds32-n13.md: New file.
7399         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7400         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7401         pipeline.
7402         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7403         * config/nds32/nds32.md (pipeline_model): Add n13.
7404         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7405         * config/nds32/pipelines.md: Include n13 settings.
7407 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7408             Chung-Ju Wu  <jasonwucj@gmail.com>
7410         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7411         * config/nds32/nds32-n10.md: New file.
7412         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7413         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7414         pipeline.
7415         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7416         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7417         * config/nds32/nds32.md (pipeline_model): Add n10.
7418         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7419         * config/nds32/pipelines.md: Include n10 settings.
7421 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
7422             Kito Cheng  <kito.cheng@gmail.com>
7423             Chung-Ju Wu  <jasonwucj@gmail.com>
7425         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7426         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7427         Add enum values for DSP extension instructions.
7428         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7429         New constraints.
7430         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7431         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7432         New code iterators.
7433         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7434         * config/nds32/nds32-dspext.md: New file for DSP implementation.
7435         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7436         * config/nds32/nds32-intrinsic.md: Likewise.
7437         * config/nds32/nds32_intrinsic.h: Likewise.
7438         * config/nds32/nds32-md-auxiliary.c: Likewise.
7439         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7440         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7441         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7442         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7443         * config/nds32/nds32-protos.h: New declarations for DSP extension.
7444         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7445         TYPE_DMAC in switch statement.
7446         * config/nds32/nds32.c: New checking and implementation for DSP
7447         extension instructions.
7448         * config/nds32/nds32.h: Likewise.
7449         * config/nds32/nds32.md: Likewise.
7450         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7451         * config/nds32/predicates.md: Implement new predicates for DSP
7452         extension.
7454 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
7456         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7457         Reformat alternatives and attributes so it is easier to identify
7458         which constraints/attributes go with which instruction.
7459         (mov<mode>_hardfloat32, FMOVE64): Likewise.
7460         (mov<mode>_softfloat32, FMOVE64): Likewise.
7461         (mov<mode>_hardfloat64, FMOVE64): Likewise.
7462         (mov<mode>_softfloat64, FMOVE64): Likewise.
7464 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7466         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7467         subsection.
7468         (Basic PowerPC Built-in Functions): The new name of the
7469         subsection previously known as "PowerPC Built-in Functions".
7470         (Basic PowerPC Built-in Functions Available on all Configurations):
7471         New subsubsection.
7472         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7473         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7474         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7475         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7477 2018-05-11  Martin Jambor  <mjambor@suse.cz>
7479         PR ipa/85655
7480         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7481         single const.
7483 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
7485         PR target/85733
7486         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7488 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
7490         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7491         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7492         (ix86_handle_option): Handle -mwaitpkg.
7493         * config.gcc: New header.
7494         * config/i386/cpuid.h (bit_WAITPKG): New bit.
7495         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7496         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7497         function type.
7498         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7499         OPTION_MASK_ISA_WAITPKG.
7500         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7501         (ix86_option_override_internal): Add PTA_WAITPKG.
7502         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7503         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7504         IX86_BUILTIN_TPAUSE.
7505         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7506         __builtin_ia32_umwait and __builtin_ia32_tpause.
7507         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7508         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7509         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7510         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7511         UNSPECV_TPAUSE): New.
7512         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7513         * config/i386/i386.opt: Add -mwaitpkg.
7514         * config/i386/waitpkgintrin.h: New file.
7515         * config/i386/x86intrin.h: New header.
7516         * doc/invoke.texi: Add -mwaitpkg.
7518 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
7520         PR target/85606
7521         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7522         equivalent.
7523         (cortex-m0): Use armv6s-m isa.
7524         (cortex-m0plus): Likewise.
7525         (cortex-m1): Likewise.
7526         (cortex-m0.small-multiply): Likewise.
7527         (cortex-m0plus.small-multiply): Likewise.
7528         (cortex-m1.small-multiply): Likewise.
7530 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
7531             Jakub Jelinek  <jakub@redhat.com>
7533         PR tree-optimization/85692
7534         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7535         source permute as well.
7537 2018-05-11  Martin Liska  <mliska@suse.cz>
7539         PR sanitizer/85556
7540         * doc/extend.texi: Document LLVM style format for no_sanitize
7541         attribute.
7543 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
7545         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7546         mode_supports_vsx_dform_quad to mode_supports_dq_form.
7547         (mode_supports_vsx_dform_quad): Likewise.
7548         (mode_supports_vmx_dform): Move these functions to be next to the
7549         other mode_supports functions.
7550         (mode_supports_dq_form): Likewise.
7551         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7552         mode_supports_dq_form.
7553         (reg_offset_addressing_ok_p): Likewise.
7554         (offsettable_ok_by_alignment): Likewise.
7555         (rs6000_legitimate_offset_address_p): Likewise.
7556         (legitimate_lo_sum_address_p): Likewise.
7557         (rs6000_legitimize_address): Likewise.
7558         (rs6000_legitimize_reload_address): Likewise.
7559         (rs6000_secondary_reload_inner): Likewise.
7560         (rs6000_preferred_reload_class): Likewise.
7561         (rs6000_output_move_128bit): Likewise.
7563 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7565         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7566         Generate SImode target register for null target.
7567         <case IX86_BUILTIN_XGETBV>: Ditto.
7568         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7569         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7571 2018-05-10  Carl Love  <cel@us.ibm.com>
7573         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7574         dcbtt and dcbtstt if operands[2] is 0.
7576 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7578         PR target/85693
7579         * config/i386/sse.md (usadv64qi): New expander.
7581 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
7583         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7584         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7585         -maltivec=be support.
7586         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7587         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7588         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7589         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7590         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7591         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7592         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7593         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7594         altivec_vsumsws): Adjust.
7595         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7596         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7597         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7598         support.
7599         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7600         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7601         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7602         (altivec_lve<VI_char>x): Delete expand.
7603         (*altivec_lve<VI_char>x_internal): Rename to...
7604         (altivec_lve<VI_char>x): ... this.
7605         (altivec_lvxl_<mode>): Delete expand.
7606         (*altivec_lvxl_<mode>_internal): Rename to ...
7607         (altivec_lvxl_<mode>): ... this.
7608         (altivec_stvxl_<mode>): Delete expand.
7609         (*altivec_stvxl_<mode>_internal): Rename to ...
7610         (altivec_stvxl_<mode>): ... this.
7611         (altivec_stve<VI_char>x): Delete expand.
7612         (*altivec_stve<VI_char>x_internal): Rename to ...
7613         (altivec_stve<VI_char>x): ... this.
7614         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7615         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7616         reduc_plus_scal_<mode>): Adjust.
7617         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7618         comment.
7619         (rs6000_cpu_cpp_builtins): Adjust.
7620         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7621         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7622         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7623         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7624         -maltivec=be support.
7625         (rs6000_split_vec_extract_var): Adjust.
7626         (rs6000_split_v4si_init): Adjust.
7627         (swap_selector_for_mode): Delete.
7628         (altivec_expand_lvx_be, altivec_expand_stvx_be,
7629         altivec_expand_stvex_be): Delete.
7630         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7631         -maltivec=be support.
7632         (rs6000_gimple_fold_builtin): Ditto.
7633         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7634         Adjust.
7635         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7636         (TARGET_DIRECT_MOVE_64BIT): Adjust.
7637         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7638         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7639         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7640         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7641         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7642         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7643         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7644         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7645         anonymous split): Adjust.
7646         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7647         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7649 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
7651         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7652         when --with-gxx-include-dir is also specified.
7653         * configure: Regenerate.
7655 2018-05-09  Jim Wilson  <jimw@sifive.com>
7657         PR target/84797
7658         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7659         * config/riscv/t-withmultilib: New.
7660         * config/riscv/withmultilib.h: New.
7661         * doc/install.texi: Document RISC-V --with-multilib-list support.
7663 2018-05-09  Richard Biener  <rguenther@suse.de>
7665         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7666         vector.
7667         (vect_bb_vectorization_profitable_p): Adjust.  Compute
7668         actual scalar cost using the cost vector and the add_stmt_cost
7669         machinery.
7671 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7673         PR rtl-optimization/85645
7674         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7675         in the REG_CFA_REGISTER note for LR, don't leave it empty.
7677 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7679         PR rtl-optimization/85645
7680         * shrink-wrap.c (spread_components): Return a boolean saying if
7681         anything was changed.
7682         (try_shrink_wrapping_separate): Iterate spread_components until
7683         nothing changes anymore.
7685 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7687         PR rtl-optimization/85645
7688         * regrename.c (build_def_use): Also kill the chains that include the
7689         destination of a REG_CFA_REGISTER note.
7691 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7693         PR rtl-optimization/85645
7694         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7695         insn that has a REG_CFA_REGISTER note.
7697 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
7699         * cfgexpand.c (expand_clobber): New function.
7700         (expand_gimple_stmt_1): Use it.
7701         * tree-vect-stmts.c (vect_clobber_variable): New function,
7702         split out from...
7703         (vectorizable_simd_clone_call): ...here.
7704         (vectorizable_store): Emit a clobber either side of an
7705         IFN_STORE_LANES sequence.
7706         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7708 2018-05-09  Tom de Vries  <tom@codesourcery.com>
7710         PR target/85626
7711         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7712         (define_insn "trap_if_false"): Add exit after trap.
7714 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
7716         PR rtl-optimization/85638
7717         * bb-reorder.c: Include common/common-target.h.
7718         (create_forwarder_block): New function extracted from...
7719         (fix_up_crossing_landing_pad): ...here.  Rename into...
7720         (dw2_fix_up_crossing_landing_pad): ...this.
7721         (sjlj_fix_up_crossing_landing_pad): New function.
7722         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7723         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7724         from both partitions and exit the loop after one iteration.
7726 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7728         Revert:
7729         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7730         subsection.
7731         (Basic PowerPC Built-in Functions): The new name of the
7732         subsection previously known as "PowerPC Built-in Functions".
7733         (Basic PowerPC Built-in Functions Available on all Configurations):
7734         New subsubsection.
7735         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7736         subsubsection.
7737         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7738         subsubsection.
7739         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7740         subsubsection.
7741         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7742         subsubsection.
7744 2018-05-08  Jim Wilson  <jimw@sifive.com>
7746         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7747         (LD_EMUL_SUFFIX): New.
7748         (LINK_SPEC): Use it.
7750 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7752         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7753         subsection.
7754         (Basic PowerPC Built-in Functions): The new name of the
7755         subsection previously known as "PowerPC Built-in Functions".
7756         (Basic PowerPC Built-in Functions Available on all Configurations):
7757         New subsubsection.
7758         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7759         subsubsection.
7760         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7761         subsubsection.
7762         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7763         subsubsection.
7764         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7765         subsubsection.
7767 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7769         PR target/85683
7770         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7771         after cmpelim optimization.
7773 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
7775         * config.gcc: Support "goldmont".
7776         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7777         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7778         PROCESSOR_GOLDMONT.
7779         * config/i386/i386.c (m_GOLDMONT): Define.
7780         (processor_target_table): Add "goldmont".
7781         (PTA_GOLDMONT): Define.
7782         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7783         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7784         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7785         (fold_builtin_cpu): Add "goldmont".
7786         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7787         (ix86_option_override_internal): Add "goldmont".
7788         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7789         (processor_type): Add PROCESSOR_GOLDMONT.
7790         * config/i386/i386.md: Add CPU "glm".
7791         * config/i386/glm.md: New file.
7792         * config/i386/x86-tune.def: Add m_GOLDMONT.
7793         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7795 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7797         PR target/85572
7798         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7799         E_V4DImode.
7800         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7801         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
7802         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
7804         PR target/85317
7805         * config/i386/i386.c (ix86_fold_builtin): Handle
7806         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7808         PR target/85480
7809         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7810         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7812 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
7814         PR target/85658
7815         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7816         (check_arch): Likewise.
7817         (check_fpu): Return the result rather than printing it.
7818         (end arch): Fix operator precedence.
7819         (end cpu): Likewise.
7820         (END): Print the result from check_fpu.
7822 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7823             Alan Hayward  <alan.hayward@arm.com>
7824             David Sherwood  <david.sherwood@arm.com>
7826         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7827         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7828         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7829         (*fcmuo<mode>_and): New patterns.
7831 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7833         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7834         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7835         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7836         (cmp_op, sve_imm_con): New code attributes.
7837         (SVE_COND_INT_CMP, imm_con): Delete.
7838         (cmp_op): Remove above unspecs from int attribute.
7839         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7840         to...
7841         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
7842         comparison-specific unspecs.
7843         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7844         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7845         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7846         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7847         (*vec_fcm<cmp_op><mode>): Rename to...
7848         (*fcm<cmp_op><mode>): ...this and adjust likewise.
7849         (*vec_fcmuo<mode>): Rename to...
7850         (*fcmuo<mode>): ...this and adjust likewise.
7851         (*pred_fcm<cmp_op><mode>): New pattern.
7852         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7853         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7854         functions.
7855         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7856         and UNORDERED.
7857         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7858         (aarch64_emit_sve_predicated_cond): New function.
7859         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7860         (aarch64_emit_unspec_cond_or): Replace with...
7861         (aarch64_emit_sve_or_conds): ...this new function.  Use
7862         aarch64_emit_sve_ptrue_op for the individual comparisons and
7863         aarch64_emit_binop to OR them together.
7864         (aarch64_emit_inverted_unspec_cond): Replace with...
7865         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
7866         aarch64_emit_sve_ptrue_op for the comparison and
7867         aarch64_emit_unop to invert the result.
7868         (aarch64_expand_sve_vec_cmp_float): Update after the above
7869         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
7871 2018-05-07  Nathan Sidwell  <nathan@acm.org>
7873         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7874         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7875         (Backwards Compatibility): Likewise.
7877 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7879         PR bootstrap/85681
7880         Revert:
7881         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7883         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7884         <prefetch_dynamic_strides>: New const bool field.
7885         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7886         prefetch_dynamic_strides.
7887         (exynosm1_prefetch_tune): Likewise.
7888         (thunderxt88_prefetch_tune): Likewise.
7889         (thunderx_prefetch_tune): Likewise.
7890         (thunderx2t99_prefetch_tune): Likewise.
7891         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7892         to false.
7893         (aarch64_override_options_internal): Update to set
7894         PARAM_PREFETCH_DYNAMIC_STRIDES.
7895         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7896         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7897         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7898         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7899         prefetch-dynamic-strides setting.
7901         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7903         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7904         <minimum_stride>: New const int field.
7905         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7906         minimum_stride field.
7907         (exynosm1_prefetch_tune): Likewise.
7908         (thunderxt88_prefetch_tune): Likewise.
7909         (thunderx_prefetch_tune): Likewise.
7910         (thunderx2t99_prefetch_tune): Likewise.
7911         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7912         (aarch64_override_options_internal): Update to set
7913         PARAM_PREFETCH_MINIMUM_STRIDE.
7914         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7915         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7916         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7917         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7918         stride is constant and is below the minimum stride threshold.
7920 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7922         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7923         to 512.
7925 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7927         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7928         <prefetch_dynamic_strides>: New const bool field.
7929         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7930         prefetch_dynamic_strides.
7931         (exynosm1_prefetch_tune): Likewise.
7932         (thunderxt88_prefetch_tune): Likewise.
7933         (thunderx_prefetch_tune): Likewise.
7934         (thunderx2t99_prefetch_tune): Likewise.
7935         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7936         to false.
7937         (aarch64_override_options_internal): Update to set
7938         PARAM_PREFETCH_DYNAMIC_STRIDES.
7939         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7940         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7941         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7942         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7943         prefetch-dynamic-strides setting.
7945 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7947         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7948         <minimum_stride>: New const int field.
7949         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7950         minimum_stride field.
7951         (exynosm1_prefetch_tune): Likewise.
7952         (thunderxt88_prefetch_tune): Likewise.
7953         (thunderx_prefetch_tune): Likewise.
7954         (thunderx2t99_prefetch_tune): Likewise.
7955         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7956         (aarch64_override_options_internal): Update to set
7957         PARAM_PREFETCH_MINIMUM_STRIDE.
7958         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7959         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7960         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7961         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7962         stride is constant and is below the minimum stride threshold.
7964 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
7966         PR c++/85659
7967         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7968         the type is addressable.  Don't force op into register if it has
7969         BLKmode.
7971 2018-05-05  Roland McGrath  <mcgrathr@google.com>
7973         PR other/77609
7974         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7975         any section for which we don't know a specific type it should have,
7976         regardless of name.  Previously this was done only for the exact
7977         names ".init_array", ".fini_array", and ".preinit_array".
7978         (default_elf_asm_named_section): Add comment about
7979         relationship with default_section_type_flags and SECTION_NOTYPE.
7980         (get_section): Don't consider it a type conflict if one side has
7981         SECTION_NOTYPE and the other doesn't, as long as neither has the
7982         SECTION_BSS et al used in the default_section_type_flags logic.
7984 2018-05-05  Tom de Vries  <tom@codesourcery.com>
7986         PR target/85653
7987         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7988         (workaround_barsyncs): New function.
7989         (nvptx_reorg): Use workaround_barsyncs.
7990         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7991         (define_expand "nvptx_membar_cta"): New define_expand.
7992         (define_insn "*nvptx_membar_cta"): New insn.
7994 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
7996         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7997         To improve optimization opportunities.
7998         * builtin-types.def: The new needed builtin types for the above.
8000 2018-05-04  Richard Biener  <rguenther@suse.de>
8002         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8003         * gimple-ssa-store-merging.c
8004         (imm_store_chain_info::output_merged_store): Remove redundant create,
8005         release split_store vector contents on failure.
8006         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8007         scalar stmt vector on cache hit.
8009 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
8011         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8012         Xilinx FP support.
8013         * config.gcc (powerpc-xilinx-eabi*): Remove.
8014         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8015         support.
8016         (fusion_addis_mem_combo_load): Ditto.
8017         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8018         FP support.
8019         (rs6000_cpu_cpp_builtins): Ditto.
8020         * config/rs6000/rs6000-linux.c
8021         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8022         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8023         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8024         support.
8025         (rs6000_setup_reg_addr_masks): Ditto.
8026         (rs6000_init_hard_regno_mode_ok): Ditto.
8027         (rs6000_option_override_internal): Ditto.
8028         (legitimate_lo_sum_address_p): Ditto.
8029         (rs6000_legitimize_address): Ditto.
8030         (rs6000_legitimize_reload_address): Ditto.
8031         (rs6000_legitimate_address_p): Ditto.
8032         (abi_v4_pass_in_fpr): Ditto.
8033         (setup_incoming_varargs): Ditto.
8034         (rs6000_gimplify_va_arg): Ditto.
8035         (rs6000_split_multireg_move): Ditto.
8036         (rs6000_savres_strategy): Ditto.
8037         (rs6000_emit_prologue_components): Ditto.
8038         (rs6000_emit_epilogue_components): Ditto.
8039         (rs6000_emit_prologue): Ditto.
8040         (rs6000_emit_epilogue): Ditto.
8041         (rs6000_elf_file_end): Ditto.
8042         (rs6000_function_value): Ditto.
8043         (rs6000_libcall_value): Ditto.
8044         * config/rs6000/rs6000.h: Ditto.
8045         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8046         (TARGET_MINMAX): ... this.  New.
8047         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8048         * config/rs6000/rs6000.md: Remove Xilinx FP support.
8049         (*movsi_internal1_single): Delete.
8050         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8051         mfpu=, mxilinx-fpu): Delete.
8052         * config/rs6000/singlefp.h: Delete.
8053         * config/rs6000/sysv4.h: Remove Xilinx FP support.
8054         * config/rs6000/t-rs6000: Ditto.
8055         * config/rs6000/t-xilinx: Delete.
8056         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
8057         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
8058         (VStype_simple): Delete.
8059         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8060         * config/rs6000/xfpu.h: Delete.
8061         * config/rs6000/xfpu.md: Delete.
8062         * config/rs6000/xilinx.h: Delete.
8063         * config/rs6000/xilinx.opt: Delete.
8064         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8065         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8067 2018-05-04  Tom de Vries  <tom@codesourcery.com>
8069         PR libgomp/85639
8070         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8071         if ignore == 0.
8073 2018-05-04  Richard Biener  <rguenther@suse.de>
8075         PR middle-end/85627
8076         * tree-complex.c (update_complex_assignment): We are always in SSA form.
8077         (expand_complex_div_wide): Likewise.
8078         (expand_complex_operations_1): Likewise.
8079         (expand_complex_libcall): Preserve EH info of the original stmt.
8080         (tree_lower_complex): Handle removed blocks.
8081         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8082         on complex multiplication and division libcall builtins.
8084 2018-05-04  Richard Biener  <rguenther@suse.de>
8086         PR middle-end/85574
8087         * fold-const.c (negate_expr_p): Restrict negation of operand
8088         zero of a division to when we know that can happen without
8089         overflow.
8090         (fold_negate_expr_1): Likewise.
8092 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
8094         PR libstdc++/85466
8095         * real.h (real_nextafter): Declare.
8096         * real.c (real_nextafter): New function.
8097         * fold-const-call.c (fold_const_nextafter): New function.
8098         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8099         CASE_CFN_NEXTTOWARD.
8100         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8101         even when arg1_mode is different from arg0_mode.
8103 2018-05-03  Nathan Sidwell  <nathan@acm.org>
8105         * doc/extend.texi (Deprecated Features): Remove
8106         -ffriend-injection.
8107         (Backwards Compatibility): Likewise.
8108         * doc/invoke.texi (C++ Language Options): Likewise.
8109         (C++ Dialect Options): Likewise.
8111 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
8113         PR target/85530
8114         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8115         _mm512_mask_mullox_epi64): New intrinsics.
8117 2018-05-03  Tom de Vries  <tom@codesourcery.com>
8119         PR testsuite/85106
8120         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8121         dump files): Add offload-tree.
8123 2018-05-03  Richard Biener  <rguenther@suse.de>
8125         PR tree-optimization/85615
8126         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8127         to loops not nested in BBs loop father to avoid creating multi-entry
8128         loops.
8130 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8132         PR tree-optimization/70291
8133         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8134         arguments.  Change return type to tree.  Emit libcall as a new
8135         statement rather than replacing existing one when inplace_p is true.
8136         (expand_complex_multiplication_components): New function.
8137         (expand_complex_multiplication): Expand floating-point complex
8138         multiplication using the above.
8139         (expand_complex_division): Rename inner_type parameter to type.
8140         Update expand_complex_libcall call-site.
8141         (expand_complex_operations_1): Update expand_complex_multiplication
8142         and expand_complex_division call-sites.
8144 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8146         PR target/85582
8147         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8148         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8149         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8150         the highest significant bit of the shift count mask is clear.  In
8151         check whether and[sq]i3 is needed verify that all significant bits
8152         of the shift count other than the highest are set.
8154 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8156         PR libgomp/82428
8157         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8158         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8159         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8160         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8161         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8162         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8163         __builtin_goacc_parlevel_size.
8165 2018-05-02  Richard Biener  <rguenther@suse.de>
8167         PR tree-optimization/85597
8168         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8169         do not use split vect_get_vec_defs call but call vect_get_slp_defs
8170         directly.
8172 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8174         PR testsuite/85106
8175         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8176         dump files): Add ltrans-tree.
8178 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8180         PR testsuite/85106
8181         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8182         dump files): Add wpa-ipa.
8184 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
8186         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
8187         powerpc*-*-linux*paired* target.
8188         * config/rs6000/750cl.h: Delete.
8189         * config/rs6000/paired.h: Delete.
8190         * config/rs6000/paired.md: Delete.
8191         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8192         float support.
8193         * config/rs6000/rs6000-builtin.def: Remove paired float support.
8194         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8195         comment.  Remove paired float support.
8196         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8197         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8198         VECTOR_PAIRED.
8199         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8200         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8201         declarations.
8202         * config/rs6000/rs6000.c: Remove paired float support.
8203         (paired_expand_vector_init, paired_expand_vector_move,
8204         paired_emit_vector_compare, paired_emit_vector_cond_expr,
8205         (paired_expand_lv_builtin, paired_expand_stv_builtin,
8206         paired_expand_builtin, paired_expand_predicate_builtin,
8207         paired_init_builtins): Delete.
8208         * config/rs6000/rs6000.h: Remove paired float support.
8209         * config/rs6000/rs6000.md: Remove paired float support.
8210         (move_from_CR_ov_bit): Delete.
8211         * config/rs6000/rs6000.opt (mpaired): Delete.
8212         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8213         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8215 2018-05-02  Richard Biener  <rguenther@suse.de>
8217         PR middle-end/85567
8218         * gimplify.c (gimplify_save_expr): When in SSA form allow
8219         SAVE_EXPRs to compute to SSA vars.
8221 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8223         PR target/85582
8224         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8225         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8226         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8227         clobber operands[2], instead use a new pseudo.  Formatting fixes.
8229 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
8231         PR tree-optimization/85586
8232         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8233         exit early for statements in the same group if the accesses are
8234         not strided.
8236 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8238         PR lto/85451
8239         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8240         error message.
8242 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
8244         PR tree-optimization/85143
8245         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8247 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8249         PR lto/85451
8250         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8251         not found" error message.
8253 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8255         PR other/83786
8256         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8257         * vec.c (test_ordered_remove_if): New function.
8258         (vec_c_tests): Call test_ordered_remove_if.
8259         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8260         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8261         * tree-vect-patterns.c (vect_pattern_recog_1): Use
8262         VEC_ORDERED_REMOVE_IF.
8264 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8266         PR tree-optimization/82665
8267         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8268         pointer subtraction where arguments come from a memchr call.
8270 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
8272         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8273         --push-state --as-needed and --pop-state instead of --as-needed and
8274         --no-as-needed if ld supports it.
8275         * configure: Regenerated.
8277         PR web/85578
8278         * doc/install.texi2html: Replace _002d with - and _002a with * in
8279         generated html files using sed.
8281 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8283         PR c++/85523
8284         * gcc-rich-location.c (blank_line_before_p): New function.
8285         (use_new_line): New function.
8286         (gcc_rich_location::add_fixit_insert_formatted): New function.
8287         * gcc-rich-location.h
8288         (gcc_rich_location::add_fixit_insert_formatted): New function.
8290 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8292         * selftest.c (assert_streq): Rename "expected" and "actual" to
8293         "val1" and "val2".  Extend NULL-handling to cover both inputs
8294         symmetrically, while still requiring both to be non-NULL for a pass.
8295         * selftest.h (assert_streq): Rename "expected" and "actual" to
8296         "val1" and "val2".
8297         (ASSERT_EQ): Likewise.
8298         (ASSERT_EQ_AT): Likewise.
8299         (ASSERT_KNOWN_EQ): Likewise.
8300         (ASSERT_KNOWN_EQ_AT): Likewise.
8301         (ASSERT_NE): Likewise.
8302         (ASSERT_MAYBE_NE): Likewise.
8303         (ASSERT_MAYBE_NE_AT): Likewise.
8304         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
8305         the assertion to pass.
8306         (ASSERT_STREQ_AT): Likewise.
8308 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8310         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8311         interaction with -pie.
8313 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8315         * selftest.h: Fix alphabetization of per-source-file selftest
8316         declarations.
8318 2018-04-30  Jason Merrill  <jason@redhat.com>
8320         PR c++/61982 - dead stores to destroyed objects.
8321         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8322         of clobber.
8324 2018-04-30  Jason Merrill  <jason@redhat.com>
8326         * tree.c (build_clobber): New.
8327         * tree.h: Declare it.
8328         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8330 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8332         * diagnostic-show-locus.c (layout::layout): Update for
8333         location_get_source_line returning a char_span.
8334         (struct char_span): Move to input.h.
8335         (struct correction): Update for fields in char_span becoming
8336         private.
8337         (struct source_line): Update for location_get_source_line
8338         returning a char_span.
8339         (layout::print_line): Likewise.
8340         * edit-context.c (edited_file::print_content): Likewise.
8341         (edited_file::print_diff_hunk): Likewise.
8342         (edited_file::print_run_of_changed_lines): Likewise.
8343         (edited_file::get_num_lines): Likewise.
8344         (edited_line::edited_line): Likewise.
8345         * final.c (asm_show_source): Likewise.
8346         * input.c (location_get_source_line): Convert return type
8347         from const char * to char_span, losing the final "line_len"
8348         param.
8349         (dump_location_info): Update for the above.
8350         (get_substring_ranges_for_loc): Likewise.  Use a char_span
8351         when handling the literal within the line.
8352         (test_reading_source_line): Update for location_get_source_line
8353         returning a char_span.
8354         * input.h (class char_span): Move here from
8355         diagnostic-show-locus.c, converting from a struct to a class.
8356         Make data members private.
8357         (char_span::operator bool): New.
8358         (char_span::length): New.
8359         (char_span::get_buffer): New.
8360         (char_span::operator[]): New.
8361         (char_span::subspan): Make const.
8362         (char_span::xstrdup): New.
8363         (location_get_source_line): Convert return type from const char *
8364         to char_span, losing the final "line_size" param.
8366 2018-04-30  Jan Hubicka  <jh@suse.cz>
8368         * lto-wrapper.c (ltrans_priorities): New static var.
8369         (cmp_priority): New.
8370         (run_gcc): Read priorities and if doing parallel build order
8371         the Makefile by them.
8373 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8375         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8377 2018-04-30  Richard Biener  <rguenther@suse.de>
8379         * tree-cfg.c (verify_address): Remove base argument, add
8380         flag whether to check TREE_ADDRESSABLE and do that.
8381         (verify_expr): Remove.
8382         (verify_types_in_gimple_reference): Add pieces from verify_expr.
8383         (verify_gimple_assign_single): Likewise.
8384         (verify_gimple_switch): Likewise.
8385         (verify_expr_location_1): Dereference tp once.  Add (disabled)
8386         piece from verify_expr.
8387         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8389 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8391         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8393 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8395         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8396         (small_data_pattern): Likewise.
8397         (arc_rewrite_small_data): Likewise.
8398         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8399         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8400         (get_symbol_alignment): New function.
8401         (legitimate_small_data_address_p): Likewise.
8402         (legitimate_scaled_address): Update, call
8403         legitimate_small_data_address_p.
8404         (output_sdata): New static variable.
8405         (arc_print_operand): Update how we handle small data operands.
8406         (arc_print_operand_address): Likewise.
8407         (arc_legitimate_address_p): Update, use
8408         legitimate_small_data_address_p.
8409         (arc_rewrite_small_data_p): Remove.
8410         (arc_rewrite_small_data_1): Likewise.
8411         (arc_rewrite_small_data): Likewise.
8412         (small_data_pattern): Likewise.
8413         (compact_sda_memory_operand): Update to use
8414         legitimate_small_data_address_p and get_symbol_alignment.
8415         (prepare_move_operands): Don't rewite sdata pattern.
8416         (prepare_extend_operands): Remove.
8417         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8418         pattern.
8419         (zero_extendqisi2): Likewise.
8420         (zero_extendhisi2): Likewise.
8421         (extendqihi2): Likewise.
8422         (extendqisi2): Likewise.
8423         (extendhisi2): Likewise.
8424         (addsi3): Likewise.
8425         (subsi3): Likewise.
8426         (andsi3): Likewise.
8427         * config/arc/constraints.md (Usd): Change it to memory constraint.
8429 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8431         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8432         as source of std instructions.
8433         * config/arc/arc.md (movsi_insn): Update pattern predicate to
8434         allow 6-bit constants as source for store instructions.
8435         (movdi_insn): Update instruction pattern to allow 6-bit constants
8436         as source for store instructions.
8438 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8440         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8442 2018-04-30  Nathan Sidwell  <nathan@acm.org>
8443             Sandra Loosemore <sandra@codesourcery.com>
8445         * dumpfile.c (dump_open): Allow '-' for stdout.
8446         * doc/invoke.texi (Developer Options): Document dump filename
8447         determination early.  Document stdin/stdout selection.
8449 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
8451         Microblaze Target: PIC data text relative
8453         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8454         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8455         Add declaration.
8456         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8457         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8458         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8459         New addressing mode for data-text relative position indepenedent code.
8460         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8461         'ADDRESS_SYMBOLIC_TXT_REL'.
8462         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8463         (microblaze_legitimate_pic_operand): Exclude function calls from
8464         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8465         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8466         addresses cases.
8467         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8468         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8469         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8470         for 'address + offset'.
8471         (microblaze_expand_prologue): Add new function prologue call for
8472         'r20' assignation.
8473         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8474         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8475         table in case of TARGET_PIC_DATA_TEXT_REL.
8476         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8477         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8478         Add new macros 'UNSPEC_TEXT',
8479         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8480         + exclude function calls from 'UNSPEC_PLT' in case of data text
8481         relative mode.
8482         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8483         new target hook for generating address diff vector tables in case of
8484         flag_pic.
8485         * doc/tm.texi : Regenerate.
8486         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8487         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8488         of addr diff vector generation.
8489         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8490         target hook definition.
8491         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8492         Add default function for generate_pic_addr_diff_vec -> flag_pic.
8493         * doc/invoke.texi (Add new pic option): Add new microblaze pic
8494         option for data text relative.
8496 2018-04-30  Richard Biener  <rguenther@suse.de>
8498         * tree-chrec.h (evolution_function_is_constant_p): Remove
8499         redundant check.
8500         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8502 2018-04-30  Richard Biener  <rguenther@suse.de>
8504         PR bootstrap/85571
8505         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8507 2018-04-30  Richard Biener  <rguenther@suse.de>
8509         PR tree-optimization/28364
8510         PR tree-optimization/85275
8511         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8512         copying first exit test.
8514 2018-04-28  Mark Wielaard  <mark@klomp.org>
8516         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8517         dwarf_version >= 5.
8518         (dwarf_AT): Handle DW_AT_addr_base.
8519         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8521 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
8523         PR target/84431
8524         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8525         (*ashl<dwi>3_doubleword_mask_1): Ditto.
8526         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8527         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8529 2018-04-28  Richard Biener  <rguenther@suse.de>
8531         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8532         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8533         to reflect use.  Only add interesting stmts.
8535 2018-04-27  Martin Jambor  <mjambor@suse.cz>
8537         PR ipa/85549
8538         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8539         the jump function allows for passing through aggregate values.
8541 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
8543         * input.h (in_system_header_at): Convert from macro to inline
8544         function.
8545         (from_macro_expansion_at): Likewise.
8546         (from_macro_definition_at): Likewise.
8548 2018-04-27  Jeff Law  <law@redhat.com>
8550         * config.gcc: Mark tile* targets as deprecated/obsolete.
8552 2018-04-27  Richard Biener  <rguenther@suse.de>
8554         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8555         fix for ILP32.
8557 2018-04-27  Richard Biener  <rguenther@suse.de>
8559         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8561 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
8563         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8564         with Yd constraint. Set "preferred_for_speed" attribute from
8565         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8566         with Yd constraint.
8567         (*movdi_internal): Ditto.
8568         (movti_interunit splitters): Remove
8569         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8570         (movdi_interunit splitters): Ditto.
8571         * config/i386/constraints.md (Ye): Remove.
8572         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8574 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8576         PR target/85512
8577         * config/aarch64/constraints.md (Usg): Limit to 31.
8578         (Usj): Limit to 63.
8580 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
8582         PR tree-optimization/85529
8583         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8584         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8585         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8586         zero extension or masking of the MSB bit.
8587         (optimize_range_tests): Add FIRST_BB argument, pass it through
8588         to optimize_range_tests_var_bound.
8589         (maybe_optimize_range_tests, reassociate_bb): Adjust
8590         optimize_range_tests callers.
8592 2018-04-26  Richard Biener  <rguenther@suse.de>
8593             Jakub Jelinek  <jakub@redhat.com>
8595         * cgraph.h (symbol_table): Just declare debug method here.
8596         * symtab.c (symbol_table::debug): Define.
8598 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
8600         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8602 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
8604         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8605         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8606         (*movdi_internal): Substitute Yi and Yj constraint with x
8607         and Ym and Yn constraint with y constraint.  Update "isa"
8608         attribute and set "preferred_for_speed" attribute from
8609         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8610         (*movsi_internal): Ditto.
8611         (*movdf_internal): Ditto.
8612         (*movsf_internal): Ditto.
8613         (*zero_extendsidi2): Ditto.
8614         * config/i386/sse.md (vec_set<mode>_0): Ditto.
8615         (sse2_loadld): Ditto.
8616         (*vec_extract<ssevecmodelower>_0): Ditto.
8617         (*vec_extractv4si_0_zext_sse4): Ditto.
8618         (vec_concatv2di): Ditto.
8619         (*vec_dup<mode>): Ditto.
8620         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8621         * config/i386/constraints.md (Yi): Remove.
8622         (Yj): Remove.
8623         (Ym): Remove.
8624         (Yn): Remove.
8626 2018-04-26  Nathan Sidwell  <nathan@acm.org>
8628         * dumpfile.c (dump_open): New.
8629         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8630         (dump_finish): Detect stdio/stderr by value not name.
8632 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
8634         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8636 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8638         PR target/84952
8639         * config/nvptx/nvptx.c (verify_neutering_jumps)
8640         (verify_neutering_labels): New function
8641         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8643 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8645         PR target/84025
8646         * config/nvptx/nvptx.c (needs_neutering_p): New function.
8647         (nvptx_single): Use needs_neutering_p to skip over insns that do not
8648         need neutering.
8650 2018-04-26  Richard Biener <rguenther@suse.de>
8651             Tom de Vries  <tom@codesourcery.com>
8653         PR lto/85422
8654         * lto-streamer-out.c (output_function): Fixup loops if required to match
8655         discovery done in the reader.
8657 2018-04-26  Richard Biener  <rguenther@suse.de>
8659         PR tree-optimization/85116
8660         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8661         have a loop exit from the single latch predecessor.  Remove
8662         case of header with just condition.
8663         (ch_base::copy_headers): Exclude infinite loops from any
8664         processing.
8665         (pass_ch::execute): Record exits.
8667 2018-04-26  Richard Biener  <rguenther@suse.de>
8669         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8670         prologue cost vector and pass it to vect_get_load_cost.
8671         (vect_get_peeling_costs_all_drs): Likewise.
8672         (vect_peeling_hash_get_lowest_cost): Likewise.
8673         (vect_enhance_data_refs_alignment): Likewise.
8675 2018-04-26  Richard Biener  <rguenther@suse.de>
8677         PR middle-end/85450
8678         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8679         checking of integer<->pointer conversions.
8680         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8681         sign-/zero-extending pointer types.
8682         (expand_omp_for_static_chunk): Likewise.
8684 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
8685             Jean Lee  <xiaoyur347@gmail.com>
8687         * config/mips/mips.c (mips_asan_shadow_offset): New function.
8688         (TARGET_ASAN_SHADOW_OFFSET): Define.
8689         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8690         true for -fsanitize=address.
8692 2018-04-25  Mark Wielaard  <mark@klomp.org>
8694         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8695         shorter ones.
8697 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8699         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8700         than "alu", remove explicit "memory" and "imm_disp" attributes.
8701         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8703         PR middle-end/85414
8704         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8705         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8706         gen_lowpart_no_emit.
8708 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
8710         PR target/85473
8711         * config/i386/i386.c (ix86_expand_builtin): Change memory
8712         operand to XI, extend p0 to Pmode.
8713         * config/i386/i386.md: Change unspec volatile and operand
8714         1 mode to XI, change operand 0 mode to P.
8716 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8718         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8719         GET_MODE_MASK before any checking.
8720         (nds32_can_use_bset_p): Likewise.
8721         (nds32_can_use_btgl_p): Likewise.
8723 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8725         * config/nds32/nds32-doubleword.md: New define_split pattern for
8726         illegal register number.
8728 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8730         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8732 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8734         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8736 2018-04-25  Richard Biener  <rguenther@suse.de>
8738         * lto-streamer.h (LTO_major_version): Bump to 8.
8740 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8742         * BASE-VER: Set to 9.0.0.
8744 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
8746         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8747         in __abskf2 and __powikf2.
8749 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8751         PR target/85512
8752         * config/aarch64/constraints.md (Usg, Usj): New constraints.
8753         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8754         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8755         Use the above on operand 2.  Reindent.
8756         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8758 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8760         PR target/85485
8761         * common/config/i386/i386-common.c (ix86_handle_option): Don't
8762         handle OPT_mcet.
8763         * config/i386/i386.opt (mcet): Removed.
8764         * doc/install.texi: Remove -mcet documentation.
8765         * doc/invoke.texi: Likewise.
8767 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8769         PR target/85485
8770         * doc/install.texi: Remove -mcet from bootstrap-cet.
8772 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8774         PR target/85511
8775         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8776         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8777         if TARGET_64BIT.
8779         PR target/85503
8780         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8781         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8782         containing a CONST_VECTOR.
8784 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
8786         * doc/install.texi: Update newlib dependency for nvptx.
8788 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8790         PR target/85508
8791         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8792         instead of INTVAL when shifting x left.
8794 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
8796         PR tree-optimization/85478
8797         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8798         vect_grouped_store_supported for single element vectors.
8800 2018-04-24  Richard Biener  <rguenther@suse.de>
8802         PR target/85491
8803         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8804         load cost increase to the case of non-constant step.
8806 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8808         PR target/84828
8809         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8810         destination if any_malformed_asm.
8812 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8814         PR middle-end/85496
8815         * expr.c (store_field): In the bitfield case, if the value comes from
8816         a function call and is returned in registers by means of a PARALLEL,
8817         do not change the mode of the temporary unless BLKmode and VOIDmode.
8819 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
8821         PR rtl-optimization/85423
8822         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8823         dependencies to debug insns when the previous insn is non-debug.
8825 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8827         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8828         enums into a single definition.
8829         (fls): Fix predicates and printing.
8830         (seti): Likewise.
8832 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8834         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8835         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8836         and short u6 immediate.
8837         (check_if_valid_sleep_operand): Remove.
8838         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8840 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8842         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8843         flag_always_save_lp condition.
8844         * config/nds32/nds32.opt (malways-save-lp): New option.
8846 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8848         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8849         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8850         * config/nds32/nds32.h
8851         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8852         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8854 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8856         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8857         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8859 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8860             Chung-Ju Wu  <jasonwucj@gmail.com>
8862         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8863         Declare.
8864         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8865         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8867 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8869         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8871 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8873         * config/nds32/nds32-protos.h (nds32_data_alignment,
8874         nds32_local_alignment): Declare.
8875         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8876         nds32_local_alignment): New functions.
8877         (TARGET_CONSTANT_ALIGNMENT): Define.
8878         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8880 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8882         * config/nds32/nds32.c
8883         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8884         (TARGET_MODES_TIEABLE_P): Likewise.
8886 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8888         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8889         level Ofast and Og.
8891 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
8892             Chung-Ju Wu  <jasonwucj@gmail.com>
8894         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8895         for unaligned access.
8896         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8897         unaligned access.
8898         * config/nds32/nds32-intrinsic.md: Likewise.
8899         * config/nds32/nds32_intrinsic.h: Likewise.
8900         * config/nds32/nds32.h (nds32_builtins): Likewise.
8901         * config/nds32/nds32.opt (munaligned-access): New option.
8902         * config/nds32/nds32.c (nds32_asm_file_start): Display
8903         flag_unaligned_access status.
8905 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8907         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8908         -mno-relax is present.
8909         * config/riscv/linux.h (LINK_SPEC): Ditto.
8911 2018-04-20  Martin Sebor  <msebor@redhat.com>
8913         PR c/85365
8914         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8915         for null pointers.
8916         (gimple_fold_builtin_stxcpy_chk): Same.
8917         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8919 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
8921         PR target/85456
8922         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8923         __powikf2 when long double is IEEE 128-bit.
8925 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8927         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8928         step to make sure stack always aligned.
8930 2018-04-20  Carl Love  <cel@us.ibm.com>
8932         PR target/83402
8933         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8934         size check for arg0.
8936 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8937             Tom de Vries  <tom@codesourcery.com>
8939         PR target/85445
8940         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8941         Emit insns for calls too.
8942         (nvptx_find_par): Always look for worker-level predecessor insn.
8943         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
8944         calls.
8945         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8946         (nvptx_process_pars): Propagate frames for calls.
8948 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
8950         PR target/85469
8951         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8952         Removed.
8953         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8954         (ix86_handle_option): Don't handle OPT_mibt.
8955         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8956         __SHSTK__.
8957         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8958         has_ibt and ibt.
8959         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8960         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8961         (ix86_target_macros): Define __CET__ with flag_cf_protection
8962         for -fcf-protection.
8963         * config/i386/i386.c (isa2_opts): Remove -mibt.
8964         * config/i386/i386.h (TARGET_IBT): Removed.
8965         (TARGET_IBT_P): Likewise.
8966         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8967         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8968         * config/i386/i386.opt (mcet): Update help message.
8969         (mshstk): Likewise.
8970         (mibt): Removed.
8971         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
8972         -mcet as an alias for -mshstk.
8974 2018-04-20  Richard Biener <rguenther@suse.de>
8976         PR middle-end/85475
8977         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8978         complexity by forcing a single use of the multiply operand.
8980 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8982         ipa/85449
8983         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8984         recursion dependency to only apply to non-clones.
8986 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8988         ipa/85447
8989         * ipa-cp.c (create_specialized_node): Check that clones of
8990         self-recursive edges exist during IPA-CP.
8992 2018-04-19  Toon Moene  <toon@moene.org>
8994         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8995         by -O3.
8997 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8999         PR tree-optimization/85467
9000         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9001         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
9002         VECTOR_CST element to type.
9004 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9006         PR target/85397
9007         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9008         * config/i386/i386.md (builtin_setjmp_setup): Removed.
9009         (builtin_longjmp): Likewise.
9010         (save_stack_nonlocal): New pattern.
9011         (restore_stack_nonlocal): Likewise.
9013 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9015         PR target/85404
9016         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9017         Replace ASM_OUTPUT_LABEL with fprintf.
9019 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9021         PR target/85417
9022         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9023         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9024         * config/i386/i386-c.c (ix86_target_macros_internal): Also
9025         define __IBT__ and __SHSTK__ for -fcf-protection.
9026         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9027         TARGET_IBT.
9028         (ix86_trampoline_init): Likewise.
9029         (x86_output_mi_thunk): Likewise.
9030         (ix86_notrack_prefixed_insn_p): Likewise.
9031         (ix86_option_override_internal): Don't disallow -fcf-protection.
9032         * config/i386/i386.md (rdssp<mode>): Also enable for
9033         -fcf-protection.
9034         (incssp<mode>): Likewise.
9035         (nop_endbr): Likewise.
9036         * config/i386/i386.opt (mcet): Change help message to built-in
9037         functions only.
9038         (mibt): Likewise.
9039         (mshstk): Likewise.
9040         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9041         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
9042         enable CET built-in functions.
9044 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
9046         * common/config/i386/i386-common.c
9047         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9048         OPTION_MASK_ISA_MOVDIRI_UNSET,
9049         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9050         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9051         * config.gcc (movdirintrin.h): New header.
9052         * config/i386/cpuid.h (bit_MOVDIRI,
9053         bit_MOVDIR64B): New bits.
9054         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9055         and -mmvodir64b.
9056         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9057         (VOID, PVOID, PCVOID)): New function types.
9058         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9059         __builtin_ia32_directstoreu_u64,
9060         __builtin_ia32_movdir64b): New builtins.
9061         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9062         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9063         and -mmovdiri.
9064         (ix86_valid_target_attribute_inner_p): Ditto.
9065         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9066         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9067         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9068         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9069         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9070         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9071         (movdiri<mode>, movdir64b_<mode>): New.
9072         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9073         * config/i386/immintrin.h: Include movdirintrin.h.
9074         * config/i386/movdirintrin.h: New file.
9075         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9077 2018-04-19  Richard Biener  <rguenther@suse.de>
9079         PR middle-end/85455
9080         * cfg.c (clear_bb_flags): When loop state says we have
9081         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9083 2018-04-19  Richard Biener  <rguenther@suse.de>
9085         PR tree-optimization/84737
9086         * tree-vect-data-refs.c (vect_copy_ref_info): New function
9087         copying restrict info.
9088         (vect_setup_realignment): Use it.
9089         * tree-vectorizer.h (vect_copy_ref_info): Declare.
9090         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9091         the first DR to all generated stores.
9092         (vectorizable_load): Likewise for loads.
9094 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9096         PR tree-optimization/85446
9097         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9098         the integral and pointer types to have the same precision.
9100         * doc/install.texi: Document --disable-cet being the default and
9101         --enable-cet=auto.
9103 2018-04-18  Martin Liska  <mliska@suse.cz>
9105         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9106         style.
9108 2018-04-18  Martin Liska  <mliska@suse.cz>
9110         Revert
9111         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9113         PR ipa/83983
9114         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9115         arguments if they are comparable.
9117 2018-04-18  Martin Liska  <mliska@suse.cz>
9119         Revert
9120         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9122         PR lto/84805
9123         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9124         incomplete types.
9126 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
9128         PR target/85388
9129         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9130         ENDBR after calling __morestack.
9132 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
9134         PR jit/85384
9135         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9136         by using gcc_base_ver to generate a gcc_driver_version, and use
9137         it when generating GCC_DRIVER_NAME.
9138         * configure: Regenerate.
9140 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
9142         PR target/81084
9143         * config.gcc: Obsolete powerpc*-*-*spe*.
9145 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9147         PR debug/84637
9148         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9149         (stabstr_D): Change type of unum from unsigned int to
9150         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
9151         type.
9153 2018-04-17  Jim Wilson  <jimw@sifive.com>
9155         PR 84856
9156         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9157         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9158         Set arg_pointer_offset after using pretend_args_size.
9160 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9162         PR rtl-optimization/85431
9163         * dse.c (record_store): Ignore zero width stores.
9165         PR sanitizer/85230
9166         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
9167         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9168         __builtin_stack_restore rather than after it.
9169         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9170         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9171         argument instead of virtual_dynamic_stack_rtx.
9173 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9175         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9176         New prototype.
9177         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9178         Add note to error message to explain internal mapping of overloaded
9179         built-in function name to non-overloaded built-in function name.
9180         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9181         function.
9183 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9185         PR target/85424
9186         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9187         where the inputs overlap with the output.
9189 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9191         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9192         (=v, v) alternative and explicit "memory" attribute.
9193         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
9194         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9195         attributes.
9196         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9197         "sselog1" type instead of "sselog".
9198         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9199         "sselog".  Remove explicit "memory" attribute.
9200         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9201         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9202         attributes.
9203         (vec_extract_hi_v32hi): Merge all alternatives into one, use
9204         "sselog1" type instead of "sselog".  Remove explicit "memory"
9205         attribute.
9206         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9207         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9208         attribute.
9209         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9210         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9211         attributes.
9212         (vec_extract_hi_v64qi): Merge all alternatives into one, use
9213         "sselog1" type instead of "sselog".  Remove explicit "memory"
9214         attribute.
9215         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9216         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9217         attribute.
9219         PR target/85430
9220         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9222         PR middle-end/85414
9223         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9224         on a SUBREG.
9226 2018-04-17  Martin Jambor  <mjambor@suse.cz>
9228         PR ipa/85421
9229         * ipa-cp.c (create_specialized_node): Call
9230         expand_all_artificial_thunks if necessary.
9232 2018-04-17  Martin Liska  <mliska@suse.cz>
9234         PR lto/85405
9235         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9236         in message, remote space in between '_G' and '('.
9238 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9240         PR target/85281
9241         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9242         avx512f_vmcmp<mode>3<round_saeonly_name>,
9243         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9244         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9245         avx512f_rndscale<mode><round_saeonly_name>,
9246         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9247         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9248         Use %<iptr>2 instead of %2 for -masm=intel.
9249         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9250         avx512f_vcvttss2usi<round_saeonly_name>,
9251         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9252         -masm=intel.
9253         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9254         avx512f_vcvttsd2usi<round_saeonly_name>,
9255         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9256         Use %q1 instead of %1 for -masm=intel.
9257         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9258         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9259         of %3 for -masm=intel.
9260         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9261         -masm=intel.
9262         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9263         -masm=intel.
9264         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9265         -masm=intel.
9266         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9267         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9268         %g1.
9269         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9270         -masm=intel.
9271         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9272         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9273         %g1 and one with %0 and %1.
9274         (avx512er_vmrcp28<mode><round_saeonly_name>,
9275         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9276         %1 for -masm=intel.
9277         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9278         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9279         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9280         of %0 and %{%4%} for -masm=intel.
9281         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9282         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9283         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9284         order of %0 and %{%5%}%{z%} for -masm=intel.
9286 2018-04-17  Jan Hubicka  <jh@suse.cz>
9288         PR lto/85405
9289         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9291 2018-04-17  Martin Liska  <mliska@suse.cz>
9293         PR ipa/85329
9294         * multiple_target.c (create_dispatcher_calls): Set apostrophes
9295         for target_clone error message.  Make default implementation
9296         clone to be a local declaration.
9297         (separate_attrs): Add new argument and check for an empty
9298         string.
9299         (expand_target_clones): Handle it.
9300         (ipa_target_clone): Make redirection just for target_clones
9301         functions.
9303 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
9304             Tom de Vries  <tom@codesourcery.com>
9306         PR middle-end/84955
9307         * omp-expand.c (expand_oacc_for): Add dummy false branch for
9308         tiled basic blocks without omp continue statements.
9310 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
9312         PR target/83660
9313         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9314         vec_extract expression as having side effects to make sure it gets
9315         a cleanup point.
9317 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
9319         PR target/85403
9320         * config/i386/i386.c (get_builtin_code_for_version): Check
9321         error_mark_node.
9323 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
9325         PR target/84331
9326         * gcc/config.gcc: Support "skylake".
9327         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9328         PROCESSOR_SKYLAKE.
9329         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9330         (processor_target_table): Add "skylake".
9331         (ix86_option_override_internal): Add "skylake".
9332         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9333         PROCESSOR_CANNONLAKE.
9334         (get_builtin_code_for_version): Fix priority for
9335         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9336         PROCESSOR_SKYLAKE-AVX512.
9337         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9338         (processor_type): Add PROCESSOR_SKYLAKE.
9340 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
9341             Jason Merrill  <jason@redhat.com>
9343         PR c++/85112
9344         * convert.c (convert_to_integer_1): Use direct recursion for
9345         enumeral types and types with a precision less than the number
9346         of bits in their mode.
9348 2018-04-16  Julia Koval  <julia.koval@intel.com>
9350         PR target/84413
9351         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9352         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9354 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
9356         PR target/85293
9357         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9358         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9359         and -mno-direct-move.
9361 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
9363         PR target/83402
9364         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9365         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9366         Ensure negative shifts result in {0}.
9368 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
9370         PR rtl-optimization/79916
9371         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9372         regs (if any) to define how to gnerate SD moves when LRA is in
9373         progress.
9375 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
9377         PR rtl-optimization/85393
9378         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9379         * except.c (expand_dw2_landing_pad_for_region): Make static.
9380         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9381         a label and unconditional jump to old_bb, rather than
9382         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9383         basic block.
9385         PR rtl-optimization/85376
9386         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9387         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9388         instead of a specific value.
9390 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9391             Bin Cheng  <bin.cheng@arm.com>
9393         PR tree-optimization/82965
9394         PR tree-optimization/83991
9395         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9396         by_profile_only parameter.
9397         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9398         information if the loop was predicted to iterate too many times.
9399         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9401 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9403         PR lto/71991
9404         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9405         always inline.
9407 2018-04-13  Martin Liska  <mliska@suse.cz>
9408             Jakub Jelinek  <jakub@redhat.com>
9410         PR middle-end/81657
9411         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9412         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9413         * builtins.c (expand_builtin_memory_copy_args): Use
9414         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9415         handle dest_addr == pc_rtx.
9417 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
9419         PR target/85291
9420         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9421         asked to not generate direct moves.
9422         (fix_trunc<mode>si2_stfiwx): Similar.
9423         (fix_trunc<mode>si2_internal): Similar.
9425 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9427         PR debug/83157
9428         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9429         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9430         lookup if dest in some wider mode is known to be const0_rtx and
9431         if so, record permanent equivalence for it to be ZERO_EXTEND of
9432         the narrower mode destination.
9434 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9436         * lto-streamer-out.c (output_function): Revert 259346.
9437         * omp-expand.c (expand_oacc_for): Likewise.
9439 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
9441         PR rtl-optimization/85354
9442         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9443         * sel-sched.c (sel_global_init): ... here.
9445 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
9447         PR target/85238
9448         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9449         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9450         mode for PE-COFF targets.
9451         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9452         (i386_pe_asm_lto_end): Likewise.
9453         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9454         (TARGET_ASM_LTO_END): Likewise.
9455         * config/i386/winnt.c (saved_debug_info_level): New static variable.
9456         (i386_pe_asm_lto_start): New function.
9457         (i386_pe_asm_lto_end): Likewise.
9459 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9460             Richard Biener  <rguenther@suse.de>
9462         PR middle-end/84955
9463         * lto-streamer-out.c (output_function): Fix CFG loop state before
9464         streaming out.
9465         * omp-expand.c (expand_oacc_for): Handle calls to internal
9466         functions like regular functions.
9468 2018-04-12  Richard Biener  <rguenther@suse.de>
9470         PR lto/85371
9471         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9472         for the early LTO debug to properly generate references to it
9473         during DIE emission.  Do not re-use that for the skeleton for
9474         split-dwarf.
9475         (dwarf2out_early_finish): Likewise.
9477 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9479         PR target/85328
9480         * config/i386/sse.md
9481         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9482         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9483         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9484         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9485         and output is a reg, avoid creating invalid lowpart subreg, but
9486         instead split into a 512-bit move.  Don't split if not AVX512VL,
9487         input is xmm16+ reg and output is a mem.
9488         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9489         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9490         xmm16+ reg and output is a mem.
9492 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9494         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9495         also for flag_dwarf2_cfi_asm.
9497 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9499         PR rtl-optimization/85342
9500         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9501         a bool scalar var inside of the loop instead.  Don't try to update
9502         recog_data.operand after failed apply_change_group.
9504 2018-04-12  Tom de Vries  <tom@codesourcery.com>
9506         PR target/85296
9507         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9508         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
9509         array with flexible array member as array without given dimension.
9510         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9511         argument for undefined param to true.
9513 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
9515         PR target/85321
9516         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9517         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9518         from PowerPC section.
9519         * config/rs6000/sysv4.opt (mcall-): Improve help text.
9520         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9521         help text that is too long.
9522         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9523         help text that is too long.
9524         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9525         help text that is too long.
9527 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
9529         * config/alpha/alpha.md (stack_probe_internal): Rename
9530         from "probe_stack".  Update all callers.
9532 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9534         PR rtl-optimization/84566
9535         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9536         sched_macro_fuse_insns.
9538 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9540         PR target/84301
9541         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9542         (compute_block_dependences): ... from here.
9544 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9546         PR tree-optimization/85331
9547         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9548         from int to HOST_WIDE_INT.
9550 2018-04-11  Martin Jambor  <mjambor@suse.cz>
9552         PR ipa/84149
9553         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9554         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9555         not the same as the source val.
9556         (cgraph_edge_brings_value_p): New parameter.
9557         (gather_edges_for_value): Pass destination value to
9558         cgraph_edge_brings_value_p.
9559         (perhaps_add_new_callers): Likewise.
9560         (get_info_about_necessary_edges): Likewise and exclude values brought
9561         only by self-recursive edges.
9562         (create_specialized_node): Redirect only clones of self-calling edges.
9563         (+self_recursive_pass_through_p): New function.
9564         (find_more_scalar_values_for_callers_subset): Use it.
9565         (find_aggregate_values_for_callers_subset): Likewise.
9566         (known_aggs_to_agg_replacement_list): Removed.
9567         (decide_whether_version_node): Re-calculate known constants for all
9568         remaining context clones.
9570 2018-04-11  Richard Biener  <rguenther@suse.de>
9572         PR lto/85339
9573         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9574         from early DWARF output.
9575         (dwarf2out_early_finish): Output line info unconditionally into
9576         early DWARF and add reference to it.
9578 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9580         PR target/85281
9581         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9582         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9583         other than V2DFmode using iptr mode attribute.
9584         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9586 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9588         PR rtl-optimization/84659
9589         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9591 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9593         PR debug/85302
9594         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9595         SIZEP is NULL.
9596         (output_loc_list): Pass address of a dummy size variable even in the
9597         locview handling loop.
9598         (index_location_lists): Add comment on why skip_loc_list_entry can't
9599         call size_of_locs.
9601 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9603         PR target/85261
9604         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9605         into register.
9607 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
9609         PR target/85321
9610         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9611         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9612         and -mstring-compare-inline-limit.
9614 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9616         PR target/85287
9617         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9618         for stack clash protection in a register whenever we need it to be in
9619         a register.
9621 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9623         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9624         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9626 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9628         PR target/85321
9629         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9630         the help text.
9631         (mlong-double-): Ditto.
9632         * config/rs6000/sysv4.opt (msdata=): Ditto.
9633         (mtls-size=): Ditto.
9635 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9637         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9638         erroneous entries for
9639         "vector int vec_ldl (int, long int *)", and
9640         "vector unsigned int vec_ldl (int, unsigned long int *)".
9641         Add comments and entries for
9642         "vector bool char vec_ldl (int, bool char *)",
9643         "vector bool short vec_ldl (int, bool short *)",
9644         "vector bool int vec_ldl (int, bool int *)",
9645         "vector bool long long vec_ldl (int, bool long long *)",
9646         "vector pixel vec_ldl (int, pixel *)",
9647         "vector long long vec_ldl (int, long long *)",
9648         "vector unsigned long long vec_ldl (int, unsigned long long *)".
9649         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9650         type tree bool_long_long_type_node and correct definition of
9651         bool_V2DI_type_node to make reference to this new type tree.
9652         (rs6000_mangle_type): Replace erroneous reference to
9653         bool_long_type_node with bool_long_long_type_node.
9654         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9655         comments to emphasize sign distinctions for char and int types and
9656         replace RS6000_BTI_bool_long constant with
9657         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
9658         use of RS6000_BTI_pixel.
9659         (bool_long_type_node): Remove this macro definition.
9660         (bool_long_long_type_node): New macro definition
9662 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9664         PR rtl-optimization/85300
9665         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9666         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9667         simplify_unary_operation fails.
9669 2018-04-10  Martin Liska  <mliska@suse.cz>
9671         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9672         cgraph_edge and ipa_ref.
9674 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9676         PR target/85177
9677         PR target/85255
9678         * config/i386/sse.md
9679         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9680         computation of the VEC_MERGE selector from mask.
9681         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9682         Fix decoding of the VEC_MERGE selector into mask.
9684 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9686         PR tree-optimization/85286
9687         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9689 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9691         * final.c (final_1): Set insn_last_address as well as
9692         insn_current_address.
9694 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9696         PR target/85173
9697         * explow.c (emit_stack_probe): Call validize_mem on memory location
9698         before passing it to gen_probe_stack.  Create address operand and
9699         legitimize it for the probe_stack_address case.
9701 2018-04-09  Jan Hubicka  <jh@suse.cz>
9703         PR lto/85078
9704         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9705         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9706         * tree.c (free_lang_data_in_type): Fix handling of binfos;
9707         walk basetypes.
9708         (free_lang_data): Rebuild type inheritance graph.
9710 2018-04-09  Martin Sebor  <msebor@redhat.com>
9712         * invoke.texi (-finline-small-functions): Mention other optimization
9713         options.
9714         (-findirect-inlining, -fpartial-inlining): Same.
9715         (-finline-functions-called-once): Same.
9716         (-freorder-blocks-and-partition): Same.
9718 2018-04-09  Jan Hubicka  <jh@suse.cz>
9720         PR rtl/84058
9721         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9722         jumps; choose last target that matches the criteria (i.e.
9723         no partition changes for non-crossing jumps).
9724         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9725         support for redirecting crossing jumps to non-crossing.
9727 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
9729         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9730         also for naked functions.
9732 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
9734         * config/arc/arc.md (add_shift): New pattern.
9735         (add_shift2): Likewise.
9736         (sub_shift): Likewise.
9737         (sub_shift_cmp0_noout): Likewise.
9738         (compare_si_ashiftsi): Likewise.
9739         (xbfu_cmp0_noout): New combine pattern.
9740         (xbfu_cmp0"): Likewise.
9741         (movsi_set_cc_insn): Place the predicable variant first.
9742         (commutative_binary_cmp0_noout): Remove clobber.
9743         (commutative_binary_cmp0): New pattern.
9744         (noncommutative_binary_cmp0): Likewise.
9745         (noncommutative_binary_cmp0_noout): Likewise.
9746         (noncommutative_binary_comparison_result_used): Removed.
9747         (rsub_cmp0): New pattern.
9748         (rsub_cmp0_noout): Likewise.
9749         (extzvsi): Changed, keep only meaningful variants.
9750         (SQH, SEZ): New iterators.
9751         (SQH_postfix): New mode attribute.
9752         (SEZ_prefix): New code attribute.
9753         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9754         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9755         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9756         of numerical value.
9757         (noncommutative_operator): Check the availability of barrel
9758         shifter option.
9760 2018-04-09  Richard Biener  <rguenther@suse.de>
9762         PR tree-optimization/85284
9763         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9764         Only use the niter constraining form of simple_iv when the exit
9765         is always executed.
9767 2018-04-09  Tom de Vries  <tom@codesourcery.com>
9769         PR target/84041
9770         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9771         (define_expand "*memory_barrier"): New define_expand.
9772         (define_insn "memory_barrier"): New insn.
9774 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9776         PR rtl-optimization/80463
9777         PR rtl-optimization/83972
9778         PR rtl-optimization/83480
9780         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9781         correct producer for the insn.
9782         (tidy_control_flow): Fixup seqnos in case of debug insns.
9784 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9786         PR rtl-optimization/83913
9788         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9789         different sched-times when merging exprs.
9791 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9793         PR rtl-optimization/83962
9795         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9796         tidy_fallthru_edge and tidy_control_flow.
9798 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9800         PR rtl-optimization/83530
9802         * sel-sched.c (force_next_insn): New global variable.
9803         (remove_insn_for_debug): When force_next_insn is true, also leave only
9804         next insn in the ready list.
9805         (sel_sched_region): When the region wasn't scheduled, make another pass
9806         over it with force_next_insn set to 1.
9808 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9810         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9811         into tm_file.
9812         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9813         for interrupt control.
9814         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9815         functions for interrupt control.
9816         * config/nds32/nds32-intrinsic.md: Likewise.
9817         * config/nds32/nds32_intrinsic.h: Likewise.
9818         * config/nds32/nds32.h (nds32_builtins): Likewise.
9820 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9822         * config/nds32/nds32.c (nds32_init_machine_status,
9823         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9824         strict_aligned_p field.
9825         (nds32_expand_to_rtl_hook): New function.
9826         (TARGET_EXPAND_TO_RTL_HOOK): Define.
9827         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9829 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9830             Chung-Ju Wu  <jasonwucj@gmail.com>
9832         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9833         * config/nds32/nds32-n7.md: New file.
9834         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9835         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9836         pipeline.
9837         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9838         * config/nds32/nds32.md (pipeline_model): Add n7.
9839         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9840         * config/nds32/pipelines.md: Include n7 settings.
9842 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9843             Chung-Ju Wu  <jasonwucj@gmail.com>
9845         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9846         * config/nds32/nds32-e8.md: New file.
9847         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9848         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9849         pipeline.
9850         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9851         * config/nds32/nds32.md (pipeline_model): Add e8.
9852         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9853         * config/nds32/pipelines.md: Include e8 settings.
9855 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9856             Chung-Ju Wu  <jasonwucj@gmail.com>
9858         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9859         * config/nds32/nds32-n8.md: New file.
9860         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9861         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9862         pipeline.
9863         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9864         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9865         * config/nds32/nds32.md (pipeline_model): Add n8.
9866         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9867         * config/nds32/pipelines.md: Include n8 settings.
9869 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9870             Chung-Ju Wu  <jasonwucj@gmail.com>
9872         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9873         * config/nds32/nds32-n9-2r1w.md: New file.
9874         * config/nds32/nds32-n9-3r2w.md: New file.
9875         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9876         nds32_register_ports): New or modify for cpu n9.
9877         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9878         pipeline.
9879         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9880         * config/nds32/nds32-utils.c: New file.
9881         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9882         TARGET_MUL_SLOW): Define.
9883         * config/nds32/nds32.md (pipeline_model): New attribute.
9884         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9885         New options that support cpu n9.
9886         * config/nds32/pipelines.md: Include n9 settings.
9887         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9889 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9891         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9892         information if necessary.
9893         (output_cond_branch_compare_zero): Likewise.
9894         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9895         (nds32_target_alignment): Refine for alignment.
9896         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9897         (FUNCTION_BOUNDARY): Modify.
9898         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9899         align case.
9900         * config/nds32/nds32.opt (malways-align, malign-functions): New.
9902 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9904         * config/nds32/constants.md (unspec_volatile_element): Add values for
9905         TLB operation and data prefetch.
9906         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9907         functions for TLB operation and data prefetch.
9908         * config/nds32/nds32-intrinsic.md: Likewise.
9909         * config/nds32/nds32_intrinsic.h: Likewise.
9910         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9911         (nds32_print_operand): Likewise.
9912         * config/nds32/nds32.h (nds32_builtins): Likewise.
9914 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
9915         Andrew Pinski <pinsika@gcc.gnu.org>
9917         PR middle-end/82976
9918         * match.pd: Use constant_boolean_node of correct type instead of
9919         boolean_true_node or boolean_false_node for simplifying
9920         pointer comparisons to zero.
9922 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9924         PR tree-optimization/80021
9925         * tree.c (verify_type_variant): Make error call in verify_variant_match
9926         translatable and remove final full stop.
9928 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9930         * config/nds32/constants.md (unspec_volatile_element): Add
9931         UNSPEC_VOLATILE_EH_RETURN.
9932         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9933         nds32_output_stack_pop): Support dwarf exception handling process.
9934         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9935         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9936         exception handling process.
9937         (nds32_compute_stack_frame): Likewise.
9938         (nds32_return_addr_rtx): Likewise.
9939         (nds32_initial_elimination_offset): Likewise.
9940         (nds32_expand_prologue): Likewise.
9941         (nds32_expand_epilogue): Likewise.
9942         (nds32_dynamic_chain_address): New function.
9943         * config/nds32/nds32.h (machine_function): Add fields for dwarf
9944         exception handling.
9945         (DYNAMIC_CHAIN_ADDRESS): Define.
9946         (EH_RETURN_DATA_REGNO): Define.
9947         (EH_RETURN_STACKADJ_RTX): Define.
9948         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9949         patterns for dwarf exception handling.
9951 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9953         * config/nds32/nds32.h: Clean up obsolete macros.
9955 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9957         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9958         Add enum values for particular instructions.
9959         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9960         particular intrinsic functions.
9961         * config/nds32/nds32-intrinsic.md: Likewise.
9962         * config/nds32/nds32_intrinsic.h: Likewise.
9963         * config/nds32/nds32.h (nds32_builtins): Likewise.
9964         * config/nds32/nds32.md (type): Add pbsad and pbsada.
9965         (btst, ave): New patterns for particular instructions.
9967 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9969         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9970         Add enum values for atomic load/store and memory sync.
9971         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9972         and memory sync.
9973         * config/nds32/nds32-intrinsic.md: Likewise.
9974         * config/nds32/nds32_intrinsic.h: Likewise.
9975         * config/nds32/nds32.h (nds32_builtins): Likewise.
9977 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9979         PR tree-optimization/85257
9980         * fold-const.c (native_encode_vector): If not all elts could fit
9981         and off is -1, return 0 rather than offset.
9982         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9983         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9984         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
9985         adjust buffer in native_interpret_expr call.
9987 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9989         * config/nds32/constants.md (unspec_volatile_element): Add cache
9990         control enum values.
9991         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9992         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9993         * config/nds32/nds32.c (nds32_cctl_names): New.
9994         (nds32_print_operand): Handle cache control register names.
9995         * config/nds32/nds32.h (nds32_builtins): New enum values.
9996         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9997         macros.
9998         * config/nds32/nds32.md (type): Add mmu.
9999         * config/nds32/pipelines.md (simple_insn): Add mmu.
10001 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10003         * config/nds32/nds32.md (type): Remove call.
10004         * config/nds32/pipelines.md (simple_insn): Likewise.
10006 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10008         * config/nds32/constants.md (unspec_volatile_element): Add
10009         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10010         UNSPEC_VOLATILE_FMFCFG.
10011         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10012         description for fmfcfg and fmfcsr.
10013         (bdesc_1arg): Add fmtcsr.
10014         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10015         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10016         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10017         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10018         unspec_fmfcfg): New patterns.
10019         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10020         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10021         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10022         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10023         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10024         __nds32__fmfcfg): Define.
10026 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10028         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10029         intrinsic register names.
10030         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10031         intrinsic register enum values and macros.
10033 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10035         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10036         for load/store addressing form.
10037         (nds32_print_operand_address): Likewise.
10039 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
10041         PR target/85196
10042         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10043         based on LABEL_REF.  Remove useless assertion.
10044         (pic_address_needs_scratch): Fix formatting.
10045         (sparc_legitimize_pic_address): Minor tweaks.
10046         (sparc_delegitimize_address): Adjust assertion accordingly.
10047         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10048         into symbolic_operand.
10049         (movsi_high_pic_label_ref): Likewise.
10050         (movsi_lo_sum_pic_label_ref): Likewise.
10051         (movdi_pic_label_ref): Likewise.
10052         (movdi_high_pic_label_ref): Likewise.
10053         (movdi_lo_sum_pic_label_ref): Likewise.
10055 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
10057         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10058         custom LIB_SPEC setup.
10060 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
10061             Kito Cheng  <kito.cheng@gmail.com>
10063         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10064         * config/riscv/freebsd.h: New.
10066 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10068         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10069         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10070         file.
10072 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10073             Kito Cheng  <kito.cheng@gmail.com>
10075         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10076         nds32_output_call, nds32_symbol_binds_local_p): New functions.
10077         * config/nds32/nds32-protos.h (nds32_output_call,
10078         nds32_output_return): Declare.
10079         * config/nds32/nds32.md: Refine all the call and return patterns.
10081 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10083         PR debug/85252
10084         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10085         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10087         PR rtl-optimization/84872
10088         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10089         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10090         EDGE_CROSSING edge.
10092 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
10094         * expr.c (copy_blkmode_to_reg): Revert 254862.
10095         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10097 2018-04-06  Richard Biener  <rguenther@suse.de>
10099         PR middle-end/85244
10100         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10101         after seeing a component reference with an adjacent field.  Treat
10102         refs to arrays at struct end of external decls similar to
10103         refs to unconstrained commons.
10105 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10107         PR sanitizer/85213
10108         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10109         look through SAVE_EXPRs with non-side-effects argument.  Adjust
10110         recursive calls.
10111         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10112         save_p here.
10114 2018-04-06  Richard Biener  <rguenther@suse.de>
10116         PR middle-end/85180
10117         * alias.c (find_base_term): New wrapper around find_base_term
10118         unwinding CSELIB_VAL_PTR changes.
10119         (find_base_term): Do not restore CSELIB_VAL_PTR during the
10120         recursion.
10122 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10124         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10125         instructions.
10126         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10127         constant definitions.
10128         ("nop"): lr 0,0 -> nopr r0
10129         ("nop_lr0", "nop_lr1"): New insn definitions.
10131 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10133         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10134         NDS32_V3PUSH_AVAILABLE_P macro.
10136 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
10137             Chung-Ju Wu  <jasonwucj@gmail.com>
10139         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10140         (nds32*-*-*): Add float and fpu_config into supported_defaults.
10141         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10142         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10143         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10144         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10145         * config/nds32/constraints.md: New constraints and checking for hard
10146         float configuration.
10147         * config/nds32/iterators.md: New mode iterator and attribute for hard
10148         float configuration.
10149         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10150         patterns.
10151         * config/nds32/nds32-fpu.md: New file.
10152         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10153         deal with hard float code generation.
10154         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10155         ARCH_V3S.
10156         (abi_type, float_reg_number): New enum type.
10157         * config/nds32/nds32-predicates.c: New predicates for hard float.
10158         * config/nds32/nds32-protos.h: Declare functions for hard float.
10159         * config/nds32/nds32.c: Implementation for hard float configuration.
10160         * config/nds32/nds32.h: Definitions for hard float configuration.
10161         * config/nds32/nds32.md: Include hard float machine description and
10162         modify patterns for hard float configuration.
10163         * config/nds32/nds32.opt: New options for hard float configuration.
10164         * config/nds32/predicates.md: New predicates for hard float
10165         configuration.
10167 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10169         * common/config/nds32/nds32-common.c
10170         (nds32_option_optimization_table): Enable -mreleax-hint by default.
10172 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
10174         PR middle-end/85195
10175         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10176         CONSTRUCTOR_ELT (ctor, ...)->value.
10178 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
10180         PR target/85193
10181         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10183 2018-04-05  Tom de Vries  <tom@codesourcery.com>
10185         PR target/85204
10186         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10187         cond jump.
10189 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10190             Kito Cheng  <kito.cheng@gmail.com>
10192         * config/nds32/constraints.md (U33): Fine-tune checking condition.
10193         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10194         * config/nds32/nds32.h (nds32_16bit_address_type): Add
10195         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10197 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10198             Kito Cheng  <kito.cheng@gmail.com>
10200         * config/nds32/constraints.md (Ufe): New memory constraint.
10201         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10202         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10203         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10204         operands.
10205         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10206         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10208 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10210         * config/nds32/nds32.md: Use optimize_size in the condition for
10211         alu-shift instructions.
10213 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10215         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10217 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10219         * config/nds32/nds32.md (negsi2): Refine pattern.
10221 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10222             Chung-Ju Wu  <jasonwucj@gmail.com>
10224         * config/nds32/iterators.md (shift_rotate): New code iterator.
10225         (shift): New code attribute.
10226         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10227         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10228         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10229         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10230         bit-wise operations.
10231         (andsi3, *andsi3): Ditto.
10232         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10233         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10234         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10235         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10236         nds32_ior_operand, nds32_xor_operand): New predicates.
10238 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10240         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10241         (addsi3, subsi3): ... this.
10243 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10245         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10247 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10249         * config/nds32/nds32.md: Adjust indention.
10251 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10253         * config/nds32/nds32.md (feature): New attribute.
10255 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10257         * config/nds32/nds32.md (subtype): New attribute.
10259 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10261         PR target/85203
10262         * config/arm/arm-builtins.c (arm_expand_builtin): Change
10263         expansion to perform a bitwise AND of the argument followed by a
10264         boolean negation of the result.
10266 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
10268         PR rtl-optimization/84878
10269         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10270         the basic block.  Assert the use reference is not artificial and that
10271         it has an associated insn.
10273 2018-04-04  Michael Matz  <matz@suse.de>
10275         * builtins.c (compute_objsize): Pass correct operand
10276         to array_at_struct_end_p.
10278 2018-04-04  Richard Biener  <rguenther@suse.de>
10280         PR lto/85176
10281         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10282         from contexts for DINFO_LEVEL_TERSE and below.
10284 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10286         * config/nds32/nds32-doubleword.md (move_<mode>): Require
10287         resiter_operand condition.
10288         * config/nds32/nds32.md (*move<mode>): Ditto.
10290 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10291             Monk Chiang  <sh.chiang04@gmail.com>
10293         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10295 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10297         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10299 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10300             Kito Cheng  <kito.cheng@gmail.com>
10302         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10303         nds32_cond_code_str, output_cond_branch,
10304         output_cond_branch_compare_zero, nds32_expand_cbranch,
10305         nds32_expand_cstore, nds32_expand_movcc,
10306         nds32_output_cbranchsi4_equality_zero,
10307         nds32_output_cbranchsi4_equality_reg,
10308         nds32_output_cbranchsi4_equality_reg_or_const_int,
10309         nds32_output_cbranchsi4_greater_less_zero: New functions.
10310         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10311         nds32_expand_cstore, nds32_expand_movcc,
10312         nds32_output_cbranchsi4_equality_zero,
10313         nds32_output_cbranchsi4_equality_reg,
10314         nds32_output_cbranchsi4_equality_reg_or_const_int,
10315         nds32_output_cbranchsi4_greater_less_zero): Declare.
10316         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10317         nds32_rimm11s_operand): New predicates.
10318         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10319         * config/nds32/nds32.md: Rewrite all the branch and conditional move
10320         patterns.
10322 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10324         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10325         * config/nds32/nds32.md: Ditto.
10326         * config/nds32/pipelines.md: Ditto.
10328 2018-04-04  Richard Biener  <rguenther@suse.de>
10330         PR tree-optimization/85168
10331         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10332         propagating abnormals.
10334 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10336         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10338 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10339             Kito Cheng  <kito.cheng@gmail.com>
10341         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10342         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10343         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10344         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10345         * config/nds32/nds32.md (sibcall_internal): New.
10346         (sibcall_register): Remove.
10347         (sibcall_immediate): Remove.
10348         (sibcall_value_internal): New.
10349         (sibcall_value_register): Remove.
10350         (sibcall_value_immediate): Remove.
10351         * config/nds32/predicates.md (nds32_general_register_operand): New.
10352         (nds32_call_address_operand): New.
10354 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10356         PR rtl-optimization/85167
10357         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10358         bb_defs if *split_p, instead preinitialize it to NULL.
10360         PR tree-optimization/85156
10361         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10362         evaluating the argument multiple times.
10364 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
10366         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10367         than vector.
10368         (_mm_cvtpd_ps): Likewise.
10369         (_mm_cvttpd_epi32): Likewise.
10370         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10371         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10372         vector, pixel, and bool following altivec.h include.
10374 2018-04-03  Martin Sebor  <msebor@redhat.com>
10376         * doc/extend.texi (Common Function Attributes): Clarify.
10377         (const attribute): Likewise.
10378         (pure attribute): Likewise.
10380 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10382         PR target/85169
10383         * config/i386/i386.c (ix86_expand_vector_set): Use
10384         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
10386 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
10388         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10389         instructions when changing rounding bits to preserve precision bits
10390         in the x87 control word.
10392 2018-04-03  Martin Liska  <mliska@suse.cz>
10394         PR tree-optimization/82491
10395         * rtl.h (strip_offset_and_add): Replace += suboffset with
10396         poly_uint64 () + suboffset.
10398 2018-03-29  Martin Liska  <mliska@suse.cz>
10399             Martin Jambor  <mjambor@suse.cz>
10401         PR ipa/84947
10402         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10403         param_type is not an integral or pointer type.
10405 2018-04-03  Richard Biener  <rguenther@suse.de>
10407         * sese.h (recompute_all_dominators): Remove.
10409 2018-04-02  Martin Sebor  <msebor@redhat.com>
10411         * doc/invoke.texi (-Wrestrict): Fix typos.
10413 2018-04-02  Jim Wilson  <jimw@sifive.com>
10415         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10416         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10417         (<optab>di3, <optab>si3_extend): Likewise.
10418         (<optab>si3_mask, <optab>si3_mask_1): New.
10419         (<optab>di3_mask, <optab>di3_mask_1): New.
10420         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10421         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10422         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10424 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
10426         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10427         example.
10429 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10431         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10432         (nds32_canonicalize_comparison): New function.
10434 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10435             Kito Cheng  <kito.cheng@gmail.com>
10436             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10438         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10439         * config/nds32/constants.md (unspec_volatile_element): Add
10440         UNSPEC_VOLATILE_RELAX_GROUP.
10441         * config/nds32/nds32-relax-opt.c: New file.
10442         * config/nds32/nds32-predicates.c
10443         (nds32_symbol_load_store_p): New function.
10444         * config/nds32/nds32-protos.h
10445         (nds32_symbol_load_store_p): Declare function.
10446         (make_pass_nds32_relax_opt): Declare new rtl pass function.
10447         * config/nds32/nds32.c
10448         (nds32_register_pass): New function to register pass.
10449         (nds32_register_passes): New function to register passes.
10450         * config/nds32/nds32.md (relax_group): New pattern.
10451         * config/nds32/nds32.opt (mrelax-hint): New option.
10452         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10454 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
10456         * config/nds32/t-nds32: Modify files dependency.
10458 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10460         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10461         (PROFILE_HOOK): Define its implementation.
10463 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10465         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10466         type and 32-bit size.
10468 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
10470         PR middle-end/85090
10471         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10472         (V_128_256): New mode iterator.
10473         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10474         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10475         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10476         of V.
10477         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10478         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10480 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
10482         PR target/83315
10483         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10484         NaN inputs correctly.
10486 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
10488         PR target/80546
10489         * config/rs6000/vsx.md (??r): New mode attribute.
10490         (*vsx_mov<mode>_64bit): Use it.
10491         (*vsx_mov<mode>_32bit): Likewise.
10493 2018-03-30  Martin Sebor  <msebor@redhat.com>
10495         PR tree-optimization/84818
10496         * builtins.c (check_access): Use warning_n.
10498 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10500         PR target/83822
10501         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10502         condition.
10503         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10504         condition.
10506 2018-03-30  Julia Koval  <julia.koval@intel.com>
10508         PR target/84413
10509         * x86-tune.def (movx, partial_reg_dependency): Enable for
10510         m_SKYLAKE_AVX512.
10512 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
10514         PR inline-asm/84985
10515         * lra-constraints.c (process_alt_operands): Move setting
10516         this_alternative_matches below.
10518 2018-03-29  Martin Liska  <mliska@suse.cz>
10520         PR lto/84995.
10521         * doc/invoke.texi: Document how LTO works with debug info.
10522         Describe auto-load support of binutils.  Mention 'x86-64'
10523         as valid option value of -march option.
10525 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
10527         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10529         PR c/85094
10530         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10531         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10532         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10533         checking.
10535 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10537         PR target/84912
10538         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10539         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10540         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10541         for RS6000_BTM_POWERPC64.
10542         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10543         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10544         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10545         definition.
10546         (DIVDE): Use it.
10547         (DIVDEU): Likewise.
10549 2018-03-28 Carl Love  <cel@us.ibm.com>
10551         Revert
10552         2017-09-27  Carl Love  <cel@us.ibm.com>
10554         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10555         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10556         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10557         fctiw instruction.
10559 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10561         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10562         instead of __vector bool.
10563         (_mm_max_pu8): Likewise.
10564         (_mm_min_pi16): Likewise.
10566 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10568         PR target/84912
10569         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10570         (DIVWEUO): Likewise.
10571         (DIVDEO): Likewise.
10572         (DIVDEUO): Likewise.
10573         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10574         DIVWEUO and DIVDEUO.
10575         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10576         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10577         (div_extend): Likewise.
10578         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10579         builtin function.
10580         (__builtin_divweuo): Likewise.
10581         (__builtin_divdeo): Likewise.
10582         (__builtin_divdeuo): Likewise.
10584 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10586         PR target/85095
10587         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10588         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10590         PR tree-optimization/82004
10591         * gimple-match-head.c (optimize_pow_to_exp): New function.
10592         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10593         Don't fold to exp if optimize_pow_to_exp is false.
10595 2018-03-28  Martin Liska  <mliska@suse.cz>
10597         PR other/84819
10598         * calls.c (initialize_argument_information): Fix trailing space.
10599         * common.opt: Fix typo and provide better explanation for
10600         -fsanitize-coverage option.
10601         * config/i386/i386.opt: Fix typo.
10603 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10604             Martin Liska  <mliska@suse.cz>
10606         PR sanitizer/85081
10607         * gimplify.c (asan_poison_variable): Don't do the check for
10608         gimplify_omp_ctxp here.
10609         (gimplify_decl_expr): Do it here.
10610         (gimplify_target_expr): Likewise.
10612 2018-03-28  Martin Liska  <mliska@suse.cz>
10614         PR target/84988
10615         * config/i386/i386.c (ix86_function_arg_advance): Do not call
10616         chkp_type_bounds_count if MPX is not enabled.
10618 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10620         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10622 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
10624         PR target/84914
10625         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10626         function to create the function decl for complex long double
10627         multiply and divide for -mabi=ieeelongdouble.
10628         (init_float128_ieee): Call it.
10630 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
10632         PR target/85044
10633         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10634         -fcf-protection=branch -mibt.
10635         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10637 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10639         PR target/81863
10640         * config/arm/arm.c (arm_valid_symbolic_address): Handle
10641         arm_word_relocations.
10643 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
10645         PR target/85056
10646         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10647         extern array declarations.
10649 2018-03-27  Richard Biener  <rguenther@suse.de>
10651         PR middle-end/84067
10652         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10653         explicit single_use checks.
10655 2018-03-27  Richard Biener  <rguenther@suse.de>
10657         PR tree-optimization/85082
10658         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10659         Valueize the VUSE.
10661 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10663         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10664         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10665         Turn on fasynchronous-unwind-tables and funwind-tables.
10667 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
10669         PR target/85073
10670         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10671         (*bmi_blsr_<mode>_ccz): Ditto.
10673 2018-03-26  Tom de Vries  <tom@codesourcery.com>
10675         PR tree-optimization/85063
10676         * omp-general.c (offloading_function_p): New function.  Factor out
10677         of ...
10678         * omp-offload.c (pass_omp_target_link::gate): ... here.
10679         * omp-general.h (offloading_function_p): Declare.
10680         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10681         with attribute omp declare target for offloading functions.
10683 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
10685         PR tree-optimization/84005
10686         * tree-data-ref.h (get_base_for_alignment): Declare.
10687         * tree-data-ref.c (get_base_for_alignment_1): New function.
10688         (get_base_for_alignment): Likewise.
10689         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10690         get_base_for_alignment to find a suitable base object, instead
10691         of always using drb->base_address.
10693 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10695         PR inline-asm/85022
10696         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10697         known size by default.
10699 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
10701         PR inline-asm/85030
10702         * lra-constraints.c (process_alt_operands): Don't match BLKmode
10703         and non BLKmode operands.
10705 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10707         PR target/85026
10708         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10709         Clean up attributes.
10711 2018-03-23  Richard Biener  <rguenther@suse.de>
10713         PR debug/85020
10714         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10715         we are going to emit early debug for LTO.
10717 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10719         PR inline-asm/85034
10720         * function.c (match_asm_constraints_1): Don't optimize if input
10721         doesn't satisfy general_operand predicate for output's mode.
10723         PR inline-asm/85022
10724         * alias.c (write_dependence_p): Don't require for x_canonicalized
10725         non-VOIDmode if x has VOIDmode.
10727         PR sanitizer/85029
10728         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10729         just don't try to optimize it rather than assert it never happens.
10731 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10733         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10734         macro expansions for definition of ST_INTERNAL_<mode> and
10735         LD_INTERNAL_<mode> builtins.
10736         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10737         Remove prototype.
10738         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10739         function.
10740         (altivec_expand_st_builtin): Likewise.
10741         (altivec_expand_builtin): Remove calls to deleted functions.
10742         (rs6000_address_for_altivec): Delete this function.
10743         * config/rs6000/vector.md: Remove expands for
10744         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10746 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
10748         PR target/84826
10749         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10750         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10751         re-computing once computed.
10752         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10753         (arm_init_machine_status): Initialize
10754         machine->static_chain_stack_bytes.
10756 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10758         PR target/84760
10759         * doc/extend.texi: Add four new prototypes for vec_ld.
10760         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10761         definitions for more logical presentation.
10762         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10763         entries for V1TI variants of __builtin_altivec_ld builtin.
10764         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10765         handling of V1TI variant of LVX icode pattern.
10766         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10767         (rs6000_gimple_fold_builtin): Likewise.
10768         (altivec_init_builtins): Add code to define
10769         __builtin_altivec_lvx_v1ti function.
10771 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10773         PR inline-asm/84941
10774         * function.c (match_asm_constraints_1): Don't do the optimization
10775         if input isn't a REG, SUBREG, MEM or constant.
10777 2018-03-22  Tom de Vries  <tom@codesourcery.com>
10779         PR tree-optimization/84956
10780         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10781         bb_has_abnormal_pred.
10783 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10785         PR sanitizer/85018
10786         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10787         DECL_INITIAL (decl) to decl at the end.
10788         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10789         adjust the comment.
10791 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
10793         * doc/extend.texi (__builtin_tgmath): Document when complex
10794         integer types are treated as _Complex _Float64.
10796 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10798         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10800 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10802         PR tree-optimization/84960
10803         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10804         if it is ENTRY block, move them into single succ of ENTRY in that case.
10806 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
10808         PR tree-optimization/84811
10809         * poly-int.h (poly_span_traits): Remove the T3 parameter and
10810         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10811         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10812         (known_subrange_p): Update accordingly.  Cast each value involved
10813         in the size comparison, rather than casting the result of the
10814         subtraction.
10816 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10818         PR tree-optimization/84982
10819         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10820         by flipping the least significant bit rather than all bits from
10821         bitpos to bitpos + bitsize - 1.
10823 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10825         * doc/extend.texi (Deprecated Features): Remove mention of
10826         long-deleted deprecations.
10828 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10830         PR jit/84288
10831         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10832         * configure: Regenerate.
10834 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10836         PR tree-optimization/83126
10837         * tree-parloops.c (num_phis): New function.
10838         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10840 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10842         * doc/extend.texi (Deprecated Features): Update deprecated flags,
10843         mention anon-struct/union members and trailing attributes.
10845 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
10847         PR tree-optimization/84969
10848         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10849         builtin memset partitions if they set different rhs values.
10851 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10853         PR rtl-optimization/84989
10854         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10855         VEC_DUPLICATE with scalar result mode.
10857 2018-03-21  Martin Liska  <mliska@suse.cz>
10859         PR ipa/84963
10860         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10861         not intended return statement.
10863 2018-03-21  Martin Liska  <mliska@suse.cz>
10865         PR target/84988
10866         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10867         (chkp_find_bound_slots_1): Limit number of iterations.
10869 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
10871         PR target/84838
10872         * Minor grammar fixes for x86 options.
10874 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10876         PR debug/84875
10877         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10878         holding REG_CFA_RESTORE notes, instead turn them into a USE.
10880 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
10882         PR target/83789
10883         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10884         (altivec_lvx_<mode>_1op): Likewise.
10885         (altivec_stvx_<mode>_2op): Likewise.
10886         (altivec_stvx_<mode>_1op): Likewise.
10887         (altivec_lvx_<VM2:mode>): New define_expand.
10888         (altivec_stvx_<VM2:mode>): Likewise.
10889         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10890         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10891         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10892         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10893         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10894         (rs6000_gen_lvx): Likewise.
10895         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10896         (altivec_expand_stv_builtin): Likewise.
10897         (altivec_expand_builtin): Likewise.
10898         * config/rs6000/vector.md: Likewise.
10900 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10902         PR target/82518
10903         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10904         BYTES_BIG_ENDIAN.
10906 2018-03-20  Richard Biener  <rguenther@suse.de>
10908         PR target/84986
10909         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10910         sign-conversions as zero, fall back to standard scalar_stmt
10911         cost for the rest.
10913 2018-03-20  Martin Liska  <mliska@suse.cz>
10915         PR ipa/84825
10916         * predict.c (rebuild_frequencies): Handle case when we have
10917         PROFILE_ABSENT, but flag_guess_branch_prob is false.
10919 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10921         PR target/84990
10922         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10923         flag_section_anchors.
10924         * varasm.c (use_blocks_for_decl_p): Remove hack for
10925         dw2_force_const_mem.
10927         PR target/84845
10928         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10929         to ...
10930         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
10931         be created, use lowpart_subreg of operands[0] rather than operands[0]
10932         itself.
10933         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10934         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10935         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10936         and n constraint instead of aarch64_shift_imm_di and Usd.
10937         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10938         (*aarch64_<optab>_reg_minus<mode>3): ... this.
10940 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
10942         PR target/82989
10943         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10944         to favor GPR over NEON registers.
10945         (<shift>di3_neon): Likewise.
10947 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10949         PR target/84952
10950         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10951         (nvptx_process_pars): Emit bar.sync asap and alap.
10953 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10955         PR target/84954
10956         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10957         seen_label if seen_label is already set.
10959 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10961         PR target/84945
10962         * config/i386/i386.c (fold_builtin_cpu): For features above 31
10963         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10964         Use 1U instead of 1.  Formatting fixes.
10966         PR c/84953
10967         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10968         instead of TREE_TYPE (s1) for the return value.
10970 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
10972         PR tree-optimization/84946
10973         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10974         bitsize + bitsize in poly_uint64 rather than poly_int64.
10976         PR sanitizer/78651
10977         * dwarf2asm.c: Include fold-const.c.
10978         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10979         of decl rather than decl itself.
10981         PR rtl-optimization/84643
10982         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10984 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
10986         PR sanitizer/78651
10987         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10988         calling assemble_variable.
10990 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
10992         PR target/81647
10993         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10994         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10996 2018-03-19  Jim Wilson  <jimw@sifive.com>
10998         PR bootstrap/84856
10999         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11000         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11001         (riscv_first_stack_step): Likewise.
11002         (riscv_option_override): Use STACK_BOUNDARY instead of
11003         MIN_STACK_BOUNDARY.
11004         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11005         MIN_STACK_BOUNDARY.
11006         (BIGGEST_ALIGNMENT): Set to 128.
11007         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11008         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11009         STACK_BOUNDARY.
11011 2018-03-19  Richard Biener  <rguenther@suse.de>
11013         PR tree-optimization/84933
11014         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11015         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11017 2018-03-19  Richard Biener  <rguenther@suse.de>
11019         PR tree-optimization/84859
11020         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11021         (cond_if_else_store_replacement): Perform sinking operation on
11022         single-store BBs regardless of MAX_STORES_TO_SINK setting.
11023         Generalize what a BB with a single eligible store is.
11025 2018-03-19  Richard Biener  <rguenther@suse.de>
11027         PR tree-optimization/84929
11028         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11029         chrec_is_positive against non-chrec arg.
11031 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
11033         PR target/84711
11034         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11036 2018-03-18  Martin Liska  <mliska@suse.cz>
11038         PR rtl-optimization/84635
11039         * regrename.c (build_def_use): Use matches_mode only when
11040         matches >= 0.
11042 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
11044         PR tree-optimization/84913
11045         * tree-vect-loop.c (vectorizable_reduction): Don't try to
11046         vectorize chains of COND_EXPRs.
11048 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11050         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11052 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11054         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11056 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11058         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11060 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11061             Kito Cheng  <kito.cheng@gmail.com>
11063         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11064         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11065         (nds32_adjust_reg_alloc_order): New function.
11066         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11068 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
11070         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11071         nds32_print_operand, nds32_print_operand_address): Use
11072         HOST_WIDE_INT_PRINT_DEC instead.
11074 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11076         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11078 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
11080         PR target/84902
11081         * config/i386/i386.c (initial_ix86_tune_features,
11082         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11083         unsigned long long.
11084         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11085         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11086         rather than 1u << ix86_tune.  Formatting fix.
11087         (ix86_option_override_internal): Change ix86_arch_mask from
11088         unsigned int to unsigned HOST_WIDE_INT, initialize to
11089         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11090         (ix86_function_specific_restore): Likewise.
11092 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11094         PR target/84899
11095         * postreload.c (reload_combine_recognize_pattern): Perform
11096         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11097         truncate_int_for_mode the result for the destination's mode.
11099         PR c/84909
11100         * hsa-gen.c (mem_type_for_type): Fix comment typo.
11101         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11102         Likewise.
11103         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11104         Likewise.
11106 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
11108         PR target/84876
11109         * lra-assigns.c (lra_split_hard_reg_for): Don't use
11110         regno_allocno_class_array and sorted_pseudos.
11111         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11112         insns where regno is used.
11114 2018-03-16  Martin Liska  <mliska@suse.cz>
11116         PR ipa/84833
11117         * multiple_target.c (create_dispatcher_calls): Redirect
11118         reference in the symbol table.
11120 2018-03-16  Martin Liska  <mliska@suse.cz>
11122         PR ipa/84722
11123         * multiple_target.c (create_dispatcher_calls): Redirect also
11124         an alias.
11126 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11128         PR c++/79937
11129         PR c++/82410
11130         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11131         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11132         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11134 2018-03-16  Julia Koval  <julia.koval@intel.com>
11136         * doc/invoke.texi (Skylake Server): Add CLWB.
11137         Cannonlake): Remove CLWB.
11139 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11141         PR tree-optimization/84841
11142         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11143         1 << 3.
11144         (FLOAT_ONE_CONST_TYPE): Define.
11145         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11146         (sort_by_operand_rank): Put entries with higher constant_type last
11147         rather than first to match comments.
11149 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
11151         * config/nios2/nios2.md (movsi_internal): Fix thinko in
11152         split predicate.
11154 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11156         PR c++/79085
11157         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11158         check and use address of target always.
11160 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
11162         PR target/84574
11163         * config/i386/i386.c (indirect_thunk_needed): Update comments.
11164         (indirect_thunk_bnd_needed): Likewise.
11165         (indirect_thunks_used): Likewise.
11166         (indirect_thunks_bnd_used): Likewise.
11167         (indirect_return_needed): New.
11168         (indirect_return_bnd_needed): Likewise.
11169         (output_indirect_thunk_function): Add a bool argument for
11170         function return.
11171         (output_indirect_thunk_function): Don't generate alias for
11172         function return thunk.
11173         (ix86_code_end): Call output_indirect_thunk_function to generate
11174         function return thunks.
11175         (ix86_output_function_return): Set indirect_return_bnd_needed
11176         and indirect_return_needed instead of indirect_thunk_bnd_needed
11177         and indirect_thunk_needed.
11179 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
11181         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11182         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11183         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11185 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
11186             Paul Hua <paul.hua.gm@gmail.com>
11188         PR c/84852
11189         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11191 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
11193         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11194         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11195         resp. SFmode cases.
11197 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
11199         PR target/84711
11200         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11201         instead of GET_MODE_SIZE when comparing Units.
11203 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11205         PR target/68256
11206         * varasm.c (hash_section): Return an unchangeble hash value
11207         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11208         Return !aarch64_can_use_per_function_literal_pools_p ().
11210 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11212         PR target/84860
11213         * optabs.c (emit_conditional_move): Pass address of cmode's copy
11214         rather than address of cmode as last argument to prepare_cmp_insn.
11216 2018-03-15  Julia Koval  <julia.koval@intel.com>
11218         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11219         F_AVX512VNNI, F_AVX512BITALG): New.
11221 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
11223         PR target/83451
11224         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
11225         insn for floating-point loads and stores.
11227 2018-03-14  Carl Love  <cel@us.ibm.com>
11229         * config/rs6000/rs6000-c.c: Add macro definitions for
11230         ALTIVEC_BUILTIN_VEC_PERMXOR.
11231         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11232         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11233         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11234         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11235         UNSPEC_VPERMXOR.
11236         * config/doc/extend.texi: Add prototypes for vec_permxor.
11238 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
11240         PR c/84852
11241         * diagnostic-show-locus.c (class layout_point): Convert m_line
11242         from int to linenum_type.
11243         (line_span::comparator): Use linenum "compare" function when
11244         comparing line numbers.
11245         (test_line_span): New function.
11246         (layout_range::contains_point): Convert param "row" from int to
11247         linenum_type.
11248         (layout_range::intersects_line_p): Likewise.
11249         (layout::will_show_line_p): Likewise.
11250         (layout::print_source_line): Likewise.
11251         (layout::should_print_annotation_line_p): Likewise.
11252         (layout::print_annotation_line): Likewise.
11253         (layout::print_leading_fixits): Likewise.
11254         (layout::annotation_line_showed_range_p): Likewise.
11255         (struct line_corrections): Likewise for field m_row.
11256         (line_corrections::line_corrections): Likewise for param "row".
11257         (layout::print_trailing_fixits): Likewise.
11258         (layout::get_state_at_point): Likewise.
11259         (layout::get_x_bound_for_row): Likewise.
11260         (layout::print_line): Likewise.
11261         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11262         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11263         * input.c (selftest::test_linenum_comparisons): New function.
11264         (selftest::input_c_tests): Call it.
11265         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11266         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11267         * selftest.h (ASSERT_GT): New macro.
11268         (ASSERT_GT_AT): New macro.
11269         (ASSERT_LT): New macro.
11270         (ASSERT_LT_AT): New macro.
11272 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
11274         PR rtl-optimization/84780
11275         * combine.c (distribute_links): Don't make a link based on pc_rtx.
11277 2018-03-14  Martin Liska  <mliska@suse.cz>
11279         * tree.c (record_node_allocation_statistics): Use
11280         get_stats_node_kind.
11281         (get_stats_node_kind): New function extracted from
11282         record_node_allocation_statistics.
11283         (free_node): Use get_stats_node_kind.
11285 2018-03-14  Richard Biener  <rguenther@suse.de>
11287         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11288         that the value-set of ANTIC_IN doesn't grow.
11290         Revert
11291         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11292         member.
11293         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11294         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11296 2018-03-14  Julia Koval  <julia.koval@intel.com>
11298         * config.gcc (icelake-client, icelake-server): New.
11299         (icelake): Remove.
11300         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11301         (initial_ix86_arch_features): Ditto.
11302         (PTA_SKYLAKE): Add SGX.
11303         (PTA_ICELAKE): Remove.
11304         (PTA_ICELAKE_CLIENT): New.
11305         (PTA_ICELAKE_SERVER): New.
11306         (ix86_option_override_internal): Split up icelake on icelake client and
11307         icelake server.
11308         (get_builtin_code_for_version): Ditto.
11309         (fold_builtin_cpu): Ditto.
11310         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11311         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11312         * config/i386/i386.h (processor_type): Ditto.
11313         * doc/invoke.texi: Ditto.
11315 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
11317         PR sanitizer/83392
11318         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11319         INTEGER_CST offset, add it together with bitpos / 8 and
11320         sign extend based on POINTER_SIZE.
11322         PR target/84844
11323         Revert
11324         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
11326         PR target/78090
11327         * config/i386/constraints.md (Yc): New register constraint.
11328         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11329         Use Yc constraint for alternative 2 of operand 0.  Remove
11330         preferred_for_speed attribute.
11332 2018-03-14  Richard Biener  <rguenther@suse.de>
11334         PR tree-optimization/84830
11335         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11336         with the old one to avoid oscillations.
11338 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
11340         PR target/83712
11341         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11342         pseudos.
11343         (assign_by_spills): Return a flag of reload assignment failure.
11344         Do not process the reload assignment failures.  Do not spill other
11345         reload pseudos if they has the same reg class.  Update n if
11346         necessary.
11347         (lra_assign): Add a return arg.  Set up from the result of
11348         assign_by_spills call.
11349         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11350         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11351         usage_insns if it is not NULL.
11352         (spill_hard_reg_in_range): New function.
11353         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11354         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11355         function prototypes.
11356         (lra_assign): Change prototype.
11357         * lra.c (lra): Add code to deal with fails by splitting hard reg
11358         live ranges.
11360 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
11362         * config/riscv/riscv.opt (mrelax): New option.
11363         * config/riscv/riscv.c (riscv_file_start): Emit ".option
11364         "norelax" when riscv_mrelax is disabled.
11365         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11367 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11369         PR target/84743
11370         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11371         reassociation for int modes.
11373 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11375         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11376         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11377         for big-endian.
11378         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11379         * config/aarch64/aarch64-sve.md
11380         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11381         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11382         (*extend<mode><Vwide>2): Rename to...
11383         (aarch64_sve_extend<mode><Vwide>2): ...this.
11384         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11385         renaming the old pattern to...
11386         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
11387         unsigned packs.
11388         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11389         define_expand, renaming the old pattern to...
11390         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11391         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11392         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11393         account when deciding which SVE instruction the optab should use.
11394         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11396 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11398         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11399         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11400         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11401         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11402         (tlsdesc_small_<mode>): Turn a define_expand and use
11403         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
11404         (tlsdesc_small_advsimd_<mode>): ...this.
11405         (tlsdesc_small_sve_<mode>): New pattern.
11407 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11409         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11410         (UNSPEC_UMUL_HIGHPART): New constants.
11411         (MUL_HIGHPART): New int iteraor.
11412         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11413         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11414         define_expand.
11415         (*<su>mul<mode>3_highpart): New define_insn.
11417 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11419         PR lto/84805
11420         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11421         incomplete types.
11423 2018-03-13  Martin Liska  <mliska@suse.cz>
11425         PR ipa/84658.
11426         * (sem_item_optimizer::sem_item_optimizer): Initialize new
11427         vector.
11428         (sem_item_optimizer::~sem_item_optimizer): Release it.
11429         (sem_item_optimizer::merge_classes): Register variable aliases.
11430         (sem_item_optimizer::fixup_pt_set): New function.
11431         (sem_item_optimizer::fixup_points_to_sets): Likewise.
11432         * ipa-icf.h: Declare new variables and functions.
11434 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
11436         PR middle-end/84834
11437         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11438         integer_pow2p@2 and test integer_pow2p in condition.
11439         (A < 0 ? C : 0): Similarly for @1.
11441         PR middle-end/84831
11442         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11443         characters starting at p contain '\0' character, don't look beyond
11444         that.
11446         PR target/84827
11447         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11448         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11450         PR target/84828
11451         * reg-stack.c (change_stack): Change update_end var from int to
11452         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11453         also call set_block_for_insn on the newly added insns and rescan.
11455         PR target/84786
11456         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11457         on the last operand.
11459         PR c++/84704
11460         * tree.c (stabilize_reference_1): Return save_expr (e) for
11461         STATEMENT_LIST even if it doesn't have side-effects.
11463 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
11465         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11467 2018-03-12  Renlin Li  <renlin.li@arm.com>
11469         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11470         aarch64_output_scalar_simd_mov_immediate.
11472 2018-03-12  Martin Sebor  <msebor@redhat.com>
11474         PR tree-optimization/83456
11475         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11476         for perfectly overlapping calls to memcpy.
11477         (gimple_fold_builtin_memory_chk): Same.
11478         (gimple_fold_builtin_strcpy): Handle no-warning.
11479         (gimple_fold_builtin_stxcpy_chk): Same.
11480         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11482 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
11484         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11485         parameter.  Use it for SFmode.
11486         (rs6000_function_arg_advance_1): Adjust.
11487         (rs6000_function_arg): Adjust.
11488         (rs6000_gimplify_va_arg): Pass false for that new parameter.
11490 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
11492         PR rtl-optimization/84169
11493         PR rtl-optimization/84780
11494         * combine.c (can_combine_p): Check for a 2-insn combination whether
11495         the destination register is used between the two insns, too.
11497 2018-03-12  Richard Biener  <rguenther@suse.de>
11499         PR tree-optimization/84803
11500         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11501         for refs DR analysis didn't process.
11503 2018-03-12  Richard Biener  <rguenther@suse.de>
11505         PR tree-optimization/84777
11506         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11507         force-vectorize loops ignore whether we are optimizing for size.
11509 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11511         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11512         (TARGET_MD_ASM_ADJUST): Define.
11514 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
11515             Kito Cheng  <kito.cheng@gmail.com>
11516             Chung-Ju Wu  <jasonwucj@gmail.com>
11518         * config/nds32/nds32.c (nds32_compute_stack_frame,
11519         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11520         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11521         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11522         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11523         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11524         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11525         * config/nds32/nds32.md (prologue, epilogue): Use macro
11526         NDS32_V3PUSH_AVAILABLE_P to do checking.
11528 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
11530         PR debug/58150
11531         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11532         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11533         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
11534         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
11535         addition of most attributes on !orig_type_die or the attribute not
11536         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11538 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11539             Chung-Ju Wu  <jasonwucj@gmail.com>
11541         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11542         __NDS32_VH__ macro.
11543         * config/nds32/nds32.opt (mvh): New option.
11545 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11546             Chung-Ju Wu  <jasonwucj@gmail.com>
11548         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11549         function.
11550         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11551         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11552         definition.
11554 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11555             Chung-Ju Wu  <jasonwucj@gmail.com>
11557         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11558         function.
11559         * config/nds32/nds32-multiple.md (strlensi): New pattern.
11560         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11562 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
11563             Kito Cheng  <kito.cheng@gmail.com>
11564             Chung-Ju Wu  <jasonwucj@gmail.com>
11566         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11567         UNSPEC_FFMISM and UNSPEC_FLMISM.
11568         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11569         for ffb, ffmism and flmism.
11570         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11571         (unspec_ffmism): Ditto.
11572         (unspec_flmism): Ditto.
11573         (nds32_expand_builtin_impl): Check if string extension is available.
11574         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11575         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11577 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
11579         Reverting patch:
11580         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11582         PR target/83712
11583         * lra-assigns.c (assign_by_spills): Return a flag of reload
11584         assignment failure.  Do not process the reload assignment
11585         failures.  Do not spill other reload pseudos if they has the same
11586         reg class.
11587         (lra_assign): Add a return arg.  Set up from the result of
11588         assign_by_spills call.
11589         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11590         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11591         usage_insns if it is not NULL.
11592         (spill_hard_reg_in_range): New function.
11593         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11594         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11595         function prototypes.
11596         (lra_assign): Change prototype.
11597         * lra.c (lra): Add code to deal with fails by splitting hard reg
11598         live ranges.
11600 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
11602         PR target/84807
11603         * config/i386/i386.opt: Replace Enforcment with Enforcement.
11605 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
11607         PR debug/84620
11608         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11609         (dw_val_node): Add val_symbolic_view.
11610         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11611         (symview_upper_bound): New.
11612         (new_line_info_table): Initialize symviews_since_reset.
11613         (dwarf2out_source_line): Count symviews_since_reset and set
11614         symview_upper_bound.
11615         (dw_val_equal_p): Handle symview.
11616         (add_AT_symview): New.
11617         (print_dw_val): Handle symview.
11618         (attr_checksum, attr_checksum_ordered): Likewise.
11619         (same_dw_val_p, size_of_die): Likewise.
11620         (value_format, output_die): Likewise.
11621         (add_high_low_attributes): Use add_AT_symview for entry_view.
11622         (dwarf2out_finish): Reset symview_upper_bound, clear
11623         zero_view_p.
11625 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
11627         PR target/83969
11628         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11629         Add strict argument and use it.
11630         (rs6000_split_multireg_move): Update for new strict argument.
11631         (mem_operand_gpr): Disallow all non-offsettable addresses.
11632         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11634 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
11636         PR target/84772
11637         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11638         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11639         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11641         PR c++/84767
11642         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11643         decl, use remap_type if we want to use the type.
11645 2018-03-09  Martin Sebor  <msebor@redhat.com>
11647         PR tree-optimization/84526
11648         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11649         Remove dead code.
11650         (builtin_access::generic_overlap): Be prepared to handle non-array
11651         base objects.
11653 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
11655         PR rtl-optimization/84682
11656         * lra-constraints.c (process_address_1): Check is_address flag
11657         for address constraints.
11658         (process_alt_operands): Likewise.
11659         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11660         preprocess_constraints.
11661         * recog.h (preprocess_constraints): Add oploc parameter.
11662         Adjust callers.
11663         * recog.c (preprocess_constraints): Test address_operand for
11664         CT_ADDRESS constraints.
11666 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11668         PR target/83712
11669         * lra-assigns.c (assign_by_spills): Return a flag of reload
11670         assignment failure.  Do not process the reload assignment
11671         failures.  Do not spill other reload pseudos if they has the same
11672         reg class.
11673         (lra_assign): Add a return arg.  Set up from the result of
11674         assign_by_spills call.
11675         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11676         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11677         usage_insns if it is not NULL.
11678         (spill_hard_reg_in_range): New function.
11679         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11680         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11681         function prototypes.
11682         (lra_assign): Change prototype.
11683         * lra.c (lra): Add code to deal with fails by splitting hard reg
11684         live ranges.
11686 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11688         PR target/83193
11689         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11690         Accept complain bool parameter.  Only emit errors if it is true.
11691         (arm_parse_cpu_option_name): Likewise.
11692         (arm_target_thumb_only): Adjust callers of the above.
11693         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11694         prototype to take a default true bool parameter.
11695         (arm_parse_arch_option_name): Likewise.
11697 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
11698             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
11700         PR jit/64089
11701         PR jit/84288
11702         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11703         * configure: Regenerate.
11704         * configure.ac ("linker --version-script option"): New.
11705         ("linker soname option"): New.
11707 2018-03-09  Richard Biener  <rguenther@suse.de>
11709         PR tree-optimization/84775
11710         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11711         immediate uses of predicate stmts and mark them modified.
11713         Revert
11714         PR tree-optimization/84178
11715         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11716         to caller.
11717         (version_loop_for_if_conversion): Delay update_ssa call.
11718         (tree_if_conversion): Delay update_ssa until after predicate
11719         insertion.
11721 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
11723         PR target/84763
11724         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11725         when the function accesses prior frames.
11727 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11729         PR debug/84456
11730         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11731         gen_llsym, otherwise call maybe_gen_llsym.
11733         PR inline-asm/84742
11734         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11735         has ',' character inside of it.
11737 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11739         PR target/84748
11740         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11741         as clobbering CC_REGNUM.
11743 2018-03-08  Richard Biener  <rguenther@suse.de>
11745         PR middle-end/84552
11746         * tree-scalar-evolution.c: Include tree-into-ssa.h.
11747         (follow_copies_to_constant): Do not follow SSA names registered
11748         for update.
11750 2018-03-08  Richard Biener  <rguenther@suse.de>
11752         PR tree-optimization/84178
11753         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11754         to caller.
11755         (version_loop_for_if_conversion): Delay update_ssa call.
11756         (tree_if_conversion): Delay update_ssa until after predicate
11757         insertion.
11759 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
11761         PR tree-optimization/84178
11762         * tree-if-conv.c (release_bb_predicate): Remove the
11763         the assertion that the stmts have NULL use_ops.
11764         Discard the statements, asserting that they haven't
11765         yet been added to a BB.
11767 2018-03-08  Richard Biener  <rguenther@suse.de>
11769         PR tree-optimization/84746
11770         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11771         (phi_translate): Pass in destination ANTIC_OUT set.
11772         (phi_translate_1): Likewise.  For a simplified result lookup
11773         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11774         (phi_translate_set): Adjust.
11775         (do_pre_regular_insertion): Likewise.
11776         (do_pre_partial_partial_insertion): Likewise.
11778 2018-03-08  Martin Liska  <mliska@suse.cz>
11780         PR gcov-profile/84735
11781         * doc/gcov.texi: Document usage of profile files.
11782         * gcov-io.h: Document changes in the format.
11784 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
11786         PR debug/84404
11787         PR debug/84408
11788         * dwarf2out.c (struct dw_line_info_table): Update comments for
11789         view == -1.
11790         (FORCE_RESET_NEXT_VIEW): New.
11791         (FORCE_RESETTING_VIEW_P): New.
11792         (RESETTING_VIEW_P): Check for -1 too.
11793         (ZERO_VIEW_P): Likewise.
11794         (new_line_info_table): Force-reset next view.
11795         (dwarf2out_begin_function): Likewise.
11796         (dwarf2out_source_line): Simplify zero_view_p initialization.
11797         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11798         view directly.  Omit view when omitting .loc at line 0.
11800 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11802         PR tree-optimization/84740
11803         * tree-switch-conversion.c (process_switch): Call build_constructors
11804         only if info.phi_count is non-zero.
11806         PR tree-optimization/84739
11807         * tree-tailcall.c (find_tail_calls): Check call arguments against
11808         DECL_ARGUMENTS (current_function_decl) rather than
11809         DECL_ARGUMENTS (func) when checking for tail recursion.
11811 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11813         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11814         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11815         Volker Reichelt's entry and add entries for people that perform
11816         GCC fuzzy testing and report numerous bugs.
11818 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
11820         PR target/82411
11821         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11822         readonly data in sdata, if that is disabled.
11823         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11824         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11825         -mreadonly-in-sdata option.
11827 2018-03-07  Martin Sebor  <msebor@redhat.com>
11829         PR tree-optimization/84468
11830         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11831         basic block when looking for nul assignment.
11833 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
11835         PR target/84277
11836         * except.h (output_function_exception_table): Adjust prototype.
11837         * except.c (output_function_exception_table): Remove FNNAME parameter
11838         and add SECTION parameter.  Ouput one part of the table at a time.
11839         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11840         the first part of the exception table and emit unwind directives.
11841         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11842         (i386_pe_seh_cold_init): Likewise.
11843         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11844         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11845         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11846         (ix86_output_call_insn): Emit a nop in one more case for SEH.
11847         * config/i386/winnt.c: Include except.h.
11848         (struct seh_frame_state): Add reg_offset, after_prologue and
11849         in_cold_section fields.
11850         (i386_pe_seh_end_prologue): Set seh->after_prologue.
11851         (i386_pe_seh_cold_init): New function.
11852         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11853         to seh->in_cold_section.
11854         (seh_emit_push): Record the offset of the push.
11855         (seh_emit_save): Record the offet of the save.
11856         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11857         Test seh->after_prologue to disregard the epilogue.
11858         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11859         (i386_pe_end_cold_function): New function.
11861 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11863         PR fortran/84565
11864         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11865         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11867         PR c++/84704
11868         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11869         on tmp_var.
11870         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11871         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11873         PR middle-end/84723
11874         * multiple_target.c: Include tree-inline.h and intl.h.
11875         (expand_target_clones): Diagnose and fail if node->definition and
11876         !tree_versionable_function_p (node->decl).
11878 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
11880         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11881         sprint_ul.
11882         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11883         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11884         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11886 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11888         PR target/84710
11889         * combine.c (try_combine): Use reg_or_subregno instead of handling
11890         just paradoxical SUBREGs and REGs.
11892 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
11894         * config/arc/arc.c (arc_finalize_pic): Remove function.
11895         (arc_must_save_register): We use single base PIC register, remove
11896         checks to save/restore the PIC register.
11897         (arc_expand_prologue): Likewise.
11898         * config/arc/arc-protos.h (arc_set_default_type_attributes):
11899         Remove.
11900         (arc_verify_short): Likewise.
11901         (arc_attr_type): Likewise.
11902         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11903         (walk_stores): Likewise.
11904         (arc_address_cost): Make it static.
11905         (arc_verify_short): Likewise.
11906         (branch_dest): Likewise.
11907         (arc_attr_type): Likewise.
11908         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11909         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11910         (arc_final_prescan_insn): Remove inserting the nops due to
11911         hardware hazards.  It is done in reorg step.
11912         (insn_length_variant_t): Remove.
11913         (insn_length_parameters_t): Likewise.
11914         (arc_insn_length_parameters): Likewise.
11915         (arc_get_insn_variants): Likewise.
11916         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11918 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11920         PR inline-asm/84683
11921         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11922         assertion failure.
11924         PR tree-optimization/84687
11925         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11926         on new_node->decl.
11927         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11929 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11931         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11932         Rename to ppc_speculation_barrier.
11933         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11934         __builtin_ppc_speculation_barrier.
11936 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11938         PR target/84700
11939         * combine.c (combine_simplify_rtx): Don't try to simplify if
11940         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11941         are equal to x.
11943 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
11945         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11946         to 32 bytes when compiling for POWER9.
11948 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11950         PR target/84564
11951         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11952         regparm >= 3 with no arg reg available also for calls with
11953         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
11955         PR target/84524
11956         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11957         orig,vex.
11958         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
11960 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
11962         PR target/84264
11963         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11965 2018-03-05  Richard Biener  <rguenther@suse.de>
11967         PR tree-optimization/84486
11968         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11969         When inserting a __builtin_assume_aligned call set the LHS
11970         SSA name alignment info accordingly.
11972 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
11974         PR tree-optimization/84114
11975         * config/aarch64/aarch64.c (aarch64_reassociation_width)
11976         Avoid reassociation of FLOAT_MODE addition.
11978 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
11980         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11981         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11982         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11983         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11984         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11985         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11986         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11987         and -mwbnoinvd.
11988         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11989         __builtin_ia32_wbinvd): New builtins.
11990         (SPECIAL_ARGS2): New.
11991         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11992         (SPECIAL_ARGS2): New.
11993         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11994         (ix86_valid_target_attribute_inner_p): Ditto.
11995         (ix86_init_mmx_sse_builtins): Add special_args2.
11996         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11997         TARGET_WBNOINVD_P): New.
11998         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11999         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12000         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12001         * config/i386/immintrin.h (_wbinvd): New intrinsic.
12002         * config/i386/pconfigintrin.h: New file.
12003         * config/i386/wbnoinvdintrin.h: Ditto.
12004         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12005         wbnoinvdintrin.h.
12006         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12008 2018-03-05  Richard Biener  <rguenther@suse.de>
12010         PR tree-optimization/84670
12011         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12012         member.
12013         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12014         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12015         (compute_antic_aux): Only assert the number of values in ANTIC_IN
12016         doesn't grow if all successors (recursively) were visited at least
12017         once.
12019 2018-03-05  Richard Biener  <rguenther@suse.de>
12021         PR tree-optimization/84650
12022         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12023         if executed in the loop pipeline.
12025 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
12027         * doc/configfiles.texi (Configuration Files): Move info about
12028         conditionalizing $target-protos.h to...
12029         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
12030         differs from $target-protos.h.
12032 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
12033             Chung-Ju Wu  <jasonwucj@gmail.com>
12035         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12036         * config/nds32/nds32-multiple.md (setmemsi): Define.
12037         * config/nds32/nds32-memory-manipulation.c
12038         (nds32_gen_dup_4_byte_to_word_value): New.
12039         (emit_setmem_word_loop): New.
12040         (emit_setmem_byte_loop): New.
12041         (nds32_expand_setmem_loop): New.
12042         (nds32_expand_setmem_loop_v3m): New.
12043         (nds32_expand_setmem_unroll): New.
12044         (nds32_expand_setmem): New.
12046 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12047             Chung-Ju Wu  <jasonwucj@gmail.com>
12049         * config/nds32/nds32-memory-manipulation.c
12050         (nds32_emit_load_store): New.
12051         (nds32_emit_post_inc_load_store): New.
12052         (nds32_emit_mem_move): New.
12053         (nds32_emit_mem_move_block): New.
12054         (nds32_expand_movmemsi_loop_unknown_size): New.
12055         (nds32_expand_movmemsi_loop_known_size): New.
12056         (nds32_expand_movmemsi_loop): New.
12057         (nds32_expand_movmemsi_unroll): New.
12058         (nds32_expand_movmemqi): Rename ...
12059         (nds32_expand_movmemsi): ... to this.
12060         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12061         (movmemsi): ... to this.
12062         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12063         (nds32_expand_movmemsi): ... to this.
12065 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12066             Monk Chiang  <sh.chiang04@gmail.com>
12067             Chung-Ju Wu  <jasonwucj@gmail.com>
12069         * config/nds32/nds32-protos.h
12070         (nds32_expand_load_multiple): New arguments.
12071         (nds32_expand_store_multiple): Ditto.
12072         (nds32_valid_multiple_load_store): Rename ...
12073         (nds32_valid_multiple_load_store_p): ... to this.
12074         * config/nds32/nds32-memory-manipulation.c
12075         (nds32_expand_load_multiple): Refine implementation.
12076         (nds32_expand_store_multiple): Ditto.
12077         * config/nds32/nds32-multiple.md
12078         (load_multiple): Update nds32_expand_load_multiple interface.
12079         (store_multiple): Update nds32_expand_store_multiple interface.
12080         * config/nds32/nds32-predicates.c
12081         (nds32_valid_multiple_load_store): Rename ...
12082         (nds32_valid_multiple_load_store_p): ... to this and refine
12083         implementation.
12084         * config/nds32/predicates.md
12085         (nds32_load_multiple_and_update_address_operation): New predicate.
12086         (nds32_store_multiple_and_update_address_operation): New predicate.
12088 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12089             Chung-Ju Wu  <jasonwucj@gmail.com>
12091         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12092         (combo): New attribute.
12093         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12095 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12097         * config/nds32/nds32.opt: Change -mcmodel= default value.
12099 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
12100             Monk Chiang  <sh.chiang04@gmail.com>
12101             Chung-Ju Wu  <jasonwucj@gmail.com>
12103         * config/nds32/constants.md (unspec_element): New enum.
12104         * config/nds32/constraints.md (Umw): New constraint.
12105         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12106         * config/nds32/nds32-intrinsic.md: Likewise.
12107         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12108         (nds32_valid_smw_lwm_base_p): New.
12109         (nds32_output_smw_single_word): New.
12110         (nds32_output_lmw_single_word): New.
12111         (nds32_expand_unaligned_load): New.
12112         (nds32_expand_unaligned_store): New.
12113         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12114         (nds32_output_smw_single_word): Declare.
12115         (nds32_output_lmw_single_word): Declare.
12116         (nds32_expand_unaligned_load): Declare.
12117         (nds32_expand_unaligned_store): Declare.
12118         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12119         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12120         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12121         NDS32_BUILTIN_UASTORE_DW.
12122         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12123         predicate.
12125 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
12126             Kito Cheng  <kito.cheng@gmail.com>
12127             Chung-Ju Wu  <jasonwucj@gmail.com>
12129         * config/nds32/nds32-intrinsic.c
12130         (nds32_expand_builtin_null_ftype_reg): Delete.
12131         (nds32_expand_builtin_reg_ftype_imm): Ditto.
12132         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12133         (nds32_read_argument): New.
12134         (nds32_legitimize_target): Ditto.
12135         (nds32_legitimize_argument): Ditto.
12136         (nds32_check_constant_argument): Ditto.
12137         (nds32_expand_unop_builtin): Ditto.
12138         (nds32_expand_unopimm_builtin): Ditto.
12139         (nds32_expand_binop_builtin): Ditto.
12140         (nds32_builtin_decl_impl): Ditto.
12141         (builtin_description): Ditto.
12142         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12143         (nds32_init_builtins_impl): Ditto.
12144         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12145         (nds32_builtin_decl): New.
12146         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12147         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12149 2018-03-02  Jeff Law  <law@redhat.com>
12151         * reorg.c (stop_search_p): Handle DEBUG_INSN.
12152         (redundant_insn, fill_simple_delay_slots): Likewise.
12153         (fill_slots_from_thread): Likewise.
12154         * resource.c (mark_referenced_resources): Likewise.
12155         (mark_set_resources, find_dead_or_set_registers): Likewise.
12157 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12159         * substring-locations.h (format_warning_va): Formatting fix for
12160         ATTRIBUTE_GCC_DIAG.
12161         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12162         argument.
12163         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12164         * substring-locations.c: Include intl.h.
12165         (format_warning_va): Turned into small wrapper around
12166         format_warning_n_va, renamed to ...
12167         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12168         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12169         use ngettext.
12170         (format_warning_at_substring_n): New function.
12171         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12172         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
12173         format_warning_at_substring with just a shorter name instead of
12174         const function pointer.
12175         (fmtwarn_n): New function.
12176         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12177         appropriate, get rid of all the fmtstr temporaries, move conditionals
12178         with G_() wrapped string literals directly into fmtwarn arguments,
12179         cast dir.len to (int), formatting fixes.
12181 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
12183         * doc/invoke.texi: Remove "Cilk Plus" references.
12185 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12186             Richard Biener  <rguenther@suse.de>
12188         PR ipa/84628
12189         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12190         for error or warning attributes if CALL_FROM_THUNK_P is set.
12191         Formatting fixes.
12193 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12195         PR target/56540
12196         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12197         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12199         PR target/56540
12200         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12201         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12203         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12204         instead of -1U in last predictors element's probability member.
12206 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12208         PR ipa/83983
12209         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12210         arguments if they are comparable.
12212 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12214         PR tree-optimization/84634
12215         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12216         masks and masked_loop_p with a single loop_masks, making sure it's
12217         null for bb vectorization.
12219 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12221         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12222         (vect_analyze_data_ref_access): Use loop->safe_len rather than
12223         loop->force_vectorize to check whether there is no alias.
12225 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12227         PR target/84614
12228         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12229         prototypes.
12230         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12231         comments.
12232         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12233         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12234         instead of a loop around prev_real_insn.
12235         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12236         prev_real_insn.
12238         PR inline-asm/84625
12239         * config/i386/i386.c (ix86_print_operand): Use conditional
12240         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12241         zero vector.
12243 2018-03-02  Richard Biener  <rguenther@suse.de>
12245         PR tree-optimization/84427
12246         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12247         (bitmap_set_subtract_values): Rewrite to handle multiple
12248         exprs per value.
12249         (clean): Likewise.
12250         (prune_clobbered_mems): Likewise.
12251         (phi_translate): Take edge instead of pred/phiblock.
12252         (phi_translate_1): Likewise.
12253         (phi_translate_set): Likewise.  Insert all translated
12254         exprs for a value into the set, keeping possibly multiple
12255         expressions per value.
12256         (compute_antic_aux): Adjust for phi_translate changes.
12257         When intersecting union the expressions and prune those
12258         not in the final value set, keeping possibly multiple
12259         expressions per value.  Do not use value-insertion
12260         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12261         all expressions.  Add verification that the value-sets
12262         only shrink during iteration.
12263         (compute_partial_antic_aux): Adjust for the phi_translate changes.
12264         (do_pre_regular_insertion): Likewise.
12265         (do_pre_partial_partial_insertion): Likewise.
12267 2018-03-02  Richard Biener  <rguenther@suse.de>
12269         PR target/82005
12270         * config/darwin.c (saved_debug_info_level): New static global.
12271         (darwin_asm_lto_start): Disable debug info generation for LTO out.
12272         (darwin_asm_lto_end): Restore debug info generation settings.
12274 2018-03-01  Martin Liska  <mliska@suse.cz>
12276         PR sanitizer/82484
12277         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12278         volatile arguments.
12280 2018-03-01  Richard Biener  <rguenther@suse.de>
12282         PR debug/84645
12283         * dwarf2out.c (gen_variable_die): Properly handle late VLA
12284         type annotation with LTO when debug was disabled at compile-time.
12286 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
12288         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12289         XINT with INTVAL.
12290         (mips_final_postscan_insn): Likewise.
12292 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
12294         PR rtl-optimization/84528
12295         * alias.c (init_alias_target): Add commentary.
12296         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12297         a unique base value if the frame pointer is not eliminated
12298         to the stack pointer.
12300 2018-03-01  Tom de Vries  <tom@codesourcery.com>
12302         PR rtl-optimization/83327
12303         * lra-int.h (hard_regs_spilled_into): Declare.
12304         * lra.c (hard_regs_spilled_into): Define.
12305         (init_reg_info): Init hard_regs_spilled_into.
12306         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12307         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12308         (process_bb_lives): Handle hard_regs_spilled_into.
12309         (lra_create_live_ranges_1): Before doing liveness propagation, clear
12310         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12312 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
12314         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12315         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12316         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12317         * config/rs6000/aix72.h: New file.
12319 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
12321         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12322         instead of warning_at with conditional singular and plural messages
12323         where possible.
12325         PR target/52991
12326         * stor-layout.c (update_alignment_for_field): For
12327         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12328         && !DECL_PACKED (field), do the alignment update, just use
12329         only desired_align instead of MAX (type_align, desired_align)
12330         as the alignment.
12331         (place_field): Don't do known_align < desired_align handling
12332         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12333         is non-NULL, instead do it after rli->prev_field handling and
12334         only if not within a bitfield word.  For DECL_PACKED (field)
12335         use type_align of BITS_PER_UNIT.
12337 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
12339         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12340         superfluous parentheses and trailing spaces.
12342 2018-02-28  Richard Biener  <rguenther@suse.de>
12344         PR tree-optimization/84584
12345         * graphite-scop-detection.c (scop_detection::add_scop): Discard
12346         SCoPs with fake exit edge.
12348 2018-02-28  Martin Liska  <mliska@suse.cz>
12350         PR testsuite/84597
12351         * timevar.c (timer::print): Fix format to properly print 100%
12352         values.
12354 2018-02-28  Richard Biener  <rguenther@suse.de>
12356         PR middle-end/84607
12357         * genmatch.c (capture_info::walk_match): Do not mark
12358         captured expressions without operands as expr_p given
12359         they act more like predicates and should be subject to
12360         "lost tail" side-effect preserving.
12362 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
12364         PR rtl-optimization/81611
12365         * auto-inc-dec.c (attempt_change): Move dead note from
12366         mem_insn if it's the next use of regno
12367         (find_address): Take address use of reg holding
12368         non-incremented value.  Add parm to limit search to the named
12369         reg only.
12370         (merge_in_block): Attempt to use a mem insn that is the next
12371         use of the original regno.
12373 2018-02-27  Martin Sebor  <msebor@redhat.com>
12375         PR c++/83871
12376         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12377         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12379 2018-02-27  Martin Sebor  <msebor@redhat.com>
12381         PR translation/84207
12382         * diagnostic-core.h (warning_n, error_n, inform_n): Change
12383         n argument to unsigned HOST_WIDE_INT.
12384         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12385         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
12386         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12387         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12389 2018-02-27  Richard Biener  <rguenther@suse.de>
12391         PR tree-optimization/84512
12392         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12393         Do not use the estimate returned from record_stmt_cost for
12394         the scalar iteration cost but sum properly using add_stmt_cost.
12396 2018-02-27  Richard Biener  <rguenther@suse.de>
12398         PR tree-optimization/84466
12399         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12400         Adjust last change to less strictly validate use operands.
12402 2018-02-27  Martin Liska  <mliska@suse.cz>
12404         PR gcov-profile/84548
12405         * gcov.c (process_file): Allow partial overlap and consider it
12406         also as group functions.
12407         (output_lines): Properly calculate range of lines for a group.
12409 2018-02-27  Martin Liska  <mliska@suse.cz>
12411         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12412         'ggc' suffixes.  Change first column width.
12413         (timer::print): Fix formatting of the column.
12415 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
12417         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12418         preserve inline entry blocks for the sake of debug inline
12419         entry point markers alone.
12420         (remove_unused_locals): Suggest in comments a better place to
12421         force the preservation of inline entry blocks that are
12422         otherwise unused, but do not preserve them.
12424 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12426         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12428 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12430         PR target/84039
12431         * config/i386/constraints.md (Bs): Replace
12432         ix86_indirect_branch_register with
12433         TARGET_INDIRECT_BRANCH_REGISTER.
12434         (Bw): Likewise.
12435         * config/i386/i386.md (indirect_jump): Likewise.
12436         (tablejump): Likewise.
12437         (*sibcall_memory): Likewise.
12438         (*sibcall_value_memory): Likewise.
12439         Peepholes of indirect call and jump via memory: Likewise.
12440         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12441         (*sibcall_value_GOT_32): Likewise.
12442         * config/i386/predicates.md (indirect_branch_operand): Likewise.
12443         (GOT_memory_operand): Likewise.
12444         (call_insn_operand): Likewise.
12445         (sibcall_insn_operand): Likewise.
12446         (GOT32_symbol_operand): Likewise.
12447         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12449 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
12451         PR rtl-optimization/83496
12452         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12453         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
12454         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12455         redundant insn, if any.
12456         (relax_delay_slots): Likewise.
12457         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12459 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
12461         PR tree-optimization/83965
12462         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12463         that grouped statements are part of a reduction chain.  Return
12464         true if the statement is not marked as a reduction itself but
12465         is part of a group.
12466         (vect_recog_dot_prod_pattern): Don't check whether the statement
12467         is part of a group here.
12468         (vect_recog_sad_pattern): Likewise.
12469         (vect_recog_widen_sum_pattern): Likewise.
12471 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
12473         PR debug/84545
12474         * final.c (rest_of_clean_state): Also look for calls inside sequences.
12476 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12478         PR target/84530
12479         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12480         the bool argument.
12481         (ix86_output_indirect_function_return): New prototype.
12482         (ix86_split_simple_return_pop_internal): Likewise.
12483         * config/i386/i386.c (indirect_return_via_cx): New.
12484         (indirect_return_via_cx_bnd): Likewise.
12485         (indirect_thunk_name): Handle return va CX_REG.
12486         (output_indirect_thunk_function): Create alias for
12487         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12488         (ix86_output_indirect_jmp): Remove the bool argument.
12489         (ix86_output_indirect_function_return): New function.
12490         (ix86_split_simple_return_pop_internal): Likewise.
12491         * config/i386/i386.md (*indirect_jump): Don't pass false
12492         to ix86_output_indirect_jmp.
12493         (*tablejump_1): Likewise.
12494         (simple_return_pop_internal): Change it to define_insn_and_split.
12495         Call ix86_split_simple_return_pop_internal to split it for
12496         -mfunction-return=.
12497         (simple_return_indirect_internal): Call
12498         ix86_output_indirect_function_return instead of
12499         ix86_output_indirect_jmp.
12501 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
12503         PR bootstrap/84405
12504         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12505         memset and value initialization afterwards.
12507 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
12509         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12511 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12513         PR target/84521
12514         * common/config/aarch64/aarch64-common.c
12515         (aarch_option_optimization_table[]): Switch
12516         off fomit-frame-pointer
12518 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
12519             Chung-Ju Wu  <jasonwucj@gmail.com>
12521         * config/nds32/nds32-multiple.md (load_multiple): Disallow
12522         volatile memory.
12523         (store_multiple): Ditto.
12525 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
12527         * config.gcc: Add --with-cpu support for nds32 target.
12528         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12529         * config/nds32/nds32.opt: Add -mcpu= option.
12531 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
12533         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12534         isel=yes): Warn for these deprecated options.
12536 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
12538         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12539         ISA_2_5_MASKS_EMBEDDED.
12541 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
12543         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12544         p->max as pointers rather than using iterative_hash_expr.
12546 2018-02-23  Carl Love  <cel@us.ibm.com>
12548         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12549         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12550         BU_P8V_OVERLOAD_2.
12551         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12552         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12553         P8V_BUILTIN_VEC_VUNSIGNED2.
12555 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
12557         PR target/81572
12558         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12559         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12560         LRA_UNKNOWN_ALT.
12561         * lra-constraints.c (curr_insn_transform): Set up
12562         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
12563         LRA_UNKNOWN_ALT.
12564         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12565         * lra-eliminations.c (spill_pseudos): Ditto.
12566         (process_insn_for_elimination): Ditto.
12567         * lra-lives.c (reg_early_clobber_p): Use the new macros.
12568         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12569         LRA_NON_CLOBBERED_ALT.
12571 2018-02-22  Martin Sebor  <msebor@redhat.com>
12573         PR tree-optimization/84480
12574         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12575         to maybe_diag_stxncpy_trunc.  Call it.
12576         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12577         from gimple_fold_builtin_strcpy.  Print inlining stack.
12578         (handle_builtin_stxncpy): Print inlining stack.
12579         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12581 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
12583         PR target/84176
12584         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12585         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12586         and -fcheck-pointer-bounds are used together.
12587         (indirect_thunk_prefix): New enum.
12588         (indirect_thunk_need_prefix): New function.
12589         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
12590         "_nt" instead of "_bnd" for NOTRACK prefix.
12591         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12592         (output_indirect_thunk_function): Likewise.
12593         (): Likewise.
12594         (ix86_code_end): Update output_indirect_thunk_function calls.
12595         (ix86_output_indirect_branch_via_reg): Replace
12596         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12597         (ix86_output_indirect_branch_via_push): Likewise.
12598         (ix86_output_function_return): Likewise.
12599         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12600         incompatible with -fcf-protection=branch and
12601         -fcheck-pointer-bounds.
12603 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12605         PR target/83335
12606         * config/aarch64/aarch64.c (aarch64_print_address_internal):
12607         Change gcc_assert call to output_operand_lossage.
12609 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12611         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12613 2018-02-22  DJ Delorie  <dj@redhat.com>
12614             Sebastian Perta  <sebastian.perta@renesas.com>
12615             Oleg Endo  <olegendo@gcc.gnu.org>
12617         * config/rx/rx.c (rx_rtx_costs): New function.
12618         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12620 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12622         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12624 2018-02-22  Martin Liska  <mliska@suse.cz>
12626         PR driver/83193
12627         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12628         Add "native" as a possible value.
12630 2018-02-22  Martin Liska  <mliska@suse.cz>
12632         PR driver/83193
12633         * config/i386/i386.c (ix86_option_override_internal):
12634         Add "native" as a possible value for -march and -mtune.
12636 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
12638         PR target/84502
12639         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12640         to all type variants.
12642         PR tree-optimization/84503
12643         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12644         width as info->bitpos + info->bitsize - start.
12645         (merged_store_group::merge_overlapping): Simplify width computation.
12646         (check_no_overlap): New function.
12647         (imm_store_chain_info::try_coalesce_bswap): Compute expected
12648         start + width and last_order of the group, fail if check_no_overlap
12649         fails.
12650         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12651         to group if check_no_overlap fails.
12653 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12655         * config/rs6000/altivec.md: Delete contraint arguments to
12656         define_expand, define_split, and define_peephole2, and in
12657         define_insn_and_split if always unused.
12658         * config/rs6000/darwin.md: Ditto.
12659         * config/rs6000/dfp.md: Ditto.
12660         * config/rs6000/rs6000.md: Ditto.
12661         * config/rs6000/sync.md: Ditto.
12662         * config/rs6000/vector.md: Ditto.
12663         * config/rs6000/vsx.md: Ditto.
12665 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12667         * config/rs6000/altivec.md: Write output control strings as braced
12668         blocks instead of double-quoted strings.
12669         * config/rs6000/darwin.md: Ditto.
12670         * config/rs6000/rs6000.md: Ditto.
12671         * config/rs6000/vector.md: Ditto.
12672         * config/rs6000/vsx.md: Ditto.
12674 2018-02-21  Jason Merrill  <jason@redhat.com>
12676         PR c++/84314 - ICE with templates and fastcall attribute.
12677         * attribs.c (build_type_attribute_qual_variant): Remove assert.
12679 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12681         * ipa-cp.c (determine_versionability): Fix comment typos.
12683 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12685         PR c/84229
12686         * ipa-cp.c (determine_versionability): Do not version functions caling
12687         va_arg_pack.
12689 2018-02-21  Martin Liska  <mliska@suse.cz>
12691         PR driver/83193
12692         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12693         Add "native" as a possible value.
12694         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
12695         the macro when native cpu detection is available.
12697 2018-02-21  Martin Liska  <mliska@suse.cz>
12699         PR driver/83193
12700         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12701         Add "native" as a possible value.
12702         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12703         when native cpu detection is available.
12705 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
12706             Martin Sebor  <msebor@redhat.com>
12708         PR tree-optimization/84478
12709         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12710         false.
12711         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12712         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12713         support which is conservatively correct, for 2 only stay conservative
12714         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
12715         argument to the 2 argument get_range_strlen, adjust 6 arg
12716         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12717         false.
12718         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12719         (gimple_fold_builtin_strlen): Pass true as last argument to
12720         get_range_strlen.
12722 2018-02-20  Martin Sebor  <msebor@redhat.com>
12724         PR middle-end/84095
12725         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12726         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
12727         (builtin_memref::builtin_memref): Factor out parts into
12728         set_base_and_offset and call it.
12730 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12732         PR middle-end/84406
12733         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12734         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12735         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
12736         search at the associated MODE_INT.
12738 2018-02-20  Jeff Law  <law@redhat.com>
12740         PR middle-end/82123
12741         PR tree-optimization/81592
12742         PR middle-end/79257
12743         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12744         for range data rather than using global data.
12745         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12746         range data rather than using global data.
12747         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12748         pass it to children as needed.
12749         (struct directive::fmtresult): Similarly.
12750         (struct directive::set_width): Similarly.
12751         (struct directive::set_precision): Similarly.
12752         (format_integer, format_directive, parse_directive): Similarly.
12753         (format_none): Accept unnamed vr_values parameter.
12754         (format_percent, format_floating, format_character): Similarly.
12755         (format_string, format_plain): Similarly.
12756         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12757         the EVRP range analyzer for range data rather than using global data.
12758         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12759         gimple-ssa-evrp-analyze.h
12760         (class sprintf_dom_walker): Add after_dom_children member function.
12761         Add evrp_range_analyzer member.
12762         (sprintf_dom_walker::before_dom_children): Call into the EVRP
12763         range analyzer as needed.
12764         (sprintf_dom_walker::after_dom_children): New member function.
12765         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12766         if not optimizing.
12767         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12768         (evrp_range_analyzer::pop_to_marker): Likewise.
12770 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12772         PR tree-optimization/84419
12773         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12774         with the required type if its current type is compatible but
12775         different.
12777 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
12779         PR middle-end/82004
12780         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12781         after vectorization.
12783 2018-02-20  Martin Liska  <mliska@suse.cz>
12785         PR driver/83193
12786         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12787         possible values if we don't have a hint.
12789 2018-02-20  Martin Liska  <mliska@suse.cz>
12791         PR c/84310
12792         PR target/79747
12793         * final.c (shorten_branches): Build align_tab array with one
12794         more element.
12795         * opts.c (finish_options): Add alignment option limit check.
12796         (MAX_CODE_ALIGN): Likewise.
12797         (MAX_CODE_ALIGN_VALUE): Likewise.
12798         * doc/invoke.texi: Document maximum allowed option value for
12799         all -falign-* options.
12801 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
12803         PR target/84146
12804         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12805         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12806         * var-tracking.c (emit_note_insn_var_location): Remove all references
12807         to NOTE_INSN_CALL_ARG_LOCATION.
12808         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12809         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12810         Use copy_rtx_if_shared.
12811         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12812         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12813         (dwarf2out_var_location): Remove handling of
12814         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12815         on call_insn.
12816         * final.c (final_scan_insn): Remove all references to
12817         NOTE_INSN_CALL_ARG_LOCATION.
12818         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
12819         before dumping final insns.
12820         * except.c (emit_note_eh_region_end): Remove all references to
12821         NOTE_INSN_CALL_ARG_LOCATION.
12822         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12823         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12824         * config/arc/arc.c (hwloop_optimize): Likewise.
12825         * config/arm/arm.c (create_fix_barrier): Likewise.
12826         * config/s390/s390.c (s390_chunkify_start): Likewise.
12827         * config/sh/sh.c (find_barrier): Likewise.
12828         * config/i386/i386.c (rest_of_insert_endbranch,
12829         ix86_seh_fixup_eh_fallthru): Likewise.
12830         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12831         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12832         * config/frv/frv.c (frv_function_prologue): Likewise.
12833         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
12834         reg note.
12835         (note_outside_basic_block_p): Remove all references to
12836         NOTE_INSN_CALL_ARG_LOCATION.
12837         * gengtype.c (adjust_field_rtx_def): Likewise.
12838         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12839         Likewise.
12840         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12841         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12843         PR c++/84444
12844         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12845         is ADDR_EXPR.
12847         PR tree-optimization/84452
12848         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12849         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12850         is NULL.
12852 2018-02-19  Martin Liska  <mliska@suse.cz>
12854         PR sanitizer/82183
12855         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12857 2018-02-19  Martin Liska  <mliska@suse.cz>
12858             Richard Sandiford  <richard.sandiford@linaro.org>
12860         PR tree-optimization/82491
12861         * gimple-fold.c (get_base_constructor): Make earlier bail out
12862         to prevent ubsan.
12864 2018-02-19  Carl Love  <cel@us.ibm.com>
12866         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12867         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12868         BU_P8V_OVERLOAD_1.
12869         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12870         P8V_BUILTIN_VEC_NEG.
12872 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
12874         * config/rl78/rl78.md (movdf): New define expand.
12876 2018-02-19  Martin Liska  <mliska@suse.cz>
12878         PR other/80589
12879         * doc/invoke.texi: Fix typo.
12880         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12882 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
12884         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12885         handle rs6000_single_float and rs6000_double_float specially for
12886         e500 family CPUs.
12888 2018-02-16  Jeff Law  <law@redhat.com>
12890         * config/rx/rx.c (add_pop_cfi_notes): New function.;
12891         (pop_regs): Use it.
12893 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12895         PR ipa/84425
12896         * ipa-inline.c (inline_small_functions): Fix a typo.
12898 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12900         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12902 2018-02-16  Carl Love  <cel@us.ibm.com>
12904         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12905         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12906         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12907         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12908         expansion to P8V_BUILTIN_VEC_FLOAT2.
12910 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
12912         PR rtl-optimization/70023
12913         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12914         src_regno into account.
12916 2018-02-16  Carl Love  <cel@us.ibm.com>
12918         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12919         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12920         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12921         * config/rs6000/rs6000.c: Remove case statements for
12922         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12923         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12924         and P9V_BUILTIN_VEC_VINSERT4B.
12925         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12926         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12927         * config/rs6000/vsx.md:
12928         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12929         vec_insert4b.
12931 2018-02-16  Carl Love  <cel@us.ibm.com>
12933         * config/rs6000/altivec.h: Add builtin names vec_extract4b
12934         vec_insert4b.
12935         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12936         definitions.
12937         * config/rs6000/rs6000-c.c: Add the definitions for
12938         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12939         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12940         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12941         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
12942         definition for insert4b and define insn *insert3b_internal.
12943         * doc/extend.texi: Add documentation for vec_extract4b.
12945 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12947         * doc/extend.texi (Backwards Compatibility): Mention friend
12948         injection.  Note for-scope is deprecated.
12949         * doc/invoke.texi (-ffriend-injection): Deprecate.
12951 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
12953         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12954         that moved to I2, also allow destinations that are a paradoxical
12955         subreg (instead of a normal reg).
12957 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
12959         PR target/83831
12960         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12961         to QImode.
12963 2018-02-16  Richard Biener  <rguenther@suse.de>
12965         PR tree-optimization/84037
12966         PR tree-optimization/84016
12967         PR target/82862
12968         * config/i386/i386.c (ix86_builtin_vectorization_cost):
12969         Adjust vec_construct for the fact we need additional higher latency
12970         128bit inserts for AVX256 and AVX512 vector builds.
12971         (ix86_add_stmt_cost): Scale vector construction cost for
12972         elementwise loads.
12974 2018-02-16  Richard Biener  <rguenther@suse.de>
12976         PR tree-optimization/84417
12977         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12978         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12979         (non_rewritable_lvalue_p): Likewise, use poly-ints.
12981 2018-02-16  Martin Liska  <mliska@suse.cz>
12983         PR sanitizer/84307
12984         * internal-fn.def (ASAN_CHECK): Set proper flags.
12985         (ASAN_MARK): Likewise.
12987 2018-02-16  Julia Koval  <julia.koval@intel.com>
12989         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12990         from PTA_CANNONLAKE.
12992 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12994         PR target/84272
12995         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12996         Use ++iter rather than iter++ for std::list iterators.
12997         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
12998         defer deleting them until all nodes in the forest are processed.  Do
12999         free even leaf nodes.  Change to_process into auto_vec.
13001         PR bootstrap/84405
13002         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13003         * vec.h (vec_default_construct): Use memset instead of placement new
13004         if BROKEN_VALUE_INITIALIZATION is defined.
13005         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13006         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13007         is defined.
13009         PR rtl-optimization/83723
13010         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13011         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
13012         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
13013         recursive calls.
13014         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13015         callers.
13016         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13018 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
13020         PR rtl-optimization/81443
13021         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13022         from inner REGs to paradoxical SUBREGs.
13024 2018-02-16  Richard Biener  <rguenther@suse.de>
13026         PR tree-optimization/84399
13027         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13028         For operands we can analyze at their definition make sure we can
13029         analyze them at each use as well.
13031 2018-02-16  Richard Biener  <rguenther@suse.de>
13033         PR tree-optimization/84190
13034         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13035         volatile accesses if the decl isn't volatile.
13037 2018-02-15  Jason Merrill  <jason@redhat.com>
13039         PR c++/84314 - ICE with templates and fastcall attribute.
13040         * attribs.c (build_type_attribute_qual_variant): Don't clobber
13041         TYPE_CANONICAL on an existing type.
13043 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
13045         PR tree-optimization/84383
13046         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13047         dstoff nor call operand_equal_p if dstbase is NULL.
13049         PR tree-optimization/84334
13050         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13051         also a CONSTANT_CLASS_P, punt.
13053 2018-02-14  Jim Wilson  <jimw@sifive.com>
13055         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13056         first SMALL_OPERAND check.  New local min_second_step.  Move assert
13057         to where locals are set.  Add TARGET_RVC support.
13058         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13060 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
13062         * doc/invoke.texi: Correct -Wformat-overflow code sample.
13064 2018-02-14  Martin Sebor  <msebor@redhat.com>
13066         PR tree-optimization/83698
13067         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13068         arrays constrain the offset range to their bounds.
13069         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13070         (builtin_access::overlap): Avoid setting the size of overlap if it's
13071         already been set.
13072         (maybe_diag_overlap): Also consider arrays when deciding what values
13073         of offsets to include in diagnostics.
13075 2018-02-14  Martin Sebor  <msebor@redhat.com>
13077         PR c/84108
13078         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13079         that correspond to the kind of a declaration.
13081 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
13083         PR target/83984
13084         * config/pa/pa.md: Load address of PIC label using the linkage table
13085         if the label is nonlocal.
13087 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13089         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13090         warning message if user requests -maltivec=be.
13091         * doc/invoke.texi: Document deprecation of -maltivec=be.
13093 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
13095         PR target/84220
13096         * config/rs6000/rs6000-c.c: Update definitions for
13097         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13098         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13100 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13102         PR target/84239
13103         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13104         add _get_ssp intrinsics. Remove argument from
13105         __builtin_ia32_rdssp[d|q].
13106         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13107         * config/i386/i386-builtin.def: Remove argument from
13108         __builtin_ia32_rdssp[d|q].
13109         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13110         ix86_expand_special_args_builtin for _rdssp[d|q].
13111         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13112         Clear register before usage.
13113         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13114         Add documentation for new _get_ssp and _inc_ssp intrinsics.
13116 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
13118         PR tree-optimization/84357
13119         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13120         operand 1 of an ARRAY_REF too.
13122 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
13124         PR target/83831
13125         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13126         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13127         declarations.
13128         (set_of_reg): New struct.
13129         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13130         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13131         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13132         functions.
13133         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13134         Split into bitclr, bitset, bitinvert patterns if appropriate.
13135         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13136         use rx_fuse_in_memory_bitop.
13137         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13138         to named insn, correct maximum insn length.
13140 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
13142         PR target/79242
13143         * machmode.def: Define a complex mode for PARTIAL_INT.
13144         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13145         MODE_PARTIAL_INT.
13146         * doc/rtl.texi: Document CSPImode.
13147         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13148         handling.
13149         (msp430_hard_regno_nregs_with_padding): Likewise.
13151 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
13153         PR target/84279
13154         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13156 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
13158         PR rtl-optimization/84169
13159         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
13160         we generated a parallel as new i3 and we split that to new i2 and i3
13161         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
13162         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
13163         those to i2, not i1.  Partially rewrite this scan code.
13165 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13167         PR c/82210
13168         * stor-layout.c (place_field): For variable length fields, adjust
13169         offset_align afterwards not just based on the field's alignment,
13170         but also on the size.
13172         PR middle-end/84309
13173         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13174         of exps and logs in the use_exp2 case.
13176 2018-02-13  Jeff Law  <law@redhat.com>
13178         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13179         entry for "vector".
13181         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13182         ARGS as unused.
13184 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
13186         PR debug/84342
13187         PR debug/84319
13188         * common.opt (gas-loc-support, gas-locview-support): New.
13189         (ginline-points, ginternal-reset-location-views): New.
13190         * doc/invoke.texi: Document them.  Use @itemx where intended.
13191         (gvariable-location-views): Adjust.
13192         * target.def (reset_location_view): New.
13193         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13194         (TARGET_RESET_LOCATION_VIEW): New.
13195         * doc/tm.texi: Rebuilt.
13196         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13197         (dwarf2out_default_as_locview_support): New.
13198         (output_asm_line_debug_info): Use option variables.
13199         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13200         (output_loc_list): Likewise.
13201         (add_high_low_attributes): Check option variables.
13202         Don't output entry view attribute in strict mode.
13203         (gen_inlined_subroutine_die): Check option variables.
13204         (dwarf2out_inline_entry): Likewise.
13205         (init_sections_and_labels): Likewise.
13206         (dwarf2out_early_finish): Likewise.
13207         (maybe_reset_location_view): New, from...
13208         (dwarf2out_var_location): ... here.  Call it.
13209         * debug.h (dwarf2out_default_as_loc_support): Declare.
13210         (dwarf2out_default_as_locview_support): Declare.
13211         * hooks.c (hook_int_rtx_insn_0): New.
13212         * hooks.h (hook_int_rtx_insn_0): Declare.
13213         * toplev.c (process_options): Take -gas-loc-support and
13214         -gas-locview-support from dwarf2out.  Enable
13215         -gvariable-location-views by default only with locview
13216         assembler support.  Enable -ginternal-reset-location-views by
13217         default only if the target defines the corresponding hook.
13218         Enable -ginline-points by default if location views are
13219         enabled; force it disabled if statement frontiers are
13220         disabled.
13221         * tree-inline.c (expand_call_inline): Check option variables.
13222         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13224 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
13226         PR tree-optimization/84321
13227         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13228         handling.  Also check whether the anti-range contains any values
13229         that satisfy the mask; switch to a VR_RANGE if not.
13231 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
13233         PR sanitizer/84340
13234         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13236 2018-02-13  Martin Jambor  <mjambor@suse.cz>
13238         PR c++/83990
13239         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13240         of call statements, also set location of a load to a temporary.
13242 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
13244         * config/rl78/rl78.c (add_vector_labels): New function.
13245         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13246         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13247         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13248         which checks that no arguments are passed.
13249         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13250         * doc/extend.texi: Documentation for the new attribute.
13252 2018-02-13  Andreas Schwab  <schwab@suse.de>
13254         * config/riscv/linux.h (CPP_SPEC): Define.
13256 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13258         PR target/84335
13259         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13260         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13261         OPTION_MASK_ISA_AES as first argument to def_builtin_const
13262         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13263         instead of OPTION_MASK_ISA_PCLMUL as first argument to
13264         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13265         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13266         temporarily for AES and PCLMUL builtins.
13268         PR tree-optimization/84339
13269         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13270         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13271         Formatting fixes.
13273         PR middle-end/84309
13274         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13275         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13276         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13277         inline function.
13278         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13279         inline function.
13280         * omp-simd-clone.h: New file.
13281         * omp-simd-clone.c: Include omp-simd-clone.h.
13282         (expand_simd_clones): No longer static.
13283         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13284         cgraph.h and omp-simd-clone.h.
13285         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13286         (vect_recog_widen_shift_pattern): Formatting fix.
13287         (vect_pattern_recog_1): Don't check optab for calls.
13289         PR target/84336
13290         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13291         operands[2] into a REG before using gen_lowpart on it.
13293 2018-02-12  Jeff Law  <law@redhat.com>
13295         PR target/83760
13296         * config/sh/sh.c (find_barrier): Consider a sibling call
13297         a barrier as well.
13299         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13300         successfully back substituting a reg.
13302 2018-02-12  Richard Biener  <rguenther@suse.de>
13304         PR tree-optimization/84037
13305         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13306         parameter, move visited init to caller.
13307         (vect_slp_analyze_operations): Separate cost from validity
13308         check, initialize visited once for all instances.
13309         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13310         for all instances.
13311         * tree-vect-stmts.c (vect_model_simple_cost): Make early
13312         out an assert.
13313         (vect_model_promotion_demotion_cost): Likewise.
13314         (vectorizable_bswap): Guard cost modeling with !slp_node
13315         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13316         SLP stmts.
13317         (vectorizable_call): Likewise.
13318         (vectorizable_conversion): Likewise.
13319         (vectorizable_assignment): Likewise.
13320         (vectorizable_shift): Likewise.
13321         (vectorizable_operation): Likewise.
13322         (vectorizable_store): Likewise.
13323         (vectorizable_load): Likewise.
13324         (vectorizable_condition): Likewise.
13325         (vectorizable_comparison): Likewise.
13327 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
13329         PR sanitizer/84307
13330         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13331         (ASAN_MARK): Fix fnspec to account for return value, change pointer
13332         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13334 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13336         PR middle-end/83665
13337         * params.def (inline-min-speedup): Increase from 8 to 15.
13338         (max-inline-insns-auto): Decrease from 40 to 30.
13339         * ipa-split.c (consider_split): Add some buffer for function to
13340         be considered inlining candidate.
13341         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13342         default values.
13344 2018-02-12  Richard Biener  <rguenther@suse.de>
13346         PR tree-optimization/84037
13347         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13348         matched stmts if we cannot swap the non-matched ones.
13350 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13352         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13353         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13354         _mm_maskz_scalef_round_ss): New intrinsics.
13355         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13356         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13357         __builtin_ia32_scalefss_round): Remove.
13358         (__builtin_ia32_scalefsd_mask_round,
13359         __builtin_ia32_scalefss_mask_round): New intrinsics.
13360         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13361         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13362         ((match_operand:VF_128 2 "<round_nimm_predicate>"
13363         "<round_constraint>")): Changed to ...
13364         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13365         "<round_scalar_constraint>")): ... this.
13366         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13367         %0, %1, %2<round_op3>}"): Changed to ...
13368         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13369         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13370         %2<round_scalar_mask_op3>}"): ... this.
13371         * config/i386/subst.md (round_scalar_nimm_predicate): New.
13373 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13375         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13376         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13377         (_mm_maskz_sqrt_round_ss): New intrinsics.
13378         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13379         (__builtin_ia32_sqrtsd_mask_round)
13380         (__builtin_ia32_sqrtss_mask_round): New builtins.
13381         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13382         (__builtin_ia32_sqrtss_round): Remove.
13383         (__builtin_ia32_sqrtsd_mask_round)
13384         (__builtin_ia32_sqrtss_mask_round): New builtins.
13385         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13386         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13387         ((match_operand:VF_128 1 "vector_operand"
13388         "xBm,<round_constraint>")): Changed to ...
13389         ((match_operand:VF_128 1 "vector_operand"
13390         "xBm,<round_scalar_constraint>")): ... this.
13391         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13392         %0, %2, %<iptr>1<round_op3>}): Changed to ...
13393         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13394         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13395         %<iptr>1<round_scalar_mask_op3>}): ... this.
13396         ((set_attr "prefix" "<round_prefix>")): Changed to ...
13397         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13399 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
13401         PR target/84266
13402         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13403         Cast vec_cmpeq result to correct type.
13404         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13405         Cast vec_cmpgt result to correct type.
13407 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
13409         * final.c (final_scan_insn_1): Renamed from...
13410         (final_scan_insn): ... this.  New wrapper, to recover
13411         seen from the outermost call in recursive ones.
13412         * config/sparc/sparc.c (output_return): Drop seen from call.
13413         (output_sibcall): Likewise.
13414         * config/visium/visium.c (output_branch): Likewise.
13416 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
13418         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13419         function label.
13421 2018-02-10  Alan Modra  <amodra@gmail.com>
13423         PR target/84300
13424         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13425         Specify LR as an input.
13427 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
13429         PR sanitizer/83987
13430         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13431         remove_member_access_dummy_vars): New functions.
13432         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13433         lower_omp_1, execute_lower_omp): Use them.
13435         PR rtl-optimization/84308
13436         * shrink-wrap.c (spread_components): Release todo vector.
13438 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
13440         PR rtl-optimization/57193
13441         * ira-color.c (struct allocno_color_data): Add member
13442         conflict_allocno_hard_prefs.
13443         (update_conflict_allocno_hard_prefs): New.
13444         (bucket_allocno_compare_func): Add a preference based on
13445         conflict_allocno_hard_prefs.
13446         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13447         (color_allocnos): Remove a dead code.  Initiate
13448         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
13450 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
13452         PR target/84226
13453         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13454         constraint from =wa to wa.  Avoid a subreg on the output operand,
13455         instead use a pseudo and subreg it in a move.
13456         (p9_xxbrd_<mode>): Changed to ...
13457         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13458         (p9_xxbrd_v2df): New expander.
13459         (p9_xxbrw_<mode>): Changed to ...
13460         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13461         (p9_xxbrw_v4sf): New expander.
13463 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
13465         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13467 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
13469         PR target/83926
13470         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13471         multiply in 32-bit mode.
13472         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13473         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13474         mode.
13476 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
13478         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13479         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13480         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13481         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13483 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
13485         PR lto/84213
13486         * dwarf2out.c (is_trivial_indirect_ref): New function.
13487         (dwarf2out_late_global_decl): Do not generate a location
13488         attribute for variables that have a non-trivial DECL_VALUE_EXPR
13489         and that are not defined in the current unit.
13491 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
13493         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13494         instead of a libcall for UNORDERED.
13496 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
13498         PR target/82641
13499         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13500         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13502 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13504         PR target/PR84295
13505         * config/s390/s390.c (s390_set_current_function): Invoke
13506         s390_indirect_branch_settings also if fndecl didn't change.
13508 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
13510         * config/rs6000/rs6000.md (blockage): Set length to zero.
13512 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
13514         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13516 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
13518         PR sanitizer/84285
13519         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13520         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13521         -static-lib*san.
13523         PR debug/84252
13524         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13525         PARALLEL incoming that failed vt_get_decl_and_offset check.
13527         PR middle-end/84237
13528         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13529         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13530         TREE_READONLY bit.
13531         (get_variable_section): For decls in named .bss* sections pass true as
13532         second argument to bss_initializer_p.
13534 2018-02-09  Marek Polacek  <polacek@redhat.com>
13535             Jakub Jelinek  <jakub@redhat.com>
13537         PR c++/83659
13538         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13539         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
13540         Sync some changes from cxx_fold_indirect_ref.
13542 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
13544         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13545         markers.
13546         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13547         (BLOCK_INLINE_ENTRY_LABEL): New.
13548         (dwarf2out_var_location): Disregard inline entry markers.
13549         (inline_entry_data): New struct.
13550         (inline_entry_data_hasher): New hashtable type.
13551         (inline_entry_data_hasher::hash): New.
13552         (inline_entry_data_hasher::equal): New.
13553         (inline_entry_data_table): New variable.
13554         (add_high_low_attributes): Add DW_AT_entry_pc and
13555         DW_AT_GNU_entry_view attributes if a pending entry is found
13556         in inline_entry_data_table.  Add old entry_pc attribute only
13557         if debug nonbinding markers are disabled.
13558         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13559         markers are enabled.
13560         (block_within_block_p, dwarf2out_inline_entry): New.
13561         (dwarf2out_finish): Check that no entries remained in
13562         inline_entry_data_table.
13563         * final.c (reemit_insn_block_notes): Handle inline entry notes.
13564         (final_scan_insn, notice_source_line): Likewise.
13565         (rest_of_clean_state): Skip inline entry markers.
13566         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13567         markers.
13568         * gimple.c (gimple_build_debug_inline_entry): New.
13569         * gimple.h (enum gimple_debug_subcode): Add
13570         GIMPLE_DEBUG_INLINE_ENTRY.
13571         (gimple_build_debug_inline_entry): Declare.
13572         (gimple_debug_inline_entry_p): New.
13573         (gimple_debug_nonbind_marker_p): Adjust.
13574         * insn-notes.def (INLINE_ENTRY): New.
13575         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13576         inline entry marker notes.
13577         (print_insn): Likewise.
13578         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13579         (INSN_DEBUG_MARKER_KIND): Likewise.
13580         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13581         * tree-inline.c (expand_call_inline): Build and insert
13582         debug_inline_entry stmt.
13583         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13584         inline entry blocks early, if nonbind markers are enabled.
13585         (dump_scope_block): Dump fragment info.
13586         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13587         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13588         (gimple_build_debug_inline_entry): New.
13589         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13590         Enable/disable inline entry points too.
13591         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13592         (DEBUG_INSN): Describe inline entry markers.
13594         * common.opt (gvariable-location-views): New.
13595         (gvariable-location-views=incompat5): New.
13596         * config.in: Rebuilt.
13597         * configure: Rebuilt.
13598         * configure.ac: Test assembler for view support.
13599         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13600         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13601         * dwarf2out.c (var_loc_view): New typedef.
13602         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13603         (dwarf2out_locviews_in_attribute): New.
13604         (dwarf2out_locviews_in_loclist): New.
13605         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13606         (enum dw_line_info_opcode): Add LI_adv_address.
13607         (struct dw_line_info_table): Add view.
13608         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13609         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13610         (zero_view_p): New variable.
13611         (ZERO_VIEW_P): New macro.
13612         (output_asm_line_debug_info): New.
13613         (struct var_loc_node): Add view.
13614         (add_AT_view_list, AT_loc_list): New.
13615         (add_var_loc_to_decl): Add view param.  Test it against last.
13616         (new_loc_list): Add view params.  Record them.
13617         (AT_loc_list_ptr): Handle loc and view lists.
13618         (view_list_to_loc_list_val_node): New.
13619         (print_dw_val): Handle dw_val_class_view_list.
13620         (size_of_die): Likewise.
13621         (value_format): Likewise.
13622         (loc_list_has_views): New.
13623         (gen_llsym): Set vl_symbol too.
13624         (maybe_gen_llsym, skip_loc_list_entry): New.
13625         (dwarf2out_maybe_output_loclist_view_pair): New.
13626         (output_loc_list): Output view list or entries too.
13627         (output_view_list_offset): New.
13628         (output_die): Handle dw_val_class_view_list.
13629         (output_dwarf_version): New.
13630         (output_compilation_unit_header): Use it.
13631         (output_skeleton_debug_sections): Likewise.
13632         (output_rnglists, output_line_info): Likewise.
13633         (output_pubnames, output_aranges): Update version comments.
13634         (output_one_line_info_table): Output view numbers in asm comments.
13635         (dw_loc_list): Determine current endview, pass it to new_loc_list.
13636         Call maybe_gen_llsym.
13637         (loc_list_from_tree_1): Adjust.
13638         (add_AT_location_description): Create view list attribute if
13639         needed, check it's absent otherwise.
13640         (convert_cfa_to_fb_loc_list): Adjust.
13641         (maybe_emit_file): Call output_asm_line_debug_info for test.
13642         (dwarf2out_var_location): Reset views as needed.  Precompute
13643         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
13644         attribute.  Set view.
13645         (new_line_info_table): Reset next view.
13646         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13647         (dwarf2out_source_line): Likewise.  Output view resets and labels to
13648         the assembler, or select appropriate line info opcodes.
13649         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13650         (optimize_string_length): Catch it.  Adjust.
13651         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
13652         dw_val_class_view_list, and remove it if no longer needed.
13653         (hash_loc_list): Hash view numbers.
13654         (loc_list_hasher::equal): Compare them.
13655         (optimize_location_lists): Check whether a view list symbol is
13656         needed, and whether the locview attribute is present, and
13657         whether they match.  Remove the locview attribute if no longer
13658         needed.
13659         (index_location_lists): Call skip_loc_list_entry for test.
13660         (dwarf2out_finish): Call output_asm_line_debug_info for test.
13661         Use output_dwarf_version.
13662         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13663         (struct dw_val_node): Add val_view_list.
13664         * final.c (SEEN_NEXT_VIEW): New.
13665         (set_next_view_needed): New.
13666         (clear_next_view_needed): New.
13667         (maybe_output_next_view): New.
13668         (final_start_function): Rename to...
13669         (final_start_function_1): ... this.  Take pointer to FIRST,
13670         add SEEN parameter.  Emit param bindings in the initial view.
13671         (final_start_function): Reintroduce SEEN-less interface.
13672         (final): Rename to...
13673         (final_1): ... this.  Take SEEN parameter.  Output final pending
13674         next view at the end.
13675         (final): Reintroduce seen-less interface.
13676         (final_scan_insn): Output pending next view before switching
13677         sections or ending a block.  Mark the next view as needed when
13678         outputting variable locations.  Notify debug backend of section
13679         changes, and of location view changes.
13680         (rest_of_handle_final): Adjust.
13681         * toplev.c (process_options): Autodetect value for debug variable
13682         location views option.  Warn on incompat5 without -gdwarf-5.
13683         * doc/invoke.texi (gvariable-location-views): New.
13684         (gvariable-location-views=incompat5): New.
13685         (gno-variable-location-views): New.
13687 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
13689         PR tree-optimization/84136
13690         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13691         that the result of find_edge is non-NULL.
13693 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13695         PR target/83008
13696         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13697         storing integer register in SImode.  Fix cost of 256 and 512
13698         byte aligned SSE register store.
13700 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13702         * config/i386/i386.c (ix86_multiplication_cost): Fix
13703         multiplication cost for TARGET_AVX512DQ.
13705 2018-02-08  Marek Polacek  <polacek@redhat.com>
13707         PR tree-optimization/84238
13708         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13709         get_range_strlen.
13711 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13713         PR tree-optimization/84265
13714         * tree-vect-stmts.c (vectorizable_store): Don't treat
13715         VMAT_CONTIGUOUS accesses as grouped.
13716         (vectorizable_load): Likewise.
13718 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13720         PR tree-optimization/81635
13721         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13722         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13723         (test_round_for_mask): New functions.
13724         (wide_int_cc_tests): Call test_round_for_mask.
13725         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13726         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13727         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13728         range returned by get_range_info.
13730 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13732         PR ipa/81360
13733         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13734         * symtab.c: Include builtins.h
13735         (symtab_node::output_to_lto_symbol_table_p): Move here
13736         from lto-streamer-out.c:output_symbol_p.
13737         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13738         (output_symbol_p): Move all logic to symtab.c
13739         (produce_symtab): Update.
13741 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13743         * config/s390/s390-opts.h (enum indirect_branch): Define.
13744         * config/s390/s390-protos.h (s390_return_addr_from_memory)
13745         (s390_indirect_branch_via_thunk)
13746         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13747         (enum s390_indirect_branch_type): Define.
13748         * config/s390/s390.c (struct s390_frame_layout, struct
13749         machine_function): Remove.
13750         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13751         (indirect_branch_table_label_no, indirect_branch_table_name):
13752         Define variables.
13753         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13754         (enum s390_indirect_branch_option): Define.
13755         (s390_return_addr_from_memory): New function.
13756         (s390_handle_string_attribute): New function.
13757         (s390_attribute_table): Add new attribute handler.
13758         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13759         (s390_indirect_branch_via_thunk): New function.
13760         (s390_indirect_branch_via_inline_thunk): New function.
13761         (s390_function_ok_for_sibcall): When jumping via thunk disallow
13762         sibling call optimization for non z10 compiles.
13763         (s390_emit_call): Force indirect branch target to be a single
13764         register.  Add r1 clobber for non-z10 compiles.
13765         (s390_emit_epilogue): Emit return jump via return_use expander.
13766         (s390_reorg): Handle JUMP_INSNs as execute targets.
13767         (s390_option_override_internal): Perform validity checks for the
13768         new command line options.
13769         (s390_indirect_branch_attrvalue): New function.
13770         (s390_indirect_branch_settings): New function.
13771         (s390_set_current_function): Invoke s390_indirect_branch_settings.
13772         (s390_output_indirect_thunk_function):  New function.
13773         (s390_code_end): Implement target hook.
13774         (s390_case_values_threshold): Implement target hook.
13775         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13776         macros.
13777         * config/s390/s390.h (struct s390_frame_layout)
13778         (struct machine_function): Move here from s390.c.
13779         (TARGET_INDIRECT_BRANCH_NOBP_RET)
13780         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13781         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13782         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13783         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13784         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13785         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13786         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13787         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13788         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13789         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13790         (mnemonic attribute): Add values which aren't recognized
13791         automatically.
13792         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13793         pattern for branch conversion.  Fix mnemonic attribute.
13794         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13795         indirect branch via thunk if requested.
13796         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13797         ("*indirect_jump"): Disable for branch conversion using out of
13798         line thunks.
13799         ("indirect_jump_via_thunk<mode>_z10")
13800         ("indirect_jump_via_thunk<mode>")
13801         ("indirect_jump_via_inlinethunk<mode>_z10")
13802         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13803         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13804         ("casesi_jump_via_inlinethunk<mode>_z10")
13805         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13806         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13807         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13808         ("*indirect2_jump"): Disable for branch conversion.
13809         ("casesi_jump"): Turn into expander and expand patterns for branch
13810         conversion.
13811         ("return_use"): New expander.
13812         ("*return"): Emit return via thunk and rename it to ...
13813         ("*return<mode>"): ... this one.
13814         * config/s390/s390.opt: Add new options and and enum for the
13815         option values.
13817 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13819         * lra-constraints.c (match_reload): Unconditionally use
13820         gen_lowpart_SUBREG, rather than selecting between that
13821         and equivalent gen_rtx_SUBREG code.
13823 2018-02-08  Richard Biener  <rguenther@suse.de>
13825         PR tree-optimization/84233
13826         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13827         changed flag instead of boguously re-using phi_inserted.
13829 2018-02-08  Martin Jambor  <mjambor@suse.cz>
13831         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13832         static local variables.
13834 2018-02-08  Richard Biener  <rguenther@suse.de>
13836         PR tree-optimization/84278
13837         * tree-vect-stmts.c (vectorizable_store): When looking for
13838         smaller vector types to perform grouped strided loads/stores
13839         make sure the mode is supported by the target.
13840         (vectorizable_load): Likewise.
13842 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13844         * config/aarch64/aarch64.c (aarch64_components_for_bb):
13845         Increase LDP/STP opportunities by adding adjacent callee-saves.
13847 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13849         PR rtl-optimization/84068
13850         PR rtl-optimization/83459
13851         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13853 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
13855         PR tree-optimization/84224
13856         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13857         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13858         non-zero arguments.
13860 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
13862         PR target/84113
13863         * config/rs6000/altivec.md (*restore_world): Remove LR use.
13864         * config/rs6000/predicates.md (restore_world_operation): Adjust op
13865         count, remove one USE.
13867 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13869         * doc/install.texi (Configuration): Document the
13870         --with-long-double-format={ibm,ieee} PowerPC configuration
13871         options.
13873         PR target/84154
13874         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13875         Convert from define_expand to be define_insn_and_split.  Rework
13876         float/double/_Float128 conversions to QI/HI/SImode to work with
13877         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
13878         conversions to QI/HImode types did a store and then a load to
13879         truncate the value.  For conversions to VSX registers, don't split
13880         the insn, instead emit the code directly.  Use the code iterator
13881         any_fix to combine signed and unsigned conversions.
13882         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13883         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13884         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13885         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13886         (fix_<mode>di2_hw): Likewise.
13887         (fixuns_<mode>di2_hw): Likewise.
13888         (fix_<mode>si2_hw): Likewise.
13889         (fixuns_<mode>si2_hw): Likewise.
13890         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13891         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13892         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13893         fix<uns>_trunc<SFDF:mode>si2_p8.
13894         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13895         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13896         (fix<uns>_<mode>_mem): Likewise.
13897         (fctiw<u>z_<mode>_mem): Likewise.
13898         (fix<uns>_<mode>_mem): Likewise.
13899         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13900         the register allocator from doing a direct move to the GPRs to do
13901         a store, and instead use the ISA 3.0 store byte/half-word from
13902         vector register instruction.  For IEEE 128-bit floating point,
13903         also optimize stores of 32-bit ints.
13904         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13906 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
13908         * genextract.c (push_pathstr_operand): New function to support
13909         [a-zA-Z].
13910         (walk_rtx): Call push_pathstr_operand.
13911         (print_path): Support [a-zA-Z].
13913 2018-02-07  Richard Biener  <rguenther@suse.de>
13915         PR tree-optimization/84037
13916         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13917         (cse_and_gimplify_to_preheader): Declare.
13918         (vect_get_place_in_interleaving_chain): Likewise.
13919         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13920         ivexpr_map.
13921         (_loop_vec_info::~_loop_vec_info): Delete it.
13922         (cse_and_gimplify_to_preheader): New function.
13923         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13924         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13925         (vectorizable_load): Likewise.  For grouped stores always base
13926         the IV on the first element.
13927         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13928         condition before gimplifying.
13930 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13932         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13933         *DIV_EXPR and *MOD_EXPR.
13935 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
13937         PR target/84248
13938         * config/i386/i386.c (ix86_option_override_internal): Mask out
13939         the CF_SET bit when checking -fcf-protection.
13941 2018-02-07  Tom de Vries  <tom@codesourcery.com>
13943         PR libgomp/84217
13944         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13945         enough.
13947 2018-02-07  Richard Biener  <rguenther@suse.de>
13949         PR tree-optimization/84204
13950         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13951         this place.
13953         PR tree-optimization/84205
13954         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13955         special-case isl_ast_op_zdiv_r.
13957         PR tree-optimization/84223
13958         * graphite-scop-detection.c (gather_bbs::before_dom_children):
13959         Only add conditions from within the region.
13960         (gather_bbs::after_dom_children): Adjust.
13962 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
13964         PR target/84209
13965         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13966         * config/avr/avr.md: Only post-reload split REG-REG moves if
13967         either register is GENERAL_REG_P.
13969 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13971         PR tree-optimization/84235
13972         * tree-ssa-scopedtables.c
13973         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13974         if the subtraction is performed in floating point type where NaNs are
13975         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13976         build 1.  Formatting fix.
13978 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
13980         PR target/84146
13981         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13982         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13983         and skip it regardless of bb boundaries.  Use CALL_P macro,
13984         don't test INSN_P (insn) together with CALL_P or JUMP_P check
13985         unnecessarily, formatting fix.
13987 2018-02-06  Michael Collison  <michael.collison@arm.com>
13989         * config/arm/thumb2.md:
13990         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13991         (*thumb_mov_notscc): Ditto.
13993 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
13995         PR target/84154
13996         * config/rs6000/rs6000.md (su code attribute): Use "u" for
13997         unsigned_fix, not "s".
13999 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14001         * configure.ac (gcc_fn_eh_frame_ro): New function.
14002         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14003         correct .eh_frame permissions.
14004         * configure: Regenerate.
14006 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
14008         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14009         irrelevant options.
14011 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14013         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14014         Display warning message for -mno-speculate-indirect-jumps.
14016 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
14018         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14019         Undocumented.
14020         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14022 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
14024         PR tree-optimization/84225
14025         * tree-eh.c (find_trapping_overflow): Only call
14026         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14028 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14030         PR target/84145
14031         * config/i386/i386.c: Reimplement the check of possible options
14032         -mibt/-mshstk conbination. Change error messages.
14033         * doc/invoke.texi: Fix a typo: remove extra '='.
14035 2018-02-06  Marek Polacek  <polacek@redhat.com>
14037         PR tree-optimization/84228
14038         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14040 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
14042         PR target/82641
14043         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14044         emitted arch directives.
14045         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14046         __ARM_FEATURE_COPROC before changing architectures.
14048 2018-02-06  Richard Biener  <rguenther@suse.de>
14050         * config/i386/i386.c (print_reg): Fix typo.
14051         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14053 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
14055         * configure: Regenerate.
14057 2018-02-05  Martin Sebor  <msebor@redhat.com>
14059         PR tree-optimization/83369
14060         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14061         inlining context.
14063 2018-02-05  Martin Liska  <mliska@suse.cz>
14065         * doc/invoke.texi: Cherry-pick upstream r323995.
14067 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
14069         * ira.c (ira_init_register_move_cost): Adjust comment.
14071 2018-02-05  Martin Liska  <mliska@suse.cz>
14073         PR gcov-profile/84137
14074         * doc/gcov.texi: Fix typo in documentation.
14076 2018-02-05  Martin Liska  <mliska@suse.cz>
14078         PR gcov-profile/83879
14079         * doc/gcov.texi: Document necessity of --dynamic-list-data when
14080         using dlopen functionality.
14082 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
14084         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14085         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14086         _mm_maskz_range_ss, _mm_mask_range_round_ss,
14087         _mm_maskz_range_round_ss): New intrinsics.
14088         (__builtin_ia32_rangesd128_round)
14089         (__builtin_ia32_rangess128_round): Remove.
14090         (__builtin_ia32_rangesd128_mask_round,
14091         __builtin_ia32_rangess128_mask_round): New builtins.
14092         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14093         __builtin_ia32_rangess128_round): Remove.
14094         (__builtin_ia32_rangesd128_mask_round,
14095         __builtin_ia32_rangess128_mask_round): New builtins.
14096         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14097         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14098         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14099         "<round_saeonly_constraint>")): Changed to ...
14100         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14101         "<round_saeonly_scalar_constraint>")): ... this.
14102         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14103         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14104         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14105         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14106         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14108 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
14110         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14111         options.
14112         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14113         Remove all values except native, 8540 and 8548.
14115 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
14117         * config/i386/i386.c (ix86_output_function_return): Pass
14118         INVALID_REGNUM, instead of -1, as invalid register number to
14119         indirect_thunk_name and output_indirect_thunk.
14121 2018-02-02  Julia Koval  <julia.koval@intel.com>
14123         * config.gcc: Add -march=icelake.
14124         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14125         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14126         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14127         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14128         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14129         (processor_target_table): Add icelake.
14130         (ix86_option_override_internal): Handle new PTAs.
14131         (get_builtin_code_for_version): Handle icelake.
14132         (M_INTEL_COREI7_ICELAKE): New.
14133         (fold_builtin_cpu): Handle icelake.
14134         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14135         * doc/invoke.texi: Add -march=icelake.
14137 2018-02-02  Julia Koval  <julia.koval@intel.com>
14139         * config/i386/i386.c (ix86_option_override_internal): Change flags type
14140         to wide_int_bitmask.
14141         * wide-int-bitmask.h: New.
14143 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14145         PR target/84066
14146         * config/i386/i386.md: Replace Pmode with word_mode in
14147         builtin_setjmp_setup and builtin_longjmp to support x32.
14149 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
14151         PR target/56010
14152         PR target/83743
14153         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14154         #include "opts.h".
14155         (rs6000_supported_cpu_names): New static variable.
14156         (linux_cpu_translation_table): Likewise.
14157         (elf_platform) <cpu>: Define new static variable and use it.
14158         Translate kernel AT_PLATFORM name to canonical name if needed.
14159         Error if platform name is unknown.
14161 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
14163         PR target/84089
14164         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14166 2018-02-01  Jeff Law  <law@redhat.com>
14168         PR target/84128
14169         * config/i386/i386.c (release_scratch_register_on_entry): Add new
14170         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
14171         the scratch if RELEASE_VIA_POP is false.
14172         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14173         If we have to save a temporary register, decrement SIZE appropriately.
14174         Pass new arguments to release_scratch_register_on_entry.
14175         (ix86_adjust_stack_and_probe): Likewise.
14176         (ix86_emit_probe_stack_range): Pass new arguments to
14177         release_scratch_register_on_entry.
14179 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
14181         PR rtl-optimization/84157
14182         * combine.c (change_zero_ext): Use REG_P predicate in
14183         front of HARD_REGISTER_P predicate.
14185 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
14187         * config/avr/avr.c (avr_option_override): Move disabling of
14188         -fdelete-null-pointer-checks to...
14189         * common/config/avr/avr-common.c (avr_option_optimization_table):
14190         ...here.
14192 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14194         PR tree-optimization/81635
14195         * tree-data-ref.c (split_constant_offset_1): For types that
14196         wrap on overflow, try to use range info to prove that wrapping
14197         cannot occur.
14199 2018-02-01  Renlin Li  <renlin.li@arm.com>
14201         PR target/83370
14202         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14203         TAILCALL_ADDR_REGS.
14204         (aarch64_register_move_cost): Likewise.
14205         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14206         TAILCALL_ADDR_REGS.
14207         (REG_CLASS_NAMES): Likewise.
14208         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14209         TAILCALL_ADDR_REGS. Remove IP registers.
14210         * config/aarch64/aarch64.md (Ucs): Update register constraint.
14212 2018-02-01  Richard Biener  <rguenther@suse.de>
14214         * domwalk.h (dom_walker::dom_walker): Add additional constructor
14215         for specifying RPO order and allow NULL for that.
14216         * domwalk.c (dom_walker::dom_walker): Likewise.
14217         (dom_walker::walk): Handle NULL RPO order.
14218         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14219         in RPO order.
14220         (rewrite_update_dom_walker): Likewise.
14221         (mark_def_dom_walker): Likewise.
14223 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14225         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14226         (aarch64_maybe_expand_sve_subreg_move): Declare.
14227         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14228         * config/aarch64/predicates.md (aarch64_any_register_operand): New
14229         predicate.
14230         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14231         that are semantically a reverse operation.
14232         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14233         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14234         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14235         functions.
14236         (aarch64_can_change_mode_class): For big-endian, forbid changes
14237         between two SVE modes if they have different element sizes.
14239 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14241         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14242         the TImode handling for big-endian targets.
14244 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14246         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14247         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
14248         not just bytes.
14249         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14250         Remove BSWAP handing for big-endian targets and use the form of
14251         LD1RQ appropariate for the mode.
14253 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14255         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14256         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14257         duplicated element.
14259 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14261         PR tearget/83845
14262         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14263         check for operands that need to go through aarch64_sve_reload_be.
14265 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
14267         PR tree-optimization/81661
14268         PR tree-optimization/84117
14269         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14270         * tree-eh.c: Include gimplify.h.
14271         (find_trapping_overflow, replace_trapping_overflow,
14272         rewrite_to_non_trapping_overflow): New functions.
14273         * tree-vect-loop.c: Include tree-eh.h.
14274         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14275         * tree-data-ref.c: Include tree-eh.h.
14276         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14278 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
14280         PR rtl-optimization/84123
14281         * combine.c (change_zero_ext): Check if hard register satisfies
14282         can_change_dest_mode before calling gen_lowpart_SUBREG.
14284 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
14286         PR target/82444
14287         * ira.c (ira_init_register_move_cost): Remove assert.
14289 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14291         PR rtl-optimization/84071
14292         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14293         * doc/tm.texi: Regenerate.
14295 2018-01-31  Richard Biener  <rguenther@suse.de>
14297         PR tree-optimization/84132
14298         * tree-data-ref.c (analyze_miv_subscript): Properly
14299         check whether evolution_function_is_affine_multivariate_p
14300         before calling gcd_of_steps_may_divide_p.
14302 2018-01-31  Julia Koval  <julia.koval@intel.com>
14304         PR target/83618
14305         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14306         * config/i386/i386.md (rdpid_rex64) New.
14307         (rdpid): Make 32bit only.
14309 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
14311         PR lto/84105
14312         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14313         an IDENTIFIER_NODE for FUNCTION_TYPE's.
14315 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14317         Revert
14318         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14320         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14322 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14324         PR rtl-optimization/84071
14325         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14326         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14328 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14330         * config/arc/arc.c (arc_handle_aux_attribute): New function.
14331         (arc_attribute_table): Add 'aux' attribute.
14332         (arc_in_small_data_p): Consider aux like variables.
14333         (arc_is_aux_reg_p): New function.
14334         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14335         (arc_get_aux_arg): New function.
14336         (prepare_move_operands): Handle aux-register access.
14337         (arc_handle_aux_attribute): New function.
14338         * doc/extend.texi (ARC Variable attributes): Add subsection.
14340 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14342         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14343         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14344         (arc_attribute_table): Add 'uncached' attribute.
14345         (arc_print_operand): Print '.di' flag for uncached memory
14346         accesses.
14347         (arc_in_small_data_p): Do not consider for small data the uncached
14348         types.
14349         (arc_is_uncached_mem_p): New function.
14350         * config/arc/predicates.md (compact_store_memory_operand): Check
14351         for uncached memory accesses.
14352         (nonvol_nonimm_operand): Likewise.
14353         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14355 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
14357         PR c/84100
14358         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14359         falign-loops=): Add Optimization flag.
14361 2018-01-30  Jeff Law  <law@redhat.com>
14363         PR target/84064
14364         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14365         INT_REGISTERS_SAVED.  Check it prior to calling
14366         get_scratch_register_on_entry.
14367         (ix86_adjust_stack_and_probe): Similarly.
14368         (ix86_emit_probe_stack_range): Similarly.
14369         (ix86_expand_prologue): Corresponding changes.
14371 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14373         PR target/40411
14374         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14375         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14377 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
14379         PR target/84112
14380         * lra-constraints.c (curr_insn_transform): Process AND in the
14381         address.
14383 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
14385         PR rtl-optimization/83986
14386         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14387         dependence against last_pending_memory_flush in addition to
14388         pending_jump_insns.
14390 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
14392         PR tree-optimization/81611
14393         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14394         copies.
14396 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14398         PR target/83758
14399         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14400         a reg rtx.
14402 2018-01-30  Richard Biener  <rguenther@suse.de>
14403             Jakub Jelinek  <jakub@redhat.com>
14405         PR tree-optimization/84111
14406         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14407         inner loops added during recursion, as they don't have up-to-date
14408         SSA form.
14410 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14412         PR ipa/81360
14413         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14414         (can_inline_edge_by_limits_p): ... here.
14415         (can_early_inline_edge_p, check_callers,
14416         update_caller_keys, update_callee_keys, recursive_inlining,
14417         add_new_edges_to_heap, speculation_useful_p,
14418         inline_small_functions,
14419         inline_small_functions, flatten_function,
14420         inline_to_all_callers_1): Update.
14422 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14424         * profile-count.c (profile_count::combine_with_ipa_count): Handle
14425         zeros correctly.
14427 2018-01-30  Richard Biener  <rguenther@suse.de>
14429         PR tree-optimization/83008
14430         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14431         invariant and constant vector uses in stmts when they need
14432         more than one stmt.
14434 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14436         PR bootstrap/84017
14437         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14438         * configure: Regenerate.
14440 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14442         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14443         pattern.
14444         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14445         Use gen_rtx_REG rather than gen_lowpart.
14447 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14449         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14450         rather than 0 when creating partial subregs.
14452 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14454         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14455         of usage.
14457 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
14459         PR target/81550
14460         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14461         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14462         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14463         flags.  This restores the settings used before the 2017-07-24.
14464         Turning off pre increment/decrement/modify allows IVOPTS to
14465         optimize DF/SF loops where the index is an int.
14467 2018-01-29  Richard Biener  <rguenther@suse.de>
14468             Kelvin Nilsen  <kelvin@gcc.gnu.org>
14470         PR bootstrap/80867
14471         * tree-vect-stmts.c (vectorizable_call): Don't call
14472         targetm.vectorize_builtin_md_vectorized_function if callee is
14473         NULL.
14475 2018-01-22  Carl Love  <cel@us.ibm.com>
14477         * doc/extend.tex: Fix typo in second arg in
14478         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14480 2018-01-29  Richard Biener  <rguenther@suse.de>
14482         PR tree-optimization/84086
14483         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14484         (flush_ssaname_freelist): When SSA names were released reset
14485         the SCEV hash table.
14487 2018-01-29  Richard Biener  <rguenther@suse.de>
14489         PR tree-optimization/84057
14490         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14491         removed paths when removing edges.
14493 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
14495         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14496         -mfunction-return=@var{choice}.
14498 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14500         PR diagnostic/84034
14501         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14502         Handle CR like TAB.
14503         (layout::print_source_line): Likewise.
14504         (test_get_line_width_without_trailing_whitespace): Add test cases.
14506 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
14508         PR middle-end/84040
14509         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14510         debug insns.
14512 2018-01-26  Jim Wilson  <jimw@sifive.com>
14514         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14516         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14517         specified.
14519 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14521         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14522         and CMP + SUB-immediate -> SUBS.
14524 2018-01-26  Martin Sebor  <msebor@redhat.com>
14526         PR tree-optimization/83896
14527         * tree-ssa-strlen.c (get_string_len): Rename...
14528         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
14529         Avoid assuming length is constant.
14530         (handle_char_store): Use HOST_WIDE_INT for string length.
14532 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
14534         PR target/81763
14535         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14536         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14538 2018-01-26  Richard Biener  <rguenther@suse.de>
14540         PR rtl-optimization/84003
14541         * dse.c (record_store): Only record redundant stores when
14542         the earlier store aliases at least all accesses the later one does.
14544 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
14546         PR rtl-optimization/83985
14547         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14548         REG_CFA_RESTORE insns.
14549         (delete_unmarked_insns): Don't ignore separate shrink wrapping
14550         REG_CFA_RESTORE insns here.
14552         PR c/83989
14553         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14554         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14556 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14558         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14559         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14560         (arc_init): Likewise.
14561         (arc_override_options): Likewise.
14562         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14563         value.
14564         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14565         support.
14566         * config/arc/arc.h (TARGET_DBNZ): Define.
14567         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14568         properly set the tune attribute.
14569         (dbnz): Use TARGET_DBNZ guard.
14570         * config/arc/arc.opt (mtune): Add core3 option.
14572 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14574         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14575         recognize new pic like addresses.
14576         (arc_delegitimize_address): Clean up.
14578 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14580         * config/arc/arc-arches.def: Option mrf16 valid for all
14581         architectures.
14582         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14583         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14584         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14585         * config/arc/arc-tables.opt: Regenerate.
14586         * config/arc/arc.c (arc_conditional_register_usage): Handle
14587         reduced register file case.
14588         (arc_file_start): Set must have build attributes.
14589         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14590         mrf16 option value.
14591         * config/arc/arc.opt (mrf16): Add new option.
14592         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14593         * config/arc/genmultilib.awk: Handle new mrf16 option.
14594         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14595         * config/arc/t-multilib: Regenerate.
14596         * doc/invoke.texi (ARC Options): Document mrf16 option.
14598 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14600         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14601         * config/arc/arc.c (arc_handle_secure_attribute): New function.
14602         (arc_attribute_table): Add 'secure_call' attribute.
14603         (arc_print_operand): Print secure call operand.
14604         (arc_function_ok_for_sibcall): Don't optimize tail calls when
14605         secure.
14606         (arc_is_secure_call_p): New function.  * config/arc/arc.md
14607         (call_i): Add support for sjli instruction.
14608         (call_value_i): Likewise.
14609         * config/arc/constraints.md (Csc): New constraint.
14611 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14612             John Eric Martin  <John.Martin@emmicro-us.com>
14614         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14615         * config/arc/arc.c (_arc_jli_section): New struct.
14616         (arc_jli_section): New type.
14617         (rc_jli_sections): New static variable.
14618         (arc_handle_jli_attribute): New function.
14619         (arc_attribute_table): Add jli_always and jli_fixed attribute.
14620         (arc_file_end): New function.
14621         (TARGET_ASM_FILE_END): Define.
14622         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14623         (arc_add_jli_section): New function.
14624         (jli_call_scan): Likewise.
14625         (arc_reorg): Call jli_call_scan.
14626         (arc_output_addsi): Remove 'S' from printing asm operand.
14627         (arc_is_jli_call_p): New function.
14628         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14629         operand.
14630         (movhi_insn): Likewise.
14631         (movsi_insn): Likewise.
14632         (movsi_set_cc_insn): Likewise.
14633         (loadqi_update): Likewise.
14634         (load_zeroextendqisi_update): Likewise.
14635         (load_signextendqisi_update): Likewise.
14636         (loadhi_update): Likewise.
14637         (load_zeroextendhisi_update): Likewise.
14638         (load_signextendhisi_update): Likewise.
14639         (loadsi_update): Likewise.
14640         (loadsf_update): Likewise.
14641         (movsicc_insn): Likewise.
14642         (bset_insn): Likewise.
14643         (bxor_insn): Likewise.
14644         (bclr_insn): Likewise.
14645         (bmsk_insn): Likewise.
14646         (bicsi3_insn): Likewise.
14647         (cmpsi_cc_c_insn): Likewise.
14648         (movsi_ne): Likewise.
14649         (movsi_cond_exec): Likewise.
14650         (clrsbsi2): Likewise.
14651         (norm_f): Likewise.
14652         (normw): Likewise.
14653         (swap): Likewise.
14654         (divaw): Likewise.
14655         (flag): Likewise.
14656         (sr): Likewise.
14657         (kflag): Likewise.
14658         (ffs): Likewise.
14659         (ffs_f): Likewise.
14660         (fls): Likewise.
14661         (call_i): Remove 'S' asm letter, add jli instruction.
14662         (call_value_i): Likewise.
14663         * config/arc/arc.op (mjli-always): New option.
14664         * config/arc/constraints.md (Cji): New constraint.
14665         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14666         operand.
14667         (subsf3_fpx): Likewise.
14668         (mulsf3_fpx): Likewise.
14669         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14670         asm operand.
14671         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14672         function attrbutes.
14673         * doc/invoke.texi (ARC): Document mjli-always option.
14675 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
14677         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14678         avoid addition with 0 and use incw and decw where possible.
14680 2018-01-26  Richard Biener  <rguenther@suse.de>
14682         PR tree-optimization/81082
14683         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14684         association if it requires casting to unsigned.
14685         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14686         from fold_plusminus_mult_expr to catch important cases late when
14687         range info is available.
14689 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14691         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14692         * configure.ac (hidden_linkonce): New test.
14693         * configure: Regenerate.
14694         * config.in: Regenerate.
14696 2018-01-26  Julia Koval  <julia.koval@intel.com>
14698         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14699         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14700         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14701         _mm_mask_bitshuffle_epi64_mask): Fix type.
14702         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14703         USI_FTYPE_V4DI_V4DI_USI): Remove.
14704         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14705         __builtin_ia32_vpshufbitqmb256_mask,
14706         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14707         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14708         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14710 2018-01-26  Alan Modra  <amodra@gmail.com>
14712         PR target/84033
14713         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14714         UNSPEC_VBPERMQ.  Sort other unspecs.
14716 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
14718         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14720 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
14722         PR middle-end/83055
14723         * predict.c (drop_profile): Do not push/pop cfun; update also
14724         node->count.
14725         (handle_missing_profiles): Fix logic looking for zero profiles.
14727 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
14729         PR middle-end/83977
14730         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14731         on functions with #pragma omp declare simd or functions with simd
14732         attribute.
14733         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14734         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14735         Remove trailing \n from warning_at calls.
14737 2018-01-25  Tom de Vries  <tom@codesourcery.com>
14739         PR target/84028
14740         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14741         for neutered workers.
14743 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
14745         PR target/68467
14746         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14747         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14749 2018-01-24  Jeff Law  <law@redhat.com>
14751         PR target/83994
14752         * i386.c (get_probe_interval): Move to earlier point.
14753         (ix86_compute_frame_layout): If -fstack-clash-protection and
14754         the frame is larger than the probe interval, then use pushes
14755         to save registers rather than reg->mem moves.
14756         (ix86_expand_prologue): Remove conditional for int_registers_saved
14757         assertion.
14759 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
14761         PR target/84014
14762         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14763         min/max for never referenced object.
14765 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
14767         PR middle-end/83977
14768         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14769         here.
14770         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14771         attributes from DECL_ATTRIBUTES (decl) without affecting
14772         DECL_ATTRIBUTES (current_function_decl).
14773         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14774         functions with non-NULL DECL_ABSTRACT_ORIGIN.
14776 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
14778         PR tree-optimization/83979
14779         * fold-const.c (fold_comparison): Use constant_boolean_node
14780         instead of boolean_{true,false}_node.
14782 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
14784         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14785         with zero counts.
14787 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14789         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14790         Simplify the clause that sets the length attribute.
14791         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14792         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14793         clause that sets the length attribute.
14794         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14796 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14798         PR target/83589
14799         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14800         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14801         Add strict parameter.
14802         (prevent_branch_around_nothing): Insert dummy insn between branch to
14803         label and label with no ptx insn inbetween.
14804         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14806 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14808         PR target/81352
14809         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14810         for neutered threads in warp.
14811         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14813 2018-01-24  Richard Biener  <rguenther@suse.de>
14815         PR tree-optimization/83176
14816         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14817         operands.
14819 2018-01-24  Richard Biener  <rguenther@suse.de>
14821         PR tree-optimization/82819
14822         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14823         code generating pluses that are no-ops in the target precision.
14825 2018-01-24  Richard Biener  <rguenther@suse.de>
14827         PR middle-end/84000
14828         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14830 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14832         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14833         to merge probabilities.
14834         * predict.c (probably_never_executed): Also mark as cold functions
14835         with global 0 profile and guessed local profile.
14836         * profile-count.c (profile_probability::combine_with_count): New
14837         member function.
14838         * profile-count.h (profile_probability::operator*,
14839         profile_probability::operator*=, profile_probability::operator/,
14840         profile_probability::operator/=): Reduce precision to adjusted
14841         and set value to guessed on contradictory divisions.
14842         (profile_probability::combine_with_freq): Remove.
14843         (profile_probability::combine_wiht_count): Declare.
14844         (profile_count::force_nonzero):: Set to adjusted.
14845         (profile_count::probability_in):: Set quality to adjusted.
14846         * tree-ssa-tail-merge.c (replace_block_by): Use
14847         combine_with_count.
14849 2018-01-23  Andrew Waterman  <andrew@sifive.com>
14850             Jim Wilson  <jimw@sifive.com>
14852         * config/riscv/riscv.c (riscv_stack_boundary): New.
14853         (riscv_option_override): Set riscv_stack_boundary.  Handle
14854         riscv_preferred_stack_boundary_arg.
14855         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14856         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14857         (STACK_BOUNDARY): Set to riscv_stack_boundary.
14858         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14859         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14860         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14862 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
14864         PR target/83905
14865         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14866         of struct ix86_frame.
14867         (ix86_expand_epilogue): Likewise.  Add a local variable for
14868         the reg_save_offset field in struct ix86_frame.
14870 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
14872         PR tree-optimization/82604
14873         * tree-loop-distribution.c (enum partition_kind): New enum item
14874         PKIND_PARTIAL_MEMSET.
14875         (partition_builtin_p): Support above new enum item.
14876         (generate_code_for_partition): Ditto.
14877         (compute_access_range): Differentiate cases that equality can be
14878         proven at all loops, the innermost loops or no loops.
14879         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14880         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
14881         (finalize_partitions, distribute_loop): Don't fuse partition of
14882         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14883         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14884         parloop is enabled.
14886 2018-01-23  Martin Liska  <mliska@suse.cz>
14888         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14889         order to ignore the predictor.
14890         (PRED_POLYMORPHIC_CALL): Likewise.
14891         (PRED_RECURSIVE_CALL): Likewise.
14893 2018-01-23  Martin Liska  <mliska@suse.cz>
14895         * tree-profile.c (tree_profiling): Print function header to
14896         aware reader which function we are working on.
14897         * value-prof.c (gimple_find_values_to_profile): Do not print
14898         not interesting value histograms.
14900 2018-01-23  Martin Liska  <mliska@suse.cz>
14902         * profile-count.h (enum profile_quality): Add
14903         profile_uninitialized as the first value. Do not number values
14904         as they are zero based.
14905         (profile_count::verify): Update sanity check.
14906         (profile_probability::verify): Likewise.
14908 2018-01-23  Nathan Sidwell  <nathan@acm.org>
14910         * doc/invoke.texi (ffor-scope): Deprecate.
14912 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14914         PR tree-optimization/83510
14915         * domwalk.c (set_all_edges_as_executable): New function.
14916         (dom_walker::dom_walker): Convert bool param
14917         "skip_unreachable_blocks" to enum reachability.  Move setup of
14918         edge flags to set_all_edges_as_executable and only do it when
14919         reachability is REACHABLE_BLOCKS.
14920         * domwalk.h (enum dom_walker::reachability): New enum.
14921         (dom_walker::dom_walker): Convert bool param
14922         "skip_unreachable_blocks" to enum reachability.
14923         (set_all_edges_as_executable): New decl.
14924         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
14925         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14926         "reachability".
14927         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14928         but converting true to REACHABLE_BLOCKS.
14929         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14930         * tree-vrp.c
14931         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14932         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14933         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14934         REACHABLE_BLOCKS.
14935         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14936         if check_all_array_refs will be called.
14938 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14940         * tree.c (selftest::test_location_wrappers): Add more test
14941         coverage.
14943 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14945         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14946         (selftest::test_bit_in_range): Likewise.
14948 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14950         PR testsuite/83888
14951         * doc/sourcebuild.texi (vect_float): Say that the selector
14952         only describes the situation when -funsafe-math-optimizations is on.
14953         (vect_float_strict): Document.
14955 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14957         PR tree-optimization/83965
14958         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14959         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14960         instead of checking only for a reduction.
14961         (vect_recog_widen_sum_pattern): Likewise.
14963 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14965         * predict.c (probably_never_executed): Only use precise profile info.
14966         (compute_function_frequency): Skip after inlining hack since we now
14967         have quality checking.
14969 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14971         * profile-count.h (profile_probability::very_unlikely,
14972         profile_probability::unlikely, profile_probability::even): Set
14973         precision to guessed.
14975 2018-01-23  Richard Biener  <rguenther@suse.de>
14977         PR tree-optimization/83963
14978         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14979         Properly terminate dominator walk when crossing the exit edge not
14980         when visiting its source block.
14982 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
14984         PR c++/83918
14985         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14986         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14988 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
14990         PR tree-optimization/83957
14991         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
14992         semicolon after for body surrounded by braces.
14994         PR tree-optimization/83081
14995         * profile-count.h (profile_probability::split): New method.
14996         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14997         Use profile_probability::split.
14998         (do_compare_rtx_and_jump): Fix adjustment of probabilities
14999         when splitting a single conditional jump into 2.
15001 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
15003         PR tree-optimization/69452
15004         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15005         decl.
15007 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15009         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15010         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15011         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15013 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15015         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15016         declaration.
15017         * config/rl78/rl78.md (movdi): New define_expand.
15018         * config/rl78/rl78.c (rl78_split_movdi): New function.
15020 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
15022         PR target/83862
15023         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15024         no longer used.
15025         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15026         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15027         128-bit to produce an UNSPEC move to get the double word with the
15028         signbit and then a shift directly to do signbit.
15029         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15030         implementation with a new version that just does either a direct
15031         move or a regular move.  Move memory interface to separate insns.
15032         Move insns so they are next to the expander.
15033         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15034         with signbit move.  Split big and little endian case.
15035         (signbit<mode>2_dm_mem_le): Likewise.
15036         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15037         (signbit<mode>2_dm2): Likewise.
15039 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15041         * config/rl78/rl78.md (anddi3): New define_expand.
15043 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15045         * config/rl78/rl78.md (umindi3): New define_expand.
15047 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15049         * config/rl78/rl78.md (smindi3): New define_expand.
15051 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15053         * config/rl78/rl78.md (smaxdi3): New define_expand.
15055 2018-01-22  Carl Love  <cel@us.ibm.com>
15057         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15058         LVX_V1TI): Add macro expansion.
15059         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15060         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15061         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15062         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15063         Change check to determine if the instruction is a byte reversing
15064         entry.  Fix typo in comment.
15065         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15066         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15067         Add def_builtin calls for new builtins.
15068         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15069         Add define_insn expansion.
15071 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15073         * config/rl78/rl78.md (umaxdi3): New define_expand.
15075 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15077         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15078         for non-QImode registers.
15080 2018-01-22  Richard Biener  <rguenther@suse.de>
15082         PR tree-optimization/83963
15083         * graphite-scop-detection.c (scop_detection::get_sese): Delay
15084         including the loop exit block.
15085         (scop_detection::merge_sese): Likewise.
15086         (scop_detection::add_scop): Do it here instead.
15088 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15090         * doc/sourcebuild.texi (arm_softfloat): Document.
15092 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
15094         PR gcc/77734
15095         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15096         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15097         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15099 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15100             David Edelsohn  <dje.gcc@gmail.com>
15102         PR target/83946
15103         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15104         Change "crset eq" to "crset 2".
15105         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15106         (*call_indirect_aix<mode>_nospec): Likewise.
15107         (*call_value_indirect_aix<mode>_nospec): Likewise.
15108         (*call_indirect_elfv2<mode>_nospec): Likewise.
15109         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15110         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15111         change assembly output from . to $.
15112         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15113         (indirect_jump<mode>_nospec): Change assembly output from . to $.
15114         (*tablejump<mode>_internal1_nospec): Likewise.
15116 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
15118         PR target/80870
15119         * config/sh/sh_optimize_sett_clrt.cc:
15120         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15122 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
15124         PR tree-optimization/83940
15125         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15126         offset_dt to vect_constant_def rather than vect_unknown_def_type.
15127         (vect_check_load_store_mask): Add a mask_dt_out parameter and
15128         use it to pass back the definition type.
15129         (vect_check_store_rhs): Likewise rhs_dt_out.
15130         (vect_build_gather_load_calls): Add a mask_dt argument and use
15131         it instead of a call to vect_is_simple_use.
15132         (vectorizable_store): Update calls to vect_check_load_store_mask
15133         and vect_check_store_rhs.  Use the dt returned by the latter instead
15134         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
15135         instead of calls to vect_is_simple_use.  Pass the scalar rather
15136         than the vector operand to vect_is_simple_use when handling
15137         second and subsequent copies of an rhs value.
15138         (vectorizable_load): Update calls to vect_check_load_store_mask
15139         and vect_build_gather_load_calls.  Use the cached mask_dt and
15140         gs_info.offset_dt instead of calls to vect_is_simple_use.
15142 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
15144         PR middle-end/83945
15145         * tree-emutls.c: Include gimplify.h.
15146         (lower_emutls_2): New function.
15147         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15148         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15149         it before further processing.
15151         PR target/83930
15152         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15153         UINTVAL (trueop1) instead of INTVAL (op1).
15155 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
15157         PR debug/81570
15158         PR debug/83728
15159         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15160         INCOMING_FRAME_SP_OFFSET if not defined.
15161         (scan_trace): Add ENTRY argument.  If true and
15162         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15163         emit a note to adjust the CFA offset.
15164         (create_cfi_notes): Adjust scan_trace callers.
15165         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15166         INCOMING_FRAME_SP_OFFSET in the CIE.
15167         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15168         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15169         Likewise.
15170         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15171         * doc/tm.texi: Regenerated.
15173 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15175         PR rtl-optimization/83147
15176         * lra-constraints.c (remove_inheritance_pseudos): Use
15177         lra_substitute_pseudo_within_insn.
15179 2018-01-19  Tom de Vries  <tom@codesourcery.com>
15180             Cesar Philippidis  <cesar@codesourcery.com>
15182         PR target/83920
15183         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15185 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
15187         PR target/83790
15188         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15189         spaces for function labels.
15191 2018-01-19  Martin Liska  <mliska@suse.cz>
15193         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15194         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15195         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15196         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15197         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15198         (PRED_CONST_RETURN): Change from 69 to 65.
15199         (PRED_NULL_RETURN): Change from 91 to 71.
15200         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15201         (PRED_LOOP_GUARD): Change from 66 to 73.
15203 2018-01-19  Martin Liska  <mliska@suse.cz>
15205         * predict.c (predict_insn_def): Add new assert.
15206         (struct branch_predictor): Change type to signed integer.
15207         (test_prediction_value_range): Amend test to cover
15208         PROB_UNINITIALIZED.
15209         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15210         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15211         (PRED_LOOP_ITERATIONS_MAX): Likewise.
15212         (PRED_LOOP_IV_COMPARE): Likewise.
15213         * predict.h (PROB_UNINITIALIZED): Define new constant.
15215 2018-01-19  Martin Liska  <mliska@suse.cz>
15217         * predict.c (dump_prediction): Add new format for
15218         analyze_brprob.py script which is enabled with -details
15219         suboption.
15220         * profile-count.h (precise_p): New function.
15222 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15224         PR tree-optimization/83922
15225         * tree-vect-loop.c (vect_verify_full_masking): Return false if
15226         there are no statements that need masking.
15227         (vect_active_double_reduction_p): New function.
15228         (vect_analyze_loop_operations): Use it when handling phis that
15229         are not in the loop header.
15231 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15233         PR tree-optimization/83914
15234         * tree-vect-loop.c (vectorizable_induction): Don't convert
15235         init_expr or apply the peeling adjustment for inductions
15236         that are nested within the vectorized loop.
15238 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15240         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15241         instead of NEG.
15243 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15245         PR sanitizer/81715
15246         PR testsuite/83882
15247         * function.h (gimplify_parameters): Add gimple_seq * argument.
15248         * function.c: Include gimple.h and options.h.
15249         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15250         for the added local temporaries if needed.
15251         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15252         if there are any parameter cleanups, wrap whole body into a
15253         try/finally with the cleanups.
15255 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
15257         PR target/82964
15258         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15259         Use GET_MODE_CLASS for scalar floating point.
15261 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15263         PR ipa/82256
15264         patch by PaX Team
15265         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15266         Fix call of call_cgraph_insertion_hooks.
15268 2018-01-18  Martin Sebor  <msebor@redhat.com>
15270         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15272 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15274         PR ipa/83619
15275         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15276         frequencies.
15278 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
15280         PR other/70268
15281         * common.opt: (-ffile-prefix-map): New option.
15282         * opts.c (common_handle_option): Defer it.
15283         * opts-global.c (handle_common_deferred_options): Handle it.
15284         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15285         * file-prefix-map.h: New file.
15286         (remap_debug_filename, add_debug_prefix_map): ...here.
15287         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15288         * final.c (debug_prefix_map, add_debug_prefix_map
15289         remap_debug_filename): Move to...
15290         * file-prefix-map.c: New file.
15291         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15292         generalize, get rid of alloca(), use strrchr() instead of strchr().
15293         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15294         Implement in terms of add_prefix_map().
15295         (remap_macro_filename, remap_debug_filename): Implement in term of
15296         remap_filename().
15297         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15298         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15299         * dbxout.c: Include file-prefix-map.h.
15300         * varasm.c: Likewise.
15301         * vmsdbgout.c: Likewise.
15302         * xcoffout.c: Likewise.
15303         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15304         * doc/cppopts.texi (-fmacro-prefix-map): Document.
15305         * doc/invoke.texi (-ffile-prefix-map): Document.
15306         (-fdebug-prefix-map): Update description.
15308 2018-01-18  Martin Liska  <mliska@suse.cz>
15310         * config/i386/i386.c (indirect_thunk_name): Document that also
15311         lfence is emitted.
15312         (output_indirect_thunk): Document why both instructions
15313         (pause and lfence) are generated.
15315 2018-01-18  Richard Biener  <rguenther@suse.de>
15317         PR tree-optimization/83887
15318         * graphite-scop-detection.c
15319         (scop_detection::get_nearest_dom_with_single_entry): Remove.
15320         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15321         (scop_detection::merge_sese): Re-implement with a flood-fill
15322         algorithm that properly finds a SESE region if it exists.
15324 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15326         PR c/61240
15327         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15328         pointer_diff optimizations use view_convert instead of convert.
15330 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15332         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15333         Generate different code for -mno-speculate-indirect-jumps.
15334         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15335         (*call_indirect_aix<mode>): Disable for
15336         -mno-speculate-indirect-jumps.
15337         (*call_indirect_aix<mode>_nospec): New define_insn.
15338         (*call_value_indirect_aix<mode>): Disable for
15339         -mno-speculate-indirect-jumps.
15340         (*call_value_indirect_aix<mode>_nospec): New define_insn.
15341         (*sibcall_nonlocal_sysv<mode>): Generate different code for
15342         -mno-speculate-indirect-jumps.
15343         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15345 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
15347         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15348         long double type, set the flags for noting the default long double
15349         type, even if we don't pass or return a long double type.
15351 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
15353         PR ipa/83051
15354         * ipa-inline.c (flatten_function): Do not overwrite final inlining
15355         failure.
15357 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
15359         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15360         support for merge[hl].
15361         (fold_mergehl_helper): New helper function.
15362         (tree-vector-builder.h): New #include for tree_vector_builder usage.
15363         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15364         (altivec_vmrglw_direct): Add xxmrglw insn.
15366 2018-01-17  Andrew Waterman  <andrew@sifive.com>
15368         * config/riscv/riscv.c (riscv_conditional_register_usage): If
15369         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15371 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
15373         PR lto/83121
15374         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15375         call the lto_location_cache before reading the
15376         DECL_SOURCE_LOCATION of the types.
15378 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
15379             Richard Sandiford  <richard.sandiford@linaro.org>
15381         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15382         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15383         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15384         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15385         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15386         Add declaration.
15387         * config/aarch64/constraints.md (aarch64_movti_operand):
15388         Limit immediates.
15389         * config/aarch64/predicates.md (Uti): Add new constraint.
15391 2018-01-17 Carl Love  <cel@us.ibm.com>
15393         * config/rs6000/vsx.md (define_expand xl_len_r,
15394         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15395         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15396         lxvll.
15397         (define_expand, define_insn): Move the shift left from  the
15398         define_insn to the define_expand for lxvl and stxvl instructions.
15399         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15400         and XL_LEN_R definitions to PURE.
15402 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
15404         * config/i386/i386.c (indirect_thunk_name): Declare regno
15405         as unsigned int.  Compare regno with INVALID_REGNUM.
15406         (output_indirect_thunk): Ditto.
15407         (output_indirect_thunk_function): Ditto.
15408         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
15409         in the call to output_indirect_thunk_function.
15411 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
15413         PR middle-end/83884
15414         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15415         rather than the size of inner_type to determine the stack slot size
15416         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15418 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
15420         PR target/83546
15421         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15422         to PTA_SILVERMONT.
15424 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
15426         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15427         endian Linux systems to optionally enable multilibs for selecting
15428         the long double type if the user configured an explicit type.
15429         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15430         have no long double multilibs if not defined.
15431         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15432         warn if the user used -mabi={ieee,ibm}longdouble and we built
15433         multilibs for long double.
15434         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15435         appropriate multilib option.
15436         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15437         multilib options.
15438         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15439         for building long double multilibs.
15440         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15442 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
15444         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15445         copies.
15447         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15448         64 bits.
15449         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15450         128 bits.
15452         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15453         variables.
15455         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15456         return value.
15458 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
15460         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15461         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15463 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15465         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15466         different rtl trees depending on TARGET_64BIT.
15467         (rs6000_gen_lvx): Likewise.
15469 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
15471         * config/visium/visium.md (nop): Tweak comment.
15472         (hazard_nop): Likewise.
15474 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15476         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15477         -mspeculate-indirect-jumps.
15478         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15479         for -mno-speculate-indirect-jumps.
15480         (*call_indirect_elfv2<mode>_nospec): New define_insn.
15481         (*call_value_indirect_elfv2<mode>): Disable for
15482         -mno-speculate-indirect-jumps.
15483         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15484         (indirect_jump): Emit different RTL for
15485         -mno-speculate-indirect-jumps.
15486         (*indirect_jump<mode>): Disable for
15487         -mno-speculate-indirect-jumps.
15488         (*indirect_jump<mode>_nospec): New define_insn.
15489         (tablejump): Emit different RTL for
15490         -mno-speculate-indirect-jumps.
15491         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15492         (tablejumpsi_nospec): New define_expand.
15493         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15494         (tablejumpdi_nospec): New define_expand.
15495         (*tablejump<mode>_internal1): Disable for
15496         -mno-speculate-indirect-jumps.
15497         (*tablejump<mode>_internal1_nospec): New define_insn.
15498         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15499         option.
15501 2018-01-16  Artyom Skrobov tyomitch@gmail.com
15503         * caller-save.c (insert_save): Drop unnecessary parameter.  All
15504         callers updated.
15506 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15507             Richard Biener  <rguenth@suse.de>
15509         PR libgomp/83590
15510         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15511         return early, inline manually is_gimple_sizepos.  Make sure if we
15512         call gimplify_expr we don't end up with a gimple constant.
15513         * tree.c (variably_modified_type_p): Don't return true for
15514         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
15515         * gimplify.h (is_gimple_sizepos): Remove.
15517 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15519         PR tree-optimization/83857
15520         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15521         vectorizable_live_operation for pure SLP statements.
15522         (vectorizable_live_operation): Handle PHIs.
15524 2018-01-16  Richard Biener  <rguenther@suse.de>
15526         PR tree-optimization/83867
15527         * tree-vect-stmts.c (vect_transform_stmt): Precompute
15528         nested_in_vect_loop_p since the scalar stmt may get invalidated.
15530 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15532         PR c/83844
15533         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15534         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15535         If off is not INTEGER_CST, issue a may not be aligned warning
15536         rather than isn't aligned.  Use isn%'t rather than isn't.
15537         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15538         into MULT_EXPR.
15539         <case MULT_EXPR>: Improve the case when bottom and one of the
15540         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15541         operand, in that case check if the other operand is multiple of
15542         bottom divided by the INTEGER_CST operand.
15544 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15546         PR target/83858
15547         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15548         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15549         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15550         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15551         * config/pa/pa.c (pa_function_arg_advance): Likewise.
15552         (pa_function_arg, pa_arg_partial_bytes): Likewise.
15553         (pa_function_arg_size): New function.
15555 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15557         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15558         in a separate statement.
15560 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15562         PR tree-optimization/83847
15563         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15564         group gathers and scatters.
15566 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15568         PR rtl-optimization/86620
15569         * params.def (max-sched-ready-insns): Bump minimum value to 1.
15571         PR rtl-optimization/83213
15572         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15573         to last if both are JUMP_INSNs.
15575         PR tree-optimization/83843
15576         * gimple-ssa-store-merging.c
15577         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15578         store_immediate_info for bswap/nop orig_stores.
15580 2018-01-15  Andrew Waterman  <andrew@sifive.com>
15582         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15583         !TARGET_MUL.
15584         <UDIV>: Increase cost if !TARGET_DIV.
15586 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
15588         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15589         (define_attr "cr_logical_3op"): New.
15590         (cceq_ior_compare): Adjust.
15591         (cceq_ior_compare_complement): Adjust.
15592         (*cceq_rev_compare): Adjust.
15593         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15594         (is_cracked_insn): Adjust.
15595         (insn_must_be_first_in_group): Adjust.
15596         * config/rs6000/40x.md: Adjust.
15597         * config/rs6000/440.md: Adjust.
15598         * config/rs6000/476.md: Adjust.
15599         * config/rs6000/601.md: Adjust.
15600         * config/rs6000/603.md: Adjust.
15601         * config/rs6000/6xx.md: Adjust.
15602         * config/rs6000/7450.md: Adjust.
15603         * config/rs6000/7xx.md: Adjust.
15604         * config/rs6000/8540.md: Adjust.
15605         * config/rs6000/cell.md: Adjust.
15606         * config/rs6000/e300c2c3.md: Adjust.
15607         * config/rs6000/e500mc.md: Adjust.
15608         * config/rs6000/e500mc64.md: Adjust.
15609         * config/rs6000/e5500.md: Adjust.
15610         * config/rs6000/e6500.md: Adjust.
15611         * config/rs6000/mpc.md: Adjust.
15612         * config/rs6000/power4.md: Adjust.
15613         * config/rs6000/power5.md: Adjust.
15614         * config/rs6000/power6.md: Adjust.
15615         * config/rs6000/power7.md: Adjust.
15616         * config/rs6000/power8.md: Adjust.
15617         * config/rs6000/power9.md: Adjust.
15618         * config/rs6000/rs64.md: Adjust.
15619         * config/rs6000/titan.md: Adjust.
15621 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15623         * config/i386/predicates.md (indirect_branch_operand): Rewrite
15624         ix86_indirect_branch_register logic.
15626 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15628         * config/i386/constraints.md (Bs): Update
15629         ix86_indirect_branch_register check.  Don't check
15630         ix86_indirect_branch_register with GOT_memory_operand.
15631         (Bw): Likewise.
15632         * config/i386/predicates.md (GOT_memory_operand): Don't check
15633         ix86_indirect_branch_register here.
15634         (GOT32_symbol_operand): Likewise.
15636 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15638         * config/i386/predicates.md (constant_call_address_operand):
15639         Rewrite ix86_indirect_branch_register logic.
15640         (sibcall_insn_operand): Likewise.
15642 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15644         * config/i386/constraints.md (Bs): Replace
15645         ix86_indirect_branch_thunk_register with
15646         ix86_indirect_branch_register.
15647         (Bw): Likewise.
15648         * config/i386/i386.md (indirect_jump): Likewise.
15649         (tablejump): Likewise.
15650         (*sibcall_memory): Likewise.
15651         (*sibcall_value_memory): Likewise.
15652         Peepholes of indirect call and jump via memory: Likewise.
15653         * config/i386/i386.opt: Likewise.
15654         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15655         (GOT_memory_operand): Likewise.
15656         (call_insn_operand): Likewise.
15657         (sibcall_insn_operand): Likewise.
15658         (GOT32_symbol_operand): Likewise.
15660 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15662         PR middle-end/83837
15663         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15664         type rather than type addr's type points to.
15665         (expand_omp_atomic_mutex): Likewise.
15666         (expand_omp_atomic): Likewise.
15668 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15670         PR target/83839
15671         * config/i386/i386.c (output_indirect_thunk_function): Use
15672         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15673         for  __x86_return_thunk.
15675 2018-01-15  Richard Biener  <rguenther@suse.de>
15677         PR middle-end/83850
15678         * expmed.c (extract_bit_field_1): Fix typo.
15680 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15682         PR target/83687
15683         * config/arm/iterators.md (VF): New mode iterator.
15684         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15685         Remove integer-related logic from pattern.
15686         (neon_vabd<mode>_3): Likewise.
15688 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15690         PR middle-end/82694
15691         * common.opt (fstrict-overflow): No longer an alias.
15692         (fwrapv-pointer): New option.
15693         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15694         also for pointer types based on flag_wrapv_pointer.
15695         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15696         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15697         opts->x_flag_wrapv got set.
15698         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15699         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15700         POINTER_TYPE_OVERFLOW_UNDEFINED.
15701         * match.pd: Likewise in address comparison pattern.
15702         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15704 2018-01-15  Richard Biener  <rguenther@suse.de>
15706         PR lto/83804
15707         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15708         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
15709         Reset type names to their identifier if their TYPE_DECL doesn't
15710         have linkage (and thus is used for ODR and devirt).
15711         (save_debug_info_for_decl): Remove.
15712         (save_debug_info_for_type): Likewise.
15713         (add_tree_to_fld_list): Adjust.
15714         * tree-pretty-print.c (dump_generic_node): Make dumping of
15715         type names more robust.
15717 2018-01-15  Richard Biener  <rguenther@suse.de>
15719         * BASE-VER: Bump to 8.0.1.
15721 2018-01-14  Martin Sebor  <msebor@redhat.com>
15723         PR other/83508
15724         * builtins.c (check_access): Avoid warning when the no-warning bit
15725         is set.
15727 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
15729         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15730         * ira-color (allocno_hard_regs_compare): Likewise.
15732 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
15734         PR target/83013
15735         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15736         Use .pushsection/.popsection.
15738 2018-01-14  Martin Sebor  <msebor@redhat.com>
15740         PR c++/81327
15741         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15743 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
15745         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15746         entry from extra_headers.
15747         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15748         extra_headers, make the list bitwise identical to the i?86-*-* one.
15750 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15752         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15753         -mcmodel=large with -mindirect-branch=thunk,
15754         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15755         -mfunction-return=thunk-extern.
15756         * doc/invoke.texi: Document -mcmodel=large is incompatible with
15757         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15758         -mfunction-return=thunk and -mfunction-return=thunk-extern.
15760 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15762         * config/i386/i386.c (print_reg): Print the name of the full
15763         integer register without '%'.
15764         (ix86_print_operand): Handle 'V'.
15765         * doc/extend.texi: Document 'V' modifier.
15767 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15769         * config/i386/constraints.md (Bs): Disallow memory operand for
15770         -mindirect-branch-register.
15771         (Bw): Likewise.
15772         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15773         (GOT_memory_operand): Likewise.
15774         (call_insn_operand): Likewise.
15775         (sibcall_insn_operand): Likewise.
15776         (GOT32_symbol_operand): Likewise.
15777         * config/i386/i386.md (indirect_jump): Call convert_memory_address
15778         for -mindirect-branch-register.
15779         (tablejump): Likewise.
15780         (*sibcall_memory): Likewise.
15781         (*sibcall_value_memory): Likewise.
15782         Disallow peepholes of indirect call and jump via memory for
15783         -mindirect-branch-register.
15784         (*call_pop): Replace m with Bw.
15785         (*call_value_pop): Likewise.
15786         (*sibcall_pop_memory): Replace m with Bs.
15787         * config/i386/i386.opt (mindirect-branch-register): New option.
15788         * doc/invoke.texi: Document -mindirect-branch-register option.
15790 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15792         * config/i386/i386-protos.h (ix86_output_function_return): New.
15793         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15794         set function_return_type.
15795         (indirect_thunk_name): Add ret_p to indicate thunk for function
15796         return.
15797         (output_indirect_thunk_function): Pass false to
15798         indirect_thunk_name.
15799         (ix86_output_indirect_branch_via_reg): Likewise.
15800         (ix86_output_indirect_branch_via_push): Likewise.
15801         (output_indirect_thunk_function): Create alias for function
15802         return thunk if regno < 0.
15803         (ix86_output_function_return): New function.
15804         (ix86_handle_fndecl_attribute): Handle function_return.
15805         (ix86_attribute_table): Add function_return.
15806         * config/i386/i386.h (machine_function): Add
15807         function_return_type.
15808         * config/i386/i386.md (simple_return_internal): Use
15809         ix86_output_function_return.
15810         (simple_return_internal_long): Likewise.
15811         * config/i386/i386.opt (mfunction-return=): New option.
15812         (indirect_branch): Mention -mfunction-return=.
15813         * doc/extend.texi: Document function_return function attribute.
15814         * doc/invoke.texi: Document -mfunction-return= option.
15816 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15818         * config/i386/i386-opts.h (indirect_branch): New.
15819         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15820         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15821         with local indirect jump when converting indirect call and jump.
15822         (ix86_set_indirect_branch_type): New.
15823         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15824         (indirectlabelno): New.
15825         (indirect_thunk_needed): Likewise.
15826         (indirect_thunk_bnd_needed): Likewise.
15827         (indirect_thunks_used): Likewise.
15828         (indirect_thunks_bnd_used): Likewise.
15829         (INDIRECT_LABEL): Likewise.
15830         (indirect_thunk_name): Likewise.
15831         (output_indirect_thunk): Likewise.
15832         (output_indirect_thunk_function): Likewise.
15833         (ix86_output_indirect_branch_via_reg): Likewise.
15834         (ix86_output_indirect_branch_via_push): Likewise.
15835         (ix86_output_indirect_branch): Likewise.
15836         (ix86_output_indirect_jmp): Likewise.
15837         (ix86_code_end): Call output_indirect_thunk_function if needed.
15838         (ix86_output_call_insn): Call ix86_output_indirect_branch if
15839         needed.
15840         (ix86_handle_fndecl_attribute): Handle indirect_branch.
15841         (ix86_attribute_table): Add indirect_branch.
15842         * config/i386/i386.h (machine_function): Add indirect_branch_type
15843         and has_local_indirect_jump.
15844         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15845         to true.
15846         (tablejump): Likewise.
15847         (*indirect_jump): Use ix86_output_indirect_jmp.
15848         (*tablejump_1): Likewise.
15849         (simple_return_indirect_internal): Likewise.
15850         * config/i386/i386.opt (mindirect-branch=): New option.
15851         (indirect_branch): New.
15852         (keep): Likewise.
15853         (thunk): Likewise.
15854         (thunk-inline): Likewise.
15855         (thunk-extern): Likewise.
15856         * doc/extend.texi: Document indirect_branch function attribute.
15857         * doc/invoke.texi: Document -mindirect-branch= option.
15859 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
15861         PR ipa/83051
15862         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15864 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
15866         * ipa-inline.c (want_inline_small_function_p): Return false if
15867         inlining has already failed with CIF_FINAL_ERROR.
15868         (update_caller_keys): Call want_inline_small_function_p before
15869         can_inline_edge_p.
15870         (update_callee_keys): Likewise.
15872 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15874         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15875         New function.
15876         (rs6000_quadword_masked_address_p): Likewise.
15877         (quad_aligned_load_p): Likewise.
15878         (quad_aligned_store_p): Likewise.
15879         (const_load_sequence_p): Add comment to describe the outer-most loop.
15880         (mimic_memory_attributes_and_flags): New function.
15881         (rs6000_gen_stvx): Likewise.
15882         (replace_swapped_aligned_store): Likewise.
15883         (rs6000_gen_lvx): Likewise.
15884         (replace_swapped_aligned_load): Likewise.
15885         (replace_swapped_load_constant): Capitalize argument name in
15886         comment describing this function.
15887         (rs6000_analyze_swaps): Add a third pass to search for vector loads
15888         and stores that access quad-word aligned addresses and replace
15889         with stvx or lvx instructions when appropriate.
15890         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15891         New function prototype.
15892         (rs6000_quadword_masked_address_p): Likewise.
15893         (rs6000_gen_lvx): Likewise.
15894         (rs6000_gen_stvx): Likewise.
15895         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15896         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15897         when memory address is aligned.
15898         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15899         this split to select lvx instruction when memory address is aligned.
15900         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15901         instruction when memory address is aligned.
15902         (*vsx_le_perm_load_v16qi): Likewise.
15903         (four unnamed splitters): Modify to select the stvx instruction
15904         when memory is aligned.
15906 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
15908         * predict.c (determine_unlikely_bbs): Handle correctly BBs
15909         which appears in the queue multiple times.
15911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15912             Alan Hayward  <alan.hayward@arm.com>
15913             David Sherwood  <david.sherwood@arm.com>
15915         * tree-vectorizer.h (vec_lower_bound): New structure.
15916         (_loop_vec_info): Add check_nonzero and lower_bounds.
15917         (LOOP_VINFO_CHECK_NONZERO): New macro.
15918         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15919         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15920         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15921         fields.  Make seg_len the distance travelled, not including the
15922         access size.
15923         (dr_direction_indicator): Declare.
15924         (dr_zero_step_indicator): Likewise.
15925         (dr_known_forward_stride_p): Likewise.
15926         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15927         tree-ssanames.h.
15928         (runtime_alias_check_p): Allow runtime alias checks with
15929         variable strides.
15930         (operator ==): Compare access_size and align.
15931         (prune_runtime_alias_test_list): Rework for new distinction between
15932         the access_size and seg_len.
15933         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
15934         segment lengths.
15935         (get_segment_min_max): New function.
15936         (create_intersect_range_checks): Use it.
15937         (dr_step_indicator): New function.
15938         (dr_direction_indicator): Likewise.
15939         (dr_zero_step_indicator): Likewise.
15940         (dr_known_forward_stride_p): Likewise.
15941         * tree-loop-distribution.c (data_ref_segment_size): Return
15942         DR_STEP * (niters - 1).
15943         (compute_alias_check_pairs): Update call to the dr_with_seg_len
15944         constructor.
15945         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15946         (vect_preserves_scalar_order_p): New function, split out from...
15947         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
15948         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15949         (vect_vfa_access_size): New function.
15950         (vect_vfa_align): Likewise.
15951         (vect_compile_time_alias): Take access_size_a and access_b arguments.
15952         (dump_lower_bound): New function.
15953         (vect_check_lower_bound): Likewise.
15954         (vect_small_gap_p): Likewise.
15955         (vectorizable_with_step_bound_p): Likewise.
15956         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15957         depencies if the vectorization factor is 1.  Convert the checks
15958         for nonzero steps into checks on the bounds of DR_STEP.  Try using
15959         a bunds check for variable steps if the minimum required step is
15960         relatively small. Update calls to the dr_with_seg_len
15961         constructor and to vect_compile_time_alias.
15962         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15963         function.
15964         (vect_loop_versioning): Call it.
15965         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15966         when retrying.
15967         (vect_estimate_min_profitable_iters): Account for any bounds checks.
15969 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15970             Alan Hayward  <alan.hayward@arm.com>
15971             David Sherwood  <david.sherwood@arm.com>
15973         * doc/sourcebuild.texi (vect_scatter_store): Document.
15974         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15975         optabs.
15976         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15977         Document.
15978         * genopinit.c (main): Add supports_vec_scatter_store and
15979         supports_vec_scatter_store_cached to target_optabs.
15980         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15981         IFN_MASK_SCATTER_STORE.
15982         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15983         functions.
15984         * internal-fn.h (internal_store_fn_p): Declare.
15985         (internal_fn_stored_value_index): Likewise.
15986         * internal-fn.c (scatter_store_direct): New macro.
15987         (expand_scatter_store_optab_fn): New function.
15988         (direct_scatter_store_optab_supported_p): New macro.
15989         (internal_store_fn_p): New function.
15990         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15991         IFN_MASK_SCATTER_STORE.
15992         (internal_fn_mask_index): Likewise.
15993         (internal_fn_stored_value_index): New function.
15994         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15995         for scatter stores.
15996         * optabs-query.h (supports_vec_scatter_store_p): Declare.
15997         * optabs-query.c (supports_vec_scatter_store_p): New function.
15998         * tree-vectorizer.h (vect_get_store_rhs): Declare.
15999         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16000         true for scatter stores.
16001         (vect_gather_scatter_fn_p): Handle scatter stores too.
16002         (vect_check_gather_scatter): Consider using scatter stores if
16003         supports_vec_scatter_store_p.
16004         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16005         scatter stores too.
16006         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16007         internal_fn_stored_value_index.
16008         (check_load_store_masking): Handle scatter stores too.
16009         (vect_get_store_rhs): Make public.
16010         (vectorizable_call): Use internal_store_fn_p.
16011         (vectorizable_store): Handle scatter store internal functions.
16012         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16013         when deciding whether the end of the group has been reached.
16014         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16015         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16016         (mask_scatter_store<mode>): New insns.
16018 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16019             Alan Hayward  <alan.hayward@arm.com>
16020             David Sherwood  <david.sherwood@arm.com>
16022         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16023         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16024         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16025         function.
16026         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16027         Use vect_truncate_gather_scatter_offset if we can't treat the
16028         operation as a normal gather load or scatter store.
16029         (get_group_load_store_type): Take the gather_scatter_info
16030         as argument.  Try using a gather load or scatter store for
16031         single-element groups.
16032         (get_load_store_type): Update calls to get_group_load_store_type
16033         and vect_use_strided_gather_scatters_p.
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         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16040         optional tree argument.
16041         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16042         null target hooks.
16043         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16044         but continue to use the current value as a fallback.
16045         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16046         to compare the updates.
16047         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16048         (get_load_store_type): Use it when handling a strided access.
16049         (vect_get_strided_load_store_ops): New function.
16050         (vect_get_data_ptr_increment): Likewise.
16051         (vectorizable_load): Handle strided gather loads.  Always pass
16052         a step to vect_create_data_ref_ptr and bump_vector_ptr.
16054 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16055             Alan Hayward  <alan.hayward@arm.com>
16056             David Sherwood  <david.sherwood@arm.com>
16058         * doc/md.texi (gather_load@var{m}): Document.
16059         (mask_gather_load@var{m}): Likewise.
16060         * genopinit.c (main): Add supports_vec_gather_load and
16061         supports_vec_gather_load_cached to target_optabs.
16062         * optabs-tree.c (init_tree_optimization_optabs): Use
16063         ggc_cleared_alloc to allocate target_optabs.
16064         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16065         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16066         functions.
16067         * internal-fn.h (internal_load_fn_p): Declare.
16068         (internal_gather_scatter_fn_p): Likewise.
16069         (internal_fn_mask_index): Likewise.
16070         (internal_gather_scatter_fn_supported_p): Likewise.
16071         * internal-fn.c (gather_load_direct): New macro.
16072         (expand_gather_load_optab_fn): New function.
16073         (direct_gather_load_optab_supported_p): New macro.
16074         (direct_internal_fn_optab): New function.
16075         (internal_load_fn_p): Likewise.
16076         (internal_gather_scatter_fn_p): Likewise.
16077         (internal_fn_mask_index): Likewise.
16078         (internal_gather_scatter_fn_supported_p): Likewise.
16079         * optabs-query.c (supports_at_least_one_mode_p): New function.
16080         (supports_vec_gather_load_p): Likewise.
16081         * optabs-query.h (supports_vec_gather_load_p): Declare.
16082         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16083         and memory_type field.
16084         (NUM_PATTERNS): Bump to 15.
16085         * tree-vect-data-refs.c: Include internal-fn.h.
16086         (vect_gather_scatter_fn_p): New function.
16087         (vect_describe_gather_scatter_call): Likewise.
16088         (vect_check_gather_scatter): Try using internal functions for
16089         gather loads.  Recognize existing calls to a gather load function.
16090         (vect_analyze_data_refs): Consider using gather loads if
16091         supports_vec_gather_load_p.
16092         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16093         (vect_get_gather_scatter_offset_type): Likewise.
16094         (vect_convert_mask_for_vectype): Likewise.
16095         (vect_add_conversion_to_patterm): Likewise.
16096         (vect_try_gather_scatter_pattern): Likewise.
16097         (vect_recog_gather_scatter_pattern): New pattern recognizer.
16098         (vect_vect_recog_func_ptrs): Add it.
16099         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16100         internal_fn_mask_index and internal_gather_scatter_fn_p.
16101         (check_load_store_masking): Take the gather_scatter_info as an
16102         argument and handle gather loads.
16103         (vect_get_gather_scatter_ops): New function.
16104         (vectorizable_call): Check internal_load_fn_p.
16105         (vectorizable_load): Likewise.  Handle gather load internal
16106         functions.
16107         (vectorizable_store): Update call to check_load_store_masking.
16108         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16109         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16110         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16111         (aarch64_gather_scale_operand_d): New predicates.
16112         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16113         (mask_gather_load<mode>): New insns.
16115 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16116             Alan Hayward  <alan.hayward@arm.com>
16117             David Sherwood  <david.sherwood@arm.com>
16119         * optabs.def (fold_left_plus_optab): New optab.
16120         * doc/md.texi (fold_left_plus_@var{m}): Document.
16121         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16122         * internal-fn.c (fold_left_direct): Define.
16123         (expand_fold_left_optab_fn): Likewise.
16124         (direct_fold_left_optab_supported_p): Likewise.
16125         * fold-const-call.c (fold_const_fold_left): New function.
16126         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16127         * tree-parloops.c (valid_reduction_p): New function.
16128         (gather_scalar_reductions): Use it.
16129         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16130         (vect_finish_replace_stmt): Declare.
16131         * tree-vect-loop.c (fold_left_reduction_fn): New function.
16132         (needs_fold_left_reduction_p): New function, split out from...
16133         (vect_is_simple_reduction): ...here.  Accept reductions that
16134         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16135         (vect_force_simple_reduction): Also store the reduction type in
16136         the assignment's STMT_VINFO_REDUC_TYPE.
16137         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16138         (merge_with_identity): New function.
16139         (vect_expand_fold_left): Likewise.
16140         (vectorize_fold_left_reduction): Likewise.
16141         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
16142         scalar phi in place for it.  Check for target support and reject
16143         cases that would reassociate the operation.  Defer the transform
16144         phase to vectorize_fold_left_reduction.
16145         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16146         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16147         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16149 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16151         * tree-if-conv.c (predicate_mem_writes): Remove redundant
16152         call to ifc_temp_var.
16154 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16155             Alan Hayward  <alan.hayward@arm.com>
16156             David Sherwood  <david.sherwood@arm.com>
16158         * target.def (legitimize_address_displacement): Take the original
16159         offset as a poly_int.
16160         * targhooks.h (default_legitimize_address_displacement): Update
16161         accordingly.
16162         * targhooks.c (default_legitimize_address_displacement): Likewise.
16163         * doc/tm.texi: Regenerate.
16164         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16165         as an argument, moving assert of ad->disp == ad->disp_term to...
16166         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
16167         Try calling targetm.legitimize_address_displacement before expanding
16168         the address rather than afterwards, and adjust for the new interface.
16169         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16170         Match the new hook interface.  Handle SVE addresses.
16171         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16172         new hook interface.
16174 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16176         * Makefile.in (OBJS): Add early-remat.o.
16177         * target.def (select_early_remat_modes): New hook.
16178         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16179         * doc/tm.texi: Regenerate.
16180         * targhooks.h (default_select_early_remat_modes): Declare.
16181         * targhooks.c (default_select_early_remat_modes): New function.
16182         * timevar.def (TV_EARLY_REMAT): New timevar.
16183         * passes.def (pass_early_remat): New pass.
16184         * tree-pass.h (make_pass_early_remat): Declare.
16185         * early-remat.c: New file.
16186         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16187         function.
16188         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16190 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16191             Alan Hayward  <alan.hayward@arm.com>
16192             David Sherwood  <david.sherwood@arm.com>
16194         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16195         vfm1 with a bound_epilog parameter.
16196         (vect_do_peeling): Update calls accordingly, and move the prologue
16197         call earlier in the function.  Treat the base bound_epilog as 0 for
16198         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
16199         this base when peeling for gaps.
16200         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16201         with fully-masked loops.
16202         (vect_estimate_min_profitable_iters): Handle the single peeled
16203         iteration in that case.
16205 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16206             Alan Hayward  <alan.hayward@arm.com>
16207             David Sherwood  <david.sherwood@arm.com>
16209         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16210         single-element interleaving even if the size is not a power of 2.
16211         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16212         accesses for single-element interleaving if the group size is
16213         not a power of 2.
16215 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16216             Alan Hayward  <alan.hayward@arm.com>
16217             David Sherwood  <david.sherwood@arm.com>
16219         * doc/md.texi (fold_extract_last_@var{m}): Document.
16220         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16221         * optabs.def (fold_extract_last_optab): New optab.
16222         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16223         * internal-fn.c (fold_extract_direct): New macro.
16224         (expand_fold_extract_optab_fn): Likewise.
16225         (direct_fold_extract_optab_supported_p): Likewise.
16226         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16227         * tree-vect-loop.c (vect_model_reduction_cost): Handle
16228         EXTRACT_LAST_REDUCTION.
16229         (get_initial_def_for_reduction): Do not create an initial vector
16230         for EXTRACT_LAST_REDUCTION reductions.
16231         (vectorizable_reduction): Leave the scalar phi in place for
16232         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
16233         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
16234         epilogue code for EXTRACT_LAST_REDUCTION and defer the
16235         transform phase to vectorizable_condition.
16236         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16237         split out from...
16238         (vect_finish_stmt_generation): ...here.
16239         (vect_finish_replace_stmt): New function.
16240         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16241         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16242         pattern.
16243         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16245 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16246             Alan Hayward  <alan.hayward@arm.com>
16247             David Sherwood  <david.sherwood@arm.com>
16249         * doc/md.texi (extract_last_@var{m}): Document.
16250         * optabs.def (extract_last_optab): New optab.
16251         * internal-fn.def (EXTRACT_LAST): New internal function.
16252         * internal-fn.c (cond_unary_direct): New macro.
16253         (expand_cond_unary_optab_fn): Likewise.
16254         (direct_cond_unary_optab_supported_p): Likewise.
16255         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16256         loops using EXTRACT_LAST.
16257         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16258         (extract_last_<mode>): ...this optab.
16259         (vec_extract<mode><Vel>): Update accordingly.
16261 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16262             Alan Hayward  <alan.hayward@arm.com>
16263             David Sherwood  <david.sherwood@arm.com>
16265         * target.def (empty_mask_is_expensive): New hook.
16266         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16267         * doc/tm.texi: Regenerate.
16268         * targhooks.h (default_empty_mask_is_expensive): Declare.
16269         * targhooks.c (default_empty_mask_is_expensive): New function.
16270         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16271         if the target says that empty masks are expensive.
16272         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16273         New function.
16274         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16277             Alan Hayward  <alan.hayward@arm.com>
16278             David Sherwood  <david.sherwood@arm.com>
16280         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16281         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16282         (vect_use_loop_mask_for_alignment_p): New function.
16283         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16284         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16285         niters_skip argument.  Make sure that the first niters_skip elements
16286         of the first iteration are inactive.
16287         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16288         Update call to vect_set_loop_masks_directly.
16289         (get_misalign_in_elems): New function, split out from...
16290         (vect_gen_prolog_loop_niters): ...here.
16291         (vect_update_init_of_dr): Take a code argument that specifies whether
16292         the adjustment should be added or subtracted.
16293         (vect_update_init_of_drs): Likewise.
16294         (vect_prepare_for_masked_peels): New function.
16295         (vect_do_peeling): Skip prologue peeling if we're using a mask
16296         instead.  Update call to vect_update_inits_of_drs.
16297         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16298         mask_skip_niters.
16299         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16300         alignment.  Do not include the number of peeled iterations in
16301         the minimum threshold in that case.
16302         (vectorizable_induction): Adjust the start value down by
16303         LOOP_VINFO_MASK_SKIP_NITERS iterations.
16304         (vect_transform_loop): Call vect_prepare_for_masked_peels.
16305         Take the number of skipped iterations into account when calculating
16306         the loop bounds.
16307         * tree-vect-stmts.c (vect_gen_while_not): New function.
16309 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16310             Alan Hayward  <alan.hayward@arm.com>
16311             David Sherwood  <david.sherwood@arm.com>
16313         * doc/sourcebuild.texi (vect_fully_masked): Document.
16314         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16315         default value to 0.
16316         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16317         split out from...
16318         (vect_analyze_loop_2): ...here. Don't check the vectorization
16319         factor against the number of loop iterations if the loop is
16320         fully-masked.
16322 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16323             Alan Hayward  <alan.hayward@arm.com>
16324             David Sherwood  <david.sherwood@arm.com>
16326         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16327         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16328         (dump_groups): Update accordingly.
16329         (iv_use::mem_type): New member variable.
16330         (address_p): New function.
16331         (record_use): Add a mem_type argument and initialize the new
16332         mem_type field.
16333         (record_group_use): Add a mem_type argument.  Use address_p.
16334         Remove obsolete null checks of base_object.  Update call to record_use.
16335         (find_interesting_uses_op): Update call to record_group_use.
16336         (find_interesting_uses_cond): Likewise.
16337         (find_interesting_uses_address): Likewise.
16338         (get_mem_type_for_internal_fn): New function.
16339         (find_address_like_use): Likewise.
16340         (find_interesting_uses_stmt): Try find_address_like_use before
16341         calling find_interesting_uses_op.
16342         (addr_offset_valid_p): Use the iv mem_type field as the type
16343         of the addressed memory.
16344         (add_autoinc_candidates): Likewise.
16345         (get_address_cost): Likewise.
16346         (split_small_address_groups_p): Use address_p.
16347         (split_address_groups): Likewise.
16348         (add_iv_candidate_for_use): Likewise.
16349         (autoinc_possible_for_pair): Likewise.
16350         (rewrite_groups): Likewise.
16351         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16352         (determine_group_iv_cost): Update after split of USE_ADDRESS.
16353         (get_alias_ptr_type_for_ptr_address): New function.
16354         (rewrite_use_address): Rewrite address uses in calls that were
16355         identified by find_address_like_use.
16357 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16358             Alan Hayward  <alan.hayward@arm.com>
16359             David Sherwood  <david.sherwood@arm.com>
16361         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16362         TARGET_MEM_REFs.
16363         * gimple-expr.h (is_gimple_addressable: Likewise.
16364         * gimple-expr.c (is_gimple_address): Likewise.
16365         * internal-fn.c (expand_call_mem_ref): New function.
16366         (expand_mask_load_optab_fn): Use it.
16367         (expand_mask_store_optab_fn): Likewise.
16369 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16370             Alan Hayward  <alan.hayward@arm.com>
16371             David Sherwood  <david.sherwood@arm.com>
16373         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16374         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16375         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16376         (cond_umax@var{mode}): Document.
16377         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16378         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16379         (cond_umin_optab, cond_umax_optab): New optabs.
16380         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16381         (COND_IOR, COND_XOR): New internal functions.
16382         * internal-fn.h (get_conditional_internal_fn): Declare.
16383         * internal-fn.c (cond_binary_direct): New macro.
16384         (expand_cond_binary_optab_fn): Likewise.
16385         (direct_cond_binary_optab_supported_p): Likewise.
16386         (get_conditional_internal_fn): New function.
16387         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16388         Cope with reduction statements that are vectorized as calls rather
16389         than assignments.
16390         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16391         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16392         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16393         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16394         (UNSPEC_COND_EOR): New unspecs.
16395         (optab): Add mappings for them.
16396         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16397         (sve_int_op, sve_fp_op): New int attributes.
16399 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16400             Alan Hayward  <alan.hayward@arm.com>
16401             David Sherwood  <david.sherwood@arm.com>
16403         * optabs.def (while_ult_optab): New optab.
16404         * doc/md.texi (while_ult@var{m}@var{n}): Document.
16405         * internal-fn.def (WHILE_ULT): New internal function.
16406         * internal-fn.h (direct_internal_fn_supported_p): New override
16407         that takes two types as argument.
16408         * internal-fn.c (while_direct): New macro.
16409         (expand_while_optab_fn): New function.
16410         (convert_optab_supported_p): Likewise.
16411         (direct_while_optab_supported_p): New macro.
16412         * wide-int.h (wi::udiv_ceil): New function.
16413         * tree-vectorizer.h (rgroup_masks): New structure.
16414         (vec_loop_masks): New typedef.
16415         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16416         and fully_masked_p.
16417         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16418         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16419         (vect_max_vf): New function.
16420         (slpeel_make_loop_iterate_ntimes): Delete.
16421         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16422         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16423         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16424         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16425         internal-fn.h, stor-layout.h and optabs-query.h.
16426         (vect_set_loop_mask): New function.
16427         (add_preheader_seq): Likewise.
16428         (add_header_seq): Likewise.
16429         (interleave_supported_p): Likewise.
16430         (vect_maybe_permute_loop_masks): Likewise.
16431         (vect_set_loop_masks_directly): Likewise.
16432         (vect_set_loop_condition_masked): Likewise.
16433         (vect_set_loop_condition_unmasked): New function, split out from
16434         slpeel_make_loop_iterate_ntimes.
16435         (slpeel_make_loop_iterate_ntimes): Rename to..
16436         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
16437         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16438         (vect_do_peeling): Update call accordingly.
16439         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16440         loops.
16441         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16442         mask_compare_type, can_fully_mask_p and fully_masked_p.
16443         (release_vec_loop_masks): New function.
16444         (_loop_vec_info): Use it to free the loop masks.
16445         (can_produce_all_loop_masks_p): New function.
16446         (vect_get_max_nscalars_per_iter): Likewise.
16447         (vect_verify_full_masking): Likewise.
16448         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16449         retries, and free the mask rgroups before retrying.  Check loop-wide
16450         reasons for disallowing fully-masked loops.  Make the final decision
16451         about whether use a fully-masked loop or not.
16452         (vect_estimate_min_profitable_iters): Do not assume that peeling
16453         for the number of iterations will be needed for fully-masked loops.
16454         (vectorizable_reduction): Disable fully-masked loops.
16455         (vectorizable_live_operation): Likewise.
16456         (vect_halve_mask_nunits): New function.
16457         (vect_double_mask_nunits): Likewise.
16458         (vect_record_loop_mask): Likewise.
16459         (vect_get_loop_mask): Likewise.
16460         (vect_transform_loop): Handle the case in which the final loop
16461         iteration might handle a partial vector.  Call vect_set_loop_condition
16462         instead of slpeel_make_loop_iterate_ntimes.
16463         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16464         (check_load_store_masking): New function.
16465         (prepare_load_store_mask): Likewise.
16466         (vectorizable_store): Handle fully-masked loops.
16467         (vectorizable_load): Likewise.
16468         (supportable_widening_operation): Use vect_halve_mask_nunits for
16469         booleans.
16470         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16471         (vect_gen_while): New function.
16472         * config/aarch64/aarch64.md (umax<mode>3): New expander.
16473         (aarch64_uqdec<mode>): New insn.
16475 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16476             Alan Hayward  <alan.hayward@arm.com>
16477             David Sherwood  <david.sherwood@arm.com>
16479         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16480         (reduc_xor_scal_optab): New optabs.
16481         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16482         (reduc_xor_scal_@var{m}): Document.
16483         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16484         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16485         internal functions.
16486         * fold-const-call.c (fold_const_call): Handle them.
16487         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16488         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16489         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16490         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16491         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16492         (UNSPEC_XORV): New unspecs.
16493         (optab): Add entries for them.
16494         (BITWISEV): New int iterator.
16495         (bit_reduc_op): New int attributes.
16497 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16498             Alan Hayward  <alan.hayward@arm.com>
16499             David Sherwood  <david.sherwood@arm.com>
16501         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16502         * internal-fn.def (VEC_SHL_INSERT): New internal function.
16503         * optabs.def (vec_shl_insert_optab): New optab.
16504         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16505         (duplicate_and_interleave): Likewise.
16506         * tree-vect-loop.c: Include internal-fn.h.
16507         (neutral_op_for_slp_reduction): New function, split out from
16508         get_initial_defs_for_reduction.
16509         (get_initial_def_for_reduction): Handle option 2 for variable-length
16510         vectors by loading the neutral value into a vector and then shifting
16511         the initial value into element 0.
16512         (get_initial_defs_for_reduction): Replace the code argument with
16513         the neutral value calculated by neutral_op_for_slp_reduction.
16514         Use gimple_build_vector for constant-length vectors.
16515         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16516         but the first group_size elements have a neutral value.
16517         Use duplicate_and_interleave otherwise.
16518         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16519         Update call to get_initial_defs_for_reduction.  Handle SLP
16520         reductions for variable-length vectors by creating one vector
16521         result for each scalar result, with the elements associated
16522         with other scalar results stubbed out with the neutral value.
16523         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16524         Require IFN_VEC_SHL_INSERT for double reductions on
16525         variable-length vectors, or SLP reductions that have
16526         a neutral value.  Require can_duplicate_and_interleave_p
16527         support for variable-length unchained SLP reductions if there
16528         is no neutral value, such as for MIN/MAX reductions.  Also require
16529         the number of vector elements to be a multiple of the number of
16530         SLP statements when doing variable-length unchained SLP reductions.
16531         Update call to vect_create_epilog_for_reduction.
16532         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16533         and remove initial values.
16534         (duplicate_and_interleave): Make public.
16535         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16536         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16538 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16539             Alan Hayward  <alan.hayward@arm.com>
16540             David Sherwood  <david.sherwood@arm.com>
16542         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16543         (can_duplicate_and_interleave_p): New function.
16544         (vect_get_and_check_slp_defs): Take the vector of statements
16545         rather than just the current one.  Remove excess parentheses.
16546         Restriction rejectinon of vect_constant_def and vect_external_def
16547         for variable-length vectors to boolean types, or types for which
16548         can_duplicate_and_interleave_p is false.
16549         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16550         (duplicate_and_interleave): New function.
16551         (vect_get_constant_vectors): Use gimple_build_vector for
16552         constant-length vectors and suitable variable-length constant
16553         vectors.  Use duplicate_and_interleave for other variable-length
16554         vectors.  Don't defer the update when inserting new statements.
16556 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16557             Alan Hayward  <alan.hayward@arm.com>
16558             David Sherwood  <david.sherwood@arm.com>
16560         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16561         min_profitable_iters doesn't go negative.
16563 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16564             Alan Hayward  <alan.hayward@arm.com>
16565             David Sherwood  <david.sherwood@arm.com>
16567         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16568         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16569         * optabs.def (vec_mask_load_lanes_optab): New optab.
16570         (vec_mask_store_lanes_optab): Likewise.
16571         * internal-fn.def (MASK_LOAD_LANES): New internal function.
16572         (MASK_STORE_LANES): Likewise.
16573         * internal-fn.c (mask_load_lanes_direct): New macro.
16574         (mask_store_lanes_direct): Likewise.
16575         (expand_mask_load_optab_fn): Handle masked operations.
16576         (expand_mask_load_lanes_optab_fn): New macro.
16577         (expand_mask_store_optab_fn): Handle masked operations.
16578         (expand_mask_store_lanes_optab_fn): New macro.
16579         (direct_mask_load_lanes_optab_supported_p): Likewise.
16580         (direct_mask_store_lanes_optab_supported_p): Likewise.
16581         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16582         parameter.
16583         (vect_load_lanes_supported): Likewise.
16584         * tree-vect-data-refs.c (strip_conversion): New function.
16585         (can_group_stmts_p): Likewise.
16586         (vect_analyze_data_ref_accesses): Use it instead of checking
16587         for a pair of assignments.
16588         (vect_store_lanes_supported): Take a masked_p parameter.
16589         (vect_load_lanes_supported): Likewise.
16590         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16591         vect_store_lanes_supported and vect_load_lanes_supported.
16592         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16593         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16594         parameter.  Don't allow gaps for masked accesses.
16595         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
16596         and vect_load_lanes_supported.
16597         (get_load_store_type): Take a masked_p parameter and update
16598         call to get_group_load_store_type.
16599         (vectorizable_store): Update call to get_load_store_type.
16600         Handle IFN_MASK_STORE_LANES.
16601         (vectorizable_load): Update call to get_load_store_type.
16602         Handle IFN_MASK_LOAD_LANES.
16604 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16605             Alan Hayward  <alan.hayward@arm.com>
16606             David Sherwood  <david.sherwood@arm.com>
16608         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16609         modes for SVE.
16610         * config/aarch64/aarch64-protos.h
16611         (aarch64_sve_struct_memory_operand_p): Declare.
16612         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16613         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16614         (VPRED, vpred): Handle SVE structure modes.
16615         * config/aarch64/constraints.md (Utx): New constraint.
16616         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16617         (aarch64_sve_struct_nonimmediate_operand): New predicates.
16618         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16619         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16620         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16621         structure modes.  Split into pieces after RA.
16622         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16623         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16624         New patterns.
16625         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16626         SVE structure modes.
16627         (aarch64_classify_address): Likewise.
16628         (sizetochar): Move earlier in file.
16629         (aarch64_print_operand): Handle SVE register lists.
16630         (aarch64_array_mode): New function.
16631         (aarch64_sve_struct_memory_operand_p): Likewise.
16632         (TARGET_ARRAY_MODE): Redefine.
16634 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16635             Alan Hayward  <alan.hayward@arm.com>
16636             David Sherwood  <david.sherwood@arm.com>
16638         * target.def (array_mode): New target hook.
16639         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16640         * doc/tm.texi: Regenerate.
16641         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16642         * hooks.c (hook_optmode_mode_uhwi_none): New function.
16643         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16644         targetm.array_mode.
16645         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
16646         type sizes.
16648 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16649             Alan Hayward  <alan.hayward@arm.com>
16650             David Sherwood  <david.sherwood@arm.com>
16652         * fold-const.c (fold_binary_loc): Check the argument types
16653         rather than the result type when testing for a vector operation.
16655 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16657         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16658         * doc/tm.texi: Regenerate.
16660 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16661             Alan Hayward  <alan.hayward@arm.com>
16662             David Sherwood  <david.sherwood@arm.com>
16664         * doc/invoke.texi (-msve-vector-bits=): Document new option.
16665         (sve): Document new AArch64 extension.
16666         * doc/md.texi (w): Extend the description of the AArch64
16667         constraint to include SVE vectors.
16668         (Upl, Upa): Document new AArch64 predicate constraints.
16669         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16670         enum.
16671         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16672         (msve-vector-bits=): New option.
16673         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16674         SVE when these are disabled.
16675         (sve): New extension.
16676         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16677         modes.  Adjust their number of units based on aarch64_sve_vg.
16678         (MAX_BITSIZE_MODE_ANY_MODE): Define.
16679         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16680         aarch64_addr_query_type.
16681         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16682         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16683         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16684         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16685         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16686         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16687         (aarch64_simd_imm_zero_p): Delete.
16688         (aarch64_check_zero_based_sve_index_immediate): Declare.
16689         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16690         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16691         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16692         (aarch64_sve_float_mul_immediate_p): Likewise.
16693         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16694         rather than an rtx.
16695         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16696         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16697         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16698         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16699         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16700         (aarch64_regmode_natural_size): Likewise.
16701         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16702         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16703         left one place.
16704         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16705         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16706         for VG and the SVE predicate registers.
16707         (V_ALIASES): Add a "z"-prefixed alias.
16708         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16709         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16710         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16711         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16712         (REG_CLASS_NAMES): Add entries for them.
16713         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
16714         and the predicate registers.
16715         (aarch64_sve_vg): Declare.
16716         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16717         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16718         (REGMODE_NATURAL_SIZE): Define.
16719         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16720         SVE macros.
16721         * config/aarch64/aarch64.c: Include cfgrtl.h.
16722         (simd_immediate_info): Add a constructor for series vectors,
16723         and an associated step field.
16724         (aarch64_sve_vg): New variable.
16725         (aarch64_dbx_register_number): Handle VG and the predicate registers.
16726         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16727         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16728         (VEC_ANY_DATA, VEC_STRUCT): New constants.
16729         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16730         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16731         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16732         (aarch64_get_mask_mode): New functions.
16733         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16734         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16735         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
16736         predicate modes and predicate registers.  Explicitly restrict
16737         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
16738         to store a vector mode if it is recognized by
16739         aarch64_classify_vector_mode.
16740         (aarch64_regmode_natural_size): New function.
16741         (aarch64_hard_regno_caller_save_mode): Return the original mode
16742         for predicates.
16743         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16744         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16745         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16746         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16747         functions.
16748         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
16749         does not overlap dest if the function is frame-related.  Handle
16750         SVE constants.
16751         (aarch64_split_add_offset): New function.
16752         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16753         them aarch64_add_offset.
16754         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16755         and update call to aarch64_sub_sp.
16756         (aarch64_add_cfa_expression): New function.
16757         (aarch64_expand_prologue): Pass extra temporary registers to the
16758         functions above.  Handle the case in which we need to emit new
16759         DW_CFA_expressions for registers that were originally saved
16760         relative to the stack pointer, but now have to be expressed
16761         relative to the frame pointer.
16762         (aarch64_output_mi_thunk): Pass extra temporary registers to the
16763         functions above.
16764         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
16765         IP0 and IP1 values for SVE frames.
16766         (aarch64_expand_vec_series): New function.
16767         (aarch64_expand_sve_widened_duplicate): Likewise.
16768         (aarch64_expand_sve_const_vector): Likewise.
16769         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16770         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
16771         into the register, rather than emitting a SET directly.
16772         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16773         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16774         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16775         (offset_9bit_signed_scaled_p): New functions.
16776         (aarch64_replicate_bitmask_imm): New function.
16777         (aarch64_bitmask_imm): Use it.
16778         (aarch64_cannot_force_const_mem): Reject expressions involving
16779         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
16780         (aarch64_classify_index): Handle SVE indices, by requiring
16781         a plain register index with a scale that matches the element size.
16782         (aarch64_classify_address): Handle SVE addresses.  Assert that
16783         the mode of the address is VOIDmode or an integer mode.
16784         Update call to aarch64_classify_symbol.
16785         (aarch64_classify_symbolic_expression): Update call to
16786         aarch64_classify_symbol.
16787         (aarch64_const_vec_all_in_range_p): New function.
16788         (aarch64_print_vector_float_operand): Likewise.
16789         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
16790         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
16791         and the FP immediates 1.0 and 0.5.
16792         (aarch64_print_address_internal): Handle SVE addresses.
16793         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16794         (aarch64_regno_regclass): Handle predicate registers.
16795         (aarch64_secondary_reload): Handle big-endian reloads of SVE
16796         data modes.
16797         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16798         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16799         (aarch64_convert_sve_vector_bits): New function.
16800         (aarch64_override_options): Use it to handle -msve-vector-bits=.
16801         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16802         rather than an rtx.
16803         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16804         Handle SVE vector and predicate modes.  Accept VL-based constants
16805         that need only one temporary register, and VL offsets that require
16806         no temporary registers.
16807         (aarch64_conditional_register_usage): Mark the predicate registers
16808         as fixed if SVE isn't available.
16809         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16810         Return true for SVE vector and predicate modes.
16811         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16812         rather than an unsigned int.  Handle SVE modes.
16813         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
16814         SVE modes.
16815         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16816         if SVE is enabled.
16817         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16818         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16819         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16820         (aarch64_sve_float_mul_immediate_p): New functions.
16821         (aarch64_sve_valid_immediate): New function.
16822         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16823         Explicitly reject structure modes.  Check for INDEX constants.
16824         Handle PTRUE and PFALSE constants.
16825         (aarch64_check_zero_based_sve_index_immediate): New function.
16826         (aarch64_simd_imm_zero_p): Delete.
16827         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16828         vector modes.  Accept constants in the range of CNT[BHWD].
16829         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16830         ask for an Advanced SIMD mode.
16831         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16832         (aarch64_simd_vector_alignment): Handle SVE predicates.
16833         (aarch64_vectorize_preferred_vector_alignment): New function.
16834         (aarch64_simd_vector_alignment_reachable): Use it instead of
16835         the vector size.
16836         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16837         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16838         functions.
16839         (MAX_VECT_LEN): Delete.
16840         (expand_vec_perm_d): Add a vec_flags field.
16841         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16842         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16843         (aarch64_evpc_ext): Don't apply a big-endian lane correction
16844         for SVE modes.
16845         (aarch64_evpc_rev): Rename to...
16846         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
16847         (aarch64_evpc_rev_global): New function.
16848         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16849         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16850         MAX_VECT_LEN.
16851         (aarch64_evpc_sve_tbl): New function.
16852         (aarch64_expand_vec_perm_const_1): Update after rename of
16853         aarch64_evpc_rev.  Handle SVE permutes too, trying
16854         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16855         than aarch64_evpc_tbl.
16856         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16857         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16858         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16859         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16860         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16861         (aarch64_expand_sve_vcond): New functions.
16862         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16863         of aarch64_vector_mode_p.
16864         (aarch64_dwarf_poly_indeterminate_value): New function.
16865         (aarch64_compute_pressure_classes): Likewise.
16866         (aarch64_can_change_mode_class): Likewise.
16867         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16868         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16869         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16870         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16871         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16872         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16873         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16874         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16875         constraints.
16876         (Dn, Dl, Dr): Accept const as well as const_vector.
16877         (Dz): Likewise.  Compare against CONST0_RTX.
16878         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16879         of "vector" where appropriate.
16880         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16881         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16882         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16883         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16884         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16885         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16886         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16887         (v_int_equiv): Extend to SVE modes.
16888         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16889         mode attributes.
16890         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16891         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16892         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16893         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16894         (SVE_COND_FP_CMP): New int iterators.
16895         (perm_hilo): Handle the new unpack unspecs.
16896         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16897         attributes.
16898         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16899         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16900         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16901         (aarch64_equality_operator, aarch64_constant_vector_operand)
16902         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16903         (aarch64_sve_nonimmediate_operand): Likewise.
16904         (aarch64_sve_general_operand): Likewise.
16905         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16906         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16907         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16908         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16909         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16910         (aarch64_sve_float_arith_immediate): Likewise.
16911         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16912         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16913         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16914         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16915         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16916         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16917         (aarch64_sve_float_arith_operand): Likewise.
16918         (aarch64_sve_float_arith_with_sub_operand): Likewise.
16919         (aarch64_sve_float_mul_operand): Likewise.
16920         (aarch64_sve_vec_perm_operand): Likewise.
16921         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16922         (aarch64_mov_operand): Accept const_poly_int and const_vector.
16923         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16924         as well as const_vector.
16925         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16926         in file.  Use CONST0_RTX and CONSTM1_RTX.
16927         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
16928         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16929         Use aarch64_simd_imm_zero.
16930         * config/aarch64/aarch64-sve.md: New file.
16931         * config/aarch64/aarch64.md: Include it.
16932         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16933         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16934         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16935         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16936         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16937         (sve): New attribute.
16938         (enabled): Disable instructions with the sve attribute unless
16939         TARGET_SVE.
16940         (movqi, movhi): Pass CONST_POLY_INT operaneds through
16941         aarch64_expand_mov_immediate.
16942         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16943         CNT[BHSD] immediates.
16944         (movti): Split CONST_POLY_INT moves into two halves.
16945         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16946         Split additions that need a temporary here if the destination
16947         is the stack pointer.
16948         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16949         (*add<mode>3_poly_1): New instruction.
16950         (set_clobber_cc): New expander.
16952 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16954         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16955         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
16956         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16957         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16958         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
16959         Change innermode from fixed_mode_size to machine_mode.
16960         (simplify_subreg): Update call accordingly.  Handle a constant-sized
16961         subreg of a variable-length CONST_VECTOR.
16963 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16964             Alan Hayward  <alan.hayward@arm.com>
16965             David Sherwood  <david.sherwood@arm.com>
16967         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16968         (add_offset_to_base): New function, split out from...
16969         (create_mem_ref): ...here.  When handling a scale other than 1,
16970         check first whether the address is valid without the offset.
16971         Add it into the base if so, leaving the index and scale as-is.
16973 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16975         PR c++/83778
16976         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16977         fold_for_warn before checking if arg2 is INTEGER_CST.
16979 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
16981         * config/rs6000/predicates.md (load_multiple_operation): Delete.
16982         (store_multiple_operation): Delete.
16983         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16984         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16985         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16986         guarded by TARGET_STRING.
16987         (rs6000_output_load_multiple): Delete.
16988         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16989         OPTION_MASK_STRING / TARGET_STRING handling.
16990         (print_operand) <'N', 'O'>: Add comment that these are unused now.
16991         (const rs6000_opt_masks) <"string">: Change mask to 0.
16992         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16993         (MASK_STRING): Delete.
16994         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16995         parts.  Simplify.
16996         (load_multiple): Delete.
16997         (*ldmsi8): Delete.
16998         (*ldmsi7): Delete.
16999         (*ldmsi6): Delete.
17000         (*ldmsi5): Delete.
17001         (*ldmsi4): Delete.
17002         (*ldmsi3): Delete.
17003         (store_multiple): Delete.
17004         (*stmsi8): Delete.
17005         (*stmsi7): Delete.
17006         (*stmsi6): Delete.
17007         (*stmsi5): Delete.
17008         (*stmsi4): Delete.
17009         (*stmsi3): Delete.
17010         (movmemsi_8reg): Delete.
17011         (corresponding unnamed define_insn): Delete.
17012         (movmemsi_6reg): Delete.
17013         (corresponding unnamed define_insn): Delete.
17014         (movmemsi_4reg): Delete.
17015         (corresponding unnamed define_insn): Delete.
17016         (movmemsi_2reg): Delete.
17017         (corresponding unnamed define_insn): Delete.
17018         (movmemsi_1reg): Delete.
17019         (corresponding unnamed define_insn): Delete.
17020         * config/rs6000/rs6000.opt (mno-string): New.
17021         (mstring): Replace by deprecation warning stub.
17022         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17024 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17026         * regrename.c (regrename_do_replace): If replacing the same
17027         reg multiple times, try to reuse last created gen_raw_REG.
17029         PR debug/81155
17030         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17031         main to workaround a bug in GDB.
17033 2018-01-12  Tom de Vries  <tom@codesourcery.com>
17035         PR target/83737
17036         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17038 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
17040         PR rtl-optimization/80481
17041         * ira-color.c (get_cap_member): New function.
17042         (allocnos_conflict_by_live_ranges_p): Use it.
17043         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17044         (setup_slot_coalesced_allocno_live_ranges): Ditto.
17046 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
17048         PR target/83628
17049         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17050         (*saddl_se_1): Ditto.
17051         (*ssubsi_1): Ditto.
17052         (*ssubl_se_1): Ditto.
17054 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17056         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17057         rather than wi::to_widest for DR_INITs.
17058         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17059         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17060         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17061         INTEGER_CSTs.
17062         (vect_analyze_group_access_1): Note that here.
17064 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17066         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17067         polynomial type sizes.
17069 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17071         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17072         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17073         (gimple_add_tmp_var): Likewise.
17075 2018-01-12  Martin Liska  <mliska@suse.cz>
17077         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17078         (gimple_alloc_sizes): Likewise.
17079         (dump_gimple_statistics): Use PRIu64 in printf format.
17080         * gimple.h: Change uint64_t to int.
17082 2018-01-12  Martin Liska  <mliska@suse.cz>
17084         * tree-core.h: Use uint64_t instead of int.
17085         * tree.c (tree_node_counts): Likewise.
17086         (tree_node_sizes): Likewise.
17087         (dump_tree_statistics): Use PRIu64 in printf format.
17089 2018-01-12  Martin Liska  <mliska@suse.cz>
17091         * Makefile.in: As qsort_chk is implemented in vec.c, add
17092         vec.o to linkage of gencfn-macros.
17093         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17094         passing the info to record_node_allocation_statistics.
17095         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17096         and pass the info.
17097         * ggc-common.c (struct ggc_usage): Add operator== and use
17098         it in operator< and compare function.
17099         * mem-stats.h (struct mem_usage): Likewise.
17100         * vec.c (struct vec_usage): Remove operator< and compare
17101         function. Can be simply inherited.
17103 2018-01-12  Martin Jambor  <mjambor@suse.cz>
17105         PR target/81616
17106         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17107         * tree-ssa-math-opts.c: Include domwalk.h.
17108         (convert_mult_to_fma_1): New function.
17109         (fma_transformation_info): New type.
17110         (fma_deferring_state): Likewise.
17111         (cancel_fma_deferring): New function.
17112         (result_of_phi): Likewise.
17113         (last_fma_candidate_feeds_initial_phi): Likewise.
17114         (convert_mult_to_fma): Added deferring logic, split actual
17115         transformation to convert_mult_to_fma_1.
17116         (math_opts_dom_walker): New type.
17117         (math_opts_dom_walker::after_dom_children): New method, body moved
17118         here from pass_optimize_widening_mul::execute, added deferring logic
17119         bits.
17120         (pass_optimize_widening_mul::execute): Moved most of code to
17121         math_opts_dom_walker::after_dom_children.
17122         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17123         * config/i386/i386.c (ix86_option_override_internal): Added
17124         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17126 2018-01-12  Richard Biener  <rguenther@suse.de>
17128         PR debug/83157
17129         * dwarf2out.c (gen_variable_die): Do not reset old_die for
17130         inline instance vars.
17132 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
17134         PR target/81819
17135         * config/rx/rx.c (rx_is_restricted_memory_address):
17136         Handle SUBREG case.
17138 2018-01-12  Richard Biener  <rguenther@suse.de>
17140         PR tree-optimization/80846
17141         * target.def (split_reduction): New target hook.
17142         * targhooks.c (default_split_reduction): New function.
17143         * targhooks.h (default_split_reduction): Declare.
17144         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17145         target requests first reduce vectors by combining low and high
17146         parts.
17147         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17148         (get_vectype_for_scalar_type_and_size): Export.
17149         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17150         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17151         * doc/tm.texi: Regenerate.
17152         * config/i386/i386.c (ix86_split_reduction): Implement
17153         TARGET_VECTORIZE_SPLIT_REDUCTION.
17155 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17157         PR target/83368
17158         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17159         in PIC mode except for TARGET_VXWORKS_RTP.
17160         * config/sparc/sparc.c: Include cfgrtl.h.
17161         (TARGET_INIT_PIC_REG): Define.
17162         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17163         (sparc_pic_register_p): New predicate.
17164         (sparc_legitimate_address_p): Use it.
17165         (sparc_legitimize_pic_address): Likewise.
17166         (sparc_delegitimize_address): Likewise.
17167         (sparc_mode_dependent_address_p): Likewise.
17168         (gen_load_pcrel_sym): Remove 4th parameter.
17169         (load_got_register): Adjust call to above.  Remove obsolete stuff.
17170         (sparc_expand_prologue): Do not call load_got_register here.
17171         (sparc_flat_expand_prologue): Likewise.
17172         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17173         (sparc_use_pseudo_pic_reg): New function.
17174         (sparc_init_pic_reg): Likewise.
17175         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17176         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17178 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
17180         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17181         Add item for branch_cost.
17183 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17185         PR rtl-optimization/83565
17186         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17187         not extend the result to a larger mode for rotate operations.
17188         (num_sign_bit_copies1): Likewise.
17190 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17192         PR target/40411
17193         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17194         -symbolic.
17195         Use values-Xc.o for -pedantic.
17196         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17198 2018-01-12  Martin Liska  <mliska@suse.cz>
17200         PR ipa/83054
17201         * ipa-devirt.c (final_warning_record::grow_type_warnings):
17202         New function.
17203         (possible_polymorphic_call_targets): Use it.
17204         (ipa_devirt): Likewise.
17206 2018-01-12  Martin Liska  <mliska@suse.cz>
17208         * profile-count.h (enum profile_quality): Use 0 as invalid
17209         enum value of profile_quality.
17211 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17213         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17214         -mext-string options.
17216 2018-01-12  Richard Biener  <rguenther@suse.de>
17218         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17219         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17220         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17221         Likewise.
17222         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17224 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17226         * configure.ac (--with-long-double-format): Add support for the
17227         configuration option to change the default long double format on
17228         PowerPC systems.
17229         * config.gcc (powerpc*-linux*-*): Likewise.
17230         * configure: Regenerate.
17231         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17232         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17233         used without modification.
17235 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17237         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17238         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17239         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17240         MISC_BUILTIN_SPEC_BARRIER.
17241         (rs6000_init_builtins): Likewise.
17242         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17243         enum value.
17244         (speculation_barrier): New define_insn.
17245         * doc/extend.texi: Document __builtin_speculation_barrier.
17247 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17249         PR target/83203
17250         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17251         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17252         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17253         iterators.
17254         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
17255         integral modes instead of "ss" and "sd".
17256         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17257         vectors with 32-bit and 64-bit elements.
17258         (vecdupssescalarmodesuffix): New mode attribute.
17259         (vec_dup<mode>): Use it.
17261 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
17263         PR target/83330
17264         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17265         frame if argument is passed on stack.
17267 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17269         PR target/82682
17270         * ree.c (combine_reaching_defs): Optimize also
17271         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17272         reg2=any_extend(exp); reg1=reg2;, formatting fix.
17274 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17276         PR middle-end/83189
17277         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17279 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17281         PR middle-end/83718
17282         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17283         after they are computed.
17285 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
17287         PR tree-optimization/83695
17288         * gimple-loop-linterchange.cc
17289         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17290         reset cached scev information after interchange.
17291         (pass_linterchange::execute): Remove call to scev_reset_htab.
17293 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17295         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17296         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17297         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17298         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17299         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17300         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17301         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17302         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17303         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17304         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17305         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17306         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17307         (V_lane_reg): Likewise.
17308         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17309         New define_expand.
17310         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17311         (vfmal_lane_low<mode>_intrinsic,
17312         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17313         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17314         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17315         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17316         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17317         vfmsl_lane_high<mode>_intrinsic): New define_insns.
17319 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17321         * config/arm/arm-cpus.in (fp16fml): New feature.
17322         (ALL_SIMD): Add fp16fml.
17323         (armv8.2-a): Add fp16fml as an option.
17324         (armv8.3-a): Likewise.
17325         (armv8.4-a): Add fp16fml as part of fp16.
17326         * config/arm/arm.h (TARGET_FP16FML): Define.
17327         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17328         when appropriate.
17329         * config/arm/arm-modes.def (V2HF): Define.
17330         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17331         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17332         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17333         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17334         vfmsl_low, vfmsl_high): New set of builtins.
17335         * config/arm/iterators.md (PLUSMINUS): New code iterator.
17336         (vfml_op): New code attribute.
17337         (VFMLHALVES): New int iterator.
17338         (VFML, VFMLSEL): New mode attributes.
17339         (V_reg): Define mapping for V2HF.
17340         (V_hi, V_lo): New mode attributes.
17341         (VF_constraint): Likewise.
17342         (vfml_half, vfml_half_selector): New int attributes.
17343         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17344         define_expand.
17345         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17346         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17347         New define_insn.
17348         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17349         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17350         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17351         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
17352         documentation.
17353         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17354         Document new effective target and option set.
17356 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17358         * config/arm/arm-cpus.in (armv8_4): New feature.
17359         (ARMv8_4a): New fgroup.
17360         (armv8.4-a): New arch.
17361         * config/arm/arm-tables.opt: Regenerate.
17362         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17363         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17364         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17365         Add matching rules for -march=armv8.4-a and extensions.
17366         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17368 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
17370         PR target/81821
17371         * config/rx/rx.md (BW): New mode attribute.
17372         (sync_lock_test_and_setsi): Add mode suffix to insn output.
17374 2018-01-11  Richard Biener  <rguenther@suse.de>
17376         PR tree-optimization/83435
17377         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17378         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17379         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17381 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17382             Alan Hayward  <alan.hayward@arm.com>
17383             David Sherwood  <david.sherwood@arm.com>
17385         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17386         field.
17387         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
17388         (aarch64_print_address_internal): Use it to check for a zero offset.
17390 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17391             Alan Hayward  <alan.hayward@arm.com>
17392             David Sherwood  <david.sherwood@arm.com>
17394         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17395         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17396         Return a poly_int64 rather than a HOST_WIDE_INT.
17397         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17398         rather than a HOST_WIDE_INT.
17399         * config/aarch64/aarch64.h (aarch64_frame): Protect with
17400         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
17401         hard_fp_offset, frame_size, initial_adjust, callee_offset and
17402         final_offset from HOST_WIDE_INT to poly_int64.
17403         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17404         to_constant when getting the number of units in an Advanced SIMD
17405         mode.
17406         (aarch64_builtin_vectorized_function): Check for a constant number
17407         of units.
17408         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17409         GET_MODE_SIZE.
17410         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17411         attribute instead of GET_MODE_NUNITS.
17412         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17413         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17414         GET_MODE_SIZE for fixed-size registers.
17415         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17416         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17417         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17418         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17419         (aarch64_print_operand, aarch64_print_address_internal)
17420         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17421         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17422         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17423         Handle polynomial GET_MODE_SIZE.
17424         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
17425         wider than SImode without modification.
17426         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17427         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17428         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17429         passing and returning SVE modes.
17430         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17431         rather than GEN_INT.
17432         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17433         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17434         (aarch64_allocate_and_probe_stack_space): Likewise.
17435         (aarch64_layout_frame): Cope with polynomial offsets.
17436         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17437         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
17438         polynomial offsets.
17439         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17440         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17441         poly_int64 rather than a HOST_WIDE_INT.
17442         (aarch64_get_separate_components, aarch64_process_components)
17443         (aarch64_expand_prologue, aarch64_expand_epilogue)
17444         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17445         (aarch64_anchor_offset): New function, split out from...
17446         (aarch64_legitimize_address): ...here.
17447         (aarch64_builtin_vectorization_cost): Handle polynomial
17448         TYPE_VECTOR_SUBPARTS.
17449         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17450         GET_MODE_NUNITS.
17451         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17452         number of elements from the PARALLEL rather than the mode.
17453         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17454         rather than GET_MODE_BITSIZE.
17455         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17456         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17457         (aarch64_expand_vec_perm_const_1): Handle polynomial
17458         d->perm.length () and d->perm elements.
17459         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
17460         Apply to_constant to d->perm elements.
17461         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17462         polynomial CONST_VECTOR_NUNITS.
17463         (aarch64_move_pointer): Take amount as a poly_int64 rather
17464         than an int.
17465         (aarch64_progress_pointer): Avoid temporary variable.
17466         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17467         the mode attribute instead of GET_MODE.
17469 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17470             Alan Hayward  <alan.hayward@arm.com>
17471             David Sherwood  <david.sherwood@arm.com>
17473         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17474         x exists before using it.
17475         (aarch64_add_constant_internal): Rename to...
17476         (aarch64_add_offset_1): ...this.  Replace regnum with separate
17477         src and dest rtxes.  Handle the case in which they're different,
17478         including when the offset is zero.  Replace scratchreg with an rtx.
17479         Use 2 additions if there is no spare register into which we can
17480         move a 16-bit constant.
17481         (aarch64_add_constant): Delete.
17482         (aarch64_add_offset): Replace reg with separate src and dest
17483         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
17484         Use aarch64_add_offset_1.
17485         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17486         an rtx rather than an int.  Take the delta as a poly_int64
17487         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
17488         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17489         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17490         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17491         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17492         and aarch64_add_sp.
17493         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17494         aarch64_add_constant.
17496 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17498         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17499         Use scalar_float_mode.
17501 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17503         * config/aarch64/aarch64-simd.md
17504         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17505         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17506         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17507         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17508         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17509         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17510         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17511         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17512         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17513         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17515 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17517         PR target/83514
17518         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17519         targ_options->x_arm_arch_string is non NULL.
17521 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
17523         * config/aarch64/aarch64.h
17524         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
17526 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
17528         PR target/82096
17529         * expmed.c (emit_store_flag_force): Swap if const op0
17530         and change VOIDmode to mode of op0.
17532 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17534         PR rtl-optimization/83761
17535         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17536         than bytes to mode_for_size.
17538 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17540         PR middle-end/83189
17541         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17542         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17543         profile.
17545 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17547         PR middle-end/83575
17548         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17549         when in layout mode.
17550         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17551         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17552         partition fixup.
17554 2018-01-10  Michael Collison  <michael.collison@arm.com>
17556         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17557         * config/aarch64/aarch64-option-extension.def: Add
17558         AARCH64_OPT_EXTENSION of 'fp16fml'.
17559         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17560         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17561         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17562         * config/aarch64/constraints.md (Ui7): New constraint.
17563         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17564         (VFMLA_SEL_W): Ditto.
17565         (f16quad): Ditto.
17566         (f16mac1): Ditto.
17567         (VFMLA16_LOW): New int iterator.
17568         (VFMLA16_HIGH): Ditto.
17569         (UNSPEC_FMLAL): New unspec.
17570         (UNSPEC_FMLSL): Ditto.
17571         (UNSPEC_FMLAL2): Ditto.
17572         (UNSPEC_FMLSL2): Ditto.
17573         (f16mac): New code attribute.
17574         * config/aarch64/aarch64-simd-builtins.def
17575         (aarch64_fmlal_lowv2sf): Ditto.
17576         (aarch64_fmlsl_lowv2sf): Ditto.
17577         (aarch64_fmlalq_lowv4sf): Ditto.
17578         (aarch64_fmlslq_lowv4sf): Ditto.
17579         (aarch64_fmlal_highv2sf): Ditto.
17580         (aarch64_fmlsl_highv2sf): Ditto.
17581         (aarch64_fmlalq_highv4sf): Ditto.
17582         (aarch64_fmlslq_highv4sf): Ditto.
17583         (aarch64_fmlal_lane_lowv2sf): Ditto.
17584         (aarch64_fmlsl_lane_lowv2sf): Ditto.
17585         (aarch64_fmlal_laneq_lowv2sf): Ditto.
17586         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17587         (aarch64_fmlalq_lane_lowv4sf): Ditto.
17588         (aarch64_fmlsl_lane_lowv4sf): Ditto.
17589         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17590         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17591         (aarch64_fmlal_lane_highv2sf): Ditto.
17592         (aarch64_fmlsl_lane_highv2sf): Ditto.
17593         (aarch64_fmlal_laneq_highv2sf): Ditto.
17594         (aarch64_fmlsl_laneq_highv2sf): Ditto.
17595         (aarch64_fmlalq_lane_highv4sf): Ditto.
17596         (aarch64_fmlsl_lane_highv4sf): Ditto.
17597         (aarch64_fmlalq_laneq_highv4sf): Ditto.
17598         (aarch64_fmlsl_laneq_highv4sf): Ditto.
17599         * config/aarch64/aarch64-simd.md:
17600         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17601         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17602         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17603         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17604         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17605         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17606         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17607         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17608         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17609         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17610         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17611         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17612         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17613         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17614         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17615         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17616         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17617         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17618         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17619         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17620         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17621         (vfmlsl_low_u32): Ditto.
17622         (vfmlalq_low_u32): Ditto.
17623         (vfmlslq_low_u32): Ditto.
17624         (vfmlal_high_u32): Ditto.
17625         (vfmlsl_high_u32): Ditto.
17626         (vfmlalq_high_u32): Ditto.
17627         (vfmlslq_high_u32): Ditto.
17628         (vfmlal_lane_low_u32): Ditto.
17629         (vfmlsl_lane_low_u32): Ditto.
17630         (vfmlal_laneq_low_u32): Ditto.
17631         (vfmlsl_laneq_low_u32): Ditto.
17632         (vfmlalq_lane_low_u32): Ditto.
17633         (vfmlslq_lane_low_u32): Ditto.
17634         (vfmlalq_laneq_low_u32): Ditto.
17635         (vfmlslq_laneq_low_u32): Ditto.
17636         (vfmlal_lane_high_u32): Ditto.
17637         (vfmlsl_lane_high_u32): Ditto.
17638         (vfmlal_laneq_high_u32): Ditto.
17639         (vfmlsl_laneq_high_u32): Ditto.
17640         (vfmlalq_lane_high_u32): Ditto.
17641         (vfmlslq_lane_high_u32): Ditto.
17642         (vfmlalq_laneq_high_u32): Ditto.
17643         (vfmlslq_laneq_high_u32): Ditto.
17644         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17645         (AARCH64_FL_FOR_ARCH8_4): New.
17646         (AARCH64_ISA_F16FML): New ISA flag.
17647         (TARGET_F16FML): New feature flag for fp16fml.
17648         (doc/invoke.texi): Document new fp16fml option.
17650 2018-01-10  Michael Collison  <michael.collison@arm.com>
17652         * config/aarch64/aarch64-builtins.c:
17653         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17654         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17655         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17656         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17657         (AARCH64_ISA_SHA3): New ISA flag.
17658         (TARGET_SHA3): New feature flag for sha3.
17659         * config/aarch64/iterators.md (sha512_op): New int attribute.
17660         (CRYPTO_SHA512): New int iterator.
17661         (UNSPEC_SHA512H): New unspec.
17662         (UNSPEC_SHA512H2): Ditto.
17663         (UNSPEC_SHA512SU0): Ditto.
17664         (UNSPEC_SHA512SU1): Ditto.
17665         * config/aarch64/aarch64-simd-builtins.def
17666         (aarch64_crypto_sha512hqv2di): New builtin.
17667         (aarch64_crypto_sha512h2qv2di): Ditto.
17668         (aarch64_crypto_sha512su0qv2di): Ditto.
17669         (aarch64_crypto_sha512su1qv2di): Ditto.
17670         (aarch64_eor3qv8hi): Ditto.
17671         (aarch64_rax1qv2di): Ditto.
17672         (aarch64_xarqv2di): Ditto.
17673         (aarch64_bcaxqv8hi): Ditto.
17674         * config/aarch64/aarch64-simd.md:
17675         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17676         (aarch64_crypto_sha512su0qv2di): Ditto.
17677         (aarch64_crypto_sha512su1qv2di): Ditto.
17678         (aarch64_eor3qv8hi): Ditto.
17679         (aarch64_rax1qv2di): Ditto.
17680         (aarch64_xarqv2di): Ditto.
17681         (aarch64_bcaxqv8hi): Ditto.
17682         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17683         (vsha512h2q_u64): Ditto.
17684         (vsha512su0q_u64): Ditto.
17685         (vsha512su1q_u64): Ditto.
17686         (veor3q_u16): Ditto.
17687         (vrax1q_u64): Ditto.
17688         (vxarq_u64): Ditto.
17689         (vbcaxq_u16): Ditto.
17690         * config/arm/types.md (crypto_sha512): New type attribute.
17691         (crypto_sha3): Ditto.
17692         (doc/invoke.texi): Document new sha3 option.
17694 2018-01-10  Michael Collison  <michael.collison@arm.com>
17696         * config/aarch64/aarch64-builtins.c:
17697         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17698         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17699         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17700         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17701         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17702         (AARCH64_ISA_SM4): New ISA flag.
17703         (TARGET_SM4): New feature flag for sm4.
17704         * config/aarch64/aarch64-simd-builtins.def
17705         (aarch64_sm3ss1qv4si): Ditto.
17706         (aarch64_sm3tt1aq4si): Ditto.
17707         (aarch64_sm3tt1bq4si): Ditto.
17708         (aarch64_sm3tt2aq4si): Ditto.
17709         (aarch64_sm3tt2bq4si): Ditto.
17710         (aarch64_sm3partw1qv4si): Ditto.
17711         (aarch64_sm3partw2qv4si): Ditto.
17712         (aarch64_sm4eqv4si): Ditto.
17713         (aarch64_sm4ekeyqv4si): Ditto.
17714         * config/aarch64/aarch64-simd.md:
17715         (aarch64_sm3ss1qv4si): Ditto.
17716         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17717         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17718         (aarch64_sm4eqv4si): Ditto.
17719         (aarch64_sm4ekeyqv4si): Ditto.
17720         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17721         (sm3part_op): Ditto.
17722         (CRYPTO_SM3TT): Ditto.
17723         (CRYPTO_SM3PART): Ditto.
17724         (UNSPEC_SM3SS1): New unspec.
17725         (UNSPEC_SM3TT1A): Ditto.
17726         (UNSPEC_SM3TT1B): Ditto.
17727         (UNSPEC_SM3TT2A): Ditto.
17728         (UNSPEC_SM3TT2B): Ditto.
17729         (UNSPEC_SM3PARTW1): Ditto.
17730         (UNSPEC_SM3PARTW2): Ditto.
17731         (UNSPEC_SM4E): Ditto.
17732         (UNSPEC_SM4EKEY): Ditto.
17733         * config/aarch64/constraints.md (Ui2): New constraint.
17734         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17735         * config/arm/types.md (crypto_sm3): New type attribute.
17736         (crypto_sm4): Ditto.
17737         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17738         (vsm3tt1aq_u32): Ditto.
17739         (vsm3tt1bq_u32): Ditto.
17740         (vsm3tt2aq_u32): Ditto.
17741         (vsm3tt2bq_u32): Ditto.
17742         (vsm3partw1q_u32): Ditto.
17743         (vsm3partw2q_u32): Ditto.
17744         (vsm4eq_u32): Ditto.
17745         (vsm4ekeyq_u32): Ditto.
17746         (doc/invoke.texi): Document new sm4 option.
17748 2018-01-10  Michael Collison  <michael.collison@arm.com>
17750         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17751         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17752         (AARCH64_FL_FOR_ARCH8_4): New.
17753         (AARCH64_FL_V8_4): New flag.
17754         (doc/invoke.texi): Document new armv8.4-a option.
17756 2018-01-10  Michael Collison  <michael.collison@arm.com>
17758         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17759         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17760         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17761         * config/aarch64/aarch64-option-extension.def: Add
17762         AARCH64_OPT_EXTENSION of 'sha2'.
17763         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17764         (crypto): Disable sha2 and aes if crypto disabled.
17765         (crypto): Enable aes and sha2 if enabled.
17766         (simd): Disable sha2 and aes if simd disabled.
17767         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17768         New flags.
17769         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17770         (TARGET_SHA2): New feature flag for sha2.
17771         (TARGET_AES): New feature flag for aes.
17772         * config/aarch64/aarch64-simd.md:
17773         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17774         conditional on TARGET_AES.
17775         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17776         (aarch64_crypto_sha1hsi): Make pattern conditional
17777         on TARGET_SHA2.
17778         (aarch64_crypto_sha1hv4si): Ditto.
17779         (aarch64_be_crypto_sha1hv4si): Ditto.
17780         (aarch64_crypto_sha1su1v4si): Ditto.
17781         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17782         (aarch64_crypto_sha1su0v4si): Ditto.
17783         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17784         (aarch64_crypto_sha256su0v4si): Ditto.
17785         (aarch64_crypto_sha256su1v4si): Ditto.
17786         (doc/invoke.texi): Document new aes and sha2 options.
17788 2018-01-10  Martin Sebor  <msebor@redhat.com>
17790         PR tree-optimization/83781
17791         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17792         as string arrays.
17794 2018-01-11  Martin Sebor  <msebor@gmail.com>
17795             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17797         PR tree-optimization/83501
17798         PR tree-optimization/81703
17800         * tree-ssa-strlen.c (get_string_cst): Rename...
17801         (get_string_len): ...to this.  Handle global constants.
17802         (handle_char_store): Adjust.
17804 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
17805             Jim Wilson  <jimw@sifive.com>
17807         * config/riscv/riscv-protos.h (riscv_output_return): New.
17808         * config/riscv/riscv.c (struct machine_function): New naked_p field.
17809         (riscv_attribute_table, riscv_output_return),
17810         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17811         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17812         (riscv_compute_frame_info): Only compute frame->mask if not a naked
17813         function.
17814         (riscv_expand_prologue): Add early return for naked function.
17815         (riscv_expand_epilogue): Likewise.
17816         (riscv_function_ok_for_sibcall): Return false for naked function.
17817         (riscv_set_current_function): New.
17818         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17819         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17820         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17821         * doc/extend.texi (RISC-V Function Attributes): New.
17823 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17825         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17826         check for 128-bit long double before checking TCmode.
17827         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17828         128-bit long doubles before checking TFmode or TCmode.
17829         (FLOAT128_IBM_P): Likewise.
17831 2018-01-10  Martin Sebor  <msebor@redhat.com>
17833         PR tree-optimization/83671
17834         * builtins.c (c_strlen): Unconditionally return zero for the empty
17835         string.
17836         Use -Warray-bounds for warnings.
17837         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17838         for non-constant array indices with COMPONENT_REF, arrays of
17839         arrays, and pointers to arrays.
17840         (gimple_fold_builtin_strlen): Determine and set length range for
17841         non-constant character arrays.
17843 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
17845         PR middle-end/81897
17846         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17847         empty blocks.
17849 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
17851         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17853 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17855         PR target/83399
17856         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17857         VECTOR_MEM_ALTIVEC_OR_VSX_P.
17858         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17859         indexed_or_indirect_operand predicate.
17860         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17861         (*vsx_le_perm_load_v8hi): Likewise.
17862         (*vsx_le_perm_load_v16qi): Likewise.
17863         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17864         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17865         (*vsx_le_perm_store_v8hi): Likewise.
17866         (*vsx_le_perm_store_v16qi): Likewise.
17867         (eight unnamed splitters): Likewise.
17869 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17871         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17872         * config/rs6000/emmintrin.h: Likewise.
17873         * config/rs6000/mmintrin.h: Likewise.
17874         * config/rs6000/xmmintrin.h: Likewise.
17876 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
17878         PR c++/43486
17879         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17880         "public_flag".
17881         * tree.c (tree_nop_conversion): Return true for location wrapper
17882         nodes.
17883         (maybe_wrap_with_location): New function.
17884         (selftest::check_strip_nops): New function.
17885         (selftest::test_location_wrappers): New function.
17886         (selftest::tree_c_tests): Call it.
17887         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17888         (maybe_wrap_with_location): New decl.
17889         (EXPR_LOCATION_WRAPPER_P): New macro.
17890         (location_wrapper_p): New inline function.
17891         (tree_strip_any_location_wrapper): New inline function.
17893 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
17895         PR target/83735
17896         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17897         stack_realign_offset for the largest alignment of stack slot
17898         actually used.
17899         (ix86_find_max_used_stack_alignment): New function.
17900         (ix86_finalize_stack_frame_flags): Use it.  Set
17901         max_used_stack_alignment if we don't realign stack.
17902         * config/i386/i386.h (machine_function): Add
17903         max_used_stack_alignment.
17905 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
17907         * config/arm/arm.opt (-mbranch-cost): New option.
17908         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17909         account.
17911 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
17913         PR target/83629
17914         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17915         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17917 2018-01-10  Richard Biener  <rguenther@suse.de>
17919         PR debug/83765
17920         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17921         early out so it also covers the case where we have a non-NULL
17922         origin.
17924 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17926         PR tree-optimization/83753
17927         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17928         for non-strided grouped accesses if the number of elements is 1.
17930 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17932         PR target/81616
17933         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17934         * i386.h (TARGET_USE_GATHER): Define.
17935         * x86-tune.def (X86_TUNE_USE_GATHER): New.
17937 2018-01-10  Martin Liska  <mliska@suse.cz>
17939         PR bootstrap/82831
17940         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17941         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17942         partitioning.
17943         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17944         CLEANUP_NO_PARTITIONING is not set.
17946 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17948         * doc/rtl.texi: Remove documentation of (const ...) wrappers
17949         for vectors, as a partial revert of r254296.
17950         * rtl.h (const_vec_p): Delete.
17951         (const_vec_duplicate_p): Don't test for vector CONSTs.
17952         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17953         * expmed.c (make_tree): Likewise.
17955         Revert:
17956         * common.md (E, F): Use CONSTANT_P instead of checking for
17957         CONST_VECTOR.
17958         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17959         checking for CONST_VECTOR.
17961 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17963         PR middle-end/83575
17964         * predict.c (force_edge_cold): Handle in more sane way edges
17965         with no prediction.
17967 2018-01-09  Carl Love  <cel@us.ibm.com>
17969         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17970         V4SI, V4SF types.
17971         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17972         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17973         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17974         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
17975         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17976         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
17977         * config/rs6000/rs6000-protos.h: Add extern defition for
17978         rs6000_generate_float2_double_code.
17979         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17980         function.
17981         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17982         (float2_v2df): Add define_expand.
17984 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
17986         PR target/83628
17987         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17988         op_mode in the force_to_mode call.
17990 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17992         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17993         instead of checking each element individually.
17994         (aarch64_evpc_uzp): Likewise.
17995         (aarch64_evpc_zip): Likewise.
17996         (aarch64_evpc_ext): Likewise.
17997         (aarch64_evpc_rev): Likewise.
17998         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17999         instead of checking each element individually.  Return true without
18000         generating rtl if
18001         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18002         whether all selected elements come from the same input, instead of
18003         checking each element individually.  Remove calls to gen_rtx_REG,
18004         start_sequence and end_sequence and instead assert that no rtl is
18005         generated.
18007 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18009         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18010         order of HIGH and CONST checks.
18012 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18014         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18015         if the destination isn't an SSA_NAME.
18017 2018-01-09  Richard Biener  <rguenther@suse.de>
18019         PR tree-optimization/83668
18020         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18021         move prologue...
18022         (canonicalize_loop_form): ... here, renamed from ...
18023         (canonicalize_loop_closed_ssa_form): ... this and amended to
18024         swap successor edges for loop exit blocks to make us use
18025         the RPO order we need for initial schedule generation.
18027 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
18029         PR tree-optimization/64811
18030         * match.pd: When optimizing comparisons with Inf, avoid
18031         introducing or losing exceptions from comparisons with NaN.
18033 2018-01-09  Martin Liska  <mliska@suse.cz>
18035         PR sanitizer/82517
18036         * asan.c (shadow_mem_size): Add gcc_assert.
18038 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
18040         Don't save registers in main().
18042         PR target/83738
18043         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18044         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18045         * config/avr/avr.c (avr_set_current_function): Don't error if
18046         naked, OS_task or OS_main are specified at the same time.
18047         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18048         OS_main.
18049         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18050         attribute.
18051         * common/config/avr/avr-common.c (avr_option_optimization_table):
18052         Switch on -mmain-is-OS_task for optimizing compilations.
18054 2018-01-09  Richard Biener  <rguenther@suse.de>
18056         PR tree-optimization/83572
18057         * graphite.c: Include cfganal.h.
18058         (graphite_transform_loops): Connect infinite loops to exit
18059         and remove fake edges at the end.
18061 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18063         * ipa-inline.c (edge_badness): Revert accidental checkin.
18065 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18067         PR ipa/80763
18068         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18069         symbols; not inline clones.
18071 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
18073         PR target/83507
18074         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18075         hard registers.  Formatting fixes.
18077         PR preprocessor/83722
18078         * gcc.c (try_generate_repro): Pass
18079         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18080         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18081         do_report_bug.
18083 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
18084             Kito Cheng  <kito.cheng@gmail.com>
18086         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18087         (riscv_leaf_function_p): Delete.
18088         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18090 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18092         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18093         function.
18094         (do_ifelse): New function.
18095         (do_isel): New function.
18096         (do_sub3): New function.
18097         (do_add3): New function.
18098         (do_load_mask_compare): New function.
18099         (do_overlap_load_compare): New function.
18100         (expand_compare_loop): New function.
18101         (expand_block_compare): Call expand_compare_loop() when appropriate.
18102         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18103         option description.
18104         (-mblock-compare-inline-loop-limit): New option.
18106 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18108         PR target/83677
18109         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18110         Reverse order of second and third operands in first alternative.
18111         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18112         of first and second elements in UNSPEC_VPERMR vector.
18113         (altivec_expand_vec_perm_le): Likewise.
18115 2018-01-08  Jeff Law  <law@redhat.com>
18117         PR rtl-optimizatin/81308
18118         * tree-switch-conversion.c (cfg_altered): New file scoped static.
18119         (process_switch): If group_case_labels makes a change, then set
18120         cfg_altered.
18121         (pass_convert_switch::execute): If a switch is converted, then
18122         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
18124         PR rtl-optimization/81308
18125         * recog.c (split_all_insns): Conditionally cleanup the CFG after
18126         splitting insns.
18128 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
18130         PR target/83663 - Revert r255946
18131         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18132         generation for cases where splatting a value is not useful.
18133         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18134         across a vec_duplicate and a paradoxical subreg forming a vector
18135         mode to a vec_concat.
18137 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18139         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18140         -march=armv8.3-a variants.
18141         * config/arm/t-multilib: Likewise.
18142         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
18144 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18146         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18147         to generate rtl.
18148         (cceq_ior_compare_complement): Give it a name so I can use it, and
18149         change boolean_or_operator predicate to boolean_operator so it can
18150         be used to generate a crand.
18151         (eqne): New code iterator.
18152         (bd/bd_neg): New code_attrs.
18153         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18154         a single define_insn.
18155         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18156         decrement (bdnzt/bdnzf/bdzt/bdzf).
18157         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18158         with the new names of the branch decrement patterns, and added the
18159         names of the branch decrement conditional patterns.
18161 2018-01-08  Richard Biener  <rguenther@suse.de>
18163         PR tree-optimization/83563
18164         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18165         cache.
18167 2018-01-08  Richard Biener  <rguenther@suse.de>
18169         PR middle-end/83713
18170         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18172 2018-01-08  Richard Biener  <rguenther@suse.de>
18174         PR tree-optimization/83685
18175         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18176         references to abnormals.
18178 2018-01-08  Richard Biener  <rguenther@suse.de>
18180         PR lto/83719
18181         * dwarf2out.c (output_indirect_strings): Handle empty
18182         skeleton_debug_str_hash.
18183         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18185 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18187         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18188         (emit_store_direct): Likewise.
18189         (arc_trampoline_adjust_address): Likewise.
18190         (arc_asm_trampoline_template): New function.
18191         (arc_initialize_trampoline): Use asm_trampoline_template.
18192         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18193         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18194         * config/arc/arc.md (flush_icache): Delete pattern.
18196 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18198         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18199         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18200         munaligned-access.
18202 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18204         PR target/83681
18205         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18206         by not USED_FOR_TARGET.
18207         (make_pass_resolve_sw_modes): Likewise.
18209 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18211         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18212         USED_FOR_TARGET.
18214 2018-01-08  Richard Biener  <rguenther@suse.de>
18216         PR middle-end/83580
18217         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18219 2018-01-08  Richard Biener  <rguenther@suse.de>
18221         PR middle-end/83517
18222         * match.pd ((t * 2) / 2) -> t): Add missing :c.
18224 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
18226         PR middle-end/81897
18227         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18228         basic blocks with a small number of successors.
18229         (convert_control_dep_chain_into_preds): Improve handling of
18230         forwarder blocks.
18231         (dump_predicates): Split apart into...
18232         (dump_pred_chain): ...here...
18233         (dump_pred_info): ...and here.
18234         (can_one_predicate_be_invalidated_p): Add debugging printfs.
18235         (can_chain_union_be_invalidated_p): Improve check for invalidation
18236         of paths.
18237         (uninit_uses_cannot_happen): Avoid unnecessary if
18238         convert_control_dep_chain_into_preds yielded nothing.
18240 2018-01-06  Martin Sebor  <msebor@redhat.com>
18242         PR tree-optimization/83640
18243         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18244         subtracting negative offset from size.
18245         (builtin_access::overlap): Adjust offset bounds of the access to fall
18246         within the size of the object if possible.
18248 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
18250         PR rtl-optimization/83699
18251         * expmed.c (extract_bit_field_1): Restrict the vector usage of
18252         extract_bit_field_as_subreg to cases in which the extracted
18253         value is also a vector.
18255         * lra-constraints.c (process_alt_operands): Test for the equivalence
18256         substitutions when detecting a possible reload cycle.
18258 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
18260         PR debug/83480
18261         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18262         by default if flag_selective_schedling{,2}.  Formatting fixes.
18264         PR rtl-optimization/83682
18265         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18266         if it has non-VECTOR_MODE element mode.
18267         (vec_duplicate_p): Likewise.
18269         PR middle-end/83694
18270         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18271         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18273 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18275         PR target/83604
18276         * config/i386/i386-builtin.def
18277         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18278         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18279         Require also OPTION_MASK_ISA_AVX512F in addition to
18280         OPTION_MASK_ISA_GFNI.
18281         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18282         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18283         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18284         to OPTION_MASK_ISA_GFNI.
18285         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18286         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18287         OPTION_MASK_ISA_AVX512BW.
18288         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18289         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18290         addition to OPTION_MASK_ISA_GFNI.
18291         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18292         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18293         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18294         to OPTION_MASK_ISA_GFNI.
18295         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18296         a requirement for all ISAs rather than any of them with a few
18297         exceptions.
18298         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18299         processing.
18300         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18301         bitmasks to be enabled with 3 exceptions, instead of requiring any
18302         enabled ISA with lots of exceptions.
18303         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18304         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18305         Change avx512bw in isa attribute to avx512f.
18306         * config/i386/sgxintrin.h: Add license boilerplate.
18307         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
18308         to __AVX512F__ and __AVX512VL to __AVX512VL__.
18309         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18310         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18311         defined.
18312         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18313         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18314         temporarily sse2 rather than sse if not enabled already.
18316         PR target/83604
18317         * config/i386/sse.md (VI248_VLBW): Rename to ...
18318         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
18319         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18320         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18321         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18322         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18323         mode iterator instead of VI248_VLBW.
18325 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
18327         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18328         (record_modified): Skip clobbers; add debug output.
18329         (param_change_prob): Use sreal frequencies.
18331 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18333         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18334         punt for user-aligned variables.
18336 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18338         * tree-chrec.c (chrec_contains_symbols): Return true for
18339         POLY_INT_CST.
18341 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
18343         PR target/82439
18344         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18345         of (x|y) == x for BICS pattern.
18347 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18349         PR tree-optimization/83605
18350         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18351         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18352         can throw.
18354 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18356         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18357         * config/epiphany/rtems.h: New file.
18359 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18360             Uros Bizjak  <ubizjak@gmail.com>
18362         PR target/83554
18363         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18364         QIreg_operand instead of register_operand predicate.
18365         * config/i386/i386.c (ix86_rop_should_change_byte_p,
18366         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18367         comments instead of -fmitigate[-_]rop.
18369 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18371         PR bootstrap/81926
18372         * cgraphunit.c (symbol_table::compile): Switch to text_section
18373         before calling assembly_start debug hook.
18374         * run-rtl-passes.c (run_rtl_passes): Likewise.
18375         Include output.h.
18377 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18379         * tree-vrp.c (extract_range_from_binary_expr_1): Check
18380         range_int_cst_p rather than !symbolic_range_p before calling
18381         extract_range_from_multiplicative_op_1.
18383 2018-01-04  Jeff Law  <law@redhat.com>
18385         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18386         redundant test in assertion.
18388 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18390         * doc/rtl.texi: Document machine_mode wrapper classes.
18392 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18394         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18395         using tree_to_uhwi.
18397 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18399         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18400         the VEC_PERM_EXPR fold to fail.
18402 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18404         PR debug/83585
18405         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18406         to switched_sections.
18408 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18410         PR target/83680
18411         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18412         test for d.testing.
18414 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
18416         PR target/83387
18417         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18418         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18420 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18422         PR debug/83666
18423         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18424         is BLKmode and bitpos not zero or mode change is needed.
18426 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18428         PR target/83675
18429         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18430         TARGET_VIS2.
18432 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
18434         PR target/83628
18435         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18436         instead of MULT rtx.  Update all corresponding splitters.
18437         (*saddl_se): Ditto.
18438         (*ssub<modesuffix>): Ditto.
18439         (*ssubl_se): Ditto.
18440         (*cmp_sadd_di): Update split patterns.
18441         (*cmp_sadd_si): Ditto.
18442         (*cmp_sadd_sidi): Ditto.
18443         (*cmp_ssub_di): Ditto.
18444         (*cmp_ssub_si): Ditto.
18445         (*cmp_ssub_sidi): Ditto.
18446         * config/alpha/predicates.md (const23_operand): New predicate.
18447         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18448         Look for ASHIFT, not MULT inner operand.
18449         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18451 2018-01-04  Martin Liska  <mliska@suse.cz>
18453         PR gcov-profile/83669
18454         * gcov.c (output_intermediate_file): Add version to intermediate
18455         gcov file.
18456         * doc/gcov.texi: Document new field 'version' in intermediate
18457         file format. Fix location of '-k' option of gcov command.
18459 2018-01-04  Martin Liska  <mliska@suse.cz>
18461         PR ipa/82352
18462         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18464 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18466         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18468 2018-01-03  Martin Sebor  <msebor@redhat.com>
18470         PR tree-optimization/83655
18471         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18472         checking calls with invalid arguments.
18474 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18476         * tree-vect-stmts.c (vect_get_store_rhs): New function.
18477         (vectorizable_mask_load_store): Delete.
18478         (vectorizable_call): Return false for masked loads and stores.
18479         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
18480         instead of gimple_assign_rhs1.
18481         (vectorizable_load): Handle IFN_MASK_LOAD.
18482         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18486         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18487         split out from..,
18488         (vectorizable_mask_load_store): ...here.
18489         (vectorizable_load): ...and here.
18491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18493         * tree-vect-stmts.c (vect_build_all_ones_mask)
18494         (vect_build_zero_merge_argument): New functions, split out from...
18495         (vectorizable_load): ...here.
18497 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18499         * tree-vect-stmts.c (vect_check_store_rhs): New function,
18500         split out from...
18501         (vectorizable_mask_load_store): ...here.
18502         (vectorizable_store): ...and here.
18504 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18506         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18507         split out from...
18508         (vectorizable_mask_load_store): ...here.
18510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18512         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18513         (vect_model_store_cost): Take a vec_load_store_type instead of a
18514         vect_def_type.
18515         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18516         (vect_model_store_cost): Take a vec_load_store_type instead of a
18517         vect_def_type.
18518         (vectorizable_mask_load_store): Update accordingly.
18519         (vectorizable_store): Likewise.
18520         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18524         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18525         IFN_MASK_LOAD calls here rather than...
18526         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18529             Alan Hayward  <alan.hayward@arm.com>
18530             David Sherwood  <david.sherwood@arm.com>
18532         * expmed.c (extract_bit_field_1): For vector extracts,
18533         fall back to extract_bit_field_as_subreg if vec_extract
18534         isn't available.
18536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18537             Alan Hayward  <alan.hayward@arm.com>
18538             David Sherwood  <david.sherwood@arm.com>
18540         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18541         they are variable or constant sized.
18542         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18543         slots for constant-sized data.
18545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18546             Alan Hayward  <alan.hayward@arm.com>
18547             David Sherwood  <david.sherwood@arm.com>
18549         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18550         handling COND_EXPRs with boolean comparisons, try to find a better
18551         basis for the mask type than the boolean itself.
18553 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18555         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18556         is calculated and how it can be overridden.
18557         * genmodes.c (max_bitsize_mode_any_mode): New variable.
18558         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18559         if defined.
18560         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18561         if nonzero.
18563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18564             Alan Hayward  <alan.hayward@arm.com>
18565             David Sherwood  <david.sherwood@arm.com>
18567         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18568         Remove the mode argument.
18569         (aarch64_simd_valid_immediate): Remove the mode and inverse
18570         arguments.
18571         * config/aarch64/iterators.md (bitsize): New iterator.
18572         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18573         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18574         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18575         aarch64_simd_valid_immediate.
18576         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18577         (aarch64_reg_or_bic_imm): Likewise.
18578         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18579         with an insn_type enum and msl with a modifier_type enum.
18580         Replace element_width with a scalar_mode.  Change the shift
18581         to unsigned int.  Add constructors for scalar_float_mode and
18582         scalar_int_mode elements.
18583         (aarch64_vect_float_const_representable_p): Delete.
18584         (aarch64_can_const_movi_rtx_p)
18585         (aarch64_simd_scalar_immediate_valid_for_move)
18586         (aarch64_simd_make_constant): Update call to
18587         aarch64_simd_valid_immediate.
18588         (aarch64_advsimd_valid_immediate_hs): New function.
18589         (aarch64_advsimd_valid_immediate): Likewise.
18590         (aarch64_simd_valid_immediate): Remove mode and inverse
18591         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
18592         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18593         and aarch64_float_const_representable_p on the result.
18594         (aarch64_output_simd_mov_immediate): Remove mode argument.
18595         Update call to aarch64_simd_valid_immediate and use of
18596         simd_immediate_info.
18597         (aarch64_output_scalar_simd_mov_immediate): Update call
18598         accordingly.
18600 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18601             Alan Hayward  <alan.hayward@arm.com>
18602             David Sherwood  <david.sherwood@arm.com>
18604         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18605         (mode_nunits): Likewise CONST_MODE_NUNITS.
18606         * machmode.def (ADJUST_NUNITS): Document.
18607         * genmodes.c (mode_data::need_nunits_adj): New field.
18608         (blank_mode): Update accordingly.
18609         (adj_nunits): New variable.
18610         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18611         parameter.
18612         (emit_mode_size_inline): Set need_bytesize_adj for all modes
18613         listed in adj_nunits.
18614         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18615         listed in adj_nunits.  Don't emit case statements for such modes.
18616         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18617         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
18618         nothing if adj_nunits is nonnull.
18619         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18620         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18621         (emit_mode_fbit): Update use of print_maybe_const_decl.
18622         (emit_move_size): Likewise.  Treat the array as non-const
18623         if adj_nunits.
18624         (emit_mode_adjustments): Handle adj_nunits.
18626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18628         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18629         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18630         (VECTOR_MODES): Use it.
18631         (make_vector_modes): Take the prefix as an argument.
18633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18634             Alan Hayward  <alan.hayward@arm.com>
18635             David Sherwood  <david.sherwood@arm.com>
18637         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18638         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18639         for MODE_VECTOR_BOOL.
18640         * machmode.def (VECTOR_BOOL_MODE): Document.
18641         * genmodes.c (VECTOR_BOOL_MODE): New macro.
18642         (make_vector_bool_mode): New function.
18643         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18644         MODE_VECTOR_BOOL.
18645         * lto-streamer-in.c (lto_input_mode_table): Likewise.
18646         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18647         Likewise.
18648         * stor-layout.c (int_mode_for_mode): Likewise.
18649         * tree.c (build_vector_type_for_mode): Likewise.
18650         * varasm.c (output_constant_pool_2): Likewise.
18651         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18652         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
18653         for MODE_VECTOR_BOOL.
18654         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18655         of mode class checks.
18656         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18657         instead of a list of mode class checks.
18658         (expand_vector_scalar_condition): Likewise.
18659         (type_for_widest_vector_mode): Handle BImode as an inner mode.
18661 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18662             Alan Hayward  <alan.hayward@arm.com>
18663             David Sherwood  <david.sherwood@arm.com>
18665         * machmode.h (mode_size): Change from unsigned short to
18666         poly_uint16_pod.
18667         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18668         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18669         or if measurement_type is not polynomial.
18670         (fixed_size_mode::includes_p): Check for constant-sized modes.
18671         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18672         return a poly_uint16 rather than an unsigned short.
18673         (emit_mode_size): Change the type of mode_size from unsigned short
18674         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
18675         (emit_mode_adjustments): Cope with polynomial vector sizes.
18676         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18677         for GET_MODE_SIZE.
18678         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18679         for GET_MODE_SIZE.
18680         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18681         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18682         * caller-save.c (setup_save_areas): Likewise.
18683         (replace_reg_with_saved_mem): Likewise.
18684         * calls.c (emit_library_call_value_1): Likewise.
18685         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18686         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18687         (gen_lowpart_for_combine): Likewise.
18688         * convert.c (convert_to_integer_1): Likewise.
18689         * cse.c (equiv_constant, cse_insn): Likewise.
18690         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18691         (cselib_subst_to_values): Likewise.
18692         * dce.c (word_dce_process_block): Likewise.
18693         * df-problems.c (df_word_lr_mark_ref): Likewise.
18694         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18695         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18696         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18697         (rtl_for_decl_location): Likewise.
18698         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18699         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18700         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18701         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18702         (expand_expr_real_1): Likewise.
18703         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18704         (pad_below): Likewise.
18705         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18706         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18707         * ira.c (get_subreg_tracking_sizes): Likewise.
18708         * ira-build.c (ira_create_allocno_objects): Likewise.
18709         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18710         (ira_sort_regnos_for_alter_reg): Likewise.
18711         * ira-costs.c (record_operand_costs): Likewise.
18712         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18713         (resolve_simple_move): Likewise.
18714         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18715         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18716         (lra_constraints): Likewise.
18717         (CONST_POOL_OK_P): Reject variable-sized modes.
18718         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18719         (add_pseudo_to_slot, lra_spill): Likewise.
18720         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18721         * optabs-query.c (get_best_extraction_insn): Likewise.
18722         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18723         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18724         (expand_mult_highpart, valid_multiword_target_p): Likewise.
18725         * recog.c (offsettable_address_addr_space_p): Likewise.
18726         * regcprop.c (maybe_mode_change): Likewise.
18727         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18728         * regrename.c (build_def_use): Likewise.
18729         * regstat.c (dump_reg_info): Likewise.
18730         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18731         (find_reloads, find_reloads_subreg_address): Likewise.
18732         * reload1.c (eliminate_regs_1): Likewise.
18733         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18734         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18735         (simplify_binary_operation_1, simplify_subreg): Likewise.
18736         * targhooks.c (default_function_arg_padding): Likewise.
18737         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18738         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18739         (verify_gimple_assign_ternary): Likewise.
18740         * tree-inline.c (estimate_move_cost): Likewise.
18741         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18742         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18743         (get_address_cost_ainc): Likewise.
18744         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18745         (vect_supportable_dr_alignment): Likewise.
18746         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18747         (vectorizable_reduction): Likewise.
18748         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18749         (vectorizable_operation, vectorizable_load): Likewise.
18750         * tree.c (build_same_sized_truth_vector_type): Likewise.
18751         * valtrack.c (cleanup_auto_inc_dec): Likewise.
18752         * var-tracking.c (emit_note_insn_var_location): Likewise.
18753         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18754         (ADDR_VEC_ALIGN): Likewise.
18756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18757             Alan Hayward  <alan.hayward@arm.com>
18758             David Sherwood  <david.sherwood@arm.com>
18760         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18761         unsigned short.
18762         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18763         or if measurement_type is polynomial.
18764         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18765         * combine.c (make_extraction): Likewise.
18766         * dse.c (find_shift_sequence): Likewise.
18767         * dwarf2out.c (mem_loc_descriptor): Likewise.
18768         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18769         (extract_bit_field, extract_low_bits): Likewise.
18770         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18771         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18772         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18773         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18774         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18775         * reload.c (find_reloads): Likewise.
18776         * reload1.c (alter_reg): Likewise.
18777         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18778         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18779         * tree-if-conv.c (predicate_mem_writes): Likewise.
18780         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18781         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18782         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18783         * valtrack.c (dead_debug_insert_temp): Likewise.
18784         * varasm.c (mergeable_constant_section): Likewise.
18785         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18787 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18788             Alan Hayward  <alan.hayward@arm.com>
18789             David Sherwood  <david.sherwood@arm.com>
18791         * expr.c (expand_assignment): Cope with polynomial mode sizes
18792         when assigning to a CONCAT.
18794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18795             Alan Hayward  <alan.hayward@arm.com>
18796             David Sherwood  <david.sherwood@arm.com>
18798         * machmode.h (mode_precision): Change from unsigned short to
18799         poly_uint16_pod.
18800         (mode_to_precision): Return a poly_uint16 rather than an unsigned
18801         short.
18802         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18803         or if measurement_type is not polynomial.
18804         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
18805         in which the mode is already known to be a scalar_int_mode.
18806         * genmodes.c (emit_mode_precision): Change the type of mode_precision
18807         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
18808         initializer.
18809         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18810         for GET_MODE_PRECISION.
18811         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18812         for GET_MODE_PRECISION.
18813         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18814         as polynomial.
18815         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18816         (expand_field_assignment, make_extraction): Likewise.
18817         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18818         (get_last_value): Likewise.
18819         * convert.c (convert_to_integer_1): Likewise.
18820         * cse.c (cse_insn): Likewise.
18821         * expr.c (expand_expr_real_1): Likewise.
18822         * lra-constraints.c (simplify_operand_subreg): Likewise.
18823         * optabs-query.c (can_atomic_load_p): Likewise.
18824         * optabs.c (expand_atomic_load): Likewise.
18825         (expand_atomic_store): Likewise.
18826         * ree.c (combine_reaching_defs): Likewise.
18827         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18828         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18829         * tree.h (type_has_mode_precision_p): Likewise.
18830         * ubsan.c (instrument_si_overflow): Likewise.
18832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18833             Alan Hayward  <alan.hayward@arm.com>
18834             David Sherwood  <david.sherwood@arm.com>
18836         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18837         polynomial numbers of units.
18838         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18839         (valid_vector_subparts_p): New function.
18840         (build_vector_type): Remove temporary shim and take the number
18841         of units as a poly_uint64 rather than an int.
18842         (build_opaque_vector_type): Take the number of units as a
18843         poly_uint64 rather than an int.
18844         * tree.c (build_vector_from_ctor): Handle polynomial
18845         TYPE_VECTOR_SUBPARTS.
18846         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18847         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18848         (build_vector_from_val): If the number of units is variable,
18849         use build_vec_duplicate_cst for constant operands and
18850         VEC_DUPLICATE_EXPR otherwise.
18851         (make_vector_type): Remove temporary is_constant ().
18852         (build_vector_type, build_opaque_vector_type): Take the number of
18853         units as a poly_uint64 rather than an int.
18854         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18855         VECTOR_CST_NELTS.
18856         * cfgexpand.c (expand_debug_expr): Likewise.
18857         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18858         (store_constructor, expand_expr_real_1): Likewise.
18859         (const_scalar_mask_from_tree): Likewise.
18860         * fold-const-call.c (fold_const_reduction): Likewise.
18861         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18862         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18863         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18864         (fold_relational_const): Likewise.
18865         (native_interpret_vector): Likewise.  Change the size from an
18866         int to an unsigned int.
18867         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18868         TYPE_VECTOR_SUBPARTS.
18869         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18870         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18871         duplicating a non-constant operand into a variable-length vector.
18872         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18873         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18874         * ipa-icf.c (sem_variable::equals): Likewise.
18875         * match.pd: Likewise.
18876         * omp-simd-clone.c (simd_clone_subparts): Likewise.
18877         * print-tree.c (print_node): Likewise.
18878         * stor-layout.c (layout_type): Likewise.
18879         * targhooks.c (default_builtin_vectorization_cost): Likewise.
18880         * tree-cfg.c (verify_gimple_comparison): Likewise.
18881         (verify_gimple_assign_binary): Likewise.
18882         (verify_gimple_assign_ternary): Likewise.
18883         (verify_gimple_assign_single): Likewise.
18884         * tree-pretty-print.c (dump_generic_node): Likewise.
18885         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18886         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18887         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18888         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18889         (vect_shift_permute_load_chain): Likewise.
18890         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18891         (expand_vector_condition, optimize_vector_constructor): Likewise.
18892         (lower_vec_perm, get_compute_type): Likewise.
18893         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18894         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18895         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18896         (vect_recog_mask_conversion_pattern): Likewise.
18897         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18898         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18899         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18900         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18901         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18902         (vectorizable_shift, vectorizable_operation, vectorizable_store)
18903         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18904         (supportable_widening_operation): Likewise.
18905         (supportable_narrowing_operation): Likewise.
18906         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18907         Likewise.
18908         * varasm.c (output_constant): Likewise.
18910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18911             Alan Hayward  <alan.hayward@arm.com>
18912             David Sherwood  <david.sherwood@arm.com>
18914         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18915         so that both the length == 3 and length != 3 cases set up their
18916         own permute vectors.  Add comments explaining why we know the
18917         number of elements is constant.
18918         (vect_permute_load_chain): Likewise.
18920 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18921             Alan Hayward  <alan.hayward@arm.com>
18922             David Sherwood  <david.sherwood@arm.com>
18924         * machmode.h (mode_nunits): Change from unsigned char to
18925         poly_uint16_pod.
18926         (ONLY_FIXED_SIZE_MODES): New macro.
18927         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18928         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18929         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18930         New typedefs.
18931         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18932         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18933         or if measurement_type is not polynomial.
18934         * genmodes.c (ZERO_COEFFS): New macro.
18935         (emit_mode_nunits_inline): Make mode_nunits_inline return a
18936         poly_uint16.
18937         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18938         Use ZERO_COEFFS when emitting initializers.
18939         * data-streamer.h (bp_pack_poly_value): New function.
18940         (bp_unpack_poly_value): Likewise.
18941         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18942         for GET_MODE_NUNITS.
18943         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18944         for GET_MODE_NUNITS.
18945         * tree.c (make_vector_type): Remove temporary shim and make
18946         the real function take the number of units as a poly_uint64
18947         rather than an int.
18948         (build_vector_type_for_mode): Handle polynomial nunits.
18949         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18950         * emit-rtl.c (const_vec_series_p_1): Likewise.
18951         (gen_rtx_CONST_VECTOR): Likewise.
18952         * fold-const.c (test_vec_duplicate_folding): Likewise.
18953         * genrecog.c (validate_pattern): Likewise.
18954         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18955         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18956         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18957         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18958         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18959         * rtlanal.c (subreg_get_info): Likewise.
18960         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18961         (vect_grouped_load_supported): Likewise.
18962         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18963         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18964         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18965         (simplify_const_unary_operation, simplify_binary_operation_1)
18966         (simplify_const_binary_operation, simplify_ternary_operation)
18967         (test_vector_ops_duplicate, test_vector_ops): Likewise.
18968         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18969         instead of CONST_VECTOR_NUNITS.
18970         * varasm.c (output_constant_pool_2): Likewise.
18971         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18972         explicit-encoded elements in the XVEC for variable-length vectors.
18974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18976         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18979             Alan Hayward  <alan.hayward@arm.com>
18980             David Sherwood  <david.sherwood@arm.com>
18982         * coretypes.h (fixed_size_mode): Declare.
18983         (fixed_size_mode_pod): New typedef.
18984         * builtins.h (target_builtins::x_apply_args_mode)
18985         (target_builtins::x_apply_result_mode): Change type to
18986         fixed_size_mode_pod.
18987         * builtins.c (apply_args_size, apply_result_size, result_vector)
18988         (expand_builtin_apply_args_1, expand_builtin_apply)
18989         (expand_builtin_return): Update accordingly.
18991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18993         * cse.c (hash_rtx_cb): Hash only the encoded elements.
18994         * cselib.c (cselib_hash_rtx): Likewise.
18995         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18996         CONST_VECTOR encoding.
18998 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18999             Jeff Law  <law@redhat.com>
19001         PR target/83641
19002         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19003         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19004         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19005         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19007         PR target/83641
19008         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19009         explicitly probe *sp in a noreturn function if there were any callee
19010         register saves or frame pointer is needed.
19012 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19014         PR debug/83621
19015         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19016         BLKmode for ternary, binary or unary expressions.
19018         PR debug/83645
19019         * var-tracking.c (delete_vta_debug_insn): New inline function.
19020         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19021         insns from get_insns () to NULL instead of each bb separately.
19022         Use delete_vta_debug_insn.  No longer static.
19023         (vt_debug_insns_local, variable_tracking_main_1): Adjust
19024         delete_vta_debug_insns callers.
19025         * rtl.h (delete_vta_debug_insns): Declare.
19026         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19027         instead of variable_tracking_main.
19029 2018-01-03  Martin Sebor  <msebor@redhat.com>
19031         PR tree-optimization/83603
19032         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19033         arguments past the endof the argument list in functions declared
19034         without a prototype.
19035         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19036         Avoid checking when arguments are null.
19038 2018-01-03  Martin Sebor  <msebor@redhat.com>
19040         PR c/83559
19041         * doc/extend.texi (attribute const): Fix a typo.
19042         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19043         issuing -Wsuggest-attribute for void functions.
19045 2018-01-03  Martin Sebor  <msebor@redhat.com>
19047         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19048         offset_int::from instead of wide_int::to_shwi.
19049         (maybe_diag_overlap): Remove assertion.
19050         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19051         * gimple-ssa-sprintf.c (format_directive): Same.
19052         (parse_directive): Same.
19053         (sprintf_dom_walker::compute_format_length): Same.
19054         (try_substitute_return_value): Same.
19056 2018-01-03  Jeff Law  <law@redhat.com>
19058         PR middle-end/83654
19059         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19060         non-constant residual for zero at runtime and avoid probing in
19061         that case.  Reorganize code for trailing problem to mirror handling
19062         of the residual.
19064 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19066         PR tree-optimization/83501
19067         * tree-ssa-strlen.c (get_string_cst): New.
19068         (handle_char_store): Call get_string_cst.
19070 2018-01-03  Martin Liska  <mliska@suse.cz>
19072         PR tree-optimization/83593
19073         * tree-ssa-strlen.c: Include tree-cfg.h.
19074         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19075         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19076         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19077         to false.
19078         (strlen_dom_walker::before_dom_children): Call
19079         gimple_purge_dead_eh_edges. Dump tranformation with details
19080         dump flags.
19081         (strlen_dom_walker::before_dom_children): Update call by adding
19082         new argument cleanup_eh.
19083         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19085 2018-01-03  Martin Liska  <mliska@suse.cz>
19087         PR ipa/83549
19088         * cif-code.def (VARIADIC_THUNK): New enum value.
19089         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19090         thunks.
19092 2018-01-03  Jan Beulich  <jbeulich@suse.com>
19094         * sse.md (mov<mode>_internal): Tighten condition for when to use
19095         vmovdqu<ssescalarsize> for TI and OI modes.
19097 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19099         Update copyright years.
19101 2018-01-03  Martin Liska  <mliska@suse.cz>
19103         PR ipa/83594
19104         * ipa-visibility.c (function_and_variable_visibility): Skip
19105         functions with noipa attribure.
19107 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19109         * gcc.c (process_command): Update copyright notice dates.
19110         * gcov-dump.c (print_version): Ditto.
19111         * gcov.c (print_version): Ditto.
19112         * gcov-tool.c (print_version): Ditto.
19113         * gengtype.c (create_file): Ditto.
19114         * doc/cpp.texi: Bump @copying's copyright year.
19115         * doc/cppinternals.texi: Ditto.
19116         * doc/gcc.texi: Ditto.
19117         * doc/gccint.texi: Ditto.
19118         * doc/gcov.texi: Ditto.
19119         * doc/install.texi: Ditto.
19120         * doc/invoke.texi: Ditto.
19122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19124         * vector-builder.h (vector_builder::m_full_nelts): Change from
19125         unsigned int to poly_uint64.
19126         (vector_builder::full_nelts): Update prototype accordingly.
19127         (vector_builder::new_vector): Likewise.
19128         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19129         (vector_builder::operator ==): Likewise.
19130         (vector_builder::finalize): Likewise.
19131         * int-vector-builder.h (int_vector_builder::int_vector_builder):
19132         Take the number of elements as a poly_uint64 rather than an
19133         unsigned int.
19134         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19135         from unsigned int to poly_uint64.
19136         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19137         (vec_perm_indices::new_vector): Likewise.
19138         (vec_perm_indices::length): Likewise.
19139         (vec_perm_indices::nelts_per_input): Likewise.
19140         (vec_perm_indices::input_nelts): Likewise.
19141         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19142         number of elements per input as a poly_uint64 rather than an
19143         unsigned int.  Use the original encoding for variable-length
19144         vectors, rather than clamping each individual element.
19145         For the second and subsequent elements in each pattern,
19146         clamp the step and base before clamping their sum.
19147         (vec_perm_indices::series_p): Handle polynomial element counts.
19148         (vec_perm_indices::all_in_range_p): Likewise.
19149         (vec_perm_indices_to_tree): Likewise.
19150         (vec_perm_indices_to_rtx): Likewise.
19151         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19152         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19153         (tree_vector_builder::new_binary_operation): Handle polynomial
19154         element counts.  Return false if we need to know the number
19155         of elements at compile time.
19156         * fold-const.c (fold_vec_perm): Punt if the number of elements
19157         isn't known at compile time.
19159 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19161         * vec-perm-indices.h (vec_perm_builder): Change element type
19162         from HOST_WIDE_INT to poly_int64.
19163         (vec_perm_indices::element_type): Update accordingly.
19164         (vec_perm_indices::clamp): Handle polynomial element_types.
19165         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19166         (vec_perm_indices::all_in_range_p): Likewise.
19167         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19168         than shwi trees.
19169         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19170         polynomial vec_perm_indices element types.
19171         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19172         * fold-const.c (fold_vec_perm): Likewise.
19173         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19174         * tree-vect-generic.c (lower_vec_perm): Likewise.
19175         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19176         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19177         element type to HOST_WIDE_INT.
19179 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19180             Alan Hayward  <alan.hayward@arm.com>
19181             David Sherwood  <david.sherwood@arm.com>
19183         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19184         rather than an int.  Use plus_constant.
19185         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19186         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19189             Alan Hayward  <alan.hayward@arm.com>
19190             David Sherwood  <david.sherwood@arm.com>
19192         * calls.c (emit_call_1, expand_call): Change struct_value_size from
19193         a HOST_WIDE_INT to a poly_int64.
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         * calls.c (load_register_parameters): Cope with polynomial
19200         mode sizes.  Require a constant size for BLKmode parameters
19201         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
19202         forces a parameter to be padded at the lsb end in order to
19203         fill a complete number of words, require the parameter size
19204         to be ordered wrt UNITS_PER_WORD.
19206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19207             Alan Hayward  <alan.hayward@arm.com>
19208             David Sherwood  <david.sherwood@arm.com>
19210         * reload1.c (spill_stack_slot_width): Change element type
19211         from unsigned int to poly_uint64_pod.
19212         (alter_reg): Treat mode sizes as polynomial.
19214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19215             Alan Hayward  <alan.hayward@arm.com>
19216             David Sherwood  <david.sherwood@arm.com>
19218         * reload.c (complex_word_subreg_p): New function.
19219         (reload_inner_reg_of_subreg, push_reload): Use it.
19221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19222             Alan Hayward  <alan.hayward@arm.com>
19223             David Sherwood  <david.sherwood@arm.com>
19225         * lra-constraints.c (process_alt_operands): Reject matched
19226         operands whose sizes aren't ordered.
19227         (match_reload): Refer to this check here.
19229 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19230             Alan Hayward  <alan.hayward@arm.com>
19231             David Sherwood  <david.sherwood@arm.com>
19233         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19234         that the mode size is in the set {1, 2, 4, 8, 16}.
19236 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19237             Alan Hayward  <alan.hayward@arm.com>
19238             David Sherwood  <david.sherwood@arm.com>
19240         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19241         Use plus_constant instead of gen_rtx_PLUS.
19243 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19244             Alan Hayward  <alan.hayward@arm.com>
19245             David Sherwood  <david.sherwood@arm.com>
19247         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19248         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19249         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19250         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19251         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19252         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19253         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19254         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19255         * config/i386/i386.c (ix86_push_rounding): ...this new function.
19256         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19257         a poly_int64.
19258         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19259         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19260         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19261         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19262         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19263         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19264         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19265         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19266         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19267         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19268         function.
19269         * expr.c (emit_move_resolve_push): Treat the input and result
19270         of PUSH_ROUNDING as a poly_int64.
19271         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19272         (emit_push_insn): Likewise.
19273         * lra-eliminations.c (mark_not_eliminable): Likewise.
19274         * recog.c (push_operand): Likewise.
19275         * reload1.c (elimination_effects): Likewise.
19276         * rtlanal.c (nonzero_bits1): Likewise.
19277         * calls.c (store_one_arg): Likewise.  Require the padding to be
19278         known at compile time.
19280 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19281             Alan Hayward  <alan.hayward@arm.com>
19282             David Sherwood  <david.sherwood@arm.com>
19284         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19285         Use plus_constant instead of gen_rtx_PLUS.
19287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19288             Alan Hayward  <alan.hayward@arm.com>
19289             David Sherwood  <david.sherwood@arm.com>
19291         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19292         rather than an int.
19294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19295             Alan Hayward  <alan.hayward@arm.com>
19296             David Sherwood  <david.sherwood@arm.com>
19298         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19299         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19300         via stack temporaries.  Treat the mode size as polynomial too.
19302 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19303             Alan Hayward  <alan.hayward@arm.com>
19304             David Sherwood  <david.sherwood@arm.com>
19306         * expr.c (expand_expr_real_2): When handling conversions involving
19307         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19308         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
19309         as a poly_uint64 too.
19311 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19312             Alan Hayward  <alan.hayward@arm.com>
19313             David Sherwood  <david.sherwood@arm.com>
19315         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19317 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19318             Alan Hayward  <alan.hayward@arm.com>
19319             David Sherwood  <david.sherwood@arm.com>
19321         * combine.c (can_change_dest_mode): Handle polynomial
19322         REGMODE_NATURAL_SIZE.
19323         * expmed.c (store_bit_field_1): Likewise.
19324         * expr.c (store_constructor): Likewise.
19325         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19326         and polynomial REGMODE_NATURAL_SIZE.
19327         (gen_lowpart_common): Likewise.
19328         * reginfo.c (record_subregs_of_mode): Likewise.
19329         * rtlanal.c (read_modify_subreg_p): Likewise.
19331 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19332             Alan Hayward  <alan.hayward@arm.com>
19333             David Sherwood  <david.sherwood@arm.com>
19335         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19336         numbers of elements.
19338 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19339             Alan Hayward  <alan.hayward@arm.com>
19340             David Sherwood  <david.sherwood@arm.com>
19342         * match.pd: Cope with polynomial numbers of vector elements.
19344 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19345             Alan Hayward  <alan.hayward@arm.com>
19346             David Sherwood  <david.sherwood@arm.com>
19348         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19349         in a POINTER_PLUS_EXPR.
19351 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19352             Alan Hayward  <alan.hayward@arm.com>
19353             David Sherwood  <david.sherwood@arm.com>
19355         * omp-simd-clone.c (simd_clone_subparts): New function.
19356         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19357         (ipa_simd_modify_function_body): Likewise.
19359 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19360             Alan Hayward  <alan.hayward@arm.com>
19361             David Sherwood  <david.sherwood@arm.com>
19363         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19364         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19365         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19366         (expand_vector_condition, vector_element): Likewise.
19367         (subparts_gt): New function.
19368         (get_compute_type): Use subparts_gt.
19369         (count_type_subparts): Delete.
19370         (expand_vector_operations_1): Use subparts_gt instead of
19371         count_type_subparts.
19373 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19374             Alan Hayward  <alan.hayward@arm.com>
19375             David Sherwood  <david.sherwood@arm.com>
19377         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19378         (vect_compile_time_alias): ...this new function.  Do the calculation
19379         on poly_ints rather than trees.
19380         (vect_prune_runtime_alias_test_list): Update call accordingly.
19382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19383             Alan Hayward  <alan.hayward@arm.com>
19384             David Sherwood  <david.sherwood@arm.com>
19386         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19387         numbers of units.
19388         (vect_schedule_slp_instance): Likewise.
19390 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19391             Alan Hayward  <alan.hayward@arm.com>
19392             David Sherwood  <david.sherwood@arm.com>
19394         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19395         constant and extern definitions for variable-length vectors.
19396         (vect_get_constant_vectors): Note that the number of units
19397         is known to be constant.
19399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19400             Alan Hayward  <alan.hayward@arm.com>
19401             David Sherwood  <david.sherwood@arm.com>
19403         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19404         of units as polynomial.  Choose between WIDE and NARROW based
19405         on multiple_p.
19407 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19408             Alan Hayward  <alan.hayward@arm.com>
19409             David Sherwood  <david.sherwood@arm.com>
19411         * tree-vect-stmts.c (simd_clone_subparts): New function.
19412         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19414 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19415             Alan Hayward  <alan.hayward@arm.com>
19416             David Sherwood  <david.sherwood@arm.com>
19418         * tree-vect-stmts.c (vectorizable_call): Treat the number of
19419         vectors as polynomial.  Use build_index_vector for
19420         IFN_GOMP_SIMD_LANE.
19422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19423             Alan Hayward  <alan.hayward@arm.com>
19424             David Sherwood  <david.sherwood@arm.com>
19426         * tree-vect-stmts.c (get_load_store_type): Treat the number of
19427         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19428         for variable-length vectors.
19429         (vectorizable_mask_load_store): Treat the number of units as
19430         polynomial, asserting that it is constant if the condition has
19431         already been enforced.
19432         (vectorizable_store, vectorizable_load): Likewise.
19434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19435             Alan Hayward  <alan.hayward@arm.com>
19436             David Sherwood  <david.sherwood@arm.com>
19438         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19439         of units as polynomial.  Punt if we can't tell at compile time
19440         which vector contains the final result.
19442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19443             Alan Hayward  <alan.hayward@arm.com>
19444             David Sherwood  <david.sherwood@arm.com>
19446         * tree-vect-loop.c (vectorizable_induction): Treat the number
19447         of units as polynomial.  Punt on SLP inductions.  Use an integer
19448         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
19449         cast of such a series for variable-length floating-point
19450         reductions.
19452 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19453             Alan Hayward  <alan.hayward@arm.com>
19454             David Sherwood  <david.sherwood@arm.com>
19456         * tree.h (build_index_vector): Declare.
19457         * tree.c (build_index_vector): New function.
19458         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19459         of units as polynomial, forcibly converting it to a constant if
19460         vectorizable_reduction has already enforced the condition.
19461         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
19462         to create a {1,2,3,...} vector.
19463         (vectorizable_reduction): Treat the number of units as polynomial.
19464         Choose vectype_in based on the largest scalar element size rather
19465         than the smallest number of units.  Enforce the restrictions
19466         relied on above.
19468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19469             Alan Hayward  <alan.hayward@arm.com>
19470             David Sherwood  <david.sherwood@arm.com>
19472         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19473         number of units as polynomial.
19475 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19476             Alan Hayward  <alan.hayward@arm.com>
19477             David Sherwood  <david.sherwood@arm.com>
19479         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19480         * target.def (autovectorize_vector_sizes): Return the vector sizes
19481         by pointer, using vector_sizes rather than a bitmask.
19482         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19483         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19484         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19485         Likewise.
19486         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19487         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19488         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19489         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19490         * omp-general.c (omp_max_vf): Likewise.
19491         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19492         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19493         * tree-vect-loop.c (vect_analyze_loop): Likewise.
19494         * tree-vect-slp.c (vect_slp_bb): Likewise.
19495         * doc/tm.texi: Regenerate.
19496         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19497         to a poly_uint64.
19498         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19499         the vector size as a poly_uint64 rather than an unsigned int.
19500         (current_vector_size): Change from an unsigned int to a poly_uint64.
19501         (get_vectype_for_scalar_type): Update accordingly.
19502         * tree.h (build_truth_vector_type): Take the size and number of
19503         units as a poly_uint64 rather than an unsigned int.
19504         (build_vector_type): Add a temporary overload that takes
19505         the number of units as a poly_uint64 rather than an unsigned int.
19506         * tree.c (make_vector_type): Likewise.
19507         (build_truth_vector_type): Take the number of units as a poly_uint64
19508         rather than an unsigned int.
19510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19511             Alan Hayward  <alan.hayward@arm.com>
19512             David Sherwood  <david.sherwood@arm.com>
19514         * target.def (get_mask_mode): Take the number of units and length
19515         as poly_uint64s rather than unsigned ints.
19516         * targhooks.h (default_get_mask_mode): Update accordingly.
19517         * targhooks.c (default_get_mask_mode): Likewise.
19518         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19519         * doc/tm.texi: Regenerate.
19521 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19522             Alan Hayward  <alan.hayward@arm.com>
19523             David Sherwood  <david.sherwood@arm.com>
19525         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19526         * omp-general.c (omp_max_vf): Likewise.
19527         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19528         (expand_omp_simd): Handle polynomial safelen.
19529         * omp-low.c (omplow_simd_context): Add a default constructor.
19530         (omplow_simd_context::max_vf): Change from int to poly_uint64.
19531         (lower_rec_simd_input_clauses): Update accordingly.
19532         (lower_rec_input_clauses): Likewise.
19534 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19535             Alan Hayward  <alan.hayward@arm.com>
19536             David Sherwood  <david.sherwood@arm.com>
19538         * tree-vectorizer.h (vect_nunits_for_cost): New function.
19539         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19540         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19541         (vect_analyze_slp_cost): Likewise.
19542         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19543         (vect_model_load_cost): Likewise.
19545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19546             Alan Hayward  <alan.hayward@arm.com>
19547             David Sherwood  <david.sherwood@arm.com>
19549         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19550         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19551         from an unsigned int * to a poly_uint64_pod *.
19552         (calculate_unrolling_factor): New function.
19553         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
19555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19556             Alan Hayward  <alan.hayward@arm.com>
19557             David Sherwood  <david.sherwood@arm.com>
19559         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19560         from an unsigned int to a poly_uint64.
19561         (_loop_vec_info::slp_unrolling_factor): Likewise.
19562         (_loop_vec_info::vectorization_factor): Change from an int
19563         to a poly_uint64.
19564         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19565         (vect_get_num_vectors): New function.
19566         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19567         (vect_get_num_copies): Use vect_get_num_vectors.
19568         (vect_analyze_data_ref_dependences): Change max_vf from an int *
19569         to an unsigned int *.
19570         (vect_analyze_data_refs): Change min_vf from an int * to a
19571         poly_uint64 *.
19572         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19573         than an unsigned HOST_WIDE_INT.
19574         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19575         (vect_analyze_data_ref_dependence): Change max_vf from an int *
19576         to an unsigned int *.
19577         (vect_analyze_data_ref_dependences): Likewise.
19578         (vect_compute_data_ref_alignment): Handle polynomial vf.
19579         (vect_enhance_data_refs_alignment): Likewise.
19580         (vect_prune_runtime_alias_test_list): Likewise.
19581         (vect_shift_permute_load_chain): Likewise.
19582         (vect_supportable_dr_alignment): Likewise.
19583         (dependence_distance_ge_vf): Take the vectorization factor as a
19584         poly_uint64 rather than an unsigned HOST_WIDE_INT.
19585         (vect_analyze_data_refs): Change min_vf from an int * to a
19586         poly_uint64 *.
19587         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19588         vfm1 as a poly_uint64 rather than an int.  Make the same change
19589         for the returned bound_scalar.
19590         (vect_gen_vector_loop_niters): Handle polynomial vf.
19591         (vect_do_peeling): Likewise.  Update call to
19592         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19593         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19594         be constant.
19595         * tree-vect-loop.c (vect_determine_vectorization_factor)
19596         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19597         (vect_get_known_peeling_cost): Likewise.
19598         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19599         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19600         (vect_transform_loop): Likewise.  Use the lowest possible VF when
19601         updating the upper bounds of the loop.
19602         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
19603         rather than an int.
19604         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19605         polynomial unroll factors.
19606         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19607         (vect_make_slp_decision): Likewise.
19608         (vect_supported_load_permutation_p): Likewise, and polynomial
19609         vf too.
19610         (vect_analyze_slp_cost): Handle polynomial vf.
19611         (vect_slp_analyze_node_operations): Likewise.
19612         (vect_slp_analyze_bb_1): Likewise.
19613         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19614         than an unsigned HOST_WIDE_INT.
19615         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19616         (vectorizable_load): Handle polynomial vf.
19617         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19618         a poly_uint64.
19619         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19621 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19622             Alan Hayward  <alan.hayward@arm.com>
19623             David Sherwood  <david.sherwood@arm.com>
19625         * match.pd: Handle bit operations involving three constants
19626         and try to fold one pair.
19628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19630         * tree-vect-loop-manip.c: Include gimple-fold.h.
19631         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19632         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
19633         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19634         Add a path that uses a step of VF instead of 1, but disable it
19635         for now.
19636         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19637         and niters_no_overflow parameters.  Update calls to
19638         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19639         Create a new SSA name if the latter choses to use a ste other
19640         than zero, and return it via niters_vector_mult_vf_var.
19641         * tree-vect-loop.c (vect_transform_loop): Update calls to
19642         vect_do_peeling, vect_gen_vector_loop_niters and
19643         slpeel_make_loop_iterate_ntimes.
19644         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19645         (vect_gen_vector_loop_niters): Update declarations after above changes.
19647 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
19649         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19650         128-bit round to integer instructions.
19651         (ceil<mode>2): Likewise.
19652         (btrunc<mode>2): Likewise.
19653         (round<mode>2): Likewise.
19655 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19657         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19658         unaligned VSX load/store on P8/P9.
19659         (expand_block_clear): Allow the use of unaligned VSX
19660         load/store on P8/P9.
19662 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19664         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19665         New function.
19666         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19667         swap associated with both a load and a store.
19669 2018-01-02  Andrew Waterman  <andrew@sifive.com>
19671         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19672         * config/riscv/riscv.md (clear_cache): Use it.
19674 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
19676         * web.c: Remove out-of-date comment.
19678 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19680         * expr.c (fixup_args_size_notes): Check that any existing
19681         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19682         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19683         (emit_single_push_insn): ...here.
19685 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19687         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19688         (const_vector_encoded_nelts): New function.
19689         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19690         (const_vector_int_elt, const_vector_elt): Declare.
19691         * emit-rtl.c (const_vector_int_elt_1): New function.
19692         (const_vector_elt): Likewise.
19693         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19694         of CONST_VECTOR_ELT.
19696 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19698         * expr.c: Include rtx-vector-builder.h.
19699         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19700         directly on the tree encoding.
19701         (const_vector_from_tree): Likewise.
19702         * optabs.c: Include rtx-vector-builder.h.
19703         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19704         sequence of "u" values.
19705         * vec-perm-indices.c: Include rtx-vector-builder.h.
19706         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19707         directly on the vec_perm_indices encoding.
19709 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19711         * doc/rtl.texi (const_vector): Describe new encoding scheme.
19712         * Makefile.in (OBJS): Add rtx-vector-builder.o.
19713         * rtx-vector-builder.h: New file.
19714         * rtx-vector-builder.c: Likewise.
19715         * rtl.h (rtx_def::u2): Add a const_vector field.
19716         (CONST_VECTOR_NPATTERNS): New macro.
19717         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19718         (CONST_VECTOR_DUPLICATE_P): Likewise.
19719         (CONST_VECTOR_STEPPED_P): Likewise.
19720         (CONST_VECTOR_ENCODED_ELT): Likewise.
19721         (const_vec_duplicate_p): Check for a duplicated vector encoding.
19722         (unwrap_const_vec_duplicate): Likewise.
19723         (const_vec_series_p): Check for a non-duplicated vector encoding.
19724         Say that the function only returns true for integer vectors.
19725         * emit-rtl.c: Include rtx-vector-builder.h.
19726         (gen_const_vec_duplicate_1): Delete.
19727         (gen_const_vector): Call gen_const_vec_duplicate instead of
19728         gen_const_vec_duplicate_1.
19729         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19730         (gen_const_vec_duplicate): Use rtx_vector_builder.
19731         (gen_const_vec_series): Likewise.
19732         (gen_rtx_CONST_VECTOR): Likewise.
19733         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19734         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19735         Build a new vector rather than modifying a CONST_VECTOR in-place.
19736         (handle_special_swappables): Update call accordingly.
19737         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19738         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19739         Build a new vector rather than modifying a CONST_VECTOR in-place.
19740         (handle_special_swappables): Update call accordingly.
19742 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19744         * simplify-rtx.c (simplify_const_binary_operation): Use
19745         CONST_VECTOR_ELT instead of XVECEXP.
19747 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19749         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19750         the selector elements to be different from the data elements
19751         if the selector is a VECTOR_CST.
19752         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19753         ssizetype for the selector.
19755 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19757         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19758         before testing each element individually.
19759         * tree-vect-generic.c (lower_vec_perm): Likewise.
19761 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19763         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19764         * selftest-run-tests.c (selftest::run_tests): Call it.
19765         * vector-builder.h (vector_builder::operator ==): New function.
19766         (vector_builder::operator !=): Likewise.
19767         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19768         (vec_perm_indices::all_from_input_p): New function.
19769         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19770         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19771         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19772         instead of reading the VECTOR_CST directly.  Detect whether both
19773         vector inputs are the same before constructing the vec_perm_indices,
19774         and update the number of inputs argument accordingly.  Use the
19775         utility functions added above.  Only construct sel2 if we need to.
19777 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19779         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19780         the broadcast of the low byte.
19781         (expand_mult_highpart): Use an explicit encoding for the permutes.
19782         * optabs-query.c (can_mult_highpart_p): Likewise.
19783         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19784         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19785         (vectorizable_bswap): Likewise.
19786         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19787         explicit encoding for the power-of-2 permutes.
19788         (vect_permute_store_chain): Likewise.
19789         (vect_grouped_load_supported): Likewise.
19790         (vect_permute_load_chain): Likewise.
19792 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19794         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19795         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19796         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19797         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19798         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19799         (vect_gen_perm_mask_any): Likewise.
19801 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19803         * int-vector-builder.h: New file.
19804         * vec-perm-indices.h: Include int-vector-builder.h.
19805         (vec_perm_indices): Redefine as an int_vector_builder.
19806         (auto_vec_perm_indices): Delete.
19807         (vec_perm_builder): Redefine as a stand-alone class.
19808         (vec_perm_indices::vec_perm_indices): New function.
19809         (vec_perm_indices::clamp): Likewise.
19810         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19811         (vec_perm_indices::new_vector): New function.
19812         (vec_perm_indices::new_expanded_vector): Update for new
19813         vec_perm_indices class.
19814         (vec_perm_indices::rotate_inputs): New function.
19815         (vec_perm_indices::all_in_range_p): Operate directly on the
19816         encoded form, without computing elided elements.
19817         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19818         encoding.  Update for new vec_perm_indices class.
19819         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19820         the given vec_perm_builder.
19821         (expand_vec_perm_var): Update vec_perm_builder constructor.
19822         (expand_mult_highpart): Use vec_perm_builder instead of
19823         auto_vec_perm_indices.
19824         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19825         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
19826         or double series encoding as appropriate.
19827         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19828         vec_perm_indices instead of auto_vec_perm_indices.
19829         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19830         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19831         (vect_permute_store_chain): Likewise.
19832         (vect_grouped_load_supported): Likewise.
19833         (vect_permute_load_chain): Likewise.
19834         (vect_shift_permute_load_chain): Likewise.
19835         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19836         (vect_transform_slp_perm_load): Likewise.
19837         (vect_schedule_slp_instance): Likewise.
19838         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19839         (vectorizable_mask_load_store): Likewise.
19840         (vectorizable_bswap): Likewise.
19841         (vectorizable_store): Likewise.
19842         (vectorizable_load): Likewise.
19843         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19844         vec_perm_indices instead of auto_vec_perm_indices.  Use
19845         tree_to_vec_perm_builder to read the vector from a tree.
19846         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19847         vec_perm_builder instead of a vec_perm_indices.
19848         (have_whole_vector_shift): Use vec_perm_builder and
19849         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
19850         truncation to calc_vec_perm_mask_for_shift.
19851         (vect_create_epilog_for_reduction): Likewise.
19852         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19853         from auto_vec_perm_indices to vec_perm_indices.
19854         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19855         instead of changing individual elements.
19856         (aarch64_vectorize_vec_perm_const): Use new_vector to install
19857         the vector in d.perm.
19858         * config/arm/arm.c (expand_vec_perm_d::perm): Change
19859         from auto_vec_perm_indices to vec_perm_indices.
19860         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19861         instead of changing individual elements.
19862         (arm_vectorize_vec_perm_const): Use new_vector to install
19863         the vector in d.perm.
19864         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19865         Update vec_perm_builder constructor.
19866         (rs6000_expand_interleave): Likewise.
19867         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19868         (rs6000_expand_interleave): Likewise.
19870 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19872         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19873         to qimode could truncate the indices.
19874         * optabs.c (expand_vec_perm_var): Likewise.
19876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19878         * Makefile.in (OBJS): Add vec-perm-indices.o.
19879         * vec-perm-indices.h: New file.
19880         * vec-perm-indices.c: Likewise.
19881         * target.h (vec_perm_indices): Replace with a forward class
19882         declaration.
19883         (auto_vec_perm_indices): Move to vec-perm-indices.h.
19884         * optabs.h: Include vec-perm-indices.h.
19885         (expand_vec_perm): Delete.
19886         (selector_fits_mode_p, expand_vec_perm_var): Declare.
19887         (expand_vec_perm_const): Declare.
19888         * target.def (vec_perm_const_ok): Replace with...
19889         (vec_perm_const): ...this new hook.
19890         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19891         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19892         * doc/tm.texi: Regenerate.
19893         * optabs.def (vec_perm_const): Delete.
19894         * doc/md.texi (vec_perm_const): Likewise.
19895         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19896         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19897         expand_vec_perm for constant permutation vectors.  Assert that
19898         the mode of variable permutation vectors is the integer equivalent
19899         of the mode that is being permuted.
19900         * optabs-query.h (selector_fits_mode_p): Declare.
19901         * optabs-query.c: Include vec-perm-indices.h.
19902         (selector_fits_mode_p): New function.
19903         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19904         is defined, instead of checking whether the vec_perm_const_optab
19905         exists.  Use targetm.vectorize.vec_perm_const instead of
19906         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
19907         fit in the vector mode before using a variable permute.
19908         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19909         vec_perm_indices instead of an rtx.
19910         (expand_vec_perm): Replace with...
19911         (expand_vec_perm_const): ...this new function.  Take the selector
19912         as a vec_perm_indices rather than an rtx.  Also take the mode of
19913         the selector.  Update call to shift_amt_for_vec_perm_mask.
19914         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19915         Use vec_perm_indices::new_expanded_vector to expand the original
19916         selector into bytes.  Check whether the indices fit in the vector
19917         mode before using a variable permute.
19918         (expand_vec_perm_var): Make global.
19919         (expand_mult_highpart): Use expand_vec_perm_const.
19920         * fold-const.c: Includes vec-perm-indices.h.
19921         * tree-ssa-forwprop.c: Likewise.
19922         * tree-vect-data-refs.c: Likewise.
19923         * tree-vect-generic.c: Likewise.
19924         * tree-vect-loop.c: Likewise.
19925         * tree-vect-slp.c: Likewise.
19926         * tree-vect-stmts.c: Likewise.
19927         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19928         Delete.
19929         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19930         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19931         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19932         (aarch64_vectorize_vec_perm_const): ...this new function.
19933         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19934         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19935         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19936         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19937         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19938         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19939         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19940         into...
19941         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
19942         check for NEON modes.
19943         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19944         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19945         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19946         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19947         into...
19948         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
19949         the old VEC_PERM_CONST conditions.
19950         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19951         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19952         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19953         (ia64_vectorize_vec_perm_const_ok): Merge into...
19954         (ia64_vectorize_vec_perm_const): ...this new function.
19955         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19956         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19957         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19958         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19959         * config/mips/mips.c (mips_expand_vec_perm_const)
19960         (mips_vectorize_vec_perm_const_ok): Merge into...
19961         (mips_vectorize_vec_perm_const): ...this new function.
19962         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19963         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19964         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19965         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19966         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19967         (rs6000_expand_vec_perm_const): Delete.
19968         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19969         Delete.
19970         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19971         (altivec_expand_vec_perm_const_le): Take each operand individually.
19972         Operate on constant selectors rather than rtxes.
19973         (altivec_expand_vec_perm_const): Likewise.  Update call to
19974         altivec_expand_vec_perm_const_le.
19975         (rs6000_expand_vec_perm_const): Delete.
19976         (rs6000_vectorize_vec_perm_const_ok): Delete.
19977         (rs6000_vectorize_vec_perm_const): New function.
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/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19983         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19984         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19985         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19986         (rs6000_expand_vec_perm_const): Delete.
19987         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19988         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19989         (altivec_expand_vec_perm_const_le): Take each operand individually.
19990         Operate on constant selectors rather than rtxes.
19991         (altivec_expand_vec_perm_const): Likewise.  Update call to
19992         altivec_expand_vec_perm_const_le.
19993         (rs6000_expand_vec_perm_const): Delete.
19994         (rs6000_vectorize_vec_perm_const_ok): Delete.
19995         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
19996         reference to the SPE evmerge intructions.
19997         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19998         an element count and rtx array.
19999         (rs6000_expand_extract_even): Update call accordingly.
20000         (rs6000_expand_interleave): Likewise.
20001         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20002         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20003         new function.
20004         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20006 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20008         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20009         vector mode and that that mode matches the mode of the data
20010         being permuted.
20011         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20012         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
20013         directly using expand_vec_perm_1 when forcing selectors into
20014         registers.
20015         (expand_vec_perm_var): New function, split out from expand_vec_perm.
20017 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20019         * optabs-query.h (can_vec_perm_p): Delete.
20020         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20021         * optabs-query.c (can_vec_perm_p): Split into...
20022         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20023         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20024         particular selector is valid.
20025         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20026         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20027         (vect_grouped_load_supported): Likewise.
20028         (vect_shift_permute_load_chain): Likewise.
20029         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20030         (vect_transform_slp_perm_load): Likewise.
20031         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20032         (vectorizable_bswap): Likewise.
20033         (vect_gen_perm_mask_checked): Likewise.
20034         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
20035         implementations of variable permutation vectors into account
20036         when deciding which selector to use.
20037         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20038         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20039         with a false third argument.
20040         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20041         to test whether the constant selector is valid and can_vec_perm_var_p
20042         to test whether a variable selector is valid.
20044 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20046         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20047         * optabs-query.c (can_vec_perm_p): Likewise.
20048         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20049         instead of vec_perm_indices.
20050         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20051         (vect_gen_perm_mask_checked): Likewise,
20052         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20053         (vect_gen_perm_mask_checked): Likewise,
20055 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20057         * optabs-query.h (qimode_for_vec_perm): Declare.
20058         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20059         (qimode_for_vec_perm): ...this new function.
20060         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20062 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20064         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20065         does not have a conditional at the top.
20067 2018-01-02  Richard Biener  <rguenther@suse.de>
20069         * ipa-inline.c (big_speedup_p): Fix expression.
20071 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20073         PR target/81616
20074         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20075         for generic 4->6.
20077 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20079         PR target/81616
20080         Generic tuning.
20081         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20082         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20083         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20084         cond_taken_branch_cost 3->4.
20086 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
20088         PR tree-optimization/83581
20089         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20090         TODO_cleanup_cfg if any changes have been made.
20092         PR middle-end/83608
20093         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20094         convert_modes if target mode has the right side, but different mode
20095         class.
20097         PR middle-end/83609
20098         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20099         last argument when extracting from CONCAT.  If either from_real or
20100         from_imag is NULL, use expansion through memory.  If result is not
20101         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20102         the parts directly to inner mode, if even that fails, use expansion
20103         through memory.
20105         PR middle-end/83623
20106         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20107         check for bswap in mode rather than HImode and use that in expand_unop
20108         too.
20110 Copyright (C) 2018 Free Software Foundation, Inc.
20112 Copying and distribution of this file, with or without modification,
20113 are permitted in any medium without royalty provided the copyright
20114 notice and this notice are preserved.