PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / ChangeLog
blobdda22d8e180ace281c24687ce3f158519a4fd791
1 2018-07-09  Martin Sebor  <msebor@redhat.com>
3         PR middle-end/77357
4         PR middle-end/86428
5         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6         accessing implicitly initialized array elements.
7         * expr.c (string_constant): Handle string initializers of
8         character arrays within aggregates.
9         * gimple-fold.c (fold_array_ctor_reference): Add argument.
10         Store element offset.  As a special case, handle zero size.
11         (fold_nonarray_ctor_reference): Same.
12         (fold_ctor_reference): Add argument.  Store subobject offset.
13         * gimple-fold.h (fold_ctor_reference): Add argument.
15 2018-07-09  Paul Koning  <ni1d@arrl.net>
17         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
18         (pdp11_insn_cost): New function.
19         (pdp11_md_asm_adjust): New function.
20         (TARGET_INVALID_WITHIN_DOLOOP): Define.
21         (pdp11_rtx_costs): Update to match machine better.
22         (output_addr_const_pdp11): Correct format mismatch warnings.
23         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
24         * config/pdp11/pdp11.md: General change to add base_cost and/or
25         length attributes for use by new pdp11_insn_cost function.
26         (MIN_BRANCH): Correct definition.
27         (MIN_SOB): Ditto.
28         (doloop_end): Use standard pattern name for looping pattern.
29         (doloop_end_nocc): New.
30         (movsf): Add another constraint alternative.
31         (zero_extendqihi2): Add constraint alternatives for not in place
32         extend.
33         (zero_extendhisi2): Remove.
34         (shift patterns): Add CC handling variants.
35         (bswaphi2): New.
36         (bswapsi2): New.
37         (rothi3): New.
38         (define_peephole2): New peephole to recognize mov that sets CC for
39         subsequent test.
41 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
43         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
44         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
45         wi::add.
47 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
49         PR c/86420
50         * real.c (real_nextafter): Return true if result is denormal.
52 2018-07-09  Martin Liska  <mliska@suse.cz>
54         * common.opt: Add back wrongly removed attribute.
56 2018-07-09  Richard Biener  <rguenther@suse.de>
58         PR debug/86413
59         * dwarf2out.c (gen_block_die): For an early generated DIE
60         always output high/low PC attributes.
62 2018-07-09  Tom de Vries  <tdevries@suse.de>
64         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
65         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
66         onto VAR_DECL with abstract origin.
68 2018-07-07  Jim Wilson  <jimw@sifive.com>
70         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
72 2018-07-07  Tom de Vries  <tdevries@suse.de>
74         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
76 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
78         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
79         overflow_type.
80         (combine_bound): Use wide-int overflow calculation instead of
81         rolling our own.
82         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
83         overflow_type.
84         * fold-const.c (int_const_binop_2): Same.
85         (extract_muldiv_1): Same.
86         (fold_div_compare): Same.
87         (fold_abs_const): Same.
88         * match.pd: Same.
89         * poly-int.h (add): Same.
90         (sub): Same.
91         (neg): Same.
92         (mul): Same.
93         * predict.c (predict_iv_comparison): Same.
94         * profile-count.c (slow_safe_scale_64bit): Same.
95         * simplify-rtx.c (simplify_const_binary_operation): Same.
96         * tree-chrec.c (tree_fold_binomial): Same.
97         * tree-data-ref.c (split_constant_offset_1): Same.
98         * tree-if-conv.c (idx_within_array_bound): Same.
99         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
100         * tree-ssa-phiopt.c (minmax_replacement): Same.
101         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
102         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
103         * vr-values.c (vr_values::adjust_range_with_scev): Same.
104         * wide-int.cc (wi::add_large): Same.
105         (wi::mul_internal): Same.
106         (wi::sub_large): Same.
107         (wi::divmod_internal): Same.
108         * wide-int.h: Change overflow type to overflow_type for neg, add,
109         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
110         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
111         mul_internal, divmod_internal.
112         (overflow_type): New enum.
113         (accumulate_overflow): New.
115 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
117         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
118         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
120 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
122         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
123         argument is checked for zero before entering loop, avoid checking again.
125 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
127         * gimplify.h (generic_expr_could_trap_p): Set as global function.
128         * gimplify.h (generic_expr_could_trap_p): Likwise.
129         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
131 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
133         PR tree-optimization/86401
134         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
135         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
136         (fold_bit_and_mask): ... here.  New helper function for match.pd.
137         * fold-const.h (fold_bit_and_mask): Declare.
138         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
140 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
142         PR target/86324
143         * target.def (translate_mode_attribute): New hook.
144         * targhooks.h (default_translate_mode_attribute): Declare.
145         * targhooks.c (default_translate_mode_attribute): New function.
146         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
147         * doc/tm.texi: Regenerate.
148         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
149         (rs6000_translate_mode_attribute): New function.
151 2018-07-06  Paul Koning  <ni1d@arrl.net>
153         * doc/md.texi (define_split): Document DONE and FAIL.
154         (define_peephole2): Ditto.
156 2018-07-05  Jeff Law  <law@redhat.com>
158         PR tree-optimization/86010
159         * tree-ssa-dse.c (compute_trims): More aggressively trim at
160         both the head and tail of mem* and str* calls.
162 2018-07-05  Jim Wilson  <jimw@sifive.com>
164         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
166 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com> 
168         * config/aarch64/aarch64-simd.md: correct flags text for 
169         MIN_EXPR replacement.
171 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
173         * configure: Regenerated.
175 2018-07-05  Carl Love  <cel@us.ibm.com>
177         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
178         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
179         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
180         VSX_BUILTIN_DOUBLEL_V4SF.
182 2018-07-05  Martin Sebor  <msebor@redhat.com>
184         PR c++/86400
185         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
186         than its domain to compute its the upper bound of a char array.
188 2018-07-05  Nathan Sidwell  <nathan@acm.org>
190         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
191         * doc/cpp.texi: Update comment.
192         * doc/tm.texi: Rebuilt.
193         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
194         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
195         * doc/extend.texi (Backwards Compatibility): Clarify it is system
196         headers affected by extern "C".
197         * system.h: Poison NO_IMPLICIT_EXTERN_C.
198         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
199         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
200         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
201         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
202         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
203         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
204         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
205         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
206         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
207         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
208         config/sparc/sp64-elf.h, config/spu/spu.h,
209         config/stormy16/stormy16.h, config/v850/v850.h,
210         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
211         define NO_IMPLICIT_EXTERN_C.
212         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
214 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
216         PR target/84711
217         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
218         instead of GET_MODE_SIZE when comparing Units.
220 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
222         PR target/84711
223         * rtlanal.c (set_noop_p): Constrain on mode change,
224         include hard-reg-set.h
226 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
228         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
230 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
232         Revert
233         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
235         PR sanitizer/84250
236         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
237         libasan.
238         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
240 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
242         PR sanitizer/84250
243         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
244         libasan.
245         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
247 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
249         PR middle-end/86380
250         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
252 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
254         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
255         neg_*_op* variables.
257 2018-07-04  Martin Liska  <mliska@suse.cz>
259         * tree-switch-conversion.c: Define
260         max_ratio_for_speed and max_ratio_for_size constants.
262 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
263             Martin Liska  <mliska@suse.cz>
265         PR middle-end/66240
266         PR target/45996
267         PR c/84100
268         * common.opt: Rename align options with 'str_' prefix.
269         * common/config/i386/i386-common.c (set_malign_value): New
270         function.
271         (ix86_handle_option): Use it to set -falign-* options/
272         * config/aarch64/aarch64-protos.h (struct tune_params): Change
273         type from int to string.
274         * config/aarch64/aarch64.c: Update default values from int
275         to string.
276         * config/alpha/alpha.c (alpha_override_options_after_change):
277         Likewise.
278         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
279         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
280         max skip conditionally.
281         * config/i386/freebsd.h (SUBALIGN_LOG): New.
282         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
283         max skip conditionally.
284         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
285         max skip conditionally.
286         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
287         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
288         max skip conditionally.
289         * config/i386/i386.c (struct ptt): Change type from int to
290         string.
291         (ix86_default_align): Set default values.
292         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
293         max skip conditionally.
294         * config/i386/iamcu.h (SUBALIGN_LOG): New.
295         (ASM_OUTPUT_MAX_SKIP_ALIGN):
296         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
297         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
298         max skip conditionally.
299         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
300         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
301         * config/i386/x86-64.h (SUBALIGN_LOG): New.
302         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
303         max skip conditionally.
304         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
305         * config/ia64/ia64.c (ia64_option_override): Set default values
306         for alignment options.
307         * config/m68k/m68k.c: Handle new str_align_* options.
308         * config/mips/mips.c (mips_set_compression_mode): Change
309         type of constants.
310         (mips_option_override): Set default values for options.
311         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
312         Likewise.
313         * config/rs6000/rs6000.c (rs6000_option_override_internal):
314         Likewise.
315         * config/rx/rx.c (rx_option_override): Likewise.
316         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
317         (LABEL_ALIGN): Use align_labels_log.
318         (LOOP_ALIGN): Use align_loops_align.
319         * config/s390/s390.c (s390_asm_output_function_label): Use new
320         macros.
321         * config/sh/sh.c (sh_override_options_after_change):
322         Change type of constants.
323         * config/spu/spu.c (spu_sched_init): Likewise.
324         * config/sparc/sparc.c (sparc_option_override): Set default
325         values for options.
326         * config/visium/visium.c (visium_option_override): Likewise.
327         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
328         emit p2align format with last argument if it's not needed.
329         * doc/invoke.texi: Document extended format of -falign-*.
330         * final.c: Use align_labels alignment.
331         * flags.h (struct target_flag_state): Change type to use
332         align_flags.
333         (struct align_flags_tuple): New.
334         (struct align_flags): Likewise.
335         (align_loops_log): Redefine macro to use new types.
336         (align_loops_max_skip): Redefine macro to use new types.
337         (align_jumps_log): Redefine macro to use new types.
338         (align_jumps_max_skip): Redefine macro to use new types.
339         (align_labels_log): Redefine macro to use new types.
340         (align_labels_max_skip): Redefine macro to use new types.
341         (align_functions_log): Redefine macro to use new types.
342         (align_loops): Redefine macro to use new types.
343         (align_jumps): Redefine macro to use new types.
344         (align_labels): Redefine macro to use new types.
345         (align_functions): Redefine macro to use new types.
346         (align_functions_max_skip): Redefine macro to use new types.
347         (align_loops_value): New macro.
348         (align_jumps_value): New macro.
349         (align_labels_value): New macro.
350         (align_functions_value): New macro.
351         * function.c (invoke_set_current_function_hook): Propagate
352         alignment values from flags to global variables default in
353         topleev.h.
354         * ipa-icf.c (sem_function::equals_wpa): Use
355         cl_optimization_option_eq instead of memcmp.
356         * lto-streamer.h (cl_optimization_stream_out): Support streaming
357         of string types.
358         (cl_optimization_stream_in): Likewise.
359         * optc-save-gen.awk: Support strings in cl_optimization.
360         * opth-gen.awk: Likewise.
361         * opts.c (finish_options): Remove error checking of invalid
362         value ranges.
363         (MAX_CODE_ALIGN): Remove.
364         (MAX_CODE_ALIGN_VALUE): Likewise.
365         (parse_and_check_align_values): New function.
366         (check_alignment_argument): Likewise.
367         (common_handle_option): Use check_alignment_argument.
368         * opts.h (parse_and_check_align_values): Declare.
369         * toplev.c (init_alignments): Remove.
370         (read_log_maxskip): New.
371         (parse_N_M): Likewise.
372         (parse_alignment_opts): Likewise.
373         (backend_init_target): Remove usage of init_alignments.
374         * toplev.h (parse_alignment_opts): Declare.
375         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
376         argument.
377         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
378         * tree.c (cl_option_hasher::equal): New.
379         * varasm.c: Use new global macros.
381 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
383         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
384         Use a simpler align directive also if MAXSKIP = ALIGN-1.
385         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
386         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
387         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
388         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
389         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
390         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
391         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
392         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
393         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
394         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
395         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
397 2018-07-04  Martin Liska  <mliska@suse.cz>
398             Jonathan Wakely  <jwakely@redhat.com>
400         * coverage.c: Use correct type.
401         * doc/invoke.texi: Language correction.
403 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
405         PR target/85620
406         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
407         ENDBRANCH for non-tail call which may return via indirect branch.
408         * doc/extend.texi: Document indirect_return attribute.
410 2018-07-03  Martin Sebor  <msebor@redhat.com>
412         PR tree-optimization/86274
413         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
414         precondition.
415         (format_floating): Correct handling of infinities and NaNs.
417 2018-07-03  Martin Sebor  <msebor@redhat.com>
419         * print-tree.c (print_real_cst): New function.
420         (print_node_brief): Call it.
421         (print_node): Ditto.
423 2018-07-03  Jeff Law  <law@redhat.com>
425         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
426         into a single pattern.
428         * config/h8300/h8300.md (ors code_iterator): New.
429         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
430         a single pattern and single splitter.
431         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
432         (iorqi3_1, xorqi3_1): Likewise.
433         (iorqi3, xorqi3 expanders): Similarly.
435         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
436         (movmd_internal) into a single pattern using the P mode iterator.
437         (movmd splitters): Similarly.
438         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
439         (movsd splitters): Similarly.
441         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
442         ADDB, ADDW and ADDL into a single ADD attribute which selects the
443         right table based on the size of the operand.
444         * config/h8300/h8300.md (length_table): Corresponding changes. All
445         references to "addb", "addw" and "addl" changed to "add".
446         (btst patterns): Merge two variants into a single pattern.
447         (tstqi, tsthi): Likewise.
448         (addhi3_incdec, addsi3_incdec): Likewise.
449         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
450         (mulhi3, mulsi3): Likewise.
451         (udivhi3, udivsi3): Likewise.
452         (divhi3, divsi3): Likewise.
453         (andorqi3, andorhi3, andorsi3): Likewise.
455 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
457         PR target/85694
458         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
459         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
461 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
463         PR tree-optimization/85694
464         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
465         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
466         UNSPEC_URHADD.
467         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
468         (<u>avg<mode>3_ceil): New patterns.
470 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
472         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
473         scan-tree-dump directive.
474         * gcc.dg/vect/slp-perm-2.c: Likewise.
475         * gcc.dg/vect/slp-perm-3.c: Likewise.
476         * gcc.dg/vect/slp-perm-5.c: Likewise.
477         * gcc.dg/vect/slp-perm-6.c: Likewise.
478         * gcc.dg/vect/slp-perm-7.c: Likewise.
479         * gcc.dg/vect/slp-perm-8.c: Likewise.
481 2018-07-03  Marek Polacek  <polacek@redhat.com>
483         PR middle-end/86202
484         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
486 2018-07-03  Richard Biener  <rguenther@suse.de>
488         PR ipa/86389
489         * tree-ssa-structalias.c (find_func_clobbers): Properly
490         handle indirect calls.
492 2018-07-03  Jeff Law  <law@redhat.com>
494         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
495         (shifts): New code iterator.
496         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
497         expander.  Fix HImode handling on H8/SX.
498         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
499         (subqi3, subhi3, subsi3 expanders): Likewise.
500         (andqi3, andhi3, andsi3 expanders): Likewise.
501         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
502         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
503         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
504         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
505         (zero_extendqihi2, zero_extendqisi2): Likewise.
506         (extendqihi2, extendqisi2): Likewise.
507         (rotlqi3, rotlhi3, rotlsi3): Likewise.
508         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
509         (rotlqi3_1, rotlhi3_1): Likewise.
510         (logicalhi3_sn, logicalsi3_sn): Likewise.
511         (logicalhi3, logicalsi3): Likewise.
513 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
515         * tree-vect-patterns.c (vect_recog_rotate_pattern)
516         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
517         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
518         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
519         type to append_pattern_def_seq instead of creating a stmt_vec_info
520         directly.
521         (build_mask_conversion): Likewise.  Remove vinfo argument.
522         (vect_add_conversion_to_patterm): Likewise, renaming to...
523         (vect_add_conversion_to_pattern): ...this.
524         (vect_recog_mask_conversion_pattern): Update call to
525         build_mask_conversion.  Pass the vector type to
526         append_pattern_def_seq here too.
527         (vect_recog_gather_scatter_pattern): Update call to
528         vect_add_conversion_to_pattern.
530 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
532         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
533         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
534         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
535         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
536         STMT_VINFO_PATTERN_DEF_SEQ to null here.
537         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
538         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
539         append_pattern_def_seq instead of new_pattern_def_seq.
540         (vect_recog_divmod_pattern): Do both of the above.
541         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
542         is null.
544 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
546         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
547         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
548         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
549         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
550         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
551         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
552         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
553         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
554         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
555         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
556         parameter with a single stmt_vec_info.
557         (vect_recog_func_ptr): Likewise.
558         (vect_recog_gather_scatter_pattern): Likewise, folding in...
559         (vect_try_gather_scatter_pattern): ...this.
560         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
561         the stmt_vec_info of the statement to be matched.  Don't clear
562         STMT_VINFO_RELATED_STMT.
563         (vect_pattern_recog): Update call accordingly.
565 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
567         PR tree-optimization/85694
568         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
569         (uavgM3_ceil): Document new optabs.
570         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
571         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
572         functions.
573         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
574         (savg_ceil_optab): New optabs.
575         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
576         (vect_vect_recog_func_ptrs): Add it.
577         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
578         constant directly from the associated lhs.
580 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
582         * tree-vect-patterns.c (vect_split_statement): New function.
583         (vect_convert_input): Use it to try to split an existing cast.
585 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
587         * poly-int.h (print_hex): New function.
588         * dumpfile.h (dump_dec, dump_hex): Declare.
589         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
590         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
591         min_input_precision, operation_precision and operation_sign.
592         * tree-vect-patterns.c (vect_get_range_info): New function.
593         (vect_same_loop_or_bb_p, vect_single_imm_use)
594         (vect_operation_fits_smaller_type): Delete.
595         (vect_look_through_possible_promotion): Add an optional
596         single_use_p parameter.
597         (vect_recog_over_widening_pattern): Rewrite to use new
598         stmt_vec_info infomration.  Handle one operation at a time.
599         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
600         (vect_truncatable_operation_p, vect_set_operation_type)
601         (vect_set_min_input_precision): New functions.
602         (vect_determine_min_output_precision_1): Likewise.
603         (vect_determine_min_output_precision): Likewise.
604         (vect_determine_precisions_from_range): Likewise.
605         (vect_determine_precisions_from_users): Likewise.
606         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
607         (vect_vect_recog_func_ptrs): Put over_widening first.
608         Add cast_forwprop.
609         (vect_pattern_recog): Call vect_determine_precisions.
611 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
613         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
614         statements that have been replaced by further pattern statements.
615         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
617 2018-07-03  Richard Biener  <rguenther@suse.de>
619         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
620         always set *dt.  Dump vectype in vectype overload.
621         * dumpfile.h (dump_gimple_expr): New function.
622         (dump_gimple_expr_loc): Likewise.
623         * dumpfile.c (dump_gimple_expr): New function.
624         (dump_gimple_expr_loc): Likewise.
626 2018-07-02  Jeff Law  <law@redhat.com>
628         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
629         the H8/300, H8/300H and H8/S variants into a single pattern.
630         (movhi_h8300, movqi_h8300hs): Similarly.
631         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
632         (QHI mode iterator): New.
634         * config/h8300/h8300.md: Remove trailing whitespace.
636 2018-07-02  Jim Wilson  <jimw@sifive.com>
638         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
639         instead of emit_insn for interrupt returns.
640         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
641         (riscv_sret, riscv_uret): Likewise.
643 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
645         * pretty-print.c (selftest::test_pp_format): Move save and restore
646         of quotes to class auto_fix_quotes, and add an instance.
647         * selftest.c: Include "intl.h".
648         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
649         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
650         * selftest.h (selftest::auto_fix_quotes): New class.
652 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
654         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
655         (aarch64_sve_prepare_conditional_op): Remove.
656         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
657         Allow aarch64_simd_reg_or_zero as select operand; remove
658         the aarch64_sve_prepare_conditional_op call.
659         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
660         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
661         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
662         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
663         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
664         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
665         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
666         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
667         and a splitters to match all of the *_any patterns.
668         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
670         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
671         (SVE_COND_FP_BINARY_REV): Remove.
672         (sve_int_op_rev, sve_fp_op_rev): New.
673         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
674         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
675         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
676         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
677         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
678         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
679         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
680         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
681         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
683         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
684         Remove match_dup 1 from the inner unspec.
685         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
687         * config/aarch64/aarch64.md (movprfx): New attr.
688         (length): Default movprfx to 8.
689         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
690         (*madd<SVE_I>, *msub<SVE_I): Likewise.
691         (*<su>mul<SVE_I>3_highpart): Likewise.
692         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
693         (*v<ASHIFT><SVE_I>3): Likewise.
694         (*<su><MAXMIN><SVE_I>3): Likewise.
695         (*<su><MAXMIN><SVE_F>3): Likewise.
696         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
697         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
698         (*div<SVE_F>4): Likewise.
700 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
702         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
703         in dump string.
705 2018-07-02  Richard Biener  <rguenther@suse.de>
707         PR tree-optimization/86363
708         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
709         memset argument refers to a non-variable address.
711 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
713         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
714         {PLUS,MINUS}_EXPR code to...
715         (adjust_symbolic_bound): ...here,
716         (combine_bound): ...here,
717         (set_value_range_with_overflow): ...and here.
719 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
721         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
722         code...
723         (extract_range_from_abs_expr): ...here.
725 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
727         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
728         -fno-omit-frame-pointer when not optimizing.
730 2018-07-02  Martin Liska  <mliska@suse.cz>
732         PR ipa/86279
733         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
734         (propagate_nothrow): Likewise.
736 2018-07-02  Martin Liska  <mliska@suse.cz>
738         PR ipa/86323
739         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
741 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
743         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
744         function in r262149, changing "loc" param from source_location to
745         const dump_location_t &.
746         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
747         declaration, as above.
749 2018-07-01  Paul Koning  <ni1d@arrl.net>
751         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
752         -munit-asm, -mgnu-asm, -mdec-asm.
753         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
754         (pdp11_output_labelref): New.
755         (pdp11_output_def): New.
756         (pdp11_output_addr_vec_elt): New.
757         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
758         %# and %@ format codes.
759         (pdp11_option_override): New.
760         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
761         (pdp11_output_ident): New.
762         (pdp11_asm_named_section): New.
763         (pdp11_asm_init_sections): New.
764         (pdp11_file_start): New.
765         (pdp11_file_end): New.
766         (output_ascii): Use .ascii/.asciz for -mdec-asm.
767         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
768         %o, like %c but octal.
769         (pdp11_option_override): New.
770         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
771         -mdec-asm.
772         (DATA_SECTION_ASM_OP): Ditto.
773         (READONLY_DATA_SECTION_ASM_OP): New.
774         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
775         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
776         (ASM_OUTPUT_LABELREF): Ditto.
777         (ASM_OUTPUT_DEF): Ditto.
778         (ASM_OUTPUT_EXTERNAL): New.
779         (ASM_OUTPUT_SOURCE_FILENAME): New.
780         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
781         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
782         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
783         %# and %@ format codes.
784         * config/pdp11/pdp11.opt (mgnu-asm): New.
785         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
786         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
787         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
789 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
791         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
792         dereferencing path[] beyond its length.
793         (debug_path): New.
794         (debug_all_paths): New.
795         (rewire_first_differing_edge): New.
796         (adjust_paths_after_duplication): New.
797         (duplicate_thread_path): Call adjust_paths_after_duplication.
798         Add new argument.
799         (thread_through_all_blocks): Add new argument to
800         duplicate_thread_path.
802 2018-06-30  Jim Wilson  <jimw@sifive.com>
804         * config/riscv/predicates.md (p2m1_shift_operand): New.
805         (high_mask_shift_operand): New.
806         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
807         pattern using p2m1_shift_operand.
808         (lshsi3_zero_extend_3+2): New combiner pattern using
809         high_mask_shift_operand.
811 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
813         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
814         split out from...
815         (vect_recog_rotate_pattern): ...here.
816         (vect_convert_input): Try to insert casts of invariants in the
817         preheader.
818         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
819         preheader to be empty.
821 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
823         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
824         vector type.  If given, install it in the new statement's
825         STMT_VINFO_VECTYPE.
826         (vect_element_precision): New function.
827         (vect_unpromoted_value): New struct.
828         (vect_unpromoted_value::vect_unpromoted_value): New function.
829         (vect_unpromoted_value::set_op): Likewise.
830         (vect_look_through_possible_promotion): Likewise.
831         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
832         (vect_widened_op_tree, vect_convert_input): Likewise.
833         (vect_convert_inputs, vect_convert_output): Likewise.
834         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
835         to handle the optional cast of the multiplication result and
836         vect_widened_op_tree to detect the widened multiplication itself.
837         Do not require the input and output of promotion casts to have
838         the same sign, but base the signedness of the operation on the
839         input rather than the result.  If the pattern includes two
840         promotions, check that those promotions have the same sign.
841         Do not restrict the MULT_EXPR handling to a double-width result;
842         handle quadruple-width results and wider.  Use vect_convert_inputs
843         to convert the inputs to the common type.
844         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
845         to handle the optional cast of the ABS result.  Also allow a sign
846         change or a sign extension between the ABS and MINUS.
847         Use vect_widened_op_tree to detect the widened subtraction and use
848         vect_convert_inputs to convert the inputs to the common type.
849         (vect_handle_widen_op_by_const): Delete.
850         (vect_recog_widen_op_pattern): New function.
851         (vect_recog_widen_mult_pattern): Use it.
852         (vect_recog_widen_shift_pattern): Likewise.
853         (vect_recog_widen_sum_pattern): Use
854         vect_look_through_possible_promotion to handle the promoted
855         PLUS_EXPR operand.
857 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
859         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
860         the containing gimple_seq *.
861         * gimple-iterator.h (gsi_for_stmt): Declare it.
862         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
863         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
864         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
865         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
866         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
867         checks.
868         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
869         split out from...
870         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
871         statement being replaced is part of an existing pattern
872         definition sequence, inserting the new pattern statements before
873         the original one.
874         (vect_pattern_recog_1): Don't return a bool.  If the statement
875         is already part of a pattern, instead apply pattern matching
876         to the pattern definition statements.  Don't clear the
877         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
878         (vect_pattern_recog): Don't break after the first match;
879         continue processing the pattern definition statements instead.
880         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
882 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
884         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
885         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
886         (vect_recog_widen_sum_pattern): Use it.
888 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
890         * tree-vect-loop.c (vectorizable_reduction): Assert that the
891         phi is not a pattern statement and has not been replaced by
892         a pattern statement.
893         * tree-vect-patterns.c (type_conversion_p): Don't check
894         STMT_VINFO_IN_PATTERN_P.
895         (vect_recog_vector_vector_shift_pattern): Likewise.
896         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
897         the pattern statement rather than the original statement; check
898         directly for a WIDEN_MULT_EXPR here.
899         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
900         vect_is_simple_use to return the pattern statement rather
901         than the original statement; use is_pattern_stmt_p to check
902         for such a pattern statement.
903         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
904         to return the pattern statement rather than the original statement;
905         don't do the same transformation here.
906         (vect_is_simple_use): If the defining statement has been replaced
907         by a pattern statement, return the pattern statement instead.
908         Remove the corresponding (local) transformation from the vectype
909         overload.
911 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
913         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
914         end and default to null.
915         * tree-vect-loop.c (vect_create_epilog_for_reduction)
916         (vectorizable_reduction): Update calls accordingly, dropping the
917         gimple ** argument if the passed-back statement isn't needed.
918         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
919         (vect_recog_rotate_pattern): Likewise.
920         (vect_recog_mask_conversion_pattern): Likewise.
921         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
922         (vect_mask_constant_operand_p): Likewise.
923         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
924         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
925         (get_group_load_store_type, get_load_store_type): Likewise.
926         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
927         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
928         (vectorizable_conversion, vectorizable_assignment): Likewise.
929         (vectorizable_shift, vectorizable_operation): Likewise.
930         (vectorizable_store, vect_is_simple_cond): Likewise.
931         (vectorizable_condition, vectorizable_comparison): Likewise.
932         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
933         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
934         and move it to the end.  Cope with null def_stmt_outs.
936 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
938         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
940 2018-06-29  Jeff Law  <law@redhat.com>
942         * config/v850/v850.c (v850_legitimate_address_p): Handle large
943         displacements for TARGET_V850E2V3 and newer.
944         (TARGET_LRA_P): Remove.  Defaults to LRA now.
945         * config/v850/v850.md (sign23byte_load): Remove.
946         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
947         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
949 2018-06-29  Martin Liska  <mliska@suse.cz>
951         PR lto/85759
952         * coverage.c (coverage_init): Mangle full path name.
953         * doc/invoke.texi: Document the change.
954         * gcov-io.c (mangle_path): New.
955         * gcov-io.h (mangle_path): Likewise.
956         * gcov.c (mangle_name): Use mangle_path for path mangling.
958 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
960         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
961         if starting source register is not even.
963 2018-06-29  Martin Liska  <mliska@suse.cz>
965         PR tree-optimization/86263
966         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
967         Make edge redirection.
969 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
971         * dumpfile.c (dump_loc): Add indentation based on scope depth.
972         (dump_scope_depth): New variable.
973         (get_dump_scope_depth): New function.
974         (dump_begin_scope): New function.
975         (dump_end_scope): New function.
976         * dumpfile.h (get_dump_scope_depth): New declaration.
977         (dump_begin_scope): New declaration.
978         (dump_end_scope): New declaration.
979         (class auto_dump_scope): New class.
980         (AUTO_DUMP_SCOPE): New macro.
981         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
982         AUTO_DUMP_SCOPE.
984 2018-06-29  Richard Biener  <rguenther@suse.de>
986         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
987         compute_all_dependences succeeds.
988         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
989         exceed --param loop-max-datarefs-for-datadeps.
991 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
993         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
995 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
997         PR target/86348
998         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
999         alternative 0 in preferred_for_speed attribute.
1001 2018-06-28  Paul Koning  <ni1d@arrl.net>
1003         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1004         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1005         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1006         * config/pdp11/pdp11.md: Correct "length" attribute calculation
1007         for shift insn patterns.
1009 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
1011         * cgraph.c (cgraph_node::get_body): Replace assignments to
1012         "dump_file" with calls to set_dump_file.
1013         * dumpfile.c (alt_dump_file): Make static, and group with...
1014         (alt_flags): ...this definition.
1015         (dumps_are_enabled): New variable.
1016         (refresh_dumps_are_enabled): New function.
1017         (set_dump_file): New function.
1018         (set_alt_dump_file): New function.
1019         (gcc::dump_manager::dump_start): Replace assignments to
1020         "dump_file" and "alt_dump_file" with calls to set_dump_file and
1021         set_alt_dump_file.
1022         (gcc::dump_manager::dump_finish): Likewise.
1023         * dumpfile.h (alt_dump_file): Delete decl.
1024         (dumps_are_enabled): New variable decl.
1025         (set_dump_file): New function decl.
1026         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1027         global.
1028         * tree-nested.c (lower_nested_functions): Replace assignments to
1029         "dump_file" with calls to set_dump_file.
1031 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1033         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1034         goto_locus of each outgoing edge of each basic block.
1036 2018-06-28  Richard Biener  <rguenther@suse.de>
1038         * dwarf2out.c (decl_scope_table): Remove.
1039         (push_decl_scope): Likewise.
1040         (pop_decl_scope): Likewise.
1041         (gen_type_die_for_member): Do not call push/pop_decl_scope.
1042         (gen_struct_or_union_type_die): Likewise.
1043         (gen_tagged_type_die): Likewise.
1044         (dwarf2out_init): Do not initialize decl_scope_table.
1045         (dwarf2out_c_finalize): Do not free it.
1047 2018-06-28  Richard Biener  <rguenther@suse.de>
1049         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1050         deciding whether to not re-use a DIE.
1052 2018-06-28  Richard Biener  <rguenther@suse.de>
1054         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1055         DW_AT_abstract_origin attribute.
1057 2018-06-28  Martin Liska  <mliska@suse.cz>
1059         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1060         Use newly introduced constants.
1061         * tree-switch-conversion.h (struct jump_table_cluster):
1062         Define max_ratio_for_size and max_ratio_for_speed.
1064 2018-06-28  Martin Liska  <mliska@suse.cz>
1066         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1067         Add new checking assert to catch invalid state.
1068         (jump_table_cluster::can_be_handled): Handle single case
1069         clusters.
1070         (jump_table_cluster::is_beneficial): Bail out for such case.
1071         (bit_test_cluster::find_bit_tests):
1072         Add new checking assert to catch invalid state.
1073         (bit_test_cluster::can_be_handled): Handle single case
1074         clusters.
1075         (bit_test_cluster::is_beneficial): Bail out for such case.
1076         (switch_decision_tree::analyze_switch_statement):
1077         Fix comment.
1079 2018-06-28  Martin Liska  <mliska@suse.cz>
1081         * common.opt: Introduce -completion option.
1082         * gcc.c (driver_handle_option): Handle it.
1083         (driver::main): Print completions if completion
1084         is set.
1085         * opt-suggestions.c (option_proposer::get_completions):
1086         New function.
1087         (option_proposer::suggest_completion): Likewise.
1088         (option_proposer::find_param_completions): Likewise.
1089         (verify_autocompletions): Likewise.
1090         (test_completion_valid_options): Likewise.
1091         (test_completion_valid_params): Likewise.
1092         (in_completion_p): Likewise.
1093         (empty_completion_p): Likewise.
1094         (test_completion_partial_match): Likewise.
1095         (test_completion_garbage): Likewise.
1096         (opt_proposer_c_tests): Likewise.
1097         * opt-suggestions.h: Declare new functions.
1098         * opts.c (common_handle_option): Handle OPT__completion_.
1099         * selftest-run-tests.c (selftest::run_tests): Add
1100         opt_proposer_c_tests.
1101         * selftest.c (assert_str_startswith): New.
1102         * selftest.h (assert_str_startswith): Likewise.
1103         (opt_proposer_c_tests): New.
1104         (ASSERT_STR_STARTSWITH): Likewise.
1106 2018-06-28  Martin Liska  <mliska@suse.cz>
1108         * Makefile.in: Add opt-suggestions.o.
1109         * gcc-main.c: Include opt-suggestions.h.
1110         * gcc.c (driver::driver): Likewise.
1111         (driver::~driver): Remove m_option_suggestions.
1112         (driver::build_option_suggestions): Moved to option_proposer.
1113         (driver::suggest_option): Likewise.
1114         (driver::handle_unrecognized_options): Use option_proposer.
1115         * gcc.h (class driver): Add new memver m_option_proposer.
1116         * opt-suggestions.c: New file.
1117         * opt-suggestions.h: New file.
1119 2018-06-28  Martin Liska  <mliska@suse.cz>
1121         * vec.h (class auto_string_vec): New (moved from auto_argvec).
1122         (auto_string_vec::~auto_string_vec): Likewise.
1124 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1126         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1127         prevent_decl_creation_for_types fields up and add reset_location field.
1128         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1129         statement if id->reset_location is true.
1130         (copy_edges_for_bb): Do not set goto_locus on the new edges if
1131         id->reset_location is true.
1132         (copy_phis_for_bb): Force input_location on the arguments if
1133         id->reset_location is true.
1134         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1135         is set on the function to be inlined.
1137 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
1139         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1141 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
1143         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1144         registers for Pmode.
1145         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1146         hard registers for the clobbered pseudo.
1148 2018-06-27  Paul Koning  <ni1d@arrl.net>
1150         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1151         mutually exclusive options.
1152         * config/pdp11/constraints.md (h): New constraint.
1153         (O): Update definition to match shift code generation.
1154         (D): New constraint.
1155         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1156         (CCFP): Remove.
1157         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1158         function.
1159         (output_jump): Change arguments.
1160         (pdp11_fixed_cc_regs): New function.
1161         (pdp11_cc_mode): Ditto.
1162         (pdp11_expand_shift): Ditto.
1163         (pdp11_assemble_shift): Ditto.
1164         (pdp11_small_shift): Ditto.
1165         (pdp11_branch_cost): Remove.
1166         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1167         from output.
1168         (pdp11_register_move_cost): Update for CC registers.
1169         (pdp11_rtx_costs): Add case for LSHIFTRT.
1170         (pdp11_output_jump): Add CCNZ mode conditional branches.
1171         (notice_update_cc_on_set): Remove.
1172         (pdp11_cc_mode): New function.
1173         (simple_memory_operand): Correct pre/post decrement case.
1174         (no_side_effect_operand): New function.
1175         (pdp11_regno_reg_class): Add CC_REGS class.
1176         (pdp11_fixed_cc_regs): New function.
1177         (pdp11_small_shift): New function.
1178         (pdp11_expand_shift): New function to expand shift insns.
1179         (pdp11_assemble_shift): New function to output shifts.
1180         (pdp11_branch_cost): Remove.
1181         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1182         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1183         (WCHAR_TYPE): Ditto.
1184         (PTRDIFF_TYPE): Ditto.
1185         (ADJUST_INSN_LENGTH): New macro.
1186         (FIXED_REGISTERS): Add CC registers.
1187         (CALL_USED_REGISTERS): Ditto.
1188         (reg_class): Ditto.
1189         (REG_CLASS_NAMES): Ditto.
1190         (REG_CLASS_CONTENTS): Ditto.
1191         (SELECT_CC_MODE): Use new function.
1192         (TARGET_FLAGS_REGNUM): New macro.
1193         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1194         (cc0_reg_rtx): Remove.
1195         (CC_STATUS_MDEP): Remove.
1196         (CC_STATUS_MDEFP_INIT): Remove.
1197         (CC_IN_FPU): Remove.
1198         (NOTICE_UPDATE_CC): Remove.
1199         (REGISTER_NAMES): Add CC registers.
1200         (BRANCH_COST): Change to constant 1.
1201         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1202         handling.
1203         * config/pdp11/pdp11.opt (mbcopy): Remove.
1204         (mbcopy-builtin): Remove.
1205         (mbranch-cheap): Remove.
1206         (mbranch-expensive): Remove.
1207         * config/pdp11/predicates.md (expand_shift_operand): Update to
1208         match shift code generation.
1209         (ccnz_operator): New predicate.
1210         * doc/invoke.texi (PDP-11 Options): Remove deleted options
1211         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1212         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
1213         exclusive options.
1214         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
1215         description of O constraint.
1217 2018-06-27  Jeff Law  <law@redhat.com>
1218             Austin Law  <austinklaw@gmail.com>
1220         * config/v850/v850.md (addsi3_set_flags): New pattern.
1221         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1222         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1223         (zero_extendhisi2_v850_set_flags): Likewise.
1224         (zero_extendqisi2_v850_set_flags): Likewise.
1225         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1226         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1227         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1229         * config/v850/v850-protos.h (notice_update_cc): Remove.
1230         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1231         (v850_print_operand): Handle 'D' and "d".
1232         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1233         Add handling of arithmetic/logical operations compared against zero.
1234         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1235         Do not look at v850_compare_op, instead get mode from last argument.
1236         (v850_gen_compare): Remove
1237         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1238         after reload for prologue insns.
1239         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1240         patterns.
1241         (construct_save_jarl): Likewise.
1242         (TARGET_FLAGS_REGNUM): Define.
1243         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1244         (NOTICE_UPDATE_CC): Remove.
1245         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1246         than cc0.  Conditionalize on reload_completed.
1247         (cmpsi_insn, setfcc_insn): Likewise.
1248         (tst1 splitter): Turn into define_and_split which sets the flags
1249         after reload.
1250         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1251         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1252         (cstoresf4, cstoredf4): Clobber the flags.
1253         (cmpsi, cmpsf, cmpdf): Remove expanders.
1254         (setf_insn): Remove pattern.
1255         (addsi3): Turn into define_and_split which clobbers the flags after
1256         reload and a suitable pattern (addsi3_clobber_flags) for use after
1257         reload.
1258         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1259         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1260         (ashrsi3, ashrsi3_v850e2): Likewise.
1261         (bins): Clobber the flags.
1262         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1263         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1264         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1265         (call_value_internal_short, call_value_internal_long): Likewise.
1266         (callt_save_interrupt, callt_return_interrupt): Likewise.
1267         (save_interrupt, return_interrupt): Likewise.
1268         (callt_save_all_interrupt, save_all_interrupt): Likewise.
1269         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1270         (restore_all_interrupt, _restore_all_interrupt): Likewise.
1271         (All FP comparisons): Only allow after reload has completed.
1272         (trfsr): Likewise.
1273         (divh, divhu): Tweak output template.
1274         (branch_z_normal, branch_z_invert): Remove
1275         (branch_nz_normal, branch_nz_invert): Likewise.
1276         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1278         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1279         * config/v850/v850.c (notice_update_cc): Remove.
1280         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
1281         (CC_NO_CARRY): Likewise.
1282         (NOTICE_UPDATE_CC): Define to nothing.
1283         * config/v850/v850.md: Remove block comment on cc0 handling
1284         Remove "cc" attribute from all patterns.  Remove cc_status handling
1285         from all patterns.  Minor formatting fixes.
1287 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1289         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1290         (cortex-a76.cortex-a55): Likewise.
1291         * config/aarch64/aarch64-tune.md: Regenerate.
1292         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1293         cortex-a76.cortex-a55.
1295 2018-06-27  Jeff Law  <law@redhat.com>
1297         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1298         (MULTILIB_DIRNAMES): Similarly.
1300 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
1302         * gimple.h (gimple_return_retbnd): Delete.
1303         (gimple_return_set_retbnd): Likewise.
1304         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1305         gimple_return_set_retbnd.
1306         * gimple-pretty-print.c (dump_gimple_return): Remove call to
1307         gimple_return_retbnd and adjust.
1308         * tree-inline.h (struct copy_body_data): Remove retbnd field.
1309         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1310         Explicitly return NULL in a couple more cases.  Move assertion
1311         on debug statements and remove unreachable code.
1312         (reset_debug_binding): Do not test id->retbnd.
1313         (expand_call_inline): Do not set it.
1315 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1317         * configure.ac: Add --disable-gcov option.
1318         * configure: Regenerate.
1319         * Makefile.in: Honour @enable_gcov@.
1320         * doc/install.texi: Document --disable-gcov.
1322 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1324         * config/arm/arm-cpus.in (cortex-a76): New entry.
1325         (cortex-a76.cortex-a55): Likewise.
1326         * config/arm/arm-tables.opt: Regenerate.
1327         * config/arm/arm-tune.md: Likewise.
1328         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1329         * doc/invoke.texi (ARM Options): Document cortex-a76 and
1330         cortex-a76.cortex-a55.
1332 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
1334         PR target/85769
1335         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1337 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1339         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1340         comment.
1341         (EPILOGUE_USES): Likewise.
1343 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
1345         * tree-inline.c (remap_location): New function extracted from...
1346         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
1347         (copy_phis_for_bb): ...here.  Call remap_location.
1348         (copy_cfg_body): Adjust call to copy_edges_for_bb.
1350 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1352         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1353         unaligned vsx for 16B memset.
1355 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
1357         PR target/86285
1358         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1359         ieee128_float_type_node to long_double_type_node unless
1360         TARGET_LONG_DOUBLE_128 is set.
1362 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
1364         * cfgloop.c (get_loop_location): Convert return type from
1365         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1366         by implicit construction from rtx_insn *, and using
1367         dump_user_location_t::from_function_decl for the fallback case.
1368         * cfgloop.h (get_loop_location): Convert return type from
1369         location_t to dump_user_location_t.
1370         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1371         dump_printf_loc to pass in a dump_location_t rather than a
1372         location_t, via the gimple stmt.
1373         * coverage.c (get_coverage_counts): Update calls to
1374         dump_printf_loc to pass in dump_location_t rather than a
1375         location_t.
1376         * doc/optinfo.texi (Dump types): Convert example of
1377         dump_printf_loc from taking "locus" to taking "insn".  Update
1378         description of the "_loc" calls to cover dump_location_t.
1379         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1380         "selftest.h".
1381         (dump_user_location_t::dump_user_location_t): New constructors,
1382         from gimple *stmt and rtx_insn *.
1383         (dump_user_location_t::from_function_decl): New function.
1384         (dump_loc): Make static.
1385         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1386         const dump_location_t &.
1387         (dump_generic_expr_loc): Delete.
1388         (dump_printf_loc): Convert param "loc" from location_t to
1389         const dump_location_t &.
1390         (selftest::test_impl_location): New function.
1391         (selftest::dumpfile_c_tests): New function.
1392         * dumpfile.h: Include "profile-count.h".
1393         (class dump_user_location_t): New class.
1394         (struct dump_impl_location_t): New struct.
1395         (class dump_location_t): New class.
1396         (dump_printf_loc): Convert 2nd param from source_location to
1397         const dump_location_t &.
1398         (dump_generic_expr_loc): Delete.
1399         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1400         const dump_location_t &.
1401         * gimple-fold.c (fold_gimple_assign): Update call to
1402         dump_printf_loc to pass in a dump_location_t rather than a
1403         location_t, via the gimple stmt.
1404         (gimple_fold_call): Likewise.
1405         * gimple-loop-interchange.cc
1406         (loop_cand::analyze_iloop_reduction_var): Update for change to
1407         check_reduction_path.
1408         (tree_loop_interchange::interchange): Update for change to
1409         find_loop_location.
1410         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1411         change in return-type of find_loop_location.
1412         (graphite_regenerate_ast_isl): Likewise.
1413         * graphite-optimize-isl.c (optimize_isl): Likewise.
1414         * graphite.c (graphite_transform_loops): Likewise.
1415         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1416         pass in a dump_location_t rather than a location_t, via the
1417         gimple stmt.
1418         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1419         * ipa.c (walk_polymorphic_call_targets): Likewise.
1420         * loop-unroll.c (report_unroll): Convert "locus" param from
1421         location_t to dump_location_t.
1422         (decide_unrolling): Update for change to get_loop_location's
1423         return type.
1424         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1425         location_t to dump_user_location_t.
1426         (grid_find_single_omp_among_assignments_1): Updates calls to
1427         dump_printf_loc to pass in a dump_location_t rather than a
1428         location_t, via the gimple stmt.
1429         (grid_parallel_clauses_gridifiable): Convert "tloc" from
1430         location_t to dump_location_t.  Updates calls to dump_printf_loc
1431         to pass in a dump_location_t rather than a location_t, via the
1432         gimple stmt.
1433         (grid_inner_loop_gridifiable_p): Likewise.
1434         (grid_dist_follows_simple_pattern): Likewise.
1435         (grid_gfor_follows_tiling_pattern): Likewise.
1436         (grid_target_follows_gridifiable_pattern): Likewise.
1437         (grid_attempt_target_gridification): Convert initialization
1438         of local "grid" from memset to zero-initialization; FIXME: does
1439         this require C++11?  Update call to dump_printf_loc to pass in a
1440         optinfo_location rather than a location_t, via the gimple stmt.
1441         * profile.c (read_profile_edge_counts): Updates call to
1442         dump_printf_loc to pass in a dump_location_t rather than a
1443         location_t
1444         (compute_branch_probabilities): Likewise.
1445         * selftest-run-tests.c (selftest::run_tests): Call
1446         dumpfile_c_tests.
1447         * selftest.h (dumpfile_c_tests): New decl.
1448         * tree-loop-distribution.c (pass_loop_distribution::execute):
1449         Update for change in return type of find_loop_location.
1450         * tree-parloops.c (parallelize_loops): Likewise.
1451         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1452         "locus" from location_t to dump_user_location_t.
1453         (canonicalize_loop_induction_variables): Likewise.
1454         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1455         for change in return type of find_loop_location.
1456         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1457         to dump_printf_loc to pass in a dump_location_t rather than a
1458         location_t, via the stmt.
1459         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1460         Likewise.
1461         * tree-vect-loop-manip.c (find_loop_location): Convert return
1462         type from source_location to dump_user_location_t.
1463         (vect_do_peeling): Update for above change.
1464         (vect_loop_versioning): Update for change in type of
1465         vect_location.
1466         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1467         from location_t to dump_user_location_t.
1468         (vect_estimate_min_profitable_iters): Update for change in type
1469         of vect_location.
1470         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1471         location_t to dump_location_t.
1472         (vect_slp_bb): Update for change in type of vect_location.
1473         * tree-vectorizer.c (vect_location): Convert from source_location
1474         to dump_user_location_t.
1475         (try_vectorize_loop_1): Update for change in vect_location's type.
1476         (vectorize_loops): Likewise.
1477         (increase_alignment): Likewise.
1478         * tree-vectorizer.h (vect_location): Convert from source_location
1479         to dump_user_location_t.
1480         (find_loop_location): Convert return type from source_location to
1481         dump_user_location_t.
1482         (check_reduction_path): Convert 1st param from location_t to
1483         dump_user_location_t.
1484         * value-prof.c (check_counter): Update call to dump_printf_loc to
1485         pass in a dump_user_location_t rather than a location_t; update
1486         call to error_at for change in type of "locus".
1487         (check_ic_target): Update call to dump_printf_loc to
1488         pass in a dump_user_location_t rather than a location_t, via the
1489         call_stmt.
1491 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
1493         * config/s390/s390.h (enum processor_flags): Do not use
1494         default tune parameter when -march was specified.
1496 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
1498         PR target/86314
1499         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1500         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1501         operands.
1503 2018-06-26  Richard Biener  <rguenther@suse.de>
1505         PR tree-optimization/86287
1506         PR bootstrap/86316
1507         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1508         (vect_analyze_loop): Initialize n_stmts.
1510 2018-06-26  Richard Biener  <rguenther@suse.de>
1512         PR middle-end/86271
1513         * fold-const.c (fold_convertible_p): Pointer extension
1514         isn't valid.
1516 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
1518         PR debug/86064
1519         * dwarf2out.c (loc_list_has_views): Adjust comments.
1520         (dw_loc_list): Split single cross-partition range with
1521         nonzero locview.
1523 2018-06-25  Jeff Law  <law@redhat.com>
1525         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1526         on -mbig-switch by default.
1528         * config/v850/predicates.md (const_float_1_operand): Fix match_code
1529         test.
1530         (const_float_0_operand): Remove unused predicate.
1531         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1532         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1533         (recipsf2): New expander.  Original pattern now called
1534         (recipsf2_insn).
1535         (recipdf2, recipdf2_insn): Similarly.
1536         (rsqrtsf2, rsqrtsf2_insn): Similarly
1537         (rsqrtdf2, rsqrtdf2_insn): Similarly
1539 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
1541         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
1542         Simplify logic for FreeBSD (twice).
1544 2018-06-25  Martin Sebor  <msebor@redhat.com>
1546         PR tree-optimization/86204
1547         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
1548         a strnlen result if it's less than the length of the string.
1550 2018-06-25  Martin Sebor  <msebor@redhat.com>
1552         PR tree-optimization/85700
1553         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
1554         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
1555         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
1557 2018-06-25  Martin Sebor  <msebor@redhat.com>
1559         * doc/extend.texi (Zero-length arrays): Update and clarify.
1561 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
1563         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1564         added IEEE/IBM long double multilib support on PowerPC little
1565         endian Linux systems.
1566         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1567         (MULTILIB_DEFAULTS): Likewise.
1568         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1569         Likewise.
1570         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1571         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1572         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1574 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
1576         PR middle-end/86311
1577         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1578         (REORDER_45): Likewise.
1580 2018-06-25  Jeff Law  <law@redhat.com>
1582         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1583         dividend to 32 bits.  Adjust length.
1584         (udivmodhi4): Cleanup output template.  Fix length.
1586 2018-06-25  Carl Love  <cel@us.ibm.com>
1588         * config/rs6000/vsx.md: Change word selector to prefered location.
1590 2018-06-25  Richard Biener  <rguenther@suse.de>
1592         PR tree-optimization/86304
1593         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1594         epilogue-if-converted loops as well.
1596 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
1598         * lto-section-out.c (lto_begin_section): Do not print section
1599         name for noaddr and unnumbered dumps.
1601 2018-06-25  Richard Biener  <rguenther@suse.de>
1603         * tree-vectorizer.h (struct vec_info_shared): New structure
1604         with parts split out from struct vec_info and loop_nest from
1605         struct _loop_vec_info.
1606         (struct vec_info): Adjust accordingly.
1607         (struct _loop_vec_info): Likewise.
1608         (LOOP_VINFO_LOOP_NEST): Adjust.
1609         (LOOP_VINFO_DATAREFS): Likewise.
1610         (LOOP_VINFO_DDRS): Likewise.
1611         (struct _bb_vec_info): Likewise.
1612         (BB_VINFO_DATAREFS): Likewise.
1613         (BB_VINFO_DDRS): Likewise.
1614         (struct _stmt_vec_info): Add dr_aux member.
1615         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1616         (DR_MISALIGNMENT_UNINITIALIZED): New.
1617         (set_dr_misalignment): Adjust.
1618         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1619         (vect_analyze_loop): Adjust prototype.
1620         (vect_analyze_loop_form): Likewise.
1621         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1622         Compute dependences lazily.
1623         (vect_record_base_alignments): Use shared datarefs/ddrs.
1624         (vect_verify_datarefs_alignment): Likewise.
1625         (vect_analyze_data_refs_alignment): Likewise.
1626         (vect_analyze_data_ref_accesses): Likewise.
1627         (vect_analyze_data_refs): Likewise.
1628         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1629         constructor parameter for shared part.
1630         (vect_analyze_loop_form): Pass in shared part and adjust.
1631         (vect_analyze_loop_2): Pass in storage for the number of
1632         stmts.  Move loop nest finding to the caller.  Compute
1633         datarefs lazily.
1634         (vect_analyze_loop): Pass in shared part.
1635         (vect_transform_loop): Verify shared datarefs are unchanged.
1636         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1637         constructor parameter for shared part.
1638         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1639         (vect_slp_bb): Verify shared datarefs are unchanged before
1640         transform.
1641         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1642         change.
1643         (new_stmt_vec_info): Initialize DR_AUX misalignment to
1644         DR_MISALIGNMENT_UNINITIALIZED.
1645         * tree-vectorizer.c (vec_info::vec_info): Add constructor
1646         parameter for shared part.
1647         (vec_info::~vec_info): Adjust.
1648         (vec_info_shared::vec_info_shared): New.
1649         (vec_info_shared::~vec_info_shared): Likewise.
1650         (vec_info_shared::save_datarefs): Likewise.
1651         (vec_info_shared::check_datarefs): Likewise.
1652         (try_vectorize_loop_1): Construct shared part live for analyses
1653         of a single loop for multiple vector sizes.
1654         * tree-parloops.c (gather_scalar_reductions): Adjust.
1656 2018-06-25  Richard Biener  <rguenther@suse.de>
1658         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1659         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1660         (vect_analyze_data_refs): Remove similar code from here and
1661         simplify accordingly.
1663 2018-06-25  Richard Biener  <rguenther@suse.de>
1665         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1666         for reverse storage order accesses rather than asserting
1667         they cannot happen here.
1669 2018-06-25  Tom de Vries  <tdevries@suse.de>
1671         PR debug/86257
1672         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1673         Use data16 instead of .byte for insn prefix.
1675 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
1677         PR C++/86082
1678         * parser.c (make_char_string_pack): Pass this literal chars
1679         through cpp_interpret_string.
1680         (cp_parser_userdef_numeric_literal): Check the result of
1681         make_char_string_pack.
1683 2018-06-24  Maya Rashish  <coypu@sdf.org>
1685         * ginclude/stddef.h: Simplify conditions around avoiding
1686         re-definition of __size_t.
1688 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1690         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1691         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1693 2018-06-22  Maya Rashish  <coypu@sdf.org>
1695         * doc/invoke.texi (mno-fancy-math-387): Update for changes
1696         made to OpenBSD and NetBSD through the years.
1698 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1700         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1701         behavior of vec_pack (vector double, vector double) to match
1702         behavior of vec_float2 (vector double, vector double).
1704 2018-06-22  Olivier Hainque  <hainque@adacore.com>
1706         * gimplify.c (gimplify_function_tree): Prevent creation
1707         of a trampoline for the address of the current function
1708         passed to entry/exit instrumentation hooks.
1710 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
1712         PR target/86222
1713         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
1714         correctly.
1716 2018-06-22  Martin Liska  <mliska@suse.cz>
1718         PR tree-optimization/86263
1719         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1720         Bail out if is_enabled is false.
1721         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
1722         New declaration.
1723         (jump_table_cluster::is_enabled): New function.
1725 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1727         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1728         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
1729         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
1730         (lto_input_ts_binfo_tree_pointers): Likewise.
1731         * tree-streamer-out.c (streamer_write_tree_bitfields,
1732         write_ts_binfo_tree_pointers): Likewise.
1733         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
1735 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1737         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
1739 2018-06-22  Martin Liska  <mliska@suse.cz>
1741         * symbol-summary.h (get): Make it pure and inline move
1742         functionality from ::get function.
1743         (get): Remove and inline into ::get and ::get_create.
1744         (get_create): Move code from ::get function.
1746 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1748         PR target/85994
1749         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
1750         -x assembler-with-cpp.
1752 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1754         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
1755         _FILE_OFFSET_BITS=64 for C++.
1757 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
1759         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
1760         conversion insn that shows up when pr85657-3.c is compiled using
1761         IEEE 128-bit long double.
1762         (neg<mode>2_internal): Use the correct mode to check whether the
1763         mode is IBM extended.
1764         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
1765         multiply and divide external functions from being created more
1766         than once.
1768 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1770         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
1771         functions.
1772         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
1773         the edge can be forwarded.
1774         (cfg_layout_merge_blocks): Likewise.
1776 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1778         * except.c (finish_eh_generation): Commit edge insertions only after
1779         the EH edges have been redirected from post-landing to landing pads.
1781 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1783         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
1784         create_tmp_var_for to create the FRAME decl.
1785         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
1787 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1789         * tree-inline.c (copy_edges_for_bb): Minor tweak.
1790         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
1791         debug statement when resetting its value.
1792         (expand_call_inline): Copy the locus of the call onto the assignment
1793         of the return value, if any.  Use local variable in more cases.
1795 2018-06-21  Martin Liska  <mliska@suse.cz>
1797         * ipa-pure-const.c (propagate_nothrow): Use
1798         funct_state_summaries->get.
1799         (dump_malloc_lattice): Likewise.
1800         (propagate_malloc): Likewise.
1802 2018-06-21  Richard Biener  <rguenther@suse.de>
1804         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
1805         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
1806         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
1807         comment.
1808         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
1809         BLOCK_ABSTRACT_ORIGIN unconditionally.
1811 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
1813         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
1814         deleting it.
1815         * ipa-reference.c (ipa_reference_c_finalize): Delete
1816         ipa_ref_opt_sum_summaries and set it to NULL.
1818 2018-06-21  Tom de Vries  <tdevries@suse.de>
1820         PR tree-optimization/85859
1821         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
1822         test with comment from bb_no_side_effects_p.
1824 2018-06-21  Richard Biener  <rguenther@suse.de>
1826         PR tree-optimization/86232
1827         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
1828         max for constant niter.
1830 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1832         * config/aarch64/aarch64-simd.md
1833         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
1835 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1837         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
1838         Make opernads of the unspec commutative.
1840 2018-06-21  Richard Biener  <rguenther@suse.de>
1842         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
1843         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
1844         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
1845         (vect_analyze_data_ref_dependence): Re-order checks to deal with
1846         NULL DR_STEP.
1847         (vect_record_base_alignments): Do not record base alignment
1848         for gathers or scatters.
1849         (vect_compute_data_ref_alignment): Drop return value that is always
1850         true.  Bail out early for gathers or scatters.
1851         (vect_enhance_data_refs_alignment): Bail out early for gathers
1852         or scatters.
1853         (vect_find_same_alignment_drs): Likewise.
1854         (vect_analyze_data_refs_alignment): Remove dead code.
1855         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1856         (vect_analyze_data_refs): For possible gathers or scatters do
1857         not create an alternate DR, just check their possible validity
1858         and mark them.  Adjust DECL_NONALIASED handling to not rely
1859         on DR_BASE_ADDRESS.
1860         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
1861         update inits of gathers or scatters.
1862         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
1863         Also copy gather/scatter flag to pattern vinfo.
1865 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1867         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1868         behavior of vec_packsu (vector unsigned long long, vector unsigned
1869         long long) to match behavior of vec_packs with same signature.
1871 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
1872             Thomas Schwinge <thomas@codesourcery.com>
1873             Cesar Philippidis  <cesar@codesourcery.com>
1875         * gimplify.c (gimplify_scan_omp_clauses): Add support for
1876         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1877         (gimplify_adjust_omp_clauses): Likewise.
1878         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
1879         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
1880         (gimplify_omp_target_update): Update handling of acc update and
1881         enter/exit data.
1882         * omp-low.c (install_var_field): Remove unused parameter
1883         base_pointers_restrict.
1884         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
1885         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
1886         FINALIZE}
1887         (omp_target_base_pointers_restrict_p): Delete.
1888         (scan_omp_target): Update call to scan_sharing_clauses.
1889         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
1890         FINALIZE}.
1891         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1892         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1893         (convert_local_omp_clauses): Likewise.
1894         * tree-pretty-print.c (dump_omp_clause): Likewise.
1895         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
1896         FINALIZE}.
1897         (omp_clause_code_name): Likewise.
1899 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
1901         PR debug/86194
1902         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
1903         be narrowed.
1905         PR tree-optimization/86231
1906         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
1907         anti-range don't overwrite *vr0min before using it to compute *vr0max.
1909 2018-06-20  Tom de Vries  <tdevries@suse.de>
1911         PR tree-optimization/86097
1912         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
1913         iv type if signedness of iv type is not the same as that of *nit.
1915 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
1917         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
1918         EDGE_EH edges, verify they are all EDGE_EH.
1920 2018-06-20  Maya Rashish  <coypu@sdf.org>
1922         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
1924 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1926         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
1927         * config/aarch64/aarch64.c (xgene1_tunings): Add
1928         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
1929         (aarch64_mode_valid_for_sched_fusion_p):
1930         Allow 16-byte modes.
1931         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
1932         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
1933         128-bit modes.
1934         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
1935         New pattern.
1936         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
1937         * config/aarch64/iterators.md (VQ2): New mode iterator.
1939 2018-06-20  Martin Liska  <mliska@suse.cz>
1941         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1942         Change default ratio from 10 to 8.
1944 2018-06-20  Martin Liska  <mliska@suse.cz>
1946         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1947         New.
1948         (bit_test_cluster::find_bit_tests): Likewise.
1949         (switch_decision_tree::analyze_switch_statement): Find clusters.
1950         * tree-switch-conversion.h (struct jump_table_cluster): Document
1951         hierarchy.
1953 2018-06-20  Martin Liska  <mliska@suse.cz>
1955         * tree-switch-conversion.c (switch_conversion::collect):
1956         Record m_uniq property.
1957         (switch_conversion::expand): Bail out for special conditions.
1958         (group_cluster::~group_cluster): New.
1959         (group_cluster::group_cluster): Likewise.
1960         (group_cluster::dump): Likewise.
1961         (jump_table_cluster::emit): New.
1962         (switch_decision_tree::fix_phi_operands_for_edges): New.
1963         (struct case_node): Remove struct.
1964         (jump_table_cluster::can_be_handled): New.
1965         (case_values_threshold): Moved to header.
1966         (reset_out_edges_aux): Likewise.
1967         (jump_table_cluster::is_beneficial): New.
1968         (bit_test_cluster::can_be_handled): Likewise.
1969         (add_case_node): Remove.
1970         (bit_test_cluster::is_beneficial): New.
1971         (case_bit_test::cmp): New.
1972         (bit_test_cluster::emit): New.
1973         (expand_switch_as_decision_tree_p): Remove.
1974         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
1975         (fix_phi_operands_for_edge): Likewise.
1976         (switch_decision_tree::analyze_switch_statement): New.
1977         (compute_cases_per_edge): Move ...
1978         (switch_decision_tree::compute_cases_per_edge): ... here.
1979         (try_switch_expansion): Likewise.
1980         (switch_decision_tree::try_switch_expansion): Likewise.
1981         (record_phi_operand_mapping): Likewise.
1982         (switch_decision_tree::record_phi_operand_mapping): Likewise.
1983         (emit_case_decision_tree): Likewise.
1984         (switch_decision_tree::emit): Likewise.
1985         (balance_case_nodes): Likewise.
1986         (switch_decision_tree::balance_case_nodes): Likewise.
1987         (dump_case_nodes): Likewise.
1988         (switch_decision_tree::dump_case_nodes): Likewise.
1989         (emit_jump): Likewise.
1990         (switch_decision_tree::emit_jump): Likewise.
1991         (emit_cmp_and_jump_insns): Likewise.
1992         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1993         (emit_case_nodes): Likewise.
1994         (switch_decision_tree::emit_case_nodes): Likewise.
1995         (conditional_probability): Remove.
1996         * tree-switch-conversion.h (enum cluster_type): New.
1997         (PRINT_CASE): New.
1998         (struct cluster): Likewise.
1999         (cluster::cluster): Likewise.
2000         (struct simple_cluster): Likewise.
2001         (simple_cluster::simple_cluster): Likewise.
2002         (struct group_cluster): Likewise.
2003         (struct jump_table_cluster): Likewise.
2004         (struct bit_test_cluster): Likewise.
2005         (struct min_cluster_item): Likewise.
2006         (struct case_tree_node): Likewise.
2007         (case_tree_node::case_tree_node): Likewise.
2008         (jump_table_cluster::case_values_threshold): Likewise.
2009         (struct case_bit_test): Likewise.
2010         (struct switch_decision_tree): Likewise.
2011         (struct switch_conversion): Likewise.
2012         (switch_decision_tree::reset_out_edges_aux): Likewise.
2014 2018-06-20  Martin Liska  <mliska@suse.cz>
2016         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2017         (hoist_edge_and_branch_if_true): Likewise.
2018         (expand_switch_using_bit_tests_p): Likewise.
2019         (struct case_bit_test): Likewise.
2020         (case_bit_test_cmp): Likewise.
2021         (emit_case_bit_tests): Likewise.
2022         (switch_conversion::switch_conversion): New class.
2023         (struct switch_conv_info): Remove old struct.
2024         (collect_switch_conv_info): More to ...
2025         (switch_conversion::collect): ... this.
2026         (check_range): Likewise.
2027         (switch_conversion::check_range): Likewise.
2028         (check_all_empty_except_final): Likewise.
2029         (switch_conversion::check_all_empty_except_final): Likewise.
2030         (check_final_bb): Likewise.
2031         (switch_conversion::check_final_bb): Likewise.
2032         (create_temp_arrays): Likewise.
2033         (switch_conversion::create_temp_arrays): Likewise.
2034         (free_temp_arrays): Likewise.
2035         (gather_default_values): Likewise.
2036         (switch_conversion::gather_default_values): Likewise.
2037         (build_constructors): Likewise.
2038         (switch_conversion::build_constructors): Likewise.
2039         (constructor_contains_same_values_p): Likewise.
2040         (switch_conversion::contains_same_values_p): Likewise.
2041         (array_value_type): Likewise.
2042         (switch_conversion::array_value_type): Likewise.
2043         (build_one_array): Likewise.
2044         (switch_conversion::build_one_array): Likewise.
2045         (build_arrays): Likewise.
2046         (switch_conversion::build_arrays): Likewise.
2047         (gen_def_assigns): Likewise.
2048         (switch_conversion::gen_def_assigns): Likewise.
2049         (prune_bbs): Likewise.
2050         (switch_conversion::prune_bbs): Likewise.
2051         (fix_phi_nodes): Likewise.
2052         (switch_conversion::fix_phi_nodes): Likewise.
2053         (gen_inbound_check): Likewise.
2054         (switch_conversion::gen_inbound_check): Likewise.
2055         (process_switch): Use the newly created class.
2056         (switch_conversion::expand): New.
2057         (switch_conversion::~switch_conversion): New.
2058         * tree-switch-conversion.h: New file.
2060 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2062         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2063         tree-vect-patterns.c.
2064         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2065         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
2066         (vect_recog_sad_pattern): Likewise.
2067         (vect_recog_widen_sum_pattern): Likewise.
2068         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
2069         (vect_recog_widen_shift_pattern): Remove the type_in argument.
2070         (vect_recog_rotate_pattern): Likewise.
2071         (vect_recog_mult_pattern): Likewise.
2072         (vect_recog_vector_vector_shift_pattern): Likewise.
2073         (vect_recog_divmod_pattern): Likewise.
2074         (vect_recog_mixed_size_cond_pattern): Likewise.
2075         (vect_recog_bool_pattern): Likewise.
2076         (vect_recog_mask_conversion_pattern): Likewise.
2077         (vect_try_gather_scatter_pattern): Likewise.
2078         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
2079         (vect_recog_over_widening_pattern): Likewise.
2080         (vect_recog_gather_scatter_pattern): Likewise.
2081         (vect_recog_func_ptr): Move from tree-vectorizer.h
2082         (vect_vect_recog_func_ptrs): Move further down the file.
2083         (vect_recog_func): Likewise.  Remove the third argument.
2084         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2085         (vect_pattern_recog_1): Expect the pattern function to do any
2086         necessary target tests.  Also expect it to provide a vector type.
2087         Remove the type_in handling.
2089 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2091         * tree-vect-patterns.c (vect_pattern_detected): New function.
2092         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2093         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2094         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2095         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2096         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2097         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2098         (vect_recog_mask_conversion_pattern)
2099         (vect_try_gather_scatter_pattern): Likewise.
2101 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2103         * tree-vect-patterns.c (vect_get_internal_def): New function.
2104         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2105         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2106         (search_type_for_mask_1): Use it.
2108 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2110         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2111         redundant WIDEN_SUM_EXPR handling.
2112         (vect_recog_sad_pattern): Likewise.
2114 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2116         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2117         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2118         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2119         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2120         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2122 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2124         * tree-vect-stmts.c (vectorizable_call): Make sure that we
2125         use the stmt_vec_info of the original bb statement for the
2126         new zero assignment, even if the call is part of a pattern.
2128 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2130         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2131         that the sequence is attached to the original statement rather
2132         than the pattern statement.
2133         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2134         PATTERN_DEF_SEQ from the original statement rather than
2135         the main pattern statement.
2136         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2137         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2138         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2140 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2142         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2143         definition statements before the early exit for statements that aren't
2144         live or relevant.
2145         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2146         split out from...
2147         (vect_transform_loop): ...here.  Process pattern definition
2148         statements without first checking whether the main pattern
2149         statement is live or relevant.
2151 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2153         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2154         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2156 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
2158         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2159         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2160         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2161         (expand_block_compare): Change select_block_compare_mode call.
2162         (expand_strncmp_align_check): Use new functions, fix comment.
2163         (emit_final_str_compare_gpr): New function.
2164         (expand_strn_compare): Refactor and clean up code.
2165         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2167 2018-06-19  Tony Reix  <tony.reix@atos.com>
2168             Damien Bergamini  <damien.bergamini@atos.com>
2169             David Edelsohn  <dje.gcc@gmail.com>
2171         * collect2.c (static_obj): New variable.
2172         (static_libs): New variable.
2173         (is_in_list): Uncomment declaration.
2174         (main): Track AIX libraries linked statically.
2175         (is_in_list): Uncomment definition.
2176         (scan_prog_file): Don't add AIX shared libraries initializer
2177         to constructor list if linking statically.
2179 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
2181         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2182         constant.
2183         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2185 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
2187         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2188         blocks.
2190 2018-06-19  Martin Liska  <mliska@suse.cz>
2192         * config/i386/i386.c (ix86_can_inline_p): Do not use
2193         ipa_fn_summaries::get_create.
2194         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2195         get.
2196         (devirtualization_time_bonus): Likewise.
2197         (ipcp_propagate_stage): Likewise.
2198         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2199         (edge_set_predicate): Likewise.
2200         (evaluate_conditions_for_known_args): Likewise.
2201         (evaluate_properties_for_edge): Likewise.
2202         (ipa_call_summary::reset): Tranform to ...
2203         (ipa_call_summary::~ipa_call_summary): ... this.
2204         (ipa_fn_summary::reset): Transform to ...
2205         (ipa_fn_summary::~ipa_fn_summary): ... this.
2206         (ipa_fn_summary_t::remove): Rename to ...
2207         (ipa_fn_summary_t::remove_callees): ... this.
2208         (ipa_fn_summary_t::duplicate): Use placement new
2209         instead of memory copy.
2210         (ipa_call_summary_t::duplicate): Likewise.
2211         (ipa_call_summary_t::remove): Remove.
2212         (dump_ipa_call_summary): Change get_create to get.
2213         (ipa_dump_fn_summary): Dump only when summary exists.
2214         (analyze_function_body): Use symbol_summary::get instead
2215         of get_create.
2216         (compute_fn_summary): Likewise.
2217         (estimate_edge_devirt_benefit): Likewise.
2218         (estimate_edge_size_and_time): Likewise.
2219         (inline_update_callee_summaries): Likewise.
2220         (remap_edge_change_prob): Likewise.
2221         (remap_edge_summaries): Likewise.
2222         (ipa_merge_fn_summary_after_inlining): Likewise.
2223         (write_ipa_call_summary): Likewise.
2224         (ipa_fn_summary_write): Likewise.
2225         (ipa_free_fn_summary): Likewise.
2226         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2227         (struct ipa_call_summary): Likewise.
2228         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2229         of get_create.
2230         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2231         (estimate_size_after_inlining): Likewise.
2232         (estimate_growth): Likewise.
2233         (growth_likely_positive): Likewise.
2234         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2235         (inline_call): Likewise.
2236         * ipa-inline.c (caller_growth_limits): Likewise.
2237         (can_inline_edge_p): Likewise.
2238         (can_inline_edge_by_limits_p): Likewise.
2239         (compute_uninlined_call_time): Likewise.
2240         (compute_inlined_call_time): Likewise.
2241         (want_inline_small_function_p): Likewise.
2242         (edge_badness): Likewise.
2243         (update_caller_keys): Likewise.
2244         (update_callee_keys): Likewise.
2245         (inline_small_functions): Likewise.
2246         (inline_to_all_callers_1): Likewise.
2247         (dump_overall_stats): Likewise.
2248         (early_inline_small_functions): Likewise.
2249         (early_inliner): Likewise.
2250         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2251         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2252         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2253         * ipa-split.c (execute_split_functions): Likewise.
2254         * symbol-summary.h: Likewise.
2255         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2257 2018-06-19  Richard Biener  <rguenther@suse.de>
2259         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2260         (vectorize_loops): ... here.  Fix dbgcnt handling.
2261         (try_vectorize_loop): Wrap try_vectorize_loop_1.
2263 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
2265         PR target/86197
2266         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2267         ieee128 argument takes up only one (vector) register, not two (floating
2268         point) registers.
2270 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2272         * gimplify.c (gimplify_init_constructor): Really never clear for an
2273         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2275 2018-06-19  Richard Biener  <rguenther@suse.de>
2277         PR tree-optimization/86179
2278         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2279         after failed recognition.
2281 2018-06-18  Martin Sebor  <msebor@redhat.com>
2283         PR middle-end/85602
2284         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2285         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2286         Handle integer subtraction.
2287         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2288         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2290 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2292         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2293         param from rtx to rtx_insn *.
2294         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2295         param.
2296         (frv_ifcvt_modify_insn): Likwise.
2297         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2298         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
2299         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2300         as_a <rtx_insn *> cast to local "unprotected_region" once
2301         it's been established that it's not NULL or pc_rtx.
2302         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2303         param "sethi" from rtx to rtx_insn *.
2304         (nds32_group_float_insns): Likewise for param "insn".
2305         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2306         param.
2307         (vax_output_int_subtract): Likewise.
2308         * config/vax/vax.c (vax_output_int_add): Likewise for param
2309         "insn".
2310         (vax_output_int_subtract): Likewise.
2311         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2312         (emit_pattern_after): Likewise for param "after".
2313         (emit_insn_after): Likewise.
2314         (emit_jump_insn_after): Likewise.
2315         (emit_call_insn_after): Likewise.
2316         (emit_debug_insn_after): Likewise.
2317         (emit_pattern_before): Likewise for param "before".
2318         (emit_insn_before): Likewise.
2319         (emit_jump_insn_before): Likewise.
2320         * final.c (get_insn_template): Likewise for param "insn", removing
2321         a cast.
2322         * output.h (get_insn_template): Likewise for 2nd param.
2323         * rtl.h (emit_insn_before): Likewise.
2324         (emit_jump_insn_before): Likewise.
2325         (emit_debug_insn_before_noloc): Likewise.
2326         (emit_insn_after): Likewise.
2327         (emit_jump_insn_after): Likewise.
2328         (emit_call_insn_after): Likewise.
2329         (emit_debug_insn_after): Likewise.
2330         (set_insn_deleted): Likewise for param.
2332 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
2334         PR target/85358
2335         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2336         floating point modes, so that IFmode is numerically greater than
2337         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2338         to declare the ordering.  This prevents IFmode from being
2339         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2340         machine.  Include rs6000-modes.h to share the fractional values
2341         between genmodes* and the rest of the compiler.
2342         (IFmode): Likewise.
2343         (KFmode): Likewise.
2344         (TFmode): Likewise.
2345         * config/rs6000/rs6000-modes.h: New file.
2346         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2347         meaning of rs6000_long_double_size so that 126..128 selects an
2348         appropriate 128-bit floating point type.
2349         (rs6000_option_override_internal): Likewise.
2350         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2351         (TARGET_LONG_DOUBLE_128): Change the meaning of
2352         rs6000_long_double_size so that 126..128 selects an appropriate
2353         128-bit floating point type.
2354         (LONG_DOUBLE_TYPE_SIZE): Update comment.
2355         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2356         source and destination to match the standard usage.
2357         (truncifkf2): Likewise.
2358         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2359         ISA 2.07 to use an explicit clobber, instead of passing in a
2360         temporary.
2361         (copysign<mode>3_soft): Likewise.
2363 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2365         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2366         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2367         (vect_slp_analyze_instance_dependence): Likewise.
2368         (vect_enhance_data_refs_alignment): Likewise.
2369         (vect_analyze_data_refs_alignment): Likewise.
2370         (vect_slp_analyze_and_verify_instance_alignment
2371         (vect_analyze_data_ref_accesses): Likewise.
2372         (vect_prune_runtime_alias_test_list): Likewise.
2373         (vect_analyze_data_refs): Likewise.
2374         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2375         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2376         (vect_analyze_scalar_cycles_1): Likewise.
2377         (vect_get_loop_niters): Likewise.
2378         (vect_analyze_loop_form_1): Likewise.
2379         (vect_update_vf_for_slp): Likewise.
2380         (vect_analyze_loop_operations): Likewise.
2381         (vect_analyze_loop): Likewise.
2382         (vectorizable_induction): Likewise.
2383         (vect_transform_loop): Likewise.
2384         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2385         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2386         (vect_make_slp_decision): Likewise.
2387         (vect_detect_hybrid_slp): Likewise.
2388         (vect_slp_analyze_operations): Likewise.
2389         (vect_slp_bb): Likewise.
2390         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2391         (vectorizable_bswap): Likewise.
2392         (vectorizable_call): Likewise.
2393         (vectorizable_simd_clone_call): Likewise.
2394         (vectorizable_conversion): Likewise.
2395         (vectorizable_assignment): Likewise.
2396         (vectorizable_shift): Likewise.
2397         (vectorizable_operation): Likewise.
2398         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2400 2018-06-18  Martin Sebor  <msebor@redhat.com>
2402         PR tree-optimization/81384
2403         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2404         * builtins.c (expand_builtin_strnlen): New function.
2405         (expand_builtin): Call it.
2406         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2407         * builtins.def (BUILT_IN_STRNLEN): New.
2408         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2409         Warn for bounds in excess of maximum object size.
2410         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2411         single-value ranges.  Handle strnlen.
2412         (handle_builtin_strlen): Handle strnlen.
2413         (strlen_check_and_optimize_stmt): Same.
2414         * doc/extend.texi (Other Builtins): Document strnlen.
2416 2018-06-18  Maya Rashish  <coypu@sdf.org>
2418         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2419         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2420         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2422         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2423         here to ...
2424         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2426 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2428         * tree.c (escaped_string::escape): Replace cast to char * by
2429         const_cast<char *> (unescaped).
2431 2018-06-18  Nick Clifton  <nickc@redhat.com>
2433         PR 84195
2434         * tree.c (escaped_string): New class.  Converts an unescaped
2435         string into its escaped equivalent.
2436         (warn_deprecated_use): Use the new class to convert the
2437         deprecation message, if present.
2438         (test_escaped_strings): New self test.
2439         (test_c_tests): Add test_escaped_strings.
2440         * doc/extend.texi (deprecated): Add a note that the
2441         deprecation message is affected by the -fmessage-length
2442         option, and that control characters will be escaped.
2443         (#pragma GCC error): Document this pragma.
2444         (#pragma GCC warning): Likewise.
2445         * doc/invoke.texi (-fmessage-length): Document this option's
2446         effect on the #warning and #error preprocessor directives and
2447         the deprecated attribute.
2449 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
2451         * tree.c (decl_value_expr_lookup): Revert latest change.
2452         (decl_value_expr_insert): Likewise.
2454 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
2456         * gimplify.c (nonlocal_vlas): Delete.
2457         (nonlocal_vla_vars): Likewise.
2458         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2459         referenced VLAs.
2460         (gimplify_body): Do not create and destroy nonlocal_vlas.
2461         * tree-nested.c: Include diagnostic.h.
2462         (use_pointer_in_frame): Tweak.
2463         (lookup_field_for_decl): Add assertion and declare the transformation.
2464         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2465         internal error when the reference is in a wrong context.  Do not
2466         create a debug decl by default.
2467         (note_nonlocal_block_vlas): Delete.
2468         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2469         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
2470         create a debug decl by default.
2471         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2472         call is in a wrong context.
2473         (fixup_vla_decls): New function.
2474         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
2475         debug variables were created.
2476         * tree.c (decl_value_expr_lookup): Add checking assertion.
2477         (decl_value_expr_insert): Likewise.
2479 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2481         PR middle-end/82479
2482         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2483         * tree-scalar-evolution.c (interpret_expr): Likewise.
2484         (expression_expensive_p): Likewise.
2485         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2486         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2487         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2488         (ssa_defined_by_minus_one_stmt_p): New.
2490 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2492         PR middle-end/64946
2493         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2494         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2495         * dojump.c (do_jump): Likewise.
2496         * expr.c (expand_expr_real_2): Check operand type's sign.
2497         * fold-const.c (const_unop): Handle ABSU_EXPR.
2498         (fold_abs_const): Likewise.
2499         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2500         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2501         (strip_sign_op_1): Likesise.
2502         * match.pd: Add new pattern to generate ABSU_EXPR.
2503         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2504         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2505         * tree-eh.c (operation_could_trap_helper_p): Likewise.
2506         * tree-inline.c (estimate_operator_cost): Likewise.
2507         * tree-pretty-print.c (dump_generic_node): Likewise.
2508         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2509         * tree.def (ABSU_EXPR): New.
2511 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
2513         PR middle-end/86095
2514         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2515         documented as preserved for backward compatibility only.
2516         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2518         PR rtl-optimization/86108
2519         * bb-reorder.c (create_forwarder_block): Renamed to ...
2520         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
2521         jump from new landing pad to the second part.
2522         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2523         Adjust callers.
2525 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
2527         PR middle-end/85878
2528         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2529         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2530         Only call store_expr for halves if the mode is the same.
2532         PR middle-end/86123
2533         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2534         Fix up comment formatting.
2536 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2538         * typed-splay-tree.h (typed_splay_tree::remove): New function.
2539         (typed_splay_tree::closure,
2540         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
2541         (typed_splay_tree::typed_splay_tree,
2542         typed_splay_tree::operator =): Declared private.
2543         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
2544         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
2545         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
2546         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
2547         typed_splay_tree::splay_tree_splay,
2548         typed_splay_tree::splay_tree_foreach_helper,
2549         typed_splay_tree::splay_tree_insert,
2550         typed_splay_tree::splay_tree_remove,
2551         typed_splay_tree::splay_tree_lookup,
2552         typed_splay_tree::splay_tree_predecessor,
2553         typed_splay_tree::splay_tree_successor,
2554         typed_splay_tree::splay_tree_min,
2555         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
2556         (typed_splay_tree::root, typed_splay_tree::comp,
2557         typed_splay_tree::delete_key,
2558         typed_splay_tree::delete_value): New data members.
2559         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
2560         typed_splay_tree::remove.
2562 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
2564         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2565         -mginv and -mno-ginv to the assembler.
2566         * config/mips/mips.opt (-mcrc): New option.
2567         (-mginv): Likewise.
2568         * doc/invoke.text (-mcrc): Document.
2569         (-mginv): Likewise.
2571 2018-06-15  Nick Clifton  <nickc@redhat.com>
2573         PR 84195
2574         * tree.c (escaped_string): New class.  Converts an unescaped
2575         string into its escaped equivalent.
2576         (warn_deprecated_use): Use the new class to convert the
2577         deprecation message, if present.
2578         (test_escaped_strings): New self test.
2579         (test_c_tests): Add test_escaped_strings.
2580         * doc/extend.texi (deprecated): Add a note that the
2581         deprecation message is affected by the -fmessage-length
2582         option, and that control characters will be escaped.
2583         (#pragma GCC error): Document this pragma.
2584         (#pragma GCC warning): Likewise.
2585         * doc/invoke.texi (-fmessage-length): Document this option's
2586         effect on the #warning and #error preprocessor directives and
2587         the deprecated attribute.
2589 2018-06-15  Richard Biener  <rguenther@suse.de>
2591         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2592         here, also noting vector size used.
2593         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
2594         size used in MSG_OPTIMIZED_LOCATIONS dump.
2595         (pass_slp_vectorize::execute): Adjust.
2597 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
2599         PR target/85968
2600         * config/arc/arc.c (arc_return_address_register): Fix
2601         if-condition.
2603 2018-06-15  Richard Biener  <rguenther@suse.de>
2605         PR middle-end/86159
2606         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2607         leave useless conversion stripping to force_gimple_operand_gsi.
2608         (gimplify_build2): Likewise.
2609         (gimplify_build1): Likewise.
2611 2018-06-15  Richard Biener  <rguenther@suse.de>
2613         PR middle-end/86076
2614         * tree-cfg.c (move_stmt_op): unshare invariant addresses
2615         before adjusting their block.
2617 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2619         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2620         multilibs for *-*-rtems*.
2621         * config/riscv/t-rtems: New file.
2623 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
2625         PR middle-end/86122
2626         * match.pd ((A +- CST1) +- CST2): Punt if last resort
2627         unsigned_type_for returns NULL.
2629         PR target/85945
2630         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2631         subregs of multi-word pseudos unless the float mode has word size.
2633 2018-06-14  Richard Biener  <rguenther@suse.de>
2635         PR middle-end/86139
2636         * tree-vect-generic.c (build_word_mode_vector_type): Remove
2637         duplicate and harmful type_hash_canon.
2638         * tree.c (type_hash_canon): Assert we didn't find ourselves.
2640 2018-06-14  Richard Biener  <rguenther@suse.de>
2642         PR ipa/86124
2643         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2644         NULL cgraph_node.
2646 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2648         * config/rtems.h (STDINT_LONG32): Define.
2650 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
2651             Prachi Godbole  <prachi.godbole@imgtec.com>
2653         * config/mips/mips-cpus.def: Define P6600.
2654         * config/mips/mips-tables.opt: Regenerate.
2655         * config/mips/mips.c (mips_ucbranch_type): New enum.
2656         (mips_rtx_cost_data): Add support for P6600.
2657         (mips_issue_rate): Likewise.
2658         (mips_multipass_dfa_lookahead): Likewise.
2659         (mips_avoid_hazard): Likewise.
2660         (mips_reorg_process_insns): Likewise.
2661         (mips_classify_branch_p6600): New function.
2662         * config/mips/mips.h (TUNE_P6600): New define.
2663         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2664         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2665         * config/mips/mips.md: Include p6600.md.
2666         (processor): Add p6600.
2667         * config/mips/p6600.md: New file.
2668         * doc/invoke.texi: Add p6600 to supported architectures.
2670 2018-06-13  Martin Sebor  <msebor@redhat.com>
2672         PR tree-optimization/86114
2673         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2674         of integer types.
2675         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2677 2018-06-13  Richard Biener  <rguenther@suse.de>
2679         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2680         Properly set vector type of the intermediate stmt.
2681         * tree-vect-stmts.c (vectorizable_operation): The destination
2682         var always has vectype_out type.
2684 2018-06-13  Jeff Law  <law@redhat.com>
2686         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2687         integer 0 for argument to print_rtl_with_bb.
2688         (rl78_reorg): Likewise.
2690 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
2692         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2693         from rtx to rtx_insn *.
2694         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2695         "label".
2696         (add_sched_insns_for_speculation): Likewise for local "target",
2697         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2698         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2699         from rtx_insn ** to rtx_code_label **.
2700         (reorg_emit_nops): Likewise.
2701         (c6x_reorg): Likewise for local "call_labels".
2702         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
2703         rtx to rtx_insn *.
2704         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
2705         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
2706         the loops over LABEL_REFS.
2707         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
2708         braf_label.
2709         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2710         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
2711         (split_branches): Strengthen local "olabel" from rtx to
2712         rtx_insn *, adding a safe_as_a cast.
2713         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
2714         to "rtx_insn *".
2715         (add_insn_after): Likewise for first two params.
2716         (add_insn_before): Likewise.
2717         (remove_insn): Likewise for param.
2718         (emit_pattern_before_noloc): Likewise for second and third params.
2719         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
2720         (emit_call_insn_before_noloc): Likewise.
2721         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
2722         to "rtx_insn *".
2723         (emit_barrier_before): Likewise.
2724         (emit_label_before): Strengthen "label" param from "rtx" to
2725         "rtx_code_label *".  Strengthen "before" param from "rtx" to
2726         "rtx_insn *".
2727         (emit_insn_after_1): Strengthen "after" param from "rtx" to
2728         "rtx_insn *".
2729         (emit_pattern_after_noloc): Likewise.
2730         (emit_insn_after_noloc): Likewise.
2731         (emit_jump_insn_after_noloc): Likewise.
2732         (emit_call_insn_after_noloc): Likewise.
2733         (emit_debug_insn_after_noloc): Likewise.
2734         (emit_barrier_after): Likewise.
2735         (emit_label_after): Likewise for both params.
2736         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
2737         "loc" param from "int" to "location_t".
2738         (emit_insn_after_setloc): Likewise.
2739         (emit_jump_insn_after_setloc): Likewise.
2740         (emit_call_insn_after_setloc): Likewise.
2741         (emit_debug_insn_after_setloc): Likewise.
2742         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
2743         "loc" param from "int" to "location_t".
2744         (emit_pattern_before): Convert NULL_RTX to NULL.
2745         (emit_insn_before_setloc): Convert "loc" param from "int" to
2746         "location_t".
2747         (emit_jump_insn_before_setloc): Likewise.
2748         (emit_call_insn_before_setloc): Likewise.
2749         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
2750         rtx_insn *.  Convert "loc" param from "int" to "location_t".
2751         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
2752         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
2753         Convert 3rd param from "int" to "location_t".
2754         (emit_barrier_before, emit_barrier_after, next_real_insn):
2755         Strengthen param from rtx to rtx_insn *.
2756         (emit_label_before): Strengthen 1st param from "rtx" to
2757         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
2758         "rtx_insn *".
2759         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
2760         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
2761         Strengthen 2nd param from "rtx" to "rtx_insn *".
2762         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
2763         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
2764         Likewise. Convert 3rd param from "int" to "location_t".
2765         (emit_label_after): Strengthen 1st param from "rtx" to
2766         "rtx_code_label *".
2767         (next_real_insn, remove_insn): Strengthen param from "rtx" to
2768         "rtx_insn *".
2769         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
2770         from "rtx" to "rtx_insn *".
2772 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
2774         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
2775         bodies streamed in with -Q.
2776         * dumpfile.c (dump_files): Add lto-stream-out dump file.
2777         * dumpfile.h (tree_dump_index): Add lto_stream_out.
2778         * gimple-streamer-out.c: Include gimple-pretty-print.h
2779         (output_bb): Dump stmts streamed.
2780         * lto-section-out.c: Include print-tree.h
2781         (lto_begin_section): Dump sections created.
2782         (lto_output_decl_index): Dump decl encoded.
2783         * lto-streamer-out.c: Include print-tree.h
2784         (create_output_block): Dump output block created.
2785         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
2786         (output_function): Dump function output.
2787         (output_constructor): Dump constructor streamed.
2788         (write_global_stream): Output indexes encoded.
2789         (produce_asm_for_decls): Dump streams encoded.
2790         * lto-streamer.c (streamer_dump_file): New global var.
2791         * lto-streamer.h (streamer_dump_file): Declare.
2792         * passes.c (ipa_write_summaries): Initialize streamer dump.
2793         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
2794         in.
2796 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
2798         PR target/86048
2799         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
2800         offsets for register save directives.  Emit a second batch of save
2801         directives, if need be, when the function accesses prior frames.
2803 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2805         * config/arc/fpu.md (fmasf4): Force operand to register.
2806         (fnmasf4): Likewise.
2808 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2810         * config/arc/arc-protos.h (arc_pad_return): Remove.
2811         * config/arc/arc.c (machine_function): Remove force_short_suffix
2812         and size_reason.
2813         (arc_print_operand): Adjust printing of '&'.
2814         (arc_verify_short): Remove conditional printing of short suffix.
2815         (arc_final_prescan_insn): Remove reference to size_reason.
2816         (pad_return): New function.
2817         (arc_reorg): Call pad_return.
2818         (arc_pad_return): Remove.
2819         (arc_init_machine_status): Remove reference to force_short_suffix.
2820         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
2821         (attr length): When attribute iscompact is true force to 2
2822         regardless; in the case of maybe check if we want to force the
2823         instruction to have 4 bytes length.
2824         (nopv): Change it to generate 4 byte long nop as well.
2825         (blockage): New pattern.
2826         (simple_return): Remove call to arc_pad_return.
2827         (p_return_i): Likewise.
2829 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2831         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2833 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2835         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
2836         ARC cores.
2838 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2840         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
2841         for ARC700 and ARCv2.
2843 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
2845         PR target/86076
2846         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
2847         operands[2] instead of operands[1].
2850 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
2852         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
2853         case, check whether the outer register overlaps an unallocatable
2854         register, not just whether it fits the required class.
2856 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
2858         * poly-int.h (can_div_trunc_p): Add new overload in which all values
2859         are poly_ints.
2860         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
2861         (memrefs_conflict_p): Likewise.
2862         (init_alias_analysis): Likewise.
2863         * cfgexpand.c (expand_debug_expr): Likewise.
2864         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
2865         * cse.c (fold_rtx): Likewise.
2866         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
2867         * expr.c (emit_block_move_hints): Likewise.
2868         (clear_storage_hints, push_block, emit_push_insn): Likewise.
2869         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
2870         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
2871         (emit_group_store): Likewise.
2872         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
2873         to read the PRE/POST_MODIFY increment.
2874         * calls.c (store_one_arg): Use strip_offset.
2875         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
2876         poly_int_rtx_p.
2877         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
2878         by a VEC_SELECT.
2879         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
2880         (simplify_binary_operation_1): Extend CONST_INT handling to
2881         poly_int_rtx_p.
2882         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
2883         than a HOST_WIDE_INT.
2884         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
2885         poly_int64.
2886         (adjust_mems, add_stores): Update accodingly.
2887         (vt_canonicalize_addr): Track polynomial offsets.
2888         (emit_note_insn_var_location): Likewise.
2889         (vt_add_function_parameter): Likewise.
2890         (vt_initialize): Likewise.
2892 2018-06-12  Jeff Law  <law@redhat.com>
2894         * config.gcc (alpha*-*-freebsd*): Remove.
2895         * config/alpha/freebsd.h: Remove.
2897 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
2899         PR other/69968
2900         * spellcheck-tree.c (levenshtein_distance): Rename to...
2901         (get_edit_distance): ...this, and update for underlying renaming.
2902         * spellcheck-tree.h (levenshtein_distance): Rename to...
2903         (get_edit_distance): ...this.
2904         * spellcheck.c (levenshtein_distance): Rename to...
2905         (get_edit_distance): ...this.  Convert from Levenshtein distance
2906         to Damerau-Levenshtein distance by supporting transpositions of
2907         adjacent characters.  Rename "v1" to "v_next" and "v0" to
2908         "v_one_ago".
2909         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
2910         (selftest::test_edit_distance_unit_test_oneway): ...this, and
2911         update for underlying renaming.
2912         (selftest::levenshtein_distance_unit_test): Rename to...
2913         (selftest::test_get_edit_distance_unit): ...this, and update for
2914         underlying renaming.
2915         (selftest::test_find_closest_string): Add example from PR 69968
2916         where transposition helps
2917         (selftest::test_metric_conditions): Update for renaming.
2918         (selftest::test_metric_conditions): Likewise.
2919         (selftest::spellcheck_c_tests): Likewise.
2920         * spellcheck.h (levenshtein_distance): Rename both overloads to...
2921         (get_edit_distance): ...this.
2922         (best_match::consider): Update for renaming.
2924 2018-06-12  Martin Sebor  <msebor@redhat.com>
2926         PR tree-optimization/85259
2927         * builtins.c (compute_objsize): Handle constant offsets.
2928         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
2929         true iff a warning has been issued.
2930         * gimple.h (gimple_nonartificial_location): New function.
2931         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
2932         gimple_nonartificial_location and handle -Wno-system-headers.
2933         (handle_builtin_stxncpy): Same.
2935 2018-06-12  Martin Sebor  <msebor@redhat.com>
2937         PR c/85931
2938         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2940 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
2942         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
2943         BUILTIN_VEC_XST entries for pointer to double and long long.
2945 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
2947         PR target/85990
2948         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2949         Update comments.
2950         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2951         Likewise.
2953 2018-06-12  Martin Liska  <mliska@suse.cz>
2955         * doc/options.texi: Document IntegerRange.
2957 2018-06-12  Martin Liska  <mliska@suse.cz>
2959         * config/i386/i386.opt: Make MPX-related options as Deprecated.
2960         * opt-functions.awk: Handle Deprecated flag.
2961         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
2962         and report error.
2963         (read_cmdline_option): Report warning for a deprecated option.
2964         * opts.h (struct cl_option): Add new field cl_deprecated.
2965         (CL_ERR_DEPRECATED): New.
2967 2018-06-12  Martin Liska  <mliska@suse.cz>
2969         * doc/options.texi: Document Deprecated option flag.
2971 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2973         * config/arc/arc-arch.h (arc_extras): New enum.
2974         (arc_cpu_t):Add field extra.
2975         (arc_cpu_types): Consider the extras.
2976         * config/arc/arc-cpus.def: Add extras info.
2977         * config/arc/arc-opts.h (processor_type): Consider extra field.
2978         * config/arc/arc.c (arc_override_options): Handle extra field.
2980 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2982         * config/arc/arc-arch.h: Update ARC_OPTX macro.
2983         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
2984         field.
2985         * config/arc/arc.c (arc_init): Update pic warning.
2986         (irq_range): Update irq range parsing warnings.
2987         (arc_override_options): Update various warning messages.
2988         (arc_handle_aux_attribute): Likewise.
2990 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
2992         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
2994 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2996         * doc/sourcebuild.texi: Document usage of line number 0 in verify
2997         compiler messages directives.
2999 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
3001         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3002         * config/mips/mips-tables.opt: Regenerate.
3003         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3004         mips64r6.
3005         * doc/invoke.texi: Document -march=i6500.
3007 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
3009         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3010         (i6400_gpmul): Add cpu_unit.
3011         (i6400_gpdiv): Likewise.
3012         (i6400_msa_add_d): Update reservations.
3013         (i6400_msa_int_add) Likewise.
3014         (i6400_msa_short_logic3) Likewise.
3015         (i6400_msa_short_logic2) Likewise.
3016         (i6400_msa_short_logic) Likewise.
3017         (i6400_msa_move) Likewise.
3018         (i6400_msa_cmp) Likewise.
3019         (i6400_msa_short_float2) Likewise.
3020         (i6400_msa_div_d) Likewise.
3021         (i6400_msa_long_logic1) Likewise.
3022         (i6400_msa_long_logic2) Likewise.
3023         (i6400_msa_mult) Likewise.
3024         (i6400_msa_long_float2) Likewise.
3025         (i6400_msa_long_float4) Likewise.
3026         (i6400_msa_long_float5) Likewise.
3027         (i6400_msa_long_float8) Likewise.
3028         (i6400_fpu_fadd): Include frint type.
3029         (i6400_fpu_store): New define_insn_reservation.
3030         (i6400_fpu_load): Likewise.
3031         (i6400_fpu_move): Likewise.
3032         (i6400_fpu_fcmp): Likewise.
3033         (i6400_fpu_fmadd): Likewise.
3034         (i6400_int_mult): Include imul3nc type and update reservation.
3035         (i6400_int_div): Include idiv3 type and update reservation.
3036         (i6400_int_load): Update to check type not move_type.
3037         (i6400_int_store): Likewise.
3038         (i6400_int_prefetch): Set zero latency.
3040 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3042         * gcc.c: Document new %@{...} sequence.
3043         (LINK_COMMAND_SPEC): Use it for the -L switches.
3044         (cpp_unique_options): Use it for the -I switches.
3045         (at_file_argbuf): New global variable.
3046         (in_at_file): Likewise.
3047         (alloc_args): Create at_file_argbuf.
3048         (clear_args): Truncate at_file_argbuf.
3049         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3050         (open_at_file): New function.
3051         (close_at_file): Likewise.
3052         (create_at_file): Delete.
3053         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3054         <'o'>: Likewise.
3055         <'@'>: New case.
3056         (validate_switches_from_spec): Deal with %@{...} sequence.
3057         (validate_switches): Likewise.
3058         (driver::finalize): Call clear_args.
3060 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
3062         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3064 2018-06-11  Martin Sebor  <msebor@redhat.com>
3066         * doc/invoke.texi (-Wall): List -Wc++17-compat.
3067         (Wno-class-memaccess): Add @opindex.
3068         (Wno-templates, Wno-multiple-inheritance): Same.
3069         (Wno-virtual-inheritance, Wno-namespaces): Same.
3070         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3071         (Wno-format-overflow, Wno-format-truncation): Same.
3072         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3073         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3074         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3075         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3076         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3077         (Wno-misspelled-isr): Same.
3079 2018-06-11  Martin Sebor  <msebor@redhat.com>
3081         * PR tree-optimization/86083
3082         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3084 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3086         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3088 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
3090         PR target/85755
3091         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3092         on the correct operand.
3093         (*movdi_internal64): Ditto.
3095 2018-06-11  Martin Liska  <mliska@suse.cz>
3097         PR tree-optimization/86089
3098         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3100 2018-06-11  Julia Koval  <julia.koval@intel.com>
3102         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3103         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3104         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3106 2018-06-11  Olivier Hainque  <hainque@adacore.com>
3108         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3109         for Ada with strict dwarf2.
3111 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
3113         PR target/85755
3114         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3115         addresses.
3117 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
3119         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3121 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
3123         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3124         TARGET_ELF.
3126 2018-06-08  Martin Liska  <mliska@suse.cz>
3128         * tree-cfg.h (debug_function): Fix argument type to match
3129         implementation.
3131 2018-06-08  Martin Liska  <mliska@suse.cz>
3133         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3134         Remove usage of MPX-related (and removed) fields.
3135         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3137 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3139         * cfg.c (debug): Use TDF_NONE rather than 0.
3140         * cfghooks.c (debug): Likewise.
3141         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3142         (struct dump_option_value_info): Convert to...
3143         (struct kv_pair): ...this template type.
3144         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3145         rather than 0.
3146         (optinfo_verbosity_options): Likewise.
3147         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3148         OPTGROUP_NONE.
3149         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3150         than int for "optgroup_flags" param.
3151         (dump_generic_expr_loc): Use dump_flags_t rather than int for
3152         "dump_kind" param.
3153         (dump_dec): Likewise.
3154         (dump_finish): Use TDF_NONE rather than 0.
3155         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3156         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
3157         than 0.  Update for change to option_ptr.
3158         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3159         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
3160         0.  Update for changes to optinfo_verbosity_options and
3161         optgroup_options.
3162         (opt_info_switch_p): Convert optgroup_flags from int to
3163         optgroup_flags_t.
3164         (dump_basic_block): Use dump_flags_t rather than int
3165         for "dump_kind" param.
3166         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3167         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3168         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3169         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3170         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3171         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3172         TDF_NONE): Convert from macros to...
3173         (enum dump_flag): ...this new enum.
3174         (dump_flags_t): Update to use enum.
3175         (operator|, operator&, operator~, operator|=, operator&=):
3176         Implement for dump_flags_t.
3177         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3178         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3179         Convert from macros to...
3180         (enum optgroup_flag): ...this new enum.
3181         (optgroup_flags_t): New typedef.
3182         (operator|, operator|=): Implement for optgroup_flags_t.
3183         (struct dump_file_info): Convert field "alt_flags" to
3184         dump_flags_t.  Convert field "optgroup_flags" to
3185         optgroup_flags_t.
3186         (dump_basic_block): Use dump_flags_t rather than int for param.
3187         (dump_generic_expr_loc): Likewise.
3188         (dump_dec): Likewise.
3189         (dump_register): Convert param "optgroup_flags" to
3190         optgroup_flags_t.
3191         (opt_info_enable_passes): Likewise.
3192         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3193         than 0.
3194         * gimple-pretty-print.c (debug): Likewise.
3195         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3196         (merged_store_group::apply_stores): Likewise.
3197         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3198         * gimple.c (verify_gimple_pp): Likewise.
3199         * graphite-poly.c (print_pbb_body): Likewise.
3200         * passes.c (pass_manager::register_one_dump_file): Convert
3201         local "optgroup_flags" to optgroup_flags_t.
3202         * print-tree.c (print_node): Use TDF_NONE rather than 0.
3203         (debug): Likewise.
3204         (debug_body): Likewise.
3205         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3206         to optgroup_flags_t.
3207         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3208         than 0.
3209         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3210         (convert_mult_to_fma): Likewise.
3211         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3212         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3213         * tree-vect-data-refs.c (dump_lower_bound): Convert param
3214         "dump_kind" to dump_flags_t.
3216 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3218         * config/rs6000/rs6000.c (min, max): Delete.
3220 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3222         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3223         -mabi=spe and -mabi=no-spe.
3225 2018-06-08  Martin Liska  <mliska@suse.cz>
3227         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3228         where we expect an existing summary.
3230 2018-06-08  Martin Liska  <mliska@suse.cz>
3232         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3233         * ipa-inline.h (estimate_edge_growth): Likewise.
3235 2018-06-08  Martin Liska  <mliska@suse.cz>
3237         * cgraph.c (function_version_hasher::hash): Use
3238         cgraph_node::get_uid ().
3239         (function_version_hasher::equal):
3240         * cgraph.h (cgraph_node::get_uid): New method.
3241         * ipa-inline.c (update_caller_keys): Use
3242         cgraph_node::get_uid ().
3243         (update_callee_keys): Likewise.
3244         * ipa-utils.c (searchc): Likewise.
3245         (ipa_reduced_postorder): Likewise.
3246         * lto-cgraph.c (input_node): Likewise.
3247         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3248         * symbol-summary.h (symtab_insertion): Likewise.
3249         (symtab_removal): Likewise.
3250         (symtab_duplication): Likewise.
3251         * tree-pretty-print.c (dump_function_header): Likewise.
3252         * tree-sra.c (convert_callers_for_node): Likewise.
3254 2018-06-08  Martin Liska  <mliska@suse.cz>
3256         * cgraph.c (symbol_table::create_edge): Always assign a new
3257         unique number.
3258         (symbol_table::free_edge): Do not recycle numbers.
3259         * cgraph.h (cgraph_edge::get): New method.
3260         * symbol-summary.h (symtab_removal): Use it.
3261         (symtab_duplication): Likewise.
3262         (call_summary::hashable_uid): Remove.
3264 2018-06-08  Martin Liska  <mliska@suse.cz>
3266         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3267         (initialize_growth_caches): Remove.
3268         (free_growth_caches): Likewise.
3269         (do_estimate_edge_time): Use edge_growth_cache.
3270         (do_estimate_edge_size): Likewise.
3271         (do_estimate_edge_hints): Likewise.
3272         * ipa-inline.c (reset_edge_caches): Likewise.
3273         (recursive_inlining): Likewise.
3274         (inline_small_functions): Likewise.
3275         * ipa-inline.h (initialize_growth_caches): Remove.
3276         (estimate_edge_size): Likewise.
3277         (estimate_edge_time): Likewise.
3278         (estimate_edge_hints): Likewise.
3279         (reset_edge_growth_cache): Likewise.
3280         * symbol-summary.h (call_summary::remove): New method.
3282 2018-06-08  Martin Liska  <mliska@suse.cz>
3284         * ipa-cp.c (class edge_clone_summary): New summary.
3285         (grow_edge_clone_vectors): Remove.
3286         (ipcp_edge_duplication_hook): Remove.
3287         (class edge_clone_summary_t): New call_summary class.
3288         (ipcp_edge_removal_hook): Remove.
3289         (edge_clone_summary_t::duplicate): New function.
3290         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3291         (create_specialized_node): Likewise.
3292         (ipcp_driver): Initialize edge_clone_summaries and do not
3293         register hooks.
3295 2018-06-08  Martin Liska  <mliska@suse.cz>
3297         * symbol-summary.h (get): New function.
3298         (call_summary::m_initialize_when_cloning): New class member.
3300 2018-06-08  Martin Liska  <mliska@suse.cz>
3302         * cgraph.c (cgraph_node::remove): Do not recycle uid.
3303         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3304         (symbol_table::allocate_cgraph_symbol): Do not set uid.
3305         * passes.c (uid_hash_t): Record removed_nodes by their uids.
3306         (remove_cgraph_node_from_order): Use the removed_nodes set.
3307         (do_per_function_toporder): Likwise.
3308         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3309         instead of summary_uid.
3310         (symtab_removal): Likewise.
3311         (symtab_duplication): Likewise.
3313 2018-06-08  Martin Liska  <mliska@suse.cz>
3315         * ipa-cp.c (ipcp_store_bits_results): Use
3316         ipcp_transformation_sum.
3317         (ipcp_store_vr_results): Likewise.
3318         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3319         to ...
3320         (ipcp_transformation_initialize): ... this.
3321         (ipa_set_node_agg_value_chain):
3322         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3323         (write_ipcp_transformation_info): Likewise.
3324         (read_ipcp_transformation_info): Likewise.
3325         (ipcp_update_bits): Likewise.
3326         (ipcp_update_vr): Likewise.
3327         (ipcp_transform_function): Likewise.
3328         * ipa-prop.h: Rename ipcp_transformation_summary to
3329         ipcp_transformation.
3330         (class ipcp_transformation_t): New function summary.
3331         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3332         (ipa_get_agg_replacements_for_node): Likewise.
3334 2018-06-08  Martin Liska  <mliska@suse.cz>
3336         * ipa-pure-const.c (struct funct_state_d): Do it class instead
3337         of struct.
3338         (class funct_state_summary_t): New function_summary class.
3339         (has_function_state): Remove.
3340         (get_function_state): Likewise.
3341         (set_function_state): Likewise.
3342         (add_new_function): Likewise.
3343         (funct_state_summary_t::insert): New function.
3344         (duplicate_node_data): Remove.
3345         (remove_node_data): Remove.
3346         (funct_state_summary_t::duplicate): New function.
3347         (register_hooks): Create new funct_state_summaries.
3348         (pure_const_generate_summary): Use it.
3349         (pure_const_write_summary): Likewise.
3350         (pure_const_read_summary): Likewise.
3351         (propagate_pure_const): Likewise.
3352         (propagate_nothrow): Likewise.
3353         (dump_malloc_lattice): Likewise.
3354         (propagate_malloc): Likewise.
3355         (execute): Do not register hooks, just remove summary
3356         instead.
3357         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3358         constructor.
3360 2018-06-08  Martin Liska  <mliska@suse.cz>
3362         * ipa-reference.c (remove_node_data): Remove.
3363         (duplicate_node_data): Likewise.
3364         (class ipa_ref_var_info_summary_t): New class.
3365         (class ipa_ref_opt_summary_t): Likewise.
3366         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3367         (get_reference_optimization_summary): Use
3368         ipa_ref_opt_sum_summaries.
3369         (set_reference_vars_info): Remove.
3370         (set_reference_optimization_summary): Likewise.
3371         (ipa_init): Create summaries.
3372         (init_function_info): Use function summary.
3373         (ipa_ref_opt_summary_t::duplicate): New function.
3374         (ipa_ref_opt_summary_t::remove): New function.
3375         (get_read_write_all_from_node): Fix GNU coding style.
3376         (propagate): Use function summary.
3377         (write_node_summary_p): Fix GNU coding style.
3378         (stream_out_bitmap): Likewise.
3379         (ipa_reference_read_optimization_summary): Use function summary.
3380         (ipa_reference_c_finalize): Do not release hooks.
3382 2018-06-08  Martin Liska  <mliska@suse.cz>
3384         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3385         (analyze_function_body): Extract multiple calls of get_create.
3386         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3387         * ipa-inline.c (recursive_inlining): Use ::get method.
3388         * ipa-inline.h (estimate_edge_growth): Likewise.
3390 2018-06-08  Martin Liska  <mliska@suse.cz>
3392         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3393         HSA_INVALID.
3394         (hsa_function_summary::hsa_function_summary): Use the new enum
3395         value.
3396         (hsa_gpu_implementation_p): Use hsa_summaries::get.
3397         * hsa-gen.c (hsa_get_host_function): Likewise.
3398         (get_brig_function_name): Likewise.
3399         * ipa-hsa.c (process_hsa_functions): Likewise.
3400         (ipa_hsa_write_summary): Likewise.
3401         * symbol-summary.h (symtab_duplication): Use ::get function/
3402         (get): New function.
3404 2018-06-08  Martin Liska  <mliska@suse.cz>
3406         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3407         of get.
3408         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3409         (hsa_register_kernel): Likewise.
3410         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3411         * hsa-gen.c (hsa_get_host_function): Likewise.
3412         (get_brig_function_name): Likewise.
3413         (generate_hsa): Likewise.
3414         (pass_gen_hsail::execute): Likewise.
3415         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3416         (devirtualization_time_bonus): Likewise.
3417         (ipcp_propagate_stage): Likewise.
3418         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3419         (edge_set_predicate): Likewise.
3420         (evaluate_conditions_for_known_args): Likewise.
3421         (evaluate_properties_for_edge): Likewise.
3422         (ipa_fn_summary::reset): Likewise.
3423         (ipa_fn_summary_t::duplicate): Likewise.
3424         (dump_ipa_call_summary): Likewise.
3425         (ipa_dump_fn_summary): Likewise.
3426         (analyze_function_body): Likewise.
3427         (compute_fn_summary): Likewise.
3428         (estimate_edge_devirt_benefit): Likewise.
3429         (estimate_edge_size_and_time): Likewise.
3430         (estimate_calls_size_and_time): Likewise.
3431         (estimate_node_size_and_time): Likewise.
3432         (inline_update_callee_summaries): Likewise.
3433         (remap_edge_change_prob): Likewise.
3434         (remap_edge_summaries): Likewise.
3435         (ipa_merge_fn_summary_after_inlining): Likewise.
3436         (ipa_update_overall_fn_summary): Likewise.
3437         (read_ipa_call_summary): Likewise.
3438         (inline_read_section): Likewise.
3439         (write_ipa_call_summary): Likewise.
3440         (ipa_fn_summary_write): Likewise.
3441         (ipa_free_fn_summary): Likewise.
3442         * ipa-hsa.c (process_hsa_functions): Likewise.
3443         (ipa_hsa_write_summary): Likewise.
3444         (ipa_hsa_read_section): Likewise.
3445         * ipa-icf.c (sem_function::merge): Likewise.
3446         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3447         (do_estimate_edge_time): Likewise.
3448         (estimate_size_after_inlining): Likewise.
3449         (estimate_growth): Likewise.
3450         (growth_likely_positive): Likewise.
3451         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3452         (inline_call): Likewise.
3453         * ipa-inline.c (caller_growth_limits): Likewise.
3454         (can_inline_edge_p): Likewise.
3455         (can_inline_edge_by_limits_p): Likewise.
3456         (compute_uninlined_call_time): Likewise.
3457         (compute_inlined_call_time): Likewise.
3458         (want_inline_small_function_p): Likewise.
3459         (edge_badness): Likewise.
3460         (update_caller_keys): Likewise.
3461         (update_callee_keys): Likewise.
3462         (recursive_inlining): Likewise.
3463         (inline_small_functions): Likewise.
3464         (inline_to_all_callers_1): Likewise.
3465         (dump_overall_stats): Likewise.
3466         (early_inline_small_functions): Likewise.
3467         (early_inliner): Likewise.
3468         * ipa-inline.h (estimate_edge_growth): Likewise.
3469         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3470         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3471         * ipa-prop.h (IPA_NODE_REF): Likewise.
3472         (IPA_EDGE_REF): Likewise.
3473         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3474         (propagate_malloc): Likewise.
3475         * ipa-split.c (execute_split_functions): Likewise.
3476         * symbol-summary.h: Rename get to get_create.
3477         (get): Likewise.
3478         (get_create): Likewise.
3479         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3481 2018-06-08  Martin Liska  <mliska@suse.cz>
3483         * symbol-summary.h (release): Move definition out of class
3484         declaration.
3485         (symtab_removal): Likewise.
3486         (symtab_duplication): Likewise.
3488 2018-06-08  Martin Liska  <mliska@suse.cz>
3490         * symbol-summary.h (function_summary): Move constructor
3491         implementation out of class declaration.
3492         (release): Likewise.
3493         (symtab_insertion): Likewise.
3494         (symtab_removal): Likewise.
3495         (symtab_duplication): Likewise.
3496         (get): Likewise.
3498 2018-06-08  Martin Liska  <mliska@suse.cz>
3500         * Makefile.in: Remove support for MPX (macros, related functions,
3501         fields in cgraph_node, ...).
3502         * builtin-types.def (BT_BND): Likewise.
3503         (BT_FN_BND_CONST_PTR): Likewise.
3504         (BT_FN_CONST_PTR_BND): Likewise.
3505         (BT_FN_VOID_PTR_BND): Likewise.
3506         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3507         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3508         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3509         (expand_builtin_mempcpy_with_bounds): Likewise.
3510         (expand_builtin_memset_with_bounds): Likewise.
3511         (expand_builtin_memset_args): Likewise.
3512         (std_expand_builtin_va_start): Likewise.
3513         (expand_builtin): Likewise.
3514         (expand_builtin_with_bounds): Likewise.
3515         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3516         (DEF_LIB_BUILTIN_CHKP): Likewise.
3517         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3518         (DEF_CHKP_BUILTIN): Likewise.
3519         (BUILT_IN_MEMCPY): Likewise.
3520         (BUILT_IN_MEMMOVE): Likewise.
3521         (BUILT_IN_MEMPCPY): Likewise.
3522         (BUILT_IN_MEMSET): Likewise.
3523         (BUILT_IN_STPCPY): Likewise.
3524         (BUILT_IN_STRCAT): Likewise.
3525         (BUILT_IN_STRCHR): Likewise.
3526         (BUILT_IN_STRCPY): Likewise.
3527         (BUILT_IN_STRLEN): Likewise.
3528         (BUILT_IN_MEMCPY_CHK): Likewise.
3529         (BUILT_IN_MEMMOVE_CHK): Likewise.
3530         (BUILT_IN_MEMPCPY_CHK): Likewise.
3531         (BUILT_IN_MEMSET_CHK): Likewise.
3532         (BUILT_IN_STPCPY_CHK): Likewise.
3533         (BUILT_IN_STRCAT_CHK): Likewise.
3534         (BUILT_IN_STRCPY_CHK): Likewise.
3535         * calls.c (store_bounds): Likewise.
3536         (emit_call_1): Likewise.
3537         (special_function_p): Likewise.
3538         (maybe_warn_nonstring_arg): Likewise.
3539         (initialize_argument_information): Likewise.
3540         (finalize_must_preallocate): Likewise.
3541         (compute_argument_addresses): Likewise.
3542         (expand_call): Likewise.
3543         * cfgexpand.c (expand_call_stmt): Likewise.
3544         (expand_return): Likewise.
3545         (expand_gimple_stmt_1): Likewise.
3546         (pass_expand::execute): Likewise.
3547         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
3548         (cgraph_node::remove): Likewise.
3549         (cgraph_node::dump): Likewise.
3550         (cgraph_node::verify_node): Likewise.
3551         * cgraph.h (chkp_function_instrumented_p): Likewise.
3552         (symtab_node::get_alias_target): Likewise.
3553         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
3554         (cgraph_local_p): Likewise.
3555         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
3556         (cgraph_edge::rebuild_references): Likewise.
3557         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
3558         (walk_polymorphic_call_targets): Likewise.
3559         (cgraph_node::expand_thunk): Likewise.
3560         (symbol_table::output_weakrefs): Likewise.
3561         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
3562         (ix86_handle_option): Likewise.
3563         * config/i386/constraints.md: Likewise.
3564         * config/i386/i386-builtin-types.def (BND): Likewise.
3565         (VOID): Likewise.
3566         (PVOID): Likewise.
3567         (ULONG): Likewise.
3568         * config/i386/i386-builtin.def (BDESC_END): Likewise.
3569         (BDESC_FIRST): Likewise.
3570         (BDESC): Likewise.
3571         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3572         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3573         * config/i386/i386.c (enum reg_class): Likewise.
3574         (ix86_target_string): Likewise.
3575         (ix86_option_override_internal): Likewise.
3576         (ix86_conditional_register_usage): Likewise.
3577         (ix86_valid_target_attribute_inner_p): Likewise.
3578         (ix86_set_indirect_branch_type): Likewise.
3579         (ix86_set_current_function): Likewise.
3580         (ix86_function_arg_regno_p): Likewise.
3581         (init_cumulative_args): Likewise.
3582         (ix86_function_arg_advance): Likewise.
3583         (ix86_function_arg): Likewise.
3584         (ix86_pass_by_reference): Likewise.
3585         (ix86_function_value_regno_p): Likewise.
3586         (ix86_function_value_1): Likewise.
3587         (ix86_function_value_bounds): Likewise.
3588         (ix86_return_in_memory): Likewise.
3589         (ix86_setup_incoming_vararg_bounds): Likewise.
3590         (ix86_va_start): Likewise.
3591         (indirect_thunk_need_prefix): Likewise.
3592         (print_reg): Likewise.
3593         (ix86_print_operand): Likewise.
3594         (ix86_expand_call): Likewise.
3595         (ix86_output_function_return): Likewise.
3596         (reg_encoded_number): Likewise.
3597         (BDESC_VERIFYS): Likewise.
3598         (ix86_init_mpx_builtins): Likewise.
3599         (ix86_init_builtins): Likewise.
3600         (ix86_emit_cmove): Likewise.
3601         (ix86_emit_move_max): Likewise.
3602         (ix86_expand_builtin): Likewise.
3603         (ix86_builtin_mpx_function): Likewise.
3604         (ix86_get_arg_address_for_bt): Likewise.
3605         (ix86_load_bounds): Likewise.
3606         (ix86_store_bounds): Likewise.
3607         (ix86_load_returned_bounds): Likewise.
3608         (ix86_store_returned_bounds): Likewise.
3609         (ix86_class_likely_spilled_p): Likewise.
3610         (ix86_hard_regno_mode_ok): Likewise.
3611         (x86_order_regs_for_local_alloc): Likewise.
3612         (ix86_mitigate_rop): Likewise.
3613         (ix86_bnd_prefixed_insn_p): Likewise.
3614         (ix86_mpx_bound_mode): Likewise.
3615         (ix86_make_bounds_constant): Likewise.
3616         (ix86_initialize_bounds): Likewise.
3617         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3618         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3619         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3620         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3621         (TARGET_CHKP_BOUND_MODE): Likewise.
3622         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3623         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3624         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3625         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3626         * config/i386/i386.h (TARGET_MPX): Likewise.
3627         (TARGET_MPX_P): Likewise.
3628         (VALID_BND_REG_MODE): Likewise.
3629         (FIRST_BND_REG): Likewise.
3630         (LAST_BND_REG): Likewise.
3631         (enum reg_class): Likewise.
3632         (BND_REG_P): Likewise.
3633         (BND_REGNO_P): Likewise.
3634         (BNDmode): Likewise.
3635         (ADJUST_INSN_LENGTH): Likewise.
3636         * config/i386/i386.md: Likewise.
3637         * config/i386/i386.opt: Likewise.
3638         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3639         (defined): Likewise.
3640         (LINK_MPX): Likewise.
3641         (MPX_SPEC): Likewise.
3642         (LIBMPX_SPEC): Likewise.
3643         (LIBMPXWRAPPERS_SPEC): Likewise.
3644         (CHKP_SPEC): Likewise.
3645         * config/i386/predicates.md: Likewise.
3646         * dbxout.c (dbxout_type): Likewise.
3647         * doc/extend.texi: Likewise.
3648         * doc/invoke.texi: Likewise.
3649         * doc/md.texi: Likewise.
3650         * doc/tm.texi: Likewise.
3651         * doc/tm.texi.in: Likewise.
3652         * dwarf2out.c (is_base_type): Likewise.
3653         (gen_formal_types_die): Likewise.
3654         (gen_subprogram_die): Likewise.
3655         (gen_type_die_with_usage): Likewise.
3656         (gen_decl_die): Likewise.
3657         (dwarf2out_late_global_decl): Likewise.
3658         * expr.c (expand_assignment): Likewise.
3659         (emit_storent_insn): Likewise.
3660         (store_expr_with_bounds): Likewise.
3661         (store_expr): Likewise.
3662         (expand_expr_real_1): Likewise.
3663         * expr.h (store_expr_with_bounds): Likewise.
3664         * function.c (use_register_for_decl): Likewise.
3665         (struct bounds_parm_data): Likewise.
3666         (assign_parms_augmented_arg_list): Likewise.
3667         (assign_parm_find_entry_rtl): Likewise.
3668         (assign_parm_is_stack_parm): Likewise.
3669         (assign_parm_load_bounds): Likewise.
3670         (assign_bounds): Likewise.
3671         (assign_parms): Likewise.
3672         (expand_function_start): Likewise.
3673         * gcc.c (CHKP_SPEC): Likewise.
3674         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3675         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3676         (wrestrict_dom_walker::check_call): Likewise.
3677         * gimple.c (gimple_build_call_from_tree): Likewise.
3678         * gimple.h (enum gf_mask): Likewise.
3679         (gimple_call_with_bounds_p): Likewise.
3680         (gimple_call_set_with_bounds): Likewise.
3681         * gimplify.c (gimplify_init_constructor): Likewise.
3682         * ipa-cp.c (initialize_node_lattices): Likewise.
3683         (propagate_constants_across_call): Likewise.
3684         (find_more_scalar_values_for_callers_subset): Likewise.
3685         * ipa-hsa.c (process_hsa_functions): Likewise.
3686         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3687         * ipa-icf.c (sem_function::merge): Likewise.
3688         * ipa-inline.c (early_inliner): Likewise.
3689         * ipa-pure-const.c (warn_function_noreturn): Likewise.
3690         (warn_function_cold): Likewise.
3691         (propagate_pure_const): Likewise.
3692         * ipa-ref.h (enum GTY): Likewise.
3693         * ipa-split.c (find_retbnd): Likewise.
3694         (consider_split): Likewise.
3695         (split_function): Likewise.
3696         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3697         * ipa.c (walk_polymorphic_call_targets): Likewise.
3698         (symbol_table::remove_unreachable_nodes): Likewise.
3699         (process_references): Likewise.
3700         (cgraph_build_static_cdtor_1): Likewise.
3701         * lto-cgraph.c (lto_output_node): Likewise.
3702         (output_refs): Likewise.
3703         (compute_ltrans_boundary): Likewise.
3704         (input_overwrite_node): Likewise.
3705         (input_node): Likewise.
3706         (input_cgraph_1): Likewise.
3707         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
3708         * passes.c (pass_manager::execute_early_local_passes): Likewise.
3709         (class pass_chkp_instrumentation_passes): Likewise.
3710         (make_pass_chkp_instrumentation_passes): Likewise.
3711         * passes.def: Likewise.
3712         * rtl.h (struct GTY): Likewise.
3713         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
3714         * stor-layout.c (layout_type): Likewise.
3715         * symtab.c: Likewise.
3716         * target.def: Likewise.
3717         * targhooks.c (default_chkp_bound_type): Likewise.
3718         (default_chkp_bound_mode): Likewise.
3719         (default_builtin_chkp_function): Likewise.
3720         (default_chkp_function_value_bounds): Likewise.
3721         (default_chkp_make_bounds_constant): Likewise.
3722         (default_chkp_initialize_bounds): Likewise.
3723         * targhooks.h (default_chkp_bound_type): Likewise.
3724         (default_chkp_bound_mode): Likewise.
3725         (default_builtin_chkp_function): Likewise.
3726         (default_chkp_function_value_bounds): Likewise.
3727         (default_chkp_make_bounds_constant): Likewise.
3728         (default_chkp_initialize_bounds): Likewise.
3729         * toplev.c (compile_file): Likewise.
3730         (process_options): Likewise.
3731         * tree-core.h (DEF_BUILTIN): Likewise.
3732         (DEF_BUILTIN_CHKP): Likewise.
3733         * tree-inline.c (declare_return_variable): Likewise.
3734         (remap_gimple_stmt): Likewise.
3735         (copy_bb): Likewise.
3736         (initialize_inlined_parameters): Likewise.
3737         (expand_call_inline): Likewise.
3738         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
3739         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
3740         (make_pass_ipa_chkp_produce_thunks): Likewise.
3741         (make_pass_chkp): Likewise.
3742         (make_pass_chkp_opt): Likewise.
3743         (make_pass_chkp_instrumentation_passes): Likewise.
3744         * tree-pretty-print.c (dump_generic_node): Likewise.
3745         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
3746         * tree-ssa-dce.c (propagate_necessity): Likewise.
3747         (eliminate_unnecessary_stmts): Likewise.
3748         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
3749         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3750         * tree-ssa-sccvn.h: Likewise.
3751         * tree-ssa-strlen.c (get_string_length): Likewise.
3752         (valid_builtin_call): Likewise.
3753         (adjust_last_stmt): Likewise.
3754         (handle_builtin_strchr): Likewise.
3755         (handle_builtin_strcpy): Likewise.
3756         (handle_builtin_stxncpy): Likewise.
3757         (handle_builtin_memcpy): Likewise.
3758         (handle_builtin_strcat): Likewise.
3759         (strlen_check_and_optimize_stmt): Likewise.
3760         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
3761         * tree-streamer-in.c: Likewise.
3762         * tree-streamer.c (record_common_node): Likewise.
3763         * tree.c (tree_code_size): Likewise.
3764         (wide_int_to_tree_1): Likewise.
3765         (type_contains_placeholder_1): Likewise.
3766         (build_common_tree_nodes): Likewise.
3767         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
3768         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
3769         (POINTER_BOUNDS_P): Likewise.
3770         (BOUNDED_TYPE_P): Likewise.
3771         (BOUNDED_P): Likewise.
3772         (CALL_WITH_BOUNDS_P): Likewise.
3773         (pointer_bounds_type_node): Likewise.
3774         * value-prof.c (gimple_ic): Likewise.
3775         * var-tracking.c (vt_add_function_parameters): Likewise.
3776         * varasm.c (make_decl_rtl): Likewise.
3777         (assemble_start_function): Likewise.
3778         (output_constant): Likewise.
3779         (maybe_assemble_visibility): Likewise.
3780         * varpool.c (ctor_for_folding): Likewise.
3781         * chkp-builtins.def: Remove.
3782         * ipa-chkp.c: Remove.
3783         * ipa-chkp.h: Remove.
3784         * rtl-chkp.c: Remove.
3785         * rtl-chkp.h: Remove.
3786         * tree-chkp-opt.c: Remove.
3787         * tree-chkp.c: Remove.
3788         * tree-chkp.h: Remove.
3790 2018-06-07  Carl Love  <cel@us.ibm.com>
3792         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
3793         vextract_fp_from_shortl): Add BE support.
3795 2018-06-07  Paul Koning  <ni1d@arrl.net>
3797         * compare-elim.c (try_merge_compare): Don't merge compare if
3798         address contains a side effect.
3799         (try_eliminate_compare): Likewise.
3801 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
3803         * config.gcc: Support "tremont".
3804         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
3805         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3806         PROCESSOR_TREMONT.
3807         * config/i386/i386.c (m_TREMONT): Define.
3808         (processor_target_table): Add "tremont".
3809         (PTA_TREMONT): Define.
3810         (ix86_lea_outperforms): Add TARGET_TREMONT.
3811         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
3812         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
3813         and M_INTEL_GOLDMONT_PLUS.
3814         (fold_builtin_cpu): Add "tremont".
3815         (ix86_add_stmt_cost): Add TARGET_TREMONT.
3816         (ix86_option_override_internal): Add "tremont".
3817         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
3818         (processor_type): Add PROCESSOR_TREMONT.
3819         * config/i386/x86-tune.def: Add m_TREMONT.
3820         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
3822 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3824         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
3825         symbol defined for msp430i* devices to be lower case.
3827         gcc/testsuite/gcc.target/msp430/
3828         * msp430i-device-symbol.c: New test.
3829         * msp430f-device-symbol.c: New test.
3830         * msp430.h: New test header file.
3832 2018-06-07  Richard Biener  <rguenther@suse.de>
3834         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
3835         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
3836         Properly wrap signed arithmetic if overflow wraps.
3838 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
3840         PR tree-optimization/69615
3841         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
3842         of a cast from a same precision integral SSA_NAME in a bb dominated
3843         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
3844         cast to utype if rhs2 has already a compatible type.
3846 2018-06-07  Richard Biener  <rguenther@suse.de>
3848         PR tree-optimization/85935
3849         * graphite-scop-detection.c (find_params_in_bb): Analyze
3850         condition operands with respect to the correct loop.  Assert
3851         the analysis doesn't fail.
3853 2018-06-04  Carl Love  <cel@us.ibm.com>
3855         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
3856         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
3857         as it is slightly cheaper.
3858         (first_match_or_eos_index_<mode>):
3859         Calculate index using natural element order.
3860         (first_match_index_<mode>):
3861         Calculate index using natural element order.
3862         (first_match_or_eos_index_<mode>):
3863         Calculate index using natural order.
3864         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3865         for BE and LE modes.
3866         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3867         P9V_BUILTIN_VCLZLSBB_V16QI.
3868         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3869         specific.
3871 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3873         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
3874         indentation and line wrap for many prototypes.  Add missing
3875         @smallexample directives around block of prototypes for vec_xl and
3876         vec_xst.
3878 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
3880         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3881         track if we pass or return IEEE 128-bit floating point.
3882         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3883         C++ mangling that is compatible with GCC 8.1.
3884         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3885         (init_cumulative_args): Note if we pass or return IEEE 128-bit
3886         floating point types.
3887         (rs6000_function_arg_advance_1): Likewise.
3888         (rs6000_mangle_type): Optionally generate mangled names that match
3889         what GCC 8.1 generated for IEEE 128-bit floating point types.
3890         (rs6000_globalize_decl_name): If we have an external function that
3891         passes or returns IEEE 128-bit types, generate a weak reference
3892         from the mangled name used in GCC 8.1 to the current mangled
3893         name.
3894         (rs6000_init_builtins): Make __ibm128 use the long double type if
3895         long double is IBM extended double.  Make __float128 use the long
3896         double type if long double is IEEE 128-bit.
3898         PR target/85657
3899         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3900         macro for __ibm128 built-in functions.
3901         (PACK_IF): Add __ibm128 pack/unpack functions.
3902         (UNPACK_IF): Likewise.
3903         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3904         enable long double built-in functions if long double is IEEE
3905         128-bit floating point.
3906         (rs6000_invalid_builtin): Update long double built-in function
3907         error message.
3908         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3909         functions, adjust the built-in function to use the long double
3910         built-in function if __ibm128 and long double are the same type.
3911         * doc/extend.texi (PowerPC builtins): Update documention for
3912         __builtin_{,un}pack_longdouble.  Add documentation for
3913         __builtin_{,un}pack_ibm128.
3915 2018-06-06  Jim Wilson  <jimw@sifive.com>
3917         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
3918         (struct machine_function): New field interrupt_mode.
3919         (riscv_handle_type_attribute): New function.  Add forward declaration.
3920         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
3921         (riscv_expand_epilogue): Check interrupt_mode field.
3922         (riscv_set_current_function): Check interrupt attribute args and
3923         set interrupt_mode field.
3924         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
3925         (riscv_sret, riscv_uret): New.
3926         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
3927         new arguments to interrupt attribute.
3929 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
3931         PR target/63177
3932         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3933         Don't handle -mcpu=power8 if -mpower9-vector is also used.
3935 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3937         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
3938         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
3939         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3940         several redundant entries.
3942 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
3944         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
3945         type from "rtx" to "rtx_insn *".
3946         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
3947         for local "call_insn", removing cast.
3948         (ix86_expand_call): Likewise, introducing a "call_insn" local.
3950 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
3952         PR tree-optimization/86066
3953         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
3954         for BIT_INSERT_EXPR stores.
3956 2018-06-06  Richard Biener  <rguenther@suse.de>
3958         PR tree-optimization/86062
3959         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3960         component refs ontop
3961         of to be offsetted base.
3963 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3965         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
3966         to be static and remove check on interrupt attribute name.
3968         gcc/testsuite/gcc.target/msp430/
3969         * function-attributes-4.c: New test.
3970         * static-interrupts.c: New test.
3972 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3974         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3975         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
3977 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
3979         PR target/79924
3980         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
3981         second argument.
3982         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
3983         Remove second argument, change how error is called.
3984         (aarch64_layout_arg): Remove second argument from
3985         aarch64_err_no_fpadvsimd call.
3986         (aarch64_init_cumulative_args): Ditto.
3987         (aarch64_gimplify_va_arg_expr): Ditto.
3988         * config/aarch64/aarch64.md (mov<mode>): Ditto.
3990 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
3992         * config/i386/i386.md (simple_return_indirect_internal): New expander.
3993         (*simple_return_indirect_internal<mode>): Rename from
3994         simple_return_indirect_internal.  Use W mode iterator.
3995         (rstorssp): New expander.
3996         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
3997         (clrssbsy): New expander.
3998         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
4000 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4002         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4003         __typeof__.
4004         (cmse_check_pointed_object): Likewise.
4006 2018-06-05  Martin Liska  <mliska@suse.cz>
4008         PR gcov-profile/47618
4009         * doc/invoke.texi: Document how -fprofile-dir format
4010         is extended.
4012 2018-06-05  Richard Biener  <rguenther@suse.de>
4014         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4015         removal pretend DOM info isn't available so we do not update
4016         it and only remove edges, not dominated blocks.  Actually free
4017         DOM info in case we removed something.  Remove unreachable blocks.
4018         (mfb_keep_latches): Work with either DOM info or marked backedges.
4019         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4020         first.  Mark backedges if DOM info isn't available.
4021         (Re-)compute DOM info after cleanup_control_flow_pre.
4023 2018-06-05  Richard Biener  <rguenther@suse.de>
4025         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4026         (locus_discrim_hasher::hash): Adjust.
4027         (locus_discrim_hasher::equal): Likewise.
4028         (next_discriminator_for_locus): Work on line directly.
4029         (same_line_p): Pass in expanded locus1 as well.
4030         (assign_discriminators): Avoid redundant location expansions.
4032 2018-06-05  Richard Biener  <rguenther@suse.de>
4034         PR tree-optimization/86046
4035         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4036         if required after clearing TREE_ADDRESSABLE.
4038 2018-06-05  Richard Biener  <rguenther@suse.de>
4040         PR tree-optimization/86047
4041         * tree-ssa-loop.c (for_each_index): Glob handling of all
4042         decls and constants and really handle all of them.
4044 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4046         PR target/81497
4047         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4048         qualifier_void_pointer and qualifier_const_void_pointer.
4049         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4050         (arm_init_builtins): Handle the above.
4051         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4052         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4053         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4054         void intrinsics.
4056 2018-06-05  Martin Liska  <mliska@suse.cz>
4058         * auto-profile.c (read_autofdo_file): Do not use
4059         gcov_ctr_summary struct.
4060         (afdo_callsite_hot_enough_for_early_inline): Likewise.
4061         * coverage.c (struct counts_entry): Likewise.
4062         (read_counts_file): Read just single summary entry.
4063         (get_coverage_counts): Use gcov_summary struct.
4064         * coverage.h (get_coverage_counts): Likewise.
4065         * gcov-dump.c (dump_working_sets): Likewise.
4066         (tag_summary): Dump just single summary.
4067         * gcov-io.c (gcov_write_summary): Write just histogram
4068         summary.
4069         (gcov_read_summary): Read just single summary.
4070         (compute_working_sets): Use gcov_summary struct.
4071         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4072         of GCOV_COUNTERS_SUMMABLE.
4073         (GCOV_COUNTERS_SUMMABLE): Remove.
4074         (GCOV_FIRST_VALUE_COUNTER): Replace with
4075         GCOV_COUNTER_V_INTERVAL.
4076         (struct gcov_ctr_summary): Remove.
4077         (struct gcov_summary): Directly use fields of former
4078         gcov_ctr_summary.
4079         (compute_working_sets): Use gcov_summary struct.
4080         * gcov.c (read_count_file): Do not use ctrs fields.
4081         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4082         struct.
4083         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4084         struct.
4085         * profile.c: Likewise.
4086         * profile.h: Likewise.
4088 2018-06-05  Martin Liska  <mliska@suse.cz>
4090         PR gcov-profile/84846
4091         * gcov.c (output_lines): Print working directory only
4092         in intermediate format.
4094 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
4096         * config/s390/s390-builtin-types.def: Add void function type.
4097         * config/s390/s390-builtins.def: Use the function type for the
4098         tbeginc builtin.
4100 2018-06-04  Jim Wilson  <jimw@sifive.com>
4102         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4103         to int.
4104         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4105         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
4106         handle EH_RETURN_DATA_REGNO registers properly.
4107         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4108         (riscv_expand_epilogue): Update comment.  Change argument name and
4109         type.  Update code to use new name and type.  Pass new args to
4110         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
4111         EXCEPTION_RETURN.
4112         * config/riscv/riscv.md (NORMAL_RETURN): New.
4113         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4114         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4115         (eh_return): Call gen_eh_return_internal and emit barrier.
4116         (eh_return_internal): Call riscv_expand_epilogue.
4118 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
4120         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4121         bit_insertion field and declare can_be_merged_into method.
4122         (merged_store_group::can_be_merged_into): New method.
4123         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4124         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
4125         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4127 2018-06-04  Richard Biener  <rguenther@suse.de>
4129         PR tree-optimization/85955
4130         * builtins.c (fold_builtin_sincos): Convert pointers to
4131         destination to appropriate type before dereferencing.
4133 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
4135         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4137 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
4139         * expr.c (expand_expr_real_1): Force the operand into memory if
4140         its TYPE_MODE is BLKmode and if there is no integer mode for
4141         the number of bits being extracted.
4143 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4145         PR target/85832
4146         PR target/86036
4147         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4148         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4150 2018-06-04  Richard Biener  <rguenther@suse.de>
4152         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4153         (cleanup_tree_cfg_noloop): ... single caller.  Do
4154         start_recording_case_labels later.
4156 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
4158         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4159         to _IMMINTRIN_H_INCLUDED.
4160         * config/i386/pconfigintrin.h: Ditto.
4161         * config/i386/waitpkgintrin.h: Ditto.
4162         * config/i386/immintrin.h: Add includes for sgxintrin.h,
4163         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4164         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4165         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4166         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4167         waitpkgintrin.h and cldemoteintrin.h.
4169 2018-06-04  Richard Biener  <rguenther@suse.de>
4171         PR tree-optimization/86038
4172         * tracer.c (find_best_successor): Check probability for
4173         being initialized, bail out if not.
4175 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
4177         PR target/86003
4178         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4179         of bits to ignore when comparing architectures.
4181 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4183         PR tree-optimization/69615
4184         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4185         maximum or minimum of the type, try to merge it also as if
4186         range1 is + [-, x - 1] or + [x + 1, -].
4188         PR c++/86025
4189         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4191 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
4193         PR tree-optimization/86034
4194         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4195         the unsigned bitfield type in a bit insertion sequence if it does not
4196         have a larger precision than the bitfield size.
4197         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4199 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
4201         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4203 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4205         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4206         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4207         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4208         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4210 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4212         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4213         Disable -fdelete-null-pointer-checks for ELF toolchain.
4215 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4216             Kito Cheng  <kito.cheng@gmail.com>
4218         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4219         (nds32le-*-*, nds32be-*-*): Integrate checking process.
4220         (nds32*-*-*): Add glibc and uclibc conditions.
4221         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4222         (TARGET_EXCEPT_UNWIND_INFO): Define.
4223         * config/nds32/elf.h: New file.
4224         * config/nds32/linux.h: New file.
4225         * config/nds32/nds32-elf.opt: New file.
4226         * config/nds32/nds32-linux.opt: New file.
4227         * config/nds32/nds32-fp-as-gp.c
4228         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4229         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4230         TARGET_LINUX_ABI.
4231         (nds32_asm_file_end): Ditto.
4232         (nds32_print_operand): Ditto.
4233         (nds32_insert_attributes): Ditto.
4234         (nds32_init_libfuncs): New function.
4235         (TARGET_HAVE_TLS): Define.
4236         (TARGET_INIT_LIBFUNCS): Define.
4237         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4238         spec content.
4239         (TARGET_ELF): Apply different mcmodel setting.
4240         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4241         been migrated into elf.h and linux.h files.
4242         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4243         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4244         (mcmodel): The content has been migrated into nds32-elf.opt and
4245         nds32-linux.opt files.
4246         * config/nds32/t-elf: New file.
4247         * config/nds32/t-linux: New file.
4249 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4250             Shiva Chen  <shiva0217@gmail.com>
4252         * config/nds32/constants.md (unspec_volatile_element): Add
4253         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4254         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4255         optimization.
4256         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4257         (make_pass_nds32_fp_as_gp): Declare.
4258         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4259         optmization pass.
4260         (nds32_asm_function_end_prologue): Remove unused asm output.
4261         (nds32_asm_function_begin_epilogue): Remove unused asm output.
4262         (nds32_asm_file_start): Output necessary fp_as_gp information.
4263         (nds32_option_override): Adjust register usage.
4264         (nds32_expand_prologue): Consider fp_as_gp situation.
4265         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4266         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4267         (epilogue): Ditto.
4268         (return): Ditto.
4269         (simple_return): Ditto.
4270         (omit_fp_begin): Output special directive for fp_as_gp.
4271         (omit_fp_end): Output special directive for fp_as_gp.
4272         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4273         mforbid-fp-as-gp): New options.
4275 2018-06-01  Mark Wielaard  <mark@klomp.org>
4277         * dwarf2out.c (dwarf2out_finish): Remove generation of
4278         DW_AT_loclists_base.
4280 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
4282         * gimple-ssa-store-merging.c: Include gimple-fold.h.
4283         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4284         (struct merged_store_group): Add bit_insertion field.
4285         (dump_char_array): Use standard hexadecimal format.
4286         (merged_store_group::merged_store_group): Set bit_insertion to false.
4287         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
4288         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
4289         also print the mask in the dump file.
4290         (pass_store_merging::gate): Minor tweak.
4291         (imm_store_chain_info::coalesce_immediate): Fix wrong association
4292         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
4293         stores with INTEGER_CST stores.
4294         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4295         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4296         and use it throughout.  Generate bit insertion sequences if need be.
4297         (pass_store_merging::process_store): Remove redundant condition.
4298         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4300 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
4302         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4303         the 128-bit floating point types.  Fix function comment.
4305 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4307         * config/aarch64/aarch64-simd.md
4308         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4309         mnemonics.
4310         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4311         mnemonics.
4313 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4315         PR tree-optimization/85989
4316         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4317         variable.
4318         (backprop::intersect_uses): Check it when deciding whether this
4319         is a backedge reference.
4320         (backprop::process_block): Add each phi to m_visited_phis
4321         after visiting it, then clear it at the end.
4323 2018-06-01  Richard Biener  <rguenther@suse.de>
4325         * tree-vectorizer.h (vect_dr_stmt): New function.
4326         (vect_get_load_cost): Adjust.
4327         (vect_get_store_cost): Likewise.
4328         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4329         Use vect_dr_stmt instead of DR_SMTT.
4330         (vect_record_base_alignments): Likewise.
4331         (vect_calculate_target_alignment): Likewise.
4332         (vect_compute_data_ref_alignment): Likewise and make static.
4333         (vect_update_misalignment_for_peel): Likewise.
4334         (vect_verify_datarefs_alignment): Likewise.
4335         (vector_alignment_reachable_p): Likewise.
4336         (vect_get_data_access_cost): Likewise.  Pass down
4337         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4338         (vect_get_peeling_costs_all_drs): Likewise.
4339         (vect_peeling_hash_get_lowest_cost): Likewise.
4340         (vect_enhance_data_refs_alignment): Likewise.
4341         (vect_find_same_alignment_drs): Likewise.
4342         (vect_analyze_data_refs_alignment): Likewise.
4343         (vect_analyze_group_access_1): Likewise.
4344         (vect_analyze_group_access): Likewise.
4345         (vect_analyze_data_ref_access): Likewise.
4346         (vect_analyze_data_ref_accesses): Likewise.
4347         (vect_vfa_segment_size): Likewise.
4348         (vect_small_gap_p): Likewise.
4349         (vectorizable_with_step_bound_p): Likewise.
4350         (vect_prune_runtime_alias_test_list): Likewise.
4351         (vect_analyze_data_refs): Likewise.
4352         (vect_supportable_dr_alignment): Likewise.
4353         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4354         (vect_gen_prolog_loop_niters): Likewise.
4355         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4356         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4357         modify DR_STMT.
4358         (vect_recog_mask_conversion_pattern): Likewise.
4359         (vect_try_gather_scatter_pattern): Likewise.
4360         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4361         to vect_get_store_cost.
4362         (vect_get_store_cost): Get stmt_info instead of DR.
4363         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4364         (vect_get_load_cost): Get stmt_info instead of DR.
4366 2018-06-01  Richard Biener  <rguenther@suse.de>
4368         PR middle-end/86017
4369         * gimple-fold.c (var_decl_component_p): Also allow offsetted
4370         vars wrapped in MEM_REFs.
4372 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4374         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4375         Fix subreg tests so that we only return a choice between
4376         GENERAL_REGS and FP_REGS if the original classes included both.
4378 2018-06-01  Richard Biener  <rguenther@suse.de>
4380         PR ipa/85960
4381         * tree-ssa-structalias.c (get_function_part_constraint):
4382         Handle NULL fi->decl.
4383         (find_func_aliases_for_call): Properly handle indirect
4384         fi from direct call.
4385         (find_func_clobbers): Likewise.
4386         (ipa_pta_execute): Likewise.
4387         (create_variable_info_for): For functions that are ifunc_resolver
4388         resolve to a varinfo that contains the result of the resolver call.
4389         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4390         aliases.
4392 2018-05-31  Michael Collison  <michael.collison@arm.com>
4394         * config/aarch64/aarch64.md:
4395         (*fix_to_zero_extenddfdi2): New pattern.
4396         * gcc.target/aarch64/fix_extend1.c: New testcase.
4398 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
4400         PR middle-end/78809
4401         PR middle-end/83026
4402         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4403         and BUILT_IN_STRNCMP_EQ.
4404         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4405         BUILT_IN_STRNCMP_EQ.
4406         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4407         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4408         (gimple_fold_builtin): Likewise.
4409         * tree-ssa-strlen.c (compute_string_length): New function.
4410         (determine_min_obsize): New function.
4411         (handle_builtin_string_cmp): New function to handle calls to
4412         string compare functions.
4413         (strlen_optimize_stmt): Add handling to builtin string compare
4414         calls.
4415         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4416         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4417         * tree.c (build_common_builtin_nodes): Add new defines of
4418         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4420 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
4422         PR target/85984
4423         * bb-reorder.c (pass_partition_blocks::gate): Return false for
4424         functions with naked attribute.
4426 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4428         * config/i386/sse.md (avx_vec_concat<mode>):
4429         Substitute concat_tg_mode mode attribute with xtg_mode.
4430         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4431         (concat_tg_mode): Remove mode attribute.
4433 2018-05-31  Martin Sebor  <msebor@redhat.com>
4435         PR c/82063
4436         * calls.c (alloc_max_size): Correct a logic error/typo.
4437         Treat excessive arguments as infinite.  Warn for invalid arguments.
4438         * doc/invoke.texi (-Walloc-size-larger-than): Update.
4440 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
4442         PR target/85829
4443         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4444         and movx for Haswell.
4446 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
4447             Cesar Philippidis  <cesar@codesourcery.com>
4449         PR middle-end/85879
4450         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4451         when emitting error on private/firstprivate reductions.
4452         * omp-low.c (lower_omp_target): Avoid reference-type processing
4453         on pointers for firstprivate clause.
4455 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4457         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4458         (st1x2): Likewise.
4459         (st1x3): Likewise.
4460         * config/aarch64/aarch64-simd.md
4461         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4462         (aarch64_ld1_x3_<mode>): Likewise
4463         (aarch64_st1x2<VALLDIF:mode>): Likewise
4464         (aarch64_st1_x2_<mode>): Likewise
4465         (aarch64_st1x3<VALLDIF:mode>): Likewise
4466         (aarch64_st1_x3_<mode>): Likewise
4467         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4468         (vld1_s8_x3): Likewise.
4469         (vld1_u16_x3): Likewise.
4470         (vld1_s16_x3): Likewise.
4471         (vld1_u32_x3): Likewise.
4472         (vld1_s32_x3): Likewise.
4473         (vld1_u64_x3): Likewise.
4474         (vld1_s64_x3): Likewise.
4475         (vld1_f16_x3): Likewise.
4476         (vld1_f32_x3): Likewise.
4477         (vld1_f64_x3): Likewise.
4478         (vld1_p8_x3): Likewise.
4479         (vld1_p16_x3): Likewise.
4480         (vld1_p64_x3): Likewise.
4481         (vld1q_u8_x3): Likewise.
4482         (vld1q_s8_x3): Likewise.
4483         (vld1q_u16_x3): Likewise.
4484         (vld1q_s16_x3): Likewise.
4485         (vld1q_u32_x3): Likewise.
4486         (vld1q_s32_x3): Likewise.
4487         (vld1q_u64_x3): Likewise.
4488         (vld1q_s64_x3): Likewise.
4489         (vld1q_f16_x3): Likewise.
4490         (vld1q_f32_x3): Likewise.
4491         (vld1q_f64_x3): Likewise.
4492         (vld1q_p8_x3): Likewise.
4493         (vld1q_p16_x3): Likewise.
4494         (vld1q_p64_x3): Likewise.
4495         (vst1_s64_x2): Likewise.
4496         (vst1_u64_x2): Likewise.
4497         (vst1_f64_x2): Likewise.
4498         (vst1_s8_x2): Likewise.
4499         (vst1_p8_x2): Likewise.
4500         (vst1_s16_x2): Likewise.
4501         (vst1_p16_x2): Likewise.
4502         (vst1_s32_x2): Likewise.
4503         (vst1_u8_x2): Likewise.
4504         (vst1_u16_x2): Likewise.
4505         (vst1_u32_x2): Likewise.
4506         (vst1_f16_x2): Likewise.
4507         (vst1_f32_x2): Likewise.
4508         (vst1_p64_x2): Likewise.
4509         (vst1q_s8_x2): Likewise.
4510         (vst1q_p8_x2): Likewise.
4511         (vst1q_s16_x2): Likewise.
4512         (vst1q_p16_x2): Likewise.
4513         (vst1q_s32_x2): Likewise.
4514         (vst1q_s64_x2): Likewise.
4515         (vst1q_u8_x2): Likewise.
4516         (vst1q_u16_x2): Likewise.
4517         (vst1q_u32_x2): Likewise.
4518         (vst1q_u64_x2): Likewise.
4519         (vst1q_f16_x2): Likewise.
4520         (vst1q_f32_x2): Likewise.
4521         (vst1q_f64_x2): Likewise.
4522         (vst1q_p64_x2): Likewise.
4523         (vst1_s64_x3): Likewise.
4524         (vst1_u64_x3): Likewise.
4525         (vst1_f64_x3): Likewise.
4526         (vst1_s8_x3): Likewise.
4527         (vst1_p8_x3): Likewise.
4528         (vst1_s16_x3): Likewise.
4529         (vst1_p16_x3): Likewise.
4530         (vst1_s32_x3): Likewise.
4531         (vst1_u8_x3): Likewise.
4532         (vst1_u16_x3): Likewise.
4533         (vst1_u32_x3): Likewise.
4534         (vst1_f16_x3): Likewise.
4535         (vst1_f32_x3): Likewise.
4536         (vst1_p64_x3): Likewise.
4537         (vst1q_s8_x3): Likewise.
4538         (vst1q_p8_x3): Likewise.
4539         (vst1q_s16_x3): Likewise.
4540         (vst1q_p16_x3): Likewise.
4541         (vst1q_s32_x3): Likewise.
4542         (vst1q_s64_x3): Likewise.
4543         (vst1q_u8_x3): Likewise.
4544         (vst1q_u16_x3): Likewise.
4545         (vst1q_u32_x3): Likewise.
4546         (vst1q_u64_x3): Likewise.
4547         (vst1q_f16_x3): Likewise.
4548         (vst1q_f32_x3): Likewise.
4549         (vst1q_f64_x3): Likewise.
4550         (vst1q_p64_x3): Likewise.
4552 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4554         * config/msp430/msp430.c (msp430_output_labelref): Prepend
4555         user_label_prefix to name.
4557         * tree-core.h: Update comment about the format of NAME string
4558         passed to handler in attribute_spec.
4560         * config/msp430/msp430.md: Remove erroneous subreg expression from
4561         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
4562         zero_extend{q,h}isi2.
4564 2018-05-30  Borislav Petkov  <bp@suse.de>
4566         * doc/extend.texi: Document some architecture specific
4567         constraints and sort entries.
4569 2018-05-30  Martin Sebor  <msebor@redhat.com>
4571         PR middle-end/85369
4572         * builtins.c (expand_builtin_stpcpy_1): New function.
4573         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4574         only if the former succeeds.
4576 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4578         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4579         in saphira.
4581 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4583         * doc/invoke.texi (-flinker-output): Document
4585 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4587         * passes.c (ipa_write_summaries): Only modify statements if body
4588         is in memory.
4589         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4590         incrementally linking.
4591         (ipa_passes): Likewise.
4592         * lto-cgraph.c (lto_output_node): When incrementally linking do not
4593         pass down resolution info.
4594         * common.opt (flag_incremental_link): Update info.
4595         * gcc.c (plugin specs): Turn flinker-output=* to
4596         -plugin-opt=-linker-output-known
4597         * toplev.c (compile_file): Also cut compilation when doing incremental
4598         link.
4599         * flag-types. (enum lto_partition_model): Add
4600         LTO_LINKER_OUTPUT_NOLTOREL.
4601         (invoke.texi): Add -flinker-output docs.
4602         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4603         link same way as WPA; do not stream in dead initializers.
4605         * dwarf2out.c (dwarf2out_die_ref_for_decl,
4606         darf2out_register_external_decl): Support incremental link.
4608 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4610         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4612 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4614         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4615         it down to simple_object_copy_lto_debug_sections.
4616         (run_gcc): Determine incremental LTO link time and configure
4617         lto1 into non-wpa mode, disable renaming of debug sections.
4619 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4621         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4622         descriptions of various incorrectly documented functions.
4624 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4626         Revert:
4627         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4628         address check not strict.
4630 2018-05-30  Richard Biener  <rguenther@suse.de>
4632         PR tree-optimization/85964
4633         * tracer.c (better_p): Drop initialized count check, we only
4634         call the function with initialized counts now.
4635         (find_best_successor): Do find a best edge if one
4636         has uninitialized count.
4637         (find_best_predecessor): Likewise.  Do BB frequency check only
4638         if count is initialized.
4640 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
4642         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4643         (aarch64_ldrstr_offset_compare): New.
4644         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4645         load/store orderings.
4646         (aarch64_gen_adjusted_ldpstp): Likewise.
4648 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
4650         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4651         Check for subset of GENERAL_REGS and FP_REGS.
4652         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4653         r=w alternative.
4655 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
4657         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4658         and wi::to_poly_offset.  Add the current offset and then check
4659         whether the sum fits, rather than using an unchecked addition of
4660         a checked term.  Check for a shwi rather than a uhwi.
4661         * expr.c (get_bit_range): Use tree_to_poly_uint64.
4662         (store_constructor): Use poly_int_tree_p.
4663         (expand_expr_real_1): Likewise.
4664         * function.c (assign_temp): Likewise.
4665         * fold-const.c (const_binop): Use poly_int_tree_p and
4666         wi::to_poly_offset.
4667         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
4668         division.
4669         * ipa-icf-gimple.c (func_checker::compare_operand): Use
4670         to_poly_offset for MEM offsets.
4671         * ipa-icf.c (sem_variable::equals): Likewise.
4672         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4673         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4674         wi::to_poly_offset for BIT_FIELD_REF offsets.
4675         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4676         wi::to_poly_offset.
4677         * var-tracking.c (emit_note_insn_var_location): Use
4678         tree_to_poly_uint64.
4680 2018-05-29  Jim Wilson  <jimw@sifive.com>
4682         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4684 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
4686         PR target/85950
4687         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4688         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4689         sequence.
4690         (sse4_1_round<mode>2): Use nonimmediate_operand
4691         for operand 1 predicate.
4693 2018-05-29  Martin Sebor  <msebor@redhat.com>
4694             Richard Biener  <rguenther@suse.de>
4696         PR testsuite/85888
4697         * calls.c (get_size_range): Call determine_value_range instead
4698         of get_value_range..
4699         * tree-vrp.h (determine_value_range): Declared new function.
4700         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
4702 2018-05-29  Richard Biener  <rguenther@suse.de>
4704         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
4705         sure to use non-pattern stmts for get_earlier_stmt arguments.
4706         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
4707         called on pattern stmts.
4708         (get_later_stmt): Likewise.
4710 2018-05-29  Martin Liska  <mliska@suse.cz>
4712         PR gcov-profile/85759
4713         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
4714         env variables.
4716 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
4718         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
4719         VEC_UNPACK_*_EXPR.
4720         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
4721         VEC_PACK_*_EXPR.
4723         PR target/85918
4724         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4725         VEC_PACK_FLOAT_EXPR): New tree codes.
4726         * tree-pretty-print.c (op_code_prio): Handle
4727         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4728         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4729         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4730         * tree-inline.c (estimate_operator_cost): Likewise.
4731         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
4732         * fold-const.c (const_binop): Likewise.
4733         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
4734         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4735         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4736         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
4737         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4738         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4739         * expr.c (expand_expr_real_2): Likewise.
4740         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
4741         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
4742         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
4743         optabs.
4744         * optabs.c (expand_widen_pattern_expr): For
4745         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
4746         sign from result type rather than operand's type.
4747         (expand_binop_directly): For vec_packu_float_optab and
4748         vec_packs_float_optab allow result type to be different from operand's
4749         type.
4750         * optabs-tree.c (optab_for_tree_code): Handle
4751         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4752         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
4753         * tree-vect-generic.c (expand_vector_operations_1):  Handle
4754         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4755         VEC_PACK_FLOAT_EXPR.
4756         * tree-vect-stmts.c (supportable_widening_operation): Handle
4757         FIX_TRUNC_EXPR.
4758         (supportable_narrowing_operation): Handle FLOAT_EXPR.
4759         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
4760         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
4761         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
4762         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
4763         mode attributes.
4764         (vec_pack<floatprefix>_float_<mode>): New expander.
4765         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
4766         attributes.
4767         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
4768         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
4769         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
4770         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
4771         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
4772         Document.
4773         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
4774         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
4775         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4776         VEC_PACK_FLOAT_EXPR): Document.
4778 2018-05-29  Richard Biener  <rguenther@suse.de>
4780         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
4781         member.
4782         (stmt_vec_info_vec): Make pointer.
4783         (init_stmt_vec_info_vec): Remove.
4784         (free_stmt_vec_info_vec): Likewise.
4785         (set_stmt_vec_info_vec): New function.
4786         (free_stmt_vec_infos): Likewise.
4787         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
4788         (set_vinfo_for_stmt): Likewise.
4789         (get_earlier_stmt): Likewise.
4790         (get_later_stmt): Likewise.
4791         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
4792         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
4793         (vec_info::~vec_info): Free stmt_vec_infos.
4794         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
4795         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
4796         (pass_slp_vectorize::execute): Likewise.
4797         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
4798         (free_stmt_vec_info_vec): Likewise.
4799         (set_stmt_vec_info_vec): New function.
4800         (free_stmt_vec_infos): Likewise.
4801         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
4802         the global stmt_vec_info_vec.
4803         * tree-parloops.c (gather_scalar_reductions): Use
4804         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
4805         vector.
4807 2018-05-29  Richard Biener  <rguenther@suse.de>
4809         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
4811 2018-05-29  Martin Liska  <mliska@suse.cz>
4812             David Malcolm  <dmalcolm@redhat.com>
4814         * vec.c (test_reverse): New.
4815         (vec_c_tests): Add new test.
4816         * vec.h (vl_ptr>::reverse): New function.
4818 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
4820         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
4822         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
4823         and later.
4825 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4827         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
4829 2018-05-28  Richard Biener  <rguenther@suse.de>
4831         PR tree-optimization/85933
4832         * tree-vect-data-refs.c (vect_record_base_alignments): Only
4833         look at stmts marked as vectorizable.
4835 2018-05-28  Richard Biener  <rguenther@suse.de>
4837         PR tree-optimization/85934
4838         * tree-vect-generic.c (expand_vector_operations_1): Hoist
4839         vector boolean check before scalar optimization.
4841 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
4843         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
4844         for armv5te.
4846 2018-05-28  Mark Wielaard  <mark@klomp.org>
4848         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
4849         if it is an expression containing a minus sign.
4851 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
4853         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4855 2018-05-27  Paul Koning  <ni1d@arrl.net>
4857         * config/pdp11/pdp11.md (truncsihi2): Remove.
4859 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
4860             Chung-Ju Wu  <jasonwucj@gmail.com>
4862         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
4863         implementation.
4864         (unaligned_store_dw): Ditto.
4865         * config/nds32/nds32-memory-manipulation.c
4866         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
4867         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
4868         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
4869         (emit_setmem_word_loop): Rename to ...
4870         (emit_setmem_doubleword_loop): ... this.
4871         (nds32_gen_dup_4_byte_to_word_value): New function.
4872         (nds32_gen_dup_8_byte_to_double_word_value): New function.
4873         (nds32_expand_setmem_loop): Refine implementation.
4874         (nds32_expand_setmem_loop_v3m): Ditto.
4875         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
4876         pattern.
4878 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4880         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
4882 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4884         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4885         (nds32_init_machine_status): Initialize machine->attr_naked_p and
4886         machine->attr_no_prologue_p.
4887         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
4888         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
4889         (nds32_expand_epilogue): Consider attr_naked_p.
4890         (nds32_expand_epilogue_v3pop): Likewise.
4891         (nds32_can_use_return_insn): Likewise.
4892         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
4893         attr_no_prologue_p fields.
4894         * config/nds32/nds32.opt (mret-in-naked-func): New option.
4896 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
4898         PR target/85918
4899         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
4900         attributes.
4901         * config/i386/sse.md
4902         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
4903         Rename to ...
4904         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
4905         ... this.
4906         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
4907         Rename to ...
4908         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
4909         ... this.
4910         (*<floatsuffix>floatv2div2sf2): Rename to ...
4911         (*float<floatunssuffix>v2div2sf2): ... this.
4912         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
4913         (float<floatunssuffix>v2div2sf2_mask): ... this.
4914         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
4915         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
4916         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
4917         to ...
4918         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
4919         ... this.
4920         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4921         Rename to ...
4922         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4923         ... this.
4924         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4925         Rename to ...
4926         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4927         ... this.
4928         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
4929         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
4930         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
4931         gen_ufix_truncv8dfv8si2.
4932         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
4933         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
4934         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
4935         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
4936         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
4937         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
4938         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
4939         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
4941 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
4943         PR target/85900
4944         PR target/85345
4945         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4947 2018-05-25  Jim Wilson  <jimw@sifive.com>
4949         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
4950         * config/riscv/riscv.c (struct machine_function): Add
4951         interrupt_handler_p and attribute_checked_p fields.
4952         (riscv_attribute_table): Add interrupt.
4953         (riscv_interrupt_type_p): New.
4954         (riscv_save_reg_p): Save extra regs for interrupt handler.
4955         (riscv_use_save_libcall): Return false  for interrupt handler.
4956         (riscv_first_stack_step): Add forward declaration.
4957         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
4958         for interrupt handler with large frame.  Use it for saved reg list.
4959         (riscv_expand_prologue): Move flag_stack_usage_info support to
4960         eliminate duplication.
4961         (riscv_expand_epilogue): Generate mret for interrupt handler.
4962         (riscv_epilogue_uses): New.
4963         (riscv_can_use_return_insn): Return false for interrupt handler.
4964         (riscv_function_ok_for_sibcall): Likewise.
4965         (riscv_set_current_function): Add interrupt handler support.
4966         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
4967         * config/riscv/riscv.md (UNSPECV_MRET): New.
4968         (GP_REGNUM): New.
4969         (riscv_frflags, riscv_fsflags): Use tab after opcode.
4970         (riscv_mret): New.
4971         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
4973 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4975         PR tree-optimization/85712
4976         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4977         this candidate has already been replaced in-situ by a copy.
4979 2018-05-25  Jason Merrill  <jason@redhat.com>
4981         PR c++/80485 - inline function non-zero address.
4982         * symtab.c (nonzero_address): Check DECL_COMDAT.
4984 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
4986         PR target/83628
4987         * config/alpha/alpha.md (ashlsi3): New insn pattern.
4988         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
4989         extension of SImode operation.  Use const123_operand predicate.
4990         (*saddsi_1): Remove.
4991         (*saddl_se_1): Ditto.
4992         (*ssubsi_1): Ditto.
4993         (*ssubl_se_1): Ditto.
4994         * config/alpha/predicates.md (const123_operand): New predicate.
4995         * config/alpha/constraints.md (P): Use IN_RANGE.
4997 2018-05-25  Richard Biener  <rguenther@suse.de>
4999         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5000         defaulted to true.
5001         (ref_maybe_used_by_stmt_p): Likewise.
5002         (stmt_may_clobber_ref_p): Likewise.
5003         (stmt_may_clobber_ref_p_1): Likewise.
5004         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5005         and pass it along.
5006         (ref_maybe_used_by_stmt_p): Likewise.
5007         (stmt_may_clobber_ref_p): Likewise.
5008         (stmt_may_clobber_ref_p_1): Likewise.
5009         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5010         the alias oracle to disambiguate DRs with stmts DR analysis
5011         couldn't handle.
5012         (vect_analyze_data_refs): Do not give up on not analyzable
5013         DRs for BB vectorization.  Remove code truncating the dataref
5014         vector.
5016 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
5018         PR target/85832
5019         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5020         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
5021         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5023 2018-05-25  Richard Biener  <rguenther@suse.de>
5025         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5026         function, combining stmt data ref gathering and fatal analysis
5027         parts.
5028         (vect_analyze_data_refs): Remove now redudnant code and simplify.
5029         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5030         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5031         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5032         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5034 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5036         PR tree-optimization/85720
5037         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5038         SCC if all partitions are builtins.
5039         (version_loop_by_alias_check): New parameter.  Generate cancelable
5040         runtime alias check if all partitions are builtins.
5041         (distribute_loop): Update call to above function.
5043 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5045         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5046         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5047         (parm_default_def_partition_arg): Ditto.
5048         (set_parm_default_def_partition): Ditto.
5049         (get_parm_default_def_partitions): Ditto and make it static.
5050         (get_undefined_value_partitions): Ditto and make it static.
5051         (remove_ssa_form): Refactor call to init_var_map here.
5052         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5053         computation for loop region.
5054         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5055         (register_default_def): Delete.
5056         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5057         (parm_default_def_partition_arg): Ditto.
5058         (set_parm_default_def_partition): Ditto.
5059         (get_parm_default_def_partitions): Ditto and make it static.
5060         (get_undefined_value_partitions): Ditto and make it static.
5061         (coalesce_with_default, coalesce_with_default): Update comment.
5062         (create_coalesce_list_for_region): New func factored out from
5063         create_outofssa_var_map.
5064         (populate_coalesce_list_for_outofssa): New func factored out from
5065         create_outofssa_var_map and coalesce_ssa_name.
5066         (create_outofssa_var_map): Delete.
5067         (coalesce_ssa_name): Refactor to support live range computation.
5068         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5069         (get_parm_default_def_partitions): Delete.
5070         (get_undefined_value_partitions): Ditto.
5071         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5072         computation for loop region.
5073         (new_tree_live_info, loe_visit_block): Ditto.
5074         (live_worklist, set_var_live_on_entry): Ditto.
5075         (calculate_live_on_exit, verify_live_on_entry): Ditto.
5076         * tree-ssa-live.h (struct _var_map): New fields.
5077         (init_var_map): Change decl.
5078         (region_contains_p): New.
5080 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5082         * tree-ssa-live.h (live_merge_and_clear): Delete.
5084 2018-05-25  Richard Biener  <rguenther@suse.de>
5086         PR c++/85912
5087         * tree-dump.c (dequeue_and_dump): Remove access to removed
5088         operand 2 of a SWITCH_EXPR.
5090 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5092         * doc/sourcebuild.texi (vect_double_cond_arith): Include
5093         multiplication and division.
5094         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5095         (cond_udiv@var{m}, cond_umod@var{m}): Document.
5096         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5097         (cond_udiv_optab, cond_umod_optab): New optabs.
5098         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5099         (IFN_COND_RDIV): New internal functions.
5100         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5101         TRUNC_MOD_EXPR and RDIV_EXPR.
5102         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5103         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5104         New unspecs.
5105         (SVE_INT_BINARY): Include mult.
5106         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5107         (optab, sve_int_op): Handle mult.
5108         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5109         UNSPEC_COND_DIV.
5110         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5111         for SVE_INT_BINARY_SD.
5113 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5115         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5116         (optab, sve_int_op): Handle div and udiv.
5117         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5118         for SVE_INT_BINARY_SD.
5119         (*<optab><mode>3): New insn for the same.
5121 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5123         * tree-vect-patterns.c: Include predict.h.
5124         (vect_recog_divmod_pattern): Restrict check for division support
5125         to when optimizing for size.
5127 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5129         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5130         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5131         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5132         (gimple_match_op::set_op): Likewise.
5133         (gimple_resimplify4): Declare.
5134         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5135         (expr::gen_transform): Likewise.
5136         (decision_tree::gen): Generate a simplification routine for 4 operands.
5137         * gimple-match-head.c (gimple_simplify): Add an overload for
5138         4 operands.  In the top-level function, handle up to 4 call
5139         arguments and call gimple_resimplify4.
5140         (gimple_resimplify4): New function.
5141         (build_call_internal): Pass a fourth operand.
5142         (maybe_push_to_seq): Likewise.
5143         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5144         Fold VEC_COND_EXPRs of an operation and a default value into
5145         an IFN_COND_* function if possible.
5146         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5147         New unspecs.
5148         (SVE_COND_FP_BINARY): Include them.
5149         (optab, sve_fp_op): Handle them.
5150         (SVE_INT_BINARY_REV): New code iterator.
5151         (SVE_COND_FP_BINARY_REV): New int iterator.
5152         (commutative): New int attribute.
5153         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5154         Declare.
5155         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5156         function.
5157         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5158         (*cond_<optab><mode>): New patterns for reversed operands.
5160 2018-05-25  Richard Biener  <rguenther@suse.de>
5162         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5163         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5164         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5165         (STMT_VINFO_GROUPED_ACCESS): Adjust.
5166         * tree-vect-data-refs.c (everywhere): Adjust users.
5167         * tree-vect-loop.c (everywhere): Likewise.
5168         * tree-vect-slp.c (everywhere): Likewise.
5169         * tree-vect-stmts.c (everywhere): Likewise.
5170         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5172 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5174         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5175         Rename to...
5176         (gcc_cv_as_section_exclude): ... this.
5177         Try Solaris as #exclude syntax.
5178         * configure: Regenerate.
5179         * config.in: Regenerate.
5180         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5181         SECTION_EXCLUDE.
5182         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5183         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5185         * varasm.c (default_elf_asm_named_section): Don't check if
5186         HAVE_GAS_SECTION_EXCLUDE is defined.
5188 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5190         * doc/md.texi: Update the documentation of the cond_* optabs
5191         to mention the new final operand.  Fix GET_MODE_NUNITS call.
5192         Describe the scalar case too.
5193         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5194         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5195         instead of 2.
5196         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5197         (get_conditional_internal_fn): Update comment.
5198         * tree-vect-loop.c (vectorizable_reduction): Pass the original
5199         accumulator value as a final argument to conditional functions.
5200         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5201         a define_expand and add an "else" operand.  Assert for now that
5202         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
5203         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5204         (*cond_<optab><mode>): New patterns.
5205         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5206         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5207         (UNSPEC_COND_EOR): Delete.
5208         (optab): Remove associated mappings.
5209         (SVE_INT_BINARY): New code iterator.
5210         (sve_int_op): Remove int attribute and add "minus" to the code
5211         attribute.
5212         (SVE_COND_INT_OP): Delete.
5213         (SVE_COND_FP_OP): Rename to...
5214         (SVE_COND_FP_BINARY): ...this.
5216 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5218         * optabs.c (can_reuse_operands_p): New function.
5219         (maybe_legitimize_operands): Try to reuse the results for
5220         earlier operands.
5222 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5224         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5225         Add {q} suffix to insn mnemonic.
5227 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5229         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5230         (msp430_warn_func_return): New.
5232 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
5234         * fold-const.c (tree_nonzero_bits): New function.
5235         * fold-const.h (tree_nonzero_bits): Likewise.
5236         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5237         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5239 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5241         PR target/85900
5242         PR target/85345
5243         * varasm.c (assemble_alias): Check ifunc_resolver only on
5244         FUNCTION_DECL.
5246 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5248         PR target/85903
5249         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5250         when memory input operand is handled.
5252 2018-05-24  Luis Machado  <luis.machado@linaro.org>
5254         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5255         global.
5256         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5258 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5260         * match.pd: Delay FMA folds until after vectorization.
5262 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5264         PR target/83009
5265         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5266         address check not strict.
5268 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5270         * gimple-match.h (gimple_match_op): New class.
5271         (mprts_hook): Replace parameters with a gimple_match_op *.
5272         (maybe_build_generic_op): Likewise.
5273         (gimple_simplified_result_is_gimple_val): Replace parameters with
5274         a const gimple_match_op *.
5275         (gimple_simplify): Replace code_helper * and tree * parameters with
5276         a gimple_match_op * parameter.
5277         (gimple_resimplify1): Replace code_helper *, tree and tree *
5278         parameters with a gimple_match_op * parameter.
5279         (gimple_resimplify2): Likewise.
5280         (gimple_resimplify3): Likewise.
5281         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5282         parameters with a gimple_match_op * parameter.
5283         * gimple-match-head.c (gimple_simplify): Change prototypes of
5284         auto-generated functions to take a gimple_match_op * instead of
5285         separate code_helper * and tree * parameters.  Make the same
5286         change in the top-level overload and update calls to the
5287         gimple_resimplify routines.  Update calls to the auto-generated
5288         functions and to maybe_push_res_to_seq in the publicly-facing
5289         operation-specific gimple_simplify overloads.
5290         (gimple_match_op::MAX_NUM_OPS): Define.
5291         (gimple_resimplify1): Replace rcode and ops with a single res_op
5292         parameter.  Update call to gimple_simplify.
5293         (gimple_resimplify2): Likewise.
5294         (gimple_resimplify3): Likewise.
5295         (mprts_hook): Replace parameters with a gimple_match_op *.
5296         (maybe_build_generic_op): Likewise.
5297         (build_call_internal): Replace type, nargs and ops with
5298         a gimple_match_op *.
5299         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5300         with a single gimple_match_op *.  Update calls to mprts_hook,
5301         build_call_internal and gimple_simplified_result_is_gimple_val.
5302         Factor out code that is common to the tree_code and combined_fn cases.
5303         * genmatch.c (expr::gen_transform): Replace tem_code and
5304         tem_ops with a gimple_match_op called tem_op.  Update calls
5305         to the gimple_resimplify functions and maybe_push_res_to_seq.
5306         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5307         res_ops.  Update call to the gimple_resimplify functions.
5308         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5309         (decision_tree::gen): Make the functions take a gimple_match_op *
5310         called res_op instead of separate res_code and res_ops parameters.
5311         Update call accordingly.
5312         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5313         and ops with a single res_op parameter.  Update calls to
5314         maybe_build_generic_op and maybe_push_res_to_seq.
5315         (fold_stmt_1): Update calls to gimple_simplify and
5316         replace_stmt_with_simplification.
5317         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5318         and gimple_simplified_result_is_gimple_val.
5319         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5320         gimple_simplify.
5321         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5322         with a gimple_match_op *.
5323         (vn_nary_build_or_lookup): Likewise.  Update call to
5324         vn_nary_build_or_lookup_1.
5325         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5326         gimple_match_op *.  Update calls to the gimple_resimplify routines
5327         and to gimple_simplified_result_is_gimple_val.
5328         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5329         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5330         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5331         (visit_nary_op): Likewise.
5332         (visit_reference_op_load): Likewise.
5334 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5336         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5337         modifier for printing the step amount.
5339 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
5341         PR target/78849
5342         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5343         types.
5345 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
5347         * doc/sourcebuild.texi (Endianness): New subsubsection.
5349 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5351         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5352         <prefetch_dynamic_strides>: New const bool field.
5353         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5354         prefetch_dynamic_strides.
5355         (exynosm1_prefetch_tune): Likewise.
5356         (thunderxt88_prefetch_tune): Likewise.
5357         (thunderx_prefetch_tune): Likewise.
5358         (thunderx2t99_prefetch_tune): Likewise.
5359         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5360         false.
5361         (aarch64_override_options_internal): Update to set
5362         PARAM_PREFETCH_DYNAMIC_STRIDES.
5363         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5364         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5365         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5366         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5367         prefetch-dynamic-strides setting.
5369 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5371         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5372         <minimum_stride>: New const int field.
5373         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5374         minimum_stride field defaulting to -1.
5375         (exynosm1_prefetch_tune): Likewise.
5376         (thunderxt88_prefetch_tune): Likewise.
5377         (thunderx_prefetch_tune): Likewise.
5378         (thunderx2t99_prefetch_tune): Likewise.
5379         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5380         <default_opt_level>: Set to 3.
5381         (aarch64_override_options_internal): Update to set
5382         PARAM_PREFETCH_MINIMUM_STRIDE.
5383         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5384         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5385         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5386         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5387         stride is constant and is below the minimum stride threshold.
5389 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5391         * config/arm/arm-cpus.in (mode26): Delete.
5392         (armv4): Delete mode26 reference.
5393         * config/arm/arm.c (arm_configure_build_target): Delete use of
5394         isa_bit_mode26.
5396 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5398         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5399         New insn pattern.
5400         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5401         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
5402         for non-SSE modes.
5403         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
5404         (floatunsdidf2): Ditto.
5406 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5408         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5409         (fixuns_trunc<mode>si2_avx512f): Ditto.
5410         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5411         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5412         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5414 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5416         PR rtl-optimization/79985
5417         * df-scan.c (df_insn_refs_collect): Remove special case for
5418         global registers and asm statements.
5420 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5422         * extend.texi (Global Register Variables): Rewrite the bullet list.
5423         Note that the register is available for allocation. Note that access
5424         via inline asm must use constraints. Add note about async-signal
5425         handlers. Remove paragraph about automagic register selection.
5427 2018-05-23  Richard Biener  <rguenther@suse.de>
5429         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5430         of fixed offset from memset VN.
5432 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
5434         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5435         first_interp field.
5436         (alloc_cand_and_find_basis): Initialize first_interp field.
5437         (slsr_process_mul): Modify first_interp field.
5438         (slsr_process_add): Likewise.
5439         (slsr_process_cast): Modify first_interp field for each new
5440         interpretation.
5441         (slsr_process_copy): Likewise.
5442         (dump_candidate): Dump first_interp field.
5443         (replace_mult_candidate): Process all interpretations, not just
5444         subsequent ones.
5445         (replace_rhs_if_not_dup): Likewise.
5446         (replace_one_candidate): Likewise.
5448 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
5450         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5451         Add new boolean.
5452         (aarch64_needs_frame_chain): New function.
5453         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5455 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
5457         PR target/84882
5458         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5459         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5460         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5461         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5462         as true for strict-align.
5463         (aarch64_can_inline_p): Perform checks even when callee has no
5464         attributes to check for strict alignment.
5465         * doc/extend.texi (AArch64 Function Attributes): Document
5466         no-strict-align.
5467         * doc/invoke.texi: (AArch64 Options): Likewise.
5469 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
5471         PR tree-optimization/85853
5472         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5473         the handling of the root of the node to...
5474         (vect_slp_analyze_node_operations_1): ...this new function,
5475         and run the whole thing with the child nodes' def types
5476         set according to their SLP node's def type.
5478 2018-05-23  Richard Biener  <rguenther@suse.de>
5480         PR middle-end/85874
5481         * tree-data-ref.c (create_runtime_alias_checks): Defer
5482         and ignore overflow warnings.
5484 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
5486         PR tree-optimization/85822
5487         * tree-vrp.c (is_masked_range_test): Fix handling of negative
5488         constants.
5490 2018-05-23  Richard Biener  <rguenther@suse.de>
5492         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5493         memset constants via native_interpret_expr.
5495 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
5497         PR target/85345
5498         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5499         attribute.
5500         (cgraph_node::create_alias): Likewise.
5501         (cgraph_node::get_availability): Check ifunc_resolver instead
5502         of looking up ifunc attribute.
5503         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5504         * varasm.c (do_assemble_alias): Likewise.
5505         (assemble_alias): Likewise.
5506         (default_binds_local_p_3): Likewise.
5507         * cgraph.h (cgraph_node): Add ifunc_resolver.
5508         (cgraph_node::only_called_directly_or_aliased_p): Return false
5509         for IFUNC resolver.
5510         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5511         attribute.
5512         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5513         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5514         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5515         instead of looking up ifunc attribute.
5517 2018-05-22  Luis Machado  <luis.machado@linaro.org>
5519         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5521 2018-05-22  Martin Sebor  <msebor@redhat.com>
5523         PR middle-end/85359
5524         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5525         only when expasion succeeds.
5526         (expand_builtin_strcmp): Same.
5527         (expand_builtin_strncmp): Same.
5529 2018-05-22  Martin Sebor  <msebor@redhat.com>
5531         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5533 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5534             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5536         * config/aarch64/aarch64-ldpstp.md: Replace uses of
5537         aarch64_mem_pair_operand with memory_operand and delete operand swapping
5538         code.
5539         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5540         Add check for legitimate_address.
5541         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
5542         (aarch64_swap_ldrstr_operands): New.
5543         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
5544         Define prototype.
5546 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5547             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5549         * config/aarch64/aarch64.md: New patterns to generate stp
5550         and ldp.
5551         (store_pair_sw, store_pair_dw): New patterns to generate stp for
5552         single words and double words.
5553         (load_pair_sw, load_pair_dw): Likewise.
5554         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
5555         Delete.
5556         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
5557         Delete.
5558         * config/aarch64/aarch64-ldpstp.md: Modify peephole
5559         for different mode ldpstp and add peephole for merged zero stores.
5560         Likewise for loads.
5561         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5562         Add size check.
5563         (aarch64_gen_store_pair): Rename calls to match new patterns.
5564         (aarch64_gen_load_pair): Rename calls to match new patterns.
5565         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5566         (load_pair<DREG:mode><DREG2:mode>): ... This.
5567         (store_pair<mode>): Rename to...
5568         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5569         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5570         New mode iterators.
5571         (V_INT_EQUIV): Handle SImode.
5572         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5573         New predicate.
5575 2018-05-22  Martin Sebor  <msebor@redhat.com>
5577         PR c/85623
5578         * calls.c (maybe_warn_nonstring_arg): Use string length to set
5579         or ajust the presumed bound on an operation to avoid unnecessary
5580         warnings.
5582 2018-05-22  Martin Sebor  <msebor@redhat.com>
5584         PR tree-optimization/85826
5585         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5586         assuming that a DECL necesarily has a constant size.
5588 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
5590         PR middle-end/85862
5591         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5593 2018-05-22  Richard Biener  <rguenther@suse.de>
5595         PR tree-optimization/85834
5596         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5597         non-constant and non-zero memset arguments.
5599 2018-05-22  Martin Liska  <mliska@suse.cz>
5601         PR ipa/85607
5602         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5604 2018-05-22  Richard Biener  <rguenther@suse.de>
5606         PR tree-optimization/85863
5607         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5608         comparisons when vectype is specified.
5609         (vectorizable_condition): Do not specify vectype for
5610         vect_is_simple_cond when SLP vectorizing.
5612 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
5614         PR target/85657
5615         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5616         define __ibm128 as long double.
5617         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5618         as a distinct type when IEEE 128-bit support is enabled.
5619         (init_float128_ieee): Fix up conversions between IFmode and IEEE
5620         128-bit types to use the correct functions.
5621         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5622         convert between 128-bit floating point types that have different
5623         modes but the same representation, instead of using gen_lowpart to
5624         makean alias.
5625         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5626         KFmode.
5627         (IFKF_reg): New attributes to give the register constraints for
5628         IFmode and KFmode.
5629         (extend<mode>tf2_internal): New insns to mark an explicit
5630         conversion between 128-bit floating point types that have a
5631         different mode but share the same representation.
5633 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
5635         PR tree-optimization/85814
5636         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5637         a null return from get_strinfo when unsharing the next
5638         strinfo in the chain.
5640 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5642         PR gcc/84923
5643         * varasm.c (weak_finish): Clean up weak_decls.
5645 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5647         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5648         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5649         UNSPEC_UADALP values.
5650         * config/aarch64/iterators.md (ABAL): New int iterator.
5651         (ABDL2): Likewise.
5652         (ADALP): Likewise.
5653         (sur): Add mappings for the above.
5654         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5655         New define_insn.
5656         (aarch64_<sur>abal<mode>_4): Likewise.
5657         (aarch64_<sur>adalp<mode>_3): Likewise.
5658         (<sur>sadv16qi): New define_expand.
5660 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
5662         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5663         (*movdf_internal): Ditto.
5664         (*rcpsf2_sse): Ditto.
5665         (*rsqrtsf2_sse): Ditto.
5666         (*sqrt<mode>2_sse): Ditto.
5668 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
5670         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5671         eor3q<mode>4.
5672         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5673         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5674         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5675         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5676         vbcaxq_s64): New.
5677         * config/aarch64/arm_neon.h: Likewise.
5678         * config/aarch64/iterators.md (VQ_I): New.
5680 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
5682         * config.gcc: Add arc/t-multilib-linux to tmake_file for
5683         arc*-*-linux*.
5684         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5685         MULTILIB_DIRNAMES
5687 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5689         * config/nds32/constraints.md (S): New constraint.
5690         * config/nds32/nds32.md (call_internal): Use constraint S.
5691         (call_value_internal): Likewise.
5692         (sibcall_internal): Likewise.
5693         (sibcall_value_internal): Likewise.
5695 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5696             Chung-Ju Wu  <jasonwucj@gmail.com>
5698         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5699         into consideration.
5701 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5702             Chung-Ju Wu  <jasonwucj@gmail.com>
5704         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
5705         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
5706         (nds32_rtx_costs_impl): Simplify.
5707         (nds32_address_cost_impl): Simplify.
5708         (nds32_init_rtx_costs): New function.
5709         (nds32_rtx_costs_speed_prefer): Likewise.
5710         (nds32_rtx_costs_size_prefer): Likewise.
5711         (nds32_address_cost_speed_prefer): Likewise.
5712         (nds32_address_cost_speed_fwprop): Likewise.
5713         (nds32_address_cost_size_prefer): Likewise.
5714         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
5715         * config/nds32/nds32.c (nds32_option_override): Use
5716         nds32_init_rtx_costs function.
5718 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5720         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
5721         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
5722         (TARGET_PIPELINE_N8): Likewise.
5723         (TARGET_PIPELINE_N10): Likewise.
5724         (TARGET_PIPELINE_N13): Likewise.
5725         (TARGET_PIPELINE_GRAYWOLF): Likewise.
5727 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
5729         * config/nds32/nds32-fpu.md: Update copyright year.
5731 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5733         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
5735 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5737         * config/nds32/nds32.c
5738         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
5739         * config/nds32/nds32.opt (minline-asm-r15): New option.
5741 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5743         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
5744         MASK_HW_ABS.
5745         * config/nds32/nds32.md (abssi2): New pattern.
5747 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
5749         * config/i386/i386.md (rex64namesuffix): New mode attribute.
5750         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
5751         Merge insn pattern from sse_cvtsi2ss<round_name> and
5752         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
5753         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
5754         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
5755         using SWI48 mode iterator.
5756         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
5757         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
5758         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
5759         pattern from sse_cvttss2si<round_saeonly_name>
5760         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
5761         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
5762         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
5763         using SWI48 mode iterator.
5764         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
5765         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
5766         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
5767         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
5768         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
5769         using SWI48 mode iterator.
5770         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
5771         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
5772         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
5773         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
5774         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
5775         SWI48 mode iterator.
5776         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
5777         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
5778         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
5779         pattern from sse_cvttsd2si<round_saeonly_name>
5780         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
5782 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5784         * config/nds32/nds32-md-auxiliary.c
5785         (nds32_valid_smw_lwm_base_p): Refine.
5786         (nds32_output_smw_single_word): Refine.
5787         (nds32_output_smw_double_word): New.
5788         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
5790 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5792         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
5793         (nds32_output_stack_pop): Refine.
5794         (nds32_expand_unaligned_load): Refine.
5795         (nds32_expand_unaligned_store): Refine.
5797 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
5798             Chung-Ju Wu  <jasonwucj@gmail.com>
5800         * config/nds32/constants.md: Add TP_REGNUM constant.
5801         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
5802         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
5803         UNSPEC_ADD32.
5804         * config/nds32/nds32-doubleword.md: Consider flag_pic.
5805         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
5806         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
5807         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
5808         and PIC code generation.
5809         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
5810         code generation.
5811         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
5812         optimization.
5813         * config/nds32/nds32.md: Support TLS and PIC.
5814         * config/nds32/nds32.c: Support TLS and PIC.
5815         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
5816         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
5817         predicate.
5819 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5821         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
5822         mode with E_ prefix.
5824 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
5825             Chung-Ju Wu  <jasonwucj@gmail.com>
5827         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
5828         * config/nds32/nds32-md-auxiliary.c
5829         (symbolic_reference_mentioned_p): New.
5830         (nds32_legitimize_ict_address): New.
5831         (nds32_expand_ict_move): New.
5832         (nds32_indirect_call_referenced_p): New.
5833         (nds32_symbol_binds_local_p): Delete.
5834         (nds32_long_call_p): Modify.
5835         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
5836         * config/nds32/nds32-protos.h
5837         (symbolic_reference_mentioned_p): Declare.
5838         (nds32_legitimize_ict_address): Declare.
5839         (nds32_expand_ict_move): Declare.
5840         (nds32_indirect_call_referenced_p): Declare.
5841         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
5842         (nds32_relax_group): Use nds32_ict_const_p as condition.
5843         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
5844         (nds32_asm_file_start): Output ict_model directive in asm code.
5845         (nds32_legitimate_address_p): Consider indirect call.
5846         (nds32_print_operand): Consider indirect call.
5847         (nds32_print_operand_address): Consider indirect call.
5848         (nds32_insert_attributes): Handle "indirect_call" attribute.
5849         (TARGET_LEGITIMATE_ADDRESS_P): Define.
5850         (TARGET_LEGITIMATE_CONSTANT_P): Define.
5851         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
5852         (TARGET_DELEGITIMIZE_ADDRESS): Define.
5853         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
5854         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
5855         (TARGET_ICT_MODEL_SMALL): Define.
5856         (TARGET_ICT_MODEL_LARGE): Define.
5857         * config/nds32/nds32.md (movsi): Consider ict model.
5858         (call, call_value): Consider ict model.
5859         (sibcall, sibcall_value): Consider ict model.
5860         * config/nds32/nds32.opt (mict-model): New option.
5861         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
5862         model.
5864 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
5865             Monk Chiang  <sh.chiang04@gmail.com>
5866             Jim Wilson <jimw@sifive.com>
5868         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
5869         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
5870         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
5871         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
5872         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
5873         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
5874         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
5875         compute save_libcall_adjustment properly.
5876         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
5877         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
5878         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
5879         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
5880         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
5881         (ABI_SPEC): Handle mabi=ilp32e.
5882         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
5883         (RVE): Add RVE mask.
5884         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
5885         <-march>: Add rv32e as an example.
5887 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
5889         PR c++/82899
5890         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
5891         (intra_create_variable_infos): Handle C++ constructors.
5893 2018-05-18  Martin Liska  <mliska@suse.cz>
5895         * passes.def: Remove a redundant pass.
5897 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
5899         PR bootstrap/85838
5900         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
5902 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5904         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
5905         (ARMv4): Update.
5906         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
5907         (ARMv6m): Update.
5908         (armv2, armv2a, armv3, armv3m): Delete architectures.
5909         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
5910         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
5911         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
5912         Delete cpus.
5913         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
5914         (*mulsidi3adddi): Likewise.
5915         (mulsidi3): Likewise.
5916         (*mulsidi3_nov6): Likewise.
5917         (umulsidi3): Likewise.
5918         (umulsidi3_nov6): Likewise.
5919         (umaddsidi4): Likewise.
5920         (*umulsidi3adddi): Likewise.
5921         (smulsi3_highpart): Likewise.
5922         (*smulsi3_highpart_nov6): Likewise.
5923         (umulsi3_highpart): Likewise.
5924         (*umulsi3_highpart_nov6): Likewise.
5925         * config/arm/arm.h (arm_arch3m): Delete.
5926         * config/arm/arm.c (arm_arch3m): Delete.
5927         (arm_option_override_internal): Update armv3-related comment.
5928         (arm_configure_build_target): Delete use of isa_bit_mode32.
5929         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
5930         (arm_rtx_costs_internal): Delete check of arm_arch3m.
5931         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
5932         (mulsa3): Likewise.
5933         (mulusa3): Likewise.
5934         * config/arm/arm-protos.h (arm_arch3m): Delete.
5935         * config/arm/arm-tables.opt: Regenerate.
5936         * config/arm/arm-tune.md: Likewise.
5937         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
5938         deleted architectures.
5940 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5942         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
5943         (armv5t, armv5te): New features.
5944         (ARMv5, ARMv5e): Delete fgroups.
5945         (ARMv5t, ARMv5te): Adjust for above changes.
5946         (ARMv6m): Likewise.
5947         (armv5, armv5e): Delete arches.
5948         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
5949         arm_arch5.
5950         (*call_reg_arm): Likewise.
5951         (*call_value_reg_armv5): Likewise.
5952         (*call_value_reg_arm): Likewise.
5953         (*call_symbol): Likewise.
5954         (*call_value_symbol): Likewise.
5955         (*sibcall_insn): Likewise.
5956         (*sibcall_value_insn): Likewise.
5957         (clzsi2): Likewise.
5958         (prefetch): Likewise.
5959         (define_split and define_peephole2 dependent on arm_arch5):
5960         Likewise.
5961         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
5962         arm_arch5e.
5963         (TARGET_ARM_QBIT): Likewise.
5964         (TARGET_DSP_MULTIPLY): Likewise.
5965         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
5966         (arm_arch5, arm_arch5e): Delete.
5967         (arm_arch5t, arm_arch5te): Declare.
5968         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
5969         (arm_arch5t): Declare.
5970         (arm_option_reconfigure_globals): Update for the above.
5971         (arm_options_perform_arch_sanity_checks): Update comment, replace
5972         use of arm_arch5 with arm_arch5t.
5973         (use_return_insn): Likewise.
5974         (arm_emit_call_insn): Likewise.
5975         (output_return_instruction): Likewise.
5976         (arm_final_prescan_insn): Likewise.
5977         (arm_coproc_builtin_available): Likewise.
5978         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
5979         arm_arch5e with arm_arch5t and arm_arch5te.
5980         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
5981         (arm_arch5t, arm_arch5te): Declare.
5982         * config/arm/arm-tables.opt: Regenerate.
5983         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
5984         * config/arm/t-multilib: Likewise.
5985         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
5986         instead of arm_arch5.
5987         (*call_reg_thumb1): Likewise.
5988         (*call_value_reg_thumb1_v5): Likewise.
5989         (*call_value_reg_thumb1): Likewise.
5990         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
5991         unreachable path.
5992         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
5994 2018-05-18  Martin Liska  <mliska@suse.cz>
5996         PR gcov-profile/84846
5997         * doc/gcov.texi: Document -t option of gcov tool.
5999 2018-05-18  Martin Liska  <mliska@suse.cz>
6001         PR gcov-profile/84846
6002         * gcov.c (print_usage): Add new -t option.
6003         (process_args): Handle the option.
6004         (generate_results): Use stdout as output when requested by
6005         the option.
6007 2018-05-18  Martin Liska  <mliska@suse.cz>
6009         PR gcov-profile/84846
6010         * coverage.c (coverage_init): Write PWD to .gcno file.
6011         * doc/gcov.texi: Document how working directory is printed.
6012         * gcov-dump.c (dump_gcov_file): Print PWD.
6013         * gcov.c (output_intermediate_file): Likewise.
6014         (read_graph_file): Read PWD string.
6015         (output_lines): Print PWD.
6017 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6019         PR middle-end/85817
6020         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6021         for retval and return false if all args to phi are zero.
6023 2018-05-18  Richard Biener  <rguenther@suse.de>
6025         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6026         method.
6027         (evrp_dom_walker::before_dom_children): Call it.
6029 2018-05-18  Richard Biener  <rguenther@suse.de>
6031         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6032         results when processing array refs with variable index.
6034 2018-05-18  Toon Moene  <toon@moene.org>
6036         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6037         directly after that of -floop-interchange. Indicate that both
6038         options are enabled by default when specifying -O3.
6040 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6042         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6043         iterator.  Delete separate integer-mode vec_set<mode> expander.
6044         (aarch64_simd_vec_setv2di): Delete.
6045         (vec_setv2di): Delete.
6046         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6047         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
6048         the "w, r" alternative.
6050 2018-05-18  Martin Liska  <mliska@suse.cz>
6052         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6053         * tree-pass.h (make_pass_lower_switch_O0): New function.
6054         * tree-switch-conversion.c (node_has_low_bound): Remove.
6055         (node_has_high_bound): Likewise.
6056         (node_is_bounded): Likewise.
6057         (class pass_lower_switch): Make it a template type and create
6058         two instances.
6059         (pass_lower_switch::execute): Add template argument.
6060         (make_pass_lower_switch): New function.
6061         (make_pass_lower_switch_O0): New function.
6062         (do_jump_if_equal): Remove.
6063         (emit_case_nodes): Simplify to just handle all 3 cases and leave
6064         all the hard work to tree optimization passes.
6066 2018-05-18  Martin Liska  <mliska@suse.cz>
6068         * dbgcnt.c (limit_low): Renamed from limit.
6069         (limit_high): New variable.
6070         (dbg_cnt_is_enabled): Check for upper limit.
6071         (dbg_cnt): Adjust dumping.
6072         (dbg_cnt_set_limit_by_index): Add new argument for high
6073         value.
6074         (dbg_cnt_set_limit_by_name): Likewise.
6075         (dbg_cnt_process_single_pair): Parse new format.
6076         (dbg_cnt_process_opt): Use strtok.
6077         (dbg_cnt_list_all_counters): Remove 'value' and add
6078         'limit_high'.
6079         * doc/invoke.texi: Document changes.
6081 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
6083         * doc/sourcebuild.texi (scalar_all_fma): Document.
6084         * tree.def (FMA_EXPR): Delete.
6085         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6086         * internal-fn.c (ternary_direct): New macro.
6087         (expand_ternary_optab_fn): Likewise.
6088         (direct_ternary_optab_supported_p): Likewise.
6089         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6090         * builtins.c (fold_builtin_fma): Delete.
6091         (fold_builtin_3): Don't call it.
6092         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6093         * expr.c (expand_expr_real_2): Likewise.
6094         * fold-const.c (operand_equal_p): Likewise.
6095         (fold_ternary_loc): Likewise.
6096         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6097         * gimple.c (DEFTREECODE): Likewise.
6098         * gimplify.c (gimplify_expr): Likewise.
6099         * optabs-tree.c (optab_for_tree_code): Likewise.
6100         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6101         * tree-eh.c (operation_could_trap_p): Likewise.
6102         (stmt_could_throw_1_p): Likewise.
6103         * tree-inline.c (estimate_operator_cost): Likewise.
6104         * tree-pretty-print.c (dump_generic_node): Likewise.
6105         (op_code_prio): Likewise.
6106         * tree-ssa-loop-im.c (stmt_cost): Likewise.
6107         * tree-ssa-operands.c (get_expr_operands): Likewise.
6108         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6109         * fold-const-call.h (fold_fma): Delete.
6110         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6111         CFN_FNMA and CFN_FNMS.
6112         (fold_fma): Delete.
6113         * genmatch.c (combined_fn): New enum.
6114         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6115         (commutative_op): New function.
6116         (commutate): Use it.  Handle more than 2 operands.
6117         (dt_operand::gen_gimple_expr): Use commutative_op.
6118         (parser::parse_expr): Allow :c to be used with non-binary
6119         operators if the commutative operand is known.
6120         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6121         CFN_FMS, CFN_FNMA and CFN_FNMS.
6122         (backprop::process_assign_use): Remove FMA_EXPR handling.
6123         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6124         (gen_hsa_fma): New function.
6125         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6126         IFN_FNMA and IFN_FNMS.
6127         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6128         * gimple-fold.h (follow_all_ssa_edges): Declare.
6129         * gimple-fold.c (follow_all_ssa_edges): New function.
6130         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6131         gimple_build interface and use follow_all_ssa_edges to fold the result.
6132         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6133         instead of checking for optabs directly.
6134         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6135         rather than FMA_EXPRs.
6136         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6137         call to IFN_FMA instead of an FMA_EXPR.
6139 2018-05-17  Jim Wilson  <jimw@sifive.com>
6141         * expr.c (do_tablejump): When converting index to Pmode, if we have a
6142         sign extended promoted subreg, and the range does not have the sign bit
6143         set, then do a sign extend.
6145         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6146         test, check for sign extended subreg and/or constant operands, and
6147         do a sign extend in that case.
6149 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
6151         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6152         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6153         Add untyped.
6154         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6155         Change logics_shift_reg to logics_shift_imm.
6156         (thunderx2t99_fp_loadpair_basic): Delete.
6157         (thunderx2t99_fp_storepair_basic): Delete.
6158         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6159         (thunderx2t99_asimd_polynomial): Delete.
6160         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6161         and neon_fp_mul_d_scalar_q.
6162         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6163         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6164         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6165         (thunderx2t99_asimd_lut): Add missing tbl types.
6166         (thunderx2t99_asimd_ext): Delete.
6167         (thunderx2t99_asimd_load1_1_mult): Delete.
6168         (thunderx2t99_asimd_load1_2_mult): Delete.
6169         (thunderx2t99_asimd_load1_ldp): New.
6170         (thunderx2t99_asimd_load1): New.
6171         (thunderx2t99_asimd_load2): Add missing *load2* types.
6172         (thunderx2t99_asimd_load3): New.
6173         (thunderx2t99_asimd_load4): New.
6174         (thunderx2t99_asimd_store1_1_mult): Delete.
6175         (thunderx2t99_asimd_store1_2_mult): Delete.
6176         (thunderx2t99_asimd_store2_mult): Delete.
6177         (thunderx2t99_asimd_store2_onelane): Delete.
6178         (thunderx2t99_asimd_store_stp): New.
6179         (thunderx2t99_asimd_store1): New.
6180         (thunderx2t99_asimd_store2): New.
6181         (thunderx2t99_asimd_store3): New.
6182         (thunderx2t99_asimd_store4): New.
6184 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
6186         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6187         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
6189 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
6190             Segher Boessenkool  <segher@kernel.crashing.org>
6192         PR target/85698
6193         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6194         operand.
6196 2018-05-17  Richard Biener  <rguenther@suse.de>
6198         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6199         for pruning loop and prune defs feeding only already visited PHIs.
6201 2018-05-17  Richard Biener  <rguenther@suse.de>
6203         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6205 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
6206             Richard Biener  <rguenther@suse.de>
6208         PR tree-optimization/85793
6209         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6210         for VMAT_ELEMENTWISE.
6212 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6214         * internal-fn.h (lookup_internal_fn): Declare
6215         * internal-fn.c (lookup_internal_fn): New function.
6216         * gimple.c (gimple_build_call_from_tree): Handle calls to
6217         internal functions.
6218         * gimple-pretty-print.c (dump_gimple_call): Print "." before
6219         internal function names.
6220         * tree-pretty-print.c (dump_generic_node): Likewise.
6221         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6223 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6225         * gimple-fold.h (gimple_build): Make the function forms take
6226         combined_fn rather than built_in_function.
6227         (gimple_simplify): Likewise.
6228         * gimple-match-head.c (gimple_simplify): Likewise.
6229         * gimple-fold.c (gimple_build): Likewise.
6230         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6231         rather than gimple_build_call_internal.
6232         (get_initial_defs_for_reduction): Likewise.
6233         (vect_create_epilog_for_reduction): Likewise.
6234         (vectorizable_live_operation): Likewise.
6236 2018-05-17  Martin Liska  <mliska@suse.cz>
6238         * gimple-ssa-sprintf.c (format_directive): Do not use
6239         space in between 'G_' and '('.
6241 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
6243         PR target/85323
6244         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6245         even if the mask is not all ones.
6247         PR target/85323
6248         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6249         vector.
6250         (ix86_gimple_fold_builtin): Likewise.
6252         PR target/85323
6253         * config/i386/i386.c: Include tree-vector-builder.h.
6254         (ix86_vector_shift_count): New function.
6255         (ix86_fold_builtin): Fold shift builtins by scalar count.
6256         (ix86_gimple_fold_builtin): Likewise.
6258         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6259         _mm512_setzero): New intrinsics.
6261 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
6262             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6264         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6265         code generation for cases where splatting a value is not useful.
6266         * simplify-rtx.c (simplify_ternary_operation): Simplify
6267         vec_merge across a vec_duplicate and a paradoxical subreg forming
6268         a vector mode to a vec_concat.
6270 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
6272         * config.gcc: Support "goldmont-plus".
6273         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6274         "goldmont-plus".
6275         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6276         PROCESSOR_GOLDMONT_PLUS.
6277         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6278         (processor_target_table): Add "goldmont-plus".
6279         (PTA_GOLDMONT_PLUS): Define.
6280         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6281         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6282         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6283         (fold_builtin_cpu): Add "goldmont-plus".
6284         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6285         (ix86_option_override_internal): Add "goldmont-plus".
6286         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6287         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6288         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6289         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6291 2018-05-17  Richard Biener  <rguenther@suse.de>
6293         PR tree-optimization/85757
6294         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6295         remove defs that only feed that PHI from further processing.
6297 2018-05-16  Jim Wilson  <jimw@sifive.com>
6299         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6300         asterisk to name.
6301         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6303 2018-05-16  Mark Wielaard  <mark@klomp.org>
6305         * dwarf2out.c (count_index_strings): New function.
6306         (output_indirect_strings): Call count_index_strings and generate
6307         header for dwarf_version >= 5.
6309 2018-05-16  Mark Wielaard  <mark@klomp.org>
6311         * dwarf2out.c (dwarf_FORM): New function.
6312         (set_indirect_string): Use dwarf_FORM.
6313         (reset_indirect_string): Likewise.
6314         (size_of_die): Likewise.
6315         (value_format): Likewise.
6316         (output_die): Likewise.
6317         (add_skeleton_AT_string): Likewise.
6318         (output_macinfo_op): Likewise.
6319         (index_string): Likewise.
6320         (output_index_string_offset): Likewise.
6321         (output_index_string): Likewise.
6322         (count_index_strings): Likewise.
6324 2018-05-16  Carl Love  <cel@us.ibm.com>
6326         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6327         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6329 2018-05-16  Martin Jambor  <mjambor@suse.cz>
6331         * ipa-prop.c (ipa_free_all_edge_args): Remove.
6332         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6334 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
6336         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6337         (fnma<mode>4): Likewise.
6338         (fms<mode>4): Likewise.
6339         (fnms<mode>4): Likewise.
6340         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6341         (aarch64_fnma<mode>4): Likewise.
6342         (aarch64_fms<mode>4): Likewise.
6343         (aarch64_fnms<mode>4): Likewise.
6344         (aarch64_fnmadd<mode>4): Likewise.
6346 2018-05-16  Jason Merrill  <jason@redhat.com>
6348         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
6350 2018-05-16  Richard Biener  <rguenther@suse.de>
6352         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6353         (dump_stmt_cost): Declare.
6354         (add_stmt_cost): Dump cost we add.
6355         (add_stmt_costs): New function.
6356         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6357         No longer exported.
6358         (vect_analyze_stmt): Adjust prototype.
6359         (vectorizable_condition): Likewise.
6360         (vectorizable_live_operation): Likewise.
6361         (vectorizable_reduction): Likewise.
6362         (vectorizable_induction): Likewise.
6363         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6364         cost vector to pass to vectorizable_ and record afterwards.
6365         (vect_model_reduction_cost): Take cost vector argument and adjust.
6366         (vect_model_induction_cost): Likewise.
6367         (vectorizable_reduction): Likewise.
6368         (vectorizable_induction): Likewise.
6369         (vectorizable_live_operation): Likewise.
6370         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6371         SLP_TREE_NUMBER_OF_VEC_STMTS.
6372         (vect_analyze_slp_cost_1): Remove.
6373         (vect_analyze_slp_cost): Likewise.
6374         (vect_slp_analyze_node_operations): Take visited args and
6375         a target cost vector.  Avoid processing already visited stmt sets.
6376         (vect_slp_analyze_operations): Use a local cost vector to gather
6377         costs and register those of non-discarded instances.
6378         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6379         (vect_schedule_slp_instance): Remove copying of
6380         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
6381         zero.
6382         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6383         adding cost.  Record cost entry location.
6384         (vect_prologue_cost_for_slp_op): Function to compute cost of
6385         a constant or invariant generated for SLP vect in the prologue,
6386         split out from vect_analyze_slp_cost_1.
6387         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
6388         (vect_model_promotion_demotion_cost): Likewise.
6389         (vect_model_store_cost): Likewise, make static.
6390         (vect_model_load_cost): Likewise.
6391         (vectorizable_bswap): Add cost vector arg and adjust.
6392         (vectorizable_call): Likewise.
6393         (vectorizable_simd_clone_call): Likewise.
6394         (vectorizable_conversion): Likewise.
6395         (vectorizable_assignment): Likewise.
6396         (vectorizable_shift): Likewise.
6397         (vectorizable_operation): Likewise.
6398         (vectorizable_store): Likewise.
6399         (vectorizable_load): Likewise.
6400         (vectorizable_condition): Likewise.
6401         (vectorizable_comparison): Likewise.
6402         (can_vectorize_live_stmts): Likewise.
6403         (vect_analyze_stmt): Likewise.
6404         (vect_transform_stmt): Adjust calls to vectorizable_*.
6405         * tree-vectorizer.c: Include gimple-pretty-print.h.
6406         (dump_stmt_cost): New function.
6408 2018-05-16  Richard Biener  <rguenther@suse.de>
6410         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6411         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6412         * tree-ssa-dse.c: Include tree-ssa-loop.h.
6413         (check_name): New callback.
6414         (dse_classify_store): Track cycles via a visited bitmap of PHI
6415         defs and simplify handling of in-loop and across loop dead stores
6416         and properly fail for loop-variant refs.  Handle byte-tracking with
6417         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6418         limiting the walk.
6420 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
6422         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6423         (vect_get_mask_type_for_stmt): Likewise.
6424         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6425         split out from...
6426         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
6427         to determine the statement's vector type and the vector type that
6428         should be used for calculating nunits.  Deal with cases in which
6429         the type has to be deferred.
6430         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6431         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6432         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6433         (vect_determine_vf_for_stmt): New functions, split out from...
6434         (vect_determine_vectorization_factor): ...here.
6435         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6436         (vect_get_mask_type_for_stmt): New functions, split out from
6437         vect_determine_vectorization_factor.
6439 2018-05-16  Richard Biener  <rguenther@suse.de>
6441         * tree-cfg.c (verify_gimple_assign_ternary): Properly
6442         verify the [VEC_]COND_EXPR embedded comparison.
6444 2018-05-15  Martin Sebor  <msebor@redhat.com>
6446         PR tree-optimization/85753
6447         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6448         RECORD_TYPE in addition to ARRAY_TYPE.
6450 2018-05-15  Martin Sebor  <msebor@redhat.com>
6452         PR middle-end/85643
6453         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6455 2018-05-15  Richard Biener  <rguenther@suse.de>
6457         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6458         add by_clobber_p one.  Change algorithm to collect all defs
6459         representing uses we need to walk and try reducing them to
6460         a single one before failing.
6461         (dse_dom_walker::dse_optimize_stmt): Adjust.
6463 2018-05-13  Mark Wielaard  <mark@klomp.org>
6465         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6466         (size_of_loc_descr): Likewise.
6467         (output_loc_operands): Likewise.
6468         (output_loc_operands_raw): Likewise.
6469         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6470         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6471         (hash_loc_operands): Likewise.
6472         (compare_loc_operands): Likewise.
6474 2018-05-14  Mark Wielaard  <mark@klomp.org>
6476         * dwarf2out.c (count_index_addrs): New function.
6477         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6479 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6481         PR tree-optimization/83648
6482         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6483         return value as malloc candidate.
6485 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6487         PR ipa/85734
6488         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6489         param as true in call to suggest_attribute.
6491 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
6493         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6494         -mreadonly-in-sdata.
6496 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6498         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6499         New pattern.
6500         (aarch64_crypto_aesd_fused): Likewise.
6502 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
6504         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6505         (movsi_aarch64): Likewise.
6506         (load_pairsi): Likewise.
6507         (load_pairdi): Likewise.
6508         (store_pairsi): Likewise.
6509         (store_pairdi): Likewise.
6510         (load_pairsf): Likewise.
6511         (load_pairdf): Likewise.
6512         (store_pairsf): Likewise.
6513         (store_pairdf): Likewise.
6514         (zero_extend): Likewise.
6515         (trunc): Swap alternatives.
6516         (fcvt_target): Add '?' to prefer w over r.
6518 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
6520         PR target/85756
6521         * config/i386/i386.md: Disallow non-commutative arithmetics in
6522         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6523         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
6524         in the peephole2 before it.
6526 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
6528         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6529         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6530         (ix86_handle_option): Handle -mcldemote.
6531         * config.gcc: New header.
6532         * config/i386/cldemoteintrin.h: New file.
6533         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6534         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6535         -mcldemote.
6536         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6537         OPTION_MASK_ISA_CLDEMOTE.
6538         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
6539         (ix86_valid_target_attribute_inner_p): Ditto.
6540         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
6541         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
6542         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
6543         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
6544         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
6545         (cldemote): New.
6546         * config/i386/i386.opt: Add -mcldemote.
6547         * config/i386/x86intrin.h: New header.
6548         * doc/invoke.texi: Add -mcldemote.
6550 2018-05-14  Richard Biener  <rguenther@suse.de>
6552         * doc/match-and-simplify.texi: Adjust :s documentation.
6554 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
6556         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
6557         intended memcpy size.
6558         (REORDER_45): Likewise.
6560 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
6562         * sort.cc: New file.
6563         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6564         * vec.c (qsort_chk): Use gcc_qsort.
6565         * Makefile.in (OBJS-libcommon): Add sort.o.
6566         (build/sort.o): New target.  Use it...
6567         (BUILD_RTL): ... here, and...
6568         (build/gencfn-macros): ... here, and...
6569         (build/genmatch): ... here.
6571 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6572             Chung-Ju Wu  <jasonwucj@gmail.com>
6574         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6575         * config/nds32/nds32-graywolf.md: New file.
6576         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6577         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6578         pipeline.
6579         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6580         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6581         * config/nds32/nds32.md (pipeline_model): Add graywolf.
6582         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6583         * config/nds32/pipelines.md: Include n15 settings.
6585 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6586             Chung-Ju Wu  <jasonwucj@gmail.com>
6588         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6589         * config/nds32/nds32-n13.md: New file.
6590         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6591         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6592         pipeline.
6593         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6594         * config/nds32/nds32.md (pipeline_model): Add n13.
6595         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6596         * config/nds32/pipelines.md: Include n13 settings.
6598 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6599             Chung-Ju Wu  <jasonwucj@gmail.com>
6601         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6602         * config/nds32/nds32-n10.md: New file.
6603         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6604         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6605         pipeline.
6606         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6607         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6608         * config/nds32/nds32.md (pipeline_model): Add n10.
6609         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6610         * config/nds32/pipelines.md: Include n10 settings.
6612 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
6613             Kito Cheng  <kito.cheng@gmail.com>
6614             Chung-Ju Wu  <jasonwucj@gmail.com>
6616         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6617         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6618         Add enum values for DSP extension instructions.
6619         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6620         New constraints.
6621         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6622         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6623         New code iterators.
6624         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6625         * config/nds32/nds32-dspext.md: New file for DSP implementation.
6626         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6627         * config/nds32/nds32-intrinsic.md: Likewise.
6628         * config/nds32/nds32_intrinsic.h: Likewise.
6629         * config/nds32/nds32-md-auxiliary.c: Likewise.
6630         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6631         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6632         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6633         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6634         * config/nds32/nds32-protos.h: New declarations for DSP extension.
6635         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6636         TYPE_DMAC in switch statement.
6637         * config/nds32/nds32.c: New checking and implementation for DSP
6638         extension instructions.
6639         * config/nds32/nds32.h: Likewise.
6640         * config/nds32/nds32.md: Likewise.
6641         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6642         * config/nds32/predicates.md: Implement new predicates for DSP
6643         extension.
6645 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
6647         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6648         Reformat alternatives and attributes so it is easier to identify
6649         which constraints/attributes go with which instruction.
6650         (mov<mode>_hardfloat32, FMOVE64): Likewise.
6651         (mov<mode>_softfloat32, FMOVE64): Likewise.
6652         (mov<mode>_hardfloat64, FMOVE64): Likewise.
6653         (mov<mode>_softfloat64, FMOVE64): Likewise.
6655 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6657         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6658         subsection.
6659         (Basic PowerPC Built-in Functions): The new name of the
6660         subsection previously known as "PowerPC Built-in Functions".
6661         (Basic PowerPC Built-in Functions Available on all Configurations):
6662         New subsubsection.
6663         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6664         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6665         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6666         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6668 2018-05-11  Martin Jambor  <mjambor@suse.cz>
6670         PR ipa/85655
6671         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6672         single const.
6674 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6676         PR target/85733
6677         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6679 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
6681         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6682         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6683         (ix86_handle_option): Handle -mwaitpkg.
6684         * config.gcc: New header.
6685         * config/i386/cpuid.h (bit_WAITPKG): New bit.
6686         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6687         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6688         function type.
6689         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6690         OPTION_MASK_ISA_WAITPKG.
6691         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6692         (ix86_option_override_internal): Add PTA_WAITPKG.
6693         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6694         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6695         IX86_BUILTIN_TPAUSE.
6696         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6697         __builtin_ia32_umwait and __builtin_ia32_tpause.
6698         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6699         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6700         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6701         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
6702         UNSPECV_TPAUSE): New.
6703         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
6704         * config/i386/i386.opt: Add -mwaitpkg.
6705         * config/i386/waitpkgintrin.h: New file.
6706         * config/i386/x86intrin.h: New header.
6707         * doc/invoke.texi: Add -mwaitpkg.
6709 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6711         PR target/85606
6712         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
6713         equivalent.
6714         (cortex-m0): Use armv6s-m isa.
6715         (cortex-m0plus): Likewise.
6716         (cortex-m1): Likewise.
6717         (cortex-m0.small-multiply): Likewise.
6718         (cortex-m0plus.small-multiply): Likewise.
6719         (cortex-m1.small-multiply): Likewise.
6721 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6722             Jakub Jelinek  <jakub@redhat.com>
6724         PR tree-optimization/85692
6725         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
6726         source permute as well.
6728 2018-05-11  Martin Liska  <mliska@suse.cz>
6730         PR sanitizer/85556
6731         * doc/extend.texi: Document LLVM style format for no_sanitize
6732         attribute.
6734 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
6736         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
6737         mode_supports_vsx_dform_quad to mode_supports_dq_form.
6738         (mode_supports_vsx_dform_quad): Likewise.
6739         (mode_supports_vmx_dform): Move these functions to be next to the
6740         other mode_supports functions.
6741         (mode_supports_dq_form): Likewise.
6742         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
6743         mode_supports_dq_form.
6744         (reg_offset_addressing_ok_p): Likewise.
6745         (offsettable_ok_by_alignment): Likewise.
6746         (rs6000_legitimate_offset_address_p): Likewise.
6747         (legitimate_lo_sum_address_p): Likewise.
6748         (rs6000_legitimize_address): Likewise.
6749         (rs6000_legitimize_reload_address): Likewise.
6750         (rs6000_secondary_reload_inner): Likewise.
6751         (rs6000_preferred_reload_class): Likewise.
6752         (rs6000_output_move_128bit): Likewise.
6754 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
6756         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
6757         Generate SImode target register for null target.
6758         <case IX86_BUILTIN_XGETBV>: Ditto.
6759         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
6760         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
6762 2018-05-10  Carl Love  <cel@us.ibm.com>
6764         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6765         dcbtt and dcbtstt if operands[2] is 0.
6767 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
6769         PR target/85693
6770         * config/i386/sse.md (usadv64qi): New expander.
6772 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
6774         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
6775         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
6776         -maltivec=be support.
6777         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
6778         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
6779         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
6780         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
6781         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
6782         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
6783         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
6784         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
6785         altivec_vsumsws): Adjust.
6786         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
6787         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
6788         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
6789         support.
6790         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
6791         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
6792         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
6793         (altivec_lve<VI_char>x): Delete expand.
6794         (*altivec_lve<VI_char>x_internal): Rename to...
6795         (altivec_lve<VI_char>x): ... this.
6796         (altivec_lvxl_<mode>): Delete expand.
6797         (*altivec_lvxl_<mode>_internal): Rename to ...
6798         (altivec_lvxl_<mode>): ... this.
6799         (altivec_stvxl_<mode>): Delete expand.
6800         (*altivec_stvxl_<mode>_internal): Rename to ...
6801         (altivec_stvxl_<mode>): ... this.
6802         (altivec_stve<VI_char>x): Delete expand.
6803         (*altivec_stve<VI_char>x_internal): Rename to ...
6804         (altivec_stve<VI_char>x): ... this.
6805         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
6806         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
6807         reduc_plus_scal_<mode>): Adjust.
6808         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
6809         comment.
6810         (rs6000_cpu_cpp_builtins): Adjust.
6811         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
6812         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
6813         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
6814         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
6815         -maltivec=be support.
6816         (rs6000_split_vec_extract_var): Adjust.
6817         (rs6000_split_v4si_init): Adjust.
6818         (swap_selector_for_mode): Delete.
6819         (altivec_expand_lvx_be, altivec_expand_stvx_be,
6820         altivec_expand_stvex_be): Delete.
6821         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
6822         -maltivec=be support.
6823         (rs6000_gimple_fold_builtin): Ditto.
6824         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
6825         Adjust.
6826         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
6827         (TARGET_DIRECT_MOVE_64BIT): Adjust.
6828         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
6829         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
6830         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
6831         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
6832         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
6833         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
6834         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
6835         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
6836         anonymous split): Adjust.
6837         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
6838         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
6840 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
6842         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
6843         when --with-gxx-include-dir is also specified.
6844         * configure: Regenerate.
6846 2018-05-09  Jim Wilson  <jimw@sifive.com>
6848         PR target/84797
6849         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
6850         * config/riscv/t-withmultilib: New.
6851         * config/riscv/withmultilib.h: New.
6852         * doc/install.texi: Document RISC-V --with-multilib-list support.
6854 2018-05-09  Richard Biener  <rguenther@suse.de>
6856         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
6857         vector.
6858         (vect_bb_vectorization_profitable_p): Adjust.  Compute
6859         actual scalar cost using the cost vector and the add_stmt_cost
6860         machinery.
6862 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6864         PR rtl-optimization/85645
6865         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
6866         in the REG_CFA_REGISTER note for LR, don't leave it empty.
6868 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6870         PR rtl-optimization/85645
6871         * shrink-wrap.c (spread_components): Return a boolean saying if
6872         anything was changed.
6873         (try_shrink_wrapping_separate): Iterate spread_components until
6874         nothing changes anymore.
6876 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6878         PR rtl-optimization/85645
6879         * regrename.c (build_def_use): Also kill the chains that include the
6880         destination of a REG_CFA_REGISTER note.
6882 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6884         PR rtl-optimization/85645
6885         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
6886         insn that has a REG_CFA_REGISTER note.
6888 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
6890         * cfgexpand.c (expand_clobber): New function.
6891         (expand_gimple_stmt_1): Use it.
6892         * tree-vect-stmts.c (vect_clobber_variable): New function,
6893         split out from...
6894         (vectorizable_simd_clone_call): ...here.
6895         (vectorizable_store): Emit a clobber either side of an
6896         IFN_STORE_LANES sequence.
6897         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
6899 2018-05-09  Tom de Vries  <tom@codesourcery.com>
6901         PR target/85626
6902         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
6903         (define_insn "trap_if_false"): Add exit after trap.
6905 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
6907         PR rtl-optimization/85638
6908         * bb-reorder.c: Include common/common-target.h.
6909         (create_forwarder_block): New function extracted from...
6910         (fix_up_crossing_landing_pad): ...here.  Rename into...
6911         (dw2_fix_up_crossing_landing_pad): ...this.
6912         (sjlj_fix_up_crossing_landing_pad): New function.
6913         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
6914         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
6915         from both partitions and exit the loop after one iteration.
6917 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6919         Revert:
6920         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6921         subsection.
6922         (Basic PowerPC Built-in Functions): The new name of the
6923         subsection previously known as "PowerPC Built-in Functions".
6924         (Basic PowerPC Built-in Functions Available on all Configurations):
6925         New subsubsection.
6926         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6927         subsubsection.
6928         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6929         subsubsection.
6930         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6931         subsubsection.
6932         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6933         subsubsection.
6935 2018-05-08  Jim Wilson  <jimw@sifive.com>
6937         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
6938         (LD_EMUL_SUFFIX): New.
6939         (LINK_SPEC): Use it.
6941 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6943         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6944         subsection.
6945         (Basic PowerPC Built-in Functions): The new name of the
6946         subsection previously known as "PowerPC Built-in Functions".
6947         (Basic PowerPC Built-in Functions Available on all Configurations):
6948         New subsubsection.
6949         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6950         subsubsection.
6951         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6952         subsubsection.
6953         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6954         subsubsection.
6955         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6956         subsubsection.
6958 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
6960         PR target/85683
6961         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
6962         after cmpelim optimization.
6964 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
6966         * config.gcc: Support "goldmont".
6967         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6968         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6969         PROCESSOR_GOLDMONT.
6970         * config/i386/i386.c (m_GOLDMONT): Define.
6971         (processor_target_table): Add "goldmont".
6972         (PTA_GOLDMONT): Define.
6973         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
6974         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
6975         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
6976         (fold_builtin_cpu): Add "goldmont".
6977         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
6978         (ix86_option_override_internal): Add "goldmont".
6979         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
6980         (processor_type): Add PROCESSOR_GOLDMONT.
6981         * config/i386/i386.md: Add CPU "glm".
6982         * config/i386/glm.md: New file.
6983         * config/i386/x86-tune.def: Add m_GOLDMONT.
6984         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
6986 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
6988         PR target/85572
6989         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
6990         E_V4DImode.
6991         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
6992         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
6993         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
6995         PR target/85317
6996         * config/i386/i386.c (ix86_fold_builtin): Handle
6997         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
6999         PR target/85480
7000         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7001         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7003 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
7005         PR target/85658
7006         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7007         (check_arch): Likewise.
7008         (check_fpu): Return the result rather than printing it.
7009         (end arch): Fix operator precedence.
7010         (end cpu): Likewise.
7011         (END): Print the result from check_fpu.
7013 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7014             Alan Hayward  <alan.hayward@arm.com>
7015             David Sherwood  <david.sherwood@arm.com>
7017         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7018         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7019         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7020         (*fcmuo<mode>_and): New patterns.
7022 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7024         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7025         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7026         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7027         (cmp_op, sve_imm_con): New code attributes.
7028         (SVE_COND_INT_CMP, imm_con): Delete.
7029         (cmp_op): Remove above unspecs from int attribute.
7030         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7031         to...
7032         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
7033         comparison-specific unspecs.
7034         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7035         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7036         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7037         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7038         (*vec_fcm<cmp_op><mode>): Rename to...
7039         (*fcm<cmp_op><mode>): ...this and adjust likewise.
7040         (*vec_fcmuo<mode>): Rename to...
7041         (*fcmuo<mode>): ...this and adjust likewise.
7042         (*pred_fcm<cmp_op><mode>): New pattern.
7043         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7044         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7045         functions.
7046         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7047         and UNORDERED.
7048         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7049         (aarch64_emit_sve_predicated_cond): New function.
7050         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7051         (aarch64_emit_unspec_cond_or): Replace with...
7052         (aarch64_emit_sve_or_conds): ...this new function.  Use
7053         aarch64_emit_sve_ptrue_op for the individual comparisons and
7054         aarch64_emit_binop to OR them together.
7055         (aarch64_emit_inverted_unspec_cond): Replace with...
7056         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
7057         aarch64_emit_sve_ptrue_op for the comparison and
7058         aarch64_emit_unop to invert the result.
7059         (aarch64_expand_sve_vec_cmp_float): Update after the above
7060         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
7062 2018-05-07  Nathan Sidwell  <nathan@acm.org>
7064         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7065         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7066         (Backwards Compatibility): Likewise.
7068 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7070         PR bootstrap/85681
7071         Revert:
7072         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7074         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7075         <prefetch_dynamic_strides>: New const bool field.
7076         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7077         prefetch_dynamic_strides.
7078         (exynosm1_prefetch_tune): Likewise.
7079         (thunderxt88_prefetch_tune): Likewise.
7080         (thunderx_prefetch_tune): Likewise.
7081         (thunderx2t99_prefetch_tune): Likewise.
7082         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7083         to false.
7084         (aarch64_override_options_internal): Update to set
7085         PARAM_PREFETCH_DYNAMIC_STRIDES.
7086         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7087         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7088         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7089         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7090         prefetch-dynamic-strides setting.
7092         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7094         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7095         <minimum_stride>: New const int field.
7096         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7097         minimum_stride field.
7098         (exynosm1_prefetch_tune): Likewise.
7099         (thunderxt88_prefetch_tune): Likewise.
7100         (thunderx_prefetch_tune): Likewise.
7101         (thunderx2t99_prefetch_tune): Likewise.
7102         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7103         (aarch64_override_options_internal): Update to set
7104         PARAM_PREFETCH_MINIMUM_STRIDE.
7105         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7106         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7107         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7108         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7109         stride is constant and is below the minimum stride threshold.
7111 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7113         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7114         to 512.
7116 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7118         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7119         <prefetch_dynamic_strides>: New const bool field.
7120         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7121         prefetch_dynamic_strides.
7122         (exynosm1_prefetch_tune): Likewise.
7123         (thunderxt88_prefetch_tune): Likewise.
7124         (thunderx_prefetch_tune): Likewise.
7125         (thunderx2t99_prefetch_tune): Likewise.
7126         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7127         to false.
7128         (aarch64_override_options_internal): Update to set
7129         PARAM_PREFETCH_DYNAMIC_STRIDES.
7130         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7131         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7132         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7133         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7134         prefetch-dynamic-strides setting.
7136 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7138         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7139         <minimum_stride>: New const int field.
7140         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7141         minimum_stride field.
7142         (exynosm1_prefetch_tune): Likewise.
7143         (thunderxt88_prefetch_tune): Likewise.
7144         (thunderx_prefetch_tune): Likewise.
7145         (thunderx2t99_prefetch_tune): Likewise.
7146         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7147         (aarch64_override_options_internal): Update to set
7148         PARAM_PREFETCH_MINIMUM_STRIDE.
7149         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7150         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7151         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7152         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7153         stride is constant and is below the minimum stride threshold.
7155 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
7157         PR c++/85659
7158         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7159         the type is addressable.  Don't force op into register if it has
7160         BLKmode.
7162 2018-05-05  Roland McGrath  <mcgrathr@google.com>
7164         PR other/77609
7165         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7166         any section for which we don't know a specific type it should have,
7167         regardless of name.  Previously this was done only for the exact
7168         names ".init_array", ".fini_array", and ".preinit_array".
7169         (default_elf_asm_named_section): Add comment about
7170         relationship with default_section_type_flags and SECTION_NOTYPE.
7171         (get_section): Don't consider it a type conflict if one side has
7172         SECTION_NOTYPE and the other doesn't, as long as neither has the
7173         SECTION_BSS et al used in the default_section_type_flags logic.
7175 2018-05-05  Tom de Vries  <tom@codesourcery.com>
7177         PR target/85653
7178         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7179         (workaround_barsyncs): New function.
7180         (nvptx_reorg): Use workaround_barsyncs.
7181         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7182         (define_expand "nvptx_membar_cta"): New define_expand.
7183         (define_insn "*nvptx_membar_cta"): New insn.
7185 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
7187         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7188         To improve optimization opportunities.
7189         * builtin-types.def: The new needed builtin types for the above.
7191 2018-05-04  Richard Biener  <rguenther@suse.de>
7193         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7194         * gimple-ssa-store-merging.c
7195         (imm_store_chain_info::output_merged_store): Remove redundant create,
7196         release split_store vector contents on failure.
7197         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7198         scalar stmt vector on cache hit.
7200 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
7202         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7203         Xilinx FP support.
7204         * config.gcc (powerpc-xilinx-eabi*): Remove.
7205         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7206         support.
7207         (fusion_addis_mem_combo_load): Ditto.
7208         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7209         FP support.
7210         (rs6000_cpu_cpp_builtins): Ditto.
7211         * config/rs6000/rs6000-linux.c
7212         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7213         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7214         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7215         support.
7216         (rs6000_setup_reg_addr_masks): Ditto.
7217         (rs6000_init_hard_regno_mode_ok): Ditto.
7218         (rs6000_option_override_internal): Ditto.
7219         (legitimate_lo_sum_address_p): Ditto.
7220         (rs6000_legitimize_address): Ditto.
7221         (rs6000_legitimize_reload_address): Ditto.
7222         (rs6000_legitimate_address_p): Ditto.
7223         (abi_v4_pass_in_fpr): Ditto.
7224         (setup_incoming_varargs): Ditto.
7225         (rs6000_gimplify_va_arg): Ditto.
7226         (rs6000_split_multireg_move): Ditto.
7227         (rs6000_savres_strategy): Ditto.
7228         (rs6000_emit_prologue_components): Ditto.
7229         (rs6000_emit_epilogue_components): Ditto.
7230         (rs6000_emit_prologue): Ditto.
7231         (rs6000_emit_epilogue): Ditto.
7232         (rs6000_elf_file_end): Ditto.
7233         (rs6000_function_value): Ditto.
7234         (rs6000_libcall_value): Ditto.
7235         * config/rs6000/rs6000.h: Ditto.
7236         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7237         (TARGET_MINMAX): ... this.  New.
7238         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7239         * config/rs6000/rs6000.md: Remove Xilinx FP support.
7240         (*movsi_internal1_single): Delete.
7241         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7242         mfpu=, mxilinx-fpu): Delete.
7243         * config/rs6000/singlefp.h: Delete.
7244         * config/rs6000/sysv4.h: Remove Xilinx FP support.
7245         * config/rs6000/t-rs6000: Ditto.
7246         * config/rs6000/t-xilinx: Delete.
7247         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7248         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7249         (VStype_simple): Delete.
7250         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7251         * config/rs6000/xfpu.h: Delete.
7252         * config/rs6000/xfpu.md: Delete.
7253         * config/rs6000/xilinx.h: Delete.
7254         * config/rs6000/xilinx.opt: Delete.
7255         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7256         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7258 2018-05-04  Tom de Vries  <tom@codesourcery.com>
7260         PR libgomp/85639
7261         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7262         if ignore == 0.
7264 2018-05-04  Richard Biener  <rguenther@suse.de>
7266         PR middle-end/85627
7267         * tree-complex.c (update_complex_assignment): We are always in SSA form.
7268         (expand_complex_div_wide): Likewise.
7269         (expand_complex_operations_1): Likewise.
7270         (expand_complex_libcall): Preserve EH info of the original stmt.
7271         (tree_lower_complex): Handle removed blocks.
7272         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7273         on complex multiplication and division libcall builtins.
7275 2018-05-04  Richard Biener  <rguenther@suse.de>
7277         PR middle-end/85574
7278         * fold-const.c (negate_expr_p): Restrict negation of operand
7279         zero of a division to when we know that can happen without
7280         overflow.
7281         (fold_negate_expr_1): Likewise.
7283 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
7285         PR libstdc++/85466
7286         * real.h (real_nextafter): Declare.
7287         * real.c (real_nextafter): New function.
7288         * fold-const-call.c (fold_const_nextafter): New function.
7289         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7290         CASE_CFN_NEXTTOWARD.
7291         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7292         even when arg1_mode is different from arg0_mode.
7294 2018-05-03  Nathan Sidwell  <nathan@acm.org>
7296         * doc/extend.texi (Deprecated Features): Remove
7297         -ffriend-injection.
7298         (Backwards Compatibility): Likewise.
7299         * doc/invoke.texi (C++ Language Options): Likewise.
7300         (C++ Dialect Options): Likewise.
7302 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
7304         PR target/85530
7305         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7306         _mm512_mask_mullox_epi64): New intrinsics.
7308 2018-05-03  Tom de Vries  <tom@codesourcery.com>
7310         PR testsuite/85106
7311         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7312         dump files): Add offload-tree.
7314 2018-05-03  Richard Biener  <rguenther@suse.de>
7316         PR tree-optimization/85615
7317         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7318         to loops not nested in BBs loop father to avoid creating multi-entry
7319         loops.
7321 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7323         PR tree-optimization/70291
7324         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7325         arguments.  Change return type to tree.  Emit libcall as a new
7326         statement rather than replacing existing one when inplace_p is true.
7327         (expand_complex_multiplication_components): New function.
7328         (expand_complex_multiplication): Expand floating-point complex
7329         multiplication using the above.
7330         (expand_complex_division): Rename inner_type parameter to type.
7331         Update expand_complex_libcall call-site.
7332         (expand_complex_operations_1): Update expand_complex_multiplication
7333         and expand_complex_division call-sites.
7335 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7337         PR target/85582
7338         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7339         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7340         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7341         the highest significant bit of the shift count mask is clear.  In
7342         check whether and[sq]i3 is needed verify that all significant bits
7343         of the shift count other than the highest are set.
7345 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7347         PR libgomp/82428
7348         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7349         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7350         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7351         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7352         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7353         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7354         __builtin_goacc_parlevel_size.
7356 2018-05-02  Richard Biener  <rguenther@suse.de>
7358         PR tree-optimization/85597
7359         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7360         do not use split vect_get_vec_defs call but call vect_get_slp_defs
7361         directly.
7363 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7365         PR testsuite/85106
7366         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7367         dump files): Add ltrans-tree.
7369 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7371         PR testsuite/85106
7372         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7373         dump files): Add wpa-ipa.
7375 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
7377         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
7378         powerpc*-*-linux*paired* target.
7379         * config/rs6000/750cl.h: Delete.
7380         * config/rs6000/paired.h: Delete.
7381         * config/rs6000/paired.md: Delete.
7382         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7383         float support.
7384         * config/rs6000/rs6000-builtin.def: Remove paired float support.
7385         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7386         comment.  Remove paired float support.
7387         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7388         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7389         VECTOR_PAIRED.
7390         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7391         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7392         declarations.
7393         * config/rs6000/rs6000.c: Remove paired float support.
7394         (paired_expand_vector_init, paired_expand_vector_move,
7395         paired_emit_vector_compare, paired_emit_vector_cond_expr,
7396         (paired_expand_lv_builtin, paired_expand_stv_builtin,
7397         paired_expand_builtin, paired_expand_predicate_builtin,
7398         paired_init_builtins): Delete.
7399         * config/rs6000/rs6000.h: Remove paired float support.
7400         * config/rs6000/rs6000.md: Remove paired float support.
7401         (move_from_CR_ov_bit): Delete.
7402         * config/rs6000/rs6000.opt (mpaired): Delete.
7403         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7404         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7406 2018-05-02  Richard Biener  <rguenther@suse.de>
7408         PR middle-end/85567
7409         * gimplify.c (gimplify_save_expr): When in SSA form allow
7410         SAVE_EXPRs to compute to SSA vars.
7412 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7414         PR target/85582
7415         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7416         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7417         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7418         clobber operands[2], instead use a new pseudo.  Formatting fixes.
7420 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
7422         PR tree-optimization/85586
7423         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7424         exit early for statements in the same group if the accesses are
7425         not strided.
7427 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7429         PR lto/85451
7430         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7431         error message.
7433 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
7435         PR tree-optimization/85143
7436         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7438 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7440         PR lto/85451
7441         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7442         not found" error message.
7444 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7446         PR other/83786
7447         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7448         * vec.c (test_ordered_remove_if): New function.
7449         (vec_c_tests): Call test_ordered_remove_if.
7450         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7451         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7452         * tree-vect-patterns.c (vect_pattern_recog_1): Use
7453         VEC_ORDERED_REMOVE_IF.
7455 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7457         PR tree-optimization/82665
7458         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7459         pointer subtraction where arguments come from a memchr call.
7461 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
7463         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7464         --push-state --as-needed and --pop-state instead of --as-needed and
7465         --no-as-needed if ld supports it.
7466         * configure: Regenerated.
7468         PR web/85578
7469         * doc/install.texi2html: Replace _002d with - and _002a with * in
7470         generated html files using sed.
7472 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7474         PR c++/85523
7475         * gcc-rich-location.c (blank_line_before_p): New function.
7476         (use_new_line): New function.
7477         (gcc_rich_location::add_fixit_insert_formatted): New function.
7478         * gcc-rich-location.h
7479         (gcc_rich_location::add_fixit_insert_formatted): New function.
7481 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7483         * selftest.c (assert_streq): Rename "expected" and "actual" to
7484         "val1" and "val2".  Extend NULL-handling to cover both inputs
7485         symmetrically, while still requiring both to be non-NULL for a pass.
7486         * selftest.h (assert_streq): Rename "expected" and "actual" to
7487         "val1" and "val2".
7488         (ASSERT_EQ): Likewise.
7489         (ASSERT_EQ_AT): Likewise.
7490         (ASSERT_KNOWN_EQ): Likewise.
7491         (ASSERT_KNOWN_EQ_AT): Likewise.
7492         (ASSERT_NE): Likewise.
7493         (ASSERT_MAYBE_NE): Likewise.
7494         (ASSERT_MAYBE_NE_AT): Likewise.
7495         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
7496         the assertion to pass.
7497         (ASSERT_STREQ_AT): Likewise.
7499 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7501         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7502         interaction with -pie.
7504 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7506         * selftest.h: Fix alphabetization of per-source-file selftest
7507         declarations.
7509 2018-04-30  Jason Merrill  <jason@redhat.com>
7511         PR c++/61982 - dead stores to destroyed objects.
7512         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7513         of clobber.
7515 2018-04-30  Jason Merrill  <jason@redhat.com>
7517         * tree.c (build_clobber): New.
7518         * tree.h: Declare it.
7519         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7521 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7523         * diagnostic-show-locus.c (layout::layout): Update for
7524         location_get_source_line returning a char_span.
7525         (struct char_span): Move to input.h.
7526         (struct correction): Update for fields in char_span becoming
7527         private.
7528         (struct source_line): Update for location_get_source_line
7529         returning a char_span.
7530         (layout::print_line): Likewise.
7531         * edit-context.c (edited_file::print_content): Likewise.
7532         (edited_file::print_diff_hunk): Likewise.
7533         (edited_file::print_run_of_changed_lines): Likewise.
7534         (edited_file::get_num_lines): Likewise.
7535         (edited_line::edited_line): Likewise.
7536         * final.c (asm_show_source): Likewise.
7537         * input.c (location_get_source_line): Convert return type
7538         from const char * to char_span, losing the final "line_len"
7539         param.
7540         (dump_location_info): Update for the above.
7541         (get_substring_ranges_for_loc): Likewise.  Use a char_span
7542         when handling the literal within the line.
7543         (test_reading_source_line): Update for location_get_source_line
7544         returning a char_span.
7545         * input.h (class char_span): Move here from
7546         diagnostic-show-locus.c, converting from a struct to a class.
7547         Make data members private.
7548         (char_span::operator bool): New.
7549         (char_span::length): New.
7550         (char_span::get_buffer): New.
7551         (char_span::operator[]): New.
7552         (char_span::subspan): Make const.
7553         (char_span::xstrdup): New.
7554         (location_get_source_line): Convert return type from const char *
7555         to char_span, losing the final "line_size" param.
7557 2018-04-30  Jan Hubicka  <jh@suse.cz>
7559         * lto-wrapper.c (ltrans_priorities): New static var.
7560         (cmp_priority): New.
7561         (run_gcc): Read priorities and if doing parallel build order
7562         the Makefile by them.
7564 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7566         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7568 2018-04-30  Richard Biener  <rguenther@suse.de>
7570         * tree-cfg.c (verify_address): Remove base argument, add
7571         flag whether to check TREE_ADDRESSABLE and do that.
7572         (verify_expr): Remove.
7573         (verify_types_in_gimple_reference): Add pieces from verify_expr.
7574         (verify_gimple_assign_single): Likewise.
7575         (verify_gimple_switch): Likewise.
7576         (verify_expr_location_1): Dereference tp once.  Add (disabled)
7577         piece from verify_expr.
7578         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7580 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7582         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7584 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7586         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7587         (small_data_pattern): Likewise.
7588         (arc_rewrite_small_data): Likewise.
7589         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7590         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7591         (get_symbol_alignment): New function.
7592         (legitimate_small_data_address_p): Likewise.
7593         (legitimate_scaled_address): Update, call
7594         legitimate_small_data_address_p.
7595         (output_sdata): New static variable.
7596         (arc_print_operand): Update how we handle small data operands.
7597         (arc_print_operand_address): Likewise.
7598         (arc_legitimate_address_p): Update, use
7599         legitimate_small_data_address_p.
7600         (arc_rewrite_small_data_p): Remove.
7601         (arc_rewrite_small_data_1): Likewise.
7602         (arc_rewrite_small_data): Likewise.
7603         (small_data_pattern): Likewise.
7604         (compact_sda_memory_operand): Update to use
7605         legitimate_small_data_address_p and get_symbol_alignment.
7606         (prepare_move_operands): Don't rewite sdata pattern.
7607         (prepare_extend_operands): Remove.
7608         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7609         pattern.
7610         (zero_extendqisi2): Likewise.
7611         (zero_extendhisi2): Likewise.
7612         (extendqihi2): Likewise.
7613         (extendqisi2): Likewise.
7614         (extendhisi2): Likewise.
7615         (addsi3): Likewise.
7616         (subsi3): Likewise.
7617         (andsi3): Likewise.
7618         * config/arc/constraints.md (Usd): Change it to memory constraint.
7620 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7622         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7623         as source of std instructions.
7624         * config/arc/arc.md (movsi_insn): Update pattern predicate to
7625         allow 6-bit constants as source for store instructions.
7626         (movdi_insn): Update instruction pattern to allow 6-bit constants
7627         as source for store instructions.
7629 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7631         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7633 2018-04-30  Nathan Sidwell  <nathan@acm.org>
7634             Sandra Loosemore <sandra@codesourcery.com>
7636         * dumpfile.c (dump_open): Allow '-' for stdout.
7637         * doc/invoke.texi (Developer Options): Document dump filename
7638         determination early.  Document stdin/stdout selection.
7640 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
7642         Microblaze Target: PIC data text relative
7644         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7645         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7646         Add declaration.
7647         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7648         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7649         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7650         New addressing mode for data-text relative position indepenedent code.
7651         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7652         'ADDRESS_SYMBOLIC_TXT_REL'.
7653         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7654         (microblaze_legitimate_pic_operand): Exclude function calls from
7655         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7656         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7657         addresses cases.
7658         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7659         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7660         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7661         for 'address + offset'.
7662         (microblaze_expand_prologue): Add new function prologue call for
7663         'r20' assignation.
7664         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7665         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7666         table in case of TARGET_PIC_DATA_TEXT_REL.
7667         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7668         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7669         Add new macros 'UNSPEC_TEXT',
7670         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7671         + exclude function calls from 'UNSPEC_PLT' in case of data text
7672         relative mode.
7673         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7674         new target hook for generating address diff vector tables in case of
7675         flag_pic.
7676         * doc/tm.texi : Regenerate.
7677         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7678         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7679         of addr diff vector generation.
7680         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7681         target hook definition.
7682         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7683         Add default function for generate_pic_addr_diff_vec -> flag_pic.
7684         * doc/invoke.texi (Add new pic option): Add new microblaze pic
7685         option for data text relative.
7687 2018-04-30  Richard Biener  <rguenther@suse.de>
7689         * tree-chrec.h (evolution_function_is_constant_p): Remove
7690         redundant check.
7691         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7693 2018-04-30  Richard Biener  <rguenther@suse.de>
7695         PR bootstrap/85571
7696         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7698 2018-04-30  Richard Biener  <rguenther@suse.de>
7700         PR tree-optimization/28364
7701         PR tree-optimization/85275
7702         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
7703         copying first exit test.
7705 2018-04-28  Mark Wielaard  <mark@klomp.org>
7707         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
7708         dwarf_version >= 5.
7709         (dwarf_AT): Handle DW_AT_addr_base.
7710         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
7712 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
7714         PR target/84431
7715         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
7716         (*ashl<dwi>3_doubleword_mask_1): Ditto.
7717         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
7718         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
7720 2018-04-28  Richard Biener  <rguenther@suse.de>
7722         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
7723         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
7724         to reflect use.  Only add interesting stmts.
7726 2018-04-27  Martin Jambor  <mjambor@suse.cz>
7728         PR ipa/85549
7729         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
7730         the jump function allows for passing through aggregate values.
7732 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
7734         * input.h (in_system_header_at): Convert from macro to inline
7735         function.
7736         (from_macro_expansion_at): Likewise.
7737         (from_macro_definition_at): Likewise.
7739 2018-04-27  Jeff Law  <law@redhat.com>
7741         * config.gcc: Mark tile* targets as deprecated/obsolete.
7743 2018-04-27  Richard Biener  <rguenther@suse.de>
7745         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
7746         fix for ILP32.
7748 2018-04-27  Richard Biener  <rguenther@suse.de>
7750         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
7752 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
7754         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
7755         with Yd constraint. Set "preferred_for_speed" attribute from
7756         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
7757         with Yd constraint.
7758         (*movdi_internal): Ditto.
7759         (movti_interunit splitters): Remove
7760         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
7761         (movdi_interunit splitters): Ditto.
7762         * config/i386/constraints.md (Ye): Remove.
7763         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
7765 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7767         PR target/85512
7768         * config/aarch64/constraints.md (Usg): Limit to 31.
7769         (Usj): Limit to 63.
7771 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
7773         PR tree-optimization/85529
7774         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
7775         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
7776         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
7777         zero extension or masking of the MSB bit.
7778         (optimize_range_tests): Add FIRST_BB argument, pass it through
7779         to optimize_range_tests_var_bound.
7780         (maybe_optimize_range_tests, reassociate_bb): Adjust
7781         optimize_range_tests callers.
7783 2018-04-26  Richard Biener  <rguenther@suse.de>
7784             Jakub Jelinek  <jakub@redhat.com>
7786         * cgraph.h (symbol_table): Just declare debug method here.
7787         * symtab.c (symbol_table::debug): Define.
7789 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
7791         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
7793 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
7795         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
7796         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
7797         (*movdi_internal): Substitute Yi and Yj constraint with x
7798         and Ym and Yn constraint with y constraint.  Update "isa"
7799         attribute and set "preferred_for_speed" attribute from
7800         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
7801         (*movsi_internal): Ditto.
7802         (*movdf_internal): Ditto.
7803         (*movsf_internal): Ditto.
7804         (*zero_extendsidi2): Ditto.
7805         * config/i386/sse.md (vec_set<mode>_0): Ditto.
7806         (sse2_loadld): Ditto.
7807         (*vec_extract<ssevecmodelower>_0): Ditto.
7808         (*vec_extractv4si_0_zext_sse4): Ditto.
7809         (vec_concatv2di): Ditto.
7810         (*vec_dup<mode>): Ditto.
7811         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
7812         * config/i386/constraints.md (Yi): Remove.
7813         (Yj): Remove.
7814         (Ym): Remove.
7815         (Yn): Remove.
7817 2018-04-26  Nathan Sidwell  <nathan@acm.org>
7819         * dumpfile.c (dump_open): New.
7820         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
7821         (dump_finish): Detect stdio/stderr by value not name.
7823 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
7825         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
7827 2018-04-26  Tom de Vries  <tom@codesourcery.com>
7829         PR target/84952
7830         * config/nvptx/nvptx.c (verify_neutering_jumps)
7831         (verify_neutering_labels): New function
7832         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
7834 2018-04-26  Tom de Vries  <tom@codesourcery.com>
7836         PR target/84025
7837         * config/nvptx/nvptx.c (needs_neutering_p): New function.
7838         (nvptx_single): Use needs_neutering_p to skip over insns that do not
7839         need neutering.
7841 2018-04-26  Richard Biener <rguenther@suse.de>
7842             Tom de Vries  <tom@codesourcery.com>
7844         PR lto/85422
7845         * lto-streamer-out.c (output_function): Fixup loops if required to match
7846         discovery done in the reader.
7848 2018-04-26  Richard Biener  <rguenther@suse.de>
7850         PR tree-optimization/85116
7851         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
7852         have a loop exit from the single latch predecessor.  Remove
7853         case of header with just condition.
7854         (ch_base::copy_headers): Exclude infinite loops from any
7855         processing.
7856         (pass_ch::execute): Record exits.
7858 2018-04-26  Richard Biener  <rguenther@suse.de>
7860         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
7861         prologue cost vector and pass it to vect_get_load_cost.
7862         (vect_get_peeling_costs_all_drs): Likewise.
7863         (vect_peeling_hash_get_lowest_cost): Likewise.
7864         (vect_enhance_data_refs_alignment): Likewise.
7866 2018-04-26  Richard Biener  <rguenther@suse.de>
7868         PR middle-end/85450
7869         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
7870         checking of integer<->pointer conversions.
7871         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
7872         sign-/zero-extending pointer types.
7873         (expand_omp_for_static_chunk): Likewise.
7875 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
7876             Jean Lee  <xiaoyur347@gmail.com>
7878         * config/mips/mips.c (mips_asan_shadow_offset): New function.
7879         (TARGET_ASAN_SHADOW_OFFSET): Define.
7880         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
7881         true for -fsanitize=address.
7883 2018-04-25  Mark Wielaard  <mark@klomp.org>
7885         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
7886         shorter ones.
7888 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
7890         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
7891         than "alu", remove explicit "memory" and "imm_disp" attributes.
7892         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
7894         PR middle-end/85414
7895         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
7896         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
7897         gen_lowpart_no_emit.
7899 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
7901         PR target/85473
7902         * config/i386/i386.c (ix86_expand_builtin): Change memory
7903         operand to XI, extend p0 to Pmode.
7904         * config/i386/i386.md: Change unspec volatile and operand
7905         1 mode to XI, change operand 0 mode to P.
7907 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7909         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
7910         GET_MODE_MASK before any checking.
7911         (nds32_can_use_bset_p): Likewise.
7912         (nds32_can_use_btgl_p): Likewise.
7914 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7916         * config/nds32/nds32-doubleword.md: New define_split pattern for
7917         illegal register number.
7919 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7921         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
7923 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7925         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
7927 2018-04-25  Richard Biener  <rguenther@suse.de>
7929         * lto-streamer.h (LTO_major_version): Bump to 8.
7931 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
7933         * BASE-VER: Set to 9.0.0.
7935 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
7937         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
7938         in __abskf2 and __powikf2.
7940 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7942         PR target/85512
7943         * config/aarch64/constraints.md (Usg, Usj): New constraints.
7944         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
7945         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
7946         Use the above on operand 2.  Reindent.
7947         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
7949 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
7951         PR target/85485
7952         * common/config/i386/i386-common.c (ix86_handle_option): Don't
7953         handle OPT_mcet.
7954         * config/i386/i386.opt (mcet): Removed.
7955         * doc/install.texi: Remove -mcet documentation.
7956         * doc/invoke.texi: Likewise.
7958 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
7960         PR target/85485
7961         * doc/install.texi: Remove -mcet from bootstrap-cet.
7963 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7965         PR target/85511
7966         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
7967         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
7968         if TARGET_64BIT.
7970         PR target/85503
7971         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
7972         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
7973         containing a CONST_VECTOR.
7975 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
7977         * doc/install.texi: Update newlib dependency for nvptx.
7979 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7981         PR target/85508
7982         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
7983         instead of INTVAL when shifting x left.
7985 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
7987         PR tree-optimization/85478
7988         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
7989         vect_grouped_store_supported for single element vectors.
7991 2018-04-24  Richard Biener  <rguenther@suse.de>
7993         PR target/85491
7994         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
7995         load cost increase to the case of non-constant step.
7997 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7999         PR target/84828
8000         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8001         destination if any_malformed_asm.
8003 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8005         PR middle-end/85496
8006         * expr.c (store_field): In the bitfield case, if the value comes from
8007         a function call and is returned in registers by means of a PARALLEL,
8008         do not change the mode of the temporary unless BLKmode and VOIDmode.
8010 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
8012         PR rtl-optimization/85423
8013         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8014         dependencies to debug insns when the previous insn is non-debug.
8016 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8018         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8019         enums into a single definition.
8020         (fls): Fix predicates and printing.
8021         (seti): Likewise.
8023 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8025         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8026         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8027         and short u6 immediate.
8028         (check_if_valid_sleep_operand): Remove.
8029         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8031 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8033         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8034         flag_always_save_lp condition.
8035         * config/nds32/nds32.opt (malways-save-lp): New option.
8037 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8039         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8040         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8041         * config/nds32/nds32.h
8042         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8043         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8045 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8047         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8048         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8050 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8051             Chung-Ju Wu  <jasonwucj@gmail.com>
8053         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8054         Declare.
8055         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8056         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8058 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8060         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8062 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8064         * config/nds32/nds32-protos.h (nds32_data_alignment,
8065         nds32_local_alignment): Declare.
8066         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8067         nds32_local_alignment): New functions.
8068         (TARGET_CONSTANT_ALIGNMENT): Define.
8069         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8071 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8073         * config/nds32/nds32.c
8074         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8075         (TARGET_MODES_TIEABLE_P): Likewise.
8077 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8079         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8080         level Ofast and Og.
8082 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
8083             Chung-Ju Wu  <jasonwucj@gmail.com>
8085         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8086         for unaligned access.
8087         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8088         unaligned access.
8089         * config/nds32/nds32-intrinsic.md: Likewise.
8090         * config/nds32/nds32_intrinsic.h: Likewise.
8091         * config/nds32/nds32.h (nds32_builtins): Likewise.
8092         * config/nds32/nds32.opt (munaligned-access): New option.
8093         * config/nds32/nds32.c (nds32_asm_file_start): Display
8094         flag_unaligned_access status.
8096 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8098         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8099         -mno-relax is present.
8100         * config/riscv/linux.h (LINK_SPEC): Ditto.
8102 2018-04-20  Martin Sebor  <msebor@redhat.com>
8104         PR c/85365
8105         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8106         for null pointers.
8107         (gimple_fold_builtin_stxcpy_chk): Same.
8108         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8110 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
8112         PR target/85456
8113         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8114         __powikf2 when long double is IEEE 128-bit.
8116 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8118         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8119         step to make sure stack always aligned.
8121 2018-04-20  Carl Love  <cel@us.ibm.com>
8123         PR target/83402
8124         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8125         size check for arg0.
8127 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8128             Tom de Vries  <tom@codesourcery.com>
8130         PR target/85445
8131         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8132         Emit insns for calls too.
8133         (nvptx_find_par): Always look for worker-level predecessor insn.
8134         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
8135         calls.
8136         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8137         (nvptx_process_pars): Propagate frames for calls.
8139 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
8141         PR target/85469
8142         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8143         Removed.
8144         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8145         (ix86_handle_option): Don't handle OPT_mibt.
8146         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8147         __SHSTK__.
8148         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8149         has_ibt and ibt.
8150         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8151         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8152         (ix86_target_macros): Define __CET__ with flag_cf_protection
8153         for -fcf-protection.
8154         * config/i386/i386.c (isa2_opts): Remove -mibt.
8155         * config/i386/i386.h (TARGET_IBT): Removed.
8156         (TARGET_IBT_P): Likewise.
8157         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8158         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8159         * config/i386/i386.opt (mcet): Update help message.
8160         (mshstk): Likewise.
8161         (mibt): Removed.
8162         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
8163         -mcet as an alias for -mshstk.
8165 2018-04-20  Richard Biener <rguenther@suse.de>
8167         PR middle-end/85475
8168         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8169         complexity by forcing a single use of the multiply operand.
8171 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8173         ipa/85449
8174         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8175         recursion dependency to only apply to non-clones.
8177 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8179         ipa/85447
8180         * ipa-cp.c (create_specialized_node): Check that clones of
8181         self-recursive edges exist during IPA-CP.
8183 2018-04-19  Toon Moene  <toon@moene.org>
8185         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8186         by -O3.
8188 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8190         PR tree-optimization/85467
8191         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8192         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
8193         VECTOR_CST element to type.
8195 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8197         PR target/85397
8198         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8199         * config/i386/i386.md (builtin_setjmp_setup): Removed.
8200         (builtin_longjmp): Likewise.
8201         (save_stack_nonlocal): New pattern.
8202         (restore_stack_nonlocal): Likewise.
8204 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8206         PR target/85404
8207         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8208         Replace ASM_OUTPUT_LABEL with fprintf.
8210 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8212         PR target/85417
8213         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8214         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8215         * config/i386/i386-c.c (ix86_target_macros_internal): Also
8216         define __IBT__ and __SHSTK__ for -fcf-protection.
8217         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8218         TARGET_IBT.
8219         (ix86_trampoline_init): Likewise.
8220         (x86_output_mi_thunk): Likewise.
8221         (ix86_notrack_prefixed_insn_p): Likewise.
8222         (ix86_option_override_internal): Don't disallow -fcf-protection.
8223         * config/i386/i386.md (rdssp<mode>): Also enable for
8224         -fcf-protection.
8225         (incssp<mode>): Likewise.
8226         (nop_endbr): Likewise.
8227         * config/i386/i386.opt (mcet): Change help message to built-in
8228         functions only.
8229         (mibt): Likewise.
8230         (mshstk): Likewise.
8231         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8232         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
8233         enable CET built-in functions.
8235 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
8237         * common/config/i386/i386-common.c
8238         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8239         OPTION_MASK_ISA_MOVDIRI_UNSET,
8240         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8241         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8242         * config.gcc (movdirintrin.h): New header.
8243         * config/i386/cpuid.h (bit_MOVDIRI,
8244         bit_MOVDIR64B): New bits.
8245         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8246         and -mmvodir64b.
8247         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8248         (VOID, PVOID, PCVOID)): New function types.
8249         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8250         __builtin_ia32_directstoreu_u64,
8251         __builtin_ia32_movdir64b): New builtins.
8252         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8253         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8254         and -mmovdiri.
8255         (ix86_valid_target_attribute_inner_p): Ditto.
8256         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8257         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8258         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8259         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8260         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8261         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8262         (movdiri<mode>, movdir64b_<mode>): New.
8263         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8264         * config/i386/immintrin.h: Include movdirintrin.h.
8265         * config/i386/movdirintrin.h: New file.
8266         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8268 2018-04-19  Richard Biener  <rguenther@suse.de>
8270         PR middle-end/85455
8271         * cfg.c (clear_bb_flags): When loop state says we have
8272         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8274 2018-04-19  Richard Biener  <rguenther@suse.de>
8276         PR tree-optimization/84737
8277         * tree-vect-data-refs.c (vect_copy_ref_info): New function
8278         copying restrict info.
8279         (vect_setup_realignment): Use it.
8280         * tree-vectorizer.h (vect_copy_ref_info): Declare.
8281         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8282         the first DR to all generated stores.
8283         (vectorizable_load): Likewise for loads.
8285 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8287         PR tree-optimization/85446
8288         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8289         the integral and pointer types to have the same precision.
8291         * doc/install.texi: Document --disable-cet being the default and
8292         --enable-cet=auto.
8294 2018-04-18  Martin Liska  <mliska@suse.cz>
8296         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8297         style.
8299 2018-04-18  Martin Liska  <mliska@suse.cz>
8301         Revert
8302         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
8304         PR ipa/83983
8305         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8306         arguments if they are comparable.
8308 2018-04-18  Martin Liska  <mliska@suse.cz>
8310         Revert
8311         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8313         PR lto/84805
8314         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8315         incomplete types.
8317 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
8319         PR target/85388
8320         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8321         ENDBR after calling __morestack.
8323 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
8325         PR jit/85384
8326         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8327         by using gcc_base_ver to generate a gcc_driver_version, and use
8328         it when generating GCC_DRIVER_NAME.
8329         * configure: Regenerate.
8331 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
8333         PR target/81084
8334         * config.gcc: Obsolete powerpc*-*-*spe*.
8336 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8338         PR debug/84637
8339         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8340         (stabstr_D): Change type of unum from unsigned int to
8341         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
8342         type.
8344 2018-04-17  Jim Wilson  <jimw@sifive.com>
8346         PR 84856
8347         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8348         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8349         Set arg_pointer_offset after using pretend_args_size.
8351 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8353         PR rtl-optimization/85431
8354         * dse.c (record_store): Ignore zero width stores.
8356         PR sanitizer/85230
8357         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
8358         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8359         __builtin_stack_restore rather than after it.
8360         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8361         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8362         argument instead of virtual_dynamic_stack_rtx.
8364 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8366         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8367         New prototype.
8368         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8369         Add note to error message to explain internal mapping of overloaded
8370         built-in function name to non-overloaded built-in function name.
8371         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8372         function.
8374 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
8376         PR target/85424
8377         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8378         where the inputs overlap with the output.
8380 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8382         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8383         (=v, v) alternative and explicit "memory" attribute.
8384         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
8385         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8386         attributes.
8387         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8388         "sselog1" type instead of "sselog".
8389         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8390         "sselog".  Remove explicit "memory" attribute.
8391         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8392         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8393         attributes.
8394         (vec_extract_hi_v32hi): Merge all alternatives into one, use
8395         "sselog1" type instead of "sselog".  Remove explicit "memory"
8396         attribute.
8397         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8398         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8399         attribute.
8400         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8401         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8402         attributes.
8403         (vec_extract_hi_v64qi): Merge all alternatives into one, use
8404         "sselog1" type instead of "sselog".  Remove explicit "memory"
8405         attribute.
8406         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8407         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8408         attribute.
8410         PR target/85430
8411         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8413         PR middle-end/85414
8414         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8415         on a SUBREG.
8417 2018-04-17  Martin Jambor  <mjambor@suse.cz>
8419         PR ipa/85421
8420         * ipa-cp.c (create_specialized_node): Call
8421         expand_all_artificial_thunks if necessary.
8423 2018-04-17  Martin Liska  <mliska@suse.cz>
8425         PR lto/85405
8426         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8427         in message, remote space in between '_G' and '('.
8429 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8431         PR target/85281
8432         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8433         avx512f_vmcmp<mode>3<round_saeonly_name>,
8434         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8435         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8436         avx512f_rndscale<mode><round_saeonly_name>,
8437         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8438         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8439         Use %<iptr>2 instead of %2 for -masm=intel.
8440         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8441         avx512f_vcvttss2usi<round_saeonly_name>,
8442         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8443         -masm=intel.
8444         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8445         avx512f_vcvttsd2usi<round_saeonly_name>,
8446         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8447         Use %q1 instead of %1 for -masm=intel.
8448         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8449         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8450         of %3 for -masm=intel.
8451         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8452         -masm=intel.
8453         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8454         -masm=intel.
8455         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8456         -masm=intel.
8457         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8458         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8459         %g1.
8460         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8461         -masm=intel.
8462         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8463         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8464         %g1 and one with %0 and %1.
8465         (avx512er_vmrcp28<mode><round_saeonly_name>,
8466         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8467         %1 for -masm=intel.
8468         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8469         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8470         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8471         of %0 and %{%4%} for -masm=intel.
8472         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8473         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8474         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8475         order of %0 and %{%5%}%{z%} for -masm=intel.
8477 2018-04-17  Jan Hubicka  <jh@suse.cz>
8479         PR lto/85405
8480         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8482 2018-04-17  Martin Liska  <mliska@suse.cz>
8484         PR ipa/85329
8485         * multiple_target.c (create_dispatcher_calls): Set apostrophes
8486         for target_clone error message.  Make default implementation
8487         clone to be a local declaration.
8488         (separate_attrs): Add new argument and check for an empty
8489         string.
8490         (expand_target_clones): Handle it.
8491         (ipa_target_clone): Make redirection just for target_clones
8492         functions.
8494 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
8495             Tom de Vries  <tom@codesourcery.com>
8497         PR middle-end/84955
8498         * omp-expand.c (expand_oacc_for): Add dummy false branch for
8499         tiled basic blocks without omp continue statements.
8501 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
8503         PR target/83660
8504         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8505         vec_extract expression as having side effects to make sure it gets
8506         a cleanup point.
8508 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
8510         PR target/85403
8511         * config/i386/i386.c (get_builtin_code_for_version): Check
8512         error_mark_node.
8514 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
8516         PR target/84331
8517         * gcc/config.gcc: Support "skylake".
8518         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8519         PROCESSOR_SKYLAKE.
8520         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8521         (processor_target_table): Add "skylake".
8522         (ix86_option_override_internal): Add "skylake".
8523         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8524         PROCESSOR_CANNONLAKE.
8525         (get_builtin_code_for_version): Fix priority for
8526         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8527         PROCESSOR_SKYLAKE-AVX512.
8528         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8529         (processor_type): Add PROCESSOR_SKYLAKE.
8531 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
8532             Jason Merrill  <jason@redhat.com>
8534         PR c++/85112
8535         * convert.c (convert_to_integer_1): Use direct recursion for
8536         enumeral types and types with a precision less than the number
8537         of bits in their mode.
8539 2018-04-16  Julia Koval  <julia.koval@intel.com>
8541         PR target/84413
8542         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
8543         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
8545 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
8547         PR target/85293
8548         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
8549         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
8550         and -mno-direct-move.
8552 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
8554         PR target/83402
8555         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
8556         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
8557         Ensure negative shifts result in {0}.
8559 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
8561         PR rtl-optimization/79916
8562         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
8563         regs (if any) to define how to gnerate SD moves when LRA is in
8564         progress.
8566 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
8568         PR rtl-optimization/85393
8569         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8570         * except.c (expand_dw2_landing_pad_for_region): Make static.
8571         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8572         a label and unconditional jump to old_bb, rather than
8573         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8574         basic block.
8576         PR rtl-optimization/85376
8577         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8578         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8579         instead of a specific value.
8581 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8582             Bin Cheng  <bin.cheng@arm.com>
8584         PR tree-optimization/82965
8585         PR tree-optimization/83991
8586         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8587         by_profile_only parameter.
8588         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8589         information if the loop was predicted to iterate too many times.
8590         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8592 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8594         PR lto/71991
8595         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8596         always inline.
8598 2018-04-13  Martin Liska  <mliska@suse.cz>
8599             Jakub Jelinek  <jakub@redhat.com>
8601         PR middle-end/81657
8602         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8603         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8604         * builtins.c (expand_builtin_memory_copy_args): Use
8605         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8606         handle dest_addr == pc_rtx.
8608 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
8610         PR target/85291
8611         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8612         asked to not generate direct moves.
8613         (fix_trunc<mode>si2_stfiwx): Similar.
8614         (fix_trunc<mode>si2_internal): Similar.
8616 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8618         PR debug/83157
8619         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8620         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8621         lookup if dest in some wider mode is known to be const0_rtx and
8622         if so, record permanent equivalence for it to be ZERO_EXTEND of
8623         the narrower mode destination.
8625 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8627         * lto-streamer-out.c (output_function): Revert 259346.
8628         * omp-expand.c (expand_oacc_for): Likewise.
8630 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
8632         PR rtl-optimization/85354
8633         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8634         * sel-sched.c (sel_global_init): ... here.
8636 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
8638         PR target/85238
8639         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8640         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8641         mode for PE-COFF targets.
8642         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8643         (i386_pe_asm_lto_end): Likewise.
8644         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8645         (TARGET_ASM_LTO_END): Likewise.
8646         * config/i386/winnt.c (saved_debug_info_level): New static variable.
8647         (i386_pe_asm_lto_start): New function.
8648         (i386_pe_asm_lto_end): Likewise.
8650 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8651             Richard Biener  <rguenther@suse.de>
8653         PR middle-end/84955
8654         * lto-streamer-out.c (output_function): Fix CFG loop state before
8655         streaming out.
8656         * omp-expand.c (expand_oacc_for): Handle calls to internal
8657         functions like regular functions.
8659 2018-04-12  Richard Biener  <rguenther@suse.de>
8661         PR lto/85371
8662         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8663         for the early LTO debug to properly generate references to it
8664         during DIE emission.  Do not re-use that for the skeleton for
8665         split-dwarf.
8666         (dwarf2out_early_finish): Likewise.
8668 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8670         PR target/85328
8671         * config/i386/sse.md
8672         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8673         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8674         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8675         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8676         and output is a reg, avoid creating invalid lowpart subreg, but
8677         instead split into a 512-bit move.  Don't split if not AVX512VL,
8678         input is xmm16+ reg and output is a mem.
8679         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8680         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8681         xmm16+ reg and output is a mem.
8683 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8685         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8686         also for flag_dwarf2_cfi_asm.
8688 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8690         PR rtl-optimization/85342
8691         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8692         a bool scalar var inside of the loop instead.  Don't try to update
8693         recog_data.operand after failed apply_change_group.
8695 2018-04-12  Tom de Vries  <tom@codesourcery.com>
8697         PR target/85296
8698         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8699         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
8700         array with flexible array member as array without given dimension.
8701         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
8702         argument for undefined param to true.
8704 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
8706         PR target/85321
8707         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8708         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
8709         from PowerPC section.
8710         * config/rs6000/sysv4.opt (mcall-): Improve help text.
8711         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
8712         help text that is too long.
8713         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
8714         help text that is too long.
8715         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
8716         help text that is too long.
8718 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
8720         * config/alpha/alpha.md (stack_probe_internal): Rename
8721         from "probe_stack".  Update all callers.
8723 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8725         PR rtl-optimization/84566
8726         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
8727         sched_macro_fuse_insns.
8729 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8731         PR target/84301
8732         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
8733         (compute_block_dependences): ... from here.
8735 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8737         PR tree-optimization/85331
8738         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
8739         from int to HOST_WIDE_INT.
8741 2018-04-11  Martin Jambor  <mjambor@suse.cz>
8743         PR ipa/84149
8744         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
8745         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
8746         not the same as the source val.
8747         (cgraph_edge_brings_value_p): New parameter.
8748         (gather_edges_for_value): Pass destination value to
8749         cgraph_edge_brings_value_p.
8750         (perhaps_add_new_callers): Likewise.
8751         (get_info_about_necessary_edges): Likewise and exclude values brought
8752         only by self-recursive edges.
8753         (create_specialized_node): Redirect only clones of self-calling edges.
8754         (+self_recursive_pass_through_p): New function.
8755         (find_more_scalar_values_for_callers_subset): Use it.
8756         (find_aggregate_values_for_callers_subset): Likewise.
8757         (known_aggs_to_agg_replacement_list): Removed.
8758         (decide_whether_version_node): Re-calculate known constants for all
8759         remaining context clones.
8761 2018-04-11  Richard Biener  <rguenther@suse.de>
8763         PR lto/85339
8764         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
8765         from early DWARF output.
8766         (dwarf2out_early_finish): Output line info unconditionally into
8767         early DWARF and add reference to it.
8769 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8771         PR target/85281
8772         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
8773         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
8774         other than V2DFmode using iptr mode attribute.
8775         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
8777 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8779         PR rtl-optimization/84659
8780         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
8782 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8784         PR debug/85302
8785         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
8786         SIZEP is NULL.
8787         (output_loc_list): Pass address of a dummy size variable even in the
8788         locview handling loop.
8789         (index_location_lists): Add comment on why skip_loc_list_entry can't
8790         call size_of_locs.
8792 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8794         PR target/85261
8795         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
8796         into register.
8798 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
8800         PR target/85321
8801         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8802         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
8803         and -mstring-compare-inline-limit.
8805 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
8807         PR target/85287
8808         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
8809         for stack clash protection in a register whenever we need it to be in
8810         a register.
8812 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
8814         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
8815         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
8817 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
8819         PR target/85321
8820         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
8821         the help text.
8822         (mlong-double-): Ditto.
8823         * config/rs6000/sysv4.opt (msdata=): Ditto.
8824         (mtls-size=): Ditto.
8826 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8828         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8829         erroneous entries for
8830         "vector int vec_ldl (int, long int *)", and
8831         "vector unsigned int vec_ldl (int, unsigned long int *)".
8832         Add comments and entries for
8833         "vector bool char vec_ldl (int, bool char *)",
8834         "vector bool short vec_ldl (int, bool short *)",
8835         "vector bool int vec_ldl (int, bool int *)",
8836         "vector bool long long vec_ldl (int, bool long long *)",
8837         "vector pixel vec_ldl (int, pixel *)",
8838         "vector long long vec_ldl (int, long long *)",
8839         "vector unsigned long long vec_ldl (int, unsigned long long *)".
8840         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
8841         type tree bool_long_long_type_node and correct definition of
8842         bool_V2DI_type_node to make reference to this new type tree.
8843         (rs6000_mangle_type): Replace erroneous reference to
8844         bool_long_type_node with bool_long_long_type_node.
8845         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
8846         comments to emphasize sign distinctions for char and int types and
8847         replace RS6000_BTI_bool_long constant with
8848         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
8849         use of RS6000_BTI_pixel.
8850         (bool_long_type_node): Remove this macro definition.
8851         (bool_long_long_type_node): New macro definition
8853 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
8855         PR rtl-optimization/85300
8856         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
8857         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
8858         simplify_unary_operation fails.
8860 2018-04-10  Martin Liska  <mliska@suse.cz>
8862         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
8863         cgraph_edge and ipa_ref.
8865 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
8867         PR target/85177
8868         PR target/85255
8869         * config/i386/sse.md
8870         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
8871         computation of the VEC_MERGE selector from mask.
8872         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
8873         Fix decoding of the VEC_MERGE selector into mask.
8875 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
8877         PR tree-optimization/85286
8878         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
8880 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
8882         * final.c (final_1): Set insn_last_address as well as
8883         insn_current_address.
8885 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8887         PR target/85173
8888         * explow.c (emit_stack_probe): Call validize_mem on memory location
8889         before passing it to gen_probe_stack.  Create address operand and
8890         legitimize it for the probe_stack_address case.
8892 2018-04-09  Jan Hubicka  <jh@suse.cz>
8894         PR lto/85078
8895         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
8896         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
8897         * tree.c (free_lang_data_in_type): Fix handling of binfos;
8898         walk basetypes.
8899         (free_lang_data): Rebuild type inheritance graph.
8901 2018-04-09  Martin Sebor  <msebor@redhat.com>
8903         * invoke.texi (-finline-small-functions): Mention other optimization
8904         options.
8905         (-findirect-inlining, -fpartial-inlining): Same.
8906         (-finline-functions-called-once): Same.
8907         (-freorder-blocks-and-partition): Same.
8909 2018-04-09  Jan Hubicka  <jh@suse.cz>
8911         PR rtl/84058
8912         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
8913         jumps; choose last target that matches the criteria (i.e.
8914         no partition changes for non-crossing jumps).
8915         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
8916         support for redirecting crossing jumps to non-crossing.
8918 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
8920         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
8921         also for naked functions.
8923 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
8925         * config/arc/arc.md (add_shift): New pattern.
8926         (add_shift2): Likewise.
8927         (sub_shift): Likewise.
8928         (sub_shift_cmp0_noout): Likewise.
8929         (compare_si_ashiftsi): Likewise.
8930         (xbfu_cmp0_noout): New combine pattern.
8931         (xbfu_cmp0"): Likewise.
8932         (movsi_set_cc_insn): Place the predicable variant first.
8933         (commutative_binary_cmp0_noout): Remove clobber.
8934         (commutative_binary_cmp0): New pattern.
8935         (noncommutative_binary_cmp0): Likewise.
8936         (noncommutative_binary_cmp0_noout): Likewise.
8937         (noncommutative_binary_comparison_result_used): Removed.
8938         (rsub_cmp0): New pattern.
8939         (rsub_cmp0_noout): Likewise.
8940         (extzvsi): Changed, keep only meaningful variants.
8941         (SQH, SEZ): New iterators.
8942         (SQH_postfix): New mode attribute.
8943         (SEZ_prefix): New code attribute.
8944         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
8945         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
8946         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
8947         of numerical value.
8948         (noncommutative_operator): Check the availability of barrel
8949         shifter option.
8951 2018-04-09  Richard Biener  <rguenther@suse.de>
8953         PR tree-optimization/85284
8954         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
8955         Only use the niter constraining form of simple_iv when the exit
8956         is always executed.
8958 2018-04-09  Tom de Vries  <tom@codesourcery.com>
8960         PR target/84041
8961         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8962         (define_expand "*memory_barrier"): New define_expand.
8963         (define_insn "memory_barrier"): New insn.
8965 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8967         PR rtl-optimization/80463
8968         PR rtl-optimization/83972
8969         PR rtl-optimization/83480
8971         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
8972         correct producer for the insn.
8973         (tidy_control_flow): Fixup seqnos in case of debug insns.
8975 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8977         PR rtl-optimization/83913
8979         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
8980         different sched-times when merging exprs.
8982 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8984         PR rtl-optimization/83962
8986         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
8987         tidy_fallthru_edge and tidy_control_flow.
8989 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8991         PR rtl-optimization/83530
8993         * sel-sched.c (force_next_insn): New global variable.
8994         (remove_insn_for_debug): When force_next_insn is true, also leave only
8995         next insn in the ready list.
8996         (sel_sched_region): When the region wasn't scheduled, make another pass
8997         over it with force_next_insn set to 1.
8999 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9001         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9002         into tm_file.
9003         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9004         for interrupt control.
9005         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9006         functions for interrupt control.
9007         * config/nds32/nds32-intrinsic.md: Likewise.
9008         * config/nds32/nds32_intrinsic.h: Likewise.
9009         * config/nds32/nds32.h (nds32_builtins): Likewise.
9011 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9013         * config/nds32/nds32.c (nds32_init_machine_status,
9014         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9015         strict_aligned_p field.
9016         (nds32_expand_to_rtl_hook): New function.
9017         (TARGET_EXPAND_TO_RTL_HOOK): Define.
9018         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9020 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9021             Chung-Ju Wu  <jasonwucj@gmail.com>
9023         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9024         * config/nds32/nds32-n7.md: New file.
9025         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9026         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9027         pipeline.
9028         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9029         * config/nds32/nds32.md (pipeline_model): Add n7.
9030         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9031         * config/nds32/pipelines.md: Include n7 settings.
9033 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9034             Chung-Ju Wu  <jasonwucj@gmail.com>
9036         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9037         * config/nds32/nds32-e8.md: New file.
9038         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9039         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9040         pipeline.
9041         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9042         * config/nds32/nds32.md (pipeline_model): Add e8.
9043         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9044         * config/nds32/pipelines.md: Include e8 settings.
9046 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9047             Chung-Ju Wu  <jasonwucj@gmail.com>
9049         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9050         * config/nds32/nds32-n8.md: New file.
9051         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9052         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9053         pipeline.
9054         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9055         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9056         * config/nds32/nds32.md (pipeline_model): Add n8.
9057         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9058         * config/nds32/pipelines.md: Include n8 settings.
9060 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9061             Chung-Ju Wu  <jasonwucj@gmail.com>
9063         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9064         * config/nds32/nds32-n9-2r1w.md: New file.
9065         * config/nds32/nds32-n9-3r2w.md: New file.
9066         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9067         nds32_register_ports): New or modify for cpu n9.
9068         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9069         pipeline.
9070         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9071         * config/nds32/nds32-utils.c: New file.
9072         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9073         TARGET_MUL_SLOW): Define.
9074         * config/nds32/nds32.md (pipeline_model): New attribute.
9075         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9076         New options that support cpu n9.
9077         * config/nds32/pipelines.md: Include n9 settings.
9078         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9080 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9082         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9083         information if necessary.
9084         (output_cond_branch_compare_zero): Likewise.
9085         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9086         (nds32_target_alignment): Refine for alignment.
9087         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9088         (FUNCTION_BOUNDARY): Modify.
9089         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9090         align case.
9091         * config/nds32/nds32.opt (malways-align, malign-functions): New.
9093 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9095         * config/nds32/constants.md (unspec_volatile_element): Add values for
9096         TLB operation and data prefetch.
9097         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9098         functions for TLB operation and data prefetch.
9099         * config/nds32/nds32-intrinsic.md: Likewise.
9100         * config/nds32/nds32_intrinsic.h: Likewise.
9101         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9102         (nds32_print_operand): Likewise.
9103         * config/nds32/nds32.h (nds32_builtins): Likewise.
9105 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
9106         Andrew Pinski <pinsika@gcc.gnu.org>
9108         PR middle-end/82976
9109         * match.pd: Use constant_boolean_node of correct type instead of
9110         boolean_true_node or boolean_false_node for simplifying
9111         pointer comparisons to zero.
9113 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9115         PR tree-optimization/80021
9116         * tree.c (verify_type_variant): Make error call in verify_variant_match
9117         translatable and remove final full stop.
9119 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9121         * config/nds32/constants.md (unspec_volatile_element): Add
9122         UNSPEC_VOLATILE_EH_RETURN.
9123         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9124         nds32_output_stack_pop): Support dwarf exception handling process.
9125         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9126         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9127         exception handling process.
9128         (nds32_compute_stack_frame): Likewise.
9129         (nds32_return_addr_rtx): Likewise.
9130         (nds32_initial_elimination_offset): Likewise.
9131         (nds32_expand_prologue): Likewise.
9132         (nds32_expand_epilogue): Likewise.
9133         (nds32_dynamic_chain_address): New function.
9134         * config/nds32/nds32.h (machine_function): Add fields for dwarf
9135         exception handling.
9136         (DYNAMIC_CHAIN_ADDRESS): Define.
9137         (EH_RETURN_DATA_REGNO): Define.
9138         (EH_RETURN_STACKADJ_RTX): Define.
9139         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9140         patterns for dwarf exception handling.
9142 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9144         * config/nds32/nds32.h: Clean up obsolete macros.
9146 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9148         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9149         Add enum values for particular instructions.
9150         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9151         particular intrinsic functions.
9152         * config/nds32/nds32-intrinsic.md: Likewise.
9153         * config/nds32/nds32_intrinsic.h: Likewise.
9154         * config/nds32/nds32.h (nds32_builtins): Likewise.
9155         * config/nds32/nds32.md (type): Add pbsad and pbsada.
9156         (btst, ave): New patterns for particular instructions.
9158 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9160         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9161         Add enum values for atomic load/store and memory sync.
9162         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9163         and memory sync.
9164         * config/nds32/nds32-intrinsic.md: Likewise.
9165         * config/nds32/nds32_intrinsic.h: Likewise.
9166         * config/nds32/nds32.h (nds32_builtins): Likewise.
9168 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9170         PR tree-optimization/85257
9171         * fold-const.c (native_encode_vector): If not all elts could fit
9172         and off is -1, return 0 rather than offset.
9173         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9174         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9175         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
9176         adjust buffer in native_interpret_expr call.
9178 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9180         * config/nds32/constants.md (unspec_volatile_element): Add cache
9181         control enum values.
9182         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9183         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9184         * config/nds32/nds32.c (nds32_cctl_names): New.
9185         (nds32_print_operand): Handle cache control register names.
9186         * config/nds32/nds32.h (nds32_builtins): New enum values.
9187         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9188         macros.
9189         * config/nds32/nds32.md (type): Add mmu.
9190         * config/nds32/pipelines.md (simple_insn): Add mmu.
9192 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9194         * config/nds32/nds32.md (type): Remove call.
9195         * config/nds32/pipelines.md (simple_insn): Likewise.
9197 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9199         * config/nds32/constants.md (unspec_volatile_element): Add
9200         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9201         UNSPEC_VOLATILE_FMFCFG.
9202         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9203         description for fmfcfg and fmfcsr.
9204         (bdesc_1arg): Add fmtcsr.
9205         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9206         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9207         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9208         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9209         unspec_fmfcfg): New patterns.
9210         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9211         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9212         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9213         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9214         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9215         __nds32__fmfcfg): Define.
9217 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9219         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9220         intrinsic register names.
9221         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9222         intrinsic register enum values and macros.
9224 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9226         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9227         for load/store addressing form.
9228         (nds32_print_operand_address): Likewise.
9230 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
9232         PR target/85196
9233         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9234         based on LABEL_REF.  Remove useless assertion.
9235         (pic_address_needs_scratch): Fix formatting.
9236         (sparc_legitimize_pic_address): Minor tweaks.
9237         (sparc_delegitimize_address): Adjust assertion accordingly.
9238         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9239         into symbolic_operand.
9240         (movsi_high_pic_label_ref): Likewise.
9241         (movsi_lo_sum_pic_label_ref): Likewise.
9242         (movdi_pic_label_ref): Likewise.
9243         (movdi_high_pic_label_ref): Likewise.
9244         (movdi_lo_sum_pic_label_ref): Likewise.
9246 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
9248         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9249         custom LIB_SPEC setup.
9251 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
9252             Kito Cheng  <kito.cheng@gmail.com>
9254         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9255         * config/riscv/freebsd.h: New.
9257 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9259         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9260         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9261         file.
9263 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9264             Kito Cheng  <kito.cheng@gmail.com>
9266         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9267         nds32_output_call, nds32_symbol_binds_local_p): New functions.
9268         * config/nds32/nds32-protos.h (nds32_output_call,
9269         nds32_output_return): Declare.
9270         * config/nds32/nds32.md: Refine all the call and return patterns.
9272 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9274         PR debug/85252
9275         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9276         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9278         PR rtl-optimization/84872
9279         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9280         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9281         EDGE_CROSSING edge.
9283 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
9285         * expr.c (copy_blkmode_to_reg): Revert 254862.
9286         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9288 2018-04-06  Richard Biener  <rguenther@suse.de>
9290         PR middle-end/85244
9291         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9292         after seeing a component reference with an adjacent field.  Treat
9293         refs to arrays at struct end of external decls similar to
9294         refs to unconstrained commons.
9296 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9298         PR sanitizer/85213
9299         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9300         look through SAVE_EXPRs with non-side-effects argument.  Adjust
9301         recursive calls.
9302         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9303         save_p here.
9305 2018-04-06  Richard Biener  <rguenther@suse.de>
9307         PR middle-end/85180
9308         * alias.c (find_base_term): New wrapper around find_base_term
9309         unwinding CSELIB_VAL_PTR changes.
9310         (find_base_term): Do not restore CSELIB_VAL_PTR during the
9311         recursion.
9313 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9315         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9316         instructions.
9317         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9318         constant definitions.
9319         ("nop"): lr 0,0 -> nopr r0
9320         ("nop_lr0", "nop_lr1"): New insn definitions.
9322 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9324         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9325         NDS32_V3PUSH_AVAILABLE_P macro.
9327 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
9328             Chung-Ju Wu  <jasonwucj@gmail.com>
9330         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9331         (nds32*-*-*): Add float and fpu_config into supported_defaults.
9332         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9333         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9334         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9335         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9336         * config/nds32/constraints.md: New constraints and checking for hard
9337         float configuration.
9338         * config/nds32/iterators.md: New mode iterator and attribute for hard
9339         float configuration.
9340         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9341         patterns.
9342         * config/nds32/nds32-fpu.md: New file.
9343         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9344         deal with hard float code generation.
9345         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9346         ARCH_V3S.
9347         (abi_type, float_reg_number): New enum type.
9348         * config/nds32/nds32-predicates.c: New predicates for hard float.
9349         * config/nds32/nds32-protos.h: Declare functions for hard float.
9350         * config/nds32/nds32.c: Implementation for hard float configuration.
9351         * config/nds32/nds32.h: Definitions for hard float configuration.
9352         * config/nds32/nds32.md: Include hard float machine description and
9353         modify patterns for hard float configuration.
9354         * config/nds32/nds32.opt: New options for hard float configuration.
9355         * config/nds32/predicates.md: New predicates for hard float
9356         configuration.
9358 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9360         * common/config/nds32/nds32-common.c
9361         (nds32_option_optimization_table): Enable -mreleax-hint by default.
9363 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
9365         PR middle-end/85195
9366         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9367         CONSTRUCTOR_ELT (ctor, ...)->value.
9369 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
9371         PR target/85193
9372         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9374 2018-04-05  Tom de Vries  <tom@codesourcery.com>
9376         PR target/85204
9377         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9378         cond jump.
9380 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9381             Kito Cheng  <kito.cheng@gmail.com>
9383         * config/nds32/constraints.md (U33): Fine-tune checking condition.
9384         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9385         * config/nds32/nds32.h (nds32_16bit_address_type): Add
9386         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9388 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9389             Kito Cheng  <kito.cheng@gmail.com>
9391         * config/nds32/constraints.md (Ufe): New memory constraint.
9392         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9393         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9394         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9395         operands.
9396         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9397         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9399 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9401         * config/nds32/nds32.md: Use optimize_size in the condition for
9402         alu-shift instructions.
9404 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9406         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9408 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9410         * config/nds32/nds32.md (negsi2): Refine pattern.
9412 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9413             Chung-Ju Wu  <jasonwucj@gmail.com>
9415         * config/nds32/iterators.md (shift_rotate): New code iterator.
9416         (shift): New code attribute.
9417         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9418         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9419         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9420         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9421         bit-wise operations.
9422         (andsi3, *andsi3): Ditto.
9423         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9424         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9425         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9426         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9427         nds32_ior_operand, nds32_xor_operand): New predicates.
9429 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9431         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9432         (addsi3, subsi3): ... this.
9434 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9436         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9438 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9440         * config/nds32/nds32.md: Adjust indention.
9442 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9444         * config/nds32/nds32.md (feature): New attribute.
9446 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9448         * config/nds32/nds32.md (subtype): New attribute.
9450 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9452         PR target/85203
9453         * config/arm/arm-builtins.c (arm_expand_builtin): Change
9454         expansion to perform a bitwise AND of the argument followed by a
9455         boolean negation of the result.
9457 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
9459         PR rtl-optimization/84878
9460         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9461         the basic block.  Assert the use reference is not artificial and that
9462         it has an associated insn.
9464 2018-04-04  Michael Matz  <matz@suse.de>
9466         * builtins.c (compute_objsize): Pass correct operand
9467         to array_at_struct_end_p.
9469 2018-04-04  Richard Biener  <rguenther@suse.de>
9471         PR lto/85176
9472         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9473         from contexts for DINFO_LEVEL_TERSE and below.
9475 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9477         * config/nds32/nds32-doubleword.md (move_<mode>): Require
9478         resiter_operand condition.
9479         * config/nds32/nds32.md (*move<mode>): Ditto.
9481 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9482             Monk Chiang  <sh.chiang04@gmail.com>
9484         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9486 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9488         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9490 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9491             Kito Cheng  <kito.cheng@gmail.com>
9493         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9494         nds32_cond_code_str, output_cond_branch,
9495         output_cond_branch_compare_zero, nds32_expand_cbranch,
9496         nds32_expand_cstore, nds32_expand_movcc,
9497         nds32_output_cbranchsi4_equality_zero,
9498         nds32_output_cbranchsi4_equality_reg,
9499         nds32_output_cbranchsi4_equality_reg_or_const_int,
9500         nds32_output_cbranchsi4_greater_less_zero: New functions.
9501         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9502         nds32_expand_cstore, nds32_expand_movcc,
9503         nds32_output_cbranchsi4_equality_zero,
9504         nds32_output_cbranchsi4_equality_reg,
9505         nds32_output_cbranchsi4_equality_reg_or_const_int,
9506         nds32_output_cbranchsi4_greater_less_zero): Declare.
9507         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9508         nds32_rimm11s_operand): New predicates.
9509         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9510         * config/nds32/nds32.md: Rewrite all the branch and conditional move
9511         patterns.
9513 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9515         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9516         * config/nds32/nds32.md: Ditto.
9517         * config/nds32/pipelines.md: Ditto.
9519 2018-04-04  Richard Biener  <rguenther@suse.de>
9521         PR tree-optimization/85168
9522         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9523         propagating abnormals.
9525 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9527         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9529 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9530             Kito Cheng  <kito.cheng@gmail.com>
9532         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9533         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9534         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9535         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9536         * config/nds32/nds32.md (sibcall_internal): New.
9537         (sibcall_register): Remove.
9538         (sibcall_immediate): Remove.
9539         (sibcall_value_internal): New.
9540         (sibcall_value_register): Remove.
9541         (sibcall_value_immediate): Remove.
9542         * config/nds32/predicates.md (nds32_general_register_operand): New.
9543         (nds32_call_address_operand): New.
9545 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9547         PR rtl-optimization/85167
9548         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
9549         bb_defs if *split_p, instead preinitialize it to NULL.
9551         PR tree-optimization/85156
9552         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
9553         evaluating the argument multiple times.
9555 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
9557         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
9558         than vector.
9559         (_mm_cvtpd_ps): Likewise.
9560         (_mm_cvttpd_epi32): Likewise.
9561         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
9562         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
9563         vector, pixel, and bool following altivec.h include.
9565 2018-04-03  Martin Sebor  <msebor@redhat.com>
9567         * doc/extend.texi (Common Function Attributes): Clarify.
9568         (const attribute): Likewise.
9569         (pure attribute): Likewise.
9571 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9573         PR target/85169
9574         * config/i386/i386.c (ix86_expand_vector_set): Use
9575         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
9577 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
9579         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9580         instructions when changing rounding bits to preserve precision bits
9581         in the x87 control word.
9583 2018-04-03  Martin Liska  <mliska@suse.cz>
9585         PR tree-optimization/82491
9586         * rtl.h (strip_offset_and_add): Replace += suboffset with
9587         poly_uint64 () + suboffset.
9589 2018-03-29  Martin Liska  <mliska@suse.cz>
9590             Martin Jambor  <mjambor@suse.cz>
9592         PR ipa/84947
9593         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9594         param_type is not an integral or pointer type.
9596 2018-04-03  Richard Biener  <rguenther@suse.de>
9598         * sese.h (recompute_all_dominators): Remove.
9600 2018-04-02  Martin Sebor  <msebor@redhat.com>
9602         * doc/invoke.texi (-Wrestrict): Fix typos.
9604 2018-04-02  Jim Wilson  <jimw@sifive.com>
9606         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9607         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9608         (<optab>di3, <optab>si3_extend): Likewise.
9609         (<optab>si3_mask, <optab>si3_mask_1): New.
9610         (<optab>di3_mask, <optab>di3_mask_1): New.
9611         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9612         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9613         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9615 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
9617         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9618         example.
9620 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9622         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9623         (nds32_canonicalize_comparison): New function.
9625 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9626             Kito Cheng  <kito.cheng@gmail.com>
9627             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9629         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9630         * config/nds32/constants.md (unspec_volatile_element): Add
9631         UNSPEC_VOLATILE_RELAX_GROUP.
9632         * config/nds32/nds32-relax-opt.c: New file.
9633         * config/nds32/nds32-predicates.c
9634         (nds32_symbol_load_store_p): New function.
9635         * config/nds32/nds32-protos.h
9636         (nds32_symbol_load_store_p): Declare function.
9637         (make_pass_nds32_relax_opt): Declare new rtl pass function.
9638         * config/nds32/nds32.c
9639         (nds32_register_pass): New function to register pass.
9640         (nds32_register_passes): New function to register passes.
9641         * config/nds32/nds32.md (relax_group): New pattern.
9642         * config/nds32/nds32.opt (mrelax-hint): New option.
9643         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9645 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
9647         * config/nds32/t-nds32: Modify files dependency.
9649 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9651         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9652         (PROFILE_HOOK): Define its implementation.
9654 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9656         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9657         type and 32-bit size.
9659 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
9661         PR middle-end/85090
9662         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9663         (V_128_256): New mode iterator.
9664         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9665         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9666         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9667         of V.
9668         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9669         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9671 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
9673         PR target/83315
9674         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9675         NaN inputs correctly.
9677 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
9679         PR target/80546
9680         * config/rs6000/vsx.md (??r): New mode attribute.
9681         (*vsx_mov<mode>_64bit): Use it.
9682         (*vsx_mov<mode>_32bit): Likewise.
9684 2018-03-30  Martin Sebor  <msebor@redhat.com>
9686         PR tree-optimization/84818
9687         * builtins.c (check_access): Use warning_n.
9689 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9691         PR target/83822
9692         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9693         condition.
9694         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9695         condition.
9697 2018-03-30  Julia Koval  <julia.koval@intel.com>
9699         PR target/84413
9700         * x86-tune.def (movx, partial_reg_dependency): Enable for
9701         m_SKYLAKE_AVX512.
9703 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
9705         PR inline-asm/84985
9706         * lra-constraints.c (process_alt_operands): Move setting
9707         this_alternative_matches below.
9709 2018-03-29  Martin Liska  <mliska@suse.cz>
9711         PR lto/84995.
9712         * doc/invoke.texi: Document how LTO works with debug info.
9713         Describe auto-load support of binutils.  Mention 'x86-64'
9714         as valid option value of -march option.
9716 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
9718         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
9720         PR c/85094
9721         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
9722         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
9723         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
9724         checking.
9726 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
9728         PR target/84912
9729         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
9730         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
9731         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
9732         for RS6000_BTM_POWERPC64.
9733         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
9734         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
9735         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
9736         definition.
9737         (DIVDE): Use it.
9738         (DIVDEU): Likewise.
9740 2018-03-28 Carl Love  <cel@us.ibm.com>
9742         Revert
9743         2017-09-27  Carl Love  <cel@us.ibm.com>
9745         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9746         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9747         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9748         fctiw instruction.
9750 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9752         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
9753         instead of __vector bool.
9754         (_mm_max_pu8): Likewise.
9755         (_mm_min_pi16): Likewise.
9757 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
9759         PR target/84912
9760         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
9761         (DIVWEUO): Likewise.
9762         (DIVDEO): Likewise.
9763         (DIVDEUO): Likewise.
9764         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
9765         DIVWEUO and DIVDEUO.
9766         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
9767         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
9768         (div_extend): Likewise.
9769         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
9770         builtin function.
9771         (__builtin_divweuo): Likewise.
9772         (__builtin_divdeo): Likewise.
9773         (__builtin_divdeuo): Likewise.
9775 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
9777         PR target/85095
9778         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
9779         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
9781         PR tree-optimization/82004
9782         * gimple-match-head.c (optimize_pow_to_exp): New function.
9783         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
9784         Don't fold to exp if optimize_pow_to_exp is false.
9786 2018-03-28  Martin Liska  <mliska@suse.cz>
9788         PR other/84819
9789         * calls.c (initialize_argument_information): Fix trailing space.
9790         * common.opt: Fix typo and provide better explanation for
9791         -fsanitize-coverage option.
9792         * config/i386/i386.opt: Fix typo.
9794 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
9795             Martin Liska  <mliska@suse.cz>
9797         PR sanitizer/85081
9798         * gimplify.c (asan_poison_variable): Don't do the check for
9799         gimplify_omp_ctxp here.
9800         (gimplify_decl_expr): Do it here.
9801         (gimplify_target_expr): Likewise.
9803 2018-03-28  Martin Liska  <mliska@suse.cz>
9805         PR target/84988
9806         * config/i386/i386.c (ix86_function_arg_advance): Do not call
9807         chkp_type_bounds_count if MPX is not enabled.
9809 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9811         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
9813 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
9815         PR target/84914
9816         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
9817         function to create the function decl for complex long double
9818         multiply and divide for -mabi=ieeelongdouble.
9819         (init_float128_ieee): Call it.
9821 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
9823         PR target/85044
9824         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
9825         -fcf-protection=branch -mibt.
9826         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
9828 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9830         PR target/81863
9831         * config/arm/arm.c (arm_valid_symbolic_address): Handle
9832         arm_word_relocations.
9834 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
9836         PR target/85056
9837         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
9838         extern array declarations.
9840 2018-03-27  Richard Biener  <rguenther@suse.de>
9842         PR middle-end/84067
9843         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
9844         explicit single_use checks.
9846 2018-03-27  Richard Biener  <rguenther@suse.de>
9848         PR tree-optimization/85082
9849         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
9850         Valueize the VUSE.
9852 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9854         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
9855         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
9856         Turn on fasynchronous-unwind-tables and funwind-tables.
9858 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
9860         PR target/85073
9861         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
9862         (*bmi_blsr_<mode>_ccz): Ditto.
9864 2018-03-26  Tom de Vries  <tom@codesourcery.com>
9866         PR tree-optimization/85063
9867         * omp-general.c (offloading_function_p): New function.  Factor out
9868         of ...
9869         * omp-offload.c (pass_omp_target_link::gate): ... here.
9870         * omp-general.h (offloading_function_p): Declare.
9871         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
9872         with attribute omp declare target for offloading functions.
9874 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
9876         PR tree-optimization/84005
9877         * tree-data-ref.h (get_base_for_alignment): Declare.
9878         * tree-data-ref.c (get_base_for_alignment_1): New function.
9879         (get_base_for_alignment): Likewise.
9880         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
9881         get_base_for_alignment to find a suitable base object, instead
9882         of always using drb->base_address.
9884 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
9886         PR inline-asm/85022
9887         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
9888         known size by default.
9890 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
9892         PR inline-asm/85030
9893         * lra-constraints.c (process_alt_operands): Don't match BLKmode
9894         and non BLKmode operands.
9896 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9898         PR target/85026
9899         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
9900         Clean up attributes.
9902 2018-03-23  Richard Biener  <rguenther@suse.de>
9904         PR debug/85020
9905         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
9906         we are going to emit early debug for LTO.
9908 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
9910         PR inline-asm/85034
9911         * function.c (match_asm_constraints_1): Don't optimize if input
9912         doesn't satisfy general_operand predicate for output's mode.
9914         PR inline-asm/85022
9915         * alias.c (write_dependence_p): Don't require for x_canonicalized
9916         non-VOIDmode if x has VOIDmode.
9918         PR sanitizer/85029
9919         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
9920         just don't try to optimize it rather than assert it never happens.
9922 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9924         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
9925         macro expansions for definition of ST_INTERNAL_<mode> and
9926         LD_INTERNAL_<mode> builtins.
9927         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
9928         Remove prototype.
9929         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
9930         function.
9931         (altivec_expand_st_builtin): Likewise.
9932         (altivec_expand_builtin): Remove calls to deleted functions.
9933         (rs6000_address_for_altivec): Delete this function.
9934         * config/rs6000/vector.md: Remove expands for
9935         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
9937 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
9939         PR target/84826
9940         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
9941         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
9942         re-computing once computed.
9943         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
9944         (arm_init_machine_status): Initialize
9945         machine->static_chain_stack_bytes.
9947 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9949         PR target/84760
9950         * doc/extend.texi: Add four new prototypes for vec_ld.
9951         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
9952         definitions for more logical presentation.
9953         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
9954         entries for V1TI variants of __builtin_altivec_ld builtin.
9955         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
9956         handling of V1TI variant of LVX icode pattern.
9957         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
9958         (rs6000_gimple_fold_builtin): Likewise.
9959         (altivec_init_builtins): Add code to define
9960         __builtin_altivec_lvx_v1ti function.
9962 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
9964         PR inline-asm/84941
9965         * function.c (match_asm_constraints_1): Don't do the optimization
9966         if input isn't a REG, SUBREG, MEM or constant.
9968 2018-03-22  Tom de Vries  <tom@codesourcery.com>
9970         PR tree-optimization/84956
9971         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
9972         bb_has_abnormal_pred.
9974 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
9976         PR sanitizer/85018
9977         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
9978         DECL_INITIAL (decl) to decl at the end.
9979         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
9980         adjust the comment.
9982 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
9984         * doc/extend.texi (__builtin_tgmath): Document when complex
9985         integer types are treated as _Complex _Float64.
9987 2018-03-21  Tom de Vries  <tom@codesourcery.com>
9989         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
9991 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9993         PR tree-optimization/84960
9994         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
9995         if it is ENTRY block, move them into single succ of ENTRY in that case.
9997 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
9999         PR tree-optimization/84811
10000         * poly-int.h (poly_span_traits): Remove the T3 parameter and
10001         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10002         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10003         (known_subrange_p): Update accordingly.  Cast each value involved
10004         in the size comparison, rather than casting the result of the
10005         subtraction.
10007 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10009         PR tree-optimization/84982
10010         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10011         by flipping the least significant bit rather than all bits from
10012         bitpos to bitpos + bitsize - 1.
10014 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10016         * doc/extend.texi (Deprecated Features): Remove mention of
10017         long-deleted deprecations.
10019 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10021         PR jit/84288
10022         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10023         * configure: Regenerate.
10025 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10027         PR tree-optimization/83126
10028         * tree-parloops.c (num_phis): New function.
10029         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10031 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10033         * doc/extend.texi (Deprecated Features): Update deprecated flags,
10034         mention anon-struct/union members and trailing attributes.
10036 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
10038         PR tree-optimization/84969
10039         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10040         builtin memset partitions if they set different rhs values.
10042 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10044         PR rtl-optimization/84989
10045         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10046         VEC_DUPLICATE with scalar result mode.
10048 2018-03-21  Martin Liska  <mliska@suse.cz>
10050         PR ipa/84963
10051         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10052         not intended return statement.
10054 2018-03-21  Martin Liska  <mliska@suse.cz>
10056         PR target/84988
10057         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10058         (chkp_find_bound_slots_1): Limit number of iterations.
10060 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
10062         PR target/84838
10063         * Minor grammar fixes for x86 options.
10065 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10067         PR debug/84875
10068         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10069         holding REG_CFA_RESTORE notes, instead turn them into a USE.
10071 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
10073         PR target/83789
10074         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10075         (altivec_lvx_<mode>_1op): Likewise.
10076         (altivec_stvx_<mode>_2op): Likewise.
10077         (altivec_stvx_<mode>_1op): Likewise.
10078         (altivec_lvx_<VM2:mode>): New define_expand.
10079         (altivec_stvx_<VM2:mode>): Likewise.
10080         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10081         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10082         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10083         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10084         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10085         (rs6000_gen_lvx): Likewise.
10086         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10087         (altivec_expand_stv_builtin): Likewise.
10088         (altivec_expand_builtin): Likewise.
10089         * config/rs6000/vector.md: Likewise.
10091 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10093         PR target/82518
10094         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10095         BYTES_BIG_ENDIAN.
10097 2018-03-20  Richard Biener  <rguenther@suse.de>
10099         PR target/84986
10100         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10101         sign-conversions as zero, fall back to standard scalar_stmt
10102         cost for the rest.
10104 2018-03-20  Martin Liska  <mliska@suse.cz>
10106         PR ipa/84825
10107         * predict.c (rebuild_frequencies): Handle case when we have
10108         PROFILE_ABSENT, but flag_guess_branch_prob is false.
10110 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10112         PR target/84990
10113         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10114         flag_section_anchors.
10115         * varasm.c (use_blocks_for_decl_p): Remove hack for
10116         dw2_force_const_mem.
10118         PR target/84845
10119         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10120         to ...
10121         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
10122         be created, use lowpart_subreg of operands[0] rather than operands[0]
10123         itself.
10124         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10125         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10126         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10127         and n constraint instead of aarch64_shift_imm_di and Usd.
10128         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10129         (*aarch64_<optab>_reg_minus<mode>3): ... this.
10131 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
10133         PR target/82989
10134         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10135         to favor GPR over NEON registers.
10136         (<shift>di3_neon): Likewise.
10138 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10140         PR target/84952
10141         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10142         (nvptx_process_pars): Emit bar.sync asap and alap.
10144 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10146         PR target/84954
10147         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10148         seen_label if seen_label is already set.
10150 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10152         PR target/84945
10153         * config/i386/i386.c (fold_builtin_cpu): For features above 31
10154         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10155         Use 1U instead of 1.  Formatting fixes.
10157         PR c/84953
10158         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10159         instead of TREE_TYPE (s1) for the return value.
10161 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
10163         PR tree-optimization/84946
10164         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10165         bitsize + bitsize in poly_uint64 rather than poly_int64.
10167         PR sanitizer/78651
10168         * dwarf2asm.c: Include fold-const.c.
10169         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10170         of decl rather than decl itself.
10172         PR rtl-optimization/84643
10173         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10175 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
10177         PR sanitizer/78651
10178         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10179         calling assemble_variable.
10181 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
10183         PR target/81647
10184         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10185         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10187 2018-03-19  Jim Wilson  <jimw@sifive.com>
10189         PR bootstrap/84856
10190         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10191         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10192         (riscv_first_stack_step): Likewise.
10193         (riscv_option_override): Use STACK_BOUNDARY instead of
10194         MIN_STACK_BOUNDARY.
10195         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10196         MIN_STACK_BOUNDARY.
10197         (BIGGEST_ALIGNMENT): Set to 128.
10198         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10199         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10200         STACK_BOUNDARY.
10202 2018-03-19  Richard Biener  <rguenther@suse.de>
10204         PR tree-optimization/84933
10205         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10206         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10208 2018-03-19  Richard Biener  <rguenther@suse.de>
10210         PR tree-optimization/84859
10211         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10212         (cond_if_else_store_replacement): Perform sinking operation on
10213         single-store BBs regardless of MAX_STORES_TO_SINK setting.
10214         Generalize what a BB with a single eligible store is.
10216 2018-03-19  Richard Biener  <rguenther@suse.de>
10218         PR tree-optimization/84929
10219         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10220         chrec_is_positive against non-chrec arg.
10222 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
10224         PR target/84711
10225         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10227 2018-03-18  Martin Liska  <mliska@suse.cz>
10229         PR rtl-optimization/84635
10230         * regrename.c (build_def_use): Use matches_mode only when
10231         matches >= 0.
10233 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
10235         PR tree-optimization/84913
10236         * tree-vect-loop.c (vectorizable_reduction): Don't try to
10237         vectorize chains of COND_EXPRs.
10239 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10241         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10243 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10245         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10247 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10249         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10251 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10252             Kito Cheng  <kito.cheng@gmail.com>
10254         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10255         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10256         (nds32_adjust_reg_alloc_order): New function.
10257         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10259 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
10261         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10262         nds32_print_operand, nds32_print_operand_address): Use
10263         HOST_WIDE_INT_PRINT_DEC instead.
10265 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10267         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10269 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
10271         PR target/84902
10272         * config/i386/i386.c (initial_ix86_tune_features,
10273         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10274         unsigned long long.
10275         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10276         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10277         rather than 1u << ix86_tune.  Formatting fix.
10278         (ix86_option_override_internal): Change ix86_arch_mask from
10279         unsigned int to unsigned HOST_WIDE_INT, initialize to
10280         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10281         (ix86_function_specific_restore): Likewise.
10283 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10285         PR target/84899
10286         * postreload.c (reload_combine_recognize_pattern): Perform
10287         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10288         truncate_int_for_mode the result for the destination's mode.
10290         PR c/84909
10291         * hsa-gen.c (mem_type_for_type): Fix comment typo.
10292         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10293         Likewise.
10294         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10295         Likewise.
10297 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
10299         PR target/84876
10300         * lra-assigns.c (lra_split_hard_reg_for): Don't use
10301         regno_allocno_class_array and sorted_pseudos.
10302         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10303         insns where regno is used.
10305 2018-03-16  Martin Liska  <mliska@suse.cz>
10307         PR ipa/84833
10308         * multiple_target.c (create_dispatcher_calls): Redirect
10309         reference in the symbol table.
10311 2018-03-16  Martin Liska  <mliska@suse.cz>
10313         PR ipa/84722
10314         * multiple_target.c (create_dispatcher_calls): Redirect also
10315         an alias.
10317 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10319         PR c++/79937
10320         PR c++/82410
10321         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10322         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10323         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10325 2018-03-16  Julia Koval  <julia.koval@intel.com>
10327         * doc/invoke.texi (Skylake Server): Add CLWB.
10328         Cannonlake): Remove CLWB.
10330 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10332         PR tree-optimization/84841
10333         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10334         1 << 3.
10335         (FLOAT_ONE_CONST_TYPE): Define.
10336         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10337         (sort_by_operand_rank): Put entries with higher constant_type last
10338         rather than first to match comments.
10340 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
10342         * config/nios2/nios2.md (movsi_internal): Fix thinko in
10343         split predicate.
10345 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10347         PR c++/79085
10348         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10349         check and use address of target always.
10351 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
10353         PR target/84574
10354         * config/i386/i386.c (indirect_thunk_needed): Update comments.
10355         (indirect_thunk_bnd_needed): Likewise.
10356         (indirect_thunks_used): Likewise.
10357         (indirect_thunks_bnd_used): Likewise.
10358         (indirect_return_needed): New.
10359         (indirect_return_bnd_needed): Likewise.
10360         (output_indirect_thunk_function): Add a bool argument for
10361         function return.
10362         (output_indirect_thunk_function): Don't generate alias for
10363         function return thunk.
10364         (ix86_code_end): Call output_indirect_thunk_function to generate
10365         function return thunks.
10366         (ix86_output_function_return): Set indirect_return_bnd_needed
10367         and indirect_return_needed instead of indirect_thunk_bnd_needed
10368         and indirect_thunk_needed.
10370 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
10372         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10373         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10374         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10376 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
10377             Paul Hua <paul.hua.gm@gmail.com>
10379         PR c/84852
10380         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10382 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
10384         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10385         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10386         resp. SFmode cases.
10388 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
10390         PR target/84711
10391         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10392         instead of GET_MODE_SIZE when comparing Units.
10394 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10396         PR target/68256
10397         * varasm.c (hash_section): Return an unchangeble hash value
10398         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10399         Return !aarch64_can_use_per_function_literal_pools_p ().
10401 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10403         PR target/84860
10404         * optabs.c (emit_conditional_move): Pass address of cmode's copy
10405         rather than address of cmode as last argument to prepare_cmp_insn.
10407 2018-03-15  Julia Koval  <julia.koval@intel.com>
10409         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10410         F_AVX512VNNI, F_AVX512BITALG): New.
10412 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
10414         PR target/83451
10415         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
10416         insn for floating-point loads and stores.
10418 2018-03-14  Carl Love  <cel@us.ibm.com>
10420         * config/rs6000/rs6000-c.c: Add macro definitions for
10421         ALTIVEC_BUILTIN_VEC_PERMXOR.
10422         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10423         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10424         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10425         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10426         UNSPEC_VPERMXOR.
10427         * config/doc/extend.texi: Add prototypes for vec_permxor.
10429 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
10431         PR c/84852
10432         * diagnostic-show-locus.c (class layout_point): Convert m_line
10433         from int to linenum_type.
10434         (line_span::comparator): Use linenum "compare" function when
10435         comparing line numbers.
10436         (test_line_span): New function.
10437         (layout_range::contains_point): Convert param "row" from int to
10438         linenum_type.
10439         (layout_range::intersects_line_p): Likewise.
10440         (layout::will_show_line_p): Likewise.
10441         (layout::print_source_line): Likewise.
10442         (layout::should_print_annotation_line_p): Likewise.
10443         (layout::print_annotation_line): Likewise.
10444         (layout::print_leading_fixits): Likewise.
10445         (layout::annotation_line_showed_range_p): Likewise.
10446         (struct line_corrections): Likewise for field m_row.
10447         (line_corrections::line_corrections): Likewise for param "row".
10448         (layout::print_trailing_fixits): Likewise.
10449         (layout::get_state_at_point): Likewise.
10450         (layout::get_x_bound_for_row): Likewise.
10451         (layout::print_line): Likewise.
10452         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10453         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10454         * input.c (selftest::test_linenum_comparisons): New function.
10455         (selftest::input_c_tests): Call it.
10456         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10457         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10458         * selftest.h (ASSERT_GT): New macro.
10459         (ASSERT_GT_AT): New macro.
10460         (ASSERT_LT): New macro.
10461         (ASSERT_LT_AT): New macro.
10463 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
10465         PR rtl-optimization/84780
10466         * combine.c (distribute_links): Don't make a link based on pc_rtx.
10468 2018-03-14  Martin Liska  <mliska@suse.cz>
10470         * tree.c (record_node_allocation_statistics): Use
10471         get_stats_node_kind.
10472         (get_stats_node_kind): New function extracted from
10473         record_node_allocation_statistics.
10474         (free_node): Use get_stats_node_kind.
10476 2018-03-14  Richard Biener  <rguenther@suse.de>
10478         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10479         that the value-set of ANTIC_IN doesn't grow.
10481         Revert
10482         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10483         member.
10484         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10485         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10487 2018-03-14  Julia Koval  <julia.koval@intel.com>
10489         * config.gcc (icelake-client, icelake-server): New.
10490         (icelake): Remove.
10491         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10492         (initial_ix86_arch_features): Ditto.
10493         (PTA_SKYLAKE): Add SGX.
10494         (PTA_ICELAKE): Remove.
10495         (PTA_ICELAKE_CLIENT): New.
10496         (PTA_ICELAKE_SERVER): New.
10497         (ix86_option_override_internal): Split up icelake on icelake client and
10498         icelake server.
10499         (get_builtin_code_for_version): Ditto.
10500         (fold_builtin_cpu): Ditto.
10501         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10502         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10503         * config/i386/i386.h (processor_type): Ditto.
10504         * doc/invoke.texi: Ditto.
10506 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
10508         PR sanitizer/83392
10509         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10510         INTEGER_CST offset, add it together with bitpos / 8 and
10511         sign extend based on POINTER_SIZE.
10513         PR target/84844
10514         Revert
10515         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
10517         PR target/78090
10518         * config/i386/constraints.md (Yc): New register constraint.
10519         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10520         Use Yc constraint for alternative 2 of operand 0.  Remove
10521         preferred_for_speed attribute.
10523 2018-03-14  Richard Biener  <rguenther@suse.de>
10525         PR tree-optimization/84830
10526         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10527         with the old one to avoid oscillations.
10529 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
10531         PR target/83712
10532         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10533         pseudos.
10534         (assign_by_spills): Return a flag of reload assignment failure.
10535         Do not process the reload assignment failures.  Do not spill other
10536         reload pseudos if they has the same reg class.  Update n if
10537         necessary.
10538         (lra_assign): Add a return arg.  Set up from the result of
10539         assign_by_spills call.
10540         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10541         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10542         usage_insns if it is not NULL.
10543         (spill_hard_reg_in_range): New function.
10544         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10545         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10546         function prototypes.
10547         (lra_assign): Change prototype.
10548         * lra.c (lra): Add code to deal with fails by splitting hard reg
10549         live ranges.
10551 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
10553         * config/riscv/riscv.opt (mrelax): New option.
10554         * config/riscv/riscv.c (riscv_file_start): Emit ".option
10555         "norelax" when riscv_mrelax is disabled.
10556         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
10558 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10560         PR target/84743
10561         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
10562         reassociation for int modes.
10564 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10566         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10567         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10568         for big-endian.
10569         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10570         * config/aarch64/aarch64-sve.md
10571         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10572         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10573         (*extend<mode><Vwide>2): Rename to...
10574         (aarch64_sve_extend<mode><Vwide>2): ...this.
10575         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10576         renaming the old pattern to...
10577         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
10578         unsigned packs.
10579         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10580         define_expand, renaming the old pattern to...
10581         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10582         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10583         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10584         account when deciding which SVE instruction the optab should use.
10585         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10587 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10589         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10590         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10591         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10592         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10593         (tlsdesc_small_<mode>): Turn a define_expand and use
10594         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
10595         (tlsdesc_small_advsimd_<mode>): ...this.
10596         (tlsdesc_small_sve_<mode>): New pattern.
10598 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10600         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10601         (UNSPEC_UMUL_HIGHPART): New constants.
10602         (MUL_HIGHPART): New int iteraor.
10603         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10604         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10605         define_expand.
10606         (*<su>mul<mode>3_highpart): New define_insn.
10608 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10610         PR lto/84805
10611         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10612         incomplete types.
10614 2018-03-13  Martin Liska  <mliska@suse.cz>
10616         PR ipa/84658.
10617         * (sem_item_optimizer::sem_item_optimizer): Initialize new
10618         vector.
10619         (sem_item_optimizer::~sem_item_optimizer): Release it.
10620         (sem_item_optimizer::merge_classes): Register variable aliases.
10621         (sem_item_optimizer::fixup_pt_set): New function.
10622         (sem_item_optimizer::fixup_points_to_sets): Likewise.
10623         * ipa-icf.h: Declare new variables and functions.
10625 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
10627         PR middle-end/84834
10628         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10629         integer_pow2p@2 and test integer_pow2p in condition.
10630         (A < 0 ? C : 0): Similarly for @1.
10632         PR middle-end/84831
10633         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10634         characters starting at p contain '\0' character, don't look beyond
10635         that.
10637         PR target/84827
10638         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10639         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10641         PR target/84828
10642         * reg-stack.c (change_stack): Change update_end var from int to
10643         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10644         also call set_block_for_insn on the newly added insns and rescan.
10646         PR target/84786
10647         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10648         on the last operand.
10650         PR c++/84704
10651         * tree.c (stabilize_reference_1): Return save_expr (e) for
10652         STATEMENT_LIST even if it doesn't have side-effects.
10654 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
10656         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10658 2018-03-12  Renlin Li  <renlin.li@arm.com>
10660         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10661         aarch64_output_scalar_simd_mov_immediate.
10663 2018-03-12  Martin Sebor  <msebor@redhat.com>
10665         PR tree-optimization/83456
10666         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10667         for perfectly overlapping calls to memcpy.
10668         (gimple_fold_builtin_memory_chk): Same.
10669         (gimple_fold_builtin_strcpy): Handle no-warning.
10670         (gimple_fold_builtin_stxcpy_chk): Same.
10671         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10673 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10675         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10676         parameter.  Use it for SFmode.
10677         (rs6000_function_arg_advance_1): Adjust.
10678         (rs6000_function_arg): Adjust.
10679         (rs6000_gimplify_va_arg): Pass false for that new parameter.
10681 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10683         PR rtl-optimization/84169
10684         PR rtl-optimization/84780
10685         * combine.c (can_combine_p): Check for a 2-insn combination whether
10686         the destination register is used between the two insns, too.
10688 2018-03-12  Richard Biener  <rguenther@suse.de>
10690         PR tree-optimization/84803
10691         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10692         for refs DR analysis didn't process.
10694 2018-03-12  Richard Biener  <rguenther@suse.de>
10696         PR tree-optimization/84777
10697         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10698         force-vectorize loops ignore whether we are optimizing for size.
10700 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10702         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
10703         (TARGET_MD_ASM_ADJUST): Define.
10705 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
10706             Kito Cheng  <kito.cheng@gmail.com>
10707             Chung-Ju Wu  <jasonwucj@gmail.com>
10709         * config/nds32/nds32.c (nds32_compute_stack_frame,
10710         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
10711         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
10712         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
10713         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
10714         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
10715         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
10716         * config/nds32/nds32.md (prologue, epilogue): Use macro
10717         NDS32_V3PUSH_AVAILABLE_P to do checking.
10719 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
10721         PR debug/58150
10722         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
10723         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
10724         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
10725         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
10726         addition of most attributes on !orig_type_die or the attribute not
10727         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
10729 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10730             Chung-Ju Wu  <jasonwucj@gmail.com>
10732         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
10733         __NDS32_VH__ macro.
10734         * config/nds32/nds32.opt (mvh): New option.
10736 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10737             Chung-Ju Wu  <jasonwucj@gmail.com>
10739         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
10740         function.
10741         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
10742         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
10743         definition.
10745 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10746             Chung-Ju Wu  <jasonwucj@gmail.com>
10748         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
10749         function.
10750         * config/nds32/nds32-multiple.md (strlensi): New pattern.
10751         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
10753 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
10754             Kito Cheng  <kito.cheng@gmail.com>
10755             Chung-Ju Wu  <jasonwucj@gmail.com>
10757         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
10758         UNSPEC_FFMISM and UNSPEC_FLMISM.
10759         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
10760         for ffb, ffmism and flmism.
10761         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
10762         (unspec_ffmism): Ditto.
10763         (unspec_flmism): Ditto.
10764         (nds32_expand_builtin_impl): Check if string extension is available.
10765         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
10766         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
10768 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
10770         Reverting patch:
10771         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
10773         PR target/83712
10774         * lra-assigns.c (assign_by_spills): Return a flag of reload
10775         assignment failure.  Do not process the reload assignment
10776         failures.  Do not spill other reload pseudos if they has the same
10777         reg class.
10778         (lra_assign): Add a return arg.  Set up from the result of
10779         assign_by_spills call.
10780         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10781         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10782         usage_insns if it is not NULL.
10783         (spill_hard_reg_in_range): New function.
10784         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10785         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10786         function prototypes.
10787         (lra_assign): Change prototype.
10788         * lra.c (lra): Add code to deal with fails by splitting hard reg
10789         live ranges.
10791 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
10793         PR target/84807
10794         * config/i386/i386.opt: Replace Enforcment with Enforcement.
10796 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
10798         PR debug/84620
10799         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
10800         (dw_val_node): Add val_symbolic_view.
10801         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
10802         (symview_upper_bound): New.
10803         (new_line_info_table): Initialize symviews_since_reset.
10804         (dwarf2out_source_line): Count symviews_since_reset and set
10805         symview_upper_bound.
10806         (dw_val_equal_p): Handle symview.
10807         (add_AT_symview): New.
10808         (print_dw_val): Handle symview.
10809         (attr_checksum, attr_checksum_ordered): Likewise.
10810         (same_dw_val_p, size_of_die): Likewise.
10811         (value_format, output_die): Likewise.
10812         (add_high_low_attributes): Use add_AT_symview for entry_view.
10813         (dwarf2out_finish): Reset symview_upper_bound, clear
10814         zero_view_p.
10816 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
10818         PR target/83969
10819         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
10820         Add strict argument and use it.
10821         (rs6000_split_multireg_move): Update for new strict argument.
10822         (mem_operand_gpr): Disallow all non-offsettable addresses.
10823         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
10825 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
10827         PR target/84772
10828         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
10829         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
10830         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
10832         PR c++/84767
10833         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
10834         decl, use remap_type if we want to use the type.
10836 2018-03-09  Martin Sebor  <msebor@redhat.com>
10838         PR tree-optimization/84526
10839         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10840         Remove dead code.
10841         (builtin_access::generic_overlap): Be prepared to handle non-array
10842         base objects.
10844 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
10846         PR rtl-optimization/84682
10847         * lra-constraints.c (process_address_1): Check is_address flag
10848         for address constraints.
10849         (process_alt_operands): Likewise.
10850         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
10851         preprocess_constraints.
10852         * recog.h (preprocess_constraints): Add oploc parameter.
10853         Adjust callers.
10854         * recog.c (preprocess_constraints): Test address_operand for
10855         CT_ADDRESS constraints.
10857 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
10859         PR target/83712
10860         * lra-assigns.c (assign_by_spills): Return a flag of reload
10861         assignment failure.  Do not process the reload assignment
10862         failures.  Do not spill other reload pseudos if they has the same
10863         reg class.
10864         (lra_assign): Add a return arg.  Set up from the result of
10865         assign_by_spills call.
10866         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10867         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10868         usage_insns if it is not NULL.
10869         (spill_hard_reg_in_range): New function.
10870         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10871         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10872         function prototypes.
10873         (lra_assign): Change prototype.
10874         * lra.c (lra): Add code to deal with fails by splitting hard reg
10875         live ranges.
10877 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10879         PR target/83193
10880         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
10881         Accept complain bool parameter.  Only emit errors if it is true.
10882         (arm_parse_cpu_option_name): Likewise.
10883         (arm_target_thumb_only): Adjust callers of the above.
10884         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
10885         prototype to take a default true bool parameter.
10886         (arm_parse_arch_option_name): Likewise.
10888 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
10889             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
10891         PR jit/64089
10892         PR jit/84288
10893         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
10894         * configure: Regenerate.
10895         * configure.ac ("linker --version-script option"): New.
10896         ("linker soname option"): New.
10898 2018-03-09  Richard Biener  <rguenther@suse.de>
10900         PR tree-optimization/84775
10901         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
10902         immediate uses of predicate stmts and mark them modified.
10904         Revert
10905         PR tree-optimization/84178
10906         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10907         to caller.
10908         (version_loop_for_if_conversion): Delay update_ssa call.
10909         (tree_if_conversion): Delay update_ssa until after predicate
10910         insertion.
10912 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
10914         PR target/84763
10915         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
10916         when the function accesses prior frames.
10918 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
10920         PR debug/84456
10921         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
10922         gen_llsym, otherwise call maybe_gen_llsym.
10924         PR inline-asm/84742
10925         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
10926         has ',' character inside of it.
10928 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10930         PR target/84748
10931         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
10932         as clobbering CC_REGNUM.
10934 2018-03-08  Richard Biener  <rguenther@suse.de>
10936         PR middle-end/84552
10937         * tree-scalar-evolution.c: Include tree-into-ssa.h.
10938         (follow_copies_to_constant): Do not follow SSA names registered
10939         for update.
10941 2018-03-08  Richard Biener  <rguenther@suse.de>
10943         PR tree-optimization/84178
10944         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10945         to caller.
10946         (version_loop_for_if_conversion): Delay update_ssa call.
10947         (tree_if_conversion): Delay update_ssa until after predicate
10948         insertion.
10950 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
10952         PR tree-optimization/84178
10953         * tree-if-conv.c (release_bb_predicate): Remove the
10954         the assertion that the stmts have NULL use_ops.
10955         Discard the statements, asserting that they haven't
10956         yet been added to a BB.
10958 2018-03-08  Richard Biener  <rguenther@suse.de>
10960         PR tree-optimization/84746
10961         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
10962         (phi_translate): Pass in destination ANTIC_OUT set.
10963         (phi_translate_1): Likewise.  For a simplified result lookup
10964         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
10965         (phi_translate_set): Adjust.
10966         (do_pre_regular_insertion): Likewise.
10967         (do_pre_partial_partial_insertion): Likewise.
10969 2018-03-08  Martin Liska  <mliska@suse.cz>
10971         PR gcov-profile/84735
10972         * doc/gcov.texi: Document usage of profile files.
10973         * gcov-io.h: Document changes in the format.
10975 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
10977         PR debug/84404
10978         PR debug/84408
10979         * dwarf2out.c (struct dw_line_info_table): Update comments for
10980         view == -1.
10981         (FORCE_RESET_NEXT_VIEW): New.
10982         (FORCE_RESETTING_VIEW_P): New.
10983         (RESETTING_VIEW_P): Check for -1 too.
10984         (ZERO_VIEW_P): Likewise.
10985         (new_line_info_table): Force-reset next view.
10986         (dwarf2out_begin_function): Likewise.
10987         (dwarf2out_source_line): Simplify zero_view_p initialization.
10988         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
10989         view directly.  Omit view when omitting .loc at line 0.
10991 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
10993         PR tree-optimization/84740
10994         * tree-switch-conversion.c (process_switch): Call build_constructors
10995         only if info.phi_count is non-zero.
10997         PR tree-optimization/84739
10998         * tree-tailcall.c (find_tail_calls): Check call arguments against
10999         DECL_ARGUMENTS (current_function_decl) rather than
11000         DECL_ARGUMENTS (func) when checking for tail recursion.
11002 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11004         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11005         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11006         Volker Reichelt's entry and add entries for people that perform
11007         GCC fuzzy testing and report numerous bugs.
11009 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
11011         PR target/82411
11012         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11013         readonly data in sdata, if that is disabled.
11014         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11015         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11016         -mreadonly-in-sdata option.
11018 2018-03-07  Martin Sebor  <msebor@redhat.com>
11020         PR tree-optimization/84468
11021         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11022         basic block when looking for nul assignment.
11024 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
11026         PR target/84277
11027         * except.h (output_function_exception_table): Adjust prototype.
11028         * except.c (output_function_exception_table): Remove FNNAME parameter
11029         and add SECTION parameter.  Ouput one part of the table at a time.
11030         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11031         the first part of the exception table and emit unwind directives.
11032         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11033         (i386_pe_seh_cold_init): Likewise.
11034         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11035         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11036         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11037         (ix86_output_call_insn): Emit a nop in one more case for SEH.
11038         * config/i386/winnt.c: Include except.h.
11039         (struct seh_frame_state): Add reg_offset, after_prologue and
11040         in_cold_section fields.
11041         (i386_pe_seh_end_prologue): Set seh->after_prologue.
11042         (i386_pe_seh_cold_init): New function.
11043         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11044         to seh->in_cold_section.
11045         (seh_emit_push): Record the offset of the push.
11046         (seh_emit_save): Record the offet of the save.
11047         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11048         Test seh->after_prologue to disregard the epilogue.
11049         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11050         (i386_pe_end_cold_function): New function.
11052 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11054         PR fortran/84565
11055         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11056         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11058         PR c++/84704
11059         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11060         on tmp_var.
11061         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11062         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11064         PR middle-end/84723
11065         * multiple_target.c: Include tree-inline.h and intl.h.
11066         (expand_target_clones): Diagnose and fail if node->definition and
11067         !tree_versionable_function_p (node->decl).
11069 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
11071         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11072         sprint_ul.
11073         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11074         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11075         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11077 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11079         PR target/84710
11080         * combine.c (try_combine): Use reg_or_subregno instead of handling
11081         just paradoxical SUBREGs and REGs.
11083 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
11085         * config/arc/arc.c (arc_finalize_pic): Remove function.
11086         (arc_must_save_register): We use single base PIC register, remove
11087         checks to save/restore the PIC register.
11088         (arc_expand_prologue): Likewise.
11089         * config/arc/arc-protos.h (arc_set_default_type_attributes):
11090         Remove.
11091         (arc_verify_short): Likewise.
11092         (arc_attr_type): Likewise.
11093         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11094         (walk_stores): Likewise.
11095         (arc_address_cost): Make it static.
11096         (arc_verify_short): Likewise.
11097         (branch_dest): Likewise.
11098         (arc_attr_type): Likewise.
11099         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11100         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11101         (arc_final_prescan_insn): Remove inserting the nops due to
11102         hardware hazards.  It is done in reorg step.
11103         (insn_length_variant_t): Remove.
11104         (insn_length_parameters_t): Likewise.
11105         (arc_insn_length_parameters): Likewise.
11106         (arc_get_insn_variants): Likewise.
11107         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11109 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11111         PR inline-asm/84683
11112         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11113         assertion failure.
11115         PR tree-optimization/84687
11116         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11117         on new_node->decl.
11118         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11120 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11122         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11123         Rename to ppc_speculation_barrier.
11124         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11125         __builtin_ppc_speculation_barrier.
11127 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11129         PR target/84700
11130         * combine.c (combine_simplify_rtx): Don't try to simplify if
11131         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11132         are equal to x.
11134 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
11136         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11137         to 32 bytes when compiling for POWER9.
11139 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11141         PR target/84564
11142         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11143         regparm >= 3 with no arg reg available also for calls with
11144         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
11146         PR target/84524
11147         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11148         orig,vex.
11149         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
11151 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
11153         PR target/84264
11154         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11156 2018-03-05  Richard Biener  <rguenther@suse.de>
11158         PR tree-optimization/84486
11159         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11160         When inserting a __builtin_assume_aligned call set the LHS
11161         SSA name alignment info accordingly.
11163 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
11165         PR tree-optimization/84114
11166         * config/aarch64/aarch64.c (aarch64_reassociation_width)
11167         Avoid reassociation of FLOAT_MODE addition.
11169 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
11171         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11172         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11173         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11174         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11175         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11176         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11177         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11178         and -mwbnoinvd.
11179         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11180         __builtin_ia32_wbinvd): New builtins.
11181         (SPECIAL_ARGS2): New.
11182         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11183         (SPECIAL_ARGS2): New.
11184         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11185         (ix86_valid_target_attribute_inner_p): Ditto.
11186         (ix86_init_mmx_sse_builtins): Add special_args2.
11187         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11188         TARGET_WBNOINVD_P): New.
11189         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11190         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11191         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11192         * config/i386/immintrin.h (_wbinvd): New intrinsic.
11193         * config/i386/pconfigintrin.h: New file.
11194         * config/i386/wbnoinvdintrin.h: Ditto.
11195         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11196         wbnoinvdintrin.h.
11197         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11199 2018-03-05  Richard Biener  <rguenther@suse.de>
11201         PR tree-optimization/84670
11202         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11203         member.
11204         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11205         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11206         (compute_antic_aux): Only assert the number of values in ANTIC_IN
11207         doesn't grow if all successors (recursively) were visited at least
11208         once.
11210 2018-03-05  Richard Biener  <rguenther@suse.de>
11212         PR tree-optimization/84650
11213         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11214         if executed in the loop pipeline.
11216 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
11218         * doc/configfiles.texi (Configuration Files): Move info about
11219         conditionalizing $target-protos.h to...
11220         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
11221         differs from $target-protos.h.
11223 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
11224             Chung-Ju Wu  <jasonwucj@gmail.com>
11226         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11227         * config/nds32/nds32-multiple.md (setmemsi): Define.
11228         * config/nds32/nds32-memory-manipulation.c
11229         (nds32_gen_dup_4_byte_to_word_value): New.
11230         (emit_setmem_word_loop): New.
11231         (emit_setmem_byte_loop): New.
11232         (nds32_expand_setmem_loop): New.
11233         (nds32_expand_setmem_loop_v3m): New.
11234         (nds32_expand_setmem_unroll): New.
11235         (nds32_expand_setmem): New.
11237 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11238             Chung-Ju Wu  <jasonwucj@gmail.com>
11240         * config/nds32/nds32-memory-manipulation.c
11241         (nds32_emit_load_store): New.
11242         (nds32_emit_post_inc_load_store): New.
11243         (nds32_emit_mem_move): New.
11244         (nds32_emit_mem_move_block): New.
11245         (nds32_expand_movmemsi_loop_unknown_size): New.
11246         (nds32_expand_movmemsi_loop_known_size): New.
11247         (nds32_expand_movmemsi_loop): New.
11248         (nds32_expand_movmemsi_unroll): New.
11249         (nds32_expand_movmemqi): Rename ...
11250         (nds32_expand_movmemsi): ... to this.
11251         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11252         (movmemsi): ... to this.
11253         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11254         (nds32_expand_movmemsi): ... to this.
11256 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11257             Monk Chiang  <sh.chiang04@gmail.com>
11258             Chung-Ju Wu  <jasonwucj@gmail.com>
11260         * config/nds32/nds32-protos.h
11261         (nds32_expand_load_multiple): New arguments.
11262         (nds32_expand_store_multiple): Ditto.
11263         (nds32_valid_multiple_load_store): Rename ...
11264         (nds32_valid_multiple_load_store_p): ... to this.
11265         * config/nds32/nds32-memory-manipulation.c
11266         (nds32_expand_load_multiple): Refine implementation.
11267         (nds32_expand_store_multiple): Ditto.
11268         * config/nds32/nds32-multiple.md
11269         (load_multiple): Update nds32_expand_load_multiple interface.
11270         (store_multiple): Update nds32_expand_store_multiple interface.
11271         * config/nds32/nds32-predicates.c
11272         (nds32_valid_multiple_load_store): Rename ...
11273         (nds32_valid_multiple_load_store_p): ... to this and refine
11274         implementation.
11275         * config/nds32/predicates.md
11276         (nds32_load_multiple_and_update_address_operation): New predicate.
11277         (nds32_store_multiple_and_update_address_operation): New predicate.
11279 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11280             Chung-Ju Wu  <jasonwucj@gmail.com>
11282         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11283         (combo): New attribute.
11284         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11286 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11288         * config/nds32/nds32.opt: Change -mcmodel= default value.
11290 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
11291             Monk Chiang  <sh.chiang04@gmail.com>
11292             Chung-Ju Wu  <jasonwucj@gmail.com>
11294         * config/nds32/constants.md (unspec_element): New enum.
11295         * config/nds32/constraints.md (Umw): New constraint.
11296         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11297         * config/nds32/nds32-intrinsic.md: Likewise.
11298         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11299         (nds32_valid_smw_lwm_base_p): New.
11300         (nds32_output_smw_single_word): New.
11301         (nds32_output_lmw_single_word): New.
11302         (nds32_expand_unaligned_load): New.
11303         (nds32_expand_unaligned_store): New.
11304         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11305         (nds32_output_smw_single_word): Declare.
11306         (nds32_output_lmw_single_word): Declare.
11307         (nds32_expand_unaligned_load): Declare.
11308         (nds32_expand_unaligned_store): Declare.
11309         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11310         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11311         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11312         NDS32_BUILTIN_UASTORE_DW.
11313         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11314         predicate.
11316 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
11317             Kito Cheng  <kito.cheng@gmail.com>
11318             Chung-Ju Wu  <jasonwucj@gmail.com>
11320         * config/nds32/nds32-intrinsic.c
11321         (nds32_expand_builtin_null_ftype_reg): Delete.
11322         (nds32_expand_builtin_reg_ftype_imm): Ditto.
11323         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11324         (nds32_read_argument): New.
11325         (nds32_legitimize_target): Ditto.
11326         (nds32_legitimize_argument): Ditto.
11327         (nds32_check_constant_argument): Ditto.
11328         (nds32_expand_unop_builtin): Ditto.
11329         (nds32_expand_unopimm_builtin): Ditto.
11330         (nds32_expand_binop_builtin): Ditto.
11331         (nds32_builtin_decl_impl): Ditto.
11332         (builtin_description): Ditto.
11333         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11334         (nds32_init_builtins_impl): Ditto.
11335         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11336         (nds32_builtin_decl): New.
11337         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11338         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11340 2018-03-02  Jeff Law  <law@redhat.com>
11342         * reorg.c (stop_search_p): Handle DEBUG_INSN.
11343         (redundant_insn, fill_simple_delay_slots): Likewise.
11344         (fill_slots_from_thread): Likewise.
11345         * resource.c (mark_referenced_resources): Likewise.
11346         (mark_set_resources, find_dead_or_set_registers): Likewise.
11348 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11350         * substring-locations.h (format_warning_va): Formatting fix for
11351         ATTRIBUTE_GCC_DIAG.
11352         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11353         argument.
11354         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11355         * substring-locations.c: Include intl.h.
11356         (format_warning_va): Turned into small wrapper around
11357         format_warning_n_va, renamed to ...
11358         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11359         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11360         use ngettext.
11361         (format_warning_at_substring_n): New function.
11362         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11363         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
11364         format_warning_at_substring with just a shorter name instead of
11365         const function pointer.
11366         (fmtwarn_n): New function.
11367         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11368         appropriate, get rid of all the fmtstr temporaries, move conditionals
11369         with G_() wrapped string literals directly into fmtwarn arguments,
11370         cast dir.len to (int), formatting fixes.
11372 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
11374         * doc/invoke.texi: Remove "Cilk Plus" references.
11376 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11377             Richard Biener  <rguenther@suse.de>
11379         PR ipa/84628
11380         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11381         for error or warning attributes if CALL_FROM_THUNK_P is set.
11382         Formatting fixes.
11384 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11386         PR target/56540
11387         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11388         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11390         PR target/56540
11391         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11392         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11394         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11395         instead of -1U in last predictors element's probability member.
11397 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11399         PR ipa/83983
11400         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11401         arguments if they are comparable.
11403 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11405         PR tree-optimization/84634
11406         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11407         masks and masked_loop_p with a single loop_masks, making sure it's
11408         null for bb vectorization.
11410 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11412         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11413         (vect_analyze_data_ref_access): Use loop->safe_len rather than
11414         loop->force_vectorize to check whether there is no alias.
11416 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11418         PR target/84614
11419         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11420         prototypes.
11421         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11422         comments.
11423         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11424         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11425         instead of a loop around prev_real_insn.
11426         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11427         prev_real_insn.
11429         PR inline-asm/84625
11430         * config/i386/i386.c (ix86_print_operand): Use conditional
11431         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11432         zero vector.
11434 2018-03-02  Richard Biener  <rguenther@suse.de>
11436         PR tree-optimization/84427
11437         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11438         (bitmap_set_subtract_values): Rewrite to handle multiple
11439         exprs per value.
11440         (clean): Likewise.
11441         (prune_clobbered_mems): Likewise.
11442         (phi_translate): Take edge instead of pred/phiblock.
11443         (phi_translate_1): Likewise.
11444         (phi_translate_set): Likewise.  Insert all translated
11445         exprs for a value into the set, keeping possibly multiple
11446         expressions per value.
11447         (compute_antic_aux): Adjust for phi_translate changes.
11448         When intersecting union the expressions and prune those
11449         not in the final value set, keeping possibly multiple
11450         expressions per value.  Do not use value-insertion
11451         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11452         all expressions.  Add verification that the value-sets
11453         only shrink during iteration.
11454         (compute_partial_antic_aux): Adjust for the phi_translate changes.
11455         (do_pre_regular_insertion): Likewise.
11456         (do_pre_partial_partial_insertion): Likewise.
11458 2018-03-02  Richard Biener  <rguenther@suse.de>
11460         PR target/82005
11461         * config/darwin.c (saved_debug_info_level): New static global.
11462         (darwin_asm_lto_start): Disable debug info generation for LTO out.
11463         (darwin_asm_lto_end): Restore debug info generation settings.
11465 2018-03-01  Martin Liska  <mliska@suse.cz>
11467         PR sanitizer/82484
11468         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11469         volatile arguments.
11471 2018-03-01  Richard Biener  <rguenther@suse.de>
11473         PR debug/84645
11474         * dwarf2out.c (gen_variable_die): Properly handle late VLA
11475         type annotation with LTO when debug was disabled at compile-time.
11477 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
11479         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11480         XINT with INTVAL.
11481         (mips_final_postscan_insn): Likewise.
11483 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
11485         PR rtl-optimization/84528
11486         * alias.c (init_alias_target): Add commentary.
11487         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11488         a unique base value if the frame pointer is not eliminated
11489         to the stack pointer.
11491 2018-03-01  Tom de Vries  <tom@codesourcery.com>
11493         PR rtl-optimization/83327
11494         * lra-int.h (hard_regs_spilled_into): Declare.
11495         * lra.c (hard_regs_spilled_into): Define.
11496         (init_reg_info): Init hard_regs_spilled_into.
11497         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11498         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11499         (process_bb_lives): Handle hard_regs_spilled_into.
11500         (lra_create_live_ranges_1): Before doing liveness propagation, clear
11501         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11503 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
11505         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11506         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11507         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11508         * config/rs6000/aix72.h: New file.
11510 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
11512         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11513         instead of warning_at with conditional singular and plural messages
11514         where possible.
11516         PR target/52991
11517         * stor-layout.c (update_alignment_for_field): For
11518         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11519         && !DECL_PACKED (field), do the alignment update, just use
11520         only desired_align instead of MAX (type_align, desired_align)
11521         as the alignment.
11522         (place_field): Don't do known_align < desired_align handling
11523         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11524         is non-NULL, instead do it after rli->prev_field handling and
11525         only if not within a bitfield word.  For DECL_PACKED (field)
11526         use type_align of BITS_PER_UNIT.
11528 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
11530         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11531         superfluous parentheses and trailing spaces.
11533 2018-02-28  Richard Biener  <rguenther@suse.de>
11535         PR tree-optimization/84584
11536         * graphite-scop-detection.c (scop_detection::add_scop): Discard
11537         SCoPs with fake exit edge.
11539 2018-02-28  Martin Liska  <mliska@suse.cz>
11541         PR testsuite/84597
11542         * timevar.c (timer::print): Fix format to properly print 100%
11543         values.
11545 2018-02-28  Richard Biener  <rguenther@suse.de>
11547         PR middle-end/84607
11548         * genmatch.c (capture_info::walk_match): Do not mark
11549         captured expressions without operands as expr_p given
11550         they act more like predicates and should be subject to
11551         "lost tail" side-effect preserving.
11553 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
11555         PR rtl-optimization/81611
11556         * auto-inc-dec.c (attempt_change): Move dead note from
11557         mem_insn if it's the next use of regno
11558         (find_address): Take address use of reg holding
11559         non-incremented value.  Add parm to limit search to the named
11560         reg only.
11561         (merge_in_block): Attempt to use a mem insn that is the next
11562         use of the original regno.
11564 2018-02-27  Martin Sebor  <msebor@redhat.com>
11566         PR c++/83871
11567         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11568         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11570 2018-02-27  Martin Sebor  <msebor@redhat.com>
11572         PR translation/84207
11573         * diagnostic-core.h (warning_n, error_n, inform_n): Change
11574         n argument to unsigned HOST_WIDE_INT.
11575         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11576         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
11577         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11578         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11580 2018-02-27  Richard Biener  <rguenther@suse.de>
11582         PR tree-optimization/84512
11583         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11584         Do not use the estimate returned from record_stmt_cost for
11585         the scalar iteration cost but sum properly using add_stmt_cost.
11587 2018-02-27  Richard Biener  <rguenther@suse.de>
11589         PR tree-optimization/84466
11590         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11591         Adjust last change to less strictly validate use operands.
11593 2018-02-27  Martin Liska  <mliska@suse.cz>
11595         PR gcov-profile/84548
11596         * gcov.c (process_file): Allow partial overlap and consider it
11597         also as group functions.
11598         (output_lines): Properly calculate range of lines for a group.
11600 2018-02-27  Martin Liska  <mliska@suse.cz>
11602         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11603         'ggc' suffixes.  Change first column width.
11604         (timer::print): Fix formatting of the column.
11606 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
11608         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11609         preserve inline entry blocks for the sake of debug inline
11610         entry point markers alone.
11611         (remove_unused_locals): Suggest in comments a better place to
11612         force the preservation of inline entry blocks that are
11613         otherwise unused, but do not preserve them.
11615 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11617         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11619 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11621         PR target/84039
11622         * config/i386/constraints.md (Bs): Replace
11623         ix86_indirect_branch_register with
11624         TARGET_INDIRECT_BRANCH_REGISTER.
11625         (Bw): Likewise.
11626         * config/i386/i386.md (indirect_jump): Likewise.
11627         (tablejump): Likewise.
11628         (*sibcall_memory): Likewise.
11629         (*sibcall_value_memory): Likewise.
11630         Peepholes of indirect call and jump via memory: Likewise.
11631         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11632         (*sibcall_value_GOT_32): Likewise.
11633         * config/i386/predicates.md (indirect_branch_operand): Likewise.
11634         (GOT_memory_operand): Likewise.
11635         (call_insn_operand): Likewise.
11636         (sibcall_insn_operand): Likewise.
11637         (GOT32_symbol_operand): Likewise.
11638         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11640 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11642         PR rtl-optimization/83496
11643         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11644         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
11645         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11646         redundant insn, if any.
11647         (relax_delay_slots): Likewise.
11648         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11650 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
11652         PR tree-optimization/83965
11653         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11654         that grouped statements are part of a reduction chain.  Return
11655         true if the statement is not marked as a reduction itself but
11656         is part of a group.
11657         (vect_recog_dot_prod_pattern): Don't check whether the statement
11658         is part of a group here.
11659         (vect_recog_sad_pattern): Likewise.
11660         (vect_recog_widen_sum_pattern): Likewise.
11662 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11664         PR debug/84545
11665         * final.c (rest_of_clean_state): Also look for calls inside sequences.
11667 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11669         PR target/84530
11670         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11671         the bool argument.
11672         (ix86_output_indirect_function_return): New prototype.
11673         (ix86_split_simple_return_pop_internal): Likewise.
11674         * config/i386/i386.c (indirect_return_via_cx): New.
11675         (indirect_return_via_cx_bnd): Likewise.
11676         (indirect_thunk_name): Handle return va CX_REG.
11677         (output_indirect_thunk_function): Create alias for
11678         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11679         (ix86_output_indirect_jmp): Remove the bool argument.
11680         (ix86_output_indirect_function_return): New function.
11681         (ix86_split_simple_return_pop_internal): Likewise.
11682         * config/i386/i386.md (*indirect_jump): Don't pass false
11683         to ix86_output_indirect_jmp.
11684         (*tablejump_1): Likewise.
11685         (simple_return_pop_internal): Change it to define_insn_and_split.
11686         Call ix86_split_simple_return_pop_internal to split it for
11687         -mfunction-return=.
11688         (simple_return_indirect_internal): Call
11689         ix86_output_indirect_function_return instead of
11690         ix86_output_indirect_jmp.
11692 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
11694         PR bootstrap/84405
11695         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11696         memset and value initialization afterwards.
11698 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
11700         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
11702 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11704         PR target/84521
11705         * common/config/aarch64/aarch64-common.c
11706         (aarch_option_optimization_table[]): Switch
11707         off fomit-frame-pointer
11709 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
11710             Chung-Ju Wu  <jasonwucj@gmail.com>
11712         * config/nds32/nds32-multiple.md (load_multiple): Disallow
11713         volatile memory.
11714         (store_multiple): Ditto.
11716 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
11718         * config.gcc: Add --with-cpu support for nds32 target.
11719         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
11720         * config/nds32/nds32.opt: Add -mcpu= option.
11722 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
11724         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
11725         isel=yes): Warn for these deprecated options.
11727 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
11729         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
11730         ISA_2_5_MASKS_EMBEDDED.
11732 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
11734         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
11735         p->max as pointers rather than using iterative_hash_expr.
11737 2018-02-23  Carl Love  <cel@us.ibm.com>
11739         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
11740         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
11741         BU_P8V_OVERLOAD_2.
11742         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
11743         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
11744         P8V_BUILTIN_VEC_VUNSIGNED2.
11746 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
11748         PR target/81572
11749         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
11750         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
11751         LRA_UNKNOWN_ALT.
11752         * lra-constraints.c (curr_insn_transform): Set up
11753         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
11754         LRA_UNKNOWN_ALT.
11755         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
11756         * lra-eliminations.c (spill_pseudos): Ditto.
11757         (process_insn_for_elimination): Ditto.
11758         * lra-lives.c (reg_early_clobber_p): Use the new macros.
11759         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
11760         LRA_NON_CLOBBERED_ALT.
11762 2018-02-22  Martin Sebor  <msebor@redhat.com>
11764         PR tree-optimization/84480
11765         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
11766         to maybe_diag_stxncpy_trunc.  Call it.
11767         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
11768         from gimple_fold_builtin_strcpy.  Print inlining stack.
11769         (handle_builtin_stxncpy): Print inlining stack.
11770         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
11772 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
11774         PR target/84176
11775         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
11776         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
11777         and -fcheck-pointer-bounds are used together.
11778         (indirect_thunk_prefix): New enum.
11779         (indirect_thunk_need_prefix): New function.
11780         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
11781         "_nt" instead of "_bnd" for NOTRACK prefix.
11782         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
11783         (output_indirect_thunk_function): Likewise.
11784         (): Likewise.
11785         (ix86_code_end): Update output_indirect_thunk_function calls.
11786         (ix86_output_indirect_branch_via_reg): Replace
11787         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
11788         (ix86_output_indirect_branch_via_push): Likewise.
11789         (ix86_output_function_return): Likewise.
11790         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
11791         incompatible with -fcf-protection=branch and
11792         -fcheck-pointer-bounds.
11794 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
11796         PR target/83335
11797         * config/aarch64/aarch64.c (aarch64_print_address_internal):
11798         Change gcc_assert call to output_operand_lossage.
11800 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
11802         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
11804 2018-02-22  DJ Delorie  <dj@redhat.com>
11805             Sebastian Perta  <sebastian.perta@renesas.com>
11806             Oleg Endo  <olegendo@gcc.gnu.org>
11808         * config/rx/rx.c (rx_rtx_costs): New function.
11809         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
11811 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11813         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
11815 2018-02-22  Martin Liska  <mliska@suse.cz>
11817         PR driver/83193
11818         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
11819         Add "native" as a possible value.
11821 2018-02-22  Martin Liska  <mliska@suse.cz>
11823         PR driver/83193
11824         * config/i386/i386.c (ix86_option_override_internal):
11825         Add "native" as a possible value for -march and -mtune.
11827 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
11829         PR target/84502
11830         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
11831         to all type variants.
11833         PR tree-optimization/84503
11834         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
11835         width as info->bitpos + info->bitsize - start.
11836         (merged_store_group::merge_overlapping): Simplify width computation.
11837         (check_no_overlap): New function.
11838         (imm_store_chain_info::try_coalesce_bswap): Compute expected
11839         start + width and last_order of the group, fail if check_no_overlap
11840         fails.
11841         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
11842         to group if check_no_overlap fails.
11844 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
11846         * config/rs6000/altivec.md: Delete contraint arguments to
11847         define_expand, define_split, and define_peephole2, and in
11848         define_insn_and_split if always unused.
11849         * config/rs6000/darwin.md: Ditto.
11850         * config/rs6000/dfp.md: Ditto.
11851         * config/rs6000/rs6000.md: Ditto.
11852         * config/rs6000/sync.md: Ditto.
11853         * config/rs6000/vector.md: Ditto.
11854         * config/rs6000/vsx.md: Ditto.
11856 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
11858         * config/rs6000/altivec.md: Write output control strings as braced
11859         blocks instead of double-quoted strings.
11860         * config/rs6000/darwin.md: Ditto.
11861         * config/rs6000/rs6000.md: Ditto.
11862         * config/rs6000/vector.md: Ditto.
11863         * config/rs6000/vsx.md: Ditto.
11865 2018-02-21  Jason Merrill  <jason@redhat.com>
11867         PR c++/84314 - ICE with templates and fastcall attribute.
11868         * attribs.c (build_type_attribute_qual_variant): Remove assert.
11870 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
11872         * ipa-cp.c (determine_versionability): Fix comment typos.
11874 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
11876         PR c/84229
11877         * ipa-cp.c (determine_versionability): Do not version functions caling
11878         va_arg_pack.
11880 2018-02-21  Martin Liska  <mliska@suse.cz>
11882         PR driver/83193
11883         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
11884         Add "native" as a possible value.
11885         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
11886         the macro when native cpu detection is available.
11888 2018-02-21  Martin Liska  <mliska@suse.cz>
11890         PR driver/83193
11891         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
11892         Add "native" as a possible value.
11893         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
11894         when native cpu detection is available.
11896 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
11897             Martin Sebor  <msebor@redhat.com>
11899         PR tree-optimization/84478
11900         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
11901         false.
11902         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
11903         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
11904         support which is conservatively correct, for 2 only stay conservative
11905         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
11906         argument to the 2 argument get_range_strlen, adjust 6 arg
11907         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
11908         false.
11909         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
11910         (gimple_fold_builtin_strlen): Pass true as last argument to
11911         get_range_strlen.
11913 2018-02-20  Martin Sebor  <msebor@redhat.com>
11915         PR middle-end/84095
11916         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
11917         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
11918         (builtin_memref::builtin_memref): Factor out parts into
11919         set_base_and_offset and call it.
11921 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
11923         PR middle-end/84406
11924         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
11925         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
11926         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
11927         search at the associated MODE_INT.
11929 2018-02-20  Jeff Law  <law@redhat.com>
11931         PR middle-end/82123
11932         PR tree-optimization/81592
11933         PR middle-end/79257
11934         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
11935         for range data rather than using global data.
11936         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
11937         range data rather than using global data.
11938         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
11939         pass it to children as needed.
11940         (struct directive::fmtresult): Similarly.
11941         (struct directive::set_width): Similarly.
11942         (struct directive::set_precision): Similarly.
11943         (format_integer, format_directive, parse_directive): Similarly.
11944         (format_none): Accept unnamed vr_values parameter.
11945         (format_percent, format_floating, format_character): Similarly.
11946         (format_string, format_plain): Similarly.
11947         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
11948         the EVRP range analyzer for range data rather than using global data.
11949         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
11950         gimple-ssa-evrp-analyze.h
11951         (class sprintf_dom_walker): Add after_dom_children member function.
11952         Add evrp_range_analyzer member.
11953         (sprintf_dom_walker::before_dom_children): Call into the EVRP
11954         range analyzer as needed.
11955         (sprintf_dom_walker::after_dom_children): New member function.
11956         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
11957         if not optimizing.
11958         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
11959         (evrp_range_analyzer::pop_to_marker): Likewise.
11961 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
11963         PR tree-optimization/84419
11964         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
11965         with the required type if its current type is compatible but
11966         different.
11968 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
11970         PR middle-end/82004
11971         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
11972         after vectorization.
11974 2018-02-20  Martin Liska  <mliska@suse.cz>
11976         PR driver/83193
11977         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
11978         possible values if we don't have a hint.
11980 2018-02-20  Martin Liska  <mliska@suse.cz>
11982         PR c/84310
11983         PR target/79747
11984         * final.c (shorten_branches): Build align_tab array with one
11985         more element.
11986         * opts.c (finish_options): Add alignment option limit check.
11987         (MAX_CODE_ALIGN): Likewise.
11988         (MAX_CODE_ALIGN_VALUE): Likewise.
11989         * doc/invoke.texi: Document maximum allowed option value for
11990         all -falign-* options.
11992 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
11994         PR target/84146
11995         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
11996         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
11997         * var-tracking.c (emit_note_insn_var_location): Remove all references
11998         to NOTE_INSN_CALL_ARG_LOCATION.
11999         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12000         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12001         Use copy_rtx_if_shared.
12002         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12003         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12004         (dwarf2out_var_location): Remove handling of
12005         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12006         on call_insn.
12007         * final.c (final_scan_insn): Remove all references to
12008         NOTE_INSN_CALL_ARG_LOCATION.
12009         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
12010         before dumping final insns.
12011         * except.c (emit_note_eh_region_end): Remove all references to
12012         NOTE_INSN_CALL_ARG_LOCATION.
12013         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12014         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12015         * config/arc/arc.c (hwloop_optimize): Likewise.
12016         * config/arm/arm.c (create_fix_barrier): Likewise.
12017         * config/s390/s390.c (s390_chunkify_start): Likewise.
12018         * config/sh/sh.c (find_barrier): Likewise.
12019         * config/i386/i386.c (rest_of_insert_endbranch,
12020         ix86_seh_fixup_eh_fallthru): Likewise.
12021         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12022         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12023         * config/frv/frv.c (frv_function_prologue): Likewise.
12024         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
12025         reg note.
12026         (note_outside_basic_block_p): Remove all references to
12027         NOTE_INSN_CALL_ARG_LOCATION.
12028         * gengtype.c (adjust_field_rtx_def): Likewise.
12029         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12030         Likewise.
12031         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12032         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12034         PR c++/84444
12035         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12036         is ADDR_EXPR.
12038         PR tree-optimization/84452
12039         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12040         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12041         is NULL.
12043 2018-02-19  Martin Liska  <mliska@suse.cz>
12045         PR sanitizer/82183
12046         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12048 2018-02-19  Martin Liska  <mliska@suse.cz>
12049             Richard Sandiford  <richard.sandiford@linaro.org>
12051         PR tree-optimization/82491
12052         * gimple-fold.c (get_base_constructor): Make earlier bail out
12053         to prevent ubsan.
12055 2018-02-19  Carl Love  <cel@us.ibm.com>
12057         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12058         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12059         BU_P8V_OVERLOAD_1.
12060         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12061         P8V_BUILTIN_VEC_NEG.
12063 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
12065         * config/rl78/rl78.md (movdf): New define expand.
12067 2018-02-19  Martin Liska  <mliska@suse.cz>
12069         PR other/80589
12070         * doc/invoke.texi: Fix typo.
12071         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12073 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
12075         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12076         handle rs6000_single_float and rs6000_double_float specially for
12077         e500 family CPUs.
12079 2018-02-16  Jeff Law  <law@redhat.com>
12081         * config/rx/rx.c (add_pop_cfi_notes): New function.;
12082         (pop_regs): Use it.
12084 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12086         PR ipa/84425
12087         * ipa-inline.c (inline_small_functions): Fix a typo.
12089 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12091         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12093 2018-02-16  Carl Love  <cel@us.ibm.com>
12095         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12096         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12097         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12098         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12099         expansion to P8V_BUILTIN_VEC_FLOAT2.
12101 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
12103         PR rtl-optimization/70023
12104         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12105         src_regno into account.
12107 2018-02-16  Carl Love  <cel@us.ibm.com>
12109         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12110         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12111         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12112         * config/rs6000/rs6000.c: Remove case statements for
12113         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12114         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12115         and P9V_BUILTIN_VEC_VINSERT4B.
12116         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12117         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12118         * config/rs6000/vsx.md:
12119         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12120         vec_insert4b.
12122 2018-02-16  Carl Love  <cel@us.ibm.com>
12124         * config/rs6000/altivec.h: Add builtin names vec_extract4b
12125         vec_insert4b.
12126         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12127         definitions.
12128         * config/rs6000/rs6000-c.c: Add the definitions for
12129         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12130         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12131         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12132         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
12133         definition for insert4b and define insn *insert3b_internal.
12134         * doc/extend.texi: Add documentation for vec_extract4b.
12136 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12138         * doc/extend.texi (Backwards Compatibility): Mention friend
12139         injection.  Note for-scope is deprecated.
12140         * doc/invoke.texi (-ffriend-injection): Deprecate.
12142 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
12144         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12145         that moved to I2, also allow destinations that are a paradoxical
12146         subreg (instead of a normal reg).
12148 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
12150         PR target/83831
12151         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12152         to QImode.
12154 2018-02-16  Richard Biener  <rguenther@suse.de>
12156         PR tree-optimization/84037
12157         PR tree-optimization/84016
12158         PR target/82862
12159         * config/i386/i386.c (ix86_builtin_vectorization_cost):
12160         Adjust vec_construct for the fact we need additional higher latency
12161         128bit inserts for AVX256 and AVX512 vector builds.
12162         (ix86_add_stmt_cost): Scale vector construction cost for
12163         elementwise loads.
12165 2018-02-16  Richard Biener  <rguenther@suse.de>
12167         PR tree-optimization/84417
12168         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12169         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12170         (non_rewritable_lvalue_p): Likewise, use poly-ints.
12172 2018-02-16  Martin Liska  <mliska@suse.cz>
12174         PR sanitizer/84307
12175         * internal-fn.def (ASAN_CHECK): Set proper flags.
12176         (ASAN_MARK): Likewise.
12178 2018-02-16  Julia Koval  <julia.koval@intel.com>
12180         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12181         from PTA_CANNONLAKE.
12183 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12185         PR target/84272
12186         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12187         Use ++iter rather than iter++ for std::list iterators.
12188         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
12189         defer deleting them until all nodes in the forest are processed.  Do
12190         free even leaf nodes.  Change to_process into auto_vec.
12192         PR bootstrap/84405
12193         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12194         * vec.h (vec_default_construct): Use memset instead of placement new
12195         if BROKEN_VALUE_INITIALIZATION is defined.
12196         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12197         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12198         is defined.
12200         PR rtl-optimization/83723
12201         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12202         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
12203         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
12204         recursive calls.
12205         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12206         callers.
12207         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12209 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
12211         PR rtl-optimization/81443
12212         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12213         from inner REGs to paradoxical SUBREGs.
12215 2018-02-16  Richard Biener  <rguenther@suse.de>
12217         PR tree-optimization/84399
12218         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12219         For operands we can analyze at their definition make sure we can
12220         analyze them at each use as well.
12222 2018-02-16  Richard Biener  <rguenther@suse.de>
12224         PR tree-optimization/84190
12225         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12226         volatile accesses if the decl isn't volatile.
12228 2018-02-15  Jason Merrill  <jason@redhat.com>
12230         PR c++/84314 - ICE with templates and fastcall attribute.
12231         * attribs.c (build_type_attribute_qual_variant): Don't clobber
12232         TYPE_CANONICAL on an existing type.
12234 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
12236         PR tree-optimization/84383
12237         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12238         dstoff nor call operand_equal_p if dstbase is NULL.
12240         PR tree-optimization/84334
12241         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12242         also a CONSTANT_CLASS_P, punt.
12244 2018-02-14  Jim Wilson  <jimw@sifive.com>
12246         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12247         first SMALL_OPERAND check.  New local min_second_step.  Move assert
12248         to where locals are set.  Add TARGET_RVC support.
12249         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12251 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
12253         * doc/invoke.texi: Correct -Wformat-overflow code sample.
12255 2018-02-14  Martin Sebor  <msebor@redhat.com>
12257         PR tree-optimization/83698
12258         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12259         arrays constrain the offset range to their bounds.
12260         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12261         (builtin_access::overlap): Avoid setting the size of overlap if it's
12262         already been set.
12263         (maybe_diag_overlap): Also consider arrays when deciding what values
12264         of offsets to include in diagnostics.
12266 2018-02-14  Martin Sebor  <msebor@redhat.com>
12268         PR c/84108
12269         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12270         that correspond to the kind of a declaration.
12272 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
12274         PR target/83984
12275         * config/pa/pa.md: Load address of PIC label using the linkage table
12276         if the label is nonlocal.
12278 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12280         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12281         warning message if user requests -maltivec=be.
12282         * doc/invoke.texi: Document deprecation of -maltivec=be.
12284 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
12286         PR target/84220
12287         * config/rs6000/rs6000-c.c: Update definitions for
12288         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12289         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12291 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12293         PR target/84239
12294         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12295         add _get_ssp intrinsics. Remove argument from
12296         __builtin_ia32_rdssp[d|q].
12297         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12298         * config/i386/i386-builtin.def: Remove argument from
12299         __builtin_ia32_rdssp[d|q].
12300         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12301         ix86_expand_special_args_builtin for _rdssp[d|q].
12302         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12303         Clear register before usage.
12304         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12305         Add documentation for new _get_ssp and _inc_ssp intrinsics.
12307 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
12309         PR tree-optimization/84357
12310         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12311         operand 1 of an ARRAY_REF too.
12313 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
12315         PR target/83831
12316         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12317         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12318         declarations.
12319         (set_of_reg): New struct.
12320         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12321         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12322         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12323         functions.
12324         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12325         Split into bitclr, bitset, bitinvert patterns if appropriate.
12326         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12327         use rx_fuse_in_memory_bitop.
12328         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12329         to named insn, correct maximum insn length.
12331 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
12333         PR target/79242
12334         * machmode.def: Define a complex mode for PARTIAL_INT.
12335         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12336         MODE_PARTIAL_INT.
12337         * doc/rtl.texi: Document CSPImode.
12338         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12339         handling.
12340         (msp430_hard_regno_nregs_with_padding): Likewise.
12342 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
12344         PR target/84279
12345         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12347 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
12349         PR rtl-optimization/84169
12350         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
12351         we generated a parallel as new i3 and we split that to new i2 and i3
12352         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
12353         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
12354         those to i2, not i1.  Partially rewrite this scan code.
12356 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12358         PR c/82210
12359         * stor-layout.c (place_field): For variable length fields, adjust
12360         offset_align afterwards not just based on the field's alignment,
12361         but also on the size.
12363         PR middle-end/84309
12364         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12365         of exps and logs in the use_exp2 case.
12367 2018-02-13  Jeff Law  <law@redhat.com>
12369         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12370         entry for "vector".
12372         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12373         ARGS as unused.
12375 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
12377         PR debug/84342
12378         PR debug/84319
12379         * common.opt (gas-loc-support, gas-locview-support): New.
12380         (ginline-points, ginternal-reset-location-views): New.
12381         * doc/invoke.texi: Document them.  Use @itemx where intended.
12382         (gvariable-location-views): Adjust.
12383         * target.def (reset_location_view): New.
12384         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12385         (TARGET_RESET_LOCATION_VIEW): New.
12386         * doc/tm.texi: Rebuilt.
12387         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12388         (dwarf2out_default_as_locview_support): New.
12389         (output_asm_line_debug_info): Use option variables.
12390         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12391         (output_loc_list): Likewise.
12392         (add_high_low_attributes): Check option variables.
12393         Don't output entry view attribute in strict mode.
12394         (gen_inlined_subroutine_die): Check option variables.
12395         (dwarf2out_inline_entry): Likewise.
12396         (init_sections_and_labels): Likewise.
12397         (dwarf2out_early_finish): Likewise.
12398         (maybe_reset_location_view): New, from...
12399         (dwarf2out_var_location): ... here.  Call it.
12400         * debug.h (dwarf2out_default_as_loc_support): Declare.
12401         (dwarf2out_default_as_locview_support): Declare.
12402         * hooks.c (hook_int_rtx_insn_0): New.
12403         * hooks.h (hook_int_rtx_insn_0): Declare.
12404         * toplev.c (process_options): Take -gas-loc-support and
12405         -gas-locview-support from dwarf2out.  Enable
12406         -gvariable-location-views by default only with locview
12407         assembler support.  Enable -ginternal-reset-location-views by
12408         default only if the target defines the corresponding hook.
12409         Enable -ginline-points by default if location views are
12410         enabled; force it disabled if statement frontiers are
12411         disabled.
12412         * tree-inline.c (expand_call_inline): Check option variables.
12413         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12415 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
12417         PR tree-optimization/84321
12418         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12419         handling.  Also check whether the anti-range contains any values
12420         that satisfy the mask; switch to a VR_RANGE if not.
12422 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
12424         PR sanitizer/84340
12425         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12427 2018-02-13  Martin Jambor  <mjambor@suse.cz>
12429         PR c++/83990
12430         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12431         of call statements, also set location of a load to a temporary.
12433 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
12435         * config/rl78/rl78.c (add_vector_labels): New function.
12436         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12437         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12438         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12439         which checks that no arguments are passed.
12440         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12441         * doc/extend.texi: Documentation for the new attribute.
12443 2018-02-13  Andreas Schwab  <schwab@suse.de>
12445         * config/riscv/linux.h (CPP_SPEC): Define.
12447 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12449         PR target/84335
12450         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12451         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12452         OPTION_MASK_ISA_AES as first argument to def_builtin_const
12453         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12454         instead of OPTION_MASK_ISA_PCLMUL as first argument to
12455         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12456         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12457         temporarily for AES and PCLMUL builtins.
12459         PR tree-optimization/84339
12460         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12461         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12462         Formatting fixes.
12464         PR middle-end/84309
12465         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12466         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12467         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12468         inline function.
12469         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12470         inline function.
12471         * omp-simd-clone.h: New file.
12472         * omp-simd-clone.c: Include omp-simd-clone.h.
12473         (expand_simd_clones): No longer static.
12474         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12475         cgraph.h and omp-simd-clone.h.
12476         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12477         (vect_recog_widen_shift_pattern): Formatting fix.
12478         (vect_pattern_recog_1): Don't check optab for calls.
12480         PR target/84336
12481         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12482         operands[2] into a REG before using gen_lowpart on it.
12484 2018-02-12  Jeff Law  <law@redhat.com>
12486         PR target/83760
12487         * config/sh/sh.c (find_barrier): Consider a sibling call
12488         a barrier as well.
12490         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12491         successfully back substituting a reg.
12493 2018-02-12  Richard Biener  <rguenther@suse.de>
12495         PR tree-optimization/84037
12496         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12497         parameter, move visited init to caller.
12498         (vect_slp_analyze_operations): Separate cost from validity
12499         check, initialize visited once for all instances.
12500         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12501         for all instances.
12502         * tree-vect-stmts.c (vect_model_simple_cost): Make early
12503         out an assert.
12504         (vect_model_promotion_demotion_cost): Likewise.
12505         (vectorizable_bswap): Guard cost modeling with !slp_node
12506         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12507         SLP stmts.
12508         (vectorizable_call): Likewise.
12509         (vectorizable_conversion): Likewise.
12510         (vectorizable_assignment): Likewise.
12511         (vectorizable_shift): Likewise.
12512         (vectorizable_operation): Likewise.
12513         (vectorizable_store): Likewise.
12514         (vectorizable_load): Likewise.
12515         (vectorizable_condition): Likewise.
12516         (vectorizable_comparison): Likewise.
12518 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
12520         PR sanitizer/84307
12521         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12522         (ASAN_MARK): Fix fnspec to account for return value, change pointer
12523         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12525 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
12527         PR middle-end/83665
12528         * params.def (inline-min-speedup): Increase from 8 to 15.
12529         (max-inline-insns-auto): Decrease from 40 to 30.
12530         * ipa-split.c (consider_split): Add some buffer for function to
12531         be considered inlining candidate.
12532         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12533         default values.
12535 2018-02-12  Richard Biener  <rguenther@suse.de>
12537         PR tree-optimization/84037
12538         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
12539         matched stmts if we cannot swap the non-matched ones.
12541 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12543         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
12544         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
12545         _mm_maskz_scalef_round_ss): New intrinsics.
12546         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
12547         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
12548         __builtin_ia32_scalefss_round): Remove.
12549         (__builtin_ia32_scalefsd_mask_round,
12550         __builtin_ia32_scalefss_mask_round): New intrinsics.
12551         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
12552         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
12553         ((match_operand:VF_128 2 "<round_nimm_predicate>"
12554         "<round_constraint>")): Changed to ...
12555         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
12556         "<round_scalar_constraint>")): ... this.
12557         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
12558         %0, %1, %2<round_op3>}"): Changed to ...
12559         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
12560         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
12561         %2<round_scalar_mask_op3>}"): ... this.
12562         * config/i386/subst.md (round_scalar_nimm_predicate): New.
12564 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12566         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12567         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12568         (_mm_maskz_sqrt_round_ss): New intrinsics.
12569         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12570         (__builtin_ia32_sqrtsd_mask_round)
12571         (__builtin_ia32_sqrtss_mask_round): New builtins.
12572         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12573         (__builtin_ia32_sqrtss_round): Remove.
12574         (__builtin_ia32_sqrtsd_mask_round)
12575         (__builtin_ia32_sqrtss_mask_round): New builtins.
12576         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12577         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12578         ((match_operand:VF_128 1 "vector_operand"
12579         "xBm,<round_constraint>")): Changed to ...
12580         ((match_operand:VF_128 1 "vector_operand"
12581         "xBm,<round_scalar_constraint>")): ... this.
12582         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12583         %0, %2, %<iptr>1<round_op3>}): Changed to ...
12584         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12585         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12586         %<iptr>1<round_scalar_mask_op3>}): ... this.
12587         ((set_attr "prefix" "<round_prefix>")): Changed to ...
12588         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12590 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
12592         PR target/84266
12593         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12594         Cast vec_cmpeq result to correct type.
12595         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12596         Cast vec_cmpgt result to correct type.
12598 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
12600         * final.c (final_scan_insn_1): Renamed from...
12601         (final_scan_insn): ... this.  New wrapper, to recover
12602         seen from the outermost call in recursive ones.
12603         * config/sparc/sparc.c (output_return): Drop seen from call.
12604         (output_sibcall): Likewise.
12605         * config/visium/visium.c (output_branch): Likewise.
12607 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
12609         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12610         function label.
12612 2018-02-10  Alan Modra  <amodra@gmail.com>
12614         PR target/84300
12615         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12616         Specify LR as an input.
12618 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
12620         PR sanitizer/83987
12621         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12622         remove_member_access_dummy_vars): New functions.
12623         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12624         lower_omp_1, execute_lower_omp): Use them.
12626         PR rtl-optimization/84308
12627         * shrink-wrap.c (spread_components): Release todo vector.
12629 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
12631         PR rtl-optimization/57193
12632         * ira-color.c (struct allocno_color_data): Add member
12633         conflict_allocno_hard_prefs.
12634         (update_conflict_allocno_hard_prefs): New.
12635         (bucket_allocno_compare_func): Add a preference based on
12636         conflict_allocno_hard_prefs.
12637         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12638         (color_allocnos): Remove a dead code.  Initiate
12639         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
12641 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12643         PR target/84226
12644         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12645         constraint from =wa to wa.  Avoid a subreg on the output operand,
12646         instead use a pseudo and subreg it in a move.
12647         (p9_xxbrd_<mode>): Changed to ...
12648         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12649         (p9_xxbrd_v2df): New expander.
12650         (p9_xxbrw_<mode>): Changed to ...
12651         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12652         (p9_xxbrw_v4sf): New expander.
12654 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12656         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12658 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
12660         PR target/83926
12661         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12662         multiply in 32-bit mode.
12663         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12664         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12665         mode.
12667 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12669         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12670         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12671         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12672         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12674 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
12676         PR lto/84213
12677         * dwarf2out.c (is_trivial_indirect_ref): New function.
12678         (dwarf2out_late_global_decl): Do not generate a location
12679         attribute for variables that have a non-trivial DECL_VALUE_EXPR
12680         and that are not defined in the current unit.
12682 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12684         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12685         instead of a libcall for UNORDERED.
12687 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
12689         PR target/82641
12690         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12691         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12693 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12695         PR target/PR84295
12696         * config/s390/s390.c (s390_set_current_function): Invoke
12697         s390_indirect_branch_settings also if fndecl didn't change.
12699 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12701         * config/rs6000/rs6000.md (blockage): Set length to zero.
12703 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12705         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
12707 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12709         PR sanitizer/84285
12710         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
12711         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
12712         -static-lib*san.
12714         PR debug/84252
12715         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
12716         PARALLEL incoming that failed vt_get_decl_and_offset check.
12718         PR middle-end/84237
12719         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
12720         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
12721         TREE_READONLY bit.
12722         (get_variable_section): For decls in named .bss* sections pass true as
12723         second argument to bss_initializer_p.
12725 2018-02-09  Marek Polacek  <polacek@redhat.com>
12726             Jakub Jelinek  <jakub@redhat.com>
12728         PR c++/83659
12729         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
12730         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
12731         Sync some changes from cxx_fold_indirect_ref.
12733 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12735         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
12736         markers.
12737         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
12738         (BLOCK_INLINE_ENTRY_LABEL): New.
12739         (dwarf2out_var_location): Disregard inline entry markers.
12740         (inline_entry_data): New struct.
12741         (inline_entry_data_hasher): New hashtable type.
12742         (inline_entry_data_hasher::hash): New.
12743         (inline_entry_data_hasher::equal): New.
12744         (inline_entry_data_table): New variable.
12745         (add_high_low_attributes): Add DW_AT_entry_pc and
12746         DW_AT_GNU_entry_view attributes if a pending entry is found
12747         in inline_entry_data_table.  Add old entry_pc attribute only
12748         if debug nonbinding markers are disabled.
12749         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
12750         markers are enabled.
12751         (block_within_block_p, dwarf2out_inline_entry): New.
12752         (dwarf2out_finish): Check that no entries remained in
12753         inline_entry_data_table.
12754         * final.c (reemit_insn_block_notes): Handle inline entry notes.
12755         (final_scan_insn, notice_source_line): Likewise.
12756         (rest_of_clean_state): Skip inline entry markers.
12757         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
12758         markers.
12759         * gimple.c (gimple_build_debug_inline_entry): New.
12760         * gimple.h (enum gimple_debug_subcode): Add
12761         GIMPLE_DEBUG_INLINE_ENTRY.
12762         (gimple_build_debug_inline_entry): Declare.
12763         (gimple_debug_inline_entry_p): New.
12764         (gimple_debug_nonbind_marker_p): Adjust.
12765         * insn-notes.def (INLINE_ENTRY): New.
12766         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
12767         inline entry marker notes.
12768         (print_insn): Likewise.
12769         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
12770         (INSN_DEBUG_MARKER_KIND): Likewise.
12771         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
12772         * tree-inline.c (expand_call_inline): Build and insert
12773         debug_inline_entry stmt.
12774         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
12775         inline entry blocks early, if nonbind markers are enabled.
12776         (dump_scope_block): Dump fragment info.
12777         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
12778         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
12779         (gimple_build_debug_inline_entry): New.
12780         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
12781         Enable/disable inline entry points too.
12782         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
12783         (DEBUG_INSN): Describe inline entry markers.
12785         * common.opt (gvariable-location-views): New.
12786         (gvariable-location-views=incompat5): New.
12787         * config.in: Rebuilt.
12788         * configure: Rebuilt.
12789         * configure.ac: Test assembler for view support.
12790         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
12791         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
12792         * dwarf2out.c (var_loc_view): New typedef.
12793         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
12794         (dwarf2out_locviews_in_attribute): New.
12795         (dwarf2out_locviews_in_loclist): New.
12796         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
12797         (enum dw_line_info_opcode): Add LI_adv_address.
12798         (struct dw_line_info_table): Add view.
12799         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
12800         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
12801         (zero_view_p): New variable.
12802         (ZERO_VIEW_P): New macro.
12803         (output_asm_line_debug_info): New.
12804         (struct var_loc_node): Add view.
12805         (add_AT_view_list, AT_loc_list): New.
12806         (add_var_loc_to_decl): Add view param.  Test it against last.
12807         (new_loc_list): Add view params.  Record them.
12808         (AT_loc_list_ptr): Handle loc and view lists.
12809         (view_list_to_loc_list_val_node): New.
12810         (print_dw_val): Handle dw_val_class_view_list.
12811         (size_of_die): Likewise.
12812         (value_format): Likewise.
12813         (loc_list_has_views): New.
12814         (gen_llsym): Set vl_symbol too.
12815         (maybe_gen_llsym, skip_loc_list_entry): New.
12816         (dwarf2out_maybe_output_loclist_view_pair): New.
12817         (output_loc_list): Output view list or entries too.
12818         (output_view_list_offset): New.
12819         (output_die): Handle dw_val_class_view_list.
12820         (output_dwarf_version): New.
12821         (output_compilation_unit_header): Use it.
12822         (output_skeleton_debug_sections): Likewise.
12823         (output_rnglists, output_line_info): Likewise.
12824         (output_pubnames, output_aranges): Update version comments.
12825         (output_one_line_info_table): Output view numbers in asm comments.
12826         (dw_loc_list): Determine current endview, pass it to new_loc_list.
12827         Call maybe_gen_llsym.
12828         (loc_list_from_tree_1): Adjust.
12829         (add_AT_location_description): Create view list attribute if
12830         needed, check it's absent otherwise.
12831         (convert_cfa_to_fb_loc_list): Adjust.
12832         (maybe_emit_file): Call output_asm_line_debug_info for test.
12833         (dwarf2out_var_location): Reset views as needed.  Precompute
12834         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
12835         attribute.  Set view.
12836         (new_line_info_table): Reset next view.
12837         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
12838         (dwarf2out_source_line): Likewise.  Output view resets and labels to
12839         the assembler, or select appropriate line info opcodes.
12840         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
12841         (optimize_string_length): Catch it.  Adjust.
12842         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
12843         dw_val_class_view_list, and remove it if no longer needed.
12844         (hash_loc_list): Hash view numbers.
12845         (loc_list_hasher::equal): Compare them.
12846         (optimize_location_lists): Check whether a view list symbol is
12847         needed, and whether the locview attribute is present, and
12848         whether they match.  Remove the locview attribute if no longer
12849         needed.
12850         (index_location_lists): Call skip_loc_list_entry for test.
12851         (dwarf2out_finish): Call output_asm_line_debug_info for test.
12852         Use output_dwarf_version.
12853         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
12854         (struct dw_val_node): Add val_view_list.
12855         * final.c (SEEN_NEXT_VIEW): New.
12856         (set_next_view_needed): New.
12857         (clear_next_view_needed): New.
12858         (maybe_output_next_view): New.
12859         (final_start_function): Rename to...
12860         (final_start_function_1): ... this.  Take pointer to FIRST,
12861         add SEEN parameter.  Emit param bindings in the initial view.
12862         (final_start_function): Reintroduce SEEN-less interface.
12863         (final): Rename to...
12864         (final_1): ... this.  Take SEEN parameter.  Output final pending
12865         next view at the end.
12866         (final): Reintroduce seen-less interface.
12867         (final_scan_insn): Output pending next view before switching
12868         sections or ending a block.  Mark the next view as needed when
12869         outputting variable locations.  Notify debug backend of section
12870         changes, and of location view changes.
12871         (rest_of_handle_final): Adjust.
12872         * toplev.c (process_options): Autodetect value for debug variable
12873         location views option.  Warn on incompat5 without -gdwarf-5.
12874         * doc/invoke.texi (gvariable-location-views): New.
12875         (gvariable-location-views=incompat5): New.
12876         (gno-variable-location-views): New.
12878 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
12880         PR tree-optimization/84136
12881         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
12882         that the result of find_edge is non-NULL.
12884 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
12886         PR target/83008
12887         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
12888         storing integer register in SImode.  Fix cost of 256 and 512
12889         byte aligned SSE register store.
12891 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
12893         * config/i386/i386.c (ix86_multiplication_cost): Fix
12894         multiplication cost for TARGET_AVX512DQ.
12896 2018-02-08  Marek Polacek  <polacek@redhat.com>
12898         PR tree-optimization/84238
12899         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
12900         get_range_strlen.
12902 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
12904         PR tree-optimization/84265
12905         * tree-vect-stmts.c (vectorizable_store): Don't treat
12906         VMAT_CONTIGUOUS accesses as grouped.
12907         (vectorizable_load): Likewise.
12909 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
12911         PR tree-optimization/81635
12912         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
12913         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
12914         (test_round_for_mask): New functions.
12915         (wide_int_cc_tests): Call test_round_for_mask.
12916         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
12917         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
12918         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
12919         range returned by get_range_info.
12921 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
12923         PR ipa/81360
12924         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
12925         * symtab.c: Include builtins.h
12926         (symtab_node::output_to_lto_symbol_table_p): Move here
12927         from lto-streamer-out.c:output_symbol_p.
12928         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
12929         (output_symbol_p): Move all logic to symtab.c
12930         (produce_symtab): Update.
12932 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12934         * config/s390/s390-opts.h (enum indirect_branch): Define.
12935         * config/s390/s390-protos.h (s390_return_addr_from_memory)
12936         (s390_indirect_branch_via_thunk)
12937         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
12938         (enum s390_indirect_branch_type): Define.
12939         * config/s390/s390.c (struct s390_frame_layout, struct
12940         machine_function): Remove.
12941         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
12942         (indirect_branch_table_label_no, indirect_branch_table_name):
12943         Define variables.
12944         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
12945         (enum s390_indirect_branch_option): Define.
12946         (s390_return_addr_from_memory): New function.
12947         (s390_handle_string_attribute): New function.
12948         (s390_attribute_table): Add new attribute handler.
12949         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
12950         (s390_indirect_branch_via_thunk): New function.
12951         (s390_indirect_branch_via_inline_thunk): New function.
12952         (s390_function_ok_for_sibcall): When jumping via thunk disallow
12953         sibling call optimization for non z10 compiles.
12954         (s390_emit_call): Force indirect branch target to be a single
12955         register.  Add r1 clobber for non-z10 compiles.
12956         (s390_emit_epilogue): Emit return jump via return_use expander.
12957         (s390_reorg): Handle JUMP_INSNs as execute targets.
12958         (s390_option_override_internal): Perform validity checks for the
12959         new command line options.
12960         (s390_indirect_branch_attrvalue): New function.
12961         (s390_indirect_branch_settings): New function.
12962         (s390_set_current_function): Invoke s390_indirect_branch_settings.
12963         (s390_output_indirect_thunk_function):  New function.
12964         (s390_code_end): Implement target hook.
12965         (s390_case_values_threshold): Implement target hook.
12966         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
12967         macros.
12968         * config/s390/s390.h (struct s390_frame_layout)
12969         (struct machine_function): Move here from s390.c.
12970         (TARGET_INDIRECT_BRANCH_NOBP_RET)
12971         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
12972         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
12973         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
12974         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
12975         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
12976         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
12977         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
12978         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
12979         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
12980         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
12981         (mnemonic attribute): Add values which aren't recognized
12982         automatically.
12983         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
12984         pattern for branch conversion.  Fix mnemonic attribute.
12985         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
12986         indirect branch via thunk if requested.
12987         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
12988         ("*indirect_jump"): Disable for branch conversion using out of
12989         line thunks.
12990         ("indirect_jump_via_thunk<mode>_z10")
12991         ("indirect_jump_via_thunk<mode>")
12992         ("indirect_jump_via_inlinethunk<mode>_z10")
12993         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
12994         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
12995         ("casesi_jump_via_inlinethunk<mode>_z10")
12996         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
12997         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
12998         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
12999         ("*indirect2_jump"): Disable for branch conversion.
13000         ("casesi_jump"): Turn into expander and expand patterns for branch
13001         conversion.
13002         ("return_use"): New expander.
13003         ("*return"): Emit return via thunk and rename it to ...
13004         ("*return<mode>"): ... this one.
13005         * config/s390/s390.opt: Add new options and and enum for the
13006         option values.
13008 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13010         * lra-constraints.c (match_reload): Unconditionally use
13011         gen_lowpart_SUBREG, rather than selecting between that
13012         and equivalent gen_rtx_SUBREG code.
13014 2018-02-08  Richard Biener  <rguenther@suse.de>
13016         PR tree-optimization/84233
13017         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13018         changed flag instead of boguously re-using phi_inserted.
13020 2018-02-08  Martin Jambor  <mjambor@suse.cz>
13022         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13023         static local variables.
13025 2018-02-08  Richard Biener  <rguenther@suse.de>
13027         PR tree-optimization/84278
13028         * tree-vect-stmts.c (vectorizable_store): When looking for
13029         smaller vector types to perform grouped strided loads/stores
13030         make sure the mode is supported by the target.
13031         (vectorizable_load): Likewise.
13033 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13035         * config/aarch64/aarch64.c (aarch64_components_for_bb):
13036         Increase LDP/STP opportunities by adding adjacent callee-saves.
13038 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13040         PR rtl-optimization/84068
13041         PR rtl-optimization/83459
13042         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13044 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
13046         PR tree-optimization/84224
13047         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13048         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13049         non-zero arguments.
13051 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
13053         PR target/84113
13054         * config/rs6000/altivec.md (*restore_world): Remove LR use.
13055         * config/rs6000/predicates.md (restore_world_operation): Adjust op
13056         count, remove one USE.
13058 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13060         * doc/install.texi (Configuration): Document the
13061         --with-long-double-format={ibm,ieee} PowerPC configuration
13062         options.
13064         PR target/84154
13065         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13066         Convert from define_expand to be define_insn_and_split.  Rework
13067         float/double/_Float128 conversions to QI/HI/SImode to work with
13068         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
13069         conversions to QI/HImode types did a store and then a load to
13070         truncate the value.  For conversions to VSX registers, don't split
13071         the insn, instead emit the code directly.  Use the code iterator
13072         any_fix to combine signed and unsigned conversions.
13073         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13074         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13075         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13076         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13077         (fix_<mode>di2_hw): Likewise.
13078         (fixuns_<mode>di2_hw): Likewise.
13079         (fix_<mode>si2_hw): Likewise.
13080         (fixuns_<mode>si2_hw): Likewise.
13081         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13082         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13083         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13084         fix<uns>_trunc<SFDF:mode>si2_p8.
13085         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13086         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13087         (fix<uns>_<mode>_mem): Likewise.
13088         (fctiw<u>z_<mode>_mem): Likewise.
13089         (fix<uns>_<mode>_mem): Likewise.
13090         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13091         the register allocator from doing a direct move to the GPRs to do
13092         a store, and instead use the ISA 3.0 store byte/half-word from
13093         vector register instruction.  For IEEE 128-bit floating point,
13094         also optimize stores of 32-bit ints.
13095         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13097 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
13099         * genextract.c (push_pathstr_operand): New function to support
13100         [a-zA-Z].
13101         (walk_rtx): Call push_pathstr_operand.
13102         (print_path): Support [a-zA-Z].
13104 2018-02-07  Richard Biener  <rguenther@suse.de>
13106         PR tree-optimization/84037
13107         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13108         (cse_and_gimplify_to_preheader): Declare.
13109         (vect_get_place_in_interleaving_chain): Likewise.
13110         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13111         ivexpr_map.
13112         (_loop_vec_info::~_loop_vec_info): Delete it.
13113         (cse_and_gimplify_to_preheader): New function.
13114         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13115         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13116         (vectorizable_load): Likewise.  For grouped stores always base
13117         the IV on the first element.
13118         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13119         condition before gimplifying.
13121 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13123         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13124         *DIV_EXPR and *MOD_EXPR.
13126 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
13128         PR target/84248
13129         * config/i386/i386.c (ix86_option_override_internal): Mask out
13130         the CF_SET bit when checking -fcf-protection.
13132 2018-02-07  Tom de Vries  <tom@codesourcery.com>
13134         PR libgomp/84217
13135         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13136         enough.
13138 2018-02-07  Richard Biener  <rguenther@suse.de>
13140         PR tree-optimization/84204
13141         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13142         this place.
13144         PR tree-optimization/84205
13145         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13146         special-case isl_ast_op_zdiv_r.
13148         PR tree-optimization/84223
13149         * graphite-scop-detection.c (gather_bbs::before_dom_children):
13150         Only add conditions from within the region.
13151         (gather_bbs::after_dom_children): Adjust.
13153 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
13155         PR target/84209
13156         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13157         * config/avr/avr.md: Only post-reload split REG-REG moves if
13158         either register is GENERAL_REG_P.
13160 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13162         PR tree-optimization/84235
13163         * tree-ssa-scopedtables.c
13164         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13165         if the subtraction is performed in floating point type where NaNs are
13166         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13167         build 1.  Formatting fix.
13169 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
13171         PR target/84146
13172         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13173         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13174         and skip it regardless of bb boundaries.  Use CALL_P macro,
13175         don't test INSN_P (insn) together with CALL_P or JUMP_P check
13176         unnecessarily, formatting fix.
13178 2018-02-06  Michael Collison  <michael.collison@arm.com>
13180         * config/arm/thumb2.md:
13181         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13182         (*thumb_mov_notscc): Ditto.
13184 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
13186         PR target/84154
13187         * config/rs6000/rs6000.md (su code attribute): Use "u" for
13188         unsigned_fix, not "s".
13190 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13192         * configure.ac (gcc_fn_eh_frame_ro): New function.
13193         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13194         correct .eh_frame permissions.
13195         * configure: Regenerate.
13197 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
13199         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13200         irrelevant options.
13202 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13204         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13205         Display warning message for -mno-speculate-indirect-jumps.
13207 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
13209         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13210         Undocumented.
13211         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13213 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
13215         PR tree-optimization/84225
13216         * tree-eh.c (find_trapping_overflow): Only call
13217         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13219 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13221         PR target/84145
13222         * config/i386/i386.c: Reimplement the check of possible options
13223         -mibt/-mshstk conbination. Change error messages.
13224         * doc/invoke.texi: Fix a typo: remove extra '='.
13226 2018-02-06  Marek Polacek  <polacek@redhat.com>
13228         PR tree-optimization/84228
13229         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13231 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
13233         PR target/82641
13234         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13235         emitted arch directives.
13236         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13237         __ARM_FEATURE_COPROC before changing architectures.
13239 2018-02-06  Richard Biener  <rguenther@suse.de>
13241         * config/i386/i386.c (print_reg): Fix typo.
13242         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13244 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
13246         * configure: Regenerate.
13248 2018-02-05  Martin Sebor  <msebor@redhat.com>
13250         PR tree-optimization/83369
13251         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13252         inlining context.
13254 2018-02-05  Martin Liska  <mliska@suse.cz>
13256         * doc/invoke.texi: Cherry-pick upstream r323995.
13258 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
13260         * ira.c (ira_init_register_move_cost): Adjust comment.
13262 2018-02-05  Martin Liska  <mliska@suse.cz>
13264         PR gcov-profile/84137
13265         * doc/gcov.texi: Fix typo in documentation.
13267 2018-02-05  Martin Liska  <mliska@suse.cz>
13269         PR gcov-profile/83879
13270         * doc/gcov.texi: Document necessity of --dynamic-list-data when
13271         using dlopen functionality.
13273 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
13275         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13276         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13277         _mm_maskz_range_ss, _mm_mask_range_round_ss,
13278         _mm_maskz_range_round_ss): New intrinsics.
13279         (__builtin_ia32_rangesd128_round)
13280         (__builtin_ia32_rangess128_round): Remove.
13281         (__builtin_ia32_rangesd128_mask_round,
13282         __builtin_ia32_rangess128_mask_round): New builtins.
13283         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13284         __builtin_ia32_rangess128_round): Remove.
13285         (__builtin_ia32_rangesd128_mask_round,
13286         __builtin_ia32_rangess128_mask_round): New builtins.
13287         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13288         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13289         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13290         "<round_saeonly_constraint>")): Changed to ...
13291         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13292         "<round_saeonly_scalar_constraint>")): ... this.
13293         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13294         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13295         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13296         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13297         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13299 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
13301         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13302         options.
13303         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13304         Remove all values except native, 8540 and 8548.
13306 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
13308         * config/i386/i386.c (ix86_output_function_return): Pass
13309         INVALID_REGNUM, instead of -1, as invalid register number to
13310         indirect_thunk_name and output_indirect_thunk.
13312 2018-02-02  Julia Koval  <julia.koval@intel.com>
13314         * config.gcc: Add -march=icelake.
13315         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13316         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13317         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13318         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13319         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13320         (processor_target_table): Add icelake.
13321         (ix86_option_override_internal): Handle new PTAs.
13322         (get_builtin_code_for_version): Handle icelake.
13323         (M_INTEL_COREI7_ICELAKE): New.
13324         (fold_builtin_cpu): Handle icelake.
13325         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13326         * doc/invoke.texi: Add -march=icelake.
13328 2018-02-02  Julia Koval  <julia.koval@intel.com>
13330         * config/i386/i386.c (ix86_option_override_internal): Change flags type
13331         to wide_int_bitmask.
13332         * wide-int-bitmask.h: New.
13334 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13336         PR target/84066
13337         * config/i386/i386.md: Replace Pmode with word_mode in
13338         builtin_setjmp_setup and builtin_longjmp to support x32.
13340 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
13342         PR target/56010
13343         PR target/83743
13344         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13345         #include "opts.h".
13346         (rs6000_supported_cpu_names): New static variable.
13347         (linux_cpu_translation_table): Likewise.
13348         (elf_platform) <cpu>: Define new static variable and use it.
13349         Translate kernel AT_PLATFORM name to canonical name if needed.
13350         Error if platform name is unknown.
13352 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
13354         PR target/84089
13355         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13357 2018-02-01  Jeff Law  <law@redhat.com>
13359         PR target/84128
13360         * config/i386/i386.c (release_scratch_register_on_entry): Add new
13361         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
13362         the scratch if RELEASE_VIA_POP is false.
13363         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13364         If we have to save a temporary register, decrement SIZE appropriately.
13365         Pass new arguments to release_scratch_register_on_entry.
13366         (ix86_adjust_stack_and_probe): Likewise.
13367         (ix86_emit_probe_stack_range): Pass new arguments to
13368         release_scratch_register_on_entry.
13370 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
13372         PR rtl-optimization/84157
13373         * combine.c (change_zero_ext): Use REG_P predicate in
13374         front of HARD_REGISTER_P predicate.
13376 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
13378         * config/avr/avr.c (avr_option_override): Move disabling of
13379         -fdelete-null-pointer-checks to...
13380         * common/config/avr/avr-common.c (avr_option_optimization_table):
13381         ...here.
13383 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13385         PR tree-optimization/81635
13386         * tree-data-ref.c (split_constant_offset_1): For types that
13387         wrap on overflow, try to use range info to prove that wrapping
13388         cannot occur.
13390 2018-02-01  Renlin Li  <renlin.li@arm.com>
13392         PR target/83370
13393         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13394         TAILCALL_ADDR_REGS.
13395         (aarch64_register_move_cost): Likewise.
13396         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13397         TAILCALL_ADDR_REGS.
13398         (REG_CLASS_NAMES): Likewise.
13399         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13400         TAILCALL_ADDR_REGS. Remove IP registers.
13401         * config/aarch64/aarch64.md (Ucs): Update register constraint.
13403 2018-02-01  Richard Biener  <rguenther@suse.de>
13405         * domwalk.h (dom_walker::dom_walker): Add additional constructor
13406         for specifying RPO order and allow NULL for that.
13407         * domwalk.c (dom_walker::dom_walker): Likewise.
13408         (dom_walker::walk): Handle NULL RPO order.
13409         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13410         in RPO order.
13411         (rewrite_update_dom_walker): Likewise.
13412         (mark_def_dom_walker): Likewise.
13414 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13416         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13417         (aarch64_maybe_expand_sve_subreg_move): Declare.
13418         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13419         * config/aarch64/predicates.md (aarch64_any_register_operand): New
13420         predicate.
13421         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13422         that are semantically a reverse operation.
13423         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13424         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13425         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13426         functions.
13427         (aarch64_can_change_mode_class): For big-endian, forbid changes
13428         between two SVE modes if they have different element sizes.
13430 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13432         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13433         the TImode handling for big-endian targets.
13435 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13437         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13438         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
13439         not just bytes.
13440         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13441         Remove BSWAP handing for big-endian targets and use the form of
13442         LD1RQ appropariate for the mode.
13444 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13446         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13447         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13448         duplicated element.
13450 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13452         PR tearget/83845
13453         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13454         check for operands that need to go through aarch64_sve_reload_be.
13456 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
13458         PR tree-optimization/81661
13459         PR tree-optimization/84117
13460         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13461         * tree-eh.c: Include gimplify.h.
13462         (find_trapping_overflow, replace_trapping_overflow,
13463         rewrite_to_non_trapping_overflow): New functions.
13464         * tree-vect-loop.c: Include tree-eh.h.
13465         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13466         * tree-data-ref.c: Include tree-eh.h.
13467         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13469 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
13471         PR rtl-optimization/84123
13472         * combine.c (change_zero_ext): Check if hard register satisfies
13473         can_change_dest_mode before calling gen_lowpart_SUBREG.
13475 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
13477         PR target/82444
13478         * ira.c (ira_init_register_move_cost): Remove assert.
13480 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13482         PR rtl-optimization/84071
13483         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13484         * doc/tm.texi: Regenerate.
13486 2018-01-31  Richard Biener  <rguenther@suse.de>
13488         PR tree-optimization/84132
13489         * tree-data-ref.c (analyze_miv_subscript): Properly
13490         check whether evolution_function_is_affine_multivariate_p
13491         before calling gcd_of_steps_may_divide_p.
13493 2018-01-31  Julia Koval  <julia.koval@intel.com>
13495         PR target/83618
13496         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13497         * config/i386/i386.md (rdpid_rex64) New.
13498         (rdpid): Make 32bit only.
13500 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
13502         PR lto/84105
13503         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13504         an IDENTIFIER_NODE for FUNCTION_TYPE's.
13506 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13508         Revert
13509         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13511         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13513 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13515         PR rtl-optimization/84071
13516         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13517         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13519 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13521         * config/arc/arc.c (arc_handle_aux_attribute): New function.
13522         (arc_attribute_table): Add 'aux' attribute.
13523         (arc_in_small_data_p): Consider aux like variables.
13524         (arc_is_aux_reg_p): New function.
13525         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13526         (arc_get_aux_arg): New function.
13527         (prepare_move_operands): Handle aux-register access.
13528         (arc_handle_aux_attribute): New function.
13529         * doc/extend.texi (ARC Variable attributes): Add subsection.
13531 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13533         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13534         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13535         (arc_attribute_table): Add 'uncached' attribute.
13536         (arc_print_operand): Print '.di' flag for uncached memory
13537         accesses.
13538         (arc_in_small_data_p): Do not consider for small data the uncached
13539         types.
13540         (arc_is_uncached_mem_p): New function.
13541         * config/arc/predicates.md (compact_store_memory_operand): Check
13542         for uncached memory accesses.
13543         (nonvol_nonimm_operand): Likewise.
13544         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
13546 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
13548         PR c/84100
13549         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
13550         falign-loops=): Add Optimization flag.
13552 2018-01-30  Jeff Law  <law@redhat.com>
13554         PR target/84064
13555         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
13556         INT_REGISTERS_SAVED.  Check it prior to calling
13557         get_scratch_register_on_entry.
13558         (ix86_adjust_stack_and_probe): Similarly.
13559         (ix86_emit_probe_stack_range): Similarly.
13560         (ix86_expand_prologue): Corresponding changes.
13562 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13564         PR target/40411
13565         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13566         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13568 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
13570         PR target/84112
13571         * lra-constraints.c (curr_insn_transform): Process AND in the
13572         address.
13574 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
13576         PR rtl-optimization/83986
13577         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13578         dependence against last_pending_memory_flush in addition to
13579         pending_jump_insns.
13581 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
13583         PR tree-optimization/81611
13584         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13585         copies.
13587 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13589         PR target/83758
13590         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13591         a reg rtx.
13593 2018-01-30  Richard Biener  <rguenther@suse.de>
13594             Jakub Jelinek  <jakub@redhat.com>
13596         PR tree-optimization/84111
13597         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13598         inner loops added during recursion, as they don't have up-to-date
13599         SSA form.
13601 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13603         PR ipa/81360
13604         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13605         (can_inline_edge_by_limits_p): ... here.
13606         (can_early_inline_edge_p, check_callers,
13607         update_caller_keys, update_callee_keys, recursive_inlining,
13608         add_new_edges_to_heap, speculation_useful_p,
13609         inline_small_functions,
13610         inline_small_functions, flatten_function,
13611         inline_to_all_callers_1): Update.
13613 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13615         * profile-count.c (profile_count::combine_with_ipa_count): Handle
13616         zeros correctly.
13618 2018-01-30  Richard Biener  <rguenther@suse.de>
13620         PR tree-optimization/83008
13621         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13622         invariant and constant vector uses in stmts when they need
13623         more than one stmt.
13625 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13627         PR bootstrap/84017
13628         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13629         * configure: Regenerate.
13631 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13633         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13634         pattern.
13635         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13636         Use gen_rtx_REG rather than gen_lowpart.
13638 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13640         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13641         rather than 0 when creating partial subregs.
13643 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13645         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13646         of usage.
13648 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
13650         PR target/81550
13651         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13652         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13653         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13654         flags.  This restores the settings used before the 2017-07-24.
13655         Turning off pre increment/decrement/modify allows IVOPTS to
13656         optimize DF/SF loops where the index is an int.
13658 2018-01-29  Richard Biener  <rguenther@suse.de>
13659             Kelvin Nilsen  <kelvin@gcc.gnu.org>
13661         PR bootstrap/80867
13662         * tree-vect-stmts.c (vectorizable_call): Don't call
13663         targetm.vectorize_builtin_md_vectorized_function if callee is
13664         NULL.
13666 2018-01-22  Carl Love  <cel@us.ibm.com>
13668         * doc/extend.tex: Fix typo in second arg in
13669         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13671 2018-01-29  Richard Biener  <rguenther@suse.de>
13673         PR tree-optimization/84086
13674         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13675         (flush_ssaname_freelist): When SSA names were released reset
13676         the SCEV hash table.
13678 2018-01-29  Richard Biener  <rguenther@suse.de>
13680         PR tree-optimization/84057
13681         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13682         removed paths when removing edges.
13684 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
13686         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13687         -mfunction-return=@var{choice}.
13689 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13691         PR diagnostic/84034
13692         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13693         Handle CR like TAB.
13694         (layout::print_source_line): Likewise.
13695         (test_get_line_width_without_trailing_whitespace): Add test cases.
13697 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
13699         PR middle-end/84040
13700         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13701         debug insns.
13703 2018-01-26  Jim Wilson  <jimw@sifive.com>
13705         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
13707         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
13708         specified.
13710 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13712         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
13713         and CMP + SUB-immediate -> SUBS.
13715 2018-01-26  Martin Sebor  <msebor@redhat.com>
13717         PR tree-optimization/83896
13718         * tree-ssa-strlen.c (get_string_len): Rename...
13719         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
13720         Avoid assuming length is constant.
13721         (handle_char_store): Use HOST_WIDE_INT for string length.
13723 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
13725         PR target/81763
13726         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
13727         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
13729 2018-01-26  Richard Biener  <rguenther@suse.de>
13731         PR rtl-optimization/84003
13732         * dse.c (record_store): Only record redundant stores when
13733         the earlier store aliases at least all accesses the later one does.
13735 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
13737         PR rtl-optimization/83985
13738         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
13739         REG_CFA_RESTORE insns.
13740         (delete_unmarked_insns): Don't ignore separate shrink wrapping
13741         REG_CFA_RESTORE insns here.
13743         PR c/83989
13744         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
13745         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
13747 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13749         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
13750         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
13751         (arc_init): Likewise.
13752         (arc_override_options): Likewise.
13753         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
13754         value.
13755         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
13756         support.
13757         * config/arc/arc.h (TARGET_DBNZ): Define.
13758         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
13759         properly set the tune attribute.
13760         (dbnz): Use TARGET_DBNZ guard.
13761         * config/arc/arc.opt (mtune): Add core3 option.
13763 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13765         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
13766         recognize new pic like addresses.
13767         (arc_delegitimize_address): Clean up.
13769 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13771         * config/arc/arc-arches.def: Option mrf16 valid for all
13772         architectures.
13773         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
13774         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
13775         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
13776         * config/arc/arc-tables.opt: Regenerate.
13777         * config/arc/arc.c (arc_conditional_register_usage): Handle
13778         reduced register file case.
13779         (arc_file_start): Set must have build attributes.
13780         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
13781         mrf16 option value.
13782         * config/arc/arc.opt (mrf16): Add new option.
13783         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
13784         * config/arc/genmultilib.awk: Handle new mrf16 option.
13785         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
13786         * config/arc/t-multilib: Regenerate.
13787         * doc/invoke.texi (ARC Options): Document mrf16 option.
13789 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13791         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
13792         * config/arc/arc.c (arc_handle_secure_attribute): New function.
13793         (arc_attribute_table): Add 'secure_call' attribute.
13794         (arc_print_operand): Print secure call operand.
13795         (arc_function_ok_for_sibcall): Don't optimize tail calls when
13796         secure.
13797         (arc_is_secure_call_p): New function.  * config/arc/arc.md
13798         (call_i): Add support for sjli instruction.
13799         (call_value_i): Likewise.
13800         * config/arc/constraints.md (Csc): New constraint.
13802 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13803             John Eric Martin  <John.Martin@emmicro-us.com>
13805         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
13806         * config/arc/arc.c (_arc_jli_section): New struct.
13807         (arc_jli_section): New type.
13808         (rc_jli_sections): New static variable.
13809         (arc_handle_jli_attribute): New function.
13810         (arc_attribute_table): Add jli_always and jli_fixed attribute.
13811         (arc_file_end): New function.
13812         (TARGET_ASM_FILE_END): Define.
13813         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
13814         (arc_add_jli_section): New function.
13815         (jli_call_scan): Likewise.
13816         (arc_reorg): Call jli_call_scan.
13817         (arc_output_addsi): Remove 'S' from printing asm operand.
13818         (arc_is_jli_call_p): New function.
13819         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
13820         operand.
13821         (movhi_insn): Likewise.
13822         (movsi_insn): Likewise.
13823         (movsi_set_cc_insn): Likewise.
13824         (loadqi_update): Likewise.
13825         (load_zeroextendqisi_update): Likewise.
13826         (load_signextendqisi_update): Likewise.
13827         (loadhi_update): Likewise.
13828         (load_zeroextendhisi_update): Likewise.
13829         (load_signextendhisi_update): Likewise.
13830         (loadsi_update): Likewise.
13831         (loadsf_update): Likewise.
13832         (movsicc_insn): Likewise.
13833         (bset_insn): Likewise.
13834         (bxor_insn): Likewise.
13835         (bclr_insn): Likewise.
13836         (bmsk_insn): Likewise.
13837         (bicsi3_insn): Likewise.
13838         (cmpsi_cc_c_insn): Likewise.
13839         (movsi_ne): Likewise.
13840         (movsi_cond_exec): Likewise.
13841         (clrsbsi2): Likewise.
13842         (norm_f): Likewise.
13843         (normw): Likewise.
13844         (swap): Likewise.
13845         (divaw): Likewise.
13846         (flag): Likewise.
13847         (sr): Likewise.
13848         (kflag): Likewise.
13849         (ffs): Likewise.
13850         (ffs_f): Likewise.
13851         (fls): Likewise.
13852         (call_i): Remove 'S' asm letter, add jli instruction.
13853         (call_value_i): Likewise.
13854         * config/arc/arc.op (mjli-always): New option.
13855         * config/arc/constraints.md (Cji): New constraint.
13856         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
13857         operand.
13858         (subsf3_fpx): Likewise.
13859         (mulsf3_fpx): Likewise.
13860         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
13861         asm operand.
13862         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
13863         function attrbutes.
13864         * doc/invoke.texi (ARC): Document mjli-always option.
13866 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
13868         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
13869         avoid addition with 0 and use incw and decw where possible.
13871 2018-01-26  Richard Biener  <rguenther@suse.de>
13873         PR tree-optimization/81082
13874         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
13875         association if it requires casting to unsigned.
13876         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
13877         from fold_plusminus_mult_expr to catch important cases late when
13878         range info is available.
13880 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13882         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
13883         * configure.ac (hidden_linkonce): New test.
13884         * configure: Regenerate.
13885         * config.in: Regenerate.
13887 2018-01-26  Julia Koval  <julia.koval@intel.com>
13889         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
13890         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
13891         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
13892         _mm_mask_bitshuffle_epi64_mask): Fix type.
13893         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
13894         USI_FTYPE_V4DI_V4DI_USI): Remove.
13895         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
13896         __builtin_ia32_vpshufbitqmb256_mask,
13897         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
13898         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
13899         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
13901 2018-01-26  Alan Modra  <amodra@gmail.com>
13903         PR target/84033
13904         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
13905         UNSPEC_VBPERMQ.  Sort other unspecs.
13907 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
13909         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
13911 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
13913         PR middle-end/83055
13914         * predict.c (drop_profile): Do not push/pop cfun; update also
13915         node->count.
13916         (handle_missing_profiles): Fix logic looking for zero profiles.
13918 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
13920         PR middle-end/83977
13921         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
13922         on functions with #pragma omp declare simd or functions with simd
13923         attribute.
13924         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
13925         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
13926         Remove trailing \n from warning_at calls.
13928 2018-01-25  Tom de Vries  <tom@codesourcery.com>
13930         PR target/84028
13931         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13932         for neutered workers.
13934 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
13936         PR target/68467
13937         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
13938         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
13940 2018-01-24  Jeff Law  <law@redhat.com>
13942         PR target/83994
13943         * i386.c (get_probe_interval): Move to earlier point.
13944         (ix86_compute_frame_layout): If -fstack-clash-protection and
13945         the frame is larger than the probe interval, then use pushes
13946         to save registers rather than reg->mem moves.
13947         (ix86_expand_prologue): Remove conditional for int_registers_saved
13948         assertion.
13950 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
13952         PR target/84014
13953         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
13954         min/max for never referenced object.
13956 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
13958         PR middle-end/83977
13959         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
13960         here.
13961         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
13962         attributes from DECL_ATTRIBUTES (decl) without affecting
13963         DECL_ATTRIBUTES (current_function_decl).
13964         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
13965         functions with non-NULL DECL_ABSTRACT_ORIGIN.
13967 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
13969         PR tree-optimization/83979
13970         * fold-const.c (fold_comparison): Use constant_boolean_node
13971         instead of boolean_{true,false}_node.
13973 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
13975         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
13976         with zero counts.
13978 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13980         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13981         Simplify the clause that sets the length attribute.
13982         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13983         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
13984         clause that sets the length attribute.
13985         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13987 2018-01-24  Tom de Vries  <tom@codesourcery.com>
13989         PR target/83589
13990         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
13991         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
13992         Add strict parameter.
13993         (prevent_branch_around_nothing): Insert dummy insn between branch to
13994         label and label with no ptx insn inbetween.
13995         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
13997 2018-01-24  Tom de Vries  <tom@codesourcery.com>
13999         PR target/81352
14000         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14001         for neutered threads in warp.
14002         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14004 2018-01-24  Richard Biener  <rguenther@suse.de>
14006         PR tree-optimization/83176
14007         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14008         operands.
14010 2018-01-24  Richard Biener  <rguenther@suse.de>
14012         PR tree-optimization/82819
14013         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14014         code generating pluses that are no-ops in the target precision.
14016 2018-01-24  Richard Biener  <rguenther@suse.de>
14018         PR middle-end/84000
14019         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14021 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14023         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14024         to merge probabilities.
14025         * predict.c (probably_never_executed): Also mark as cold functions
14026         with global 0 profile and guessed local profile.
14027         * profile-count.c (profile_probability::combine_with_count): New
14028         member function.
14029         * profile-count.h (profile_probability::operator*,
14030         profile_probability::operator*=, profile_probability::operator/,
14031         profile_probability::operator/=): Reduce precision to adjusted
14032         and set value to guessed on contradictory divisions.
14033         (profile_probability::combine_with_freq): Remove.
14034         (profile_probability::combine_wiht_count): Declare.
14035         (profile_count::force_nonzero):: Set to adjusted.
14036         (profile_count::probability_in):: Set quality to adjusted.
14037         * tree-ssa-tail-merge.c (replace_block_by): Use
14038         combine_with_count.
14040 2018-01-23  Andrew Waterman  <andrew@sifive.com>
14041             Jim Wilson  <jimw@sifive.com>
14043         * config/riscv/riscv.c (riscv_stack_boundary): New.
14044         (riscv_option_override): Set riscv_stack_boundary.  Handle
14045         riscv_preferred_stack_boundary_arg.
14046         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14047         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14048         (STACK_BOUNDARY): Set to riscv_stack_boundary.
14049         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14050         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14051         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14053 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
14055         PR target/83905
14056         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14057         of struct ix86_frame.
14058         (ix86_expand_epilogue): Likewise.  Add a local variable for
14059         the reg_save_offset field in struct ix86_frame.
14061 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
14063         PR tree-optimization/82604
14064         * tree-loop-distribution.c (enum partition_kind): New enum item
14065         PKIND_PARTIAL_MEMSET.
14066         (partition_builtin_p): Support above new enum item.
14067         (generate_code_for_partition): Ditto.
14068         (compute_access_range): Differentiate cases that equality can be
14069         proven at all loops, the innermost loops or no loops.
14070         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14071         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
14072         (finalize_partitions, distribute_loop): Don't fuse partition of
14073         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14074         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14075         parloop is enabled.
14077 2018-01-23  Martin Liska  <mliska@suse.cz>
14079         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14080         order to ignore the predictor.
14081         (PRED_POLYMORPHIC_CALL): Likewise.
14082         (PRED_RECURSIVE_CALL): Likewise.
14084 2018-01-23  Martin Liska  <mliska@suse.cz>
14086         * tree-profile.c (tree_profiling): Print function header to
14087         aware reader which function we are working on.
14088         * value-prof.c (gimple_find_values_to_profile): Do not print
14089         not interesting value histograms.
14091 2018-01-23  Martin Liska  <mliska@suse.cz>
14093         * profile-count.h (enum profile_quality): Add
14094         profile_uninitialized as the first value. Do not number values
14095         as they are zero based.
14096         (profile_count::verify): Update sanity check.
14097         (profile_probability::verify): Likewise.
14099 2018-01-23  Nathan Sidwell  <nathan@acm.org>
14101         * doc/invoke.texi (ffor-scope): Deprecate.
14103 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14105         PR tree-optimization/83510
14106         * domwalk.c (set_all_edges_as_executable): New function.
14107         (dom_walker::dom_walker): Convert bool param
14108         "skip_unreachable_blocks" to enum reachability.  Move setup of
14109         edge flags to set_all_edges_as_executable and only do it when
14110         reachability is REACHABLE_BLOCKS.
14111         * domwalk.h (enum dom_walker::reachability): New enum.
14112         (dom_walker::dom_walker): Convert bool param
14113         "skip_unreachable_blocks" to enum reachability.
14114         (set_all_edges_as_executable): New decl.
14115         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
14116         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14117         "reachability".
14118         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14119         but converting true to REACHABLE_BLOCKS.
14120         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14121         * tree-vrp.c
14122         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14123         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14124         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14125         REACHABLE_BLOCKS.
14126         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14127         if check_all_array_refs will be called.
14129 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14131         * tree.c (selftest::test_location_wrappers): Add more test
14132         coverage.
14134 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14136         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14137         (selftest::test_bit_in_range): Likewise.
14139 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14141         PR testsuite/83888
14142         * doc/sourcebuild.texi (vect_float): Say that the selector
14143         only describes the situation when -funsafe-math-optimizations is on.
14144         (vect_float_strict): Document.
14146 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14148         PR tree-optimization/83965
14149         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14150         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14151         instead of checking only for a reduction.
14152         (vect_recog_widen_sum_pattern): Likewise.
14154 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14156         * predict.c (probably_never_executed): Only use precise profile info.
14157         (compute_function_frequency): Skip after inlining hack since we now
14158         have quality checking.
14160 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14162         * profile-count.h (profile_probability::very_unlikely,
14163         profile_probability::unlikely, profile_probability::even): Set
14164         precision to guessed.
14166 2018-01-23  Richard Biener  <rguenther@suse.de>
14168         PR tree-optimization/83963
14169         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14170         Properly terminate dominator walk when crossing the exit edge not
14171         when visiting its source block.
14173 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
14175         PR c++/83918
14176         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14177         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14179 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
14181         PR tree-optimization/83957
14182         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
14183         semicolon after for body surrounded by braces.
14185         PR tree-optimization/83081
14186         * profile-count.h (profile_probability::split): New method.
14187         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14188         Use profile_probability::split.
14189         (do_compare_rtx_and_jump): Fix adjustment of probabilities
14190         when splitting a single conditional jump into 2.
14192 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
14194         PR tree-optimization/69452
14195         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14196         decl.
14198 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14200         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14201         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14202         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14204 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14206         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14207         declaration.
14208         * config/rl78/rl78.md (movdi): New define_expand.
14209         * config/rl78/rl78.c (rl78_split_movdi): New function.
14211 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
14213         PR target/83862
14214         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14215         no longer used.
14216         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14217         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14218         128-bit to produce an UNSPEC move to get the double word with the
14219         signbit and then a shift directly to do signbit.
14220         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14221         implementation with a new version that just does either a direct
14222         move or a regular move.  Move memory interface to separate insns.
14223         Move insns so they are next to the expander.
14224         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14225         with signbit move.  Split big and little endian case.
14226         (signbit<mode>2_dm_mem_le): Likewise.
14227         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14228         (signbit<mode>2_dm2): Likewise.
14230 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14232         * config/rl78/rl78.md (anddi3): New define_expand.
14234 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14236         * config/rl78/rl78.md (umindi3): New define_expand.
14238 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14240         * config/rl78/rl78.md (smindi3): New define_expand.
14242 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14244         * config/rl78/rl78.md (smaxdi3): New define_expand.
14246 2018-01-22  Carl Love  <cel@us.ibm.com>
14248         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14249         LVX_V1TI): Add macro expansion.
14250         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14251         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14252         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14253         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14254         Change check to determine if the instruction is a byte reversing
14255         entry.  Fix typo in comment.
14256         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14257         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14258         Add def_builtin calls for new builtins.
14259         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14260         Add define_insn expansion.
14262 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14264         * config/rl78/rl78.md (umaxdi3): New define_expand.
14266 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14268         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14269         for non-QImode registers.
14271 2018-01-22  Richard Biener  <rguenther@suse.de>
14273         PR tree-optimization/83963
14274         * graphite-scop-detection.c (scop_detection::get_sese): Delay
14275         including the loop exit block.
14276         (scop_detection::merge_sese): Likewise.
14277         (scop_detection::add_scop): Do it here instead.
14279 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14281         * doc/sourcebuild.texi (arm_softfloat): Document.
14283 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
14285         PR gcc/77734
14286         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14287         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14288         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14290 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14291             David Edelsohn  <dje.gcc@gmail.com>
14293         PR target/83946
14294         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14295         Change "crset eq" to "crset 2".
14296         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14297         (*call_indirect_aix<mode>_nospec): Likewise.
14298         (*call_value_indirect_aix<mode>_nospec): Likewise.
14299         (*call_indirect_elfv2<mode>_nospec): Likewise.
14300         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14301         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14302         change assembly output from . to $.
14303         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14304         (indirect_jump<mode>_nospec): Change assembly output from . to $.
14305         (*tablejump<mode>_internal1_nospec): Likewise.
14307 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
14309         PR target/80870
14310         * config/sh/sh_optimize_sett_clrt.cc:
14311         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14313 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
14315         PR tree-optimization/83940
14316         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14317         offset_dt to vect_constant_def rather than vect_unknown_def_type.
14318         (vect_check_load_store_mask): Add a mask_dt_out parameter and
14319         use it to pass back the definition type.
14320         (vect_check_store_rhs): Likewise rhs_dt_out.
14321         (vect_build_gather_load_calls): Add a mask_dt argument and use
14322         it instead of a call to vect_is_simple_use.
14323         (vectorizable_store): Update calls to vect_check_load_store_mask
14324         and vect_check_store_rhs.  Use the dt returned by the latter instead
14325         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
14326         instead of calls to vect_is_simple_use.  Pass the scalar rather
14327         than the vector operand to vect_is_simple_use when handling
14328         second and subsequent copies of an rhs value.
14329         (vectorizable_load): Update calls to vect_check_load_store_mask
14330         and vect_build_gather_load_calls.  Use the cached mask_dt and
14331         gs_info.offset_dt instead of calls to vect_is_simple_use.
14333 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
14335         PR middle-end/83945
14336         * tree-emutls.c: Include gimplify.h.
14337         (lower_emutls_2): New function.
14338         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14339         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14340         it before further processing.
14342         PR target/83930
14343         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14344         UINTVAL (trueop1) instead of INTVAL (op1).
14346 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
14348         PR debug/81570
14349         PR debug/83728
14350         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14351         INCOMING_FRAME_SP_OFFSET if not defined.
14352         (scan_trace): Add ENTRY argument.  If true and
14353         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14354         emit a note to adjust the CFA offset.
14355         (create_cfi_notes): Adjust scan_trace callers.
14356         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14357         INCOMING_FRAME_SP_OFFSET in the CIE.
14358         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14359         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14360         Likewise.
14361         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14362         * doc/tm.texi: Regenerated.
14364 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14366         PR rtl-optimization/83147
14367         * lra-constraints.c (remove_inheritance_pseudos): Use
14368         lra_substitute_pseudo_within_insn.
14370 2018-01-19  Tom de Vries  <tom@codesourcery.com>
14371             Cesar Philippidis  <cesar@codesourcery.com>
14373         PR target/83920
14374         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14376 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
14378         PR target/83790
14379         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14380         spaces for function labels.
14382 2018-01-19  Martin Liska  <mliska@suse.cz>
14384         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14385         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14386         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14387         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14388         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14389         (PRED_CONST_RETURN): Change from 69 to 65.
14390         (PRED_NULL_RETURN): Change from 91 to 71.
14391         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14392         (PRED_LOOP_GUARD): Change from 66 to 73.
14394 2018-01-19  Martin Liska  <mliska@suse.cz>
14396         * predict.c (predict_insn_def): Add new assert.
14397         (struct branch_predictor): Change type to signed integer.
14398         (test_prediction_value_range): Amend test to cover
14399         PROB_UNINITIALIZED.
14400         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14401         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14402         (PRED_LOOP_ITERATIONS_MAX): Likewise.
14403         (PRED_LOOP_IV_COMPARE): Likewise.
14404         * predict.h (PROB_UNINITIALIZED): Define new constant.
14406 2018-01-19  Martin Liska  <mliska@suse.cz>
14408         * predict.c (dump_prediction): Add new format for
14409         analyze_brprob.py script which is enabled with -details
14410         suboption.
14411         * profile-count.h (precise_p): New function.
14413 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14415         PR tree-optimization/83922
14416         * tree-vect-loop.c (vect_verify_full_masking): Return false if
14417         there are no statements that need masking.
14418         (vect_active_double_reduction_p): New function.
14419         (vect_analyze_loop_operations): Use it when handling phis that
14420         are not in the loop header.
14422 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14424         PR tree-optimization/83914
14425         * tree-vect-loop.c (vectorizable_induction): Don't convert
14426         init_expr or apply the peeling adjustment for inductions
14427         that are nested within the vectorized loop.
14429 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14431         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14432         instead of NEG.
14434 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14436         PR sanitizer/81715
14437         PR testsuite/83882
14438         * function.h (gimplify_parameters): Add gimple_seq * argument.
14439         * function.c: Include gimple.h and options.h.
14440         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14441         for the added local temporaries if needed.
14442         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14443         if there are any parameter cleanups, wrap whole body into a
14444         try/finally with the cleanups.
14446 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
14448         PR target/82964
14449         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14450         Use GET_MODE_CLASS for scalar floating point.
14452 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14454         PR ipa/82256
14455         patch by PaX Team
14456         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14457         Fix call of call_cgraph_insertion_hooks.
14459 2018-01-18  Martin Sebor  <msebor@redhat.com>
14461         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14463 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14465         PR ipa/83619
14466         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14467         frequencies.
14469 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
14471         PR other/70268
14472         * common.opt: (-ffile-prefix-map): New option.
14473         * opts.c (common_handle_option): Defer it.
14474         * opts-global.c (handle_common_deferred_options): Handle it.
14475         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14476         * file-prefix-map.h: New file.
14477         (remap_debug_filename, add_debug_prefix_map): ...here.
14478         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14479         * final.c (debug_prefix_map, add_debug_prefix_map
14480         remap_debug_filename): Move to...
14481         * file-prefix-map.c: New file.
14482         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14483         generalize, get rid of alloca(), use strrchr() instead of strchr().
14484         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14485         Implement in terms of add_prefix_map().
14486         (remap_macro_filename, remap_debug_filename): Implement in term of
14487         remap_filename().
14488         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14489         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14490         * dbxout.c: Include file-prefix-map.h.
14491         * varasm.c: Likewise.
14492         * vmsdbgout.c: Likewise.
14493         * xcoffout.c: Likewise.
14494         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14495         * doc/cppopts.texi (-fmacro-prefix-map): Document.
14496         * doc/invoke.texi (-ffile-prefix-map): Document.
14497         (-fdebug-prefix-map): Update description.
14499 2018-01-18  Martin Liska  <mliska@suse.cz>
14501         * config/i386/i386.c (indirect_thunk_name): Document that also
14502         lfence is emitted.
14503         (output_indirect_thunk): Document why both instructions
14504         (pause and lfence) are generated.
14506 2018-01-18  Richard Biener  <rguenther@suse.de>
14508         PR tree-optimization/83887
14509         * graphite-scop-detection.c
14510         (scop_detection::get_nearest_dom_with_single_entry): Remove.
14511         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14512         (scop_detection::merge_sese): Re-implement with a flood-fill
14513         algorithm that properly finds a SESE region if it exists.
14515 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14517         PR c/61240
14518         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14519         pointer_diff optimizations use view_convert instead of convert.
14521 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14523         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14524         Generate different code for -mno-speculate-indirect-jumps.
14525         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14526         (*call_indirect_aix<mode>): Disable for
14527         -mno-speculate-indirect-jumps.
14528         (*call_indirect_aix<mode>_nospec): New define_insn.
14529         (*call_value_indirect_aix<mode>): Disable for
14530         -mno-speculate-indirect-jumps.
14531         (*call_value_indirect_aix<mode>_nospec): New define_insn.
14532         (*sibcall_nonlocal_sysv<mode>): Generate different code for
14533         -mno-speculate-indirect-jumps.
14534         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14536 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14538         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
14539         long double type, set the flags for noting the default long double
14540         type, even if we don't pass or return a long double type.
14542 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
14544         PR ipa/83051
14545         * ipa-inline.c (flatten_function): Do not overwrite final inlining
14546         failure.
14548 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
14550         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
14551         support for merge[hl].
14552         (fold_mergehl_helper): New helper function.
14553         (tree-vector-builder.h): New #include for tree_vector_builder usage.
14554         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
14555         (altivec_vmrglw_direct): Add xxmrglw insn.
14557 2018-01-17  Andrew Waterman  <andrew@sifive.com>
14559         * config/riscv/riscv.c (riscv_conditional_register_usage): If
14560         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
14562 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
14564         PR lto/83121
14565         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14566         call the lto_location_cache before reading the
14567         DECL_SOURCE_LOCATION of the types.
14569 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
14570             Richard Sandiford  <richard.sandiford@linaro.org>
14572         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14573         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14574         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14575         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14576         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14577         Add declaration.
14578         * config/aarch64/constraints.md (aarch64_movti_operand):
14579         Limit immediates.
14580         * config/aarch64/predicates.md (Uti): Add new constraint.
14582 2018-01-17 Carl Love  <cel@us.ibm.com>
14584         * config/rs6000/vsx.md (define_expand xl_len_r,
14585         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14586         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14587         lxvll.
14588         (define_expand, define_insn): Move the shift left from  the
14589         define_insn to the define_expand for lxvl and stxvl instructions.
14590         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14591         and XL_LEN_R definitions to PURE.
14593 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
14595         * config/i386/i386.c (indirect_thunk_name): Declare regno
14596         as unsigned int.  Compare regno with INVALID_REGNUM.
14597         (output_indirect_thunk): Ditto.
14598         (output_indirect_thunk_function): Ditto.
14599         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
14600         in the call to output_indirect_thunk_function.
14602 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
14604         PR middle-end/83884
14605         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14606         rather than the size of inner_type to determine the stack slot size
14607         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14609 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
14611         PR target/83546
14612         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14613         to PTA_SILVERMONT.
14615 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
14617         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14618         endian Linux systems to optionally enable multilibs for selecting
14619         the long double type if the user configured an explicit type.
14620         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14621         have no long double multilibs if not defined.
14622         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14623         warn if the user used -mabi={ieee,ibm}longdouble and we built
14624         multilibs for long double.
14625         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14626         appropriate multilib option.
14627         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14628         multilib options.
14629         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14630         for building long double multilibs.
14631         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14633 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
14635         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14636         copies.
14638         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14639         64 bits.
14640         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14641         128 bits.
14643         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14644         variables.
14646         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14647         return value.
14649 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14651         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14652         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14654 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14656         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14657         different rtl trees depending on TARGET_64BIT.
14658         (rs6000_gen_lvx): Likewise.
14660 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14662         * config/visium/visium.md (nop): Tweak comment.
14663         (hazard_nop): Likewise.
14665 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14667         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14668         -mspeculate-indirect-jumps.
14669         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14670         for -mno-speculate-indirect-jumps.
14671         (*call_indirect_elfv2<mode>_nospec): New define_insn.
14672         (*call_value_indirect_elfv2<mode>): Disable for
14673         -mno-speculate-indirect-jumps.
14674         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14675         (indirect_jump): Emit different RTL for
14676         -mno-speculate-indirect-jumps.
14677         (*indirect_jump<mode>): Disable for
14678         -mno-speculate-indirect-jumps.
14679         (*indirect_jump<mode>_nospec): New define_insn.
14680         (tablejump): Emit different RTL for
14681         -mno-speculate-indirect-jumps.
14682         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14683         (tablejumpsi_nospec): New define_expand.
14684         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14685         (tablejumpdi_nospec): New define_expand.
14686         (*tablejump<mode>_internal1): Disable for
14687         -mno-speculate-indirect-jumps.
14688         (*tablejump<mode>_internal1_nospec): New define_insn.
14689         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14690         option.
14692 2018-01-16  Artyom Skrobov tyomitch@gmail.com
14694         * caller-save.c (insert_save): Drop unnecessary parameter.  All
14695         callers updated.
14697 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14698             Richard Biener  <rguenth@suse.de>
14700         PR libgomp/83590
14701         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
14702         return early, inline manually is_gimple_sizepos.  Make sure if we
14703         call gimplify_expr we don't end up with a gimple constant.
14704         * tree.c (variably_modified_type_p): Don't return true for
14705         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
14706         * gimplify.h (is_gimple_sizepos): Remove.
14708 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14710         PR tree-optimization/83857
14711         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
14712         vectorizable_live_operation for pure SLP statements.
14713         (vectorizable_live_operation): Handle PHIs.
14715 2018-01-16  Richard Biener  <rguenther@suse.de>
14717         PR tree-optimization/83867
14718         * tree-vect-stmts.c (vect_transform_stmt): Precompute
14719         nested_in_vect_loop_p since the scalar stmt may get invalidated.
14721 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14723         PR c/83844
14724         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
14725         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
14726         If off is not INTEGER_CST, issue a may not be aligned warning
14727         rather than isn't aligned.  Use isn%'t rather than isn't.
14728         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
14729         into MULT_EXPR.
14730         <case MULT_EXPR>: Improve the case when bottom and one of the
14731         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
14732         operand, in that case check if the other operand is multiple of
14733         bottom divided by the INTEGER_CST operand.
14735 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14737         PR target/83858
14738         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
14739         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
14740         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
14741         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
14742         * config/pa/pa.c (pa_function_arg_advance): Likewise.
14743         (pa_function_arg, pa_arg_partial_bytes): Likewise.
14744         (pa_function_arg_size): New function.
14746 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14748         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
14749         in a separate statement.
14751 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14753         PR tree-optimization/83847
14754         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
14755         group gathers and scatters.
14757 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14759         PR rtl-optimization/86620
14760         * params.def (max-sched-ready-insns): Bump minimum value to 1.
14762         PR rtl-optimization/83213
14763         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
14764         to last if both are JUMP_INSNs.
14766         PR tree-optimization/83843
14767         * gimple-ssa-store-merging.c
14768         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
14769         store_immediate_info for bswap/nop orig_stores.
14771 2018-01-15  Andrew Waterman  <andrew@sifive.com>
14773         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
14774         !TARGET_MUL.
14775         <UDIV>: Increase cost if !TARGET_DIV.
14777 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
14779         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
14780         (define_attr "cr_logical_3op"): New.
14781         (cceq_ior_compare): Adjust.
14782         (cceq_ior_compare_complement): Adjust.
14783         (*cceq_rev_compare): Adjust.
14784         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
14785         (is_cracked_insn): Adjust.
14786         (insn_must_be_first_in_group): Adjust.
14787         * config/rs6000/40x.md: Adjust.
14788         * config/rs6000/440.md: Adjust.
14789         * config/rs6000/476.md: Adjust.
14790         * config/rs6000/601.md: Adjust.
14791         * config/rs6000/603.md: Adjust.
14792         * config/rs6000/6xx.md: Adjust.
14793         * config/rs6000/7450.md: Adjust.
14794         * config/rs6000/7xx.md: Adjust.
14795         * config/rs6000/8540.md: Adjust.
14796         * config/rs6000/cell.md: Adjust.
14797         * config/rs6000/e300c2c3.md: Adjust.
14798         * config/rs6000/e500mc.md: Adjust.
14799         * config/rs6000/e500mc64.md: Adjust.
14800         * config/rs6000/e5500.md: Adjust.
14801         * config/rs6000/e6500.md: Adjust.
14802         * config/rs6000/mpc.md: Adjust.
14803         * config/rs6000/power4.md: Adjust.
14804         * config/rs6000/power5.md: Adjust.
14805         * config/rs6000/power6.md: Adjust.
14806         * config/rs6000/power7.md: Adjust.
14807         * config/rs6000/power8.md: Adjust.
14808         * config/rs6000/power9.md: Adjust.
14809         * config/rs6000/rs64.md: Adjust.
14810         * config/rs6000/titan.md: Adjust.
14812 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14814         * config/i386/predicates.md (indirect_branch_operand): Rewrite
14815         ix86_indirect_branch_register logic.
14817 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14819         * config/i386/constraints.md (Bs): Update
14820         ix86_indirect_branch_register check.  Don't check
14821         ix86_indirect_branch_register with GOT_memory_operand.
14822         (Bw): Likewise.
14823         * config/i386/predicates.md (GOT_memory_operand): Don't check
14824         ix86_indirect_branch_register here.
14825         (GOT32_symbol_operand): Likewise.
14827 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14829         * config/i386/predicates.md (constant_call_address_operand):
14830         Rewrite ix86_indirect_branch_register logic.
14831         (sibcall_insn_operand): Likewise.
14833 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14835         * config/i386/constraints.md (Bs): Replace
14836         ix86_indirect_branch_thunk_register with
14837         ix86_indirect_branch_register.
14838         (Bw): Likewise.
14839         * config/i386/i386.md (indirect_jump): Likewise.
14840         (tablejump): Likewise.
14841         (*sibcall_memory): Likewise.
14842         (*sibcall_value_memory): Likewise.
14843         Peepholes of indirect call and jump via memory: Likewise.
14844         * config/i386/i386.opt: Likewise.
14845         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14846         (GOT_memory_operand): Likewise.
14847         (call_insn_operand): Likewise.
14848         (sibcall_insn_operand): Likewise.
14849         (GOT32_symbol_operand): Likewise.
14851 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
14853         PR middle-end/83837
14854         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
14855         type rather than type addr's type points to.
14856         (expand_omp_atomic_mutex): Likewise.
14857         (expand_omp_atomic): Likewise.
14859 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14861         PR target/83839
14862         * config/i386/i386.c (output_indirect_thunk_function): Use
14863         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
14864         for  __x86_return_thunk.
14866 2018-01-15  Richard Biener  <rguenther@suse.de>
14868         PR middle-end/83850
14869         * expmed.c (extract_bit_field_1): Fix typo.
14871 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14873         PR target/83687
14874         * config/arm/iterators.md (VF): New mode iterator.
14875         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
14876         Remove integer-related logic from pattern.
14877         (neon_vabd<mode>_3): Likewise.
14879 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
14881         PR middle-end/82694
14882         * common.opt (fstrict-overflow): No longer an alias.
14883         (fwrapv-pointer): New option.
14884         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
14885         also for pointer types based on flag_wrapv_pointer.
14886         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
14887         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
14888         opts->x_flag_wrapv got set.
14889         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
14890         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
14891         POINTER_TYPE_OVERFLOW_UNDEFINED.
14892         * match.pd: Likewise in address comparison pattern.
14893         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
14895 2018-01-15  Richard Biener  <rguenther@suse.de>
14897         PR lto/83804
14898         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
14899         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
14900         Reset type names to their identifier if their TYPE_DECL doesn't
14901         have linkage (and thus is used for ODR and devirt).
14902         (save_debug_info_for_decl): Remove.
14903         (save_debug_info_for_type): Likewise.
14904         (add_tree_to_fld_list): Adjust.
14905         * tree-pretty-print.c (dump_generic_node): Make dumping of
14906         type names more robust.
14908 2018-01-15  Richard Biener  <rguenther@suse.de>
14910         * BASE-VER: Bump to 8.0.1.
14912 2018-01-14  Martin Sebor  <msebor@redhat.com>
14914         PR other/83508
14915         * builtins.c (check_access): Avoid warning when the no-warning bit
14916         is set.
14918 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
14920         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
14921         * ira-color (allocno_hard_regs_compare): Likewise.
14923 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
14925         PR target/83013
14926         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
14927         Use .pushsection/.popsection.
14929 2018-01-14  Martin Sebor  <msebor@redhat.com>
14931         PR c++/81327
14932         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
14934 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
14936         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
14937         entry from extra_headers.
14938         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
14939         extra_headers, make the list bitwise identical to the i?86-*-* one.
14941 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14943         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
14944         -mcmodel=large with -mindirect-branch=thunk,
14945         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
14946         -mfunction-return=thunk-extern.
14947         * doc/invoke.texi: Document -mcmodel=large is incompatible with
14948         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
14949         -mfunction-return=thunk and -mfunction-return=thunk-extern.
14951 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14953         * config/i386/i386.c (print_reg): Print the name of the full
14954         integer register without '%'.
14955         (ix86_print_operand): Handle 'V'.
14956         * doc/extend.texi: Document 'V' modifier.
14958 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14960         * config/i386/constraints.md (Bs): Disallow memory operand for
14961         -mindirect-branch-register.
14962         (Bw): Likewise.
14963         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14964         (GOT_memory_operand): Likewise.
14965         (call_insn_operand): Likewise.
14966         (sibcall_insn_operand): Likewise.
14967         (GOT32_symbol_operand): Likewise.
14968         * config/i386/i386.md (indirect_jump): Call convert_memory_address
14969         for -mindirect-branch-register.
14970         (tablejump): Likewise.
14971         (*sibcall_memory): Likewise.
14972         (*sibcall_value_memory): Likewise.
14973         Disallow peepholes of indirect call and jump via memory for
14974         -mindirect-branch-register.
14975         (*call_pop): Replace m with Bw.
14976         (*call_value_pop): Likewise.
14977         (*sibcall_pop_memory): Replace m with Bs.
14978         * config/i386/i386.opt (mindirect-branch-register): New option.
14979         * doc/invoke.texi: Document -mindirect-branch-register option.
14981 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14983         * config/i386/i386-protos.h (ix86_output_function_return): New.
14984         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
14985         set function_return_type.
14986         (indirect_thunk_name): Add ret_p to indicate thunk for function
14987         return.
14988         (output_indirect_thunk_function): Pass false to
14989         indirect_thunk_name.
14990         (ix86_output_indirect_branch_via_reg): Likewise.
14991         (ix86_output_indirect_branch_via_push): Likewise.
14992         (output_indirect_thunk_function): Create alias for function
14993         return thunk if regno < 0.
14994         (ix86_output_function_return): New function.
14995         (ix86_handle_fndecl_attribute): Handle function_return.
14996         (ix86_attribute_table): Add function_return.
14997         * config/i386/i386.h (machine_function): Add
14998         function_return_type.
14999         * config/i386/i386.md (simple_return_internal): Use
15000         ix86_output_function_return.
15001         (simple_return_internal_long): Likewise.
15002         * config/i386/i386.opt (mfunction-return=): New option.
15003         (indirect_branch): Mention -mfunction-return=.
15004         * doc/extend.texi: Document function_return function attribute.
15005         * doc/invoke.texi: Document -mfunction-return= option.
15007 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15009         * config/i386/i386-opts.h (indirect_branch): New.
15010         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15011         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15012         with local indirect jump when converting indirect call and jump.
15013         (ix86_set_indirect_branch_type): New.
15014         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15015         (indirectlabelno): New.
15016         (indirect_thunk_needed): Likewise.
15017         (indirect_thunk_bnd_needed): Likewise.
15018         (indirect_thunks_used): Likewise.
15019         (indirect_thunks_bnd_used): Likewise.
15020         (INDIRECT_LABEL): Likewise.
15021         (indirect_thunk_name): Likewise.
15022         (output_indirect_thunk): Likewise.
15023         (output_indirect_thunk_function): Likewise.
15024         (ix86_output_indirect_branch_via_reg): Likewise.
15025         (ix86_output_indirect_branch_via_push): Likewise.
15026         (ix86_output_indirect_branch): Likewise.
15027         (ix86_output_indirect_jmp): Likewise.
15028         (ix86_code_end): Call output_indirect_thunk_function if needed.
15029         (ix86_output_call_insn): Call ix86_output_indirect_branch if
15030         needed.
15031         (ix86_handle_fndecl_attribute): Handle indirect_branch.
15032         (ix86_attribute_table): Add indirect_branch.
15033         * config/i386/i386.h (machine_function): Add indirect_branch_type
15034         and has_local_indirect_jump.
15035         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15036         to true.
15037         (tablejump): Likewise.
15038         (*indirect_jump): Use ix86_output_indirect_jmp.
15039         (*tablejump_1): Likewise.
15040         (simple_return_indirect_internal): Likewise.
15041         * config/i386/i386.opt (mindirect-branch=): New option.
15042         (indirect_branch): New.
15043         (keep): Likewise.
15044         (thunk): Likewise.
15045         (thunk-inline): Likewise.
15046         (thunk-extern): Likewise.
15047         * doc/extend.texi: Document indirect_branch function attribute.
15048         * doc/invoke.texi: Document -mindirect-branch= option.
15050 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
15052         PR ipa/83051
15053         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15055 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
15057         * ipa-inline.c (want_inline_small_function_p): Return false if
15058         inlining has already failed with CIF_FINAL_ERROR.
15059         (update_caller_keys): Call want_inline_small_function_p before
15060         can_inline_edge_p.
15061         (update_callee_keys): Likewise.
15063 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15065         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15066         New function.
15067         (rs6000_quadword_masked_address_p): Likewise.
15068         (quad_aligned_load_p): Likewise.
15069         (quad_aligned_store_p): Likewise.
15070         (const_load_sequence_p): Add comment to describe the outer-most loop.
15071         (mimic_memory_attributes_and_flags): New function.
15072         (rs6000_gen_stvx): Likewise.
15073         (replace_swapped_aligned_store): Likewise.
15074         (rs6000_gen_lvx): Likewise.
15075         (replace_swapped_aligned_load): Likewise.
15076         (replace_swapped_load_constant): Capitalize argument name in
15077         comment describing this function.
15078         (rs6000_analyze_swaps): Add a third pass to search for vector loads
15079         and stores that access quad-word aligned addresses and replace
15080         with stvx or lvx instructions when appropriate.
15081         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15082         New function prototype.
15083         (rs6000_quadword_masked_address_p): Likewise.
15084         (rs6000_gen_lvx): Likewise.
15085         (rs6000_gen_stvx): Likewise.
15086         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15087         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15088         when memory address is aligned.
15089         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15090         this split to select lvx instruction when memory address is aligned.
15091         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15092         instruction when memory address is aligned.
15093         (*vsx_le_perm_load_v16qi): Likewise.
15094         (four unnamed splitters): Modify to select the stvx instruction
15095         when memory is aligned.
15097 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
15099         * predict.c (determine_unlikely_bbs): Handle correctly BBs
15100         which appears in the queue multiple times.
15102 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15103             Alan Hayward  <alan.hayward@arm.com>
15104             David Sherwood  <david.sherwood@arm.com>
15106         * tree-vectorizer.h (vec_lower_bound): New structure.
15107         (_loop_vec_info): Add check_nonzero and lower_bounds.
15108         (LOOP_VINFO_CHECK_NONZERO): New macro.
15109         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15110         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15111         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15112         fields.  Make seg_len the distance travelled, not including the
15113         access size.
15114         (dr_direction_indicator): Declare.
15115         (dr_zero_step_indicator): Likewise.
15116         (dr_known_forward_stride_p): Likewise.
15117         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15118         tree-ssanames.h.
15119         (runtime_alias_check_p): Allow runtime alias checks with
15120         variable strides.
15121         (operator ==): Compare access_size and align.
15122         (prune_runtime_alias_test_list): Rework for new distinction between
15123         the access_size and seg_len.
15124         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
15125         segment lengths.
15126         (get_segment_min_max): New function.
15127         (create_intersect_range_checks): Use it.
15128         (dr_step_indicator): New function.
15129         (dr_direction_indicator): Likewise.
15130         (dr_zero_step_indicator): Likewise.
15131         (dr_known_forward_stride_p): Likewise.
15132         * tree-loop-distribution.c (data_ref_segment_size): Return
15133         DR_STEP * (niters - 1).
15134         (compute_alias_check_pairs): Update call to the dr_with_seg_len
15135         constructor.
15136         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15137         (vect_preserves_scalar_order_p): New function, split out from...
15138         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
15139         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15140         (vect_vfa_access_size): New function.
15141         (vect_vfa_align): Likewise.
15142         (vect_compile_time_alias): Take access_size_a and access_b arguments.
15143         (dump_lower_bound): New function.
15144         (vect_check_lower_bound): Likewise.
15145         (vect_small_gap_p): Likewise.
15146         (vectorizable_with_step_bound_p): Likewise.
15147         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15148         depencies if the vectorization factor is 1.  Convert the checks
15149         for nonzero steps into checks on the bounds of DR_STEP.  Try using
15150         a bunds check for variable steps if the minimum required step is
15151         relatively small. Update calls to the dr_with_seg_len
15152         constructor and to vect_compile_time_alias.
15153         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15154         function.
15155         (vect_loop_versioning): Call it.
15156         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15157         when retrying.
15158         (vect_estimate_min_profitable_iters): Account for any bounds checks.
15160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15161             Alan Hayward  <alan.hayward@arm.com>
15162             David Sherwood  <david.sherwood@arm.com>
15164         * doc/sourcebuild.texi (vect_scatter_store): Document.
15165         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15166         optabs.
15167         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15168         Document.
15169         * genopinit.c (main): Add supports_vec_scatter_store and
15170         supports_vec_scatter_store_cached to target_optabs.
15171         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15172         IFN_MASK_SCATTER_STORE.
15173         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15174         functions.
15175         * internal-fn.h (internal_store_fn_p): Declare.
15176         (internal_fn_stored_value_index): Likewise.
15177         * internal-fn.c (scatter_store_direct): New macro.
15178         (expand_scatter_store_optab_fn): New function.
15179         (direct_scatter_store_optab_supported_p): New macro.
15180         (internal_store_fn_p): New function.
15181         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15182         IFN_MASK_SCATTER_STORE.
15183         (internal_fn_mask_index): Likewise.
15184         (internal_fn_stored_value_index): New function.
15185         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15186         for scatter stores.
15187         * optabs-query.h (supports_vec_scatter_store_p): Declare.
15188         * optabs-query.c (supports_vec_scatter_store_p): New function.
15189         * tree-vectorizer.h (vect_get_store_rhs): Declare.
15190         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15191         true for scatter stores.
15192         (vect_gather_scatter_fn_p): Handle scatter stores too.
15193         (vect_check_gather_scatter): Consider using scatter stores if
15194         supports_vec_scatter_store_p.
15195         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15196         scatter stores too.
15197         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15198         internal_fn_stored_value_index.
15199         (check_load_store_masking): Handle scatter stores too.
15200         (vect_get_store_rhs): Make public.
15201         (vectorizable_call): Use internal_store_fn_p.
15202         (vectorizable_store): Handle scatter store internal functions.
15203         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15204         when deciding whether the end of the group has been reached.
15205         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15206         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15207         (mask_scatter_store<mode>): New insns.
15209 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15210             Alan Hayward  <alan.hayward@arm.com>
15211             David Sherwood  <david.sherwood@arm.com>
15213         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15214         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15215         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15216         function.
15217         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15218         Use vect_truncate_gather_scatter_offset if we can't treat the
15219         operation as a normal gather load or scatter store.
15220         (get_group_load_store_type): Take the gather_scatter_info
15221         as argument.  Try using a gather load or scatter store for
15222         single-element groups.
15223         (get_load_store_type): Update calls to get_group_load_store_type
15224         and vect_use_strided_gather_scatters_p.
15226 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15227             Alan Hayward  <alan.hayward@arm.com>
15228             David Sherwood  <david.sherwood@arm.com>
15230         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15231         optional tree argument.
15232         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15233         null target hooks.
15234         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15235         but continue to use the current value as a fallback.
15236         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15237         to compare the updates.
15238         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15239         (get_load_store_type): Use it when handling a strided access.
15240         (vect_get_strided_load_store_ops): New function.
15241         (vect_get_data_ptr_increment): Likewise.
15242         (vectorizable_load): Handle strided gather loads.  Always pass
15243         a step to vect_create_data_ref_ptr and bump_vector_ptr.
15245 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15246             Alan Hayward  <alan.hayward@arm.com>
15247             David Sherwood  <david.sherwood@arm.com>
15249         * doc/md.texi (gather_load@var{m}): Document.
15250         (mask_gather_load@var{m}): Likewise.
15251         * genopinit.c (main): Add supports_vec_gather_load and
15252         supports_vec_gather_load_cached to target_optabs.
15253         * optabs-tree.c (init_tree_optimization_optabs): Use
15254         ggc_cleared_alloc to allocate target_optabs.
15255         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15256         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15257         functions.
15258         * internal-fn.h (internal_load_fn_p): Declare.
15259         (internal_gather_scatter_fn_p): Likewise.
15260         (internal_fn_mask_index): Likewise.
15261         (internal_gather_scatter_fn_supported_p): Likewise.
15262         * internal-fn.c (gather_load_direct): New macro.
15263         (expand_gather_load_optab_fn): New function.
15264         (direct_gather_load_optab_supported_p): New macro.
15265         (direct_internal_fn_optab): New function.
15266         (internal_load_fn_p): Likewise.
15267         (internal_gather_scatter_fn_p): Likewise.
15268         (internal_fn_mask_index): Likewise.
15269         (internal_gather_scatter_fn_supported_p): Likewise.
15270         * optabs-query.c (supports_at_least_one_mode_p): New function.
15271         (supports_vec_gather_load_p): Likewise.
15272         * optabs-query.h (supports_vec_gather_load_p): Declare.
15273         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15274         and memory_type field.
15275         (NUM_PATTERNS): Bump to 15.
15276         * tree-vect-data-refs.c: Include internal-fn.h.
15277         (vect_gather_scatter_fn_p): New function.
15278         (vect_describe_gather_scatter_call): Likewise.
15279         (vect_check_gather_scatter): Try using internal functions for
15280         gather loads.  Recognize existing calls to a gather load function.
15281         (vect_analyze_data_refs): Consider using gather loads if
15282         supports_vec_gather_load_p.
15283         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15284         (vect_get_gather_scatter_offset_type): Likewise.
15285         (vect_convert_mask_for_vectype): Likewise.
15286         (vect_add_conversion_to_patterm): Likewise.
15287         (vect_try_gather_scatter_pattern): Likewise.
15288         (vect_recog_gather_scatter_pattern): New pattern recognizer.
15289         (vect_vect_recog_func_ptrs): Add it.
15290         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15291         internal_fn_mask_index and internal_gather_scatter_fn_p.
15292         (check_load_store_masking): Take the gather_scatter_info as an
15293         argument and handle gather loads.
15294         (vect_get_gather_scatter_ops): New function.
15295         (vectorizable_call): Check internal_load_fn_p.
15296         (vectorizable_load): Likewise.  Handle gather load internal
15297         functions.
15298         (vectorizable_store): Update call to check_load_store_masking.
15299         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15300         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15301         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15302         (aarch64_gather_scale_operand_d): New predicates.
15303         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15304         (mask_gather_load<mode>): New insns.
15306 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15307             Alan Hayward  <alan.hayward@arm.com>
15308             David Sherwood  <david.sherwood@arm.com>
15310         * optabs.def (fold_left_plus_optab): New optab.
15311         * doc/md.texi (fold_left_plus_@var{m}): Document.
15312         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15313         * internal-fn.c (fold_left_direct): Define.
15314         (expand_fold_left_optab_fn): Likewise.
15315         (direct_fold_left_optab_supported_p): Likewise.
15316         * fold-const-call.c (fold_const_fold_left): New function.
15317         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15318         * tree-parloops.c (valid_reduction_p): New function.
15319         (gather_scalar_reductions): Use it.
15320         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15321         (vect_finish_replace_stmt): Declare.
15322         * tree-vect-loop.c (fold_left_reduction_fn): New function.
15323         (needs_fold_left_reduction_p): New function, split out from...
15324         (vect_is_simple_reduction): ...here.  Accept reductions that
15325         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15326         (vect_force_simple_reduction): Also store the reduction type in
15327         the assignment's STMT_VINFO_REDUC_TYPE.
15328         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15329         (merge_with_identity): New function.
15330         (vect_expand_fold_left): Likewise.
15331         (vectorize_fold_left_reduction): Likewise.
15332         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
15333         scalar phi in place for it.  Check for target support and reject
15334         cases that would reassociate the operation.  Defer the transform
15335         phase to vectorize_fold_left_reduction.
15336         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15337         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15338         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15340 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15342         * tree-if-conv.c (predicate_mem_writes): Remove redundant
15343         call to ifc_temp_var.
15345 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15346             Alan Hayward  <alan.hayward@arm.com>
15347             David Sherwood  <david.sherwood@arm.com>
15349         * target.def (legitimize_address_displacement): Take the original
15350         offset as a poly_int.
15351         * targhooks.h (default_legitimize_address_displacement): Update
15352         accordingly.
15353         * targhooks.c (default_legitimize_address_displacement): Likewise.
15354         * doc/tm.texi: Regenerate.
15355         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15356         as an argument, moving assert of ad->disp == ad->disp_term to...
15357         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
15358         Try calling targetm.legitimize_address_displacement before expanding
15359         the address rather than afterwards, and adjust for the new interface.
15360         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15361         Match the new hook interface.  Handle SVE addresses.
15362         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15363         new hook interface.
15365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15367         * Makefile.in (OBJS): Add early-remat.o.
15368         * target.def (select_early_remat_modes): New hook.
15369         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15370         * doc/tm.texi: Regenerate.
15371         * targhooks.h (default_select_early_remat_modes): Declare.
15372         * targhooks.c (default_select_early_remat_modes): New function.
15373         * timevar.def (TV_EARLY_REMAT): New timevar.
15374         * passes.def (pass_early_remat): New pass.
15375         * tree-pass.h (make_pass_early_remat): Declare.
15376         * early-remat.c: New file.
15377         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15378         function.
15379         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15381 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15382             Alan Hayward  <alan.hayward@arm.com>
15383             David Sherwood  <david.sherwood@arm.com>
15385         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15386         vfm1 with a bound_epilog parameter.
15387         (vect_do_peeling): Update calls accordingly, and move the prologue
15388         call earlier in the function.  Treat the base bound_epilog as 0 for
15389         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
15390         this base when peeling for gaps.
15391         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15392         with fully-masked loops.
15393         (vect_estimate_min_profitable_iters): Handle the single peeled
15394         iteration in that case.
15396 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15397             Alan Hayward  <alan.hayward@arm.com>
15398             David Sherwood  <david.sherwood@arm.com>
15400         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15401         single-element interleaving even if the size is not a power of 2.
15402         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15403         accesses for single-element interleaving if the group size is
15404         not a power of 2.
15406 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15407             Alan Hayward  <alan.hayward@arm.com>
15408             David Sherwood  <david.sherwood@arm.com>
15410         * doc/md.texi (fold_extract_last_@var{m}): Document.
15411         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15412         * optabs.def (fold_extract_last_optab): New optab.
15413         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15414         * internal-fn.c (fold_extract_direct): New macro.
15415         (expand_fold_extract_optab_fn): Likewise.
15416         (direct_fold_extract_optab_supported_p): Likewise.
15417         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15418         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15419         EXTRACT_LAST_REDUCTION.
15420         (get_initial_def_for_reduction): Do not create an initial vector
15421         for EXTRACT_LAST_REDUCTION reductions.
15422         (vectorizable_reduction): Leave the scalar phi in place for
15423         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
15424         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
15425         epilogue code for EXTRACT_LAST_REDUCTION and defer the
15426         transform phase to vectorizable_condition.
15427         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15428         split out from...
15429         (vect_finish_stmt_generation): ...here.
15430         (vect_finish_replace_stmt): New function.
15431         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15432         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15433         pattern.
15434         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15436 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15437             Alan Hayward  <alan.hayward@arm.com>
15438             David Sherwood  <david.sherwood@arm.com>
15440         * doc/md.texi (extract_last_@var{m}): Document.
15441         * optabs.def (extract_last_optab): New optab.
15442         * internal-fn.def (EXTRACT_LAST): New internal function.
15443         * internal-fn.c (cond_unary_direct): New macro.
15444         (expand_cond_unary_optab_fn): Likewise.
15445         (direct_cond_unary_optab_supported_p): Likewise.
15446         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15447         loops using EXTRACT_LAST.
15448         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15449         (extract_last_<mode>): ...this optab.
15450         (vec_extract<mode><Vel>): Update accordingly.
15452 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15453             Alan Hayward  <alan.hayward@arm.com>
15454             David Sherwood  <david.sherwood@arm.com>
15456         * target.def (empty_mask_is_expensive): New hook.
15457         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15458         * doc/tm.texi: Regenerate.
15459         * targhooks.h (default_empty_mask_is_expensive): Declare.
15460         * targhooks.c (default_empty_mask_is_expensive): New function.
15461         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15462         if the target says that empty masks are expensive.
15463         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15464         New function.
15465         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15468             Alan Hayward  <alan.hayward@arm.com>
15469             David Sherwood  <david.sherwood@arm.com>
15471         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15472         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15473         (vect_use_loop_mask_for_alignment_p): New function.
15474         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15475         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15476         niters_skip argument.  Make sure that the first niters_skip elements
15477         of the first iteration are inactive.
15478         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15479         Update call to vect_set_loop_masks_directly.
15480         (get_misalign_in_elems): New function, split out from...
15481         (vect_gen_prolog_loop_niters): ...here.
15482         (vect_update_init_of_dr): Take a code argument that specifies whether
15483         the adjustment should be added or subtracted.
15484         (vect_update_init_of_drs): Likewise.
15485         (vect_prepare_for_masked_peels): New function.
15486         (vect_do_peeling): Skip prologue peeling if we're using a mask
15487         instead.  Update call to vect_update_inits_of_drs.
15488         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15489         mask_skip_niters.
15490         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15491         alignment.  Do not include the number of peeled iterations in
15492         the minimum threshold in that case.
15493         (vectorizable_induction): Adjust the start value down by
15494         LOOP_VINFO_MASK_SKIP_NITERS iterations.
15495         (vect_transform_loop): Call vect_prepare_for_masked_peels.
15496         Take the number of skipped iterations into account when calculating
15497         the loop bounds.
15498         * tree-vect-stmts.c (vect_gen_while_not): New function.
15500 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15501             Alan Hayward  <alan.hayward@arm.com>
15502             David Sherwood  <david.sherwood@arm.com>
15504         * doc/sourcebuild.texi (vect_fully_masked): Document.
15505         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15506         default value to 0.
15507         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15508         split out from...
15509         (vect_analyze_loop_2): ...here. Don't check the vectorization
15510         factor against the number of loop iterations if the loop is
15511         fully-masked.
15513 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15514             Alan Hayward  <alan.hayward@arm.com>
15515             David Sherwood  <david.sherwood@arm.com>
15517         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15518         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15519         (dump_groups): Update accordingly.
15520         (iv_use::mem_type): New member variable.
15521         (address_p): New function.
15522         (record_use): Add a mem_type argument and initialize the new
15523         mem_type field.
15524         (record_group_use): Add a mem_type argument.  Use address_p.
15525         Remove obsolete null checks of base_object.  Update call to record_use.
15526         (find_interesting_uses_op): Update call to record_group_use.
15527         (find_interesting_uses_cond): Likewise.
15528         (find_interesting_uses_address): Likewise.
15529         (get_mem_type_for_internal_fn): New function.
15530         (find_address_like_use): Likewise.
15531         (find_interesting_uses_stmt): Try find_address_like_use before
15532         calling find_interesting_uses_op.
15533         (addr_offset_valid_p): Use the iv mem_type field as the type
15534         of the addressed memory.
15535         (add_autoinc_candidates): Likewise.
15536         (get_address_cost): Likewise.
15537         (split_small_address_groups_p): Use address_p.
15538         (split_address_groups): Likewise.
15539         (add_iv_candidate_for_use): Likewise.
15540         (autoinc_possible_for_pair): Likewise.
15541         (rewrite_groups): Likewise.
15542         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
15543         (determine_group_iv_cost): Update after split of USE_ADDRESS.
15544         (get_alias_ptr_type_for_ptr_address): New function.
15545         (rewrite_use_address): Rewrite address uses in calls that were
15546         identified by find_address_like_use.
15548 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15549             Alan Hayward  <alan.hayward@arm.com>
15550             David Sherwood  <david.sherwood@arm.com>
15552         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
15553         TARGET_MEM_REFs.
15554         * gimple-expr.h (is_gimple_addressable: Likewise.
15555         * gimple-expr.c (is_gimple_address): Likewise.
15556         * internal-fn.c (expand_call_mem_ref): New function.
15557         (expand_mask_load_optab_fn): Use it.
15558         (expand_mask_store_optab_fn): Likewise.
15560 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15561             Alan Hayward  <alan.hayward@arm.com>
15562             David Sherwood  <david.sherwood@arm.com>
15564         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15565         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15566         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15567         (cond_umax@var{mode}): Document.
15568         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15569         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15570         (cond_umin_optab, cond_umax_optab): New optabs.
15571         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15572         (COND_IOR, COND_XOR): New internal functions.
15573         * internal-fn.h (get_conditional_internal_fn): Declare.
15574         * internal-fn.c (cond_binary_direct): New macro.
15575         (expand_cond_binary_optab_fn): Likewise.
15576         (direct_cond_binary_optab_supported_p): Likewise.
15577         (get_conditional_internal_fn): New function.
15578         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15579         Cope with reduction statements that are vectorized as calls rather
15580         than assignments.
15581         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15582         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15583         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15584         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15585         (UNSPEC_COND_EOR): New unspecs.
15586         (optab): Add mappings for them.
15587         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15588         (sve_int_op, sve_fp_op): New int attributes.
15590 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15591             Alan Hayward  <alan.hayward@arm.com>
15592             David Sherwood  <david.sherwood@arm.com>
15594         * optabs.def (while_ult_optab): New optab.
15595         * doc/md.texi (while_ult@var{m}@var{n}): Document.
15596         * internal-fn.def (WHILE_ULT): New internal function.
15597         * internal-fn.h (direct_internal_fn_supported_p): New override
15598         that takes two types as argument.
15599         * internal-fn.c (while_direct): New macro.
15600         (expand_while_optab_fn): New function.
15601         (convert_optab_supported_p): Likewise.
15602         (direct_while_optab_supported_p): New macro.
15603         * wide-int.h (wi::udiv_ceil): New function.
15604         * tree-vectorizer.h (rgroup_masks): New structure.
15605         (vec_loop_masks): New typedef.
15606         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15607         and fully_masked_p.
15608         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15609         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15610         (vect_max_vf): New function.
15611         (slpeel_make_loop_iterate_ntimes): Delete.
15612         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15613         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15614         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15615         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15616         internal-fn.h, stor-layout.h and optabs-query.h.
15617         (vect_set_loop_mask): New function.
15618         (add_preheader_seq): Likewise.
15619         (add_header_seq): Likewise.
15620         (interleave_supported_p): Likewise.
15621         (vect_maybe_permute_loop_masks): Likewise.
15622         (vect_set_loop_masks_directly): Likewise.
15623         (vect_set_loop_condition_masked): Likewise.
15624         (vect_set_loop_condition_unmasked): New function, split out from
15625         slpeel_make_loop_iterate_ntimes.
15626         (slpeel_make_loop_iterate_ntimes): Rename to..
15627         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
15628         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15629         (vect_do_peeling): Update call accordingly.
15630         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15631         loops.
15632         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15633         mask_compare_type, can_fully_mask_p and fully_masked_p.
15634         (release_vec_loop_masks): New function.
15635         (_loop_vec_info): Use it to free the loop masks.
15636         (can_produce_all_loop_masks_p): New function.
15637         (vect_get_max_nscalars_per_iter): Likewise.
15638         (vect_verify_full_masking): Likewise.
15639         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15640         retries, and free the mask rgroups before retrying.  Check loop-wide
15641         reasons for disallowing fully-masked loops.  Make the final decision
15642         about whether use a fully-masked loop or not.
15643         (vect_estimate_min_profitable_iters): Do not assume that peeling
15644         for the number of iterations will be needed for fully-masked loops.
15645         (vectorizable_reduction): Disable fully-masked loops.
15646         (vectorizable_live_operation): Likewise.
15647         (vect_halve_mask_nunits): New function.
15648         (vect_double_mask_nunits): Likewise.
15649         (vect_record_loop_mask): Likewise.
15650         (vect_get_loop_mask): Likewise.
15651         (vect_transform_loop): Handle the case in which the final loop
15652         iteration might handle a partial vector.  Call vect_set_loop_condition
15653         instead of slpeel_make_loop_iterate_ntimes.
15654         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15655         (check_load_store_masking): New function.
15656         (prepare_load_store_mask): Likewise.
15657         (vectorizable_store): Handle fully-masked loops.
15658         (vectorizable_load): Likewise.
15659         (supportable_widening_operation): Use vect_halve_mask_nunits for
15660         booleans.
15661         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15662         (vect_gen_while): New function.
15663         * config/aarch64/aarch64.md (umax<mode>3): New expander.
15664         (aarch64_uqdec<mode>): New insn.
15666 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15667             Alan Hayward  <alan.hayward@arm.com>
15668             David Sherwood  <david.sherwood@arm.com>
15670         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15671         (reduc_xor_scal_optab): New optabs.
15672         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15673         (reduc_xor_scal_@var{m}): Document.
15674         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15675         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15676         internal functions.
15677         * fold-const-call.c (fold_const_call): Handle them.
15678         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15679         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15680         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15681         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15682         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15683         (UNSPEC_XORV): New unspecs.
15684         (optab): Add entries for them.
15685         (BITWISEV): New int iterator.
15686         (bit_reduc_op): New int attributes.
15688 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15689             Alan Hayward  <alan.hayward@arm.com>
15690             David Sherwood  <david.sherwood@arm.com>
15692         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15693         * internal-fn.def (VEC_SHL_INSERT): New internal function.
15694         * optabs.def (vec_shl_insert_optab): New optab.
15695         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15696         (duplicate_and_interleave): Likewise.
15697         * tree-vect-loop.c: Include internal-fn.h.
15698         (neutral_op_for_slp_reduction): New function, split out from
15699         get_initial_defs_for_reduction.
15700         (get_initial_def_for_reduction): Handle option 2 for variable-length
15701         vectors by loading the neutral value into a vector and then shifting
15702         the initial value into element 0.
15703         (get_initial_defs_for_reduction): Replace the code argument with
15704         the neutral value calculated by neutral_op_for_slp_reduction.
15705         Use gimple_build_vector for constant-length vectors.
15706         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
15707         but the first group_size elements have a neutral value.
15708         Use duplicate_and_interleave otherwise.
15709         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
15710         Update call to get_initial_defs_for_reduction.  Handle SLP
15711         reductions for variable-length vectors by creating one vector
15712         result for each scalar result, with the elements associated
15713         with other scalar results stubbed out with the neutral value.
15714         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
15715         Require IFN_VEC_SHL_INSERT for double reductions on
15716         variable-length vectors, or SLP reductions that have
15717         a neutral value.  Require can_duplicate_and_interleave_p
15718         support for variable-length unchained SLP reductions if there
15719         is no neutral value, such as for MIN/MAX reductions.  Also require
15720         the number of vector elements to be a multiple of the number of
15721         SLP statements when doing variable-length unchained SLP reductions.
15722         Update call to vect_create_epilog_for_reduction.
15723         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
15724         and remove initial values.
15725         (duplicate_and_interleave): Make public.
15726         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
15727         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
15729 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15730             Alan Hayward  <alan.hayward@arm.com>
15731             David Sherwood  <david.sherwood@arm.com>
15733         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
15734         (can_duplicate_and_interleave_p): New function.
15735         (vect_get_and_check_slp_defs): Take the vector of statements
15736         rather than just the current one.  Remove excess parentheses.
15737         Restriction rejectinon of vect_constant_def and vect_external_def
15738         for variable-length vectors to boolean types, or types for which
15739         can_duplicate_and_interleave_p is false.
15740         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
15741         (duplicate_and_interleave): New function.
15742         (vect_get_constant_vectors): Use gimple_build_vector for
15743         constant-length vectors and suitable variable-length constant
15744         vectors.  Use duplicate_and_interleave for other variable-length
15745         vectors.  Don't defer the update when inserting new statements.
15747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15748             Alan Hayward  <alan.hayward@arm.com>
15749             David Sherwood  <david.sherwood@arm.com>
15751         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
15752         min_profitable_iters doesn't go negative.
15754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15755             Alan Hayward  <alan.hayward@arm.com>
15756             David Sherwood  <david.sherwood@arm.com>
15758         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
15759         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
15760         * optabs.def (vec_mask_load_lanes_optab): New optab.
15761         (vec_mask_store_lanes_optab): Likewise.
15762         * internal-fn.def (MASK_LOAD_LANES): New internal function.
15763         (MASK_STORE_LANES): Likewise.
15764         * internal-fn.c (mask_load_lanes_direct): New macro.
15765         (mask_store_lanes_direct): Likewise.
15766         (expand_mask_load_optab_fn): Handle masked operations.
15767         (expand_mask_load_lanes_optab_fn): New macro.
15768         (expand_mask_store_optab_fn): Handle masked operations.
15769         (expand_mask_store_lanes_optab_fn): New macro.
15770         (direct_mask_load_lanes_optab_supported_p): Likewise.
15771         (direct_mask_store_lanes_optab_supported_p): Likewise.
15772         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
15773         parameter.
15774         (vect_load_lanes_supported): Likewise.
15775         * tree-vect-data-refs.c (strip_conversion): New function.
15776         (can_group_stmts_p): Likewise.
15777         (vect_analyze_data_ref_accesses): Use it instead of checking
15778         for a pair of assignments.
15779         (vect_store_lanes_supported): Take a masked_p parameter.
15780         (vect_load_lanes_supported): Likewise.
15781         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
15782         vect_store_lanes_supported and vect_load_lanes_supported.
15783         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15784         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
15785         parameter.  Don't allow gaps for masked accesses.
15786         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
15787         and vect_load_lanes_supported.
15788         (get_load_store_type): Take a masked_p parameter and update
15789         call to get_group_load_store_type.
15790         (vectorizable_store): Update call to get_load_store_type.
15791         Handle IFN_MASK_STORE_LANES.
15792         (vectorizable_load): Update call to get_load_store_type.
15793         Handle IFN_MASK_LOAD_LANES.
15795 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15796             Alan Hayward  <alan.hayward@arm.com>
15797             David Sherwood  <david.sherwood@arm.com>
15799         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
15800         modes for SVE.
15801         * config/aarch64/aarch64-protos.h
15802         (aarch64_sve_struct_memory_operand_p): Declare.
15803         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
15804         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
15805         (VPRED, vpred): Handle SVE structure modes.
15806         * config/aarch64/constraints.md (Utx): New constraint.
15807         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
15808         (aarch64_sve_struct_nonimmediate_operand): New predicates.
15809         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
15810         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
15811         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
15812         structure modes.  Split into pieces after RA.
15813         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
15814         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
15815         New patterns.
15816         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
15817         SVE structure modes.
15818         (aarch64_classify_address): Likewise.
15819         (sizetochar): Move earlier in file.
15820         (aarch64_print_operand): Handle SVE register lists.
15821         (aarch64_array_mode): New function.
15822         (aarch64_sve_struct_memory_operand_p): Likewise.
15823         (TARGET_ARRAY_MODE): Redefine.
15825 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15826             Alan Hayward  <alan.hayward@arm.com>
15827             David Sherwood  <david.sherwood@arm.com>
15829         * target.def (array_mode): New target hook.
15830         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
15831         * doc/tm.texi: Regenerate.
15832         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
15833         * hooks.c (hook_optmode_mode_uhwi_none): New function.
15834         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
15835         targetm.array_mode.
15836         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
15837         type sizes.
15839 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15840             Alan Hayward  <alan.hayward@arm.com>
15841             David Sherwood  <david.sherwood@arm.com>
15843         * fold-const.c (fold_binary_loc): Check the argument types
15844         rather than the result type when testing for a vector operation.
15846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15848         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
15849         * doc/tm.texi: Regenerate.
15851 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15852             Alan Hayward  <alan.hayward@arm.com>
15853             David Sherwood  <david.sherwood@arm.com>
15855         * doc/invoke.texi (-msve-vector-bits=): Document new option.
15856         (sve): Document new AArch64 extension.
15857         * doc/md.texi (w): Extend the description of the AArch64
15858         constraint to include SVE vectors.
15859         (Upl, Upa): Document new AArch64 predicate constraints.
15860         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
15861         enum.
15862         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
15863         (msve-vector-bits=): New option.
15864         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
15865         SVE when these are disabled.
15866         (sve): New extension.
15867         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
15868         modes.  Adjust their number of units based on aarch64_sve_vg.
15869         (MAX_BITSIZE_MODE_ANY_MODE): Define.
15870         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
15871         aarch64_addr_query_type.
15872         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
15873         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
15874         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
15875         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
15876         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
15877         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
15878         (aarch64_simd_imm_zero_p): Delete.
15879         (aarch64_check_zero_based_sve_index_immediate): Declare.
15880         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15881         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15882         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15883         (aarch64_sve_float_mul_immediate_p): Likewise.
15884         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15885         rather than an rtx.
15886         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
15887         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
15888         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
15889         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
15890         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
15891         (aarch64_regmode_natural_size): Likewise.
15892         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
15893         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
15894         left one place.
15895         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
15896         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
15897         for VG and the SVE predicate registers.
15898         (V_ALIASES): Add a "z"-prefixed alias.
15899         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
15900         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
15901         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
15902         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
15903         (REG_CLASS_NAMES): Add entries for them.
15904         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
15905         and the predicate registers.
15906         (aarch64_sve_vg): Declare.
15907         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
15908         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
15909         (REGMODE_NATURAL_SIZE): Define.
15910         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
15911         SVE macros.
15912         * config/aarch64/aarch64.c: Include cfgrtl.h.
15913         (simd_immediate_info): Add a constructor for series vectors,
15914         and an associated step field.
15915         (aarch64_sve_vg): New variable.
15916         (aarch64_dbx_register_number): Handle VG and the predicate registers.
15917         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
15918         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
15919         (VEC_ANY_DATA, VEC_STRUCT): New constants.
15920         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
15921         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
15922         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
15923         (aarch64_get_mask_mode): New functions.
15924         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
15925         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
15926         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
15927         predicate modes and predicate registers.  Explicitly restrict
15928         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
15929         to store a vector mode if it is recognized by
15930         aarch64_classify_vector_mode.
15931         (aarch64_regmode_natural_size): New function.
15932         (aarch64_hard_regno_caller_save_mode): Return the original mode
15933         for predicates.
15934         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
15935         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
15936         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
15937         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
15938         functions.
15939         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
15940         does not overlap dest if the function is frame-related.  Handle
15941         SVE constants.
15942         (aarch64_split_add_offset): New function.
15943         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
15944         them aarch64_add_offset.
15945         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
15946         and update call to aarch64_sub_sp.
15947         (aarch64_add_cfa_expression): New function.
15948         (aarch64_expand_prologue): Pass extra temporary registers to the
15949         functions above.  Handle the case in which we need to emit new
15950         DW_CFA_expressions for registers that were originally saved
15951         relative to the stack pointer, but now have to be expressed
15952         relative to the frame pointer.
15953         (aarch64_output_mi_thunk): Pass extra temporary registers to the
15954         functions above.
15955         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
15956         IP0 and IP1 values for SVE frames.
15957         (aarch64_expand_vec_series): New function.
15958         (aarch64_expand_sve_widened_duplicate): Likewise.
15959         (aarch64_expand_sve_const_vector): Likewise.
15960         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
15961         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
15962         into the register, rather than emitting a SET directly.
15963         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
15964         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
15965         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
15966         (offset_9bit_signed_scaled_p): New functions.
15967         (aarch64_replicate_bitmask_imm): New function.
15968         (aarch64_bitmask_imm): Use it.
15969         (aarch64_cannot_force_const_mem): Reject expressions involving
15970         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
15971         (aarch64_classify_index): Handle SVE indices, by requiring
15972         a plain register index with a scale that matches the element size.
15973         (aarch64_classify_address): Handle SVE addresses.  Assert that
15974         the mode of the address is VOIDmode or an integer mode.
15975         Update call to aarch64_classify_symbol.
15976         (aarch64_classify_symbolic_expression): Update call to
15977         aarch64_classify_symbol.
15978         (aarch64_const_vec_all_in_range_p): New function.
15979         (aarch64_print_vector_float_operand): Likewise.
15980         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
15981         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
15982         and the FP immediates 1.0 and 0.5.
15983         (aarch64_print_address_internal): Handle SVE addresses.
15984         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
15985         (aarch64_regno_regclass): Handle predicate registers.
15986         (aarch64_secondary_reload): Handle big-endian reloads of SVE
15987         data modes.
15988         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
15989         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
15990         (aarch64_convert_sve_vector_bits): New function.
15991         (aarch64_override_options): Use it to handle -msve-vector-bits=.
15992         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15993         rather than an rtx.
15994         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
15995         Handle SVE vector and predicate modes.  Accept VL-based constants
15996         that need only one temporary register, and VL offsets that require
15997         no temporary registers.
15998         (aarch64_conditional_register_usage): Mark the predicate registers
15999         as fixed if SVE isn't available.
16000         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16001         Return true for SVE vector and predicate modes.
16002         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16003         rather than an unsigned int.  Handle SVE modes.
16004         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
16005         SVE modes.
16006         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16007         if SVE is enabled.
16008         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16009         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16010         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16011         (aarch64_sve_float_mul_immediate_p): New functions.
16012         (aarch64_sve_valid_immediate): New function.
16013         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16014         Explicitly reject structure modes.  Check for INDEX constants.
16015         Handle PTRUE and PFALSE constants.
16016         (aarch64_check_zero_based_sve_index_immediate): New function.
16017         (aarch64_simd_imm_zero_p): Delete.
16018         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16019         vector modes.  Accept constants in the range of CNT[BHWD].
16020         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16021         ask for an Advanced SIMD mode.
16022         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16023         (aarch64_simd_vector_alignment): Handle SVE predicates.
16024         (aarch64_vectorize_preferred_vector_alignment): New function.
16025         (aarch64_simd_vector_alignment_reachable): Use it instead of
16026         the vector size.
16027         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16028         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16029         functions.
16030         (MAX_VECT_LEN): Delete.
16031         (expand_vec_perm_d): Add a vec_flags field.
16032         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16033         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16034         (aarch64_evpc_ext): Don't apply a big-endian lane correction
16035         for SVE modes.
16036         (aarch64_evpc_rev): Rename to...
16037         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
16038         (aarch64_evpc_rev_global): New function.
16039         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16040         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16041         MAX_VECT_LEN.
16042         (aarch64_evpc_sve_tbl): New function.
16043         (aarch64_expand_vec_perm_const_1): Update after rename of
16044         aarch64_evpc_rev.  Handle SVE permutes too, trying
16045         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16046         than aarch64_evpc_tbl.
16047         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16048         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16049         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16050         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16051         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16052         (aarch64_expand_sve_vcond): New functions.
16053         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16054         of aarch64_vector_mode_p.
16055         (aarch64_dwarf_poly_indeterminate_value): New function.
16056         (aarch64_compute_pressure_classes): Likewise.
16057         (aarch64_can_change_mode_class): Likewise.
16058         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16059         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16060         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16061         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16062         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16063         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16064         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16065         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16066         constraints.
16067         (Dn, Dl, Dr): Accept const as well as const_vector.
16068         (Dz): Likewise.  Compare against CONST0_RTX.
16069         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16070         of "vector" where appropriate.
16071         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16072         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16073         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16074         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16075         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16076         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16077         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16078         (v_int_equiv): Extend to SVE modes.
16079         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16080         mode attributes.
16081         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16082         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16083         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16084         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16085         (SVE_COND_FP_CMP): New int iterators.
16086         (perm_hilo): Handle the new unpack unspecs.
16087         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16088         attributes.
16089         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16090         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16091         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16092         (aarch64_equality_operator, aarch64_constant_vector_operand)
16093         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16094         (aarch64_sve_nonimmediate_operand): Likewise.
16095         (aarch64_sve_general_operand): Likewise.
16096         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16097         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16098         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16099         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16100         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16101         (aarch64_sve_float_arith_immediate): Likewise.
16102         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16103         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16104         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16105         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16106         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16107         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16108         (aarch64_sve_float_arith_operand): Likewise.
16109         (aarch64_sve_float_arith_with_sub_operand): Likewise.
16110         (aarch64_sve_float_mul_operand): Likewise.
16111         (aarch64_sve_vec_perm_operand): Likewise.
16112         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16113         (aarch64_mov_operand): Accept const_poly_int and const_vector.
16114         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16115         as well as const_vector.
16116         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16117         in file.  Use CONST0_RTX and CONSTM1_RTX.
16118         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
16119         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16120         Use aarch64_simd_imm_zero.
16121         * config/aarch64/aarch64-sve.md: New file.
16122         * config/aarch64/aarch64.md: Include it.
16123         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16124         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16125         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16126         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16127         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16128         (sve): New attribute.
16129         (enabled): Disable instructions with the sve attribute unless
16130         TARGET_SVE.
16131         (movqi, movhi): Pass CONST_POLY_INT operaneds through
16132         aarch64_expand_mov_immediate.
16133         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16134         CNT[BHSD] immediates.
16135         (movti): Split CONST_POLY_INT moves into two halves.
16136         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16137         Split additions that need a temporary here if the destination
16138         is the stack pointer.
16139         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16140         (*add<mode>3_poly_1): New instruction.
16141         (set_clobber_cc): New expander.
16143 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16145         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16146         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
16147         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16148         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16149         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
16150         Change innermode from fixed_mode_size to machine_mode.
16151         (simplify_subreg): Update call accordingly.  Handle a constant-sized
16152         subreg of a variable-length CONST_VECTOR.
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         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16159         (add_offset_to_base): New function, split out from...
16160         (create_mem_ref): ...here.  When handling a scale other than 1,
16161         check first whether the address is valid without the offset.
16162         Add it into the base if so, leaving the index and scale as-is.
16164 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16166         PR c++/83778
16167         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16168         fold_for_warn before checking if arg2 is INTEGER_CST.
16170 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
16172         * config/rs6000/predicates.md (load_multiple_operation): Delete.
16173         (store_multiple_operation): Delete.
16174         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16175         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16176         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16177         guarded by TARGET_STRING.
16178         (rs6000_output_load_multiple): Delete.
16179         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16180         OPTION_MASK_STRING / TARGET_STRING handling.
16181         (print_operand) <'N', 'O'>: Add comment that these are unused now.
16182         (const rs6000_opt_masks) <"string">: Change mask to 0.
16183         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16184         (MASK_STRING): Delete.
16185         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16186         parts.  Simplify.
16187         (load_multiple): Delete.
16188         (*ldmsi8): Delete.
16189         (*ldmsi7): Delete.
16190         (*ldmsi6): Delete.
16191         (*ldmsi5): Delete.
16192         (*ldmsi4): Delete.
16193         (*ldmsi3): Delete.
16194         (store_multiple): Delete.
16195         (*stmsi8): Delete.
16196         (*stmsi7): Delete.
16197         (*stmsi6): Delete.
16198         (*stmsi5): Delete.
16199         (*stmsi4): Delete.
16200         (*stmsi3): Delete.
16201         (movmemsi_8reg): Delete.
16202         (corresponding unnamed define_insn): Delete.
16203         (movmemsi_6reg): Delete.
16204         (corresponding unnamed define_insn): Delete.
16205         (movmemsi_4reg): Delete.
16206         (corresponding unnamed define_insn): Delete.
16207         (movmemsi_2reg): Delete.
16208         (corresponding unnamed define_insn): Delete.
16209         (movmemsi_1reg): Delete.
16210         (corresponding unnamed define_insn): Delete.
16211         * config/rs6000/rs6000.opt (mno-string): New.
16212         (mstring): Replace by deprecation warning stub.
16213         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16215 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16217         * regrename.c (regrename_do_replace): If replacing the same
16218         reg multiple times, try to reuse last created gen_raw_REG.
16220         PR debug/81155
16221         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16222         main to workaround a bug in GDB.
16224 2018-01-12  Tom de Vries  <tom@codesourcery.com>
16226         PR target/83737
16227         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16229 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
16231         PR rtl-optimization/80481
16232         * ira-color.c (get_cap_member): New function.
16233         (allocnos_conflict_by_live_ranges_p): Use it.
16234         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16235         (setup_slot_coalesced_allocno_live_ranges): Ditto.
16237 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
16239         PR target/83628
16240         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16241         (*saddl_se_1): Ditto.
16242         (*ssubsi_1): Ditto.
16243         (*ssubl_se_1): Ditto.
16245 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16247         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16248         rather than wi::to_widest for DR_INITs.
16249         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16250         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16251         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16252         INTEGER_CSTs.
16253         (vect_analyze_group_access_1): Note that here.
16255 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16257         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16258         polynomial type sizes.
16260 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16262         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16263         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16264         (gimple_add_tmp_var): Likewise.
16266 2018-01-12  Martin Liska  <mliska@suse.cz>
16268         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16269         (gimple_alloc_sizes): Likewise.
16270         (dump_gimple_statistics): Use PRIu64 in printf format.
16271         * gimple.h: Change uint64_t to int.
16273 2018-01-12  Martin Liska  <mliska@suse.cz>
16275         * tree-core.h: Use uint64_t instead of int.
16276         * tree.c (tree_node_counts): Likewise.
16277         (tree_node_sizes): Likewise.
16278         (dump_tree_statistics): Use PRIu64 in printf format.
16280 2018-01-12  Martin Liska  <mliska@suse.cz>
16282         * Makefile.in: As qsort_chk is implemented in vec.c, add
16283         vec.o to linkage of gencfn-macros.
16284         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16285         passing the info to record_node_allocation_statistics.
16286         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16287         and pass the info.
16288         * ggc-common.c (struct ggc_usage): Add operator== and use
16289         it in operator< and compare function.
16290         * mem-stats.h (struct mem_usage): Likewise.
16291         * vec.c (struct vec_usage): Remove operator< and compare
16292         function. Can be simply inherited.
16294 2018-01-12  Martin Jambor  <mjambor@suse.cz>
16296         PR target/81616
16297         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16298         * tree-ssa-math-opts.c: Include domwalk.h.
16299         (convert_mult_to_fma_1): New function.
16300         (fma_transformation_info): New type.
16301         (fma_deferring_state): Likewise.
16302         (cancel_fma_deferring): New function.
16303         (result_of_phi): Likewise.
16304         (last_fma_candidate_feeds_initial_phi): Likewise.
16305         (convert_mult_to_fma): Added deferring logic, split actual
16306         transformation to convert_mult_to_fma_1.
16307         (math_opts_dom_walker): New type.
16308         (math_opts_dom_walker::after_dom_children): New method, body moved
16309         here from pass_optimize_widening_mul::execute, added deferring logic
16310         bits.
16311         (pass_optimize_widening_mul::execute): Moved most of code to
16312         math_opts_dom_walker::after_dom_children.
16313         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16314         * config/i386/i386.c (ix86_option_override_internal): Added
16315         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16317 2018-01-12  Richard Biener  <rguenther@suse.de>
16319         PR debug/83157
16320         * dwarf2out.c (gen_variable_die): Do not reset old_die for
16321         inline instance vars.
16323 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
16325         PR target/81819
16326         * config/rx/rx.c (rx_is_restricted_memory_address):
16327         Handle SUBREG case.
16329 2018-01-12  Richard Biener  <rguenther@suse.de>
16331         PR tree-optimization/80846
16332         * target.def (split_reduction): New target hook.
16333         * targhooks.c (default_split_reduction): New function.
16334         * targhooks.h (default_split_reduction): Declare.
16335         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16336         target requests first reduce vectors by combining low and high
16337         parts.
16338         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16339         (get_vectype_for_scalar_type_and_size): Export.
16340         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16341         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16342         * doc/tm.texi: Regenerate.
16343         * config/i386/i386.c (ix86_split_reduction): Implement
16344         TARGET_VECTORIZE_SPLIT_REDUCTION.
16346 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16348         PR target/83368
16349         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16350         in PIC mode except for TARGET_VXWORKS_RTP.
16351         * config/sparc/sparc.c: Include cfgrtl.h.
16352         (TARGET_INIT_PIC_REG): Define.
16353         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16354         (sparc_pic_register_p): New predicate.
16355         (sparc_legitimate_address_p): Use it.
16356         (sparc_legitimize_pic_address): Likewise.
16357         (sparc_delegitimize_address): Likewise.
16358         (sparc_mode_dependent_address_p): Likewise.
16359         (gen_load_pcrel_sym): Remove 4th parameter.
16360         (load_got_register): Adjust call to above.  Remove obsolete stuff.
16361         (sparc_expand_prologue): Do not call load_got_register here.
16362         (sparc_flat_expand_prologue): Likewise.
16363         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16364         (sparc_use_pseudo_pic_reg): New function.
16365         (sparc_init_pic_reg): Likewise.
16366         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16367         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16369 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
16371         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16372         Add item for branch_cost.
16374 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16376         PR rtl-optimization/83565
16377         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16378         not extend the result to a larger mode for rotate operations.
16379         (num_sign_bit_copies1): Likewise.
16381 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16383         PR target/40411
16384         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16385         -symbolic.
16386         Use values-Xc.o for -pedantic.
16387         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16389 2018-01-12  Martin Liska  <mliska@suse.cz>
16391         PR ipa/83054
16392         * ipa-devirt.c (final_warning_record::grow_type_warnings):
16393         New function.
16394         (possible_polymorphic_call_targets): Use it.
16395         (ipa_devirt): Likewise.
16397 2018-01-12  Martin Liska  <mliska@suse.cz>
16399         * profile-count.h (enum profile_quality): Use 0 as invalid
16400         enum value of profile_quality.
16402 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16404         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16405         -mext-string options.
16407 2018-01-12  Richard Biener  <rguenther@suse.de>
16409         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16410         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16411         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16412         Likewise.
16413         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16415 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16417         * configure.ac (--with-long-double-format): Add support for the
16418         configuration option to change the default long double format on
16419         PowerPC systems.
16420         * config.gcc (powerpc*-linux*-*): Likewise.
16421         * configure: Regenerate.
16422         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16423         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16424         used without modification.
16426 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16428         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16429         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16430         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16431         MISC_BUILTIN_SPEC_BARRIER.
16432         (rs6000_init_builtins): Likewise.
16433         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16434         enum value.
16435         (speculation_barrier): New define_insn.
16436         * doc/extend.texi: Document __builtin_speculation_barrier.
16438 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16440         PR target/83203
16441         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16442         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16443         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16444         iterators.
16445         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
16446         integral modes instead of "ss" and "sd".
16447         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16448         vectors with 32-bit and 64-bit elements.
16449         (vecdupssescalarmodesuffix): New mode attribute.
16450         (vec_dup<mode>): Use it.
16452 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
16454         PR target/83330
16455         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16456         frame if argument is passed on stack.
16458 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16460         PR target/82682
16461         * ree.c (combine_reaching_defs): Optimize also
16462         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16463         reg2=any_extend(exp); reg1=reg2;, formatting fix.
16465 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16467         PR middle-end/83189
16468         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16470 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16472         PR middle-end/83718
16473         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16474         after they are computed.
16476 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
16478         PR tree-optimization/83695
16479         * gimple-loop-linterchange.cc
16480         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16481         reset cached scev information after interchange.
16482         (pass_linterchange::execute): Remove call to scev_reset_htab.
16484 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16486         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16487         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16488         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16489         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16490         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16491         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16492         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16493         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16494         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16495         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16496         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16497         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16498         (V_lane_reg): Likewise.
16499         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16500         New define_expand.
16501         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16502         (vfmal_lane_low<mode>_intrinsic,
16503         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16504         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16505         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16506         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16507         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16508         vfmsl_lane_high<mode>_intrinsic): New define_insns.
16510 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16512         * config/arm/arm-cpus.in (fp16fml): New feature.
16513         (ALL_SIMD): Add fp16fml.
16514         (armv8.2-a): Add fp16fml as an option.
16515         (armv8.3-a): Likewise.
16516         (armv8.4-a): Add fp16fml as part of fp16.
16517         * config/arm/arm.h (TARGET_FP16FML): Define.
16518         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16519         when appropriate.
16520         * config/arm/arm-modes.def (V2HF): Define.
16521         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16522         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16523         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16524         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16525         vfmsl_low, vfmsl_high): New set of builtins.
16526         * config/arm/iterators.md (PLUSMINUS): New code iterator.
16527         (vfml_op): New code attribute.
16528         (VFMLHALVES): New int iterator.
16529         (VFML, VFMLSEL): New mode attributes.
16530         (V_reg): Define mapping for V2HF.
16531         (V_hi, V_lo): New mode attributes.
16532         (VF_constraint): Likewise.
16533         (vfml_half, vfml_half_selector): New int attributes.
16534         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16535         define_expand.
16536         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16537         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
16538         New define_insn.
16539         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
16540         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
16541         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
16542         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
16543         documentation.
16544         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
16545         Document new effective target and option set.
16547 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16549         * config/arm/arm-cpus.in (armv8_4): New feature.
16550         (ARMv8_4a): New fgroup.
16551         (armv8.4-a): New arch.
16552         * config/arm/arm-tables.opt: Regenerate.
16553         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
16554         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
16555         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
16556         Add matching rules for -march=armv8.4-a and extensions.
16557         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
16559 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
16561         PR target/81821
16562         * config/rx/rx.md (BW): New mode attribute.
16563         (sync_lock_test_and_setsi): Add mode suffix to insn output.
16565 2018-01-11  Richard Biener  <rguenther@suse.de>
16567         PR tree-optimization/83435
16568         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16569         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16570         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16572 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16573             Alan Hayward  <alan.hayward@arm.com>
16574             David Sherwood  <david.sherwood@arm.com>
16576         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16577         field.
16578         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
16579         (aarch64_print_address_internal): Use it to check for a zero offset.
16581 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16582             Alan Hayward  <alan.hayward@arm.com>
16583             David Sherwood  <david.sherwood@arm.com>
16585         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16586         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16587         Return a poly_int64 rather than a HOST_WIDE_INT.
16588         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16589         rather than a HOST_WIDE_INT.
16590         * config/aarch64/aarch64.h (aarch64_frame): Protect with
16591         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
16592         hard_fp_offset, frame_size, initial_adjust, callee_offset and
16593         final_offset from HOST_WIDE_INT to poly_int64.
16594         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16595         to_constant when getting the number of units in an Advanced SIMD
16596         mode.
16597         (aarch64_builtin_vectorized_function): Check for a constant number
16598         of units.
16599         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16600         GET_MODE_SIZE.
16601         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16602         attribute instead of GET_MODE_NUNITS.
16603         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16604         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16605         GET_MODE_SIZE for fixed-size registers.
16606         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16607         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16608         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16609         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16610         (aarch64_print_operand, aarch64_print_address_internal)
16611         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16612         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16613         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16614         Handle polynomial GET_MODE_SIZE.
16615         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
16616         wider than SImode without modification.
16617         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16618         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16619         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16620         passing and returning SVE modes.
16621         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16622         rather than GEN_INT.
16623         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16624         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16625         (aarch64_allocate_and_probe_stack_space): Likewise.
16626         (aarch64_layout_frame): Cope with polynomial offsets.
16627         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16628         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
16629         polynomial offsets.
16630         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16631         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16632         poly_int64 rather than a HOST_WIDE_INT.
16633         (aarch64_get_separate_components, aarch64_process_components)
16634         (aarch64_expand_prologue, aarch64_expand_epilogue)
16635         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16636         (aarch64_anchor_offset): New function, split out from...
16637         (aarch64_legitimize_address): ...here.
16638         (aarch64_builtin_vectorization_cost): Handle polynomial
16639         TYPE_VECTOR_SUBPARTS.
16640         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16641         GET_MODE_NUNITS.
16642         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16643         number of elements from the PARALLEL rather than the mode.
16644         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16645         rather than GET_MODE_BITSIZE.
16646         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16647         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16648         (aarch64_expand_vec_perm_const_1): Handle polynomial
16649         d->perm.length () and d->perm elements.
16650         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
16651         Apply to_constant to d->perm elements.
16652         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16653         polynomial CONST_VECTOR_NUNITS.
16654         (aarch64_move_pointer): Take amount as a poly_int64 rather
16655         than an int.
16656         (aarch64_progress_pointer): Avoid temporary variable.
16657         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16658         the mode attribute instead of GET_MODE.
16660 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16661             Alan Hayward  <alan.hayward@arm.com>
16662             David Sherwood  <david.sherwood@arm.com>
16664         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16665         x exists before using it.
16666         (aarch64_add_constant_internal): Rename to...
16667         (aarch64_add_offset_1): ...this.  Replace regnum with separate
16668         src and dest rtxes.  Handle the case in which they're different,
16669         including when the offset is zero.  Replace scratchreg with an rtx.
16670         Use 2 additions if there is no spare register into which we can
16671         move a 16-bit constant.
16672         (aarch64_add_constant): Delete.
16673         (aarch64_add_offset): Replace reg with separate src and dest
16674         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
16675         Use aarch64_add_offset_1.
16676         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16677         an rtx rather than an int.  Take the delta as a poly_int64
16678         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
16679         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16680         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16681         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16682         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16683         and aarch64_add_sp.
16684         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16685         aarch64_add_constant.
16687 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16689         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16690         Use scalar_float_mode.
16692 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16694         * config/aarch64/aarch64-simd.md
16695         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16696         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16697         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16698         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16699         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16700         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16701         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
16702         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
16703         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
16704         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
16706 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16708         PR target/83514
16709         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
16710         targ_options->x_arm_arch_string is non NULL.
16712 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
16714         * config/aarch64/aarch64.h
16715         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
16717 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
16719         PR target/82096
16720         * expmed.c (emit_store_flag_force): Swap if const op0
16721         and change VOIDmode to mode of op0.
16723 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16725         PR rtl-optimization/83761
16726         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
16727         than bytes to mode_for_size.
16729 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16731         PR middle-end/83189
16732         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
16733         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
16734         profile.
16736 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16738         PR middle-end/83575
16739         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
16740         when in layout mode.
16741         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
16742         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
16743         partition fixup.
16745 2018-01-10  Michael Collison  <michael.collison@arm.com>
16747         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
16748         * config/aarch64/aarch64-option-extension.def: Add
16749         AARCH64_OPT_EXTENSION of 'fp16fml'.
16750         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16751         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
16752         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
16753         * config/aarch64/constraints.md (Ui7): New constraint.
16754         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
16755         (VFMLA_SEL_W): Ditto.
16756         (f16quad): Ditto.
16757         (f16mac1): Ditto.
16758         (VFMLA16_LOW): New int iterator.
16759         (VFMLA16_HIGH): Ditto.
16760         (UNSPEC_FMLAL): New unspec.
16761         (UNSPEC_FMLSL): Ditto.
16762         (UNSPEC_FMLAL2): Ditto.
16763         (UNSPEC_FMLSL2): Ditto.
16764         (f16mac): New code attribute.
16765         * config/aarch64/aarch64-simd-builtins.def
16766         (aarch64_fmlal_lowv2sf): Ditto.
16767         (aarch64_fmlsl_lowv2sf): Ditto.
16768         (aarch64_fmlalq_lowv4sf): Ditto.
16769         (aarch64_fmlslq_lowv4sf): Ditto.
16770         (aarch64_fmlal_highv2sf): Ditto.
16771         (aarch64_fmlsl_highv2sf): Ditto.
16772         (aarch64_fmlalq_highv4sf): Ditto.
16773         (aarch64_fmlslq_highv4sf): Ditto.
16774         (aarch64_fmlal_lane_lowv2sf): Ditto.
16775         (aarch64_fmlsl_lane_lowv2sf): Ditto.
16776         (aarch64_fmlal_laneq_lowv2sf): Ditto.
16777         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
16778         (aarch64_fmlalq_lane_lowv4sf): Ditto.
16779         (aarch64_fmlsl_lane_lowv4sf): Ditto.
16780         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
16781         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
16782         (aarch64_fmlal_lane_highv2sf): Ditto.
16783         (aarch64_fmlsl_lane_highv2sf): Ditto.
16784         (aarch64_fmlal_laneq_highv2sf): Ditto.
16785         (aarch64_fmlsl_laneq_highv2sf): Ditto.
16786         (aarch64_fmlalq_lane_highv4sf): Ditto.
16787         (aarch64_fmlsl_lane_highv4sf): Ditto.
16788         (aarch64_fmlalq_laneq_highv4sf): Ditto.
16789         (aarch64_fmlsl_laneq_highv4sf): Ditto.
16790         * config/aarch64/aarch64-simd.md:
16791         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
16792         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16793         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
16794         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16795         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
16796         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
16797         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
16798         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
16799         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
16800         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
16801         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
16802         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
16803         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
16804         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
16805         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
16806         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
16807         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
16808         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
16809         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
16810         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
16811         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
16812         (vfmlsl_low_u32): Ditto.
16813         (vfmlalq_low_u32): Ditto.
16814         (vfmlslq_low_u32): Ditto.
16815         (vfmlal_high_u32): Ditto.
16816         (vfmlsl_high_u32): Ditto.
16817         (vfmlalq_high_u32): Ditto.
16818         (vfmlslq_high_u32): Ditto.
16819         (vfmlal_lane_low_u32): Ditto.
16820         (vfmlsl_lane_low_u32): Ditto.
16821         (vfmlal_laneq_low_u32): Ditto.
16822         (vfmlsl_laneq_low_u32): Ditto.
16823         (vfmlalq_lane_low_u32): Ditto.
16824         (vfmlslq_lane_low_u32): Ditto.
16825         (vfmlalq_laneq_low_u32): Ditto.
16826         (vfmlslq_laneq_low_u32): Ditto.
16827         (vfmlal_lane_high_u32): Ditto.
16828         (vfmlsl_lane_high_u32): Ditto.
16829         (vfmlal_laneq_high_u32): Ditto.
16830         (vfmlsl_laneq_high_u32): Ditto.
16831         (vfmlalq_lane_high_u32): Ditto.
16832         (vfmlslq_lane_high_u32): Ditto.
16833         (vfmlalq_laneq_high_u32): Ditto.
16834         (vfmlslq_laneq_high_u32): Ditto.
16835         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
16836         (AARCH64_FL_FOR_ARCH8_4): New.
16837         (AARCH64_ISA_F16FML): New ISA flag.
16838         (TARGET_F16FML): New feature flag for fp16fml.
16839         (doc/invoke.texi): Document new fp16fml option.
16841 2018-01-10  Michael Collison  <michael.collison@arm.com>
16843         * config/aarch64/aarch64-builtins.c:
16844         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
16845         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16846         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
16847         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
16848         (AARCH64_ISA_SHA3): New ISA flag.
16849         (TARGET_SHA3): New feature flag for sha3.
16850         * config/aarch64/iterators.md (sha512_op): New int attribute.
16851         (CRYPTO_SHA512): New int iterator.
16852         (UNSPEC_SHA512H): New unspec.
16853         (UNSPEC_SHA512H2): Ditto.
16854         (UNSPEC_SHA512SU0): Ditto.
16855         (UNSPEC_SHA512SU1): Ditto.
16856         * config/aarch64/aarch64-simd-builtins.def
16857         (aarch64_crypto_sha512hqv2di): New builtin.
16858         (aarch64_crypto_sha512h2qv2di): Ditto.
16859         (aarch64_crypto_sha512su0qv2di): Ditto.
16860         (aarch64_crypto_sha512su1qv2di): Ditto.
16861         (aarch64_eor3qv8hi): Ditto.
16862         (aarch64_rax1qv2di): Ditto.
16863         (aarch64_xarqv2di): Ditto.
16864         (aarch64_bcaxqv8hi): Ditto.
16865         * config/aarch64/aarch64-simd.md:
16866         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
16867         (aarch64_crypto_sha512su0qv2di): Ditto.
16868         (aarch64_crypto_sha512su1qv2di): Ditto.
16869         (aarch64_eor3qv8hi): Ditto.
16870         (aarch64_rax1qv2di): Ditto.
16871         (aarch64_xarqv2di): Ditto.
16872         (aarch64_bcaxqv8hi): Ditto.
16873         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
16874         (vsha512h2q_u64): Ditto.
16875         (vsha512su0q_u64): Ditto.
16876         (vsha512su1q_u64): Ditto.
16877         (veor3q_u16): Ditto.
16878         (vrax1q_u64): Ditto.
16879         (vxarq_u64): Ditto.
16880         (vbcaxq_u16): Ditto.
16881         * config/arm/types.md (crypto_sha512): New type attribute.
16882         (crypto_sha3): Ditto.
16883         (doc/invoke.texi): Document new sha3 option.
16885 2018-01-10  Michael Collison  <michael.collison@arm.com>
16887         * config/aarch64/aarch64-builtins.c:
16888         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
16889         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16890         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
16891         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
16892         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
16893         (AARCH64_ISA_SM4): New ISA flag.
16894         (TARGET_SM4): New feature flag for sm4.
16895         * config/aarch64/aarch64-simd-builtins.def
16896         (aarch64_sm3ss1qv4si): Ditto.
16897         (aarch64_sm3tt1aq4si): Ditto.
16898         (aarch64_sm3tt1bq4si): Ditto.
16899         (aarch64_sm3tt2aq4si): Ditto.
16900         (aarch64_sm3tt2bq4si): Ditto.
16901         (aarch64_sm3partw1qv4si): Ditto.
16902         (aarch64_sm3partw2qv4si): Ditto.
16903         (aarch64_sm4eqv4si): Ditto.
16904         (aarch64_sm4ekeyqv4si): Ditto.
16905         * config/aarch64/aarch64-simd.md:
16906         (aarch64_sm3ss1qv4si): Ditto.
16907         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
16908         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
16909         (aarch64_sm4eqv4si): Ditto.
16910         (aarch64_sm4ekeyqv4si): Ditto.
16911         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
16912         (sm3part_op): Ditto.
16913         (CRYPTO_SM3TT): Ditto.
16914         (CRYPTO_SM3PART): Ditto.
16915         (UNSPEC_SM3SS1): New unspec.
16916         (UNSPEC_SM3TT1A): Ditto.
16917         (UNSPEC_SM3TT1B): Ditto.
16918         (UNSPEC_SM3TT2A): Ditto.
16919         (UNSPEC_SM3TT2B): Ditto.
16920         (UNSPEC_SM3PARTW1): Ditto.
16921         (UNSPEC_SM3PARTW2): Ditto.
16922         (UNSPEC_SM4E): Ditto.
16923         (UNSPEC_SM4EKEY): Ditto.
16924         * config/aarch64/constraints.md (Ui2): New constraint.
16925         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
16926         * config/arm/types.md (crypto_sm3): New type attribute.
16927         (crypto_sm4): Ditto.
16928         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
16929         (vsm3tt1aq_u32): Ditto.
16930         (vsm3tt1bq_u32): Ditto.
16931         (vsm3tt2aq_u32): Ditto.
16932         (vsm3tt2bq_u32): Ditto.
16933         (vsm3partw1q_u32): Ditto.
16934         (vsm3partw2q_u32): Ditto.
16935         (vsm4eq_u32): Ditto.
16936         (vsm4ekeyq_u32): Ditto.
16937         (doc/invoke.texi): Document new sm4 option.
16939 2018-01-10  Michael Collison  <michael.collison@arm.com>
16941         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
16942         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
16943         (AARCH64_FL_FOR_ARCH8_4): New.
16944         (AARCH64_FL_V8_4): New flag.
16945         (doc/invoke.texi): Document new armv8.4-a option.
16947 2018-01-10  Michael Collison  <michael.collison@arm.com>
16949         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16950         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
16951         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
16952         * config/aarch64/aarch64-option-extension.def: Add
16953         AARCH64_OPT_EXTENSION of 'sha2'.
16954         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
16955         (crypto): Disable sha2 and aes if crypto disabled.
16956         (crypto): Enable aes and sha2 if enabled.
16957         (simd): Disable sha2 and aes if simd disabled.
16958         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
16959         New flags.
16960         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
16961         (TARGET_SHA2): New feature flag for sha2.
16962         (TARGET_AES): New feature flag for aes.
16963         * config/aarch64/aarch64-simd.md:
16964         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
16965         conditional on TARGET_AES.
16966         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
16967         (aarch64_crypto_sha1hsi): Make pattern conditional
16968         on TARGET_SHA2.
16969         (aarch64_crypto_sha1hv4si): Ditto.
16970         (aarch64_be_crypto_sha1hv4si): Ditto.
16971         (aarch64_crypto_sha1su1v4si): Ditto.
16972         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
16973         (aarch64_crypto_sha1su0v4si): Ditto.
16974         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
16975         (aarch64_crypto_sha256su0v4si): Ditto.
16976         (aarch64_crypto_sha256su1v4si): Ditto.
16977         (doc/invoke.texi): Document new aes and sha2 options.
16979 2018-01-10  Martin Sebor  <msebor@redhat.com>
16981         PR tree-optimization/83781
16982         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
16983         as string arrays.
16985 2018-01-11  Martin Sebor  <msebor@gmail.com>
16986             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16988         PR tree-optimization/83501
16989         PR tree-optimization/81703
16991         * tree-ssa-strlen.c (get_string_cst): Rename...
16992         (get_string_len): ...to this.  Handle global constants.
16993         (handle_char_store): Adjust.
16995 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
16996             Jim Wilson  <jimw@sifive.com>
16998         * config/riscv/riscv-protos.h (riscv_output_return): New.
16999         * config/riscv/riscv.c (struct machine_function): New naked_p field.
17000         (riscv_attribute_table, riscv_output_return),
17001         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17002         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17003         (riscv_compute_frame_info): Only compute frame->mask if not a naked
17004         function.
17005         (riscv_expand_prologue): Add early return for naked function.
17006         (riscv_expand_epilogue): Likewise.
17007         (riscv_function_ok_for_sibcall): Return false for naked function.
17008         (riscv_set_current_function): New.
17009         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17010         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17011         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17012         * doc/extend.texi (RISC-V Function Attributes): New.
17014 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17016         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17017         check for 128-bit long double before checking TCmode.
17018         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17019         128-bit long doubles before checking TFmode or TCmode.
17020         (FLOAT128_IBM_P): Likewise.
17022 2018-01-10  Martin Sebor  <msebor@redhat.com>
17024         PR tree-optimization/83671
17025         * builtins.c (c_strlen): Unconditionally return zero for the empty
17026         string.
17027         Use -Warray-bounds for warnings.
17028         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17029         for non-constant array indices with COMPONENT_REF, arrays of
17030         arrays, and pointers to arrays.
17031         (gimple_fold_builtin_strlen): Determine and set length range for
17032         non-constant character arrays.
17034 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
17036         PR middle-end/81897
17037         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17038         empty blocks.
17040 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
17042         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17044 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17046         PR target/83399
17047         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17048         VECTOR_MEM_ALTIVEC_OR_VSX_P.
17049         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17050         indexed_or_indirect_operand predicate.
17051         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17052         (*vsx_le_perm_load_v8hi): Likewise.
17053         (*vsx_le_perm_load_v16qi): Likewise.
17054         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17055         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17056         (*vsx_le_perm_store_v8hi): Likewise.
17057         (*vsx_le_perm_store_v16qi): Likewise.
17058         (eight unnamed splitters): Likewise.
17060 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17062         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17063         * config/rs6000/emmintrin.h: Likewise.
17064         * config/rs6000/mmintrin.h: Likewise.
17065         * config/rs6000/xmmintrin.h: Likewise.
17067 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
17069         PR c++/43486
17070         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17071         "public_flag".
17072         * tree.c (tree_nop_conversion): Return true for location wrapper
17073         nodes.
17074         (maybe_wrap_with_location): New function.
17075         (selftest::check_strip_nops): New function.
17076         (selftest::test_location_wrappers): New function.
17077         (selftest::tree_c_tests): Call it.
17078         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17079         (maybe_wrap_with_location): New decl.
17080         (EXPR_LOCATION_WRAPPER_P): New macro.
17081         (location_wrapper_p): New inline function.
17082         (tree_strip_any_location_wrapper): New inline function.
17084 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
17086         PR target/83735
17087         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17088         stack_realign_offset for the largest alignment of stack slot
17089         actually used.
17090         (ix86_find_max_used_stack_alignment): New function.
17091         (ix86_finalize_stack_frame_flags): Use it.  Set
17092         max_used_stack_alignment if we don't realign stack.
17093         * config/i386/i386.h (machine_function): Add
17094         max_used_stack_alignment.
17096 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
17098         * config/arm/arm.opt (-mbranch-cost): New option.
17099         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17100         account.
17102 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
17104         PR target/83629
17105         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17106         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17108 2018-01-10  Richard Biener  <rguenther@suse.de>
17110         PR debug/83765
17111         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17112         early out so it also covers the case where we have a non-NULL
17113         origin.
17115 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17117         PR tree-optimization/83753
17118         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17119         for non-strided grouped accesses if the number of elements is 1.
17121 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17123         PR target/81616
17124         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17125         * i386.h (TARGET_USE_GATHER): Define.
17126         * x86-tune.def (X86_TUNE_USE_GATHER): New.
17128 2018-01-10  Martin Liska  <mliska@suse.cz>
17130         PR bootstrap/82831
17131         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17132         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17133         partitioning.
17134         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17135         CLEANUP_NO_PARTITIONING is not set.
17137 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17139         * doc/rtl.texi: Remove documentation of (const ...) wrappers
17140         for vectors, as a partial revert of r254296.
17141         * rtl.h (const_vec_p): Delete.
17142         (const_vec_duplicate_p): Don't test for vector CONSTs.
17143         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17144         * expmed.c (make_tree): Likewise.
17146         Revert:
17147         * common.md (E, F): Use CONSTANT_P instead of checking for
17148         CONST_VECTOR.
17149         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17150         checking for CONST_VECTOR.
17152 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17154         PR middle-end/83575
17155         * predict.c (force_edge_cold): Handle in more sane way edges
17156         with no prediction.
17158 2018-01-09  Carl Love  <cel@us.ibm.com>
17160         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17161         V4SI, V4SF types.
17162         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17163         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17164         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17165         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
17166         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17167         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
17168         * config/rs6000/rs6000-protos.h: Add extern defition for
17169         rs6000_generate_float2_double_code.
17170         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17171         function.
17172         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17173         (float2_v2df): Add define_expand.
17175 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
17177         PR target/83628
17178         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17179         op_mode in the force_to_mode call.
17181 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17183         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17184         instead of checking each element individually.
17185         (aarch64_evpc_uzp): Likewise.
17186         (aarch64_evpc_zip): Likewise.
17187         (aarch64_evpc_ext): Likewise.
17188         (aarch64_evpc_rev): Likewise.
17189         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17190         instead of checking each element individually.  Return true without
17191         generating rtl if
17192         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17193         whether all selected elements come from the same input, instead of
17194         checking each element individually.  Remove calls to gen_rtx_REG,
17195         start_sequence and end_sequence and instead assert that no rtl is
17196         generated.
17198 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17200         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17201         order of HIGH and CONST checks.
17203 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17205         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17206         if the destination isn't an SSA_NAME.
17208 2018-01-09  Richard Biener  <rguenther@suse.de>
17210         PR tree-optimization/83668
17211         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17212         move prologue...
17213         (canonicalize_loop_form): ... here, renamed from ...
17214         (canonicalize_loop_closed_ssa_form): ... this and amended to
17215         swap successor edges for loop exit blocks to make us use
17216         the RPO order we need for initial schedule generation.
17218 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
17220         PR tree-optimization/64811
17221         * match.pd: When optimizing comparisons with Inf, avoid
17222         introducing or losing exceptions from comparisons with NaN.
17224 2018-01-09  Martin Liska  <mliska@suse.cz>
17226         PR sanitizer/82517
17227         * asan.c (shadow_mem_size): Add gcc_assert.
17229 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
17231         Don't save registers in main().
17233         PR target/83738
17234         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17235         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17236         * config/avr/avr.c (avr_set_current_function): Don't error if
17237         naked, OS_task or OS_main are specified at the same time.
17238         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17239         OS_main.
17240         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17241         attribute.
17242         * common/config/avr/avr-common.c (avr_option_optimization_table):
17243         Switch on -mmain-is-OS_task for optimizing compilations.
17245 2018-01-09  Richard Biener  <rguenther@suse.de>
17247         PR tree-optimization/83572
17248         * graphite.c: Include cfganal.h.
17249         (graphite_transform_loops): Connect infinite loops to exit
17250         and remove fake edges at the end.
17252 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17254         * ipa-inline.c (edge_badness): Revert accidental checkin.
17256 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17258         PR ipa/80763
17259         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17260         symbols; not inline clones.
17262 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
17264         PR target/83507
17265         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17266         hard registers.  Formatting fixes.
17268         PR preprocessor/83722
17269         * gcc.c (try_generate_repro): Pass
17270         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17271         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17272         do_report_bug.
17274 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
17275             Kito Cheng  <kito.cheng@gmail.com>
17277         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17278         (riscv_leaf_function_p): Delete.
17279         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17281 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17283         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17284         function.
17285         (do_ifelse): New function.
17286         (do_isel): New function.
17287         (do_sub3): New function.
17288         (do_add3): New function.
17289         (do_load_mask_compare): New function.
17290         (do_overlap_load_compare): New function.
17291         (expand_compare_loop): New function.
17292         (expand_block_compare): Call expand_compare_loop() when appropriate.
17293         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17294         option description.
17295         (-mblock-compare-inline-loop-limit): New option.
17297 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17299         PR target/83677
17300         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17301         Reverse order of second and third operands in first alternative.
17302         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17303         of first and second elements in UNSPEC_VPERMR vector.
17304         (altivec_expand_vec_perm_le): Likewise.
17306 2018-01-08  Jeff Law  <law@redhat.com>
17308         PR rtl-optimizatin/81308
17309         * tree-switch-conversion.c (cfg_altered): New file scoped static.
17310         (process_switch): If group_case_labels makes a change, then set
17311         cfg_altered.
17312         (pass_convert_switch::execute): If a switch is converted, then
17313         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
17315         PR rtl-optimization/81308
17316         * recog.c (split_all_insns): Conditionally cleanup the CFG after
17317         splitting insns.
17319 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
17321         PR target/83663 - Revert r255946
17322         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17323         generation for cases where splatting a value is not useful.
17324         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17325         across a vec_duplicate and a paradoxical subreg forming a vector
17326         mode to a vec_concat.
17328 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17330         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17331         -march=armv8.3-a variants.
17332         * config/arm/t-multilib: Likewise.
17333         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
17335 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17337         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17338         to generate rtl.
17339         (cceq_ior_compare_complement): Give it a name so I can use it, and
17340         change boolean_or_operator predicate to boolean_operator so it can
17341         be used to generate a crand.
17342         (eqne): New code iterator.
17343         (bd/bd_neg): New code_attrs.
17344         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17345         a single define_insn.
17346         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17347         decrement (bdnzt/bdnzf/bdzt/bdzf).
17348         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17349         with the new names of the branch decrement patterns, and added the
17350         names of the branch decrement conditional patterns.
17352 2018-01-08  Richard Biener  <rguenther@suse.de>
17354         PR tree-optimization/83563
17355         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17356         cache.
17358 2018-01-08  Richard Biener  <rguenther@suse.de>
17360         PR middle-end/83713
17361         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17363 2018-01-08  Richard Biener  <rguenther@suse.de>
17365         PR tree-optimization/83685
17366         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17367         references to abnormals.
17369 2018-01-08  Richard Biener  <rguenther@suse.de>
17371         PR lto/83719
17372         * dwarf2out.c (output_indirect_strings): Handle empty
17373         skeleton_debug_str_hash.
17374         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17376 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17378         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17379         (emit_store_direct): Likewise.
17380         (arc_trampoline_adjust_address): Likewise.
17381         (arc_asm_trampoline_template): New function.
17382         (arc_initialize_trampoline): Use asm_trampoline_template.
17383         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17384         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17385         * config/arc/arc.md (flush_icache): Delete pattern.
17387 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17389         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17390         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17391         munaligned-access.
17393 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17395         PR target/83681
17396         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17397         by not USED_FOR_TARGET.
17398         (make_pass_resolve_sw_modes): Likewise.
17400 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17402         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17403         USED_FOR_TARGET.
17405 2018-01-08  Richard Biener  <rguenther@suse.de>
17407         PR middle-end/83580
17408         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17410 2018-01-08  Richard Biener  <rguenther@suse.de>
17412         PR middle-end/83517
17413         * match.pd ((t * 2) / 2) -> t): Add missing :c.
17415 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
17417         PR middle-end/81897
17418         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17419         basic blocks with a small number of successors.
17420         (convert_control_dep_chain_into_preds): Improve handling of
17421         forwarder blocks.
17422         (dump_predicates): Split apart into...
17423         (dump_pred_chain): ...here...
17424         (dump_pred_info): ...and here.
17425         (can_one_predicate_be_invalidated_p): Add debugging printfs.
17426         (can_chain_union_be_invalidated_p): Improve check for invalidation
17427         of paths.
17428         (uninit_uses_cannot_happen): Avoid unnecessary if
17429         convert_control_dep_chain_into_preds yielded nothing.
17431 2018-01-06  Martin Sebor  <msebor@redhat.com>
17433         PR tree-optimization/83640
17434         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17435         subtracting negative offset from size.
17436         (builtin_access::overlap): Adjust offset bounds of the access to fall
17437         within the size of the object if possible.
17439 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
17441         PR rtl-optimization/83699
17442         * expmed.c (extract_bit_field_1): Restrict the vector usage of
17443         extract_bit_field_as_subreg to cases in which the extracted
17444         value is also a vector.
17446         * lra-constraints.c (process_alt_operands): Test for the equivalence
17447         substitutions when detecting a possible reload cycle.
17449 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
17451         PR debug/83480
17452         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17453         by default if flag_selective_schedling{,2}.  Formatting fixes.
17455         PR rtl-optimization/83682
17456         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17457         if it has non-VECTOR_MODE element mode.
17458         (vec_duplicate_p): Likewise.
17460         PR middle-end/83694
17461         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17462         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17464 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17466         PR target/83604
17467         * config/i386/i386-builtin.def
17468         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17469         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17470         Require also OPTION_MASK_ISA_AVX512F in addition to
17471         OPTION_MASK_ISA_GFNI.
17472         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17473         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17474         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17475         to OPTION_MASK_ISA_GFNI.
17476         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17477         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17478         OPTION_MASK_ISA_AVX512BW.
17479         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17480         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17481         addition to OPTION_MASK_ISA_GFNI.
17482         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17483         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17484         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17485         to OPTION_MASK_ISA_GFNI.
17486         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17487         a requirement for all ISAs rather than any of them with a few
17488         exceptions.
17489         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17490         processing.
17491         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17492         bitmasks to be enabled with 3 exceptions, instead of requiring any
17493         enabled ISA with lots of exceptions.
17494         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17495         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17496         Change avx512bw in isa attribute to avx512f.
17497         * config/i386/sgxintrin.h: Add license boilerplate.
17498         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
17499         to __AVX512F__ and __AVX512VL to __AVX512VL__.
17500         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17501         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17502         defined.
17503         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17504         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17505         temporarily sse2 rather than sse if not enabled already.
17507         PR target/83604
17508         * config/i386/sse.md (VI248_VLBW): Rename to ...
17509         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
17510         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17511         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17512         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17513         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17514         mode iterator instead of VI248_VLBW.
17516 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
17518         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17519         (record_modified): Skip clobbers; add debug output.
17520         (param_change_prob): Use sreal frequencies.
17522 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17524         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17525         punt for user-aligned variables.
17527 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17529         * tree-chrec.c (chrec_contains_symbols): Return true for
17530         POLY_INT_CST.
17532 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
17534         PR target/82439
17535         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17536         of (x|y) == x for BICS pattern.
17538 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17540         PR tree-optimization/83605
17541         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
17542         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
17543         can throw.
17545 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17547         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
17548         * config/epiphany/rtems.h: New file.
17550 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17551             Uros Bizjak  <ubizjak@gmail.com>
17553         PR target/83554
17554         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
17555         QIreg_operand instead of register_operand predicate.
17556         * config/i386/i386.c (ix86_rop_should_change_byte_p,
17557         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
17558         comments instead of -fmitigate[-_]rop.
17560 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17562         PR bootstrap/81926
17563         * cgraphunit.c (symbol_table::compile): Switch to text_section
17564         before calling assembly_start debug hook.
17565         * run-rtl-passes.c (run_rtl_passes): Likewise.
17566         Include output.h.
17568 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17570         * tree-vrp.c (extract_range_from_binary_expr_1): Check
17571         range_int_cst_p rather than !symbolic_range_p before calling
17572         extract_range_from_multiplicative_op_1.
17574 2018-01-04  Jeff Law  <law@redhat.com>
17576         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17577         redundant test in assertion.
17579 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17581         * doc/rtl.texi: Document machine_mode wrapper classes.
17583 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17585         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17586         using tree_to_uhwi.
17588 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17590         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17591         the VEC_PERM_EXPR fold to fail.
17593 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17595         PR debug/83585
17596         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17597         to switched_sections.
17599 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17601         PR target/83680
17602         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17603         test for d.testing.
17605 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
17607         PR target/83387
17608         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17609         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17611 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17613         PR debug/83666
17614         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17615         is BLKmode and bitpos not zero or mode change is needed.
17617 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17619         PR target/83675
17620         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17621         TARGET_VIS2.
17623 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
17625         PR target/83628
17626         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17627         instead of MULT rtx.  Update all corresponding splitters.
17628         (*saddl_se): Ditto.
17629         (*ssub<modesuffix>): Ditto.
17630         (*ssubl_se): Ditto.
17631         (*cmp_sadd_di): Update split patterns.
17632         (*cmp_sadd_si): Ditto.
17633         (*cmp_sadd_sidi): Ditto.
17634         (*cmp_ssub_di): Ditto.
17635         (*cmp_ssub_si): Ditto.
17636         (*cmp_ssub_sidi): Ditto.
17637         * config/alpha/predicates.md (const23_operand): New predicate.
17638         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17639         Look for ASHIFT, not MULT inner operand.
17640         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17642 2018-01-04  Martin Liska  <mliska@suse.cz>
17644         PR gcov-profile/83669
17645         * gcov.c (output_intermediate_file): Add version to intermediate
17646         gcov file.
17647         * doc/gcov.texi: Document new field 'version' in intermediate
17648         file format. Fix location of '-k' option of gcov command.
17650 2018-01-04  Martin Liska  <mliska@suse.cz>
17652         PR ipa/82352
17653         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17655 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17657         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17659 2018-01-03  Martin Sebor  <msebor@redhat.com>
17661         PR tree-optimization/83655
17662         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17663         checking calls with invalid arguments.
17665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17667         * tree-vect-stmts.c (vect_get_store_rhs): New function.
17668         (vectorizable_mask_load_store): Delete.
17669         (vectorizable_call): Return false for masked loads and stores.
17670         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
17671         instead of gimple_assign_rhs1.
17672         (vectorizable_load): Handle IFN_MASK_LOAD.
17673         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17677         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17678         split out from..,
17679         (vectorizable_mask_load_store): ...here.
17680         (vectorizable_load): ...and here.
17682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17684         * tree-vect-stmts.c (vect_build_all_ones_mask)
17685         (vect_build_zero_merge_argument): New functions, split out from...
17686         (vectorizable_load): ...here.
17688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17690         * tree-vect-stmts.c (vect_check_store_rhs): New function,
17691         split out from...
17692         (vectorizable_mask_load_store): ...here.
17693         (vectorizable_store): ...and here.
17695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17697         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17698         split out from...
17699         (vectorizable_mask_load_store): ...here.
17701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17703         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
17704         (vect_model_store_cost): Take a vec_load_store_type instead of a
17705         vect_def_type.
17706         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
17707         (vect_model_store_cost): Take a vec_load_store_type instead of a
17708         vect_def_type.
17709         (vectorizable_mask_load_store): Update accordingly.
17710         (vectorizable_store): Likewise.
17711         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
17713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17715         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
17716         IFN_MASK_LOAD calls here rather than...
17717         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
17719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17720             Alan Hayward  <alan.hayward@arm.com>
17721             David Sherwood  <david.sherwood@arm.com>
17723         * expmed.c (extract_bit_field_1): For vector extracts,
17724         fall back to extract_bit_field_as_subreg if vec_extract
17725         isn't available.
17727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17728             Alan Hayward  <alan.hayward@arm.com>
17729             David Sherwood  <david.sherwood@arm.com>
17731         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
17732         they are variable or constant sized.
17733         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
17734         slots for constant-sized data.
17736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17737             Alan Hayward  <alan.hayward@arm.com>
17738             David Sherwood  <david.sherwood@arm.com>
17740         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
17741         handling COND_EXPRs with boolean comparisons, try to find a better
17742         basis for the mask type than the boolean itself.
17744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17746         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
17747         is calculated and how it can be overridden.
17748         * genmodes.c (max_bitsize_mode_any_mode): New variable.
17749         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
17750         if defined.
17751         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
17752         if nonzero.
17754 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17755             Alan Hayward  <alan.hayward@arm.com>
17756             David Sherwood  <david.sherwood@arm.com>
17758         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
17759         Remove the mode argument.
17760         (aarch64_simd_valid_immediate): Remove the mode and inverse
17761         arguments.
17762         * config/aarch64/iterators.md (bitsize): New iterator.
17763         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
17764         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
17765         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
17766         aarch64_simd_valid_immediate.
17767         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
17768         (aarch64_reg_or_bic_imm): Likewise.
17769         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
17770         with an insn_type enum and msl with a modifier_type enum.
17771         Replace element_width with a scalar_mode.  Change the shift
17772         to unsigned int.  Add constructors for scalar_float_mode and
17773         scalar_int_mode elements.
17774         (aarch64_vect_float_const_representable_p): Delete.
17775         (aarch64_can_const_movi_rtx_p)
17776         (aarch64_simd_scalar_immediate_valid_for_move)
17777         (aarch64_simd_make_constant): Update call to
17778         aarch64_simd_valid_immediate.
17779         (aarch64_advsimd_valid_immediate_hs): New function.
17780         (aarch64_advsimd_valid_immediate): Likewise.
17781         (aarch64_simd_valid_immediate): Remove mode and inverse
17782         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
17783         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
17784         and aarch64_float_const_representable_p on the result.
17785         (aarch64_output_simd_mov_immediate): Remove mode argument.
17786         Update call to aarch64_simd_valid_immediate and use of
17787         simd_immediate_info.
17788         (aarch64_output_scalar_simd_mov_immediate): Update call
17789         accordingly.
17791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17792             Alan Hayward  <alan.hayward@arm.com>
17793             David Sherwood  <david.sherwood@arm.com>
17795         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
17796         (mode_nunits): Likewise CONST_MODE_NUNITS.
17797         * machmode.def (ADJUST_NUNITS): Document.
17798         * genmodes.c (mode_data::need_nunits_adj): New field.
17799         (blank_mode): Update accordingly.
17800         (adj_nunits): New variable.
17801         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
17802         parameter.
17803         (emit_mode_size_inline): Set need_bytesize_adj for all modes
17804         listed in adj_nunits.
17805         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
17806         listed in adj_nunits.  Don't emit case statements for such modes.
17807         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
17808         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
17809         nothing if adj_nunits is nonnull.
17810         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
17811         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
17812         (emit_mode_fbit): Update use of print_maybe_const_decl.
17813         (emit_move_size): Likewise.  Treat the array as non-const
17814         if adj_nunits.
17815         (emit_mode_adjustments): Handle adj_nunits.
17817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17819         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
17820         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
17821         (VECTOR_MODES): Use it.
17822         (make_vector_modes): Take the prefix as an argument.
17824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17825             Alan Hayward  <alan.hayward@arm.com>
17826             David Sherwood  <david.sherwood@arm.com>
17828         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
17829         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
17830         for MODE_VECTOR_BOOL.
17831         * machmode.def (VECTOR_BOOL_MODE): Document.
17832         * genmodes.c (VECTOR_BOOL_MODE): New macro.
17833         (make_vector_bool_mode): New function.
17834         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
17835         MODE_VECTOR_BOOL.
17836         * lto-streamer-in.c (lto_input_mode_table): Likewise.
17837         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
17838         Likewise.
17839         * stor-layout.c (int_mode_for_mode): Likewise.
17840         * tree.c (build_vector_type_for_mode): Likewise.
17841         * varasm.c (output_constant_pool_2): Likewise.
17842         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
17843         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
17844         for MODE_VECTOR_BOOL.
17845         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
17846         of mode class checks.
17847         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
17848         instead of a list of mode class checks.
17849         (expand_vector_scalar_condition): Likewise.
17850         (type_for_widest_vector_mode): Handle BImode as an inner mode.
17852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17853             Alan Hayward  <alan.hayward@arm.com>
17854             David Sherwood  <david.sherwood@arm.com>
17856         * machmode.h (mode_size): Change from unsigned short to
17857         poly_uint16_pod.
17858         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
17859         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17860         or if measurement_type is not polynomial.
17861         (fixed_size_mode::includes_p): Check for constant-sized modes.
17862         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
17863         return a poly_uint16 rather than an unsigned short.
17864         (emit_mode_size): Change the type of mode_size from unsigned short
17865         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
17866         (emit_mode_adjustments): Cope with polynomial vector sizes.
17867         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17868         for GET_MODE_SIZE.
17869         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17870         for GET_MODE_SIZE.
17871         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
17872         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
17873         * caller-save.c (setup_save_areas): Likewise.
17874         (replace_reg_with_saved_mem): Likewise.
17875         * calls.c (emit_library_call_value_1): Likewise.
17876         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
17877         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
17878         (gen_lowpart_for_combine): Likewise.
17879         * convert.c (convert_to_integer_1): Likewise.
17880         * cse.c (equiv_constant, cse_insn): Likewise.
17881         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
17882         (cselib_subst_to_values): Likewise.
17883         * dce.c (word_dce_process_block): Likewise.
17884         * df-problems.c (df_word_lr_mark_ref): Likewise.
17885         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
17886         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
17887         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
17888         (rtl_for_decl_location): Likewise.
17889         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
17890         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
17891         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
17892         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
17893         (expand_expr_real_1): Likewise.
17894         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
17895         (pad_below): Likewise.
17896         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17897         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
17898         * ira.c (get_subreg_tracking_sizes): Likewise.
17899         * ira-build.c (ira_create_allocno_objects): Likewise.
17900         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
17901         (ira_sort_regnos_for_alter_reg): Likewise.
17902         * ira-costs.c (record_operand_costs): Likewise.
17903         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
17904         (resolve_simple_move): Likewise.
17905         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
17906         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
17907         (lra_constraints): Likewise.
17908         (CONST_POOL_OK_P): Reject variable-sized modes.
17909         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
17910         (add_pseudo_to_slot, lra_spill): Likewise.
17911         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17912         * optabs-query.c (get_best_extraction_insn): Likewise.
17913         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17914         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
17915         (expand_mult_highpart, valid_multiword_target_p): Likewise.
17916         * recog.c (offsettable_address_addr_space_p): Likewise.
17917         * regcprop.c (maybe_mode_change): Likewise.
17918         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
17919         * regrename.c (build_def_use): Likewise.
17920         * regstat.c (dump_reg_info): Likewise.
17921         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
17922         (find_reloads, find_reloads_subreg_address): Likewise.
17923         * reload1.c (eliminate_regs_1): Likewise.
17924         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
17925         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
17926         (simplify_binary_operation_1, simplify_subreg): Likewise.
17927         * targhooks.c (default_function_arg_padding): Likewise.
17928         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
17929         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
17930         (verify_gimple_assign_ternary): Likewise.
17931         * tree-inline.c (estimate_move_cost): Likewise.
17932         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17933         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
17934         (get_address_cost_ainc): Likewise.
17935         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
17936         (vect_supportable_dr_alignment): Likewise.
17937         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17938         (vectorizable_reduction): Likewise.
17939         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
17940         (vectorizable_operation, vectorizable_load): Likewise.
17941         * tree.c (build_same_sized_truth_vector_type): Likewise.
17942         * valtrack.c (cleanup_auto_inc_dec): Likewise.
17943         * var-tracking.c (emit_note_insn_var_location): Likewise.
17944         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
17945         (ADDR_VEC_ALIGN): Likewise.
17947 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17948             Alan Hayward  <alan.hayward@arm.com>
17949             David Sherwood  <david.sherwood@arm.com>
17951         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
17952         unsigned short.
17953         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17954         or if measurement_type is polynomial.
17955         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
17956         * combine.c (make_extraction): Likewise.
17957         * dse.c (find_shift_sequence): Likewise.
17958         * dwarf2out.c (mem_loc_descriptor): Likewise.
17959         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
17960         (extract_bit_field, extract_low_bits): Likewise.
17961         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
17962         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
17963         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
17964         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
17965         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17966         * reload.c (find_reloads): Likewise.
17967         * reload1.c (alter_reg): Likewise.
17968         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
17969         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
17970         * tree-if-conv.c (predicate_mem_writes): Likewise.
17971         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17972         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
17973         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17974         * valtrack.c (dead_debug_insert_temp): Likewise.
17975         * varasm.c (mergeable_constant_section): Likewise.
17976         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
17978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17979             Alan Hayward  <alan.hayward@arm.com>
17980             David Sherwood  <david.sherwood@arm.com>
17982         * expr.c (expand_assignment): Cope with polynomial mode sizes
17983         when assigning to a CONCAT.
17985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17986             Alan Hayward  <alan.hayward@arm.com>
17987             David Sherwood  <david.sherwood@arm.com>
17989         * machmode.h (mode_precision): Change from unsigned short to
17990         poly_uint16_pod.
17991         (mode_to_precision): Return a poly_uint16 rather than an unsigned
17992         short.
17993         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
17994         or if measurement_type is not polynomial.
17995         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
17996         in which the mode is already known to be a scalar_int_mode.
17997         * genmodes.c (emit_mode_precision): Change the type of mode_precision
17998         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
17999         initializer.
18000         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18001         for GET_MODE_PRECISION.
18002         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18003         for GET_MODE_PRECISION.
18004         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18005         as polynomial.
18006         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18007         (expand_field_assignment, make_extraction): Likewise.
18008         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18009         (get_last_value): Likewise.
18010         * convert.c (convert_to_integer_1): Likewise.
18011         * cse.c (cse_insn): Likewise.
18012         * expr.c (expand_expr_real_1): Likewise.
18013         * lra-constraints.c (simplify_operand_subreg): Likewise.
18014         * optabs-query.c (can_atomic_load_p): Likewise.
18015         * optabs.c (expand_atomic_load): Likewise.
18016         (expand_atomic_store): Likewise.
18017         * ree.c (combine_reaching_defs): Likewise.
18018         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18019         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18020         * tree.h (type_has_mode_precision_p): Likewise.
18021         * ubsan.c (instrument_si_overflow): Likewise.
18023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18024             Alan Hayward  <alan.hayward@arm.com>
18025             David Sherwood  <david.sherwood@arm.com>
18027         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18028         polynomial numbers of units.
18029         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18030         (valid_vector_subparts_p): New function.
18031         (build_vector_type): Remove temporary shim and take the number
18032         of units as a poly_uint64 rather than an int.
18033         (build_opaque_vector_type): Take the number of units as a
18034         poly_uint64 rather than an int.
18035         * tree.c (build_vector_from_ctor): Handle polynomial
18036         TYPE_VECTOR_SUBPARTS.
18037         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18038         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18039         (build_vector_from_val): If the number of units is variable,
18040         use build_vec_duplicate_cst for constant operands and
18041         VEC_DUPLICATE_EXPR otherwise.
18042         (make_vector_type): Remove temporary is_constant ().
18043         (build_vector_type, build_opaque_vector_type): Take the number of
18044         units as a poly_uint64 rather than an int.
18045         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18046         VECTOR_CST_NELTS.
18047         * cfgexpand.c (expand_debug_expr): Likewise.
18048         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18049         (store_constructor, expand_expr_real_1): Likewise.
18050         (const_scalar_mask_from_tree): Likewise.
18051         * fold-const-call.c (fold_const_reduction): Likewise.
18052         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18053         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18054         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18055         (fold_relational_const): Likewise.
18056         (native_interpret_vector): Likewise.  Change the size from an
18057         int to an unsigned int.
18058         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18059         TYPE_VECTOR_SUBPARTS.
18060         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18061         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18062         duplicating a non-constant operand into a variable-length vector.
18063         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18064         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18065         * ipa-icf.c (sem_variable::equals): Likewise.
18066         * match.pd: Likewise.
18067         * omp-simd-clone.c (simd_clone_subparts): Likewise.
18068         * print-tree.c (print_node): Likewise.
18069         * stor-layout.c (layout_type): Likewise.
18070         * targhooks.c (default_builtin_vectorization_cost): Likewise.
18071         * tree-cfg.c (verify_gimple_comparison): Likewise.
18072         (verify_gimple_assign_binary): Likewise.
18073         (verify_gimple_assign_ternary): Likewise.
18074         (verify_gimple_assign_single): Likewise.
18075         * tree-pretty-print.c (dump_generic_node): Likewise.
18076         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18077         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18078         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18079         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18080         (vect_shift_permute_load_chain): Likewise.
18081         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18082         (expand_vector_condition, optimize_vector_constructor): Likewise.
18083         (lower_vec_perm, get_compute_type): Likewise.
18084         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18085         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18086         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18087         (vect_recog_mask_conversion_pattern): Likewise.
18088         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18089         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18090         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18091         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18092         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18093         (vectorizable_shift, vectorizable_operation, vectorizable_store)
18094         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18095         (supportable_widening_operation): Likewise.
18096         (supportable_narrowing_operation): Likewise.
18097         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18098         Likewise.
18099         * varasm.c (output_constant): Likewise.
18101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18102             Alan Hayward  <alan.hayward@arm.com>
18103             David Sherwood  <david.sherwood@arm.com>
18105         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18106         so that both the length == 3 and length != 3 cases set up their
18107         own permute vectors.  Add comments explaining why we know the
18108         number of elements is constant.
18109         (vect_permute_load_chain): Likewise.
18111 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18112             Alan Hayward  <alan.hayward@arm.com>
18113             David Sherwood  <david.sherwood@arm.com>
18115         * machmode.h (mode_nunits): Change from unsigned char to
18116         poly_uint16_pod.
18117         (ONLY_FIXED_SIZE_MODES): New macro.
18118         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18119         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18120         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18121         New typedefs.
18122         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18123         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18124         or if measurement_type is not polynomial.
18125         * genmodes.c (ZERO_COEFFS): New macro.
18126         (emit_mode_nunits_inline): Make mode_nunits_inline return a
18127         poly_uint16.
18128         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18129         Use ZERO_COEFFS when emitting initializers.
18130         * data-streamer.h (bp_pack_poly_value): New function.
18131         (bp_unpack_poly_value): Likewise.
18132         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18133         for GET_MODE_NUNITS.
18134         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18135         for GET_MODE_NUNITS.
18136         * tree.c (make_vector_type): Remove temporary shim and make
18137         the real function take the number of units as a poly_uint64
18138         rather than an int.
18139         (build_vector_type_for_mode): Handle polynomial nunits.
18140         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18141         * emit-rtl.c (const_vec_series_p_1): Likewise.
18142         (gen_rtx_CONST_VECTOR): Likewise.
18143         * fold-const.c (test_vec_duplicate_folding): Likewise.
18144         * genrecog.c (validate_pattern): Likewise.
18145         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18146         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18147         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18148         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18149         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18150         * rtlanal.c (subreg_get_info): Likewise.
18151         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18152         (vect_grouped_load_supported): Likewise.
18153         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18154         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18155         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18156         (simplify_const_unary_operation, simplify_binary_operation_1)
18157         (simplify_const_binary_operation, simplify_ternary_operation)
18158         (test_vector_ops_duplicate, test_vector_ops): Likewise.
18159         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18160         instead of CONST_VECTOR_NUNITS.
18161         * varasm.c (output_constant_pool_2): Likewise.
18162         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18163         explicit-encoded elements in the XVEC for variable-length vectors.
18165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18167         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18170             Alan Hayward  <alan.hayward@arm.com>
18171             David Sherwood  <david.sherwood@arm.com>
18173         * coretypes.h (fixed_size_mode): Declare.
18174         (fixed_size_mode_pod): New typedef.
18175         * builtins.h (target_builtins::x_apply_args_mode)
18176         (target_builtins::x_apply_result_mode): Change type to
18177         fixed_size_mode_pod.
18178         * builtins.c (apply_args_size, apply_result_size, result_vector)
18179         (expand_builtin_apply_args_1, expand_builtin_apply)
18180         (expand_builtin_return): Update accordingly.
18182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18184         * cse.c (hash_rtx_cb): Hash only the encoded elements.
18185         * cselib.c (cselib_hash_rtx): Likewise.
18186         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18187         CONST_VECTOR encoding.
18189 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18190             Jeff Law  <law@redhat.com>
18192         PR target/83641
18193         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18194         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18195         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18196         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18198         PR target/83641
18199         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18200         explicitly probe *sp in a noreturn function if there were any callee
18201         register saves or frame pointer is needed.
18203 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18205         PR debug/83621
18206         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18207         BLKmode for ternary, binary or unary expressions.
18209         PR debug/83645
18210         * var-tracking.c (delete_vta_debug_insn): New inline function.
18211         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18212         insns from get_insns () to NULL instead of each bb separately.
18213         Use delete_vta_debug_insn.  No longer static.
18214         (vt_debug_insns_local, variable_tracking_main_1): Adjust
18215         delete_vta_debug_insns callers.
18216         * rtl.h (delete_vta_debug_insns): Declare.
18217         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18218         instead of variable_tracking_main.
18220 2018-01-03  Martin Sebor  <msebor@redhat.com>
18222         PR tree-optimization/83603
18223         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18224         arguments past the endof the argument list in functions declared
18225         without a prototype.
18226         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18227         Avoid checking when arguments are null.
18229 2018-01-03  Martin Sebor  <msebor@redhat.com>
18231         PR c/83559
18232         * doc/extend.texi (attribute const): Fix a typo.
18233         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18234         issuing -Wsuggest-attribute for void functions.
18236 2018-01-03  Martin Sebor  <msebor@redhat.com>
18238         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18239         offset_int::from instead of wide_int::to_shwi.
18240         (maybe_diag_overlap): Remove assertion.
18241         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18242         * gimple-ssa-sprintf.c (format_directive): Same.
18243         (parse_directive): Same.
18244         (sprintf_dom_walker::compute_format_length): Same.
18245         (try_substitute_return_value): Same.
18247 2018-01-03  Jeff Law  <law@redhat.com>
18249         PR middle-end/83654
18250         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18251         non-constant residual for zero at runtime and avoid probing in
18252         that case.  Reorganize code for trailing problem to mirror handling
18253         of the residual.
18255 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18257         PR tree-optimization/83501
18258         * tree-ssa-strlen.c (get_string_cst): New.
18259         (handle_char_store): Call get_string_cst.
18261 2018-01-03  Martin Liska  <mliska@suse.cz>
18263         PR tree-optimization/83593
18264         * tree-ssa-strlen.c: Include tree-cfg.h.
18265         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18266         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18267         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18268         to false.
18269         (strlen_dom_walker::before_dom_children): Call
18270         gimple_purge_dead_eh_edges. Dump tranformation with details
18271         dump flags.
18272         (strlen_dom_walker::before_dom_children): Update call by adding
18273         new argument cleanup_eh.
18274         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18276 2018-01-03  Martin Liska  <mliska@suse.cz>
18278         PR ipa/83549
18279         * cif-code.def (VARIADIC_THUNK): New enum value.
18280         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18281         thunks.
18283 2018-01-03  Jan Beulich  <jbeulich@suse.com>
18285         * sse.md (mov<mode>_internal): Tighten condition for when to use
18286         vmovdqu<ssescalarsize> for TI and OI modes.
18288 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18290         Update copyright years.
18292 2018-01-03  Martin Liska  <mliska@suse.cz>
18294         PR ipa/83594
18295         * ipa-visibility.c (function_and_variable_visibility): Skip
18296         functions with noipa attribure.
18298 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18300         * gcc.c (process_command): Update copyright notice dates.
18301         * gcov-dump.c (print_version): Ditto.
18302         * gcov.c (print_version): Ditto.
18303         * gcov-tool.c (print_version): Ditto.
18304         * gengtype.c (create_file): Ditto.
18305         * doc/cpp.texi: Bump @copying's copyright year.
18306         * doc/cppinternals.texi: Ditto.
18307         * doc/gcc.texi: Ditto.
18308         * doc/gccint.texi: Ditto.
18309         * doc/gcov.texi: Ditto.
18310         * doc/install.texi: Ditto.
18311         * doc/invoke.texi: Ditto.
18313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18315         * vector-builder.h (vector_builder::m_full_nelts): Change from
18316         unsigned int to poly_uint64.
18317         (vector_builder::full_nelts): Update prototype accordingly.
18318         (vector_builder::new_vector): Likewise.
18319         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18320         (vector_builder::operator ==): Likewise.
18321         (vector_builder::finalize): Likewise.
18322         * int-vector-builder.h (int_vector_builder::int_vector_builder):
18323         Take the number of elements as a poly_uint64 rather than an
18324         unsigned int.
18325         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18326         from unsigned int to poly_uint64.
18327         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18328         (vec_perm_indices::new_vector): Likewise.
18329         (vec_perm_indices::length): Likewise.
18330         (vec_perm_indices::nelts_per_input): Likewise.
18331         (vec_perm_indices::input_nelts): Likewise.
18332         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18333         number of elements per input as a poly_uint64 rather than an
18334         unsigned int.  Use the original encoding for variable-length
18335         vectors, rather than clamping each individual element.
18336         For the second and subsequent elements in each pattern,
18337         clamp the step and base before clamping their sum.
18338         (vec_perm_indices::series_p): Handle polynomial element counts.
18339         (vec_perm_indices::all_in_range_p): Likewise.
18340         (vec_perm_indices_to_tree): Likewise.
18341         (vec_perm_indices_to_rtx): Likewise.
18342         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18343         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18344         (tree_vector_builder::new_binary_operation): Handle polynomial
18345         element counts.  Return false if we need to know the number
18346         of elements at compile time.
18347         * fold-const.c (fold_vec_perm): Punt if the number of elements
18348         isn't known at compile time.
18350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18352         * vec-perm-indices.h (vec_perm_builder): Change element type
18353         from HOST_WIDE_INT to poly_int64.
18354         (vec_perm_indices::element_type): Update accordingly.
18355         (vec_perm_indices::clamp): Handle polynomial element_types.
18356         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18357         (vec_perm_indices::all_in_range_p): Likewise.
18358         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18359         than shwi trees.
18360         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18361         polynomial vec_perm_indices element types.
18362         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18363         * fold-const.c (fold_vec_perm): Likewise.
18364         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18365         * tree-vect-generic.c (lower_vec_perm): Likewise.
18366         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18367         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18368         element type to HOST_WIDE_INT.
18370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18371             Alan Hayward  <alan.hayward@arm.com>
18372             David Sherwood  <david.sherwood@arm.com>
18374         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18375         rather than an int.  Use plus_constant.
18376         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18377         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18380             Alan Hayward  <alan.hayward@arm.com>
18381             David Sherwood  <david.sherwood@arm.com>
18383         * calls.c (emit_call_1, expand_call): Change struct_value_size from
18384         a HOST_WIDE_INT to a poly_int64.
18386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18387             Alan Hayward  <alan.hayward@arm.com>
18388             David Sherwood  <david.sherwood@arm.com>
18390         * calls.c (load_register_parameters): Cope with polynomial
18391         mode sizes.  Require a constant size for BLKmode parameters
18392         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
18393         forces a parameter to be padded at the lsb end in order to
18394         fill a complete number of words, require the parameter size
18395         to be ordered wrt UNITS_PER_WORD.
18397 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18398             Alan Hayward  <alan.hayward@arm.com>
18399             David Sherwood  <david.sherwood@arm.com>
18401         * reload1.c (spill_stack_slot_width): Change element type
18402         from unsigned int to poly_uint64_pod.
18403         (alter_reg): Treat mode sizes as polynomial.
18405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18406             Alan Hayward  <alan.hayward@arm.com>
18407             David Sherwood  <david.sherwood@arm.com>
18409         * reload.c (complex_word_subreg_p): New function.
18410         (reload_inner_reg_of_subreg, push_reload): Use it.
18412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18413             Alan Hayward  <alan.hayward@arm.com>
18414             David Sherwood  <david.sherwood@arm.com>
18416         * lra-constraints.c (process_alt_operands): Reject matched
18417         operands whose sizes aren't ordered.
18418         (match_reload): Refer to this check here.
18420 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18421             Alan Hayward  <alan.hayward@arm.com>
18422             David Sherwood  <david.sherwood@arm.com>
18424         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18425         that the mode size is in the set {1, 2, 4, 8, 16}.
18427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18428             Alan Hayward  <alan.hayward@arm.com>
18429             David Sherwood  <david.sherwood@arm.com>
18431         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18432         Use plus_constant instead of gen_rtx_PLUS.
18434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18435             Alan Hayward  <alan.hayward@arm.com>
18436             David Sherwood  <david.sherwood@arm.com>
18438         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18439         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18440         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18441         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18442         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18443         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18444         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18445         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18446         * config/i386/i386.c (ix86_push_rounding): ...this new function.
18447         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18448         a poly_int64.
18449         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18450         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18451         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18452         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18453         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18454         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18455         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18456         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18457         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18458         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18459         function.
18460         * expr.c (emit_move_resolve_push): Treat the input and result
18461         of PUSH_ROUNDING as a poly_int64.
18462         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18463         (emit_push_insn): Likewise.
18464         * lra-eliminations.c (mark_not_eliminable): Likewise.
18465         * recog.c (push_operand): Likewise.
18466         * reload1.c (elimination_effects): Likewise.
18467         * rtlanal.c (nonzero_bits1): Likewise.
18468         * calls.c (store_one_arg): Likewise.  Require the padding to be
18469         known at compile time.
18471 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18472             Alan Hayward  <alan.hayward@arm.com>
18473             David Sherwood  <david.sherwood@arm.com>
18475         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18476         Use plus_constant instead of gen_rtx_PLUS.
18478 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18479             Alan Hayward  <alan.hayward@arm.com>
18480             David Sherwood  <david.sherwood@arm.com>
18482         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18483         rather than an int.
18485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18486             Alan Hayward  <alan.hayward@arm.com>
18487             David Sherwood  <david.sherwood@arm.com>
18489         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18490         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18491         via stack temporaries.  Treat the mode size as polynomial too.
18493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18494             Alan Hayward  <alan.hayward@arm.com>
18495             David Sherwood  <david.sherwood@arm.com>
18497         * expr.c (expand_expr_real_2): When handling conversions involving
18498         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18499         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
18500         as a poly_uint64 too.
18502 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18503             Alan Hayward  <alan.hayward@arm.com>
18504             David Sherwood  <david.sherwood@arm.com>
18506         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18508 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18509             Alan Hayward  <alan.hayward@arm.com>
18510             David Sherwood  <david.sherwood@arm.com>
18512         * combine.c (can_change_dest_mode): Handle polynomial
18513         REGMODE_NATURAL_SIZE.
18514         * expmed.c (store_bit_field_1): Likewise.
18515         * expr.c (store_constructor): Likewise.
18516         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18517         and polynomial REGMODE_NATURAL_SIZE.
18518         (gen_lowpart_common): Likewise.
18519         * reginfo.c (record_subregs_of_mode): Likewise.
18520         * rtlanal.c (read_modify_subreg_p): Likewise.
18522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18523             Alan Hayward  <alan.hayward@arm.com>
18524             David Sherwood  <david.sherwood@arm.com>
18526         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18527         numbers of elements.
18529 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18530             Alan Hayward  <alan.hayward@arm.com>
18531             David Sherwood  <david.sherwood@arm.com>
18533         * match.pd: Cope with polynomial numbers of vector elements.
18535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18536             Alan Hayward  <alan.hayward@arm.com>
18537             David Sherwood  <david.sherwood@arm.com>
18539         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
18540         in a POINTER_PLUS_EXPR.
18542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18543             Alan Hayward  <alan.hayward@arm.com>
18544             David Sherwood  <david.sherwood@arm.com>
18546         * omp-simd-clone.c (simd_clone_subparts): New function.
18547         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
18548         (ipa_simd_modify_function_body): Likewise.
18550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18551             Alan Hayward  <alan.hayward@arm.com>
18552             David Sherwood  <david.sherwood@arm.com>
18554         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
18555         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
18556         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
18557         (expand_vector_condition, vector_element): Likewise.
18558         (subparts_gt): New function.
18559         (get_compute_type): Use subparts_gt.
18560         (count_type_subparts): Delete.
18561         (expand_vector_operations_1): Use subparts_gt instead of
18562         count_type_subparts.
18564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18565             Alan Hayward  <alan.hayward@arm.com>
18566             David Sherwood  <david.sherwood@arm.com>
18568         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18569         (vect_compile_time_alias): ...this new function.  Do the calculation
18570         on poly_ints rather than trees.
18571         (vect_prune_runtime_alias_test_list): Update call accordingly.
18573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18574             Alan Hayward  <alan.hayward@arm.com>
18575             David Sherwood  <david.sherwood@arm.com>
18577         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18578         numbers of units.
18579         (vect_schedule_slp_instance): Likewise.
18581 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18582             Alan Hayward  <alan.hayward@arm.com>
18583             David Sherwood  <david.sherwood@arm.com>
18585         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18586         constant and extern definitions for variable-length vectors.
18587         (vect_get_constant_vectors): Note that the number of units
18588         is known to be constant.
18590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18591             Alan Hayward  <alan.hayward@arm.com>
18592             David Sherwood  <david.sherwood@arm.com>
18594         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18595         of units as polynomial.  Choose between WIDE and NARROW based
18596         on multiple_p.
18598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18599             Alan Hayward  <alan.hayward@arm.com>
18600             David Sherwood  <david.sherwood@arm.com>
18602         * tree-vect-stmts.c (simd_clone_subparts): New function.
18603         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18606             Alan Hayward  <alan.hayward@arm.com>
18607             David Sherwood  <david.sherwood@arm.com>
18609         * tree-vect-stmts.c (vectorizable_call): Treat the number of
18610         vectors as polynomial.  Use build_index_vector for
18611         IFN_GOMP_SIMD_LANE.
18613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18614             Alan Hayward  <alan.hayward@arm.com>
18615             David Sherwood  <david.sherwood@arm.com>
18617         * tree-vect-stmts.c (get_load_store_type): Treat the number of
18618         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18619         for variable-length vectors.
18620         (vectorizable_mask_load_store): Treat the number of units as
18621         polynomial, asserting that it is constant if the condition has
18622         already been enforced.
18623         (vectorizable_store, vectorizable_load): Likewise.
18625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18626             Alan Hayward  <alan.hayward@arm.com>
18627             David Sherwood  <david.sherwood@arm.com>
18629         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18630         of units as polynomial.  Punt if we can't tell at compile time
18631         which vector contains the final result.
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         * tree-vect-loop.c (vectorizable_induction): Treat the number
18638         of units as polynomial.  Punt on SLP inductions.  Use an integer
18639         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
18640         cast of such a series for variable-length floating-point
18641         reductions.
18643 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18644             Alan Hayward  <alan.hayward@arm.com>
18645             David Sherwood  <david.sherwood@arm.com>
18647         * tree.h (build_index_vector): Declare.
18648         * tree.c (build_index_vector): New function.
18649         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18650         of units as polynomial, forcibly converting it to a constant if
18651         vectorizable_reduction has already enforced the condition.
18652         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
18653         to create a {1,2,3,...} vector.
18654         (vectorizable_reduction): Treat the number of units as polynomial.
18655         Choose vectype_in based on the largest scalar element size rather
18656         than the smallest number of units.  Enforce the restrictions
18657         relied on above.
18659 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18660             Alan Hayward  <alan.hayward@arm.com>
18661             David Sherwood  <david.sherwood@arm.com>
18663         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18664         number of units as polynomial.
18666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18667             Alan Hayward  <alan.hayward@arm.com>
18668             David Sherwood  <david.sherwood@arm.com>
18670         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18671         * target.def (autovectorize_vector_sizes): Return the vector sizes
18672         by pointer, using vector_sizes rather than a bitmask.
18673         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18674         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18675         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18676         Likewise.
18677         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18678         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18679         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18680         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18681         * omp-general.c (omp_max_vf): Likewise.
18682         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18683         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18684         * tree-vect-loop.c (vect_analyze_loop): Likewise.
18685         * tree-vect-slp.c (vect_slp_bb): Likewise.
18686         * doc/tm.texi: Regenerate.
18687         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18688         to a poly_uint64.
18689         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18690         the vector size as a poly_uint64 rather than an unsigned int.
18691         (current_vector_size): Change from an unsigned int to a poly_uint64.
18692         (get_vectype_for_scalar_type): Update accordingly.
18693         * tree.h (build_truth_vector_type): Take the size and number of
18694         units as a poly_uint64 rather than an unsigned int.
18695         (build_vector_type): Add a temporary overload that takes
18696         the number of units as a poly_uint64 rather than an unsigned int.
18697         * tree.c (make_vector_type): Likewise.
18698         (build_truth_vector_type): Take the number of units as a poly_uint64
18699         rather than an unsigned int.
18701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18702             Alan Hayward  <alan.hayward@arm.com>
18703             David Sherwood  <david.sherwood@arm.com>
18705         * target.def (get_mask_mode): Take the number of units and length
18706         as poly_uint64s rather than unsigned ints.
18707         * targhooks.h (default_get_mask_mode): Update accordingly.
18708         * targhooks.c (default_get_mask_mode): Likewise.
18709         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18710         * doc/tm.texi: Regenerate.
18712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18713             Alan Hayward  <alan.hayward@arm.com>
18714             David Sherwood  <david.sherwood@arm.com>
18716         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
18717         * omp-general.c (omp_max_vf): Likewise.
18718         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
18719         (expand_omp_simd): Handle polynomial safelen.
18720         * omp-low.c (omplow_simd_context): Add a default constructor.
18721         (omplow_simd_context::max_vf): Change from int to poly_uint64.
18722         (lower_rec_simd_input_clauses): Update accordingly.
18723         (lower_rec_input_clauses): Likewise.
18725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18726             Alan Hayward  <alan.hayward@arm.com>
18727             David Sherwood  <david.sherwood@arm.com>
18729         * tree-vectorizer.h (vect_nunits_for_cost): New function.
18730         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
18731         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
18732         (vect_analyze_slp_cost): Likewise.
18733         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
18734         (vect_model_load_cost): Likewise.
18736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18737             Alan Hayward  <alan.hayward@arm.com>
18738             David Sherwood  <david.sherwood@arm.com>
18740         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
18741         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
18742         from an unsigned int * to a poly_uint64_pod *.
18743         (calculate_unrolling_factor): New function.
18744         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
18746 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18747             Alan Hayward  <alan.hayward@arm.com>
18748             David Sherwood  <david.sherwood@arm.com>
18750         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
18751         from an unsigned int to a poly_uint64.
18752         (_loop_vec_info::slp_unrolling_factor): Likewise.
18753         (_loop_vec_info::vectorization_factor): Change from an int
18754         to a poly_uint64.
18755         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
18756         (vect_get_num_vectors): New function.
18757         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
18758         (vect_get_num_copies): Use vect_get_num_vectors.
18759         (vect_analyze_data_ref_dependences): Change max_vf from an int *
18760         to an unsigned int *.
18761         (vect_analyze_data_refs): Change min_vf from an int * to a
18762         poly_uint64 *.
18763         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18764         than an unsigned HOST_WIDE_INT.
18765         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
18766         (vect_analyze_data_ref_dependence): Change max_vf from an int *
18767         to an unsigned int *.
18768         (vect_analyze_data_ref_dependences): Likewise.
18769         (vect_compute_data_ref_alignment): Handle polynomial vf.
18770         (vect_enhance_data_refs_alignment): Likewise.
18771         (vect_prune_runtime_alias_test_list): Likewise.
18772         (vect_shift_permute_load_chain): Likewise.
18773         (vect_supportable_dr_alignment): Likewise.
18774         (dependence_distance_ge_vf): Take the vectorization factor as a
18775         poly_uint64 rather than an unsigned HOST_WIDE_INT.
18776         (vect_analyze_data_refs): Change min_vf from an int * to a
18777         poly_uint64 *.
18778         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
18779         vfm1 as a poly_uint64 rather than an int.  Make the same change
18780         for the returned bound_scalar.
18781         (vect_gen_vector_loop_niters): Handle polynomial vf.
18782         (vect_do_peeling): Likewise.  Update call to
18783         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
18784         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
18785         be constant.
18786         * tree-vect-loop.c (vect_determine_vectorization_factor)
18787         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
18788         (vect_get_known_peeling_cost): Likewise.
18789         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
18790         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
18791         (vect_transform_loop): Likewise.  Use the lowest possible VF when
18792         updating the upper bounds of the loop.
18793         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
18794         rather than an int.
18795         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
18796         polynomial unroll factors.
18797         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
18798         (vect_make_slp_decision): Likewise.
18799         (vect_supported_load_permutation_p): Likewise, and polynomial
18800         vf too.
18801         (vect_analyze_slp_cost): Handle polynomial vf.
18802         (vect_slp_analyze_node_operations): Likewise.
18803         (vect_slp_analyze_bb_1): Likewise.
18804         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18805         than an unsigned HOST_WIDE_INT.
18806         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
18807         (vectorizable_load): Handle polynomial vf.
18808         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
18809         a poly_uint64.
18810         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
18812 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18813             Alan Hayward  <alan.hayward@arm.com>
18814             David Sherwood  <david.sherwood@arm.com>
18816         * match.pd: Handle bit operations involving three constants
18817         and try to fold one pair.
18819 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18821         * tree-vect-loop-manip.c: Include gimple-fold.h.
18822         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
18823         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
18824         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
18825         Add a path that uses a step of VF instead of 1, but disable it
18826         for now.
18827         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
18828         and niters_no_overflow parameters.  Update calls to
18829         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
18830         Create a new SSA name if the latter choses to use a ste other
18831         than zero, and return it via niters_vector_mult_vf_var.
18832         * tree-vect-loop.c (vect_transform_loop): Update calls to
18833         vect_do_peeling, vect_gen_vector_loop_niters and
18834         slpeel_make_loop_iterate_ntimes.
18835         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
18836         (vect_gen_vector_loop_niters): Update declarations after above changes.
18838 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
18840         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
18841         128-bit round to integer instructions.
18842         (ceil<mode>2): Likewise.
18843         (btrunc<mode>2): Likewise.
18844         (round<mode>2): Likewise.
18846 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18848         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
18849         unaligned VSX load/store on P8/P9.
18850         (expand_block_clear): Allow the use of unaligned VSX
18851         load/store on P8/P9.
18853 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18855         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
18856         New function.
18857         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
18858         swap associated with both a load and a store.
18860 2018-01-02  Andrew Waterman  <andrew@sifive.com>
18862         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
18863         * config/riscv/riscv.md (clear_cache): Use it.
18865 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
18867         * web.c: Remove out-of-date comment.
18869 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18871         * expr.c (fixup_args_size_notes): Check that any existing
18872         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
18873         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
18874         (emit_single_push_insn): ...here.
18876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18878         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
18879         (const_vector_encoded_nelts): New function.
18880         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
18881         (const_vector_int_elt, const_vector_elt): Declare.
18882         * emit-rtl.c (const_vector_int_elt_1): New function.
18883         (const_vector_elt): Likewise.
18884         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
18885         of CONST_VECTOR_ELT.
18887 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18889         * expr.c: Include rtx-vector-builder.h.
18890         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
18891         directly on the tree encoding.
18892         (const_vector_from_tree): Likewise.
18893         * optabs.c: Include rtx-vector-builder.h.
18894         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
18895         sequence of "u" values.
18896         * vec-perm-indices.c: Include rtx-vector-builder.h.
18897         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
18898         directly on the vec_perm_indices encoding.
18900 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18902         * doc/rtl.texi (const_vector): Describe new encoding scheme.
18903         * Makefile.in (OBJS): Add rtx-vector-builder.o.
18904         * rtx-vector-builder.h: New file.
18905         * rtx-vector-builder.c: Likewise.
18906         * rtl.h (rtx_def::u2): Add a const_vector field.
18907         (CONST_VECTOR_NPATTERNS): New macro.
18908         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
18909         (CONST_VECTOR_DUPLICATE_P): Likewise.
18910         (CONST_VECTOR_STEPPED_P): Likewise.
18911         (CONST_VECTOR_ENCODED_ELT): Likewise.
18912         (const_vec_duplicate_p): Check for a duplicated vector encoding.
18913         (unwrap_const_vec_duplicate): Likewise.
18914         (const_vec_series_p): Check for a non-duplicated vector encoding.
18915         Say that the function only returns true for integer vectors.
18916         * emit-rtl.c: Include rtx-vector-builder.h.
18917         (gen_const_vec_duplicate_1): Delete.
18918         (gen_const_vector): Call gen_const_vec_duplicate instead of
18919         gen_const_vec_duplicate_1.
18920         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
18921         (gen_const_vec_duplicate): Use rtx_vector_builder.
18922         (gen_const_vec_series): Likewise.
18923         (gen_rtx_CONST_VECTOR): Likewise.
18924         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
18925         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18926         Build a new vector rather than modifying a CONST_VECTOR in-place.
18927         (handle_special_swappables): Update call accordingly.
18928         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
18929         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18930         Build a new vector rather than modifying a CONST_VECTOR in-place.
18931         (handle_special_swappables): Update call accordingly.
18933 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18935         * simplify-rtx.c (simplify_const_binary_operation): Use
18936         CONST_VECTOR_ELT instead of XVECEXP.
18938 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18940         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
18941         the selector elements to be different from the data elements
18942         if the selector is a VECTOR_CST.
18943         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
18944         ssizetype for the selector.
18946 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18948         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
18949         before testing each element individually.
18950         * tree-vect-generic.c (lower_vec_perm): Likewise.
18952 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18954         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
18955         * selftest-run-tests.c (selftest::run_tests): Call it.
18956         * vector-builder.h (vector_builder::operator ==): New function.
18957         (vector_builder::operator !=): Likewise.
18958         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
18959         (vec_perm_indices::all_from_input_p): New function.
18960         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18961         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
18962         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
18963         instead of reading the VECTOR_CST directly.  Detect whether both
18964         vector inputs are the same before constructing the vec_perm_indices,
18965         and update the number of inputs argument accordingly.  Use the
18966         utility functions added above.  Only construct sel2 if we need to.
18968 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18970         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
18971         the broadcast of the low byte.
18972         (expand_mult_highpart): Use an explicit encoding for the permutes.
18973         * optabs-query.c (can_mult_highpart_p): Likewise.
18974         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
18975         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18976         (vectorizable_bswap): Likewise.
18977         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
18978         explicit encoding for the power-of-2 permutes.
18979         (vect_permute_store_chain): Likewise.
18980         (vect_grouped_load_supported): Likewise.
18981         (vect_permute_load_chain): Likewise.
18983 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18985         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
18986         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
18987         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
18988         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18989         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
18990         (vect_gen_perm_mask_any): Likewise.
18992 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18994         * int-vector-builder.h: New file.
18995         * vec-perm-indices.h: Include int-vector-builder.h.
18996         (vec_perm_indices): Redefine as an int_vector_builder.
18997         (auto_vec_perm_indices): Delete.
18998         (vec_perm_builder): Redefine as a stand-alone class.
18999         (vec_perm_indices::vec_perm_indices): New function.
19000         (vec_perm_indices::clamp): Likewise.
19001         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19002         (vec_perm_indices::new_vector): New function.
19003         (vec_perm_indices::new_expanded_vector): Update for new
19004         vec_perm_indices class.
19005         (vec_perm_indices::rotate_inputs): New function.
19006         (vec_perm_indices::all_in_range_p): Operate directly on the
19007         encoded form, without computing elided elements.
19008         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19009         encoding.  Update for new vec_perm_indices class.
19010         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19011         the given vec_perm_builder.
19012         (expand_vec_perm_var): Update vec_perm_builder constructor.
19013         (expand_mult_highpart): Use vec_perm_builder instead of
19014         auto_vec_perm_indices.
19015         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19016         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
19017         or double series encoding as appropriate.
19018         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19019         vec_perm_indices instead of auto_vec_perm_indices.
19020         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19021         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19022         (vect_permute_store_chain): Likewise.
19023         (vect_grouped_load_supported): Likewise.
19024         (vect_permute_load_chain): Likewise.
19025         (vect_shift_permute_load_chain): Likewise.
19026         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19027         (vect_transform_slp_perm_load): Likewise.
19028         (vect_schedule_slp_instance): Likewise.
19029         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19030         (vectorizable_mask_load_store): Likewise.
19031         (vectorizable_bswap): Likewise.
19032         (vectorizable_store): Likewise.
19033         (vectorizable_load): Likewise.
19034         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19035         vec_perm_indices instead of auto_vec_perm_indices.  Use
19036         tree_to_vec_perm_builder to read the vector from a tree.
19037         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19038         vec_perm_builder instead of a vec_perm_indices.
19039         (have_whole_vector_shift): Use vec_perm_builder and
19040         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
19041         truncation to calc_vec_perm_mask_for_shift.
19042         (vect_create_epilog_for_reduction): Likewise.
19043         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19044         from auto_vec_perm_indices to vec_perm_indices.
19045         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19046         instead of changing individual elements.
19047         (aarch64_vectorize_vec_perm_const): Use new_vector to install
19048         the vector in d.perm.
19049         * config/arm/arm.c (expand_vec_perm_d::perm): Change
19050         from auto_vec_perm_indices to vec_perm_indices.
19051         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19052         instead of changing individual elements.
19053         (arm_vectorize_vec_perm_const): Use new_vector to install
19054         the vector in d.perm.
19055         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19056         Update vec_perm_builder constructor.
19057         (rs6000_expand_interleave): Likewise.
19058         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19059         (rs6000_expand_interleave): Likewise.
19061 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19063         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19064         to qimode could truncate the indices.
19065         * optabs.c (expand_vec_perm_var): Likewise.
19067 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19069         * Makefile.in (OBJS): Add vec-perm-indices.o.
19070         * vec-perm-indices.h: New file.
19071         * vec-perm-indices.c: Likewise.
19072         * target.h (vec_perm_indices): Replace with a forward class
19073         declaration.
19074         (auto_vec_perm_indices): Move to vec-perm-indices.h.
19075         * optabs.h: Include vec-perm-indices.h.
19076         (expand_vec_perm): Delete.
19077         (selector_fits_mode_p, expand_vec_perm_var): Declare.
19078         (expand_vec_perm_const): Declare.
19079         * target.def (vec_perm_const_ok): Replace with...
19080         (vec_perm_const): ...this new hook.
19081         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19082         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19083         * doc/tm.texi: Regenerate.
19084         * optabs.def (vec_perm_const): Delete.
19085         * doc/md.texi (vec_perm_const): Likewise.
19086         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19087         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19088         expand_vec_perm for constant permutation vectors.  Assert that
19089         the mode of variable permutation vectors is the integer equivalent
19090         of the mode that is being permuted.
19091         * optabs-query.h (selector_fits_mode_p): Declare.
19092         * optabs-query.c: Include vec-perm-indices.h.
19093         (selector_fits_mode_p): New function.
19094         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19095         is defined, instead of checking whether the vec_perm_const_optab
19096         exists.  Use targetm.vectorize.vec_perm_const instead of
19097         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
19098         fit in the vector mode before using a variable permute.
19099         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19100         vec_perm_indices instead of an rtx.
19101         (expand_vec_perm): Replace with...
19102         (expand_vec_perm_const): ...this new function.  Take the selector
19103         as a vec_perm_indices rather than an rtx.  Also take the mode of
19104         the selector.  Update call to shift_amt_for_vec_perm_mask.
19105         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19106         Use vec_perm_indices::new_expanded_vector to expand the original
19107         selector into bytes.  Check whether the indices fit in the vector
19108         mode before using a variable permute.
19109         (expand_vec_perm_var): Make global.
19110         (expand_mult_highpart): Use expand_vec_perm_const.
19111         * fold-const.c: Includes vec-perm-indices.h.
19112         * tree-ssa-forwprop.c: Likewise.
19113         * tree-vect-data-refs.c: Likewise.
19114         * tree-vect-generic.c: Likewise.
19115         * tree-vect-loop.c: Likewise.
19116         * tree-vect-slp.c: Likewise.
19117         * tree-vect-stmts.c: Likewise.
19118         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19119         Delete.
19120         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19121         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19122         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19123         (aarch64_vectorize_vec_perm_const): ...this new function.
19124         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19125         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19126         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19127         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19128         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19129         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19130         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19131         into...
19132         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
19133         check for NEON modes.
19134         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19135         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19136         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19137         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19138         into...
19139         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
19140         the old VEC_PERM_CONST conditions.
19141         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19142         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19143         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19144         (ia64_vectorize_vec_perm_const_ok): Merge into...
19145         (ia64_vectorize_vec_perm_const): ...this new function.
19146         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19147         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19148         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19149         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19150         * config/mips/mips.c (mips_expand_vec_perm_const)
19151         (mips_vectorize_vec_perm_const_ok): Merge into...
19152         (mips_vectorize_vec_perm_const): ...this new function.
19153         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19154         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19155         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19156         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19157         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19158         (rs6000_expand_vec_perm_const): Delete.
19159         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19160         Delete.
19161         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19162         (altivec_expand_vec_perm_const_le): Take each operand individually.
19163         Operate on constant selectors rather than rtxes.
19164         (altivec_expand_vec_perm_const): Likewise.  Update call to
19165         altivec_expand_vec_perm_const_le.
19166         (rs6000_expand_vec_perm_const): Delete.
19167         (rs6000_vectorize_vec_perm_const_ok): Delete.
19168         (rs6000_vectorize_vec_perm_const): New function.
19169         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19170         an element count and rtx array.
19171         (rs6000_expand_extract_even): Update call accordingly.
19172         (rs6000_expand_interleave): Likewise.
19173         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19174         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19175         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19176         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19177         (rs6000_expand_vec_perm_const): Delete.
19178         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19179         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19180         (altivec_expand_vec_perm_const_le): Take each operand individually.
19181         Operate on constant selectors rather than rtxes.
19182         (altivec_expand_vec_perm_const): Likewise.  Update call to
19183         altivec_expand_vec_perm_const_le.
19184         (rs6000_expand_vec_perm_const): Delete.
19185         (rs6000_vectorize_vec_perm_const_ok): Delete.
19186         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
19187         reference to the SPE evmerge intructions.
19188         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19189         an element count and rtx array.
19190         (rs6000_expand_extract_even): Update call accordingly.
19191         (rs6000_expand_interleave): Likewise.
19192         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19193         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19194         new function.
19195         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19197 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19199         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19200         vector mode and that that mode matches the mode of the data
19201         being permuted.
19202         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19203         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
19204         directly using expand_vec_perm_1 when forcing selectors into
19205         registers.
19206         (expand_vec_perm_var): New function, split out from expand_vec_perm.
19208 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19210         * optabs-query.h (can_vec_perm_p): Delete.
19211         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19212         * optabs-query.c (can_vec_perm_p): Split into...
19213         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19214         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19215         particular selector is valid.
19216         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19217         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19218         (vect_grouped_load_supported): Likewise.
19219         (vect_shift_permute_load_chain): Likewise.
19220         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19221         (vect_transform_slp_perm_load): Likewise.
19222         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19223         (vectorizable_bswap): Likewise.
19224         (vect_gen_perm_mask_checked): Likewise.
19225         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
19226         implementations of variable permutation vectors into account
19227         when deciding which selector to use.
19228         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19229         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19230         with a false third argument.
19231         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19232         to test whether the constant selector is valid and can_vec_perm_var_p
19233         to test whether a variable selector is valid.
19235 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19237         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19238         * optabs-query.c (can_vec_perm_p): Likewise.
19239         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19240         instead of vec_perm_indices.
19241         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19242         (vect_gen_perm_mask_checked): Likewise,
19243         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19244         (vect_gen_perm_mask_checked): Likewise,
19246 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19248         * optabs-query.h (qimode_for_vec_perm): Declare.
19249         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19250         (qimode_for_vec_perm): ...this new function.
19251         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19253 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19255         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19256         does not have a conditional at the top.
19258 2018-01-02  Richard Biener  <rguenther@suse.de>
19260         * ipa-inline.c (big_speedup_p): Fix expression.
19262 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19264         PR target/81616
19265         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19266         for generic 4->6.
19268 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19270         PR target/81616
19271         Generic tuning.
19272         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19273         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19274         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19275         cond_taken_branch_cost 3->4.
19277 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
19279         PR tree-optimization/83581
19280         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19281         TODO_cleanup_cfg if any changes have been made.
19283         PR middle-end/83608
19284         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19285         convert_modes if target mode has the right side, but different mode
19286         class.
19288         PR middle-end/83609
19289         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19290         last argument when extracting from CONCAT.  If either from_real or
19291         from_imag is NULL, use expansion through memory.  If result is not
19292         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19293         the parts directly to inner mode, if even that fails, use expansion
19294         through memory.
19296         PR middle-end/83623
19297         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19298         check for bswap in mode rather than HImode and use that in expand_unop
19299         too.
19301 Copyright (C) 2018 Free Software Foundation, Inc.
19303 Copying and distribution of this file, with or without modification,
19304 are permitted in any medium without royalty provided the copyright
19305 notice and this notice are preserved.