config/
[official-gcc.git] / gcc / ChangeLog
blob19afe834d5d2ce2c4fca4b81f850b3abc642c128
1 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
3         * configure: Regenerated.
5 2018-07-05  Carl Love  <cel@us.ibm.com>
7         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10         VSX_BUILTIN_DOUBLEL_V4SF.
12 2018-07-05  Martin Sebor  <msebor@redhat.com>
14         PR c++/86400
15         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
16         than its domain to compute its the upper bound of a char array.
18 2018-07-05  Nathan Sidwell  <nathan@acm.org>
20         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
21         * doc/cpp.texi: Update comment.
22         * doc/tm.texi: Rebuilt.
23         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
24         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
25         * doc/extend.texi (Backwards Compatibility): Clarify it is system
26         headers affected by extern "C".
27         * system.h: Poison NO_IMPLICIT_EXTERN_C.
28         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
29         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
30         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
31         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
32         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
33         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
34         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
35         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
36         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
37         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
38         config/sparc/sp64-elf.h, config/spu/spu.h,
39         config/stormy16/stormy16.h, config/v850/v850.h,
40         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
41         define NO_IMPLICIT_EXTERN_C.
42         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
44 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
46         PR target/84711
47         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
48         instead of GET_MODE_SIZE when comparing Units.
50 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
52         PR target/84711
53         * rtlanal.c (set_noop_p): Constrain on mode change,
54         include hard-reg-set.h
56 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
58         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
60 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
62         Revert
63         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
65         PR sanitizer/84250
66         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
67         libasan.
68         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
70 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
72         PR sanitizer/84250
73         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
74         libasan.
75         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
77 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
79         PR middle-end/86380
80         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
82 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
84         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
85         neg_*_op* variables.
87 2018-07-04  Martin Liska  <mliska@suse.cz>
89         * tree-switch-conversion.c: Define
90         max_ratio_for_speed and max_ratio_for_size constants.
92 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
93             Martin Liska  <mliska@suse.cz>
95         PR middle-end/66240
96         PR target/45996
97         PR c/84100
98         * common.opt: Rename align options with 'str_' prefix.
99         * common/config/i386/i386-common.c (set_malign_value): New
100         function.
101         (ix86_handle_option): Use it to set -falign-* options/
102         * config/aarch64/aarch64-protos.h (struct tune_params): Change
103         type from int to string.
104         * config/aarch64/aarch64.c: Update default values from int
105         to string.
106         * config/alpha/alpha.c (alpha_override_options_after_change):
107         Likewise.
108         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
109         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
110         max skip conditionally.
111         * config/i386/freebsd.h (SUBALIGN_LOG): New.
112         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
113         max skip conditionally.
114         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
115         max skip conditionally.
116         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
117         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
118         max skip conditionally.
119         * config/i386/i386.c (struct ptt): Change type from int to
120         string.
121         (ix86_default_align): Set default values.
122         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
123         max skip conditionally.
124         * config/i386/iamcu.h (SUBALIGN_LOG): New.
125         (ASM_OUTPUT_MAX_SKIP_ALIGN):
126         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
127         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
128         max skip conditionally.
129         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
130         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
131         * config/i386/x86-64.h (SUBALIGN_LOG): New.
132         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
133         max skip conditionally.
134         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
135         * config/ia64/ia64.c (ia64_option_override): Set default values
136         for alignment options.
137         * config/m68k/m68k.c: Handle new str_align_* options.
138         * config/mips/mips.c (mips_set_compression_mode): Change
139         type of constants.
140         (mips_option_override): Set default values for options.
141         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
142         Likewise.
143         * config/rs6000/rs6000.c (rs6000_option_override_internal):
144         Likewise.
145         * config/rx/rx.c (rx_option_override): Likewise.
146         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
147         (LABEL_ALIGN): Use align_labels_log.
148         (LOOP_ALIGN): Use align_loops_align.
149         * config/s390/s390.c (s390_asm_output_function_label): Use new
150         macros.
151         * config/sh/sh.c (sh_override_options_after_change):
152         Change type of constants.
153         * config/spu/spu.c (spu_sched_init): Likewise.
154         * config/sparc/sparc.c (sparc_option_override): Set default
155         values for options.
156         * config/visium/visium.c (visium_option_override): Likewise.
157         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
158         emit p2align format with last argument if it's not needed.
159         * doc/invoke.texi: Document extended format of -falign-*.
160         * final.c: Use align_labels alignment.
161         * flags.h (struct target_flag_state): Change type to use
162         align_flags.
163         (struct align_flags_tuple): New.
164         (struct align_flags): Likewise.
165         (align_loops_log): Redefine macro to use new types.
166         (align_loops_max_skip): Redefine macro to use new types.
167         (align_jumps_log): Redefine macro to use new types.
168         (align_jumps_max_skip): Redefine macro to use new types.
169         (align_labels_log): Redefine macro to use new types.
170         (align_labels_max_skip): Redefine macro to use new types.
171         (align_functions_log): Redefine macro to use new types.
172         (align_loops): Redefine macro to use new types.
173         (align_jumps): Redefine macro to use new types.
174         (align_labels): Redefine macro to use new types.
175         (align_functions): Redefine macro to use new types.
176         (align_functions_max_skip): Redefine macro to use new types.
177         (align_loops_value): New macro.
178         (align_jumps_value): New macro.
179         (align_labels_value): New macro.
180         (align_functions_value): New macro.
181         * function.c (invoke_set_current_function_hook): Propagate
182         alignment values from flags to global variables default in
183         topleev.h.
184         * ipa-icf.c (sem_function::equals_wpa): Use
185         cl_optimization_option_eq instead of memcmp.
186         * lto-streamer.h (cl_optimization_stream_out): Support streaming
187         of string types.
188         (cl_optimization_stream_in): Likewise.
189         * optc-save-gen.awk: Support strings in cl_optimization.
190         * opth-gen.awk: Likewise.
191         * opts.c (finish_options): Remove error checking of invalid
192         value ranges.
193         (MAX_CODE_ALIGN): Remove.
194         (MAX_CODE_ALIGN_VALUE): Likewise.
195         (parse_and_check_align_values): New function.
196         (check_alignment_argument): Likewise.
197         (common_handle_option): Use check_alignment_argument.
198         * opts.h (parse_and_check_align_values): Declare.
199         * toplev.c (init_alignments): Remove.
200         (read_log_maxskip): New.
201         (parse_N_M): Likewise.
202         (parse_alignment_opts): Likewise.
203         (backend_init_target): Remove usage of init_alignments.
204         * toplev.h (parse_alignment_opts): Declare.
205         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
206         argument.
207         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
208         * tree.c (cl_option_hasher::equal): New.
209         * varasm.c: Use new global macros.
211 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
213         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
214         Use a simpler align directive also if MAXSKIP = ALIGN-1.
215         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
216         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
217         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
218         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
219         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
220         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
221         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
222         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
223         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
224         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
225         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
227 2018-07-04  Martin Liska  <mliska@suse.cz>
228             Jonathan Wakely  <jwakely@redhat.com>
230         * coverage.c: Use correct type.
231         * doc/invoke.texi: Language correction.
233 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
235         PR target/85620
236         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
237         ENDBRANCH for non-tail call which may return via indirect branch.
238         * doc/extend.texi: Document indirect_return attribute.
240 2018-07-03  Martin Sebor  <msebor@redhat.com>
242         PR tree-optimization/86274
243         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
244         precondition.
245         (format_floating): Correct handling of infinities and NaNs.
247 2018-07-03  Martin Sebor  <msebor@redhat.com>
249         * print-tree.c (print_real_cst): New function.
250         (print_node_brief): Call it.
251         (print_node): Ditto.
253 2018-07-03  Jeff Law  <law@redhat.com>
255         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
256         into a single pattern.
258         * config/h8300/h8300.md (ors code_iterator): New.
259         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
260         a single pattern and single splitter.
261         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
262         (iorqi3_1, xorqi3_1): Likewise.
263         (iorqi3, xorqi3 expanders): Similarly.
265         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
266         (movmd_internal) into a single pattern using the P mode iterator.
267         (movmd splitters): Similarly.
268         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
269         (movsd splitters): Similarly.
271         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
272         ADDB, ADDW and ADDL into a single ADD attribute which selects the
273         right table based on the size of the operand.
274         * config/h8300/h8300.md (length_table): Corresponding changes. All
275         references to "addb", "addw" and "addl" changed to "add".
276         (btst patterns): Merge two variants into a single pattern.
277         (tstqi, tsthi): Likewise.
278         (addhi3_incdec, addsi3_incdec): Likewise.
279         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
280         (mulhi3, mulsi3): Likewise.
281         (udivhi3, udivsi3): Likewise.
282         (divhi3, divsi3): Likewise.
283         (andorqi3, andorhi3, andorsi3): Likewise.
285 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
287         PR target/85694
288         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
289         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
291 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
293         PR tree-optimization/85694
294         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
295         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
296         UNSPEC_URHADD.
297         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
298         (<u>avg<mode>3_ceil): New patterns.
300 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
302         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
303         scan-tree-dump directive.
304         * gcc.dg/vect/slp-perm-2.c: Likewise.
305         * gcc.dg/vect/slp-perm-3.c: Likewise.
306         * gcc.dg/vect/slp-perm-5.c: Likewise.
307         * gcc.dg/vect/slp-perm-6.c: Likewise.
308         * gcc.dg/vect/slp-perm-7.c: Likewise.
309         * gcc.dg/vect/slp-perm-8.c: Likewise.
311 2018-07-03  Marek Polacek  <polacek@redhat.com>
313         PR middle-end/86202
314         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
316 2018-07-03  Richard Biener  <rguenther@suse.de>
318         PR ipa/86389
319         * tree-ssa-structalias.c (find_func_clobbers): Properly
320         handle indirect calls.
322 2018-07-03  Jeff Law  <law@redhat.com>
324         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
325         (shifts): New code iterator.
326         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
327         expander.  Fix HImode handling on H8/SX.
328         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
329         (subqi3, subhi3, subsi3 expanders): Likewise.
330         (andqi3, andhi3, andsi3 expanders): Likewise.
331         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
332         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
333         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
334         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
335         (zero_extendqihi2, zero_extendqisi2): Likewise.
336         (extendqihi2, extendqisi2): Likewise.
337         (rotlqi3, rotlhi3, rotlsi3): Likewise.
338         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
339         (rotlqi3_1, rotlhi3_1): Likewise.
340         (logicalhi3_sn, logicalsi3_sn): Likewise.
341         (logicalhi3, logicalsi3): Likewise.
343 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
345         * tree-vect-patterns.c (vect_recog_rotate_pattern)
346         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
347         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
348         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
349         type to append_pattern_def_seq instead of creating a stmt_vec_info
350         directly.
351         (build_mask_conversion): Likewise.  Remove vinfo argument.
352         (vect_add_conversion_to_patterm): Likewise, renaming to...
353         (vect_add_conversion_to_pattern): ...this.
354         (vect_recog_mask_conversion_pattern): Update call to
355         build_mask_conversion.  Pass the vector type to
356         append_pattern_def_seq here too.
357         (vect_recog_gather_scatter_pattern): Update call to
358         vect_add_conversion_to_pattern.
360 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
362         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
363         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
364         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
365         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
366         STMT_VINFO_PATTERN_DEF_SEQ to null here.
367         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
368         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
369         append_pattern_def_seq instead of new_pattern_def_seq.
370         (vect_recog_divmod_pattern): Do both of the above.
371         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
372         is null.
374 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
376         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
377         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
378         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
379         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
380         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
381         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
382         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
383         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
384         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
385         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
386         parameter with a single stmt_vec_info.
387         (vect_recog_func_ptr): Likewise.
388         (vect_recog_gather_scatter_pattern): Likewise, folding in...
389         (vect_try_gather_scatter_pattern): ...this.
390         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
391         the stmt_vec_info of the statement to be matched.  Don't clear
392         STMT_VINFO_RELATED_STMT.
393         (vect_pattern_recog): Update call accordingly.
395 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
397         PR tree-optimization/85694
398         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
399         (uavgM3_ceil): Document new optabs.
400         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
401         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
402         functions.
403         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
404         (savg_ceil_optab): New optabs.
405         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
406         (vect_vect_recog_func_ptrs): Add it.
407         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
408         constant directly from the associated lhs.
410 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
412         * tree-vect-patterns.c (vect_split_statement): New function.
413         (vect_convert_input): Use it to try to split an existing cast.
415 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
417         * poly-int.h (print_hex): New function.
418         * dumpfile.h (dump_dec, dump_hex): Declare.
419         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
420         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
421         min_input_precision, operation_precision and operation_sign.
422         * tree-vect-patterns.c (vect_get_range_info): New function.
423         (vect_same_loop_or_bb_p, vect_single_imm_use)
424         (vect_operation_fits_smaller_type): Delete.
425         (vect_look_through_possible_promotion): Add an optional
426         single_use_p parameter.
427         (vect_recog_over_widening_pattern): Rewrite to use new
428         stmt_vec_info infomration.  Handle one operation at a time.
429         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
430         (vect_truncatable_operation_p, vect_set_operation_type)
431         (vect_set_min_input_precision): New functions.
432         (vect_determine_min_output_precision_1): Likewise.
433         (vect_determine_min_output_precision): Likewise.
434         (vect_determine_precisions_from_range): Likewise.
435         (vect_determine_precisions_from_users): Likewise.
436         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
437         (vect_vect_recog_func_ptrs): Put over_widening first.
438         Add cast_forwprop.
439         (vect_pattern_recog): Call vect_determine_precisions.
441 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
443         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
444         statements that have been replaced by further pattern statements.
445         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
447 2018-07-03  Richard Biener  <rguenther@suse.de>
449         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
450         always set *dt.  Dump vectype in vectype overload.
451         * dumpfile.h (dump_gimple_expr): New function.
452         (dump_gimple_expr_loc): Likewise.
453         * dumpfile.c (dump_gimple_expr): New function.
454         (dump_gimple_expr_loc): Likewise.
456 2018-07-02  Jeff Law  <law@redhat.com>
458         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
459         the H8/300, H8/300H and H8/S variants into a single pattern.
460         (movhi_h8300, movqi_h8300hs): Similarly.
461         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
462         (QHI mode iterator): New.
464         * config/h8300/h8300.md: Remove trailing whitespace.
466 2018-07-02  Jim Wilson  <jimw@sifive.com>
468         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
469         instead of emit_insn for interrupt returns.
470         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
471         (riscv_sret, riscv_uret): Likewise.
473 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
475         * pretty-print.c (selftest::test_pp_format): Move save and restore
476         of quotes to class auto_fix_quotes, and add an instance.
477         * selftest.c: Include "intl.h".
478         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
479         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
480         * selftest.h (selftest::auto_fix_quotes): New class.
482 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
484         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
485         (aarch64_sve_prepare_conditional_op): Remove.
486         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
487         Allow aarch64_simd_reg_or_zero as select operand; remove
488         the aarch64_sve_prepare_conditional_op call.
489         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
490         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
491         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
492         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
493         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
494         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
495         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
496         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
497         and a splitters to match all of the *_any patterns.
498         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
500         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
501         (SVE_COND_FP_BINARY_REV): Remove.
502         (sve_int_op_rev, sve_fp_op_rev): New.
503         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
504         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
505         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
506         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
507         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
508         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
509         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
510         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
511         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
513         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
514         Remove match_dup 1 from the inner unspec.
515         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
517         * config/aarch64/aarch64.md (movprfx): New attr.
518         (length): Default movprfx to 8.
519         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
520         (*madd<SVE_I>, *msub<SVE_I): Likewise.
521         (*<su>mul<SVE_I>3_highpart): Likewise.
522         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
523         (*v<ASHIFT><SVE_I>3): Likewise.
524         (*<su><MAXMIN><SVE_I>3): Likewise.
525         (*<su><MAXMIN><SVE_F>3): Likewise.
526         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
527         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
528         (*div<SVE_F>4): Likewise.
530 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
532         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
533         in dump string.
535 2018-07-02  Richard Biener  <rguenther@suse.de>
537         PR tree-optimization/86363
538         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
539         memset argument refers to a non-variable address.
541 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
543         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
544         {PLUS,MINUS}_EXPR code to...
545         (adjust_symbolic_bound): ...here,
546         (combine_bound): ...here,
547         (set_value_range_with_overflow): ...and here.
549 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
551         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
552         code...
553         (extract_range_from_abs_expr): ...here.
555 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
557         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
558         -fno-omit-frame-pointer when not optimizing.
560 2018-07-02  Martin Liska  <mliska@suse.cz>
562         PR ipa/86279
563         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
564         (propagate_nothrow): Likewise.
566 2018-07-02  Martin Liska  <mliska@suse.cz>
568         PR ipa/86323
569         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
571 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
573         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
574         function in r262149, changing "loc" param from source_location to
575         const dump_location_t &.
576         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
577         declaration, as above.
579 2018-07-01  Paul Koning  <ni1d@arrl.net>
581         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
582         -munit-asm, -mgnu-asm, -mdec-asm.
583         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
584         (pdp11_output_labelref): New.
585         (pdp11_output_def): New.
586         (pdp11_output_addr_vec_elt): New.
587         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
588         %# and %@ format codes.
589         (pdp11_option_override): New.
590         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
591         (pdp11_output_ident): New.
592         (pdp11_asm_named_section): New.
593         (pdp11_asm_init_sections): New.
594         (pdp11_file_start): New.
595         (pdp11_file_end): New.
596         (output_ascii): Use .ascii/.asciz for -mdec-asm.
597         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
598         %o, like %c but octal.
599         (pdp11_option_override): New.
600         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
601         -mdec-asm.
602         (DATA_SECTION_ASM_OP): Ditto.
603         (READONLY_DATA_SECTION_ASM_OP): New.
604         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
605         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
606         (ASM_OUTPUT_LABELREF): Ditto.
607         (ASM_OUTPUT_DEF): Ditto.
608         (ASM_OUTPUT_EXTERNAL): New.
609         (ASM_OUTPUT_SOURCE_FILENAME): New.
610         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
611         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
612         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
613         %# and %@ format codes.
614         * config/pdp11/pdp11.opt (mgnu-asm): New.
615         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
616         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
617         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
619 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
621         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
622         dereferencing path[] beyond its length.
623         (debug_path): New.
624         (debug_all_paths): New.
625         (rewire_first_differing_edge): New.
626         (adjust_paths_after_duplication): New.
627         (duplicate_thread_path): Call adjust_paths_after_duplication.
628         Add new argument.
629         (thread_through_all_blocks): Add new argument to
630         duplicate_thread_path.
632 2018-06-30  Jim Wilson  <jimw@sifive.com>
634         * config/riscv/predicates.md (p2m1_shift_operand): New.
635         (high_mask_shift_operand): New.
636         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
637         pattern using p2m1_shift_operand.
638         (lshsi3_zero_extend_3+2): New combiner pattern using
639         high_mask_shift_operand.
641 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
643         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
644         split out from...
645         (vect_recog_rotate_pattern): ...here.
646         (vect_convert_input): Try to insert casts of invariants in the
647         preheader.
648         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
649         preheader to be empty.
651 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
653         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
654         vector type.  If given, install it in the new statement's
655         STMT_VINFO_VECTYPE.
656         (vect_element_precision): New function.
657         (vect_unpromoted_value): New struct.
658         (vect_unpromoted_value::vect_unpromoted_value): New function.
659         (vect_unpromoted_value::set_op): Likewise.
660         (vect_look_through_possible_promotion): Likewise.
661         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
662         (vect_widened_op_tree, vect_convert_input): Likewise.
663         (vect_convert_inputs, vect_convert_output): Likewise.
664         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
665         to handle the optional cast of the multiplication result and
666         vect_widened_op_tree to detect the widened multiplication itself.
667         Do not require the input and output of promotion casts to have
668         the same sign, but base the signedness of the operation on the
669         input rather than the result.  If the pattern includes two
670         promotions, check that those promotions have the same sign.
671         Do not restrict the MULT_EXPR handling to a double-width result;
672         handle quadruple-width results and wider.  Use vect_convert_inputs
673         to convert the inputs to the common type.
674         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
675         to handle the optional cast of the ABS result.  Also allow a sign
676         change or a sign extension between the ABS and MINUS.
677         Use vect_widened_op_tree to detect the widened subtraction and use
678         vect_convert_inputs to convert the inputs to the common type.
679         (vect_handle_widen_op_by_const): Delete.
680         (vect_recog_widen_op_pattern): New function.
681         (vect_recog_widen_mult_pattern): Use it.
682         (vect_recog_widen_shift_pattern): Likewise.
683         (vect_recog_widen_sum_pattern): Use
684         vect_look_through_possible_promotion to handle the promoted
685         PLUS_EXPR operand.
687 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
689         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
690         the containing gimple_seq *.
691         * gimple-iterator.h (gsi_for_stmt): Declare it.
692         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
693         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
694         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
695         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
696         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
697         checks.
698         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
699         split out from...
700         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
701         statement being replaced is part of an existing pattern
702         definition sequence, inserting the new pattern statements before
703         the original one.
704         (vect_pattern_recog_1): Don't return a bool.  If the statement
705         is already part of a pattern, instead apply pattern matching
706         to the pattern definition statements.  Don't clear the
707         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
708         (vect_pattern_recog): Don't break after the first match;
709         continue processing the pattern definition statements instead.
710         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
712 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
714         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
715         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
716         (vect_recog_widen_sum_pattern): Use it.
718 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
720         * tree-vect-loop.c (vectorizable_reduction): Assert that the
721         phi is not a pattern statement and has not been replaced by
722         a pattern statement.
723         * tree-vect-patterns.c (type_conversion_p): Don't check
724         STMT_VINFO_IN_PATTERN_P.
725         (vect_recog_vector_vector_shift_pattern): Likewise.
726         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
727         the pattern statement rather than the original statement; check
728         directly for a WIDEN_MULT_EXPR here.
729         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
730         vect_is_simple_use to return the pattern statement rather
731         than the original statement; use is_pattern_stmt_p to check
732         for such a pattern statement.
733         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
734         to return the pattern statement rather than the original statement;
735         don't do the same transformation here.
736         (vect_is_simple_use): If the defining statement has been replaced
737         by a pattern statement, return the pattern statement instead.
738         Remove the corresponding (local) transformation from the vectype
739         overload.
741 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
743         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
744         end and default to null.
745         * tree-vect-loop.c (vect_create_epilog_for_reduction)
746         (vectorizable_reduction): Update calls accordingly, dropping the
747         gimple ** argument if the passed-back statement isn't needed.
748         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
749         (vect_recog_rotate_pattern): Likewise.
750         (vect_recog_mask_conversion_pattern): Likewise.
751         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
752         (vect_mask_constant_operand_p): Likewise.
753         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
754         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
755         (get_group_load_store_type, get_load_store_type): Likewise.
756         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
757         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
758         (vectorizable_conversion, vectorizable_assignment): Likewise.
759         (vectorizable_shift, vectorizable_operation): Likewise.
760         (vectorizable_store, vect_is_simple_cond): Likewise.
761         (vectorizable_condition, vectorizable_comparison): Likewise.
762         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
763         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
764         and move it to the end.  Cope with null def_stmt_outs.
766 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
768         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
770 2018-06-29  Jeff Law  <law@redhat.com>
772         * config/v850/v850.c (v850_legitimate_address_p): Handle large
773         displacements for TARGET_V850E2V3 and newer.
774         (TARGET_LRA_P): Remove.  Defaults to LRA now.
775         * config/v850/v850.md (sign23byte_load): Remove.
776         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
777         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
779 2018-06-29  Martin Liska  <mliska@suse.cz>
781         PR lto/85759
782         * coverage.c (coverage_init): Mangle full path name.
783         * doc/invoke.texi: Document the change.
784         * gcov-io.c (mangle_path): New.
785         * gcov-io.h (mangle_path): Likewise.
786         * gcov.c (mangle_name): Use mangle_path for path mangling.
788 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
790         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
791         if starting source register is not even.
793 2018-06-29  Martin Liska  <mliska@suse.cz>
795         PR tree-optimization/86263
796         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
797         Make edge redirection.
799 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
801         * dumpfile.c (dump_loc): Add indentation based on scope depth.
802         (dump_scope_depth): New variable.
803         (get_dump_scope_depth): New function.
804         (dump_begin_scope): New function.
805         (dump_end_scope): New function.
806         * dumpfile.h (get_dump_scope_depth): New declaration.
807         (dump_begin_scope): New declaration.
808         (dump_end_scope): New declaration.
809         (class auto_dump_scope): New class.
810         (AUTO_DUMP_SCOPE): New macro.
811         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
812         AUTO_DUMP_SCOPE.
814 2018-06-29  Richard Biener  <rguenther@suse.de>
816         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
817         compute_all_dependences succeeds.
818         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
819         exceed --param loop-max-datarefs-for-datadeps.
821 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
823         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
825 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
827         PR target/86348
828         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
829         alternative 0 in preferred_for_speed attribute.
831 2018-06-28  Paul Koning  <ni1d@arrl.net>
833         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
834         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
835         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
836         * config/pdp11/pdp11.md: Correct "length" attribute calculation
837         for shift insn patterns.
839 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
841         * cgraph.c (cgraph_node::get_body): Replace assignments to
842         "dump_file" with calls to set_dump_file.
843         * dumpfile.c (alt_dump_file): Make static, and group with...
844         (alt_flags): ...this definition.
845         (dumps_are_enabled): New variable.
846         (refresh_dumps_are_enabled): New function.
847         (set_dump_file): New function.
848         (set_alt_dump_file): New function.
849         (gcc::dump_manager::dump_start): Replace assignments to
850         "dump_file" and "alt_dump_file" with calls to set_dump_file and
851         set_alt_dump_file.
852         (gcc::dump_manager::dump_finish): Likewise.
853         * dumpfile.h (alt_dump_file): Delete decl.
854         (dumps_are_enabled): New variable decl.
855         (set_dump_file): New function decl.
856         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
857         global.
858         * tree-nested.c (lower_nested_functions): Replace assignments to
859         "dump_file" with calls to set_dump_file.
861 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
863         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
864         goto_locus of each outgoing edge of each basic block.
866 2018-06-28  Richard Biener  <rguenther@suse.de>
868         * dwarf2out.c (decl_scope_table): Remove.
869         (push_decl_scope): Likewise.
870         (pop_decl_scope): Likewise.
871         (gen_type_die_for_member): Do not call push/pop_decl_scope.
872         (gen_struct_or_union_type_die): Likewise.
873         (gen_tagged_type_die): Likewise.
874         (dwarf2out_init): Do not initialize decl_scope_table.
875         (dwarf2out_c_finalize): Do not free it.
877 2018-06-28  Richard Biener  <rguenther@suse.de>
879         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
880         deciding whether to not re-use a DIE.
882 2018-06-28  Richard Biener  <rguenther@suse.de>
884         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
885         DW_AT_abstract_origin attribute.
887 2018-06-28  Martin Liska  <mliska@suse.cz>
889         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
890         Use newly introduced constants.
891         * tree-switch-conversion.h (struct jump_table_cluster):
892         Define max_ratio_for_size and max_ratio_for_speed.
894 2018-06-28  Martin Liska  <mliska@suse.cz>
896         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
897         Add new checking assert to catch invalid state.
898         (jump_table_cluster::can_be_handled): Handle single case
899         clusters.
900         (jump_table_cluster::is_beneficial): Bail out for such case.
901         (bit_test_cluster::find_bit_tests):
902         Add new checking assert to catch invalid state.
903         (bit_test_cluster::can_be_handled): Handle single case
904         clusters.
905         (bit_test_cluster::is_beneficial): Bail out for such case.
906         (switch_decision_tree::analyze_switch_statement):
907         Fix comment.
909 2018-06-28  Martin Liska  <mliska@suse.cz>
911         * common.opt: Introduce -completion option.
912         * gcc.c (driver_handle_option): Handle it.
913         (driver::main): Print completions if completion
914         is set.
915         * opt-suggestions.c (option_proposer::get_completions):
916         New function.
917         (option_proposer::suggest_completion): Likewise.
918         (option_proposer::find_param_completions): Likewise.
919         (verify_autocompletions): Likewise.
920         (test_completion_valid_options): Likewise.
921         (test_completion_valid_params): Likewise.
922         (in_completion_p): Likewise.
923         (empty_completion_p): Likewise.
924         (test_completion_partial_match): Likewise.
925         (test_completion_garbage): Likewise.
926         (opt_proposer_c_tests): Likewise.
927         * opt-suggestions.h: Declare new functions.
928         * opts.c (common_handle_option): Handle OPT__completion_.
929         * selftest-run-tests.c (selftest::run_tests): Add
930         opt_proposer_c_tests.
931         * selftest.c (assert_str_startswith): New.
932         * selftest.h (assert_str_startswith): Likewise.
933         (opt_proposer_c_tests): New.
934         (ASSERT_STR_STARTSWITH): Likewise.
936 2018-06-28  Martin Liska  <mliska@suse.cz>
938         * Makefile.in: Add opt-suggestions.o.
939         * gcc-main.c: Include opt-suggestions.h.
940         * gcc.c (driver::driver): Likewise.
941         (driver::~driver): Remove m_option_suggestions.
942         (driver::build_option_suggestions): Moved to option_proposer.
943         (driver::suggest_option): Likewise.
944         (driver::handle_unrecognized_options): Use option_proposer.
945         * gcc.h (class driver): Add new memver m_option_proposer.
946         * opt-suggestions.c: New file.
947         * opt-suggestions.h: New file.
949 2018-06-28  Martin Liska  <mliska@suse.cz>
951         * vec.h (class auto_string_vec): New (moved from auto_argvec).
952         (auto_string_vec::~auto_string_vec): Likewise.
954 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
956         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
957         prevent_decl_creation_for_types fields up and add reset_location field.
958         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
959         statement if id->reset_location is true.
960         (copy_edges_for_bb): Do not set goto_locus on the new edges if
961         id->reset_location is true.
962         (copy_phis_for_bb): Force input_location on the arguments if
963         id->reset_location is true.
964         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
965         is set on the function to be inlined.
967 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
969         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
971 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
973         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
974         registers for Pmode.
975         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
976         hard registers for the clobbered pseudo.
978 2018-06-27  Paul Koning  <ni1d@arrl.net>
980         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
981         mutually exclusive options.
982         * config/pdp11/constraints.md (h): New constraint.
983         (O): Update definition to match shift code generation.
984         (D): New constraint.
985         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
986         (CCFP): Remove.
987         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
988         function.
989         (output_jump): Change arguments.
990         (pdp11_fixed_cc_regs): New function.
991         (pdp11_cc_mode): Ditto.
992         (pdp11_expand_shift): Ditto.
993         (pdp11_assemble_shift): Ditto.
994         (pdp11_small_shift): Ditto.
995         (pdp11_branch_cost): Remove.
996         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
997         from output.
998         (pdp11_register_move_cost): Update for CC registers.
999         (pdp11_rtx_costs): Add case for LSHIFTRT.
1000         (pdp11_output_jump): Add CCNZ mode conditional branches.
1001         (notice_update_cc_on_set): Remove.
1002         (pdp11_cc_mode): New function.
1003         (simple_memory_operand): Correct pre/post decrement case.
1004         (no_side_effect_operand): New function.
1005         (pdp11_regno_reg_class): Add CC_REGS class.
1006         (pdp11_fixed_cc_regs): New function.
1007         (pdp11_small_shift): New function.
1008         (pdp11_expand_shift): New function to expand shift insns.
1009         (pdp11_assemble_shift): New function to output shifts.
1010         (pdp11_branch_cost): Remove.
1011         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1012         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1013         (WCHAR_TYPE): Ditto.
1014         (PTRDIFF_TYPE): Ditto.
1015         (ADJUST_INSN_LENGTH): New macro.
1016         (FIXED_REGISTERS): Add CC registers.
1017         (CALL_USED_REGISTERS): Ditto.
1018         (reg_class): Ditto.
1019         (REG_CLASS_NAMES): Ditto.
1020         (REG_CLASS_CONTENTS): Ditto.
1021         (SELECT_CC_MODE): Use new function.
1022         (TARGET_FLAGS_REGNUM): New macro.
1023         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1024         (cc0_reg_rtx): Remove.
1025         (CC_STATUS_MDEP): Remove.
1026         (CC_STATUS_MDEFP_INIT): Remove.
1027         (CC_IN_FPU): Remove.
1028         (NOTICE_UPDATE_CC): Remove.
1029         (REGISTER_NAMES): Add CC registers.
1030         (BRANCH_COST): Change to constant 1.
1031         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1032         handling.
1033         * config/pdp11/pdp11.opt (mbcopy): Remove.
1034         (mbcopy-builtin): Remove.
1035         (mbranch-cheap): Remove.
1036         (mbranch-expensive): Remove.
1037         * config/pdp11/predicates.md (expand_shift_operand): Update to
1038         match shift code generation.
1039         (ccnz_operator): New predicate.
1040         * doc/invoke.texi (PDP-11 Options): Remove deleted options
1041         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1042         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
1043         exclusive options.
1044         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
1045         description of O constraint.
1047 2018-06-27  Jeff Law  <law@redhat.com>
1048             Austin Law  <austinklaw@gmail.com>
1050         * config/v850/v850.md (addsi3_set_flags): New pattern.
1051         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1052         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1053         (zero_extendhisi2_v850_set_flags): Likewise.
1054         (zero_extendqisi2_v850_set_flags): Likewise.
1055         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1056         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1057         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1059         * config/v850/v850-protos.h (notice_update_cc): Remove.
1060         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1061         (v850_print_operand): Handle 'D' and "d".
1062         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1063         Add handling of arithmetic/logical operations compared against zero.
1064         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1065         Do not look at v850_compare_op, instead get mode from last argument.
1066         (v850_gen_compare): Remove
1067         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1068         after reload for prologue insns.
1069         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1070         patterns.
1071         (construct_save_jarl): Likewise.
1072         (TARGET_FLAGS_REGNUM): Define.
1073         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1074         (NOTICE_UPDATE_CC): Remove.
1075         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1076         than cc0.  Conditionalize on reload_completed.
1077         (cmpsi_insn, setfcc_insn): Likewise.
1078         (tst1 splitter): Turn into define_and_split which sets the flags
1079         after reload.
1080         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1081         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1082         (cstoresf4, cstoredf4): Clobber the flags.
1083         (cmpsi, cmpsf, cmpdf): Remove expanders.
1084         (setf_insn): Remove pattern.
1085         (addsi3): Turn into define_and_split which clobbers the flags after
1086         reload and a suitable pattern (addsi3_clobber_flags) for use after
1087         reload.
1088         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1089         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1090         (ashrsi3, ashrsi3_v850e2): Likewise.
1091         (bins): Clobber the flags.
1092         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1093         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1094         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1095         (call_value_internal_short, call_value_internal_long): Likewise.
1096         (callt_save_interrupt, callt_return_interrupt): Likewise.
1097         (save_interrupt, return_interrupt): Likewise.
1098         (callt_save_all_interrupt, save_all_interrupt): Likewise.
1099         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1100         (restore_all_interrupt, _restore_all_interrupt): Likewise.
1101         (All FP comparisons): Only allow after reload has completed.
1102         (trfsr): Likewise.
1103         (divh, divhu): Tweak output template.
1104         (branch_z_normal, branch_z_invert): Remove
1105         (branch_nz_normal, branch_nz_invert): Likewise.
1106         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1108         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1109         * config/v850/v850.c (notice_update_cc): Remove.
1110         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
1111         (CC_NO_CARRY): Likewise.
1112         (NOTICE_UPDATE_CC): Define to nothing.
1113         * config/v850/v850.md: Remove block comment on cc0 handling
1114         Remove "cc" attribute from all patterns.  Remove cc_status handling
1115         from all patterns.  Minor formatting fixes.
1117 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1119         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1120         (cortex-a76.cortex-a55): Likewise.
1121         * config/aarch64/aarch64-tune.md: Regenerate.
1122         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1123         cortex-a76.cortex-a55.
1125 2018-06-27  Jeff Law  <law@redhat.com>
1127         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1128         (MULTILIB_DIRNAMES): Similarly.
1130 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
1132         * gimple.h (gimple_return_retbnd): Delete.
1133         (gimple_return_set_retbnd): Likewise.
1134         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1135         gimple_return_set_retbnd.
1136         * gimple-pretty-print.c (dump_gimple_return): Remove call to
1137         gimple_return_retbnd and adjust.
1138         * tree-inline.h (struct copy_body_data): Remove retbnd field.
1139         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1140         Explicitly return NULL in a couple more cases.  Move assertion
1141         on debug statements and remove unreachable code.
1142         (reset_debug_binding): Do not test id->retbnd.
1143         (expand_call_inline): Do not set it.
1145 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1147         * configure.ac: Add --disable-gcov option.
1148         * configure: Regenerate.
1149         * Makefile.in: Honour @enable_gcov@.
1150         * doc/install.texi: Document --disable-gcov.
1152 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1154         * config/arm/arm-cpus.in (cortex-a76): New entry.
1155         (cortex-a76.cortex-a55): Likewise.
1156         * config/arm/arm-tables.opt: Regenerate.
1157         * config/arm/arm-tune.md: Likewise.
1158         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1159         * doc/invoke.texi (ARM Options): Document cortex-a76 and
1160         cortex-a76.cortex-a55.
1162 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
1164         PR target/85769
1165         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1167 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1169         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1170         comment.
1171         (EPILOGUE_USES): Likewise.
1173 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
1175         * tree-inline.c (remap_location): New function extracted from...
1176         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
1177         (copy_phis_for_bb): ...here.  Call remap_location.
1178         (copy_cfg_body): Adjust call to copy_edges_for_bb.
1180 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1182         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1183         unaligned vsx for 16B memset.
1185 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
1187         PR target/86285
1188         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1189         ieee128_float_type_node to long_double_type_node unless
1190         TARGET_LONG_DOUBLE_128 is set.
1192 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
1194         * cfgloop.c (get_loop_location): Convert return type from
1195         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1196         by implicit construction from rtx_insn *, and using
1197         dump_user_location_t::from_function_decl for the fallback case.
1198         * cfgloop.h (get_loop_location): Convert return type from
1199         location_t to dump_user_location_t.
1200         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1201         dump_printf_loc to pass in a dump_location_t rather than a
1202         location_t, via the gimple stmt.
1203         * coverage.c (get_coverage_counts): Update calls to
1204         dump_printf_loc to pass in dump_location_t rather than a
1205         location_t.
1206         * doc/optinfo.texi (Dump types): Convert example of
1207         dump_printf_loc from taking "locus" to taking "insn".  Update
1208         description of the "_loc" calls to cover dump_location_t.
1209         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1210         "selftest.h".
1211         (dump_user_location_t::dump_user_location_t): New constructors,
1212         from gimple *stmt and rtx_insn *.
1213         (dump_user_location_t::from_function_decl): New function.
1214         (dump_loc): Make static.
1215         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1216         const dump_location_t &.
1217         (dump_generic_expr_loc): Delete.
1218         (dump_printf_loc): Convert param "loc" from location_t to
1219         const dump_location_t &.
1220         (selftest::test_impl_location): New function.
1221         (selftest::dumpfile_c_tests): New function.
1222         * dumpfile.h: Include "profile-count.h".
1223         (class dump_user_location_t): New class.
1224         (struct dump_impl_location_t): New struct.
1225         (class dump_location_t): New class.
1226         (dump_printf_loc): Convert 2nd param from source_location to
1227         const dump_location_t &.
1228         (dump_generic_expr_loc): Delete.
1229         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1230         const dump_location_t &.
1231         * gimple-fold.c (fold_gimple_assign): Update call to
1232         dump_printf_loc to pass in a dump_location_t rather than a
1233         location_t, via the gimple stmt.
1234         (gimple_fold_call): Likewise.
1235         * gimple-loop-interchange.cc
1236         (loop_cand::analyze_iloop_reduction_var): Update for change to
1237         check_reduction_path.
1238         (tree_loop_interchange::interchange): Update for change to
1239         find_loop_location.
1240         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1241         change in return-type of find_loop_location.
1242         (graphite_regenerate_ast_isl): Likewise.
1243         * graphite-optimize-isl.c (optimize_isl): Likewise.
1244         * graphite.c (graphite_transform_loops): Likewise.
1245         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1246         pass in a dump_location_t rather than a location_t, via the
1247         gimple stmt.
1248         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1249         * ipa.c (walk_polymorphic_call_targets): Likewise.
1250         * loop-unroll.c (report_unroll): Convert "locus" param from
1251         location_t to dump_location_t.
1252         (decide_unrolling): Update for change to get_loop_location's
1253         return type.
1254         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1255         location_t to dump_user_location_t.
1256         (grid_find_single_omp_among_assignments_1): Updates calls to
1257         dump_printf_loc to pass in a dump_location_t rather than a
1258         location_t, via the gimple stmt.
1259         (grid_parallel_clauses_gridifiable): Convert "tloc" from
1260         location_t to dump_location_t.  Updates calls to dump_printf_loc
1261         to pass in a dump_location_t rather than a location_t, via the
1262         gimple stmt.
1263         (grid_inner_loop_gridifiable_p): Likewise.
1264         (grid_dist_follows_simple_pattern): Likewise.
1265         (grid_gfor_follows_tiling_pattern): Likewise.
1266         (grid_target_follows_gridifiable_pattern): Likewise.
1267         (grid_attempt_target_gridification): Convert initialization
1268         of local "grid" from memset to zero-initialization; FIXME: does
1269         this require C++11?  Update call to dump_printf_loc to pass in a
1270         optinfo_location rather than a location_t, via the gimple stmt.
1271         * profile.c (read_profile_edge_counts): Updates call to
1272         dump_printf_loc to pass in a dump_location_t rather than a
1273         location_t
1274         (compute_branch_probabilities): Likewise.
1275         * selftest-run-tests.c (selftest::run_tests): Call
1276         dumpfile_c_tests.
1277         * selftest.h (dumpfile_c_tests): New decl.
1278         * tree-loop-distribution.c (pass_loop_distribution::execute):
1279         Update for change in return type of find_loop_location.
1280         * tree-parloops.c (parallelize_loops): Likewise.
1281         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1282         "locus" from location_t to dump_user_location_t.
1283         (canonicalize_loop_induction_variables): Likewise.
1284         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1285         for change in return type of find_loop_location.
1286         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1287         to dump_printf_loc to pass in a dump_location_t rather than a
1288         location_t, via the stmt.
1289         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1290         Likewise.
1291         * tree-vect-loop-manip.c (find_loop_location): Convert return
1292         type from source_location to dump_user_location_t.
1293         (vect_do_peeling): Update for above change.
1294         (vect_loop_versioning): Update for change in type of
1295         vect_location.
1296         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1297         from location_t to dump_user_location_t.
1298         (vect_estimate_min_profitable_iters): Update for change in type
1299         of vect_location.
1300         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1301         location_t to dump_location_t.
1302         (vect_slp_bb): Update for change in type of vect_location.
1303         * tree-vectorizer.c (vect_location): Convert from source_location
1304         to dump_user_location_t.
1305         (try_vectorize_loop_1): Update for change in vect_location's type.
1306         (vectorize_loops): Likewise.
1307         (increase_alignment): Likewise.
1308         * tree-vectorizer.h (vect_location): Convert from source_location
1309         to dump_user_location_t.
1310         (find_loop_location): Convert return type from source_location to
1311         dump_user_location_t.
1312         (check_reduction_path): Convert 1st param from location_t to
1313         dump_user_location_t.
1314         * value-prof.c (check_counter): Update call to dump_printf_loc to
1315         pass in a dump_user_location_t rather than a location_t; update
1316         call to error_at for change in type of "locus".
1317         (check_ic_target): Update call to dump_printf_loc to
1318         pass in a dump_user_location_t rather than a location_t, via the
1319         call_stmt.
1321 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
1323         * config/s390/s390.h (enum processor_flags): Do not use
1324         default tune parameter when -march was specified.
1326 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
1328         PR target/86314
1329         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1330         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1331         operands.
1333 2018-06-26  Richard Biener  <rguenther@suse.de>
1335         PR tree-optimization/86287
1336         PR bootstrap/86316
1337         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1338         (vect_analyze_loop): Initialize n_stmts.
1340 2018-06-26  Richard Biener  <rguenther@suse.de>
1342         PR middle-end/86271
1343         * fold-const.c (fold_convertible_p): Pointer extension
1344         isn't valid.
1346 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
1348         PR debug/86064
1349         * dwarf2out.c (loc_list_has_views): Adjust comments.
1350         (dw_loc_list): Split single cross-partition range with
1351         nonzero locview.
1353 2018-06-25  Jeff Law  <law@redhat.com>
1355         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1356         on -mbig-switch by default.
1358         * config/v850/predicates.md (const_float_1_operand): Fix match_code
1359         test.
1360         (const_float_0_operand): Remove unused predicate.
1361         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1362         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1363         (recipsf2): New expander.  Original pattern now called
1364         (recipsf2_insn).
1365         (recipdf2, recipdf2_insn): Similarly.
1366         (rsqrtsf2, rsqrtsf2_insn): Similarly
1367         (rsqrtdf2, rsqrtdf2_insn): Similarly
1369 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
1371         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
1372         Simplify logic for FreeBSD (twice).
1374 2018-06-25  Martin Sebor  <msebor@redhat.com>
1376         PR tree-optimization/86204
1377         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
1378         a strnlen result if it's less than the length of the string.
1380 2018-06-25  Martin Sebor  <msebor@redhat.com>
1382         PR tree-optimization/85700
1383         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
1384         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
1385         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
1387 2018-06-25  Martin Sebor  <msebor@redhat.com>
1389         * doc/extend.texi (Zero-length arrays): Update and clarify.
1391 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
1393         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1394         added IEEE/IBM long double multilib support on PowerPC little
1395         endian Linux systems.
1396         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1397         (MULTILIB_DEFAULTS): Likewise.
1398         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1399         Likewise.
1400         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1401         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1402         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1404 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
1406         PR middle-end/86311
1407         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1408         (REORDER_45): Likewise.
1410 2018-06-25  Jeff Law  <law@redhat.com>
1412         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1413         dividend to 32 bits.  Adjust length.
1414         (udivmodhi4): Cleanup output template.  Fix length.
1416 2018-06-25  Carl Love  <cel@us.ibm.com>
1418         * config/rs6000/vsx.md: Change word selector to prefered location.
1420 2018-06-25  Richard Biener  <rguenther@suse.de>
1422         PR tree-optimization/86304
1423         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1424         epilogue-if-converted loops as well.
1426 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
1428         * lto-section-out.c (lto_begin_section): Do not print section
1429         name for noaddr and unnumbered dumps.
1431 2018-06-25  Richard Biener  <rguenther@suse.de>
1433         * tree-vectorizer.h (struct vec_info_shared): New structure
1434         with parts split out from struct vec_info and loop_nest from
1435         struct _loop_vec_info.
1436         (struct vec_info): Adjust accordingly.
1437         (struct _loop_vec_info): Likewise.
1438         (LOOP_VINFO_LOOP_NEST): Adjust.
1439         (LOOP_VINFO_DATAREFS): Likewise.
1440         (LOOP_VINFO_DDRS): Likewise.
1441         (struct _bb_vec_info): Likewise.
1442         (BB_VINFO_DATAREFS): Likewise.
1443         (BB_VINFO_DDRS): Likewise.
1444         (struct _stmt_vec_info): Add dr_aux member.
1445         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1446         (DR_MISALIGNMENT_UNINITIALIZED): New.
1447         (set_dr_misalignment): Adjust.
1448         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1449         (vect_analyze_loop): Adjust prototype.
1450         (vect_analyze_loop_form): Likewise.
1451         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1452         Compute dependences lazily.
1453         (vect_record_base_alignments): Use shared datarefs/ddrs.
1454         (vect_verify_datarefs_alignment): Likewise.
1455         (vect_analyze_data_refs_alignment): Likewise.
1456         (vect_analyze_data_ref_accesses): Likewise.
1457         (vect_analyze_data_refs): Likewise.
1458         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1459         constructor parameter for shared part.
1460         (vect_analyze_loop_form): Pass in shared part and adjust.
1461         (vect_analyze_loop_2): Pass in storage for the number of
1462         stmts.  Move loop nest finding to the caller.  Compute
1463         datarefs lazily.
1464         (vect_analyze_loop): Pass in shared part.
1465         (vect_transform_loop): Verify shared datarefs are unchanged.
1466         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1467         constructor parameter for shared part.
1468         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1469         (vect_slp_bb): Verify shared datarefs are unchanged before
1470         transform.
1471         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1472         change.
1473         (new_stmt_vec_info): Initialize DR_AUX misalignment to
1474         DR_MISALIGNMENT_UNINITIALIZED.
1475         * tree-vectorizer.c (vec_info::vec_info): Add constructor
1476         parameter for shared part.
1477         (vec_info::~vec_info): Adjust.
1478         (vec_info_shared::vec_info_shared): New.
1479         (vec_info_shared::~vec_info_shared): Likewise.
1480         (vec_info_shared::save_datarefs): Likewise.
1481         (vec_info_shared::check_datarefs): Likewise.
1482         (try_vectorize_loop_1): Construct shared part live for analyses
1483         of a single loop for multiple vector sizes.
1484         * tree-parloops.c (gather_scalar_reductions): Adjust.
1486 2018-06-25  Richard Biener  <rguenther@suse.de>
1488         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1489         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1490         (vect_analyze_data_refs): Remove similar code from here and
1491         simplify accordingly.
1493 2018-06-25  Richard Biener  <rguenther@suse.de>
1495         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1496         for reverse storage order accesses rather than asserting
1497         they cannot happen here.
1499 2018-06-25  Tom de Vries  <tdevries@suse.de>
1501         PR debug/86257
1502         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1503         Use data16 instead of .byte for insn prefix.
1505 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
1507         PR C++/86082
1508         * parser.c (make_char_string_pack): Pass this literal chars
1509         through cpp_interpret_string.
1510         (cp_parser_userdef_numeric_literal): Check the result of
1511         make_char_string_pack.
1513 2018-06-24  Maya Rashish  <coypu@sdf.org>
1515         * ginclude/stddef.h: Simplify conditions around avoiding
1516         re-definition of __size_t.
1518 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1520         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1521         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1523 2018-06-22  Maya Rashish  <coypu@sdf.org>
1525         * doc/invoke.texi (mno-fancy-math-387): Update for changes
1526         made to OpenBSD and NetBSD through the years.
1528 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1530         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1531         behavior of vec_pack (vector double, vector double) to match
1532         behavior of vec_float2 (vector double, vector double).
1534 2018-06-22  Olivier Hainque  <hainque@adacore.com>
1536         * gimplify.c (gimplify_function_tree): Prevent creation
1537         of a trampoline for the address of the current function
1538         passed to entry/exit instrumentation hooks.
1540 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
1542         PR target/86222
1543         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
1544         correctly.
1546 2018-06-22  Martin Liska  <mliska@suse.cz>
1548         PR tree-optimization/86263
1549         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1550         Bail out if is_enabled is false.
1551         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
1552         New declaration.
1553         (jump_table_cluster::is_enabled): New function.
1555 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1557         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1558         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
1559         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
1560         (lto_input_ts_binfo_tree_pointers): Likewise.
1561         * tree-streamer-out.c (streamer_write_tree_bitfields,
1562         write_ts_binfo_tree_pointers): Likewise.
1563         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
1565 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1567         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
1569 2018-06-22  Martin Liska  <mliska@suse.cz>
1571         * symbol-summary.h (get): Make it pure and inline move
1572         functionality from ::get function.
1573         (get): Remove and inline into ::get and ::get_create.
1574         (get_create): Move code from ::get function.
1576 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1578         PR target/85994
1579         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
1580         -x assembler-with-cpp.
1582 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1584         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
1585         _FILE_OFFSET_BITS=64 for C++.
1587 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
1589         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
1590         conversion insn that shows up when pr85657-3.c is compiled using
1591         IEEE 128-bit long double.
1592         (neg<mode>2_internal): Use the correct mode to check whether the
1593         mode is IBM extended.
1594         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
1595         multiply and divide external functions from being created more
1596         than once.
1598 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1600         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
1601         functions.
1602         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
1603         the edge can be forwarded.
1604         (cfg_layout_merge_blocks): Likewise.
1606 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1608         * except.c (finish_eh_generation): Commit edge insertions only after
1609         the EH edges have been redirected from post-landing to landing pads.
1611 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1613         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
1614         create_tmp_var_for to create the FRAME decl.
1615         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
1617 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
1619         * tree-inline.c (copy_edges_for_bb): Minor tweak.
1620         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
1621         debug statement when resetting its value.
1622         (expand_call_inline): Copy the locus of the call onto the assignment
1623         of the return value, if any.  Use local variable in more cases.
1625 2018-06-21  Martin Liska  <mliska@suse.cz>
1627         * ipa-pure-const.c (propagate_nothrow): Use
1628         funct_state_summaries->get.
1629         (dump_malloc_lattice): Likewise.
1630         (propagate_malloc): Likewise.
1632 2018-06-21  Richard Biener  <rguenther@suse.de>
1634         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
1635         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
1636         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
1637         comment.
1638         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
1639         BLOCK_ABSTRACT_ORIGIN unconditionally.
1641 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
1643         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
1644         deleting it.
1645         * ipa-reference.c (ipa_reference_c_finalize): Delete
1646         ipa_ref_opt_sum_summaries and set it to NULL.
1648 2018-06-21  Tom de Vries  <tdevries@suse.de>
1650         PR tree-optimization/85859
1651         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
1652         test with comment from bb_no_side_effects_p.
1654 2018-06-21  Richard Biener  <rguenther@suse.de>
1656         PR tree-optimization/86232
1657         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
1658         max for constant niter.
1660 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1662         * config/aarch64/aarch64-simd.md
1663         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
1665 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1667         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
1668         Make opernads of the unspec commutative.
1670 2018-06-21  Richard Biener  <rguenther@suse.de>
1672         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
1673         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
1674         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
1675         (vect_analyze_data_ref_dependence): Re-order checks to deal with
1676         NULL DR_STEP.
1677         (vect_record_base_alignments): Do not record base alignment
1678         for gathers or scatters.
1679         (vect_compute_data_ref_alignment): Drop return value that is always
1680         true.  Bail out early for gathers or scatters.
1681         (vect_enhance_data_refs_alignment): Bail out early for gathers
1682         or scatters.
1683         (vect_find_same_alignment_drs): Likewise.
1684         (vect_analyze_data_refs_alignment): Remove dead code.
1685         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1686         (vect_analyze_data_refs): For possible gathers or scatters do
1687         not create an alternate DR, just check their possible validity
1688         and mark them.  Adjust DECL_NONALIASED handling to not rely
1689         on DR_BASE_ADDRESS.
1690         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
1691         update inits of gathers or scatters.
1692         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
1693         Also copy gather/scatter flag to pattern vinfo.
1695 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1697         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1698         behavior of vec_packsu (vector unsigned long long, vector unsigned
1699         long long) to match behavior of vec_packs with same signature.
1701 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
1702             Thomas Schwinge <thomas@codesourcery.com>
1703             Cesar Philippidis  <cesar@codesourcery.com>
1705         * gimplify.c (gimplify_scan_omp_clauses): Add support for
1706         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1707         (gimplify_adjust_omp_clauses): Likewise.
1708         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
1709         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
1710         (gimplify_omp_target_update): Update handling of acc update and
1711         enter/exit data.
1712         * omp-low.c (install_var_field): Remove unused parameter
1713         base_pointers_restrict.
1714         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
1715         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
1716         FINALIZE}
1717         (omp_target_base_pointers_restrict_p): Delete.
1718         (scan_omp_target): Update call to scan_sharing_clauses.
1719         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
1720         FINALIZE}.
1721         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1722         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1723         (convert_local_omp_clauses): Likewise.
1724         * tree-pretty-print.c (dump_omp_clause): Likewise.
1725         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
1726         FINALIZE}.
1727         (omp_clause_code_name): Likewise.
1729 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
1731         PR debug/86194
1732         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
1733         be narrowed.
1735         PR tree-optimization/86231
1736         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
1737         anti-range don't overwrite *vr0min before using it to compute *vr0max.
1739 2018-06-20  Tom de Vries  <tdevries@suse.de>
1741         PR tree-optimization/86097
1742         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
1743         iv type if signedness of iv type is not the same as that of *nit.
1745 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
1747         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
1748         EDGE_EH edges, verify they are all EDGE_EH.
1750 2018-06-20  Maya Rashish  <coypu@sdf.org>
1752         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
1754 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1756         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
1757         * config/aarch64/aarch64.c (xgene1_tunings): Add
1758         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
1759         (aarch64_mode_valid_for_sched_fusion_p):
1760         Allow 16-byte modes.
1761         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
1762         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
1763         128-bit modes.
1764         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
1765         New pattern.
1766         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
1767         * config/aarch64/iterators.md (VQ2): New mode iterator.
1769 2018-06-20  Martin Liska  <mliska@suse.cz>
1771         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1772         Change default ratio from 10 to 8.
1774 2018-06-20  Martin Liska  <mliska@suse.cz>
1776         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1777         New.
1778         (bit_test_cluster::find_bit_tests): Likewise.
1779         (switch_decision_tree::analyze_switch_statement): Find clusters.
1780         * tree-switch-conversion.h (struct jump_table_cluster): Document
1781         hierarchy.
1783 2018-06-20  Martin Liska  <mliska@suse.cz>
1785         * tree-switch-conversion.c (switch_conversion::collect):
1786         Record m_uniq property.
1787         (switch_conversion::expand): Bail out for special conditions.
1788         (group_cluster::~group_cluster): New.
1789         (group_cluster::group_cluster): Likewise.
1790         (group_cluster::dump): Likewise.
1791         (jump_table_cluster::emit): New.
1792         (switch_decision_tree::fix_phi_operands_for_edges): New.
1793         (struct case_node): Remove struct.
1794         (jump_table_cluster::can_be_handled): New.
1795         (case_values_threshold): Moved to header.
1796         (reset_out_edges_aux): Likewise.
1797         (jump_table_cluster::is_beneficial): New.
1798         (bit_test_cluster::can_be_handled): Likewise.
1799         (add_case_node): Remove.
1800         (bit_test_cluster::is_beneficial): New.
1801         (case_bit_test::cmp): New.
1802         (bit_test_cluster::emit): New.
1803         (expand_switch_as_decision_tree_p): Remove.
1804         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
1805         (fix_phi_operands_for_edge): Likewise.
1806         (switch_decision_tree::analyze_switch_statement): New.
1807         (compute_cases_per_edge): Move ...
1808         (switch_decision_tree::compute_cases_per_edge): ... here.
1809         (try_switch_expansion): Likewise.
1810         (switch_decision_tree::try_switch_expansion): Likewise.
1811         (record_phi_operand_mapping): Likewise.
1812         (switch_decision_tree::record_phi_operand_mapping): Likewise.
1813         (emit_case_decision_tree): Likewise.
1814         (switch_decision_tree::emit): Likewise.
1815         (balance_case_nodes): Likewise.
1816         (switch_decision_tree::balance_case_nodes): Likewise.
1817         (dump_case_nodes): Likewise.
1818         (switch_decision_tree::dump_case_nodes): Likewise.
1819         (emit_jump): Likewise.
1820         (switch_decision_tree::emit_jump): Likewise.
1821         (emit_cmp_and_jump_insns): Likewise.
1822         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1823         (emit_case_nodes): Likewise.
1824         (switch_decision_tree::emit_case_nodes): Likewise.
1825         (conditional_probability): Remove.
1826         * tree-switch-conversion.h (enum cluster_type): New.
1827         (PRINT_CASE): New.
1828         (struct cluster): Likewise.
1829         (cluster::cluster): Likewise.
1830         (struct simple_cluster): Likewise.
1831         (simple_cluster::simple_cluster): Likewise.
1832         (struct group_cluster): Likewise.
1833         (struct jump_table_cluster): Likewise.
1834         (struct bit_test_cluster): Likewise.
1835         (struct min_cluster_item): Likewise.
1836         (struct case_tree_node): Likewise.
1837         (case_tree_node::case_tree_node): Likewise.
1838         (jump_table_cluster::case_values_threshold): Likewise.
1839         (struct case_bit_test): Likewise.
1840         (struct switch_decision_tree): Likewise.
1841         (struct switch_conversion): Likewise.
1842         (switch_decision_tree::reset_out_edges_aux): Likewise.
1844 2018-06-20  Martin Liska  <mliska@suse.cz>
1846         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
1847         (hoist_edge_and_branch_if_true): Likewise.
1848         (expand_switch_using_bit_tests_p): Likewise.
1849         (struct case_bit_test): Likewise.
1850         (case_bit_test_cmp): Likewise.
1851         (emit_case_bit_tests): Likewise.
1852         (switch_conversion::switch_conversion): New class.
1853         (struct switch_conv_info): Remove old struct.
1854         (collect_switch_conv_info): More to ...
1855         (switch_conversion::collect): ... this.
1856         (check_range): Likewise.
1857         (switch_conversion::check_range): Likewise.
1858         (check_all_empty_except_final): Likewise.
1859         (switch_conversion::check_all_empty_except_final): Likewise.
1860         (check_final_bb): Likewise.
1861         (switch_conversion::check_final_bb): Likewise.
1862         (create_temp_arrays): Likewise.
1863         (switch_conversion::create_temp_arrays): Likewise.
1864         (free_temp_arrays): Likewise.
1865         (gather_default_values): Likewise.
1866         (switch_conversion::gather_default_values): Likewise.
1867         (build_constructors): Likewise.
1868         (switch_conversion::build_constructors): Likewise.
1869         (constructor_contains_same_values_p): Likewise.
1870         (switch_conversion::contains_same_values_p): Likewise.
1871         (array_value_type): Likewise.
1872         (switch_conversion::array_value_type): Likewise.
1873         (build_one_array): Likewise.
1874         (switch_conversion::build_one_array): Likewise.
1875         (build_arrays): Likewise.
1876         (switch_conversion::build_arrays): Likewise.
1877         (gen_def_assigns): Likewise.
1878         (switch_conversion::gen_def_assigns): Likewise.
1879         (prune_bbs): Likewise.
1880         (switch_conversion::prune_bbs): Likewise.
1881         (fix_phi_nodes): Likewise.
1882         (switch_conversion::fix_phi_nodes): Likewise.
1883         (gen_inbound_check): Likewise.
1884         (switch_conversion::gen_inbound_check): Likewise.
1885         (process_switch): Use the newly created class.
1886         (switch_conversion::expand): New.
1887         (switch_conversion::~switch_conversion): New.
1888         * tree-switch-conversion.h: New file.
1890 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1892         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
1893         tree-vect-patterns.c.
1894         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
1895         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
1896         (vect_recog_sad_pattern): Likewise.
1897         (vect_recog_widen_sum_pattern): Likewise.
1898         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
1899         (vect_recog_widen_shift_pattern): Remove the type_in argument.
1900         (vect_recog_rotate_pattern): Likewise.
1901         (vect_recog_mult_pattern): Likewise.
1902         (vect_recog_vector_vector_shift_pattern): Likewise.
1903         (vect_recog_divmod_pattern): Likewise.
1904         (vect_recog_mixed_size_cond_pattern): Likewise.
1905         (vect_recog_bool_pattern): Likewise.
1906         (vect_recog_mask_conversion_pattern): Likewise.
1907         (vect_try_gather_scatter_pattern): Likewise.
1908         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
1909         (vect_recog_over_widening_pattern): Likewise.
1910         (vect_recog_gather_scatter_pattern): Likewise.
1911         (vect_recog_func_ptr): Move from tree-vectorizer.h
1912         (vect_vect_recog_func_ptrs): Move further down the file.
1913         (vect_recog_func): Likewise.  Remove the third argument.
1914         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
1915         (vect_pattern_recog_1): Expect the pattern function to do any
1916         necessary target tests.  Also expect it to provide a vector type.
1917         Remove the type_in handling.
1919 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1921         * tree-vect-patterns.c (vect_pattern_detected): New function.
1922         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
1923         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
1924         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
1925         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
1926         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1927         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1928         (vect_recog_mask_conversion_pattern)
1929         (vect_try_gather_scatter_pattern): Likewise.
1931 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1933         * tree-vect-patterns.c (vect_get_internal_def): New function.
1934         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1935         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1936         (search_type_for_mask_1): Use it.
1938 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1940         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1941         redundant WIDEN_SUM_EXPR handling.
1942         (vect_recog_sad_pattern): Likewise.
1944 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1946         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1947         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1948         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1949         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1950         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1952 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1954         * tree-vect-stmts.c (vectorizable_call): Make sure that we
1955         use the stmt_vec_info of the original bb statement for the
1956         new zero assignment, even if the call is part of a pattern.
1958 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1960         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1961         that the sequence is attached to the original statement rather
1962         than the pattern statement.
1963         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1964         PATTERN_DEF_SEQ from the original statement rather than
1965         the main pattern statement.
1966         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1967         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1968         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1970 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1972         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1973         definition statements before the early exit for statements that aren't
1974         live or relevant.
1975         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1976         split out from...
1977         (vect_transform_loop): ...here.  Process pattern definition
1978         statements without first checking whether the main pattern
1979         statement is live or relevant.
1981 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1983         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1984         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1986 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
1988         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1989         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1990         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1991         (expand_block_compare): Change select_block_compare_mode call.
1992         (expand_strncmp_align_check): Use new functions, fix comment.
1993         (emit_final_str_compare_gpr): New function.
1994         (expand_strn_compare): Refactor and clean up code.
1995         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1997 2018-06-19  Tony Reix  <tony.reix@atos.com>
1998             Damien Bergamini  <damien.bergamini@atos.com>
1999             David Edelsohn  <dje.gcc@gmail.com>
2001         * collect2.c (static_obj): New variable.
2002         (static_libs): New variable.
2003         (is_in_list): Uncomment declaration.
2004         (main): Track AIX libraries linked statically.
2005         (is_in_list): Uncomment definition.
2006         (scan_prog_file): Don't add AIX shared libraries initializer
2007         to constructor list if linking statically.
2009 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
2011         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2012         constant.
2013         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2015 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
2017         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2018         blocks.
2020 2018-06-19  Martin Liska  <mliska@suse.cz>
2022         * config/i386/i386.c (ix86_can_inline_p): Do not use
2023         ipa_fn_summaries::get_create.
2024         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2025         get.
2026         (devirtualization_time_bonus): Likewise.
2027         (ipcp_propagate_stage): Likewise.
2028         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2029         (edge_set_predicate): Likewise.
2030         (evaluate_conditions_for_known_args): Likewise.
2031         (evaluate_properties_for_edge): Likewise.
2032         (ipa_call_summary::reset): Tranform to ...
2033         (ipa_call_summary::~ipa_call_summary): ... this.
2034         (ipa_fn_summary::reset): Transform to ...
2035         (ipa_fn_summary::~ipa_fn_summary): ... this.
2036         (ipa_fn_summary_t::remove): Rename to ...
2037         (ipa_fn_summary_t::remove_callees): ... this.
2038         (ipa_fn_summary_t::duplicate): Use placement new
2039         instead of memory copy.
2040         (ipa_call_summary_t::duplicate): Likewise.
2041         (ipa_call_summary_t::remove): Remove.
2042         (dump_ipa_call_summary): Change get_create to get.
2043         (ipa_dump_fn_summary): Dump only when summary exists.
2044         (analyze_function_body): Use symbol_summary::get instead
2045         of get_create.
2046         (compute_fn_summary): Likewise.
2047         (estimate_edge_devirt_benefit): Likewise.
2048         (estimate_edge_size_and_time): Likewise.
2049         (inline_update_callee_summaries): Likewise.
2050         (remap_edge_change_prob): Likewise.
2051         (remap_edge_summaries): Likewise.
2052         (ipa_merge_fn_summary_after_inlining): Likewise.
2053         (write_ipa_call_summary): Likewise.
2054         (ipa_fn_summary_write): Likewise.
2055         (ipa_free_fn_summary): Likewise.
2056         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2057         (struct ipa_call_summary): Likewise.
2058         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2059         of get_create.
2060         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2061         (estimate_size_after_inlining): Likewise.
2062         (estimate_growth): Likewise.
2063         (growth_likely_positive): Likewise.
2064         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2065         (inline_call): Likewise.
2066         * ipa-inline.c (caller_growth_limits): Likewise.
2067         (can_inline_edge_p): Likewise.
2068         (can_inline_edge_by_limits_p): Likewise.
2069         (compute_uninlined_call_time): Likewise.
2070         (compute_inlined_call_time): Likewise.
2071         (want_inline_small_function_p): Likewise.
2072         (edge_badness): Likewise.
2073         (update_caller_keys): Likewise.
2074         (update_callee_keys): Likewise.
2075         (inline_small_functions): Likewise.
2076         (inline_to_all_callers_1): Likewise.
2077         (dump_overall_stats): Likewise.
2078         (early_inline_small_functions): Likewise.
2079         (early_inliner): Likewise.
2080         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2081         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2082         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2083         * ipa-split.c (execute_split_functions): Likewise.
2084         * symbol-summary.h: Likewise.
2085         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2087 2018-06-19  Richard Biener  <rguenther@suse.de>
2089         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2090         (vectorize_loops): ... here.  Fix dbgcnt handling.
2091         (try_vectorize_loop): Wrap try_vectorize_loop_1.
2093 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
2095         PR target/86197
2096         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2097         ieee128 argument takes up only one (vector) register, not two (floating
2098         point) registers.
2100 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2102         * gimplify.c (gimplify_init_constructor): Really never clear for an
2103         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2105 2018-06-19  Richard Biener  <rguenther@suse.de>
2107         PR tree-optimization/86179
2108         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2109         after failed recognition.
2111 2018-06-18  Martin Sebor  <msebor@redhat.com>
2113         PR middle-end/85602
2114         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2115         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2116         Handle integer subtraction.
2117         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2118         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2120 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2122         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2123         param from rtx to rtx_insn *.
2124         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2125         param.
2126         (frv_ifcvt_modify_insn): Likwise.
2127         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2128         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
2129         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2130         as_a <rtx_insn *> cast to local "unprotected_region" once
2131         it's been established that it's not NULL or pc_rtx.
2132         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2133         param "sethi" from rtx to rtx_insn *.
2134         (nds32_group_float_insns): Likewise for param "insn".
2135         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2136         param.
2137         (vax_output_int_subtract): Likewise.
2138         * config/vax/vax.c (vax_output_int_add): Likewise for param
2139         "insn".
2140         (vax_output_int_subtract): Likewise.
2141         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2142         (emit_pattern_after): Likewise for param "after".
2143         (emit_insn_after): Likewise.
2144         (emit_jump_insn_after): Likewise.
2145         (emit_call_insn_after): Likewise.
2146         (emit_debug_insn_after): Likewise.
2147         (emit_pattern_before): Likewise for param "before".
2148         (emit_insn_before): Likewise.
2149         (emit_jump_insn_before): Likewise.
2150         * final.c (get_insn_template): Likewise for param "insn", removing
2151         a cast.
2152         * output.h (get_insn_template): Likewise for 2nd param.
2153         * rtl.h (emit_insn_before): Likewise.
2154         (emit_jump_insn_before): Likewise.
2155         (emit_debug_insn_before_noloc): Likewise.
2156         (emit_insn_after): Likewise.
2157         (emit_jump_insn_after): Likewise.
2158         (emit_call_insn_after): Likewise.
2159         (emit_debug_insn_after): Likewise.
2160         (set_insn_deleted): Likewise for param.
2162 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
2164         PR target/85358
2165         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2166         floating point modes, so that IFmode is numerically greater than
2167         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2168         to declare the ordering.  This prevents IFmode from being
2169         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2170         machine.  Include rs6000-modes.h to share the fractional values
2171         between genmodes* and the rest of the compiler.
2172         (IFmode): Likewise.
2173         (KFmode): Likewise.
2174         (TFmode): Likewise.
2175         * config/rs6000/rs6000-modes.h: New file.
2176         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2177         meaning of rs6000_long_double_size so that 126..128 selects an
2178         appropriate 128-bit floating point type.
2179         (rs6000_option_override_internal): Likewise.
2180         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2181         (TARGET_LONG_DOUBLE_128): Change the meaning of
2182         rs6000_long_double_size so that 126..128 selects an appropriate
2183         128-bit floating point type.
2184         (LONG_DOUBLE_TYPE_SIZE): Update comment.
2185         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2186         source and destination to match the standard usage.
2187         (truncifkf2): Likewise.
2188         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2189         ISA 2.07 to use an explicit clobber, instead of passing in a
2190         temporary.
2191         (copysign<mode>3_soft): Likewise.
2193 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2195         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2196         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2197         (vect_slp_analyze_instance_dependence): Likewise.
2198         (vect_enhance_data_refs_alignment): Likewise.
2199         (vect_analyze_data_refs_alignment): Likewise.
2200         (vect_slp_analyze_and_verify_instance_alignment
2201         (vect_analyze_data_ref_accesses): Likewise.
2202         (vect_prune_runtime_alias_test_list): Likewise.
2203         (vect_analyze_data_refs): Likewise.
2204         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2205         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2206         (vect_analyze_scalar_cycles_1): Likewise.
2207         (vect_get_loop_niters): Likewise.
2208         (vect_analyze_loop_form_1): Likewise.
2209         (vect_update_vf_for_slp): Likewise.
2210         (vect_analyze_loop_operations): Likewise.
2211         (vect_analyze_loop): Likewise.
2212         (vectorizable_induction): Likewise.
2213         (vect_transform_loop): Likewise.
2214         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2215         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2216         (vect_make_slp_decision): Likewise.
2217         (vect_detect_hybrid_slp): Likewise.
2218         (vect_slp_analyze_operations): Likewise.
2219         (vect_slp_bb): Likewise.
2220         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2221         (vectorizable_bswap): Likewise.
2222         (vectorizable_call): Likewise.
2223         (vectorizable_simd_clone_call): Likewise.
2224         (vectorizable_conversion): Likewise.
2225         (vectorizable_assignment): Likewise.
2226         (vectorizable_shift): Likewise.
2227         (vectorizable_operation): Likewise.
2228         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2230 2018-06-18  Martin Sebor  <msebor@redhat.com>
2232         PR tree-optimization/81384
2233         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2234         * builtins.c (expand_builtin_strnlen): New function.
2235         (expand_builtin): Call it.
2236         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2237         * builtins.def (BUILT_IN_STRNLEN): New.
2238         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2239         Warn for bounds in excess of maximum object size.
2240         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2241         single-value ranges.  Handle strnlen.
2242         (handle_builtin_strlen): Handle strnlen.
2243         (strlen_check_and_optimize_stmt): Same.
2244         * doc/extend.texi (Other Builtins): Document strnlen.
2246 2018-06-18  Maya Rashish  <coypu@sdf.org>
2248         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2249         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2250         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2252         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2253         here to ...
2254         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2256 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2258         * tree.c (escaped_string::escape): Replace cast to char * by
2259         const_cast<char *> (unescaped).
2261 2018-06-18  Nick Clifton  <nickc@redhat.com>
2263         PR 84195
2264         * tree.c (escaped_string): New class.  Converts an unescaped
2265         string into its escaped equivalent.
2266         (warn_deprecated_use): Use the new class to convert the
2267         deprecation message, if present.
2268         (test_escaped_strings): New self test.
2269         (test_c_tests): Add test_escaped_strings.
2270         * doc/extend.texi (deprecated): Add a note that the
2271         deprecation message is affected by the -fmessage-length
2272         option, and that control characters will be escaped.
2273         (#pragma GCC error): Document this pragma.
2274         (#pragma GCC warning): Likewise.
2275         * doc/invoke.texi (-fmessage-length): Document this option's
2276         effect on the #warning and #error preprocessor directives and
2277         the deprecated attribute.
2279 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
2281         * tree.c (decl_value_expr_lookup): Revert latest change.
2282         (decl_value_expr_insert): Likewise.
2284 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
2286         * gimplify.c (nonlocal_vlas): Delete.
2287         (nonlocal_vla_vars): Likewise.
2288         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2289         referenced VLAs.
2290         (gimplify_body): Do not create and destroy nonlocal_vlas.
2291         * tree-nested.c: Include diagnostic.h.
2292         (use_pointer_in_frame): Tweak.
2293         (lookup_field_for_decl): Add assertion and declare the transformation.
2294         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2295         internal error when the reference is in a wrong context.  Do not
2296         create a debug decl by default.
2297         (note_nonlocal_block_vlas): Delete.
2298         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2299         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
2300         create a debug decl by default.
2301         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2302         call is in a wrong context.
2303         (fixup_vla_decls): New function.
2304         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
2305         debug variables were created.
2306         * tree.c (decl_value_expr_lookup): Add checking assertion.
2307         (decl_value_expr_insert): Likewise.
2309 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2311         PR middle-end/82479
2312         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2313         * tree-scalar-evolution.c (interpret_expr): Likewise.
2314         (expression_expensive_p): Likewise.
2315         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2316         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2317         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2318         (ssa_defined_by_minus_one_stmt_p): New.
2320 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2322         PR middle-end/64946
2323         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2324         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2325         * dojump.c (do_jump): Likewise.
2326         * expr.c (expand_expr_real_2): Check operand type's sign.
2327         * fold-const.c (const_unop): Handle ABSU_EXPR.
2328         (fold_abs_const): Likewise.
2329         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2330         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2331         (strip_sign_op_1): Likesise.
2332         * match.pd: Add new pattern to generate ABSU_EXPR.
2333         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2334         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2335         * tree-eh.c (operation_could_trap_helper_p): Likewise.
2336         * tree-inline.c (estimate_operator_cost): Likewise.
2337         * tree-pretty-print.c (dump_generic_node): Likewise.
2338         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2339         * tree.def (ABSU_EXPR): New.
2341 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
2343         PR middle-end/86095
2344         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2345         documented as preserved for backward compatibility only.
2346         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2348         PR rtl-optimization/86108
2349         * bb-reorder.c (create_forwarder_block): Renamed to ...
2350         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
2351         jump from new landing pad to the second part.
2352         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2353         Adjust callers.
2355 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
2357         PR middle-end/85878
2358         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2359         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2360         Only call store_expr for halves if the mode is the same.
2362         PR middle-end/86123
2363         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2364         Fix up comment formatting.
2366 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2368         * typed-splay-tree.h (typed_splay_tree::remove): New function.
2369         (typed_splay_tree::closure,
2370         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
2371         (typed_splay_tree::typed_splay_tree,
2372         typed_splay_tree::operator =): Declared private.
2373         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
2374         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
2375         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
2376         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
2377         typed_splay_tree::splay_tree_splay,
2378         typed_splay_tree::splay_tree_foreach_helper,
2379         typed_splay_tree::splay_tree_insert,
2380         typed_splay_tree::splay_tree_remove,
2381         typed_splay_tree::splay_tree_lookup,
2382         typed_splay_tree::splay_tree_predecessor,
2383         typed_splay_tree::splay_tree_successor,
2384         typed_splay_tree::splay_tree_min,
2385         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
2386         (typed_splay_tree::root, typed_splay_tree::comp,
2387         typed_splay_tree::delete_key,
2388         typed_splay_tree::delete_value): New data members.
2389         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
2390         typed_splay_tree::remove.
2392 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
2394         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2395         -mginv and -mno-ginv to the assembler.
2396         * config/mips/mips.opt (-mcrc): New option.
2397         (-mginv): Likewise.
2398         * doc/invoke.text (-mcrc): Document.
2399         (-mginv): Likewise.
2401 2018-06-15  Nick Clifton  <nickc@redhat.com>
2403         PR 84195
2404         * tree.c (escaped_string): New class.  Converts an unescaped
2405         string into its escaped equivalent.
2406         (warn_deprecated_use): Use the new class to convert the
2407         deprecation message, if present.
2408         (test_escaped_strings): New self test.
2409         (test_c_tests): Add test_escaped_strings.
2410         * doc/extend.texi (deprecated): Add a note that the
2411         deprecation message is affected by the -fmessage-length
2412         option, and that control characters will be escaped.
2413         (#pragma GCC error): Document this pragma.
2414         (#pragma GCC warning): Likewise.
2415         * doc/invoke.texi (-fmessage-length): Document this option's
2416         effect on the #warning and #error preprocessor directives and
2417         the deprecated attribute.
2419 2018-06-15  Richard Biener  <rguenther@suse.de>
2421         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2422         here, also noting vector size used.
2423         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
2424         size used in MSG_OPTIMIZED_LOCATIONS dump.
2425         (pass_slp_vectorize::execute): Adjust.
2427 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
2429         PR target/85968
2430         * config/arc/arc.c (arc_return_address_register): Fix
2431         if-condition.
2433 2018-06-15  Richard Biener  <rguenther@suse.de>
2435         PR middle-end/86159
2436         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2437         leave useless conversion stripping to force_gimple_operand_gsi.
2438         (gimplify_build2): Likewise.
2439         (gimplify_build1): Likewise.
2441 2018-06-15  Richard Biener  <rguenther@suse.de>
2443         PR middle-end/86076
2444         * tree-cfg.c (move_stmt_op): unshare invariant addresses
2445         before adjusting their block.
2447 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2449         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2450         multilibs for *-*-rtems*.
2451         * config/riscv/t-rtems: New file.
2453 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
2455         PR middle-end/86122
2456         * match.pd ((A +- CST1) +- CST2): Punt if last resort
2457         unsigned_type_for returns NULL.
2459         PR target/85945
2460         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2461         subregs of multi-word pseudos unless the float mode has word size.
2463 2018-06-14  Richard Biener  <rguenther@suse.de>
2465         PR middle-end/86139
2466         * tree-vect-generic.c (build_word_mode_vector_type): Remove
2467         duplicate and harmful type_hash_canon.
2468         * tree.c (type_hash_canon): Assert we didn't find ourselves.
2470 2018-06-14  Richard Biener  <rguenther@suse.de>
2472         PR ipa/86124
2473         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2474         NULL cgraph_node.
2476 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2478         * config/rtems.h (STDINT_LONG32): Define.
2480 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
2481             Prachi Godbole  <prachi.godbole@imgtec.com>
2483         * config/mips/mips-cpus.def: Define P6600.
2484         * config/mips/mips-tables.opt: Regenerate.
2485         * config/mips/mips.c (mips_ucbranch_type): New enum.
2486         (mips_rtx_cost_data): Add support for P6600.
2487         (mips_issue_rate): Likewise.
2488         (mips_multipass_dfa_lookahead): Likewise.
2489         (mips_avoid_hazard): Likewise.
2490         (mips_reorg_process_insns): Likewise.
2491         (mips_classify_branch_p6600): New function.
2492         * config/mips/mips.h (TUNE_P6600): New define.
2493         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2494         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2495         * config/mips/mips.md: Include p6600.md.
2496         (processor): Add p6600.
2497         * config/mips/p6600.md: New file.
2498         * doc/invoke.texi: Add p6600 to supported architectures.
2500 2018-06-13  Martin Sebor  <msebor@redhat.com>
2502         PR tree-optimization/86114
2503         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2504         of integer types.
2505         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2507 2018-06-13  Richard Biener  <rguenther@suse.de>
2509         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2510         Properly set vector type of the intermediate stmt.
2511         * tree-vect-stmts.c (vectorizable_operation): The destination
2512         var always has vectype_out type.
2514 2018-06-13  Jeff Law  <law@redhat.com>
2516         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2517         integer 0 for argument to print_rtl_with_bb.
2518         (rl78_reorg): Likewise.
2520 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
2522         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2523         from rtx to rtx_insn *.
2524         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2525         "label".
2526         (add_sched_insns_for_speculation): Likewise for local "target",
2527         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2528         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2529         from rtx_insn ** to rtx_code_label **.
2530         (reorg_emit_nops): Likewise.
2531         (c6x_reorg): Likewise for local "call_labels".
2532         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
2533         rtx to rtx_insn *.
2534         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
2535         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
2536         the loops over LABEL_REFS.
2537         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
2538         braf_label.
2539         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2540         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
2541         (split_branches): Strengthen local "olabel" from rtx to
2542         rtx_insn *, adding a safe_as_a cast.
2543         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
2544         to "rtx_insn *".
2545         (add_insn_after): Likewise for first two params.
2546         (add_insn_before): Likewise.
2547         (remove_insn): Likewise for param.
2548         (emit_pattern_before_noloc): Likewise for second and third params.
2549         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
2550         (emit_call_insn_before_noloc): Likewise.
2551         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
2552         to "rtx_insn *".
2553         (emit_barrier_before): Likewise.
2554         (emit_label_before): Strengthen "label" param from "rtx" to
2555         "rtx_code_label *".  Strengthen "before" param from "rtx" to
2556         "rtx_insn *".
2557         (emit_insn_after_1): Strengthen "after" param from "rtx" to
2558         "rtx_insn *".
2559         (emit_pattern_after_noloc): Likewise.
2560         (emit_insn_after_noloc): Likewise.
2561         (emit_jump_insn_after_noloc): Likewise.
2562         (emit_call_insn_after_noloc): Likewise.
2563         (emit_debug_insn_after_noloc): Likewise.
2564         (emit_barrier_after): Likewise.
2565         (emit_label_after): Likewise for both params.
2566         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
2567         "loc" param from "int" to "location_t".
2568         (emit_insn_after_setloc): Likewise.
2569         (emit_jump_insn_after_setloc): Likewise.
2570         (emit_call_insn_after_setloc): Likewise.
2571         (emit_debug_insn_after_setloc): Likewise.
2572         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
2573         "loc" param from "int" to "location_t".
2574         (emit_pattern_before): Convert NULL_RTX to NULL.
2575         (emit_insn_before_setloc): Convert "loc" param from "int" to
2576         "location_t".
2577         (emit_jump_insn_before_setloc): Likewise.
2578         (emit_call_insn_before_setloc): Likewise.
2579         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
2580         rtx_insn *.  Convert "loc" param from "int" to "location_t".
2581         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
2582         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
2583         Convert 3rd param from "int" to "location_t".
2584         (emit_barrier_before, emit_barrier_after, next_real_insn):
2585         Strengthen param from rtx to rtx_insn *.
2586         (emit_label_before): Strengthen 1st param from "rtx" to
2587         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
2588         "rtx_insn *".
2589         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
2590         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
2591         Strengthen 2nd param from "rtx" to "rtx_insn *".
2592         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
2593         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
2594         Likewise. Convert 3rd param from "int" to "location_t".
2595         (emit_label_after): Strengthen 1st param from "rtx" to
2596         "rtx_code_label *".
2597         (next_real_insn, remove_insn): Strengthen param from "rtx" to
2598         "rtx_insn *".
2599         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
2600         from "rtx" to "rtx_insn *".
2602 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
2604         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
2605         bodies streamed in with -Q.
2606         * dumpfile.c (dump_files): Add lto-stream-out dump file.
2607         * dumpfile.h (tree_dump_index): Add lto_stream_out.
2608         * gimple-streamer-out.c: Include gimple-pretty-print.h
2609         (output_bb): Dump stmts streamed.
2610         * lto-section-out.c: Include print-tree.h
2611         (lto_begin_section): Dump sections created.
2612         (lto_output_decl_index): Dump decl encoded.
2613         * lto-streamer-out.c: Include print-tree.h
2614         (create_output_block): Dump output block created.
2615         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
2616         (output_function): Dump function output.
2617         (output_constructor): Dump constructor streamed.
2618         (write_global_stream): Output indexes encoded.
2619         (produce_asm_for_decls): Dump streams encoded.
2620         * lto-streamer.c (streamer_dump_file): New global var.
2621         * lto-streamer.h (streamer_dump_file): Declare.
2622         * passes.c (ipa_write_summaries): Initialize streamer dump.
2623         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
2624         in.
2626 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
2628         PR target/86048
2629         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
2630         offsets for register save directives.  Emit a second batch of save
2631         directives, if need be, when the function accesses prior frames.
2633 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2635         * config/arc/fpu.md (fmasf4): Force operand to register.
2636         (fnmasf4): Likewise.
2638 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2640         * config/arc/arc-protos.h (arc_pad_return): Remove.
2641         * config/arc/arc.c (machine_function): Remove force_short_suffix
2642         and size_reason.
2643         (arc_print_operand): Adjust printing of '&'.
2644         (arc_verify_short): Remove conditional printing of short suffix.
2645         (arc_final_prescan_insn): Remove reference to size_reason.
2646         (pad_return): New function.
2647         (arc_reorg): Call pad_return.
2648         (arc_pad_return): Remove.
2649         (arc_init_machine_status): Remove reference to force_short_suffix.
2650         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
2651         (attr length): When attribute iscompact is true force to 2
2652         regardless; in the case of maybe check if we want to force the
2653         instruction to have 4 bytes length.
2654         (nopv): Change it to generate 4 byte long nop as well.
2655         (blockage): New pattern.
2656         (simple_return): Remove call to arc_pad_return.
2657         (p_return_i): Likewise.
2659 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2661         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2663 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2665         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
2666         ARC cores.
2668 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2670         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
2671         for ARC700 and ARCv2.
2673 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
2675         PR target/86076
2676         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
2677         operands[2] instead of operands[1].
2680 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
2682         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
2683         case, check whether the outer register overlaps an unallocatable
2684         register, not just whether it fits the required class.
2686 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
2688         * poly-int.h (can_div_trunc_p): Add new overload in which all values
2689         are poly_ints.
2690         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
2691         (memrefs_conflict_p): Likewise.
2692         (init_alias_analysis): Likewise.
2693         * cfgexpand.c (expand_debug_expr): Likewise.
2694         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
2695         * cse.c (fold_rtx): Likewise.
2696         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
2697         * expr.c (emit_block_move_hints): Likewise.
2698         (clear_storage_hints, push_block, emit_push_insn): Likewise.
2699         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
2700         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
2701         (emit_group_store): Likewise.
2702         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
2703         to read the PRE/POST_MODIFY increment.
2704         * calls.c (store_one_arg): Use strip_offset.
2705         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
2706         poly_int_rtx_p.
2707         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
2708         by a VEC_SELECT.
2709         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
2710         (simplify_binary_operation_1): Extend CONST_INT handling to
2711         poly_int_rtx_p.
2712         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
2713         than a HOST_WIDE_INT.
2714         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
2715         poly_int64.
2716         (adjust_mems, add_stores): Update accodingly.
2717         (vt_canonicalize_addr): Track polynomial offsets.
2718         (emit_note_insn_var_location): Likewise.
2719         (vt_add_function_parameter): Likewise.
2720         (vt_initialize): Likewise.
2722 2018-06-12  Jeff Law  <law@redhat.com>
2724         * config.gcc (alpha*-*-freebsd*): Remove.
2725         * config/alpha/freebsd.h: Remove.
2727 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
2729         PR other/69968
2730         * spellcheck-tree.c (levenshtein_distance): Rename to...
2731         (get_edit_distance): ...this, and update for underlying renaming.
2732         * spellcheck-tree.h (levenshtein_distance): Rename to...
2733         (get_edit_distance): ...this.
2734         * spellcheck.c (levenshtein_distance): Rename to...
2735         (get_edit_distance): ...this.  Convert from Levenshtein distance
2736         to Damerau-Levenshtein distance by supporting transpositions of
2737         adjacent characters.  Rename "v1" to "v_next" and "v0" to
2738         "v_one_ago".
2739         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
2740         (selftest::test_edit_distance_unit_test_oneway): ...this, and
2741         update for underlying renaming.
2742         (selftest::levenshtein_distance_unit_test): Rename to...
2743         (selftest::test_get_edit_distance_unit): ...this, and update for
2744         underlying renaming.
2745         (selftest::test_find_closest_string): Add example from PR 69968
2746         where transposition helps
2747         (selftest::test_metric_conditions): Update for renaming.
2748         (selftest::test_metric_conditions): Likewise.
2749         (selftest::spellcheck_c_tests): Likewise.
2750         * spellcheck.h (levenshtein_distance): Rename both overloads to...
2751         (get_edit_distance): ...this.
2752         (best_match::consider): Update for renaming.
2754 2018-06-12  Martin Sebor  <msebor@redhat.com>
2756         PR tree-optimization/85259
2757         * builtins.c (compute_objsize): Handle constant offsets.
2758         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
2759         true iff a warning has been issued.
2760         * gimple.h (gimple_nonartificial_location): New function.
2761         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
2762         gimple_nonartificial_location and handle -Wno-system-headers.
2763         (handle_builtin_stxncpy): Same.
2765 2018-06-12  Martin Sebor  <msebor@redhat.com>
2767         PR c/85931
2768         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2770 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
2772         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
2773         BUILTIN_VEC_XST entries for pointer to double and long long.
2775 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
2777         PR target/85990
2778         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2779         Update comments.
2780         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2781         Likewise.
2783 2018-06-12  Martin Liska  <mliska@suse.cz>
2785         * doc/options.texi: Document IntegerRange.
2787 2018-06-12  Martin Liska  <mliska@suse.cz>
2789         * config/i386/i386.opt: Make MPX-related options as Deprecated.
2790         * opt-functions.awk: Handle Deprecated flag.
2791         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
2792         and report error.
2793         (read_cmdline_option): Report warning for a deprecated option.
2794         * opts.h (struct cl_option): Add new field cl_deprecated.
2795         (CL_ERR_DEPRECATED): New.
2797 2018-06-12  Martin Liska  <mliska@suse.cz>
2799         * doc/options.texi: Document Deprecated option flag.
2801 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2803         * config/arc/arc-arch.h (arc_extras): New enum.
2804         (arc_cpu_t):Add field extra.
2805         (arc_cpu_types): Consider the extras.
2806         * config/arc/arc-cpus.def: Add extras info.
2807         * config/arc/arc-opts.h (processor_type): Consider extra field.
2808         * config/arc/arc.c (arc_override_options): Handle extra field.
2810 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
2812         * config/arc/arc-arch.h: Update ARC_OPTX macro.
2813         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
2814         field.
2815         * config/arc/arc.c (arc_init): Update pic warning.
2816         (irq_range): Update irq range parsing warnings.
2817         (arc_override_options): Update various warning messages.
2818         (arc_handle_aux_attribute): Likewise.
2820 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
2822         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
2824 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2826         * doc/sourcebuild.texi: Document usage of line number 0 in verify
2827         compiler messages directives.
2829 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
2831         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
2832         * config/mips/mips-tables.opt: Regenerate.
2833         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
2834         mips64r6.
2835         * doc/invoke.texi: Document -march=i6500.
2837 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
2839         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
2840         (i6400_gpmul): Add cpu_unit.
2841         (i6400_gpdiv): Likewise.
2842         (i6400_msa_add_d): Update reservations.
2843         (i6400_msa_int_add) Likewise.
2844         (i6400_msa_short_logic3) Likewise.
2845         (i6400_msa_short_logic2) Likewise.
2846         (i6400_msa_short_logic) Likewise.
2847         (i6400_msa_move) Likewise.
2848         (i6400_msa_cmp) Likewise.
2849         (i6400_msa_short_float2) Likewise.
2850         (i6400_msa_div_d) Likewise.
2851         (i6400_msa_long_logic1) Likewise.
2852         (i6400_msa_long_logic2) Likewise.
2853         (i6400_msa_mult) Likewise.
2854         (i6400_msa_long_float2) Likewise.
2855         (i6400_msa_long_float4) Likewise.
2856         (i6400_msa_long_float5) Likewise.
2857         (i6400_msa_long_float8) Likewise.
2858         (i6400_fpu_fadd): Include frint type.
2859         (i6400_fpu_store): New define_insn_reservation.
2860         (i6400_fpu_load): Likewise.
2861         (i6400_fpu_move): Likewise.
2862         (i6400_fpu_fcmp): Likewise.
2863         (i6400_fpu_fmadd): Likewise.
2864         (i6400_int_mult): Include imul3nc type and update reservation.
2865         (i6400_int_div): Include idiv3 type and update reservation.
2866         (i6400_int_load): Update to check type not move_type.
2867         (i6400_int_store): Likewise.
2868         (i6400_int_prefetch): Set zero latency.
2870 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
2872         * gcc.c: Document new %@{...} sequence.
2873         (LINK_COMMAND_SPEC): Use it for the -L switches.
2874         (cpp_unique_options): Use it for the -I switches.
2875         (at_file_argbuf): New global variable.
2876         (in_at_file): Likewise.
2877         (alloc_args): Create at_file_argbuf.
2878         (clear_args): Truncate at_file_argbuf.
2879         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
2880         (open_at_file): New function.
2881         (close_at_file): Likewise.
2882         (create_at_file): Delete.
2883         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
2884         <'o'>: Likewise.
2885         <'@'>: New case.
2886         (validate_switches_from_spec): Deal with %@{...} sequence.
2887         (validate_switches): Likewise.
2888         (driver::finalize): Call clear_args.
2890 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
2892         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2894 2018-06-11  Martin Sebor  <msebor@redhat.com>
2896         * doc/invoke.texi (-Wall): List -Wc++17-compat.
2897         (Wno-class-memaccess): Add @opindex.
2898         (Wno-templates, Wno-multiple-inheritance): Same.
2899         (Wno-virtual-inheritance, Wno-namespaces): Same.
2900         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
2901         (Wno-format-overflow, Wno-format-truncation): Same.
2902         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
2903         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
2904         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
2905         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
2906         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
2907         (Wno-misspelled-isr): Same.
2909 2018-06-11  Martin Sebor  <msebor@redhat.com>
2911         * PR tree-optimization/86083
2912         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2914 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
2916         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2918 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
2920         PR target/85755
2921         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
2922         on the correct operand.
2923         (*movdi_internal64): Ditto.
2925 2018-06-11  Martin Liska  <mliska@suse.cz>
2927         PR tree-optimization/86089
2928         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2930 2018-06-11  Julia Koval  <julia.koval@intel.com>
2932         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
2933         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
2934         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2936 2018-06-11  Olivier Hainque  <hainque@adacore.com>
2938         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2939         for Ada with strict dwarf2.
2941 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
2943         PR target/85755
2944         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2945         addresses.
2947 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
2949         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2951 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
2953         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2954         TARGET_ELF.
2956 2018-06-08  Martin Liska  <mliska@suse.cz>
2958         * tree-cfg.h (debug_function): Fix argument type to match
2959         implementation.
2961 2018-06-08  Martin Liska  <mliska@suse.cz>
2963         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2964         Remove usage of MPX-related (and removed) fields.
2965         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2967 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
2969         * cfg.c (debug): Use TDF_NONE rather than 0.
2970         * cfghooks.c (debug): Likewise.
2971         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2972         (struct dump_option_value_info): Convert to...
2973         (struct kv_pair): ...this template type.
2974         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2975         rather than 0.
2976         (optinfo_verbosity_options): Likewise.
2977         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2978         OPTGROUP_NONE.
2979         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2980         than int for "optgroup_flags" param.
2981         (dump_generic_expr_loc): Use dump_flags_t rather than int for
2982         "dump_kind" param.
2983         (dump_dec): Likewise.
2984         (dump_finish): Use TDF_NONE rather than 0.
2985         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2986         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
2987         than 0.  Update for change to option_ptr.
2988         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2989         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
2990         0.  Update for changes to optinfo_verbosity_options and
2991         optgroup_options.
2992         (opt_info_switch_p): Convert optgroup_flags from int to
2993         optgroup_flags_t.
2994         (dump_basic_block): Use dump_flags_t rather than int
2995         for "dump_kind" param.
2996         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2997         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2998         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2999         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3000         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3001         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3002         TDF_NONE): Convert from macros to...
3003         (enum dump_flag): ...this new enum.
3004         (dump_flags_t): Update to use enum.
3005         (operator|, operator&, operator~, operator|=, operator&=):
3006         Implement for dump_flags_t.
3007         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3008         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3009         Convert from macros to...
3010         (enum optgroup_flag): ...this new enum.
3011         (optgroup_flags_t): New typedef.
3012         (operator|, operator|=): Implement for optgroup_flags_t.
3013         (struct dump_file_info): Convert field "alt_flags" to
3014         dump_flags_t.  Convert field "optgroup_flags" to
3015         optgroup_flags_t.
3016         (dump_basic_block): Use dump_flags_t rather than int for param.
3017         (dump_generic_expr_loc): Likewise.
3018         (dump_dec): Likewise.
3019         (dump_register): Convert param "optgroup_flags" to
3020         optgroup_flags_t.
3021         (opt_info_enable_passes): Likewise.
3022         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3023         than 0.
3024         * gimple-pretty-print.c (debug): Likewise.
3025         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3026         (merged_store_group::apply_stores): Likewise.
3027         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3028         * gimple.c (verify_gimple_pp): Likewise.
3029         * graphite-poly.c (print_pbb_body): Likewise.
3030         * passes.c (pass_manager::register_one_dump_file): Convert
3031         local "optgroup_flags" to optgroup_flags_t.
3032         * print-tree.c (print_node): Use TDF_NONE rather than 0.
3033         (debug): Likewise.
3034         (debug_body): Likewise.
3035         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3036         to optgroup_flags_t.
3037         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3038         than 0.
3039         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3040         (convert_mult_to_fma): Likewise.
3041         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3042         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3043         * tree-vect-data-refs.c (dump_lower_bound): Convert param
3044         "dump_kind" to dump_flags_t.
3046 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3048         * config/rs6000/rs6000.c (min, max): Delete.
3050 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3052         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3053         -mabi=spe and -mabi=no-spe.
3055 2018-06-08  Martin Liska  <mliska@suse.cz>
3057         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3058         where we expect an existing summary.
3060 2018-06-08  Martin Liska  <mliska@suse.cz>
3062         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3063         * ipa-inline.h (estimate_edge_growth): Likewise.
3065 2018-06-08  Martin Liska  <mliska@suse.cz>
3067         * cgraph.c (function_version_hasher::hash): Use
3068         cgraph_node::get_uid ().
3069         (function_version_hasher::equal):
3070         * cgraph.h (cgraph_node::get_uid): New method.
3071         * ipa-inline.c (update_caller_keys): Use
3072         cgraph_node::get_uid ().
3073         (update_callee_keys): Likewise.
3074         * ipa-utils.c (searchc): Likewise.
3075         (ipa_reduced_postorder): Likewise.
3076         * lto-cgraph.c (input_node): Likewise.
3077         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3078         * symbol-summary.h (symtab_insertion): Likewise.
3079         (symtab_removal): Likewise.
3080         (symtab_duplication): Likewise.
3081         * tree-pretty-print.c (dump_function_header): Likewise.
3082         * tree-sra.c (convert_callers_for_node): Likewise.
3084 2018-06-08  Martin Liska  <mliska@suse.cz>
3086         * cgraph.c (symbol_table::create_edge): Always assign a new
3087         unique number.
3088         (symbol_table::free_edge): Do not recycle numbers.
3089         * cgraph.h (cgraph_edge::get): New method.
3090         * symbol-summary.h (symtab_removal): Use it.
3091         (symtab_duplication): Likewise.
3092         (call_summary::hashable_uid): Remove.
3094 2018-06-08  Martin Liska  <mliska@suse.cz>
3096         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3097         (initialize_growth_caches): Remove.
3098         (free_growth_caches): Likewise.
3099         (do_estimate_edge_time): Use edge_growth_cache.
3100         (do_estimate_edge_size): Likewise.
3101         (do_estimate_edge_hints): Likewise.
3102         * ipa-inline.c (reset_edge_caches): Likewise.
3103         (recursive_inlining): Likewise.
3104         (inline_small_functions): Likewise.
3105         * ipa-inline.h (initialize_growth_caches): Remove.
3106         (estimate_edge_size): Likewise.
3107         (estimate_edge_time): Likewise.
3108         (estimate_edge_hints): Likewise.
3109         (reset_edge_growth_cache): Likewise.
3110         * symbol-summary.h (call_summary::remove): New method.
3112 2018-06-08  Martin Liska  <mliska@suse.cz>
3114         * ipa-cp.c (class edge_clone_summary): New summary.
3115         (grow_edge_clone_vectors): Remove.
3116         (ipcp_edge_duplication_hook): Remove.
3117         (class edge_clone_summary_t): New call_summary class.
3118         (ipcp_edge_removal_hook): Remove.
3119         (edge_clone_summary_t::duplicate): New function.
3120         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3121         (create_specialized_node): Likewise.
3122         (ipcp_driver): Initialize edge_clone_summaries and do not
3123         register hooks.
3125 2018-06-08  Martin Liska  <mliska@suse.cz>
3127         * symbol-summary.h (get): New function.
3128         (call_summary::m_initialize_when_cloning): New class member.
3130 2018-06-08  Martin Liska  <mliska@suse.cz>
3132         * cgraph.c (cgraph_node::remove): Do not recycle uid.
3133         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3134         (symbol_table::allocate_cgraph_symbol): Do not set uid.
3135         * passes.c (uid_hash_t): Record removed_nodes by their uids.
3136         (remove_cgraph_node_from_order): Use the removed_nodes set.
3137         (do_per_function_toporder): Likwise.
3138         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3139         instead of summary_uid.
3140         (symtab_removal): Likewise.
3141         (symtab_duplication): Likewise.
3143 2018-06-08  Martin Liska  <mliska@suse.cz>
3145         * ipa-cp.c (ipcp_store_bits_results): Use
3146         ipcp_transformation_sum.
3147         (ipcp_store_vr_results): Likewise.
3148         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3149         to ...
3150         (ipcp_transformation_initialize): ... this.
3151         (ipa_set_node_agg_value_chain):
3152         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3153         (write_ipcp_transformation_info): Likewise.
3154         (read_ipcp_transformation_info): Likewise.
3155         (ipcp_update_bits): Likewise.
3156         (ipcp_update_vr): Likewise.
3157         (ipcp_transform_function): Likewise.
3158         * ipa-prop.h: Rename ipcp_transformation_summary to
3159         ipcp_transformation.
3160         (class ipcp_transformation_t): New function summary.
3161         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3162         (ipa_get_agg_replacements_for_node): Likewise.
3164 2018-06-08  Martin Liska  <mliska@suse.cz>
3166         * ipa-pure-const.c (struct funct_state_d): Do it class instead
3167         of struct.
3168         (class funct_state_summary_t): New function_summary class.
3169         (has_function_state): Remove.
3170         (get_function_state): Likewise.
3171         (set_function_state): Likewise.
3172         (add_new_function): Likewise.
3173         (funct_state_summary_t::insert): New function.
3174         (duplicate_node_data): Remove.
3175         (remove_node_data): Remove.
3176         (funct_state_summary_t::duplicate): New function.
3177         (register_hooks): Create new funct_state_summaries.
3178         (pure_const_generate_summary): Use it.
3179         (pure_const_write_summary): Likewise.
3180         (pure_const_read_summary): Likewise.
3181         (propagate_pure_const): Likewise.
3182         (propagate_nothrow): Likewise.
3183         (dump_malloc_lattice): Likewise.
3184         (propagate_malloc): Likewise.
3185         (execute): Do not register hooks, just remove summary
3186         instead.
3187         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3188         constructor.
3190 2018-06-08  Martin Liska  <mliska@suse.cz>
3192         * ipa-reference.c (remove_node_data): Remove.
3193         (duplicate_node_data): Likewise.
3194         (class ipa_ref_var_info_summary_t): New class.
3195         (class ipa_ref_opt_summary_t): Likewise.
3196         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3197         (get_reference_optimization_summary): Use
3198         ipa_ref_opt_sum_summaries.
3199         (set_reference_vars_info): Remove.
3200         (set_reference_optimization_summary): Likewise.
3201         (ipa_init): Create summaries.
3202         (init_function_info): Use function summary.
3203         (ipa_ref_opt_summary_t::duplicate): New function.
3204         (ipa_ref_opt_summary_t::remove): New function.
3205         (get_read_write_all_from_node): Fix GNU coding style.
3206         (propagate): Use function summary.
3207         (write_node_summary_p): Fix GNU coding style.
3208         (stream_out_bitmap): Likewise.
3209         (ipa_reference_read_optimization_summary): Use function summary.
3210         (ipa_reference_c_finalize): Do not release hooks.
3212 2018-06-08  Martin Liska  <mliska@suse.cz>
3214         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3215         (analyze_function_body): Extract multiple calls of get_create.
3216         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3217         * ipa-inline.c (recursive_inlining): Use ::get method.
3218         * ipa-inline.h (estimate_edge_growth): Likewise.
3220 2018-06-08  Martin Liska  <mliska@suse.cz>
3222         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3223         HSA_INVALID.
3224         (hsa_function_summary::hsa_function_summary): Use the new enum
3225         value.
3226         (hsa_gpu_implementation_p): Use hsa_summaries::get.
3227         * hsa-gen.c (hsa_get_host_function): Likewise.
3228         (get_brig_function_name): Likewise.
3229         * ipa-hsa.c (process_hsa_functions): Likewise.
3230         (ipa_hsa_write_summary): Likewise.
3231         * symbol-summary.h (symtab_duplication): Use ::get function/
3232         (get): New function.
3234 2018-06-08  Martin Liska  <mliska@suse.cz>
3236         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3237         of get.
3238         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3239         (hsa_register_kernel): Likewise.
3240         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3241         * hsa-gen.c (hsa_get_host_function): Likewise.
3242         (get_brig_function_name): Likewise.
3243         (generate_hsa): Likewise.
3244         (pass_gen_hsail::execute): Likewise.
3245         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3246         (devirtualization_time_bonus): Likewise.
3247         (ipcp_propagate_stage): Likewise.
3248         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3249         (edge_set_predicate): Likewise.
3250         (evaluate_conditions_for_known_args): Likewise.
3251         (evaluate_properties_for_edge): Likewise.
3252         (ipa_fn_summary::reset): Likewise.
3253         (ipa_fn_summary_t::duplicate): Likewise.
3254         (dump_ipa_call_summary): Likewise.
3255         (ipa_dump_fn_summary): Likewise.
3256         (analyze_function_body): Likewise.
3257         (compute_fn_summary): Likewise.
3258         (estimate_edge_devirt_benefit): Likewise.
3259         (estimate_edge_size_and_time): Likewise.
3260         (estimate_calls_size_and_time): Likewise.
3261         (estimate_node_size_and_time): Likewise.
3262         (inline_update_callee_summaries): Likewise.
3263         (remap_edge_change_prob): Likewise.
3264         (remap_edge_summaries): Likewise.
3265         (ipa_merge_fn_summary_after_inlining): Likewise.
3266         (ipa_update_overall_fn_summary): Likewise.
3267         (read_ipa_call_summary): Likewise.
3268         (inline_read_section): Likewise.
3269         (write_ipa_call_summary): Likewise.
3270         (ipa_fn_summary_write): Likewise.
3271         (ipa_free_fn_summary): Likewise.
3272         * ipa-hsa.c (process_hsa_functions): Likewise.
3273         (ipa_hsa_write_summary): Likewise.
3274         (ipa_hsa_read_section): Likewise.
3275         * ipa-icf.c (sem_function::merge): Likewise.
3276         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3277         (do_estimate_edge_time): Likewise.
3278         (estimate_size_after_inlining): Likewise.
3279         (estimate_growth): Likewise.
3280         (growth_likely_positive): Likewise.
3281         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3282         (inline_call): Likewise.
3283         * ipa-inline.c (caller_growth_limits): Likewise.
3284         (can_inline_edge_p): Likewise.
3285         (can_inline_edge_by_limits_p): Likewise.
3286         (compute_uninlined_call_time): Likewise.
3287         (compute_inlined_call_time): Likewise.
3288         (want_inline_small_function_p): Likewise.
3289         (edge_badness): Likewise.
3290         (update_caller_keys): Likewise.
3291         (update_callee_keys): Likewise.
3292         (recursive_inlining): Likewise.
3293         (inline_small_functions): Likewise.
3294         (inline_to_all_callers_1): Likewise.
3295         (dump_overall_stats): Likewise.
3296         (early_inline_small_functions): Likewise.
3297         (early_inliner): Likewise.
3298         * ipa-inline.h (estimate_edge_growth): Likewise.
3299         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3300         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3301         * ipa-prop.h (IPA_NODE_REF): Likewise.
3302         (IPA_EDGE_REF): Likewise.
3303         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3304         (propagate_malloc): Likewise.
3305         * ipa-split.c (execute_split_functions): Likewise.
3306         * symbol-summary.h: Rename get to get_create.
3307         (get): Likewise.
3308         (get_create): Likewise.
3309         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3311 2018-06-08  Martin Liska  <mliska@suse.cz>
3313         * symbol-summary.h (release): Move definition out of class
3314         declaration.
3315         (symtab_removal): Likewise.
3316         (symtab_duplication): Likewise.
3318 2018-06-08  Martin Liska  <mliska@suse.cz>
3320         * symbol-summary.h (function_summary): Move constructor
3321         implementation out of class declaration.
3322         (release): Likewise.
3323         (symtab_insertion): Likewise.
3324         (symtab_removal): Likewise.
3325         (symtab_duplication): Likewise.
3326         (get): Likewise.
3328 2018-06-08  Martin Liska  <mliska@suse.cz>
3330         * Makefile.in: Remove support for MPX (macros, related functions,
3331         fields in cgraph_node, ...).
3332         * builtin-types.def (BT_BND): Likewise.
3333         (BT_FN_BND_CONST_PTR): Likewise.
3334         (BT_FN_CONST_PTR_BND): Likewise.
3335         (BT_FN_VOID_PTR_BND): Likewise.
3336         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3337         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3338         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3339         (expand_builtin_mempcpy_with_bounds): Likewise.
3340         (expand_builtin_memset_with_bounds): Likewise.
3341         (expand_builtin_memset_args): Likewise.
3342         (std_expand_builtin_va_start): Likewise.
3343         (expand_builtin): Likewise.
3344         (expand_builtin_with_bounds): Likewise.
3345         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3346         (DEF_LIB_BUILTIN_CHKP): Likewise.
3347         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3348         (DEF_CHKP_BUILTIN): Likewise.
3349         (BUILT_IN_MEMCPY): Likewise.
3350         (BUILT_IN_MEMMOVE): Likewise.
3351         (BUILT_IN_MEMPCPY): Likewise.
3352         (BUILT_IN_MEMSET): Likewise.
3353         (BUILT_IN_STPCPY): Likewise.
3354         (BUILT_IN_STRCAT): Likewise.
3355         (BUILT_IN_STRCHR): Likewise.
3356         (BUILT_IN_STRCPY): Likewise.
3357         (BUILT_IN_STRLEN): Likewise.
3358         (BUILT_IN_MEMCPY_CHK): Likewise.
3359         (BUILT_IN_MEMMOVE_CHK): Likewise.
3360         (BUILT_IN_MEMPCPY_CHK): Likewise.
3361         (BUILT_IN_MEMSET_CHK): Likewise.
3362         (BUILT_IN_STPCPY_CHK): Likewise.
3363         (BUILT_IN_STRCAT_CHK): Likewise.
3364         (BUILT_IN_STRCPY_CHK): Likewise.
3365         * calls.c (store_bounds): Likewise.
3366         (emit_call_1): Likewise.
3367         (special_function_p): Likewise.
3368         (maybe_warn_nonstring_arg): Likewise.
3369         (initialize_argument_information): Likewise.
3370         (finalize_must_preallocate): Likewise.
3371         (compute_argument_addresses): Likewise.
3372         (expand_call): Likewise.
3373         * cfgexpand.c (expand_call_stmt): Likewise.
3374         (expand_return): Likewise.
3375         (expand_gimple_stmt_1): Likewise.
3376         (pass_expand::execute): Likewise.
3377         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
3378         (cgraph_node::remove): Likewise.
3379         (cgraph_node::dump): Likewise.
3380         (cgraph_node::verify_node): Likewise.
3381         * cgraph.h (chkp_function_instrumented_p): Likewise.
3382         (symtab_node::get_alias_target): Likewise.
3383         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
3384         (cgraph_local_p): Likewise.
3385         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
3386         (cgraph_edge::rebuild_references): Likewise.
3387         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
3388         (walk_polymorphic_call_targets): Likewise.
3389         (cgraph_node::expand_thunk): Likewise.
3390         (symbol_table::output_weakrefs): Likewise.
3391         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
3392         (ix86_handle_option): Likewise.
3393         * config/i386/constraints.md: Likewise.
3394         * config/i386/i386-builtin-types.def (BND): Likewise.
3395         (VOID): Likewise.
3396         (PVOID): Likewise.
3397         (ULONG): Likewise.
3398         * config/i386/i386-builtin.def (BDESC_END): Likewise.
3399         (BDESC_FIRST): Likewise.
3400         (BDESC): Likewise.
3401         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3402         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3403         * config/i386/i386.c (enum reg_class): Likewise.
3404         (ix86_target_string): Likewise.
3405         (ix86_option_override_internal): Likewise.
3406         (ix86_conditional_register_usage): Likewise.
3407         (ix86_valid_target_attribute_inner_p): Likewise.
3408         (ix86_set_indirect_branch_type): Likewise.
3409         (ix86_set_current_function): Likewise.
3410         (ix86_function_arg_regno_p): Likewise.
3411         (init_cumulative_args): Likewise.
3412         (ix86_function_arg_advance): Likewise.
3413         (ix86_function_arg): Likewise.
3414         (ix86_pass_by_reference): Likewise.
3415         (ix86_function_value_regno_p): Likewise.
3416         (ix86_function_value_1): Likewise.
3417         (ix86_function_value_bounds): Likewise.
3418         (ix86_return_in_memory): Likewise.
3419         (ix86_setup_incoming_vararg_bounds): Likewise.
3420         (ix86_va_start): Likewise.
3421         (indirect_thunk_need_prefix): Likewise.
3422         (print_reg): Likewise.
3423         (ix86_print_operand): Likewise.
3424         (ix86_expand_call): Likewise.
3425         (ix86_output_function_return): Likewise.
3426         (reg_encoded_number): Likewise.
3427         (BDESC_VERIFYS): Likewise.
3428         (ix86_init_mpx_builtins): Likewise.
3429         (ix86_init_builtins): Likewise.
3430         (ix86_emit_cmove): Likewise.
3431         (ix86_emit_move_max): Likewise.
3432         (ix86_expand_builtin): Likewise.
3433         (ix86_builtin_mpx_function): Likewise.
3434         (ix86_get_arg_address_for_bt): Likewise.
3435         (ix86_load_bounds): Likewise.
3436         (ix86_store_bounds): Likewise.
3437         (ix86_load_returned_bounds): Likewise.
3438         (ix86_store_returned_bounds): Likewise.
3439         (ix86_class_likely_spilled_p): Likewise.
3440         (ix86_hard_regno_mode_ok): Likewise.
3441         (x86_order_regs_for_local_alloc): Likewise.
3442         (ix86_mitigate_rop): Likewise.
3443         (ix86_bnd_prefixed_insn_p): Likewise.
3444         (ix86_mpx_bound_mode): Likewise.
3445         (ix86_make_bounds_constant): Likewise.
3446         (ix86_initialize_bounds): Likewise.
3447         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3448         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3449         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3450         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3451         (TARGET_CHKP_BOUND_MODE): Likewise.
3452         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3453         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3454         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3455         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3456         * config/i386/i386.h (TARGET_MPX): Likewise.
3457         (TARGET_MPX_P): Likewise.
3458         (VALID_BND_REG_MODE): Likewise.
3459         (FIRST_BND_REG): Likewise.
3460         (LAST_BND_REG): Likewise.
3461         (enum reg_class): Likewise.
3462         (BND_REG_P): Likewise.
3463         (BND_REGNO_P): Likewise.
3464         (BNDmode): Likewise.
3465         (ADJUST_INSN_LENGTH): Likewise.
3466         * config/i386/i386.md: Likewise.
3467         * config/i386/i386.opt: Likewise.
3468         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3469         (defined): Likewise.
3470         (LINK_MPX): Likewise.
3471         (MPX_SPEC): Likewise.
3472         (LIBMPX_SPEC): Likewise.
3473         (LIBMPXWRAPPERS_SPEC): Likewise.
3474         (CHKP_SPEC): Likewise.
3475         * config/i386/predicates.md: Likewise.
3476         * dbxout.c (dbxout_type): Likewise.
3477         * doc/extend.texi: Likewise.
3478         * doc/invoke.texi: Likewise.
3479         * doc/md.texi: Likewise.
3480         * doc/tm.texi: Likewise.
3481         * doc/tm.texi.in: Likewise.
3482         * dwarf2out.c (is_base_type): Likewise.
3483         (gen_formal_types_die): Likewise.
3484         (gen_subprogram_die): Likewise.
3485         (gen_type_die_with_usage): Likewise.
3486         (gen_decl_die): Likewise.
3487         (dwarf2out_late_global_decl): Likewise.
3488         * expr.c (expand_assignment): Likewise.
3489         (emit_storent_insn): Likewise.
3490         (store_expr_with_bounds): Likewise.
3491         (store_expr): Likewise.
3492         (expand_expr_real_1): Likewise.
3493         * expr.h (store_expr_with_bounds): Likewise.
3494         * function.c (use_register_for_decl): Likewise.
3495         (struct bounds_parm_data): Likewise.
3496         (assign_parms_augmented_arg_list): Likewise.
3497         (assign_parm_find_entry_rtl): Likewise.
3498         (assign_parm_is_stack_parm): Likewise.
3499         (assign_parm_load_bounds): Likewise.
3500         (assign_bounds): Likewise.
3501         (assign_parms): Likewise.
3502         (expand_function_start): Likewise.
3503         * gcc.c (CHKP_SPEC): Likewise.
3504         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3505         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3506         (wrestrict_dom_walker::check_call): Likewise.
3507         * gimple.c (gimple_build_call_from_tree): Likewise.
3508         * gimple.h (enum gf_mask): Likewise.
3509         (gimple_call_with_bounds_p): Likewise.
3510         (gimple_call_set_with_bounds): Likewise.
3511         * gimplify.c (gimplify_init_constructor): Likewise.
3512         * ipa-cp.c (initialize_node_lattices): Likewise.
3513         (propagate_constants_across_call): Likewise.
3514         (find_more_scalar_values_for_callers_subset): Likewise.
3515         * ipa-hsa.c (process_hsa_functions): Likewise.
3516         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3517         * ipa-icf.c (sem_function::merge): Likewise.
3518         * ipa-inline.c (early_inliner): Likewise.
3519         * ipa-pure-const.c (warn_function_noreturn): Likewise.
3520         (warn_function_cold): Likewise.
3521         (propagate_pure_const): Likewise.
3522         * ipa-ref.h (enum GTY): Likewise.
3523         * ipa-split.c (find_retbnd): Likewise.
3524         (consider_split): Likewise.
3525         (split_function): Likewise.
3526         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3527         * ipa.c (walk_polymorphic_call_targets): Likewise.
3528         (symbol_table::remove_unreachable_nodes): Likewise.
3529         (process_references): Likewise.
3530         (cgraph_build_static_cdtor_1): Likewise.
3531         * lto-cgraph.c (lto_output_node): Likewise.
3532         (output_refs): Likewise.
3533         (compute_ltrans_boundary): Likewise.
3534         (input_overwrite_node): Likewise.
3535         (input_node): Likewise.
3536         (input_cgraph_1): Likewise.
3537         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
3538         * passes.c (pass_manager::execute_early_local_passes): Likewise.
3539         (class pass_chkp_instrumentation_passes): Likewise.
3540         (make_pass_chkp_instrumentation_passes): Likewise.
3541         * passes.def: Likewise.
3542         * rtl.h (struct GTY): Likewise.
3543         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
3544         * stor-layout.c (layout_type): Likewise.
3545         * symtab.c: Likewise.
3546         * target.def: Likewise.
3547         * targhooks.c (default_chkp_bound_type): Likewise.
3548         (default_chkp_bound_mode): Likewise.
3549         (default_builtin_chkp_function): Likewise.
3550         (default_chkp_function_value_bounds): Likewise.
3551         (default_chkp_make_bounds_constant): Likewise.
3552         (default_chkp_initialize_bounds): Likewise.
3553         * targhooks.h (default_chkp_bound_type): Likewise.
3554         (default_chkp_bound_mode): Likewise.
3555         (default_builtin_chkp_function): Likewise.
3556         (default_chkp_function_value_bounds): Likewise.
3557         (default_chkp_make_bounds_constant): Likewise.
3558         (default_chkp_initialize_bounds): Likewise.
3559         * toplev.c (compile_file): Likewise.
3560         (process_options): Likewise.
3561         * tree-core.h (DEF_BUILTIN): Likewise.
3562         (DEF_BUILTIN_CHKP): Likewise.
3563         * tree-inline.c (declare_return_variable): Likewise.
3564         (remap_gimple_stmt): Likewise.
3565         (copy_bb): Likewise.
3566         (initialize_inlined_parameters): Likewise.
3567         (expand_call_inline): Likewise.
3568         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
3569         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
3570         (make_pass_ipa_chkp_produce_thunks): Likewise.
3571         (make_pass_chkp): Likewise.
3572         (make_pass_chkp_opt): Likewise.
3573         (make_pass_chkp_instrumentation_passes): Likewise.
3574         * tree-pretty-print.c (dump_generic_node): Likewise.
3575         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
3576         * tree-ssa-dce.c (propagate_necessity): Likewise.
3577         (eliminate_unnecessary_stmts): Likewise.
3578         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
3579         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3580         * tree-ssa-sccvn.h: Likewise.
3581         * tree-ssa-strlen.c (get_string_length): Likewise.
3582         (valid_builtin_call): Likewise.
3583         (adjust_last_stmt): Likewise.
3584         (handle_builtin_strchr): Likewise.
3585         (handle_builtin_strcpy): Likewise.
3586         (handle_builtin_stxncpy): Likewise.
3587         (handle_builtin_memcpy): Likewise.
3588         (handle_builtin_strcat): Likewise.
3589         (strlen_check_and_optimize_stmt): Likewise.
3590         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
3591         * tree-streamer-in.c: Likewise.
3592         * tree-streamer.c (record_common_node): Likewise.
3593         * tree.c (tree_code_size): Likewise.
3594         (wide_int_to_tree_1): Likewise.
3595         (type_contains_placeholder_1): Likewise.
3596         (build_common_tree_nodes): Likewise.
3597         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
3598         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
3599         (POINTER_BOUNDS_P): Likewise.
3600         (BOUNDED_TYPE_P): Likewise.
3601         (BOUNDED_P): Likewise.
3602         (CALL_WITH_BOUNDS_P): Likewise.
3603         (pointer_bounds_type_node): Likewise.
3604         * value-prof.c (gimple_ic): Likewise.
3605         * var-tracking.c (vt_add_function_parameters): Likewise.
3606         * varasm.c (make_decl_rtl): Likewise.
3607         (assemble_start_function): Likewise.
3608         (output_constant): Likewise.
3609         (maybe_assemble_visibility): Likewise.
3610         * varpool.c (ctor_for_folding): Likewise.
3611         * chkp-builtins.def: Remove.
3612         * ipa-chkp.c: Remove.
3613         * ipa-chkp.h: Remove.
3614         * rtl-chkp.c: Remove.
3615         * rtl-chkp.h: Remove.
3616         * tree-chkp-opt.c: Remove.
3617         * tree-chkp.c: Remove.
3618         * tree-chkp.h: Remove.
3620 2018-06-07  Carl Love  <cel@us.ibm.com>
3622         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
3623         vextract_fp_from_shortl): Add BE support.
3625 2018-06-07  Paul Koning  <ni1d@arrl.net>
3627         * compare-elim.c (try_merge_compare): Don't merge compare if
3628         address contains a side effect.
3629         (try_eliminate_compare): Likewise.
3631 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
3633         * config.gcc: Support "tremont".
3634         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
3635         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3636         PROCESSOR_TREMONT.
3637         * config/i386/i386.c (m_TREMONT): Define.
3638         (processor_target_table): Add "tremont".
3639         (PTA_TREMONT): Define.
3640         (ix86_lea_outperforms): Add TARGET_TREMONT.
3641         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
3642         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
3643         and M_INTEL_GOLDMONT_PLUS.
3644         (fold_builtin_cpu): Add "tremont".
3645         (ix86_add_stmt_cost): Add TARGET_TREMONT.
3646         (ix86_option_override_internal): Add "tremont".
3647         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
3648         (processor_type): Add PROCESSOR_TREMONT.
3649         * config/i386/x86-tune.def: Add m_TREMONT.
3650         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
3652 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3654         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
3655         symbol defined for msp430i* devices to be lower case.
3657         gcc/testsuite/gcc.target/msp430/
3658         * msp430i-device-symbol.c: New test.
3659         * msp430f-device-symbol.c: New test.
3660         * msp430.h: New test header file.
3662 2018-06-07  Richard Biener  <rguenther@suse.de>
3664         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
3665         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
3666         Properly wrap signed arithmetic if overflow wraps.
3668 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
3670         PR tree-optimization/69615
3671         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
3672         of a cast from a same precision integral SSA_NAME in a bb dominated
3673         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
3674         cast to utype if rhs2 has already a compatible type.
3676 2018-06-07  Richard Biener  <rguenther@suse.de>
3678         PR tree-optimization/85935
3679         * graphite-scop-detection.c (find_params_in_bb): Analyze
3680         condition operands with respect to the correct loop.  Assert
3681         the analysis doesn't fail.
3683 2018-06-04  Carl Love  <cel@us.ibm.com>
3685         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
3686         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
3687         as it is slightly cheaper.
3688         (first_match_or_eos_index_<mode>):
3689         Calculate index using natural element order.
3690         (first_match_index_<mode>):
3691         Calculate index using natural element order.
3692         (first_match_or_eos_index_<mode>):
3693         Calculate index using natural order.
3694         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3695         for BE and LE modes.
3696         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3697         P9V_BUILTIN_VCLZLSBB_V16QI.
3698         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3699         specific.
3701 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3703         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
3704         indentation and line wrap for many prototypes.  Add missing
3705         @smallexample directives around block of prototypes for vec_xl and
3706         vec_xst.
3708 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
3710         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3711         track if we pass or return IEEE 128-bit floating point.
3712         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3713         C++ mangling that is compatible with GCC 8.1.
3714         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3715         (init_cumulative_args): Note if we pass or return IEEE 128-bit
3716         floating point types.
3717         (rs6000_function_arg_advance_1): Likewise.
3718         (rs6000_mangle_type): Optionally generate mangled names that match
3719         what GCC 8.1 generated for IEEE 128-bit floating point types.
3720         (rs6000_globalize_decl_name): If we have an external function that
3721         passes or returns IEEE 128-bit types, generate a weak reference
3722         from the mangled name used in GCC 8.1 to the current mangled
3723         name.
3724         (rs6000_init_builtins): Make __ibm128 use the long double type if
3725         long double is IBM extended double.  Make __float128 use the long
3726         double type if long double is IEEE 128-bit.
3728         PR target/85657
3729         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3730         macro for __ibm128 built-in functions.
3731         (PACK_IF): Add __ibm128 pack/unpack functions.
3732         (UNPACK_IF): Likewise.
3733         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3734         enable long double built-in functions if long double is IEEE
3735         128-bit floating point.
3736         (rs6000_invalid_builtin): Update long double built-in function
3737         error message.
3738         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3739         functions, adjust the built-in function to use the long double
3740         built-in function if __ibm128 and long double are the same type.
3741         * doc/extend.texi (PowerPC builtins): Update documention for
3742         __builtin_{,un}pack_longdouble.  Add documentation for
3743         __builtin_{,un}pack_ibm128.
3745 2018-06-06  Jim Wilson  <jimw@sifive.com>
3747         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
3748         (struct machine_function): New field interrupt_mode.
3749         (riscv_handle_type_attribute): New function.  Add forward declaration.
3750         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
3751         (riscv_expand_epilogue): Check interrupt_mode field.
3752         (riscv_set_current_function): Check interrupt attribute args and
3753         set interrupt_mode field.
3754         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
3755         (riscv_sret, riscv_uret): New.
3756         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
3757         new arguments to interrupt attribute.
3759 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
3761         PR target/63177
3762         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3763         Don't handle -mcpu=power8 if -mpower9-vector is also used.
3765 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3767         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
3768         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
3769         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3770         several redundant entries.
3772 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
3774         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
3775         type from "rtx" to "rtx_insn *".
3776         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
3777         for local "call_insn", removing cast.
3778         (ix86_expand_call): Likewise, introducing a "call_insn" local.
3780 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
3782         PR tree-optimization/86066
3783         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
3784         for BIT_INSERT_EXPR stores.
3786 2018-06-06  Richard Biener  <rguenther@suse.de>
3788         PR tree-optimization/86062
3789         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3790         component refs ontop
3791         of to be offsetted base.
3793 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3795         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
3796         to be static and remove check on interrupt attribute name.
3798         gcc/testsuite/gcc.target/msp430/
3799         * function-attributes-4.c: New test.
3800         * static-interrupts.c: New test.
3802 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3804         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3805         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
3807 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
3809         PR target/79924
3810         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
3811         second argument.
3812         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
3813         Remove second argument, change how error is called.
3814         (aarch64_layout_arg): Remove second argument from
3815         aarch64_err_no_fpadvsimd call.
3816         (aarch64_init_cumulative_args): Ditto.
3817         (aarch64_gimplify_va_arg_expr): Ditto.
3818         * config/aarch64/aarch64.md (mov<mode>): Ditto.
3820 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
3822         * config/i386/i386.md (simple_return_indirect_internal): New expander.
3823         (*simple_return_indirect_internal<mode>): Rename from
3824         simple_return_indirect_internal.  Use W mode iterator.
3825         (rstorssp): New expander.
3826         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
3827         (clrssbsy): New expander.
3828         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
3830 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3832         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
3833         __typeof__.
3834         (cmse_check_pointed_object): Likewise.
3836 2018-06-05  Martin Liska  <mliska@suse.cz>
3838         PR gcov-profile/47618
3839         * doc/invoke.texi: Document how -fprofile-dir format
3840         is extended.
3842 2018-06-05  Richard Biener  <rguenther@suse.de>
3844         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
3845         removal pretend DOM info isn't available so we do not update
3846         it and only remove edges, not dominated blocks.  Actually free
3847         DOM info in case we removed something.  Remove unreachable blocks.
3848         (mfb_keep_latches): Work with either DOM info or marked backedges.
3849         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
3850         first.  Mark backedges if DOM info isn't available.
3851         (Re-)compute DOM info after cleanup_control_flow_pre.
3853 2018-06-05  Richard Biener  <rguenther@suse.de>
3855         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
3856         (locus_discrim_hasher::hash): Adjust.
3857         (locus_discrim_hasher::equal): Likewise.
3858         (next_discriminator_for_locus): Work on line directly.
3859         (same_line_p): Pass in expanded locus1 as well.
3860         (assign_discriminators): Avoid redundant location expansions.
3862 2018-06-05  Richard Biener  <rguenther@suse.de>
3864         PR tree-optimization/86046
3865         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
3866         if required after clearing TREE_ADDRESSABLE.
3868 2018-06-05  Richard Biener  <rguenther@suse.de>
3870         PR tree-optimization/86047
3871         * tree-ssa-loop.c (for_each_index): Glob handling of all
3872         decls and constants and really handle all of them.
3874 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3876         PR target/81497
3877         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
3878         qualifier_void_pointer and qualifier_const_void_pointer.
3879         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
3880         (arm_init_builtins): Handle the above.
3881         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
3882         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
3883         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
3884         void intrinsics.
3886 2018-06-05  Martin Liska  <mliska@suse.cz>
3888         * auto-profile.c (read_autofdo_file): Do not use
3889         gcov_ctr_summary struct.
3890         (afdo_callsite_hot_enough_for_early_inline): Likewise.
3891         * coverage.c (struct counts_entry): Likewise.
3892         (read_counts_file): Read just single summary entry.
3893         (get_coverage_counts): Use gcov_summary struct.
3894         * coverage.h (get_coverage_counts): Likewise.
3895         * gcov-dump.c (dump_working_sets): Likewise.
3896         (tag_summary): Dump just single summary.
3897         * gcov-io.c (gcov_write_summary): Write just histogram
3898         summary.
3899         (gcov_read_summary): Read just single summary.
3900         (compute_working_sets): Use gcov_summary struct.
3901         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
3902         of GCOV_COUNTERS_SUMMABLE.
3903         (GCOV_COUNTERS_SUMMABLE): Remove.
3904         (GCOV_FIRST_VALUE_COUNTER): Replace with
3905         GCOV_COUNTER_V_INTERVAL.
3906         (struct gcov_ctr_summary): Remove.
3907         (struct gcov_summary): Directly use fields of former
3908         gcov_ctr_summary.
3909         (compute_working_sets): Use gcov_summary struct.
3910         * gcov.c (read_count_file): Do not use ctrs fields.
3911         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
3912         struct.
3913         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
3914         struct.
3915         * profile.c: Likewise.
3916         * profile.h: Likewise.
3918 2018-06-05  Martin Liska  <mliska@suse.cz>
3920         PR gcov-profile/84846
3921         * gcov.c (output_lines): Print working directory only
3922         in intermediate format.
3924 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
3926         * config/s390/s390-builtin-types.def: Add void function type.
3927         * config/s390/s390-builtins.def: Use the function type for the
3928         tbeginc builtin.
3930 2018-06-04  Jim Wilson  <jimw@sifive.com>
3932         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
3933         to int.
3934         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3935         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
3936         handle EH_RETURN_DATA_REGNO registers properly.
3937         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3938         (riscv_expand_epilogue): Update comment.  Change argument name and
3939         type.  Update code to use new name and type.  Pass new args to
3940         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
3941         EXCEPTION_RETURN.
3942         * config/riscv/riscv.md (NORMAL_RETURN): New.
3943         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3944         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3945         (eh_return): Call gen_eh_return_internal and emit barrier.
3946         (eh_return_internal): Call riscv_expand_epilogue.
3948 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
3950         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3951         bit_insertion field and declare can_be_merged_into method.
3952         (merged_store_group::can_be_merged_into): New method.
3953         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3954         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
3955         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3957 2018-06-04  Richard Biener  <rguenther@suse.de>
3959         PR tree-optimization/85955
3960         * builtins.c (fold_builtin_sincos): Convert pointers to
3961         destination to appropriate type before dereferencing.
3963 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
3965         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3967 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
3969         * expr.c (expand_expr_real_1): Force the operand into memory if
3970         its TYPE_MODE is BLKmode and if there is no integer mode for
3971         the number of bits being extracted.
3973 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3975         PR target/85832
3976         PR target/86036
3977         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3978         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3980 2018-06-04  Richard Biener  <rguenther@suse.de>
3982         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3983         (cleanup_tree_cfg_noloop): ... single caller.  Do
3984         start_recording_case_labels later.
3986 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
3988         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3989         to _IMMINTRIN_H_INCLUDED.
3990         * config/i386/pconfigintrin.h: Ditto.
3991         * config/i386/waitpkgintrin.h: Ditto.
3992         * config/i386/immintrin.h: Add includes for sgxintrin.h,
3993         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3994         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3995         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3996         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3997         waitpkgintrin.h and cldemoteintrin.h.
3999 2018-06-04  Richard Biener  <rguenther@suse.de>
4001         PR tree-optimization/86038
4002         * tracer.c (find_best_successor): Check probability for
4003         being initialized, bail out if not.
4005 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
4007         PR target/86003
4008         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4009         of bits to ignore when comparing architectures.
4011 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4013         PR tree-optimization/69615
4014         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4015         maximum or minimum of the type, try to merge it also as if
4016         range1 is + [-, x - 1] or + [x + 1, -].
4018         PR c++/86025
4019         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4021 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
4023         PR tree-optimization/86034
4024         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4025         the unsigned bitfield type in a bit insertion sequence if it does not
4026         have a larger precision than the bitfield size.
4027         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4029 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
4031         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4033 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4035         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4036         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4037         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4038         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4040 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4042         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4043         Disable -fdelete-null-pointer-checks for ELF toolchain.
4045 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4046             Kito Cheng  <kito.cheng@gmail.com>
4048         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4049         (nds32le-*-*, nds32be-*-*): Integrate checking process.
4050         (nds32*-*-*): Add glibc and uclibc conditions.
4051         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4052         (TARGET_EXCEPT_UNWIND_INFO): Define.
4053         * config/nds32/elf.h: New file.
4054         * config/nds32/linux.h: New file.
4055         * config/nds32/nds32-elf.opt: New file.
4056         * config/nds32/nds32-linux.opt: New file.
4057         * config/nds32/nds32-fp-as-gp.c
4058         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4059         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4060         TARGET_LINUX_ABI.
4061         (nds32_asm_file_end): Ditto.
4062         (nds32_print_operand): Ditto.
4063         (nds32_insert_attributes): Ditto.
4064         (nds32_init_libfuncs): New function.
4065         (TARGET_HAVE_TLS): Define.
4066         (TARGET_INIT_LIBFUNCS): Define.
4067         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4068         spec content.
4069         (TARGET_ELF): Apply different mcmodel setting.
4070         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4071         been migrated into elf.h and linux.h files.
4072         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4073         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4074         (mcmodel): The content has been migrated into nds32-elf.opt and
4075         nds32-linux.opt files.
4076         * config/nds32/t-elf: New file.
4077         * config/nds32/t-linux: New file.
4079 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4080             Shiva Chen  <shiva0217@gmail.com>
4082         * config/nds32/constants.md (unspec_volatile_element): Add
4083         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4084         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4085         optimization.
4086         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4087         (make_pass_nds32_fp_as_gp): Declare.
4088         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4089         optmization pass.
4090         (nds32_asm_function_end_prologue): Remove unused asm output.
4091         (nds32_asm_function_begin_epilogue): Remove unused asm output.
4092         (nds32_asm_file_start): Output necessary fp_as_gp information.
4093         (nds32_option_override): Adjust register usage.
4094         (nds32_expand_prologue): Consider fp_as_gp situation.
4095         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4096         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4097         (epilogue): Ditto.
4098         (return): Ditto.
4099         (simple_return): Ditto.
4100         (omit_fp_begin): Output special directive for fp_as_gp.
4101         (omit_fp_end): Output special directive for fp_as_gp.
4102         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4103         mforbid-fp-as-gp): New options.
4105 2018-06-01  Mark Wielaard  <mark@klomp.org>
4107         * dwarf2out.c (dwarf2out_finish): Remove generation of
4108         DW_AT_loclists_base.
4110 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
4112         * gimple-ssa-store-merging.c: Include gimple-fold.h.
4113         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4114         (struct merged_store_group): Add bit_insertion field.
4115         (dump_char_array): Use standard hexadecimal format.
4116         (merged_store_group::merged_store_group): Set bit_insertion to false.
4117         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
4118         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
4119         also print the mask in the dump file.
4120         (pass_store_merging::gate): Minor tweak.
4121         (imm_store_chain_info::coalesce_immediate): Fix wrong association
4122         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
4123         stores with INTEGER_CST stores.
4124         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4125         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4126         and use it throughout.  Generate bit insertion sequences if need be.
4127         (pass_store_merging::process_store): Remove redundant condition.
4128         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4130 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
4132         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4133         the 128-bit floating point types.  Fix function comment.
4135 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4137         * config/aarch64/aarch64-simd.md
4138         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4139         mnemonics.
4140         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4141         mnemonics.
4143 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4145         PR tree-optimization/85989
4146         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4147         variable.
4148         (backprop::intersect_uses): Check it when deciding whether this
4149         is a backedge reference.
4150         (backprop::process_block): Add each phi to m_visited_phis
4151         after visiting it, then clear it at the end.
4153 2018-06-01  Richard Biener  <rguenther@suse.de>
4155         * tree-vectorizer.h (vect_dr_stmt): New function.
4156         (vect_get_load_cost): Adjust.
4157         (vect_get_store_cost): Likewise.
4158         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4159         Use vect_dr_stmt instead of DR_SMTT.
4160         (vect_record_base_alignments): Likewise.
4161         (vect_calculate_target_alignment): Likewise.
4162         (vect_compute_data_ref_alignment): Likewise and make static.
4163         (vect_update_misalignment_for_peel): Likewise.
4164         (vect_verify_datarefs_alignment): Likewise.
4165         (vector_alignment_reachable_p): Likewise.
4166         (vect_get_data_access_cost): Likewise.  Pass down
4167         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4168         (vect_get_peeling_costs_all_drs): Likewise.
4169         (vect_peeling_hash_get_lowest_cost): Likewise.
4170         (vect_enhance_data_refs_alignment): Likewise.
4171         (vect_find_same_alignment_drs): Likewise.
4172         (vect_analyze_data_refs_alignment): Likewise.
4173         (vect_analyze_group_access_1): Likewise.
4174         (vect_analyze_group_access): Likewise.
4175         (vect_analyze_data_ref_access): Likewise.
4176         (vect_analyze_data_ref_accesses): Likewise.
4177         (vect_vfa_segment_size): Likewise.
4178         (vect_small_gap_p): Likewise.
4179         (vectorizable_with_step_bound_p): Likewise.
4180         (vect_prune_runtime_alias_test_list): Likewise.
4181         (vect_analyze_data_refs): Likewise.
4182         (vect_supportable_dr_alignment): Likewise.
4183         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4184         (vect_gen_prolog_loop_niters): Likewise.
4185         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4186         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4187         modify DR_STMT.
4188         (vect_recog_mask_conversion_pattern): Likewise.
4189         (vect_try_gather_scatter_pattern): Likewise.
4190         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4191         to vect_get_store_cost.
4192         (vect_get_store_cost): Get stmt_info instead of DR.
4193         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4194         (vect_get_load_cost): Get stmt_info instead of DR.
4196 2018-06-01  Richard Biener  <rguenther@suse.de>
4198         PR middle-end/86017
4199         * gimple-fold.c (var_decl_component_p): Also allow offsetted
4200         vars wrapped in MEM_REFs.
4202 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4204         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4205         Fix subreg tests so that we only return a choice between
4206         GENERAL_REGS and FP_REGS if the original classes included both.
4208 2018-06-01  Richard Biener  <rguenther@suse.de>
4210         PR ipa/85960
4211         * tree-ssa-structalias.c (get_function_part_constraint):
4212         Handle NULL fi->decl.
4213         (find_func_aliases_for_call): Properly handle indirect
4214         fi from direct call.
4215         (find_func_clobbers): Likewise.
4216         (ipa_pta_execute): Likewise.
4217         (create_variable_info_for): For functions that are ifunc_resolver
4218         resolve to a varinfo that contains the result of the resolver call.
4219         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4220         aliases.
4222 2018-05-31  Michael Collison  <michael.collison@arm.com>
4224         * config/aarch64/aarch64.md:
4225         (*fix_to_zero_extenddfdi2): New pattern.
4226         * gcc.target/aarch64/fix_extend1.c: New testcase.
4228 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
4230         PR middle-end/78809
4231         PR middle-end/83026
4232         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4233         and BUILT_IN_STRNCMP_EQ.
4234         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4235         BUILT_IN_STRNCMP_EQ.
4236         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4237         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4238         (gimple_fold_builtin): Likewise.
4239         * tree-ssa-strlen.c (compute_string_length): New function.
4240         (determine_min_obsize): New function.
4241         (handle_builtin_string_cmp): New function to handle calls to
4242         string compare functions.
4243         (strlen_optimize_stmt): Add handling to builtin string compare
4244         calls.
4245         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4246         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4247         * tree.c (build_common_builtin_nodes): Add new defines of
4248         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4250 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
4252         PR target/85984
4253         * bb-reorder.c (pass_partition_blocks::gate): Return false for
4254         functions with naked attribute.
4256 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4258         * config/i386/sse.md (avx_vec_concat<mode>):
4259         Substitute concat_tg_mode mode attribute with xtg_mode.
4260         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4261         (concat_tg_mode): Remove mode attribute.
4263 2018-05-31  Martin Sebor  <msebor@redhat.com>
4265         PR c/82063
4266         * calls.c (alloc_max_size): Correct a logic error/typo.
4267         Treat excessive arguments as infinite.  Warn for invalid arguments.
4268         * doc/invoke.texi (-Walloc-size-larger-than): Update.
4270 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
4272         PR target/85829
4273         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4274         and movx for Haswell.
4276 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
4277             Cesar Philippidis  <cesar@codesourcery.com>
4279         PR middle-end/85879
4280         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4281         when emitting error on private/firstprivate reductions.
4282         * omp-low.c (lower_omp_target): Avoid reference-type processing
4283         on pointers for firstprivate clause.
4285 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4287         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4288         (st1x2): Likewise.
4289         (st1x3): Likewise.
4290         * config/aarch64/aarch64-simd.md
4291         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4292         (aarch64_ld1_x3_<mode>): Likewise
4293         (aarch64_st1x2<VALLDIF:mode>): Likewise
4294         (aarch64_st1_x2_<mode>): Likewise
4295         (aarch64_st1x3<VALLDIF:mode>): Likewise
4296         (aarch64_st1_x3_<mode>): Likewise
4297         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4298         (vld1_s8_x3): Likewise.
4299         (vld1_u16_x3): Likewise.
4300         (vld1_s16_x3): Likewise.
4301         (vld1_u32_x3): Likewise.
4302         (vld1_s32_x3): Likewise.
4303         (vld1_u64_x3): Likewise.
4304         (vld1_s64_x3): Likewise.
4305         (vld1_f16_x3): Likewise.
4306         (vld1_f32_x3): Likewise.
4307         (vld1_f64_x3): Likewise.
4308         (vld1_p8_x3): Likewise.
4309         (vld1_p16_x3): Likewise.
4310         (vld1_p64_x3): Likewise.
4311         (vld1q_u8_x3): Likewise.
4312         (vld1q_s8_x3): Likewise.
4313         (vld1q_u16_x3): Likewise.
4314         (vld1q_s16_x3): Likewise.
4315         (vld1q_u32_x3): Likewise.
4316         (vld1q_s32_x3): Likewise.
4317         (vld1q_u64_x3): Likewise.
4318         (vld1q_s64_x3): Likewise.
4319         (vld1q_f16_x3): Likewise.
4320         (vld1q_f32_x3): Likewise.
4321         (vld1q_f64_x3): Likewise.
4322         (vld1q_p8_x3): Likewise.
4323         (vld1q_p16_x3): Likewise.
4324         (vld1q_p64_x3): Likewise.
4325         (vst1_s64_x2): Likewise.
4326         (vst1_u64_x2): Likewise.
4327         (vst1_f64_x2): Likewise.
4328         (vst1_s8_x2): Likewise.
4329         (vst1_p8_x2): Likewise.
4330         (vst1_s16_x2): Likewise.
4331         (vst1_p16_x2): Likewise.
4332         (vst1_s32_x2): Likewise.
4333         (vst1_u8_x2): Likewise.
4334         (vst1_u16_x2): Likewise.
4335         (vst1_u32_x2): Likewise.
4336         (vst1_f16_x2): Likewise.
4337         (vst1_f32_x2): Likewise.
4338         (vst1_p64_x2): Likewise.
4339         (vst1q_s8_x2): Likewise.
4340         (vst1q_p8_x2): Likewise.
4341         (vst1q_s16_x2): Likewise.
4342         (vst1q_p16_x2): Likewise.
4343         (vst1q_s32_x2): Likewise.
4344         (vst1q_s64_x2): Likewise.
4345         (vst1q_u8_x2): Likewise.
4346         (vst1q_u16_x2): Likewise.
4347         (vst1q_u32_x2): Likewise.
4348         (vst1q_u64_x2): Likewise.
4349         (vst1q_f16_x2): Likewise.
4350         (vst1q_f32_x2): Likewise.
4351         (vst1q_f64_x2): Likewise.
4352         (vst1q_p64_x2): Likewise.
4353         (vst1_s64_x3): Likewise.
4354         (vst1_u64_x3): Likewise.
4355         (vst1_f64_x3): Likewise.
4356         (vst1_s8_x3): Likewise.
4357         (vst1_p8_x3): Likewise.
4358         (vst1_s16_x3): Likewise.
4359         (vst1_p16_x3): Likewise.
4360         (vst1_s32_x3): Likewise.
4361         (vst1_u8_x3): Likewise.
4362         (vst1_u16_x3): Likewise.
4363         (vst1_u32_x3): Likewise.
4364         (vst1_f16_x3): Likewise.
4365         (vst1_f32_x3): Likewise.
4366         (vst1_p64_x3): Likewise.
4367         (vst1q_s8_x3): Likewise.
4368         (vst1q_p8_x3): Likewise.
4369         (vst1q_s16_x3): Likewise.
4370         (vst1q_p16_x3): Likewise.
4371         (vst1q_s32_x3): Likewise.
4372         (vst1q_s64_x3): Likewise.
4373         (vst1q_u8_x3): Likewise.
4374         (vst1q_u16_x3): Likewise.
4375         (vst1q_u32_x3): Likewise.
4376         (vst1q_u64_x3): Likewise.
4377         (vst1q_f16_x3): Likewise.
4378         (vst1q_f32_x3): Likewise.
4379         (vst1q_f64_x3): Likewise.
4380         (vst1q_p64_x3): Likewise.
4382 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4384         * config/msp430/msp430.c (msp430_output_labelref): Prepend
4385         user_label_prefix to name.
4387         * tree-core.h: Update comment about the format of NAME string
4388         passed to handler in attribute_spec.
4390         * config/msp430/msp430.md: Remove erroneous subreg expression from
4391         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
4392         zero_extend{q,h}isi2.
4394 2018-05-30  Borislav Petkov  <bp@suse.de>
4396         * doc/extend.texi: Document some architecture specific
4397         constraints and sort entries.
4399 2018-05-30  Martin Sebor  <msebor@redhat.com>
4401         PR middle-end/85369
4402         * builtins.c (expand_builtin_stpcpy_1): New function.
4403         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4404         only if the former succeeds.
4406 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4408         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4409         in saphira.
4411 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4413         * doc/invoke.texi (-flinker-output): Document
4415 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4417         * passes.c (ipa_write_summaries): Only modify statements if body
4418         is in memory.
4419         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4420         incrementally linking.
4421         (ipa_passes): Likewise.
4422         * lto-cgraph.c (lto_output_node): When incrementally linking do not
4423         pass down resolution info.
4424         * common.opt (flag_incremental_link): Update info.
4425         * gcc.c (plugin specs): Turn flinker-output=* to
4426         -plugin-opt=-linker-output-known
4427         * toplev.c (compile_file): Also cut compilation when doing incremental
4428         link.
4429         * flag-types. (enum lto_partition_model): Add
4430         LTO_LINKER_OUTPUT_NOLTOREL.
4431         (invoke.texi): Add -flinker-output docs.
4432         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4433         link same way as WPA; do not stream in dead initializers.
4435         * dwarf2out.c (dwarf2out_die_ref_for_decl,
4436         darf2out_register_external_decl): Support incremental link.
4438 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4440         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4442 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4444         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4445         it down to simple_object_copy_lto_debug_sections.
4446         (run_gcc): Determine incremental LTO link time and configure
4447         lto1 into non-wpa mode, disable renaming of debug sections.
4449 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4451         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4452         descriptions of various incorrectly documented functions.
4454 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4456         Revert:
4457         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4458         address check not strict.
4460 2018-05-30  Richard Biener  <rguenther@suse.de>
4462         PR tree-optimization/85964
4463         * tracer.c (better_p): Drop initialized count check, we only
4464         call the function with initialized counts now.
4465         (find_best_successor): Do find a best edge if one
4466         has uninitialized count.
4467         (find_best_predecessor): Likewise.  Do BB frequency check only
4468         if count is initialized.
4470 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
4472         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4473         (aarch64_ldrstr_offset_compare): New.
4474         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4475         load/store orderings.
4476         (aarch64_gen_adjusted_ldpstp): Likewise.
4478 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
4480         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4481         Check for subset of GENERAL_REGS and FP_REGS.
4482         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4483         r=w alternative.
4485 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
4487         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4488         and wi::to_poly_offset.  Add the current offset and then check
4489         whether the sum fits, rather than using an unchecked addition of
4490         a checked term.  Check for a shwi rather than a uhwi.
4491         * expr.c (get_bit_range): Use tree_to_poly_uint64.
4492         (store_constructor): Use poly_int_tree_p.
4493         (expand_expr_real_1): Likewise.
4494         * function.c (assign_temp): Likewise.
4495         * fold-const.c (const_binop): Use poly_int_tree_p and
4496         wi::to_poly_offset.
4497         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
4498         division.
4499         * ipa-icf-gimple.c (func_checker::compare_operand): Use
4500         to_poly_offset for MEM offsets.
4501         * ipa-icf.c (sem_variable::equals): Likewise.
4502         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4503         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4504         wi::to_poly_offset for BIT_FIELD_REF offsets.
4505         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4506         wi::to_poly_offset.
4507         * var-tracking.c (emit_note_insn_var_location): Use
4508         tree_to_poly_uint64.
4510 2018-05-29  Jim Wilson  <jimw@sifive.com>
4512         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4514 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
4516         PR target/85950
4517         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4518         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4519         sequence.
4520         (sse4_1_round<mode>2): Use nonimmediate_operand
4521         for operand 1 predicate.
4523 2018-05-29  Martin Sebor  <msebor@redhat.com>
4524             Richard Biener  <rguenther@suse.de>
4526         PR testsuite/85888
4527         * calls.c (get_size_range): Call determine_value_range instead
4528         of get_value_range..
4529         * tree-vrp.h (determine_value_range): Declared new function.
4530         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
4532 2018-05-29  Richard Biener  <rguenther@suse.de>
4534         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
4535         sure to use non-pattern stmts for get_earlier_stmt arguments.
4536         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
4537         called on pattern stmts.
4538         (get_later_stmt): Likewise.
4540 2018-05-29  Martin Liska  <mliska@suse.cz>
4542         PR gcov-profile/85759
4543         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
4544         env variables.
4546 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
4548         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
4549         VEC_UNPACK_*_EXPR.
4550         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
4551         VEC_PACK_*_EXPR.
4553         PR target/85918
4554         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4555         VEC_PACK_FLOAT_EXPR): New tree codes.
4556         * tree-pretty-print.c (op_code_prio): Handle
4557         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4558         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4559         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4560         * tree-inline.c (estimate_operator_cost): Likewise.
4561         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
4562         * fold-const.c (const_binop): Likewise.
4563         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
4564         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4565         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4566         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
4567         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4568         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4569         * expr.c (expand_expr_real_2): Likewise.
4570         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
4571         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
4572         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
4573         optabs.
4574         * optabs.c (expand_widen_pattern_expr): For
4575         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
4576         sign from result type rather than operand's type.
4577         (expand_binop_directly): For vec_packu_float_optab and
4578         vec_packs_float_optab allow result type to be different from operand's
4579         type.
4580         * optabs-tree.c (optab_for_tree_code): Handle
4581         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4582         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
4583         * tree-vect-generic.c (expand_vector_operations_1):  Handle
4584         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4585         VEC_PACK_FLOAT_EXPR.
4586         * tree-vect-stmts.c (supportable_widening_operation): Handle
4587         FIX_TRUNC_EXPR.
4588         (supportable_narrowing_operation): Handle FLOAT_EXPR.
4589         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
4590         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
4591         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
4592         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
4593         mode attributes.
4594         (vec_pack<floatprefix>_float_<mode>): New expander.
4595         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
4596         attributes.
4597         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
4598         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
4599         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
4600         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
4601         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
4602         Document.
4603         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
4604         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
4605         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4606         VEC_PACK_FLOAT_EXPR): Document.
4608 2018-05-29  Richard Biener  <rguenther@suse.de>
4610         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
4611         member.
4612         (stmt_vec_info_vec): Make pointer.
4613         (init_stmt_vec_info_vec): Remove.
4614         (free_stmt_vec_info_vec): Likewise.
4615         (set_stmt_vec_info_vec): New function.
4616         (free_stmt_vec_infos): Likewise.
4617         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
4618         (set_vinfo_for_stmt): Likewise.
4619         (get_earlier_stmt): Likewise.
4620         (get_later_stmt): Likewise.
4621         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
4622         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
4623         (vec_info::~vec_info): Free stmt_vec_infos.
4624         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
4625         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
4626         (pass_slp_vectorize::execute): Likewise.
4627         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
4628         (free_stmt_vec_info_vec): Likewise.
4629         (set_stmt_vec_info_vec): New function.
4630         (free_stmt_vec_infos): Likewise.
4631         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
4632         the global stmt_vec_info_vec.
4633         * tree-parloops.c (gather_scalar_reductions): Use
4634         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
4635         vector.
4637 2018-05-29  Richard Biener  <rguenther@suse.de>
4639         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
4641 2018-05-29  Martin Liska  <mliska@suse.cz>
4642             David Malcolm  <dmalcolm@redhat.com>
4644         * vec.c (test_reverse): New.
4645         (vec_c_tests): Add new test.
4646         * vec.h (vl_ptr>::reverse): New function.
4648 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
4650         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
4652         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
4653         and later.
4655 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4657         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
4659 2018-05-28  Richard Biener  <rguenther@suse.de>
4661         PR tree-optimization/85933
4662         * tree-vect-data-refs.c (vect_record_base_alignments): Only
4663         look at stmts marked as vectorizable.
4665 2018-05-28  Richard Biener  <rguenther@suse.de>
4667         PR tree-optimization/85934
4668         * tree-vect-generic.c (expand_vector_operations_1): Hoist
4669         vector boolean check before scalar optimization.
4671 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
4673         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
4674         for armv5te.
4676 2018-05-28  Mark Wielaard  <mark@klomp.org>
4678         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
4679         if it is an expression containing a minus sign.
4681 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
4683         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4685 2018-05-27  Paul Koning  <ni1d@arrl.net>
4687         * config/pdp11/pdp11.md (truncsihi2): Remove.
4689 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
4690             Chung-Ju Wu  <jasonwucj@gmail.com>
4692         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
4693         implementation.
4694         (unaligned_store_dw): Ditto.
4695         * config/nds32/nds32-memory-manipulation.c
4696         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
4697         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
4698         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
4699         (emit_setmem_word_loop): Rename to ...
4700         (emit_setmem_doubleword_loop): ... this.
4701         (nds32_gen_dup_4_byte_to_word_value): New function.
4702         (nds32_gen_dup_8_byte_to_double_word_value): New function.
4703         (nds32_expand_setmem_loop): Refine implementation.
4704         (nds32_expand_setmem_loop_v3m): Ditto.
4705         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
4706         pattern.
4708 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4710         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
4712 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4714         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4715         (nds32_init_machine_status): Initialize machine->attr_naked_p and
4716         machine->attr_no_prologue_p.
4717         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
4718         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
4719         (nds32_expand_epilogue): Consider attr_naked_p.
4720         (nds32_expand_epilogue_v3pop): Likewise.
4721         (nds32_can_use_return_insn): Likewise.
4722         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
4723         attr_no_prologue_p fields.
4724         * config/nds32/nds32.opt (mret-in-naked-func): New option.
4726 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
4728         PR target/85918
4729         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
4730         attributes.
4731         * config/i386/sse.md
4732         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
4733         Rename to ...
4734         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
4735         ... this.
4736         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
4737         Rename to ...
4738         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
4739         ... this.
4740         (*<floatsuffix>floatv2div2sf2): Rename to ...
4741         (*float<floatunssuffix>v2div2sf2): ... this.
4742         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
4743         (float<floatunssuffix>v2div2sf2_mask): ... this.
4744         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
4745         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
4746         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
4747         to ...
4748         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
4749         ... this.
4750         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4751         Rename to ...
4752         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4753         ... this.
4754         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4755         Rename to ...
4756         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4757         ... this.
4758         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
4759         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
4760         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
4761         gen_ufix_truncv8dfv8si2.
4762         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
4763         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
4764         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
4765         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
4766         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
4767         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
4768         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
4769         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
4771 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
4773         PR target/85900
4774         PR target/85345
4775         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4777 2018-05-25  Jim Wilson  <jimw@sifive.com>
4779         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
4780         * config/riscv/riscv.c (struct machine_function): Add
4781         interrupt_handler_p and attribute_checked_p fields.
4782         (riscv_attribute_table): Add interrupt.
4783         (riscv_interrupt_type_p): New.
4784         (riscv_save_reg_p): Save extra regs for interrupt handler.
4785         (riscv_use_save_libcall): Return false  for interrupt handler.
4786         (riscv_first_stack_step): Add forward declaration.
4787         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
4788         for interrupt handler with large frame.  Use it for saved reg list.
4789         (riscv_expand_prologue): Move flag_stack_usage_info support to
4790         eliminate duplication.
4791         (riscv_expand_epilogue): Generate mret for interrupt handler.
4792         (riscv_epilogue_uses): New.
4793         (riscv_can_use_return_insn): Return false for interrupt handler.
4794         (riscv_function_ok_for_sibcall): Likewise.
4795         (riscv_set_current_function): Add interrupt handler support.
4796         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
4797         * config/riscv/riscv.md (UNSPECV_MRET): New.
4798         (GP_REGNUM): New.
4799         (riscv_frflags, riscv_fsflags): Use tab after opcode.
4800         (riscv_mret): New.
4801         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
4803 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4805         PR tree-optimization/85712
4806         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4807         this candidate has already been replaced in-situ by a copy.
4809 2018-05-25  Jason Merrill  <jason@redhat.com>
4811         PR c++/80485 - inline function non-zero address.
4812         * symtab.c (nonzero_address): Check DECL_COMDAT.
4814 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
4816         PR target/83628
4817         * config/alpha/alpha.md (ashlsi3): New insn pattern.
4818         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
4819         extension of SImode operation.  Use const123_operand predicate.
4820         (*saddsi_1): Remove.
4821         (*saddl_se_1): Ditto.
4822         (*ssubsi_1): Ditto.
4823         (*ssubl_se_1): Ditto.
4824         * config/alpha/predicates.md (const123_operand): New predicate.
4825         * config/alpha/constraints.md (P): Use IN_RANGE.
4827 2018-05-25  Richard Biener  <rguenther@suse.de>
4829         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
4830         defaulted to true.
4831         (ref_maybe_used_by_stmt_p): Likewise.
4832         (stmt_may_clobber_ref_p): Likewise.
4833         (stmt_may_clobber_ref_p_1): Likewise.
4834         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
4835         and pass it along.
4836         (ref_maybe_used_by_stmt_p): Likewise.
4837         (stmt_may_clobber_ref_p): Likewise.
4838         (stmt_may_clobber_ref_p_1): Likewise.
4839         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
4840         the alias oracle to disambiguate DRs with stmts DR analysis
4841         couldn't handle.
4842         (vect_analyze_data_refs): Do not give up on not analyzable
4843         DRs for BB vectorization.  Remove code truncating the dataref
4844         vector.
4846 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
4848         PR target/85832
4849         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4850         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
4851         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
4853 2018-05-25  Richard Biener  <rguenther@suse.de>
4855         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
4856         function, combining stmt data ref gathering and fatal analysis
4857         parts.
4858         (vect_analyze_data_refs): Remove now redudnant code and simplify.
4859         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
4860         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
4861         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
4862         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
4864 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4866         PR tree-optimization/85720
4867         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
4868         SCC if all partitions are builtins.
4869         (version_loop_by_alias_check): New parameter.  Generate cancelable
4870         runtime alias check if all partitions are builtins.
4871         (distribute_loop): Update call to above function.
4873 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4875         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
4876         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
4877         (parm_default_def_partition_arg): Ditto.
4878         (set_parm_default_def_partition): Ditto.
4879         (get_parm_default_def_partitions): Ditto and make it static.
4880         (get_undefined_value_partitions): Ditto and make it static.
4881         (remove_ssa_form): Refactor call to init_var_map here.
4882         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
4883         computation for loop region.
4884         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
4885         (register_default_def): Delete.
4886         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
4887         (parm_default_def_partition_arg): Ditto.
4888         (set_parm_default_def_partition): Ditto.
4889         (get_parm_default_def_partitions): Ditto and make it static.
4890         (get_undefined_value_partitions): Ditto and make it static.
4891         (coalesce_with_default, coalesce_with_default): Update comment.
4892         (create_coalesce_list_for_region): New func factored out from
4893         create_outofssa_var_map.
4894         (populate_coalesce_list_for_outofssa): New func factored out from
4895         create_outofssa_var_map and coalesce_ssa_name.
4896         (create_outofssa_var_map): Delete.
4897         (coalesce_ssa_name): Refactor to support live range computation.
4898         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
4899         (get_parm_default_def_partitions): Delete.
4900         (get_undefined_value_partitions): Ditto.
4901         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
4902         computation for loop region.
4903         (new_tree_live_info, loe_visit_block): Ditto.
4904         (live_worklist, set_var_live_on_entry): Ditto.
4905         (calculate_live_on_exit, verify_live_on_entry): Ditto.
4906         * tree-ssa-live.h (struct _var_map): New fields.
4907         (init_var_map): Change decl.
4908         (region_contains_p): New.
4910 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4912         * tree-ssa-live.h (live_merge_and_clear): Delete.
4914 2018-05-25  Richard Biener  <rguenther@suse.de>
4916         PR c++/85912
4917         * tree-dump.c (dequeue_and_dump): Remove access to removed
4918         operand 2 of a SWITCH_EXPR.
4920 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4922         * doc/sourcebuild.texi (vect_double_cond_arith): Include
4923         multiplication and division.
4924         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
4925         (cond_udiv@var{m}, cond_umod@var{m}): Document.
4926         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
4927         (cond_udiv_optab, cond_umod_optab): New optabs.
4928         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
4929         (IFN_COND_RDIV): New internal functions.
4930         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
4931         TRUNC_MOD_EXPR and RDIV_EXPR.
4932         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
4933         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
4934         New unspecs.
4935         (SVE_INT_BINARY): Include mult.
4936         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4937         (optab, sve_int_op): Handle mult.
4938         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4939         UNSPEC_COND_DIV.
4940         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4941         for SVE_INT_BINARY_SD.
4943 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4945         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4946         (optab, sve_int_op): Handle div and udiv.
4947         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4948         for SVE_INT_BINARY_SD.
4949         (*<optab><mode>3): New insn for the same.
4951 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4953         * tree-vect-patterns.c: Include predict.h.
4954         (vect_recog_divmod_pattern): Restrict check for division support
4955         to when optimizing for size.
4957 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4959         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4960         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4961         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4962         (gimple_match_op::set_op): Likewise.
4963         (gimple_resimplify4): Declare.
4964         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4965         (expr::gen_transform): Likewise.
4966         (decision_tree::gen): Generate a simplification routine for 4 operands.
4967         * gimple-match-head.c (gimple_simplify): Add an overload for
4968         4 operands.  In the top-level function, handle up to 4 call
4969         arguments and call gimple_resimplify4.
4970         (gimple_resimplify4): New function.
4971         (build_call_internal): Pass a fourth operand.
4972         (maybe_push_to_seq): Likewise.
4973         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4974         Fold VEC_COND_EXPRs of an operation and a default value into
4975         an IFN_COND_* function if possible.
4976         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4977         New unspecs.
4978         (SVE_COND_FP_BINARY): Include them.
4979         (optab, sve_fp_op): Handle them.
4980         (SVE_INT_BINARY_REV): New code iterator.
4981         (SVE_COND_FP_BINARY_REV): New int iterator.
4982         (commutative): New int attribute.
4983         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4984         Declare.
4985         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4986         function.
4987         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4988         (*cond_<optab><mode>): New patterns for reversed operands.
4990 2018-05-25  Richard Biener  <rguenther@suse.de>
4992         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4993         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4994         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4995         (STMT_VINFO_GROUPED_ACCESS): Adjust.
4996         * tree-vect-data-refs.c (everywhere): Adjust users.
4997         * tree-vect-loop.c (everywhere): Likewise.
4998         * tree-vect-slp.c (everywhere): Likewise.
4999         * tree-vect-stmts.c (everywhere): Likewise.
5000         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5002 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5004         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5005         Rename to...
5006         (gcc_cv_as_section_exclude): ... this.
5007         Try Solaris as #exclude syntax.
5008         * configure: Regenerate.
5009         * config.in: Regenerate.
5010         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5011         SECTION_EXCLUDE.
5012         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5013         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5015         * varasm.c (default_elf_asm_named_section): Don't check if
5016         HAVE_GAS_SECTION_EXCLUDE is defined.
5018 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5020         * doc/md.texi: Update the documentation of the cond_* optabs
5021         to mention the new final operand.  Fix GET_MODE_NUNITS call.
5022         Describe the scalar case too.
5023         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5024         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5025         instead of 2.
5026         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5027         (get_conditional_internal_fn): Update comment.
5028         * tree-vect-loop.c (vectorizable_reduction): Pass the original
5029         accumulator value as a final argument to conditional functions.
5030         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5031         a define_expand and add an "else" operand.  Assert for now that
5032         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
5033         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5034         (*cond_<optab><mode>): New patterns.
5035         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5036         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5037         (UNSPEC_COND_EOR): Delete.
5038         (optab): Remove associated mappings.
5039         (SVE_INT_BINARY): New code iterator.
5040         (sve_int_op): Remove int attribute and add "minus" to the code
5041         attribute.
5042         (SVE_COND_INT_OP): Delete.
5043         (SVE_COND_FP_OP): Rename to...
5044         (SVE_COND_FP_BINARY): ...this.
5046 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5048         * optabs.c (can_reuse_operands_p): New function.
5049         (maybe_legitimize_operands): Try to reuse the results for
5050         earlier operands.
5052 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5054         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5055         Add {q} suffix to insn mnemonic.
5057 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5059         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5060         (msp430_warn_func_return): New.
5062 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
5064         * fold-const.c (tree_nonzero_bits): New function.
5065         * fold-const.h (tree_nonzero_bits): Likewise.
5066         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5067         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5069 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5071         PR target/85900
5072         PR target/85345
5073         * varasm.c (assemble_alias): Check ifunc_resolver only on
5074         FUNCTION_DECL.
5076 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5078         PR target/85903
5079         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5080         when memory input operand is handled.
5082 2018-05-24  Luis Machado  <luis.machado@linaro.org>
5084         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5085         global.
5086         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5088 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5090         * match.pd: Delay FMA folds until after vectorization.
5092 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5094         PR target/83009
5095         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5096         address check not strict.
5098 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5100         * gimple-match.h (gimple_match_op): New class.
5101         (mprts_hook): Replace parameters with a gimple_match_op *.
5102         (maybe_build_generic_op): Likewise.
5103         (gimple_simplified_result_is_gimple_val): Replace parameters with
5104         a const gimple_match_op *.
5105         (gimple_simplify): Replace code_helper * and tree * parameters with
5106         a gimple_match_op * parameter.
5107         (gimple_resimplify1): Replace code_helper *, tree and tree *
5108         parameters with a gimple_match_op * parameter.
5109         (gimple_resimplify2): Likewise.
5110         (gimple_resimplify3): Likewise.
5111         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5112         parameters with a gimple_match_op * parameter.
5113         * gimple-match-head.c (gimple_simplify): Change prototypes of
5114         auto-generated functions to take a gimple_match_op * instead of
5115         separate code_helper * and tree * parameters.  Make the same
5116         change in the top-level overload and update calls to the
5117         gimple_resimplify routines.  Update calls to the auto-generated
5118         functions and to maybe_push_res_to_seq in the publicly-facing
5119         operation-specific gimple_simplify overloads.
5120         (gimple_match_op::MAX_NUM_OPS): Define.
5121         (gimple_resimplify1): Replace rcode and ops with a single res_op
5122         parameter.  Update call to gimple_simplify.
5123         (gimple_resimplify2): Likewise.
5124         (gimple_resimplify3): Likewise.
5125         (mprts_hook): Replace parameters with a gimple_match_op *.
5126         (maybe_build_generic_op): Likewise.
5127         (build_call_internal): Replace type, nargs and ops with
5128         a gimple_match_op *.
5129         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5130         with a single gimple_match_op *.  Update calls to mprts_hook,
5131         build_call_internal and gimple_simplified_result_is_gimple_val.
5132         Factor out code that is common to the tree_code and combined_fn cases.
5133         * genmatch.c (expr::gen_transform): Replace tem_code and
5134         tem_ops with a gimple_match_op called tem_op.  Update calls
5135         to the gimple_resimplify functions and maybe_push_res_to_seq.
5136         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5137         res_ops.  Update call to the gimple_resimplify functions.
5138         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5139         (decision_tree::gen): Make the functions take a gimple_match_op *
5140         called res_op instead of separate res_code and res_ops parameters.
5141         Update call accordingly.
5142         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5143         and ops with a single res_op parameter.  Update calls to
5144         maybe_build_generic_op and maybe_push_res_to_seq.
5145         (fold_stmt_1): Update calls to gimple_simplify and
5146         replace_stmt_with_simplification.
5147         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5148         and gimple_simplified_result_is_gimple_val.
5149         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5150         gimple_simplify.
5151         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5152         with a gimple_match_op *.
5153         (vn_nary_build_or_lookup): Likewise.  Update call to
5154         vn_nary_build_or_lookup_1.
5155         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5156         gimple_match_op *.  Update calls to the gimple_resimplify routines
5157         and to gimple_simplified_result_is_gimple_val.
5158         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5159         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5160         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5161         (visit_nary_op): Likewise.
5162         (visit_reference_op_load): Likewise.
5164 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5166         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5167         modifier for printing the step amount.
5169 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
5171         PR target/78849
5172         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5173         types.
5175 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
5177         * doc/sourcebuild.texi (Endianness): New subsubsection.
5179 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5181         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5182         <prefetch_dynamic_strides>: New const bool field.
5183         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5184         prefetch_dynamic_strides.
5185         (exynosm1_prefetch_tune): Likewise.
5186         (thunderxt88_prefetch_tune): Likewise.
5187         (thunderx_prefetch_tune): Likewise.
5188         (thunderx2t99_prefetch_tune): Likewise.
5189         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5190         false.
5191         (aarch64_override_options_internal): Update to set
5192         PARAM_PREFETCH_DYNAMIC_STRIDES.
5193         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5194         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5195         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5196         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5197         prefetch-dynamic-strides setting.
5199 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5201         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5202         <minimum_stride>: New const int field.
5203         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5204         minimum_stride field defaulting to -1.
5205         (exynosm1_prefetch_tune): Likewise.
5206         (thunderxt88_prefetch_tune): Likewise.
5207         (thunderx_prefetch_tune): Likewise.
5208         (thunderx2t99_prefetch_tune): Likewise.
5209         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5210         <default_opt_level>: Set to 3.
5211         (aarch64_override_options_internal): Update to set
5212         PARAM_PREFETCH_MINIMUM_STRIDE.
5213         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5214         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5215         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5216         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5217         stride is constant and is below the minimum stride threshold.
5219 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5221         * config/arm/arm-cpus.in (mode26): Delete.
5222         (armv4): Delete mode26 reference.
5223         * config/arm/arm.c (arm_configure_build_target): Delete use of
5224         isa_bit_mode26.
5226 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5228         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5229         New insn pattern.
5230         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5231         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
5232         for non-SSE modes.
5233         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
5234         (floatunsdidf2): Ditto.
5236 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5238         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5239         (fixuns_trunc<mode>si2_avx512f): Ditto.
5240         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5241         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5242         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5244 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5246         PR rtl-optimization/79985
5247         * df-scan.c (df_insn_refs_collect): Remove special case for
5248         global registers and asm statements.
5250 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5252         * extend.texi (Global Register Variables): Rewrite the bullet list.
5253         Note that the register is available for allocation. Note that access
5254         via inline asm must use constraints. Add note about async-signal
5255         handlers. Remove paragraph about automagic register selection.
5257 2018-05-23  Richard Biener  <rguenther@suse.de>
5259         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5260         of fixed offset from memset VN.
5262 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
5264         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5265         first_interp field.
5266         (alloc_cand_and_find_basis): Initialize first_interp field.
5267         (slsr_process_mul): Modify first_interp field.
5268         (slsr_process_add): Likewise.
5269         (slsr_process_cast): Modify first_interp field for each new
5270         interpretation.
5271         (slsr_process_copy): Likewise.
5272         (dump_candidate): Dump first_interp field.
5273         (replace_mult_candidate): Process all interpretations, not just
5274         subsequent ones.
5275         (replace_rhs_if_not_dup): Likewise.
5276         (replace_one_candidate): Likewise.
5278 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
5280         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5281         Add new boolean.
5282         (aarch64_needs_frame_chain): New function.
5283         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5285 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
5287         PR target/84882
5288         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5289         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5290         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5291         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5292         as true for strict-align.
5293         (aarch64_can_inline_p): Perform checks even when callee has no
5294         attributes to check for strict alignment.
5295         * doc/extend.texi (AArch64 Function Attributes): Document
5296         no-strict-align.
5297         * doc/invoke.texi: (AArch64 Options): Likewise.
5299 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
5301         PR tree-optimization/85853
5302         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5303         the handling of the root of the node to...
5304         (vect_slp_analyze_node_operations_1): ...this new function,
5305         and run the whole thing with the child nodes' def types
5306         set according to their SLP node's def type.
5308 2018-05-23  Richard Biener  <rguenther@suse.de>
5310         PR middle-end/85874
5311         * tree-data-ref.c (create_runtime_alias_checks): Defer
5312         and ignore overflow warnings.
5314 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
5316         PR tree-optimization/85822
5317         * tree-vrp.c (is_masked_range_test): Fix handling of negative
5318         constants.
5320 2018-05-23  Richard Biener  <rguenther@suse.de>
5322         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5323         memset constants via native_interpret_expr.
5325 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
5327         PR target/85345
5328         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5329         attribute.
5330         (cgraph_node::create_alias): Likewise.
5331         (cgraph_node::get_availability): Check ifunc_resolver instead
5332         of looking up ifunc attribute.
5333         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5334         * varasm.c (do_assemble_alias): Likewise.
5335         (assemble_alias): Likewise.
5336         (default_binds_local_p_3): Likewise.
5337         * cgraph.h (cgraph_node): Add ifunc_resolver.
5338         (cgraph_node::only_called_directly_or_aliased_p): Return false
5339         for IFUNC resolver.
5340         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5341         attribute.
5342         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5343         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5344         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5345         instead of looking up ifunc attribute.
5347 2018-05-22  Luis Machado  <luis.machado@linaro.org>
5349         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5351 2018-05-22  Martin Sebor  <msebor@redhat.com>
5353         PR middle-end/85359
5354         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5355         only when expasion succeeds.
5356         (expand_builtin_strcmp): Same.
5357         (expand_builtin_strncmp): Same.
5359 2018-05-22  Martin Sebor  <msebor@redhat.com>
5361         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5363 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5364             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5366         * config/aarch64/aarch64-ldpstp.md: Replace uses of
5367         aarch64_mem_pair_operand with memory_operand and delete operand swapping
5368         code.
5369         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5370         Add check for legitimate_address.
5371         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
5372         (aarch64_swap_ldrstr_operands): New.
5373         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
5374         Define prototype.
5376 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5377             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5379         * config/aarch64/aarch64.md: New patterns to generate stp
5380         and ldp.
5381         (store_pair_sw, store_pair_dw): New patterns to generate stp for
5382         single words and double words.
5383         (load_pair_sw, load_pair_dw): Likewise.
5384         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
5385         Delete.
5386         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
5387         Delete.
5388         * config/aarch64/aarch64-ldpstp.md: Modify peephole
5389         for different mode ldpstp and add peephole for merged zero stores.
5390         Likewise for loads.
5391         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5392         Add size check.
5393         (aarch64_gen_store_pair): Rename calls to match new patterns.
5394         (aarch64_gen_load_pair): Rename calls to match new patterns.
5395         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5396         (load_pair<DREG:mode><DREG2:mode>): ... This.
5397         (store_pair<mode>): Rename to...
5398         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5399         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5400         New mode iterators.
5401         (V_INT_EQUIV): Handle SImode.
5402         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5403         New predicate.
5405 2018-05-22  Martin Sebor  <msebor@redhat.com>
5407         PR c/85623
5408         * calls.c (maybe_warn_nonstring_arg): Use string length to set
5409         or ajust the presumed bound on an operation to avoid unnecessary
5410         warnings.
5412 2018-05-22  Martin Sebor  <msebor@redhat.com>
5414         PR tree-optimization/85826
5415         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5416         assuming that a DECL necesarily has a constant size.
5418 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
5420         PR middle-end/85862
5421         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5423 2018-05-22  Richard Biener  <rguenther@suse.de>
5425         PR tree-optimization/85834
5426         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5427         non-constant and non-zero memset arguments.
5429 2018-05-22  Martin Liska  <mliska@suse.cz>
5431         PR ipa/85607
5432         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5434 2018-05-22  Richard Biener  <rguenther@suse.de>
5436         PR tree-optimization/85863
5437         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5438         comparisons when vectype is specified.
5439         (vectorizable_condition): Do not specify vectype for
5440         vect_is_simple_cond when SLP vectorizing.
5442 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
5444         PR target/85657
5445         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5446         define __ibm128 as long double.
5447         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5448         as a distinct type when IEEE 128-bit support is enabled.
5449         (init_float128_ieee): Fix up conversions between IFmode and IEEE
5450         128-bit types to use the correct functions.
5451         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5452         convert between 128-bit floating point types that have different
5453         modes but the same representation, instead of using gen_lowpart to
5454         makean alias.
5455         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5456         KFmode.
5457         (IFKF_reg): New attributes to give the register constraints for
5458         IFmode and KFmode.
5459         (extend<mode>tf2_internal): New insns to mark an explicit
5460         conversion between 128-bit floating point types that have a
5461         different mode but share the same representation.
5463 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
5465         PR tree-optimization/85814
5466         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5467         a null return from get_strinfo when unsharing the next
5468         strinfo in the chain.
5470 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5472         PR gcc/84923
5473         * varasm.c (weak_finish): Clean up weak_decls.
5475 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5477         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5478         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5479         UNSPEC_UADALP values.
5480         * config/aarch64/iterators.md (ABAL): New int iterator.
5481         (ABDL2): Likewise.
5482         (ADALP): Likewise.
5483         (sur): Add mappings for the above.
5484         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5485         New define_insn.
5486         (aarch64_<sur>abal<mode>_4): Likewise.
5487         (aarch64_<sur>adalp<mode>_3): Likewise.
5488         (<sur>sadv16qi): New define_expand.
5490 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
5492         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5493         (*movdf_internal): Ditto.
5494         (*rcpsf2_sse): Ditto.
5495         (*rsqrtsf2_sse): Ditto.
5496         (*sqrt<mode>2_sse): Ditto.
5498 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
5500         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5501         eor3q<mode>4.
5502         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5503         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5504         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5505         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5506         vbcaxq_s64): New.
5507         * config/aarch64/arm_neon.h: Likewise.
5508         * config/aarch64/iterators.md (VQ_I): New.
5510 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
5512         * config.gcc: Add arc/t-multilib-linux to tmake_file for
5513         arc*-*-linux*.
5514         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5515         MULTILIB_DIRNAMES
5517 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5519         * config/nds32/constraints.md (S): New constraint.
5520         * config/nds32/nds32.md (call_internal): Use constraint S.
5521         (call_value_internal): Likewise.
5522         (sibcall_internal): Likewise.
5523         (sibcall_value_internal): Likewise.
5525 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5526             Chung-Ju Wu  <jasonwucj@gmail.com>
5528         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5529         into consideration.
5531 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5532             Chung-Ju Wu  <jasonwucj@gmail.com>
5534         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
5535         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
5536         (nds32_rtx_costs_impl): Simplify.
5537         (nds32_address_cost_impl): Simplify.
5538         (nds32_init_rtx_costs): New function.
5539         (nds32_rtx_costs_speed_prefer): Likewise.
5540         (nds32_rtx_costs_size_prefer): Likewise.
5541         (nds32_address_cost_speed_prefer): Likewise.
5542         (nds32_address_cost_speed_fwprop): Likewise.
5543         (nds32_address_cost_size_prefer): Likewise.
5544         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
5545         * config/nds32/nds32.c (nds32_option_override): Use
5546         nds32_init_rtx_costs function.
5548 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5550         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
5551         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
5552         (TARGET_PIPELINE_N8): Likewise.
5553         (TARGET_PIPELINE_N10): Likewise.
5554         (TARGET_PIPELINE_N13): Likewise.
5555         (TARGET_PIPELINE_GRAYWOLF): Likewise.
5557 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
5559         * config/nds32/nds32-fpu.md: Update copyright year.
5561 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5563         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
5565 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5567         * config/nds32/nds32.c
5568         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
5569         * config/nds32/nds32.opt (minline-asm-r15): New option.
5571 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5573         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
5574         MASK_HW_ABS.
5575         * config/nds32/nds32.md (abssi2): New pattern.
5577 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
5579         * config/i386/i386.md (rex64namesuffix): New mode attribute.
5580         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
5581         Merge insn pattern from sse_cvtsi2ss<round_name> and
5582         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
5583         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
5584         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
5585         using SWI48 mode iterator.
5586         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
5587         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
5588         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
5589         pattern from sse_cvttss2si<round_saeonly_name>
5590         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
5591         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
5592         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
5593         using SWI48 mode iterator.
5594         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
5595         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
5596         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
5597         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
5598         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
5599         using SWI48 mode iterator.
5600         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
5601         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
5602         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
5603         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
5604         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
5605         SWI48 mode iterator.
5606         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
5607         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
5608         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
5609         pattern from sse_cvttsd2si<round_saeonly_name>
5610         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
5612 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5614         * config/nds32/nds32-md-auxiliary.c
5615         (nds32_valid_smw_lwm_base_p): Refine.
5616         (nds32_output_smw_single_word): Refine.
5617         (nds32_output_smw_double_word): New.
5618         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
5620 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5622         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
5623         (nds32_output_stack_pop): Refine.
5624         (nds32_expand_unaligned_load): Refine.
5625         (nds32_expand_unaligned_store): Refine.
5627 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
5628             Chung-Ju Wu  <jasonwucj@gmail.com>
5630         * config/nds32/constants.md: Add TP_REGNUM constant.
5631         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
5632         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
5633         UNSPEC_ADD32.
5634         * config/nds32/nds32-doubleword.md: Consider flag_pic.
5635         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
5636         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
5637         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
5638         and PIC code generation.
5639         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
5640         code generation.
5641         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
5642         optimization.
5643         * config/nds32/nds32.md: Support TLS and PIC.
5644         * config/nds32/nds32.c: Support TLS and PIC.
5645         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
5646         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
5647         predicate.
5649 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5651         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
5652         mode with E_ prefix.
5654 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
5655             Chung-Ju Wu  <jasonwucj@gmail.com>
5657         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
5658         * config/nds32/nds32-md-auxiliary.c
5659         (symbolic_reference_mentioned_p): New.
5660         (nds32_legitimize_ict_address): New.
5661         (nds32_expand_ict_move): New.
5662         (nds32_indirect_call_referenced_p): New.
5663         (nds32_symbol_binds_local_p): Delete.
5664         (nds32_long_call_p): Modify.
5665         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
5666         * config/nds32/nds32-protos.h
5667         (symbolic_reference_mentioned_p): Declare.
5668         (nds32_legitimize_ict_address): Declare.
5669         (nds32_expand_ict_move): Declare.
5670         (nds32_indirect_call_referenced_p): Declare.
5671         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
5672         (nds32_relax_group): Use nds32_ict_const_p as condition.
5673         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
5674         (nds32_asm_file_start): Output ict_model directive in asm code.
5675         (nds32_legitimate_address_p): Consider indirect call.
5676         (nds32_print_operand): Consider indirect call.
5677         (nds32_print_operand_address): Consider indirect call.
5678         (nds32_insert_attributes): Handle "indirect_call" attribute.
5679         (TARGET_LEGITIMATE_ADDRESS_P): Define.
5680         (TARGET_LEGITIMATE_CONSTANT_P): Define.
5681         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
5682         (TARGET_DELEGITIMIZE_ADDRESS): Define.
5683         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
5684         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
5685         (TARGET_ICT_MODEL_SMALL): Define.
5686         (TARGET_ICT_MODEL_LARGE): Define.
5687         * config/nds32/nds32.md (movsi): Consider ict model.
5688         (call, call_value): Consider ict model.
5689         (sibcall, sibcall_value): Consider ict model.
5690         * config/nds32/nds32.opt (mict-model): New option.
5691         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
5692         model.
5694 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
5695             Monk Chiang  <sh.chiang04@gmail.com>
5696             Jim Wilson <jimw@sifive.com>
5698         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
5699         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
5700         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
5701         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
5702         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
5703         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
5704         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
5705         compute save_libcall_adjustment properly.
5706         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
5707         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
5708         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
5709         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
5710         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
5711         (ABI_SPEC): Handle mabi=ilp32e.
5712         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
5713         (RVE): Add RVE mask.
5714         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
5715         <-march>: Add rv32e as an example.
5717 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
5719         PR c++/82899
5720         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
5721         (intra_create_variable_infos): Handle C++ constructors.
5723 2018-05-18  Martin Liska  <mliska@suse.cz>
5725         * passes.def: Remove a redundant pass.
5727 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
5729         PR bootstrap/85838
5730         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
5732 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5734         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
5735         (ARMv4): Update.
5736         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
5737         (ARMv6m): Update.
5738         (armv2, armv2a, armv3, armv3m): Delete architectures.
5739         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
5740         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
5741         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
5742         Delete cpus.
5743         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
5744         (*mulsidi3adddi): Likewise.
5745         (mulsidi3): Likewise.
5746         (*mulsidi3_nov6): Likewise.
5747         (umulsidi3): Likewise.
5748         (umulsidi3_nov6): Likewise.
5749         (umaddsidi4): Likewise.
5750         (*umulsidi3adddi): Likewise.
5751         (smulsi3_highpart): Likewise.
5752         (*smulsi3_highpart_nov6): Likewise.
5753         (umulsi3_highpart): Likewise.
5754         (*umulsi3_highpart_nov6): Likewise.
5755         * config/arm/arm.h (arm_arch3m): Delete.
5756         * config/arm/arm.c (arm_arch3m): Delete.
5757         (arm_option_override_internal): Update armv3-related comment.
5758         (arm_configure_build_target): Delete use of isa_bit_mode32.
5759         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
5760         (arm_rtx_costs_internal): Delete check of arm_arch3m.
5761         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
5762         (mulsa3): Likewise.
5763         (mulusa3): Likewise.
5764         * config/arm/arm-protos.h (arm_arch3m): Delete.
5765         * config/arm/arm-tables.opt: Regenerate.
5766         * config/arm/arm-tune.md: Likewise.
5767         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
5768         deleted architectures.
5770 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5772         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
5773         (armv5t, armv5te): New features.
5774         (ARMv5, ARMv5e): Delete fgroups.
5775         (ARMv5t, ARMv5te): Adjust for above changes.
5776         (ARMv6m): Likewise.
5777         (armv5, armv5e): Delete arches.
5778         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
5779         arm_arch5.
5780         (*call_reg_arm): Likewise.
5781         (*call_value_reg_armv5): Likewise.
5782         (*call_value_reg_arm): Likewise.
5783         (*call_symbol): Likewise.
5784         (*call_value_symbol): Likewise.
5785         (*sibcall_insn): Likewise.
5786         (*sibcall_value_insn): Likewise.
5787         (clzsi2): Likewise.
5788         (prefetch): Likewise.
5789         (define_split and define_peephole2 dependent on arm_arch5):
5790         Likewise.
5791         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
5792         arm_arch5e.
5793         (TARGET_ARM_QBIT): Likewise.
5794         (TARGET_DSP_MULTIPLY): Likewise.
5795         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
5796         (arm_arch5, arm_arch5e): Delete.
5797         (arm_arch5t, arm_arch5te): Declare.
5798         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
5799         (arm_arch5t): Declare.
5800         (arm_option_reconfigure_globals): Update for the above.
5801         (arm_options_perform_arch_sanity_checks): Update comment, replace
5802         use of arm_arch5 with arm_arch5t.
5803         (use_return_insn): Likewise.
5804         (arm_emit_call_insn): Likewise.
5805         (output_return_instruction): Likewise.
5806         (arm_final_prescan_insn): Likewise.
5807         (arm_coproc_builtin_available): Likewise.
5808         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
5809         arm_arch5e with arm_arch5t and arm_arch5te.
5810         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
5811         (arm_arch5t, arm_arch5te): Declare.
5812         * config/arm/arm-tables.opt: Regenerate.
5813         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
5814         * config/arm/t-multilib: Likewise.
5815         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
5816         instead of arm_arch5.
5817         (*call_reg_thumb1): Likewise.
5818         (*call_value_reg_thumb1_v5): Likewise.
5819         (*call_value_reg_thumb1): Likewise.
5820         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
5821         unreachable path.
5822         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
5824 2018-05-18  Martin Liska  <mliska@suse.cz>
5826         PR gcov-profile/84846
5827         * doc/gcov.texi: Document -t option of gcov tool.
5829 2018-05-18  Martin Liska  <mliska@suse.cz>
5831         PR gcov-profile/84846
5832         * gcov.c (print_usage): Add new -t option.
5833         (process_args): Handle the option.
5834         (generate_results): Use stdout as output when requested by
5835         the option.
5837 2018-05-18  Martin Liska  <mliska@suse.cz>
5839         PR gcov-profile/84846
5840         * coverage.c (coverage_init): Write PWD to .gcno file.
5841         * doc/gcov.texi: Document how working directory is printed.
5842         * gcov-dump.c (dump_gcov_file): Print PWD.
5843         * gcov.c (output_intermediate_file): Likewise.
5844         (read_graph_file): Read PWD string.
5845         (output_lines): Print PWD.
5847 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5849         PR middle-end/85817
5850         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
5851         for retval and return false if all args to phi are zero.
5853 2018-05-18  Richard Biener  <rguenther@suse.de>
5855         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
5856         method.
5857         (evrp_dom_walker::before_dom_children): Call it.
5859 2018-05-18  Richard Biener  <rguenther@suse.de>
5861         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
5862         results when processing array refs with variable index.
5864 2018-05-18  Toon Moene  <toon@moene.org>
5866         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
5867         directly after that of -floop-interchange. Indicate that both
5868         options are enabled by default when specifying -O3.
5870 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5872         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
5873         iterator.  Delete separate integer-mode vec_set<mode> expander.
5874         (aarch64_simd_vec_setv2di): Delete.
5875         (vec_setv2di): Delete.
5876         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
5877         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
5878         the "w, r" alternative.
5880 2018-05-18  Martin Liska  <mliska@suse.cz>
5882         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
5883         * tree-pass.h (make_pass_lower_switch_O0): New function.
5884         * tree-switch-conversion.c (node_has_low_bound): Remove.
5885         (node_has_high_bound): Likewise.
5886         (node_is_bounded): Likewise.
5887         (class pass_lower_switch): Make it a template type and create
5888         two instances.
5889         (pass_lower_switch::execute): Add template argument.
5890         (make_pass_lower_switch): New function.
5891         (make_pass_lower_switch_O0): New function.
5892         (do_jump_if_equal): Remove.
5893         (emit_case_nodes): Simplify to just handle all 3 cases and leave
5894         all the hard work to tree optimization passes.
5896 2018-05-18  Martin Liska  <mliska@suse.cz>
5898         * dbgcnt.c (limit_low): Renamed from limit.
5899         (limit_high): New variable.
5900         (dbg_cnt_is_enabled): Check for upper limit.
5901         (dbg_cnt): Adjust dumping.
5902         (dbg_cnt_set_limit_by_index): Add new argument for high
5903         value.
5904         (dbg_cnt_set_limit_by_name): Likewise.
5905         (dbg_cnt_process_single_pair): Parse new format.
5906         (dbg_cnt_process_opt): Use strtok.
5907         (dbg_cnt_list_all_counters): Remove 'value' and add
5908         'limit_high'.
5909         * doc/invoke.texi: Document changes.
5911 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
5913         * doc/sourcebuild.texi (scalar_all_fma): Document.
5914         * tree.def (FMA_EXPR): Delete.
5915         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
5916         * internal-fn.c (ternary_direct): New macro.
5917         (expand_ternary_optab_fn): Likewise.
5918         (direct_ternary_optab_supported_p): Likewise.
5919         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
5920         * builtins.c (fold_builtin_fma): Delete.
5921         (fold_builtin_3): Don't call it.
5922         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
5923         * expr.c (expand_expr_real_2): Likewise.
5924         * fold-const.c (operand_equal_p): Likewise.
5925         (fold_ternary_loc): Likewise.
5926         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
5927         * gimple.c (DEFTREECODE): Likewise.
5928         * gimplify.c (gimplify_expr): Likewise.
5929         * optabs-tree.c (optab_for_tree_code): Likewise.
5930         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
5931         * tree-eh.c (operation_could_trap_p): Likewise.
5932         (stmt_could_throw_1_p): Likewise.
5933         * tree-inline.c (estimate_operator_cost): Likewise.
5934         * tree-pretty-print.c (dump_generic_node): Likewise.
5935         (op_code_prio): Likewise.
5936         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5937         * tree-ssa-operands.c (get_expr_operands): Likewise.
5938         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5939         * fold-const-call.h (fold_fma): Delete.
5940         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5941         CFN_FNMA and CFN_FNMS.
5942         (fold_fma): Delete.
5943         * genmatch.c (combined_fn): New enum.
5944         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5945         (commutative_op): New function.
5946         (commutate): Use it.  Handle more than 2 operands.
5947         (dt_operand::gen_gimple_expr): Use commutative_op.
5948         (parser::parse_expr): Allow :c to be used with non-binary
5949         operators if the commutative operand is known.
5950         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5951         CFN_FMS, CFN_FNMA and CFN_FNMS.
5952         (backprop::process_assign_use): Remove FMA_EXPR handling.
5953         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5954         (gen_hsa_fma): New function.
5955         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5956         IFN_FNMA and IFN_FNMS.
5957         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5958         * gimple-fold.h (follow_all_ssa_edges): Declare.
5959         * gimple-fold.c (follow_all_ssa_edges): New function.
5960         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5961         gimple_build interface and use follow_all_ssa_edges to fold the result.
5962         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5963         instead of checking for optabs directly.
5964         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5965         rather than FMA_EXPRs.
5966         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5967         call to IFN_FMA instead of an FMA_EXPR.
5969 2018-05-17  Jim Wilson  <jimw@sifive.com>
5971         * expr.c (do_tablejump): When converting index to Pmode, if we have a
5972         sign extended promoted subreg, and the range does not have the sign bit
5973         set, then do a sign extend.
5975         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5976         test, check for sign extended subreg and/or constant operands, and
5977         do a sign extend in that case.
5979 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
5981         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5982         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5983         Add untyped.
5984         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5985         Change logics_shift_reg to logics_shift_imm.
5986         (thunderx2t99_fp_loadpair_basic): Delete.
5987         (thunderx2t99_fp_storepair_basic): Delete.
5988         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5989         (thunderx2t99_asimd_polynomial): Delete.
5990         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5991         and neon_fp_mul_d_scalar_q.
5992         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5993         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5994         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5995         (thunderx2t99_asimd_lut): Add missing tbl types.
5996         (thunderx2t99_asimd_ext): Delete.
5997         (thunderx2t99_asimd_load1_1_mult): Delete.
5998         (thunderx2t99_asimd_load1_2_mult): Delete.
5999         (thunderx2t99_asimd_load1_ldp): New.
6000         (thunderx2t99_asimd_load1): New.
6001         (thunderx2t99_asimd_load2): Add missing *load2* types.
6002         (thunderx2t99_asimd_load3): New.
6003         (thunderx2t99_asimd_load4): New.
6004         (thunderx2t99_asimd_store1_1_mult): Delete.
6005         (thunderx2t99_asimd_store1_2_mult): Delete.
6006         (thunderx2t99_asimd_store2_mult): Delete.
6007         (thunderx2t99_asimd_store2_onelane): Delete.
6008         (thunderx2t99_asimd_store_stp): New.
6009         (thunderx2t99_asimd_store1): New.
6010         (thunderx2t99_asimd_store2): New.
6011         (thunderx2t99_asimd_store3): New.
6012         (thunderx2t99_asimd_store4): New.
6014 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
6016         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6017         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
6019 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
6020             Segher Boessenkool  <segher@kernel.crashing.org>
6022         PR target/85698
6023         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6024         operand.
6026 2018-05-17  Richard Biener  <rguenther@suse.de>
6028         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6029         for pruning loop and prune defs feeding only already visited PHIs.
6031 2018-05-17  Richard Biener  <rguenther@suse.de>
6033         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6035 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
6036             Richard Biener  <rguenther@suse.de>
6038         PR tree-optimization/85793
6039         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6040         for VMAT_ELEMENTWISE.
6042 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6044         * internal-fn.h (lookup_internal_fn): Declare
6045         * internal-fn.c (lookup_internal_fn): New function.
6046         * gimple.c (gimple_build_call_from_tree): Handle calls to
6047         internal functions.
6048         * gimple-pretty-print.c (dump_gimple_call): Print "." before
6049         internal function names.
6050         * tree-pretty-print.c (dump_generic_node): Likewise.
6051         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6053 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6055         * gimple-fold.h (gimple_build): Make the function forms take
6056         combined_fn rather than built_in_function.
6057         (gimple_simplify): Likewise.
6058         * gimple-match-head.c (gimple_simplify): Likewise.
6059         * gimple-fold.c (gimple_build): Likewise.
6060         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6061         rather than gimple_build_call_internal.
6062         (get_initial_defs_for_reduction): Likewise.
6063         (vect_create_epilog_for_reduction): Likewise.
6064         (vectorizable_live_operation): Likewise.
6066 2018-05-17  Martin Liska  <mliska@suse.cz>
6068         * gimple-ssa-sprintf.c (format_directive): Do not use
6069         space in between 'G_' and '('.
6071 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
6073         PR target/85323
6074         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6075         even if the mask is not all ones.
6077         PR target/85323
6078         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6079         vector.
6080         (ix86_gimple_fold_builtin): Likewise.
6082         PR target/85323
6083         * config/i386/i386.c: Include tree-vector-builder.h.
6084         (ix86_vector_shift_count): New function.
6085         (ix86_fold_builtin): Fold shift builtins by scalar count.
6086         (ix86_gimple_fold_builtin): Likewise.
6088         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6089         _mm512_setzero): New intrinsics.
6091 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
6092             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6094         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6095         code generation for cases where splatting a value is not useful.
6096         * simplify-rtx.c (simplify_ternary_operation): Simplify
6097         vec_merge across a vec_duplicate and a paradoxical subreg forming
6098         a vector mode to a vec_concat.
6100 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
6102         * config.gcc: Support "goldmont-plus".
6103         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6104         "goldmont-plus".
6105         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6106         PROCESSOR_GOLDMONT_PLUS.
6107         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6108         (processor_target_table): Add "goldmont-plus".
6109         (PTA_GOLDMONT_PLUS): Define.
6110         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6111         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6112         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6113         (fold_builtin_cpu): Add "goldmont-plus".
6114         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6115         (ix86_option_override_internal): Add "goldmont-plus".
6116         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6117         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6118         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6119         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6121 2018-05-17  Richard Biener  <rguenther@suse.de>
6123         PR tree-optimization/85757
6124         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6125         remove defs that only feed that PHI from further processing.
6127 2018-05-16  Jim Wilson  <jimw@sifive.com>
6129         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6130         asterisk to name.
6131         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6133 2018-05-16  Mark Wielaard  <mark@klomp.org>
6135         * dwarf2out.c (count_index_strings): New function.
6136         (output_indirect_strings): Call count_index_strings and generate
6137         header for dwarf_version >= 5.
6139 2018-05-16  Mark Wielaard  <mark@klomp.org>
6141         * dwarf2out.c (dwarf_FORM): New function.
6142         (set_indirect_string): Use dwarf_FORM.
6143         (reset_indirect_string): Likewise.
6144         (size_of_die): Likewise.
6145         (value_format): Likewise.
6146         (output_die): Likewise.
6147         (add_skeleton_AT_string): Likewise.
6148         (output_macinfo_op): Likewise.
6149         (index_string): Likewise.
6150         (output_index_string_offset): Likewise.
6151         (output_index_string): Likewise.
6152         (count_index_strings): Likewise.
6154 2018-05-16  Carl Love  <cel@us.ibm.com>
6156         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6157         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6159 2018-05-16  Martin Jambor  <mjambor@suse.cz>
6161         * ipa-prop.c (ipa_free_all_edge_args): Remove.
6162         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6164 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
6166         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6167         (fnma<mode>4): Likewise.
6168         (fms<mode>4): Likewise.
6169         (fnms<mode>4): Likewise.
6170         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6171         (aarch64_fnma<mode>4): Likewise.
6172         (aarch64_fms<mode>4): Likewise.
6173         (aarch64_fnms<mode>4): Likewise.
6174         (aarch64_fnmadd<mode>4): Likewise.
6176 2018-05-16  Jason Merrill  <jason@redhat.com>
6178         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
6180 2018-05-16  Richard Biener  <rguenther@suse.de>
6182         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6183         (dump_stmt_cost): Declare.
6184         (add_stmt_cost): Dump cost we add.
6185         (add_stmt_costs): New function.
6186         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6187         No longer exported.
6188         (vect_analyze_stmt): Adjust prototype.
6189         (vectorizable_condition): Likewise.
6190         (vectorizable_live_operation): Likewise.
6191         (vectorizable_reduction): Likewise.
6192         (vectorizable_induction): Likewise.
6193         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6194         cost vector to pass to vectorizable_ and record afterwards.
6195         (vect_model_reduction_cost): Take cost vector argument and adjust.
6196         (vect_model_induction_cost): Likewise.
6197         (vectorizable_reduction): Likewise.
6198         (vectorizable_induction): Likewise.
6199         (vectorizable_live_operation): Likewise.
6200         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6201         SLP_TREE_NUMBER_OF_VEC_STMTS.
6202         (vect_analyze_slp_cost_1): Remove.
6203         (vect_analyze_slp_cost): Likewise.
6204         (vect_slp_analyze_node_operations): Take visited args and
6205         a target cost vector.  Avoid processing already visited stmt sets.
6206         (vect_slp_analyze_operations): Use a local cost vector to gather
6207         costs and register those of non-discarded instances.
6208         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6209         (vect_schedule_slp_instance): Remove copying of
6210         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
6211         zero.
6212         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6213         adding cost.  Record cost entry location.
6214         (vect_prologue_cost_for_slp_op): Function to compute cost of
6215         a constant or invariant generated for SLP vect in the prologue,
6216         split out from vect_analyze_slp_cost_1.
6217         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
6218         (vect_model_promotion_demotion_cost): Likewise.
6219         (vect_model_store_cost): Likewise, make static.
6220         (vect_model_load_cost): Likewise.
6221         (vectorizable_bswap): Add cost vector arg and adjust.
6222         (vectorizable_call): Likewise.
6223         (vectorizable_simd_clone_call): Likewise.
6224         (vectorizable_conversion): Likewise.
6225         (vectorizable_assignment): Likewise.
6226         (vectorizable_shift): Likewise.
6227         (vectorizable_operation): Likewise.
6228         (vectorizable_store): Likewise.
6229         (vectorizable_load): Likewise.
6230         (vectorizable_condition): Likewise.
6231         (vectorizable_comparison): Likewise.
6232         (can_vectorize_live_stmts): Likewise.
6233         (vect_analyze_stmt): Likewise.
6234         (vect_transform_stmt): Adjust calls to vectorizable_*.
6235         * tree-vectorizer.c: Include gimple-pretty-print.h.
6236         (dump_stmt_cost): New function.
6238 2018-05-16  Richard Biener  <rguenther@suse.de>
6240         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6241         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6242         * tree-ssa-dse.c: Include tree-ssa-loop.h.
6243         (check_name): New callback.
6244         (dse_classify_store): Track cycles via a visited bitmap of PHI
6245         defs and simplify handling of in-loop and across loop dead stores
6246         and properly fail for loop-variant refs.  Handle byte-tracking with
6247         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6248         limiting the walk.
6250 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
6252         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6253         (vect_get_mask_type_for_stmt): Likewise.
6254         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6255         split out from...
6256         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
6257         to determine the statement's vector type and the vector type that
6258         should be used for calculating nunits.  Deal with cases in which
6259         the type has to be deferred.
6260         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6261         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6262         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6263         (vect_determine_vf_for_stmt): New functions, split out from...
6264         (vect_determine_vectorization_factor): ...here.
6265         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6266         (vect_get_mask_type_for_stmt): New functions, split out from
6267         vect_determine_vectorization_factor.
6269 2018-05-16  Richard Biener  <rguenther@suse.de>
6271         * tree-cfg.c (verify_gimple_assign_ternary): Properly
6272         verify the [VEC_]COND_EXPR embedded comparison.
6274 2018-05-15  Martin Sebor  <msebor@redhat.com>
6276         PR tree-optimization/85753
6277         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6278         RECORD_TYPE in addition to ARRAY_TYPE.
6280 2018-05-15  Martin Sebor  <msebor@redhat.com>
6282         PR middle-end/85643
6283         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6285 2018-05-15  Richard Biener  <rguenther@suse.de>
6287         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6288         add by_clobber_p one.  Change algorithm to collect all defs
6289         representing uses we need to walk and try reducing them to
6290         a single one before failing.
6291         (dse_dom_walker::dse_optimize_stmt): Adjust.
6293 2018-05-13  Mark Wielaard  <mark@klomp.org>
6295         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6296         (size_of_loc_descr): Likewise.
6297         (output_loc_operands): Likewise.
6298         (output_loc_operands_raw): Likewise.
6299         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6300         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6301         (hash_loc_operands): Likewise.
6302         (compare_loc_operands): Likewise.
6304 2018-05-14  Mark Wielaard  <mark@klomp.org>
6306         * dwarf2out.c (count_index_addrs): New function.
6307         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6309 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6311         PR tree-optimization/83648
6312         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6313         return value as malloc candidate.
6315 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6317         PR ipa/85734
6318         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6319         param as true in call to suggest_attribute.
6321 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
6323         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6324         -mreadonly-in-sdata.
6326 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6328         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6329         New pattern.
6330         (aarch64_crypto_aesd_fused): Likewise.
6332 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
6334         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6335         (movsi_aarch64): Likewise.
6336         (load_pairsi): Likewise.
6337         (load_pairdi): Likewise.
6338         (store_pairsi): Likewise.
6339         (store_pairdi): Likewise.
6340         (load_pairsf): Likewise.
6341         (load_pairdf): Likewise.
6342         (store_pairsf): Likewise.
6343         (store_pairdf): Likewise.
6344         (zero_extend): Likewise.
6345         (trunc): Swap alternatives.
6346         (fcvt_target): Add '?' to prefer w over r.
6348 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
6350         PR target/85756
6351         * config/i386/i386.md: Disallow non-commutative arithmetics in
6352         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6353         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
6354         in the peephole2 before it.
6356 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
6358         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6359         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6360         (ix86_handle_option): Handle -mcldemote.
6361         * config.gcc: New header.
6362         * config/i386/cldemoteintrin.h: New file.
6363         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6364         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6365         -mcldemote.
6366         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6367         OPTION_MASK_ISA_CLDEMOTE.
6368         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
6369         (ix86_valid_target_attribute_inner_p): Ditto.
6370         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
6371         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
6372         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
6373         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
6374         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
6375         (cldemote): New.
6376         * config/i386/i386.opt: Add -mcldemote.
6377         * config/i386/x86intrin.h: New header.
6378         * doc/invoke.texi: Add -mcldemote.
6380 2018-05-14  Richard Biener  <rguenther@suse.de>
6382         * doc/match-and-simplify.texi: Adjust :s documentation.
6384 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
6386         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
6387         intended memcpy size.
6388         (REORDER_45): Likewise.
6390 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
6392         * sort.cc: New file.
6393         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6394         * vec.c (qsort_chk): Use gcc_qsort.
6395         * Makefile.in (OBJS-libcommon): Add sort.o.
6396         (build/sort.o): New target.  Use it...
6397         (BUILD_RTL): ... here, and...
6398         (build/gencfn-macros): ... here, and...
6399         (build/genmatch): ... here.
6401 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6402             Chung-Ju Wu  <jasonwucj@gmail.com>
6404         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6405         * config/nds32/nds32-graywolf.md: New file.
6406         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6407         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6408         pipeline.
6409         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6410         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6411         * config/nds32/nds32.md (pipeline_model): Add graywolf.
6412         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6413         * config/nds32/pipelines.md: Include n15 settings.
6415 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6416             Chung-Ju Wu  <jasonwucj@gmail.com>
6418         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6419         * config/nds32/nds32-n13.md: New file.
6420         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6421         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6422         pipeline.
6423         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6424         * config/nds32/nds32.md (pipeline_model): Add n13.
6425         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6426         * config/nds32/pipelines.md: Include n13 settings.
6428 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6429             Chung-Ju Wu  <jasonwucj@gmail.com>
6431         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6432         * config/nds32/nds32-n10.md: New file.
6433         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6434         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6435         pipeline.
6436         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6437         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6438         * config/nds32/nds32.md (pipeline_model): Add n10.
6439         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6440         * config/nds32/pipelines.md: Include n10 settings.
6442 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
6443             Kito Cheng  <kito.cheng@gmail.com>
6444             Chung-Ju Wu  <jasonwucj@gmail.com>
6446         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6447         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6448         Add enum values for DSP extension instructions.
6449         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6450         New constraints.
6451         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6452         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6453         New code iterators.
6454         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6455         * config/nds32/nds32-dspext.md: New file for DSP implementation.
6456         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6457         * config/nds32/nds32-intrinsic.md: Likewise.
6458         * config/nds32/nds32_intrinsic.h: Likewise.
6459         * config/nds32/nds32-md-auxiliary.c: Likewise.
6460         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6461         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6462         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6463         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6464         * config/nds32/nds32-protos.h: New declarations for DSP extension.
6465         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6466         TYPE_DMAC in switch statement.
6467         * config/nds32/nds32.c: New checking and implementation for DSP
6468         extension instructions.
6469         * config/nds32/nds32.h: Likewise.
6470         * config/nds32/nds32.md: Likewise.
6471         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6472         * config/nds32/predicates.md: Implement new predicates for DSP
6473         extension.
6475 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
6477         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6478         Reformat alternatives and attributes so it is easier to identify
6479         which constraints/attributes go with which instruction.
6480         (mov<mode>_hardfloat32, FMOVE64): Likewise.
6481         (mov<mode>_softfloat32, FMOVE64): Likewise.
6482         (mov<mode>_hardfloat64, FMOVE64): Likewise.
6483         (mov<mode>_softfloat64, FMOVE64): Likewise.
6485 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6487         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6488         subsection.
6489         (Basic PowerPC Built-in Functions): The new name of the
6490         subsection previously known as "PowerPC Built-in Functions".
6491         (Basic PowerPC Built-in Functions Available on all Configurations):
6492         New subsubsection.
6493         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6494         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6495         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6496         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6498 2018-05-11  Martin Jambor  <mjambor@suse.cz>
6500         PR ipa/85655
6501         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6502         single const.
6504 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6506         PR target/85733
6507         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6509 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
6511         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6512         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6513         (ix86_handle_option): Handle -mwaitpkg.
6514         * config.gcc: New header.
6515         * config/i386/cpuid.h (bit_WAITPKG): New bit.
6516         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6517         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6518         function type.
6519         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6520         OPTION_MASK_ISA_WAITPKG.
6521         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6522         (ix86_option_override_internal): Add PTA_WAITPKG.
6523         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6524         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6525         IX86_BUILTIN_TPAUSE.
6526         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6527         __builtin_ia32_umwait and __builtin_ia32_tpause.
6528         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6529         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6530         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6531         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
6532         UNSPECV_TPAUSE): New.
6533         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
6534         * config/i386/i386.opt: Add -mwaitpkg.
6535         * config/i386/waitpkgintrin.h: New file.
6536         * config/i386/x86intrin.h: New header.
6537         * doc/invoke.texi: Add -mwaitpkg.
6539 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6541         PR target/85606
6542         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
6543         equivalent.
6544         (cortex-m0): Use armv6s-m isa.
6545         (cortex-m0plus): Likewise.
6546         (cortex-m1): Likewise.
6547         (cortex-m0.small-multiply): Likewise.
6548         (cortex-m0plus.small-multiply): Likewise.
6549         (cortex-m1.small-multiply): Likewise.
6551 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6552             Jakub Jelinek  <jakub@redhat.com>
6554         PR tree-optimization/85692
6555         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
6556         source permute as well.
6558 2018-05-11  Martin Liska  <mliska@suse.cz>
6560         PR sanitizer/85556
6561         * doc/extend.texi: Document LLVM style format for no_sanitize
6562         attribute.
6564 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
6566         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
6567         mode_supports_vsx_dform_quad to mode_supports_dq_form.
6568         (mode_supports_vsx_dform_quad): Likewise.
6569         (mode_supports_vmx_dform): Move these functions to be next to the
6570         other mode_supports functions.
6571         (mode_supports_dq_form): Likewise.
6572         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
6573         mode_supports_dq_form.
6574         (reg_offset_addressing_ok_p): Likewise.
6575         (offsettable_ok_by_alignment): Likewise.
6576         (rs6000_legitimate_offset_address_p): Likewise.
6577         (legitimate_lo_sum_address_p): Likewise.
6578         (rs6000_legitimize_address): Likewise.
6579         (rs6000_legitimize_reload_address): Likewise.
6580         (rs6000_secondary_reload_inner): Likewise.
6581         (rs6000_preferred_reload_class): Likewise.
6582         (rs6000_output_move_128bit): Likewise.
6584 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
6586         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
6587         Generate SImode target register for null target.
6588         <case IX86_BUILTIN_XGETBV>: Ditto.
6589         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
6590         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
6592 2018-05-10  Carl Love  <cel@us.ibm.com>
6594         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6595         dcbtt and dcbtstt if operands[2] is 0.
6597 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
6599         PR target/85693
6600         * config/i386/sse.md (usadv64qi): New expander.
6602 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
6604         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
6605         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
6606         -maltivec=be support.
6607         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
6608         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
6609         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
6610         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
6611         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
6612         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
6613         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
6614         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
6615         altivec_vsumsws): Adjust.
6616         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
6617         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
6618         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
6619         support.
6620         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
6621         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
6622         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
6623         (altivec_lve<VI_char>x): Delete expand.
6624         (*altivec_lve<VI_char>x_internal): Rename to...
6625         (altivec_lve<VI_char>x): ... this.
6626         (altivec_lvxl_<mode>): Delete expand.
6627         (*altivec_lvxl_<mode>_internal): Rename to ...
6628         (altivec_lvxl_<mode>): ... this.
6629         (altivec_stvxl_<mode>): Delete expand.
6630         (*altivec_stvxl_<mode>_internal): Rename to ...
6631         (altivec_stvxl_<mode>): ... this.
6632         (altivec_stve<VI_char>x): Delete expand.
6633         (*altivec_stve<VI_char>x_internal): Rename to ...
6634         (altivec_stve<VI_char>x): ... this.
6635         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
6636         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
6637         reduc_plus_scal_<mode>): Adjust.
6638         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
6639         comment.
6640         (rs6000_cpu_cpp_builtins): Adjust.
6641         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
6642         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
6643         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
6644         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
6645         -maltivec=be support.
6646         (rs6000_split_vec_extract_var): Adjust.
6647         (rs6000_split_v4si_init): Adjust.
6648         (swap_selector_for_mode): Delete.
6649         (altivec_expand_lvx_be, altivec_expand_stvx_be,
6650         altivec_expand_stvex_be): Delete.
6651         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
6652         -maltivec=be support.
6653         (rs6000_gimple_fold_builtin): Ditto.
6654         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
6655         Adjust.
6656         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
6657         (TARGET_DIRECT_MOVE_64BIT): Adjust.
6658         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
6659         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
6660         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
6661         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
6662         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
6663         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
6664         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
6665         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
6666         anonymous split): Adjust.
6667         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
6668         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
6670 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
6672         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
6673         when --with-gxx-include-dir is also specified.
6674         * configure: Regenerate.
6676 2018-05-09  Jim Wilson  <jimw@sifive.com>
6678         PR target/84797
6679         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
6680         * config/riscv/t-withmultilib: New.
6681         * config/riscv/withmultilib.h: New.
6682         * doc/install.texi: Document RISC-V --with-multilib-list support.
6684 2018-05-09  Richard Biener  <rguenther@suse.de>
6686         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
6687         vector.
6688         (vect_bb_vectorization_profitable_p): Adjust.  Compute
6689         actual scalar cost using the cost vector and the add_stmt_cost
6690         machinery.
6692 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6694         PR rtl-optimization/85645
6695         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
6696         in the REG_CFA_REGISTER note for LR, don't leave it empty.
6698 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6700         PR rtl-optimization/85645
6701         * shrink-wrap.c (spread_components): Return a boolean saying if
6702         anything was changed.
6703         (try_shrink_wrapping_separate): Iterate spread_components until
6704         nothing changes anymore.
6706 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6708         PR rtl-optimization/85645
6709         * regrename.c (build_def_use): Also kill the chains that include the
6710         destination of a REG_CFA_REGISTER note.
6712 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
6714         PR rtl-optimization/85645
6715         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
6716         insn that has a REG_CFA_REGISTER note.
6718 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
6720         * cfgexpand.c (expand_clobber): New function.
6721         (expand_gimple_stmt_1): Use it.
6722         * tree-vect-stmts.c (vect_clobber_variable): New function,
6723         split out from...
6724         (vectorizable_simd_clone_call): ...here.
6725         (vectorizable_store): Emit a clobber either side of an
6726         IFN_STORE_LANES sequence.
6727         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
6729 2018-05-09  Tom de Vries  <tom@codesourcery.com>
6731         PR target/85626
6732         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
6733         (define_insn "trap_if_false"): Add exit after trap.
6735 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
6737         PR rtl-optimization/85638
6738         * bb-reorder.c: Include common/common-target.h.
6739         (create_forwarder_block): New function extracted from...
6740         (fix_up_crossing_landing_pad): ...here.  Rename into...
6741         (dw2_fix_up_crossing_landing_pad): ...this.
6742         (sjlj_fix_up_crossing_landing_pad): New function.
6743         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
6744         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
6745         from both partitions and exit the loop after one iteration.
6747 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6749         Revert:
6750         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6751         subsection.
6752         (Basic PowerPC Built-in Functions): The new name of the
6753         subsection previously known as "PowerPC Built-in Functions".
6754         (Basic PowerPC Built-in Functions Available on all Configurations):
6755         New subsubsection.
6756         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6757         subsubsection.
6758         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6759         subsubsection.
6760         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6761         subsubsection.
6762         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6763         subsubsection.
6765 2018-05-08  Jim Wilson  <jimw@sifive.com>
6767         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
6768         (LD_EMUL_SUFFIX): New.
6769         (LINK_SPEC): Use it.
6771 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6773         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6774         subsection.
6775         (Basic PowerPC Built-in Functions): The new name of the
6776         subsection previously known as "PowerPC Built-in Functions".
6777         (Basic PowerPC Built-in Functions Available on all Configurations):
6778         New subsubsection.
6779         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6780         subsubsection.
6781         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6782         subsubsection.
6783         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6784         subsubsection.
6785         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6786         subsubsection.
6788 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
6790         PR target/85683
6791         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
6792         after cmpelim optimization.
6794 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
6796         * config.gcc: Support "goldmont".
6797         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6798         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6799         PROCESSOR_GOLDMONT.
6800         * config/i386/i386.c (m_GOLDMONT): Define.
6801         (processor_target_table): Add "goldmont".
6802         (PTA_GOLDMONT): Define.
6803         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
6804         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
6805         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
6806         (fold_builtin_cpu): Add "goldmont".
6807         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
6808         (ix86_option_override_internal): Add "goldmont".
6809         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
6810         (processor_type): Add PROCESSOR_GOLDMONT.
6811         * config/i386/i386.md: Add CPU "glm".
6812         * config/i386/glm.md: New file.
6813         * config/i386/x86-tune.def: Add m_GOLDMONT.
6814         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
6816 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
6818         PR target/85572
6819         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
6820         E_V4DImode.
6821         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
6822         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
6823         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
6825         PR target/85317
6826         * config/i386/i386.c (ix86_fold_builtin): Handle
6827         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
6829         PR target/85480
6830         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
6831         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
6833 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
6835         PR target/85658
6836         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
6837         (check_arch): Likewise.
6838         (check_fpu): Return the result rather than printing it.
6839         (end arch): Fix operator precedence.
6840         (end cpu): Likewise.
6841         (END): Print the result from check_fpu.
6843 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
6844             Alan Hayward  <alan.hayward@arm.com>
6845             David Sherwood  <david.sherwood@arm.com>
6847         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
6848         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
6849         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
6850         (*fcmuo<mode>_and): New patterns.
6852 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
6854         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
6855         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
6856         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
6857         (cmp_op, sve_imm_con): New code attributes.
6858         (SVE_COND_INT_CMP, imm_con): Delete.
6859         (cmp_op): Remove above unspecs from int attribute.
6860         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
6861         to...
6862         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
6863         comparison-specific unspecs.
6864         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
6865         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
6866         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
6867         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
6868         (*vec_fcm<cmp_op><mode>): Rename to...
6869         (*fcm<cmp_op><mode>): ...this and adjust likewise.
6870         (*vec_fcmuo<mode>): Rename to...
6871         (*fcmuo<mode>): ...this and adjust likewise.
6872         (*pred_fcm<cmp_op><mode>): New pattern.
6873         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
6874         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
6875         functions.
6876         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
6877         and UNORDERED.
6878         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
6879         (aarch64_emit_sve_predicated_cond): New function.
6880         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
6881         (aarch64_emit_unspec_cond_or): Replace with...
6882         (aarch64_emit_sve_or_conds): ...this new function.  Use
6883         aarch64_emit_sve_ptrue_op for the individual comparisons and
6884         aarch64_emit_binop to OR them together.
6885         (aarch64_emit_inverted_unspec_cond): Replace with...
6886         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
6887         aarch64_emit_sve_ptrue_op for the comparison and
6888         aarch64_emit_unop to invert the result.
6889         (aarch64_expand_sve_vec_cmp_float): Update after the above
6890         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
6892 2018-05-07  Nathan Sidwell  <nathan@acm.org>
6894         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
6895         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
6896         (Backwards Compatibility): Likewise.
6898 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6900         PR bootstrap/85681
6901         Revert:
6902         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6904         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6905         <prefetch_dynamic_strides>: New const bool field.
6906         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6907         prefetch_dynamic_strides.
6908         (exynosm1_prefetch_tune): Likewise.
6909         (thunderxt88_prefetch_tune): Likewise.
6910         (thunderx_prefetch_tune): Likewise.
6911         (thunderx2t99_prefetch_tune): Likewise.
6912         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6913         to false.
6914         (aarch64_override_options_internal): Update to set
6915         PARAM_PREFETCH_DYNAMIC_STRIDES.
6916         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6917         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6918         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6919         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6920         prefetch-dynamic-strides setting.
6922         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6924         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6925         <minimum_stride>: New const int field.
6926         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6927         minimum_stride field.
6928         (exynosm1_prefetch_tune): Likewise.
6929         (thunderxt88_prefetch_tune): Likewise.
6930         (thunderx_prefetch_tune): Likewise.
6931         (thunderx2t99_prefetch_tune): Likewise.
6932         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6933         (aarch64_override_options_internal): Update to set
6934         PARAM_PREFETCH_MINIMUM_STRIDE.
6935         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6936         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6937         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6938         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6939         stride is constant and is below the minimum stride threshold.
6941 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6943         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6944         to 512.
6946 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6948         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6949         <prefetch_dynamic_strides>: New const bool field.
6950         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6951         prefetch_dynamic_strides.
6952         (exynosm1_prefetch_tune): Likewise.
6953         (thunderxt88_prefetch_tune): Likewise.
6954         (thunderx_prefetch_tune): Likewise.
6955         (thunderx2t99_prefetch_tune): Likewise.
6956         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6957         to false.
6958         (aarch64_override_options_internal): Update to set
6959         PARAM_PREFETCH_DYNAMIC_STRIDES.
6960         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6961         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6962         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6963         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6964         prefetch-dynamic-strides setting.
6966 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6968         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6969         <minimum_stride>: New const int field.
6970         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6971         minimum_stride field.
6972         (exynosm1_prefetch_tune): Likewise.
6973         (thunderxt88_prefetch_tune): Likewise.
6974         (thunderx_prefetch_tune): Likewise.
6975         (thunderx2t99_prefetch_tune): Likewise.
6976         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6977         (aarch64_override_options_internal): Update to set
6978         PARAM_PREFETCH_MINIMUM_STRIDE.
6979         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6980         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6981         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6982         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6983         stride is constant and is below the minimum stride threshold.
6985 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
6987         PR c++/85659
6988         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6989         the type is addressable.  Don't force op into register if it has
6990         BLKmode.
6992 2018-05-05  Roland McGrath  <mcgrathr@google.com>
6994         PR other/77609
6995         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6996         any section for which we don't know a specific type it should have,
6997         regardless of name.  Previously this was done only for the exact
6998         names ".init_array", ".fini_array", and ".preinit_array".
6999         (default_elf_asm_named_section): Add comment about
7000         relationship with default_section_type_flags and SECTION_NOTYPE.
7001         (get_section): Don't consider it a type conflict if one side has
7002         SECTION_NOTYPE and the other doesn't, as long as neither has the
7003         SECTION_BSS et al used in the default_section_type_flags logic.
7005 2018-05-05  Tom de Vries  <tom@codesourcery.com>
7007         PR target/85653
7008         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7009         (workaround_barsyncs): New function.
7010         (nvptx_reorg): Use workaround_barsyncs.
7011         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7012         (define_expand "nvptx_membar_cta"): New define_expand.
7013         (define_insn "*nvptx_membar_cta"): New insn.
7015 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
7017         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7018         To improve optimization opportunities.
7019         * builtin-types.def: The new needed builtin types for the above.
7021 2018-05-04  Richard Biener  <rguenther@suse.de>
7023         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7024         * gimple-ssa-store-merging.c
7025         (imm_store_chain_info::output_merged_store): Remove redundant create,
7026         release split_store vector contents on failure.
7027         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7028         scalar stmt vector on cache hit.
7030 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
7032         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7033         Xilinx FP support.
7034         * config.gcc (powerpc-xilinx-eabi*): Remove.
7035         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7036         support.
7037         (fusion_addis_mem_combo_load): Ditto.
7038         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7039         FP support.
7040         (rs6000_cpu_cpp_builtins): Ditto.
7041         * config/rs6000/rs6000-linux.c
7042         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7043         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7044         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7045         support.
7046         (rs6000_setup_reg_addr_masks): Ditto.
7047         (rs6000_init_hard_regno_mode_ok): Ditto.
7048         (rs6000_option_override_internal): Ditto.
7049         (legitimate_lo_sum_address_p): Ditto.
7050         (rs6000_legitimize_address): Ditto.
7051         (rs6000_legitimize_reload_address): Ditto.
7052         (rs6000_legitimate_address_p): Ditto.
7053         (abi_v4_pass_in_fpr): Ditto.
7054         (setup_incoming_varargs): Ditto.
7055         (rs6000_gimplify_va_arg): Ditto.
7056         (rs6000_split_multireg_move): Ditto.
7057         (rs6000_savres_strategy): Ditto.
7058         (rs6000_emit_prologue_components): Ditto.
7059         (rs6000_emit_epilogue_components): Ditto.
7060         (rs6000_emit_prologue): Ditto.
7061         (rs6000_emit_epilogue): Ditto.
7062         (rs6000_elf_file_end): Ditto.
7063         (rs6000_function_value): Ditto.
7064         (rs6000_libcall_value): Ditto.
7065         * config/rs6000/rs6000.h: Ditto.
7066         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7067         (TARGET_MINMAX): ... this.  New.
7068         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7069         * config/rs6000/rs6000.md: Remove Xilinx FP support.
7070         (*movsi_internal1_single): Delete.
7071         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7072         mfpu=, mxilinx-fpu): Delete.
7073         * config/rs6000/singlefp.h: Delete.
7074         * config/rs6000/sysv4.h: Remove Xilinx FP support.
7075         * config/rs6000/t-rs6000: Ditto.
7076         * config/rs6000/t-xilinx: Delete.
7077         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7078         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7079         (VStype_simple): Delete.
7080         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7081         * config/rs6000/xfpu.h: Delete.
7082         * config/rs6000/xfpu.md: Delete.
7083         * config/rs6000/xilinx.h: Delete.
7084         * config/rs6000/xilinx.opt: Delete.
7085         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7086         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7088 2018-05-04  Tom de Vries  <tom@codesourcery.com>
7090         PR libgomp/85639
7091         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7092         if ignore == 0.
7094 2018-05-04  Richard Biener  <rguenther@suse.de>
7096         PR middle-end/85627
7097         * tree-complex.c (update_complex_assignment): We are always in SSA form.
7098         (expand_complex_div_wide): Likewise.
7099         (expand_complex_operations_1): Likewise.
7100         (expand_complex_libcall): Preserve EH info of the original stmt.
7101         (tree_lower_complex): Handle removed blocks.
7102         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7103         on complex multiplication and division libcall builtins.
7105 2018-05-04  Richard Biener  <rguenther@suse.de>
7107         PR middle-end/85574
7108         * fold-const.c (negate_expr_p): Restrict negation of operand
7109         zero of a division to when we know that can happen without
7110         overflow.
7111         (fold_negate_expr_1): Likewise.
7113 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
7115         PR libstdc++/85466
7116         * real.h (real_nextafter): Declare.
7117         * real.c (real_nextafter): New function.
7118         * fold-const-call.c (fold_const_nextafter): New function.
7119         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7120         CASE_CFN_NEXTTOWARD.
7121         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7122         even when arg1_mode is different from arg0_mode.
7124 2018-05-03  Nathan Sidwell  <nathan@acm.org>
7126         * doc/extend.texi (Deprecated Features): Remove
7127         -ffriend-injection.
7128         (Backwards Compatibility): Likewise.
7129         * doc/invoke.texi (C++ Language Options): Likewise.
7130         (C++ Dialect Options): Likewise.
7132 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
7134         PR target/85530
7135         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7136         _mm512_mask_mullox_epi64): New intrinsics.
7138 2018-05-03  Tom de Vries  <tom@codesourcery.com>
7140         PR testsuite/85106
7141         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7142         dump files): Add offload-tree.
7144 2018-05-03  Richard Biener  <rguenther@suse.de>
7146         PR tree-optimization/85615
7147         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7148         to loops not nested in BBs loop father to avoid creating multi-entry
7149         loops.
7151 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7153         PR tree-optimization/70291
7154         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7155         arguments.  Change return type to tree.  Emit libcall as a new
7156         statement rather than replacing existing one when inplace_p is true.
7157         (expand_complex_multiplication_components): New function.
7158         (expand_complex_multiplication): Expand floating-point complex
7159         multiplication using the above.
7160         (expand_complex_division): Rename inner_type parameter to type.
7161         Update expand_complex_libcall call-site.
7162         (expand_complex_operations_1): Update expand_complex_multiplication
7163         and expand_complex_division call-sites.
7165 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7167         PR target/85582
7168         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7169         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7170         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7171         the highest significant bit of the shift count mask is clear.  In
7172         check whether and[sq]i3 is needed verify that all significant bits
7173         of the shift count other than the highest are set.
7175 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7177         PR libgomp/82428
7178         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7179         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7180         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7181         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7182         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7183         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7184         __builtin_goacc_parlevel_size.
7186 2018-05-02  Richard Biener  <rguenther@suse.de>
7188         PR tree-optimization/85597
7189         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7190         do not use split vect_get_vec_defs call but call vect_get_slp_defs
7191         directly.
7193 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7195         PR testsuite/85106
7196         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7197         dump files): Add ltrans-tree.
7199 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7201         PR testsuite/85106
7202         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7203         dump files): Add wpa-ipa.
7205 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
7207         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
7208         powerpc*-*-linux*paired* target.
7209         * config/rs6000/750cl.h: Delete.
7210         * config/rs6000/paired.h: Delete.
7211         * config/rs6000/paired.md: Delete.
7212         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7213         float support.
7214         * config/rs6000/rs6000-builtin.def: Remove paired float support.
7215         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7216         comment.  Remove paired float support.
7217         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7218         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7219         VECTOR_PAIRED.
7220         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7221         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7222         declarations.
7223         * config/rs6000/rs6000.c: Remove paired float support.
7224         (paired_expand_vector_init, paired_expand_vector_move,
7225         paired_emit_vector_compare, paired_emit_vector_cond_expr,
7226         (paired_expand_lv_builtin, paired_expand_stv_builtin,
7227         paired_expand_builtin, paired_expand_predicate_builtin,
7228         paired_init_builtins): Delete.
7229         * config/rs6000/rs6000.h: Remove paired float support.
7230         * config/rs6000/rs6000.md: Remove paired float support.
7231         (move_from_CR_ov_bit): Delete.
7232         * config/rs6000/rs6000.opt (mpaired): Delete.
7233         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7234         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7236 2018-05-02  Richard Biener  <rguenther@suse.de>
7238         PR middle-end/85567
7239         * gimplify.c (gimplify_save_expr): When in SSA form allow
7240         SAVE_EXPRs to compute to SSA vars.
7242 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7244         PR target/85582
7245         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7246         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7247         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7248         clobber operands[2], instead use a new pseudo.  Formatting fixes.
7250 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
7252         PR tree-optimization/85586
7253         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7254         exit early for statements in the same group if the accesses are
7255         not strided.
7257 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7259         PR lto/85451
7260         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7261         error message.
7263 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
7265         PR tree-optimization/85143
7266         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7268 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7270         PR lto/85451
7271         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7272         not found" error message.
7274 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7276         PR other/83786
7277         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7278         * vec.c (test_ordered_remove_if): New function.
7279         (vec_c_tests): Call test_ordered_remove_if.
7280         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7281         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7282         * tree-vect-patterns.c (vect_pattern_recog_1): Use
7283         VEC_ORDERED_REMOVE_IF.
7285 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7287         PR tree-optimization/82665
7288         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7289         pointer subtraction where arguments come from a memchr call.
7291 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
7293         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7294         --push-state --as-needed and --pop-state instead of --as-needed and
7295         --no-as-needed if ld supports it.
7296         * configure: Regenerated.
7298         PR web/85578
7299         * doc/install.texi2html: Replace _002d with - and _002a with * in
7300         generated html files using sed.
7302 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7304         PR c++/85523
7305         * gcc-rich-location.c (blank_line_before_p): New function.
7306         (use_new_line): New function.
7307         (gcc_rich_location::add_fixit_insert_formatted): New function.
7308         * gcc-rich-location.h
7309         (gcc_rich_location::add_fixit_insert_formatted): New function.
7311 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7313         * selftest.c (assert_streq): Rename "expected" and "actual" to
7314         "val1" and "val2".  Extend NULL-handling to cover both inputs
7315         symmetrically, while still requiring both to be non-NULL for a pass.
7316         * selftest.h (assert_streq): Rename "expected" and "actual" to
7317         "val1" and "val2".
7318         (ASSERT_EQ): Likewise.
7319         (ASSERT_EQ_AT): Likewise.
7320         (ASSERT_KNOWN_EQ): Likewise.
7321         (ASSERT_KNOWN_EQ_AT): Likewise.
7322         (ASSERT_NE): Likewise.
7323         (ASSERT_MAYBE_NE): Likewise.
7324         (ASSERT_MAYBE_NE_AT): Likewise.
7325         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
7326         the assertion to pass.
7327         (ASSERT_STREQ_AT): Likewise.
7329 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7331         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7332         interaction with -pie.
7334 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7336         * selftest.h: Fix alphabetization of per-source-file selftest
7337         declarations.
7339 2018-04-30  Jason Merrill  <jason@redhat.com>
7341         PR c++/61982 - dead stores to destroyed objects.
7342         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7343         of clobber.
7345 2018-04-30  Jason Merrill  <jason@redhat.com>
7347         * tree.c (build_clobber): New.
7348         * tree.h: Declare it.
7349         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7351 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7353         * diagnostic-show-locus.c (layout::layout): Update for
7354         location_get_source_line returning a char_span.
7355         (struct char_span): Move to input.h.
7356         (struct correction): Update for fields in char_span becoming
7357         private.
7358         (struct source_line): Update for location_get_source_line
7359         returning a char_span.
7360         (layout::print_line): Likewise.
7361         * edit-context.c (edited_file::print_content): Likewise.
7362         (edited_file::print_diff_hunk): Likewise.
7363         (edited_file::print_run_of_changed_lines): Likewise.
7364         (edited_file::get_num_lines): Likewise.
7365         (edited_line::edited_line): Likewise.
7366         * final.c (asm_show_source): Likewise.
7367         * input.c (location_get_source_line): Convert return type
7368         from const char * to char_span, losing the final "line_len"
7369         param.
7370         (dump_location_info): Update for the above.
7371         (get_substring_ranges_for_loc): Likewise.  Use a char_span
7372         when handling the literal within the line.
7373         (test_reading_source_line): Update for location_get_source_line
7374         returning a char_span.
7375         * input.h (class char_span): Move here from
7376         diagnostic-show-locus.c, converting from a struct to a class.
7377         Make data members private.
7378         (char_span::operator bool): New.
7379         (char_span::length): New.
7380         (char_span::get_buffer): New.
7381         (char_span::operator[]): New.
7382         (char_span::subspan): Make const.
7383         (char_span::xstrdup): New.
7384         (location_get_source_line): Convert return type from const char *
7385         to char_span, losing the final "line_size" param.
7387 2018-04-30  Jan Hubicka  <jh@suse.cz>
7389         * lto-wrapper.c (ltrans_priorities): New static var.
7390         (cmp_priority): New.
7391         (run_gcc): Read priorities and if doing parallel build order
7392         the Makefile by them.
7394 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7396         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7398 2018-04-30  Richard Biener  <rguenther@suse.de>
7400         * tree-cfg.c (verify_address): Remove base argument, add
7401         flag whether to check TREE_ADDRESSABLE and do that.
7402         (verify_expr): Remove.
7403         (verify_types_in_gimple_reference): Add pieces from verify_expr.
7404         (verify_gimple_assign_single): Likewise.
7405         (verify_gimple_switch): Likewise.
7406         (verify_expr_location_1): Dereference tp once.  Add (disabled)
7407         piece from verify_expr.
7408         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7410 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7412         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7414 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7416         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7417         (small_data_pattern): Likewise.
7418         (arc_rewrite_small_data): Likewise.
7419         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7420         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7421         (get_symbol_alignment): New function.
7422         (legitimate_small_data_address_p): Likewise.
7423         (legitimate_scaled_address): Update, call
7424         legitimate_small_data_address_p.
7425         (output_sdata): New static variable.
7426         (arc_print_operand): Update how we handle small data operands.
7427         (arc_print_operand_address): Likewise.
7428         (arc_legitimate_address_p): Update, use
7429         legitimate_small_data_address_p.
7430         (arc_rewrite_small_data_p): Remove.
7431         (arc_rewrite_small_data_1): Likewise.
7432         (arc_rewrite_small_data): Likewise.
7433         (small_data_pattern): Likewise.
7434         (compact_sda_memory_operand): Update to use
7435         legitimate_small_data_address_p and get_symbol_alignment.
7436         (prepare_move_operands): Don't rewite sdata pattern.
7437         (prepare_extend_operands): Remove.
7438         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7439         pattern.
7440         (zero_extendqisi2): Likewise.
7441         (zero_extendhisi2): Likewise.
7442         (extendqihi2): Likewise.
7443         (extendqisi2): Likewise.
7444         (extendhisi2): Likewise.
7445         (addsi3): Likewise.
7446         (subsi3): Likewise.
7447         (andsi3): Likewise.
7448         * config/arc/constraints.md (Usd): Change it to memory constraint.
7450 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7452         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7453         as source of std instructions.
7454         * config/arc/arc.md (movsi_insn): Update pattern predicate to
7455         allow 6-bit constants as source for store instructions.
7456         (movdi_insn): Update instruction pattern to allow 6-bit constants
7457         as source for store instructions.
7459 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7461         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7463 2018-04-30  Nathan Sidwell  <nathan@acm.org>
7464             Sandra Loosemore <sandra@codesourcery.com>
7466         * dumpfile.c (dump_open): Allow '-' for stdout.
7467         * doc/invoke.texi (Developer Options): Document dump filename
7468         determination early.  Document stdin/stdout selection.
7470 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
7472         Microblaze Target: PIC data text relative
7474         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7475         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7476         Add declaration.
7477         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7478         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7479         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7480         New addressing mode for data-text relative position indepenedent code.
7481         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7482         'ADDRESS_SYMBOLIC_TXT_REL'.
7483         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7484         (microblaze_legitimate_pic_operand): Exclude function calls from
7485         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7486         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7487         addresses cases.
7488         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7489         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7490         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7491         for 'address + offset'.
7492         (microblaze_expand_prologue): Add new function prologue call for
7493         'r20' assignation.
7494         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7495         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7496         table in case of TARGET_PIC_DATA_TEXT_REL.
7497         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7498         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7499         Add new macros 'UNSPEC_TEXT',
7500         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7501         + exclude function calls from 'UNSPEC_PLT' in case of data text
7502         relative mode.
7503         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7504         new target hook for generating address diff vector tables in case of
7505         flag_pic.
7506         * doc/tm.texi : Regenerate.
7507         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7508         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7509         of addr diff vector generation.
7510         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7511         target hook definition.
7512         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7513         Add default function for generate_pic_addr_diff_vec -> flag_pic.
7514         * doc/invoke.texi (Add new pic option): Add new microblaze pic
7515         option for data text relative.
7517 2018-04-30  Richard Biener  <rguenther@suse.de>
7519         * tree-chrec.h (evolution_function_is_constant_p): Remove
7520         redundant check.
7521         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7523 2018-04-30  Richard Biener  <rguenther@suse.de>
7525         PR bootstrap/85571
7526         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7528 2018-04-30  Richard Biener  <rguenther@suse.de>
7530         PR tree-optimization/28364
7531         PR tree-optimization/85275
7532         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
7533         copying first exit test.
7535 2018-04-28  Mark Wielaard  <mark@klomp.org>
7537         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
7538         dwarf_version >= 5.
7539         (dwarf_AT): Handle DW_AT_addr_base.
7540         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
7542 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
7544         PR target/84431
7545         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
7546         (*ashl<dwi>3_doubleword_mask_1): Ditto.
7547         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
7548         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
7550 2018-04-28  Richard Biener  <rguenther@suse.de>
7552         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
7553         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
7554         to reflect use.  Only add interesting stmts.
7556 2018-04-27  Martin Jambor  <mjambor@suse.cz>
7558         PR ipa/85549
7559         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
7560         the jump function allows for passing through aggregate values.
7562 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
7564         * input.h (in_system_header_at): Convert from macro to inline
7565         function.
7566         (from_macro_expansion_at): Likewise.
7567         (from_macro_definition_at): Likewise.
7569 2018-04-27  Jeff Law  <law@redhat.com>
7571         * config.gcc: Mark tile* targets as deprecated/obsolete.
7573 2018-04-27  Richard Biener  <rguenther@suse.de>
7575         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
7576         fix for ILP32.
7578 2018-04-27  Richard Biener  <rguenther@suse.de>
7580         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
7582 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
7584         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
7585         with Yd constraint. Set "preferred_for_speed" attribute from
7586         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
7587         with Yd constraint.
7588         (*movdi_internal): Ditto.
7589         (movti_interunit splitters): Remove
7590         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
7591         (movdi_interunit splitters): Ditto.
7592         * config/i386/constraints.md (Ye): Remove.
7593         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
7595 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7597         PR target/85512
7598         * config/aarch64/constraints.md (Usg): Limit to 31.
7599         (Usj): Limit to 63.
7601 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
7603         PR tree-optimization/85529
7604         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
7605         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
7606         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
7607         zero extension or masking of the MSB bit.
7608         (optimize_range_tests): Add FIRST_BB argument, pass it through
7609         to optimize_range_tests_var_bound.
7610         (maybe_optimize_range_tests, reassociate_bb): Adjust
7611         optimize_range_tests callers.
7613 2018-04-26  Richard Biener  <rguenther@suse.de>
7614             Jakub Jelinek  <jakub@redhat.com>
7616         * cgraph.h (symbol_table): Just declare debug method here.
7617         * symtab.c (symbol_table::debug): Define.
7619 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
7621         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
7623 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
7625         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
7626         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
7627         (*movdi_internal): Substitute Yi and Yj constraint with x
7628         and Ym and Yn constraint with y constraint.  Update "isa"
7629         attribute and set "preferred_for_speed" attribute from
7630         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
7631         (*movsi_internal): Ditto.
7632         (*movdf_internal): Ditto.
7633         (*movsf_internal): Ditto.
7634         (*zero_extendsidi2): Ditto.
7635         * config/i386/sse.md (vec_set<mode>_0): Ditto.
7636         (sse2_loadld): Ditto.
7637         (*vec_extract<ssevecmodelower>_0): Ditto.
7638         (*vec_extractv4si_0_zext_sse4): Ditto.
7639         (vec_concatv2di): Ditto.
7640         (*vec_dup<mode>): Ditto.
7641         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
7642         * config/i386/constraints.md (Yi): Remove.
7643         (Yj): Remove.
7644         (Ym): Remove.
7645         (Yn): Remove.
7647 2018-04-26  Nathan Sidwell  <nathan@acm.org>
7649         * dumpfile.c (dump_open): New.
7650         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
7651         (dump_finish): Detect stdio/stderr by value not name.
7653 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
7655         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
7657 2018-04-26  Tom de Vries  <tom@codesourcery.com>
7659         PR target/84952
7660         * config/nvptx/nvptx.c (verify_neutering_jumps)
7661         (verify_neutering_labels): New function
7662         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
7664 2018-04-26  Tom de Vries  <tom@codesourcery.com>
7666         PR target/84025
7667         * config/nvptx/nvptx.c (needs_neutering_p): New function.
7668         (nvptx_single): Use needs_neutering_p to skip over insns that do not
7669         need neutering.
7671 2018-04-26  Richard Biener <rguenther@suse.de>
7672             Tom de Vries  <tom@codesourcery.com>
7674         PR lto/85422
7675         * lto-streamer-out.c (output_function): Fixup loops if required to match
7676         discovery done in the reader.
7678 2018-04-26  Richard Biener  <rguenther@suse.de>
7680         PR tree-optimization/85116
7681         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
7682         have a loop exit from the single latch predecessor.  Remove
7683         case of header with just condition.
7684         (ch_base::copy_headers): Exclude infinite loops from any
7685         processing.
7686         (pass_ch::execute): Record exits.
7688 2018-04-26  Richard Biener  <rguenther@suse.de>
7690         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
7691         prologue cost vector and pass it to vect_get_load_cost.
7692         (vect_get_peeling_costs_all_drs): Likewise.
7693         (vect_peeling_hash_get_lowest_cost): Likewise.
7694         (vect_enhance_data_refs_alignment): Likewise.
7696 2018-04-26  Richard Biener  <rguenther@suse.de>
7698         PR middle-end/85450
7699         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
7700         checking of integer<->pointer conversions.
7701         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
7702         sign-/zero-extending pointer types.
7703         (expand_omp_for_static_chunk): Likewise.
7705 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
7706             Jean Lee  <xiaoyur347@gmail.com>
7708         * config/mips/mips.c (mips_asan_shadow_offset): New function.
7709         (TARGET_ASAN_SHADOW_OFFSET): Define.
7710         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
7711         true for -fsanitize=address.
7713 2018-04-25  Mark Wielaard  <mark@klomp.org>
7715         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
7716         shorter ones.
7718 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
7720         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
7721         than "alu", remove explicit "memory" and "imm_disp" attributes.
7722         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
7724         PR middle-end/85414
7725         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
7726         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
7727         gen_lowpart_no_emit.
7729 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
7731         PR target/85473
7732         * config/i386/i386.c (ix86_expand_builtin): Change memory
7733         operand to XI, extend p0 to Pmode.
7734         * config/i386/i386.md: Change unspec volatile and operand
7735         1 mode to XI, change operand 0 mode to P.
7737 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7739         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
7740         GET_MODE_MASK before any checking.
7741         (nds32_can_use_bset_p): Likewise.
7742         (nds32_can_use_btgl_p): Likewise.
7744 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7746         * config/nds32/nds32-doubleword.md: New define_split pattern for
7747         illegal register number.
7749 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7751         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
7753 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
7755         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
7757 2018-04-25  Richard Biener  <rguenther@suse.de>
7759         * lto-streamer.h (LTO_major_version): Bump to 8.
7761 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
7763         * BASE-VER: Set to 9.0.0.
7765 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
7767         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
7768         in __abskf2 and __powikf2.
7770 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7772         PR target/85512
7773         * config/aarch64/constraints.md (Usg, Usj): New constraints.
7774         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
7775         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
7776         Use the above on operand 2.  Reindent.
7777         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
7779 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
7781         PR target/85485
7782         * common/config/i386/i386-common.c (ix86_handle_option): Don't
7783         handle OPT_mcet.
7784         * config/i386/i386.opt (mcet): Removed.
7785         * doc/install.texi: Remove -mcet documentation.
7786         * doc/invoke.texi: Likewise.
7788 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
7790         PR target/85485
7791         * doc/install.texi: Remove -mcet from bootstrap-cet.
7793 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7795         PR target/85511
7796         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
7797         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
7798         if TARGET_64BIT.
7800         PR target/85503
7801         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
7802         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
7803         containing a CONST_VECTOR.
7805 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
7807         * doc/install.texi: Update newlib dependency for nvptx.
7809 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7811         PR target/85508
7812         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
7813         instead of INTVAL when shifting x left.
7815 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
7817         PR tree-optimization/85478
7818         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
7819         vect_grouped_store_supported for single element vectors.
7821 2018-04-24  Richard Biener  <rguenther@suse.de>
7823         PR target/85491
7824         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
7825         load cost increase to the case of non-constant step.
7827 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
7829         PR target/84828
7830         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
7831         destination if any_malformed_asm.
7833 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
7835         PR middle-end/85496
7836         * expr.c (store_field): In the bitfield case, if the value comes from
7837         a function call and is returned in registers by means of a PARALLEL,
7838         do not change the mode of the temporary unless BLKmode and VOIDmode.
7840 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
7842         PR rtl-optimization/85423
7843         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
7844         dependencies to debug insns when the previous insn is non-debug.
7846 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
7848         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
7849         enums into a single definition.
7850         (fls): Fix predicates and printing.
7851         (seti): Likewise.
7853 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
7855         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
7856         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
7857         and short u6 immediate.
7858         (check_if_valid_sleep_operand): Remove.
7859         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
7861 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7863         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
7864         flag_always_save_lp condition.
7865         * config/nds32/nds32.opt (malways-save-lp): New option.
7867 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7869         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
7870         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
7871         * config/nds32/nds32.h
7872         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
7873         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
7875 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7877         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
7878         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
7880 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
7881             Chung-Ju Wu  <jasonwucj@gmail.com>
7883         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
7884         Declare.
7885         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
7886         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
7888 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7890         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
7892 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7894         * config/nds32/nds32-protos.h (nds32_data_alignment,
7895         nds32_local_alignment): Declare.
7896         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
7897         nds32_local_alignment): New functions.
7898         (TARGET_CONSTANT_ALIGNMENT): Define.
7899         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
7901 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7903         * config/nds32/nds32.c
7904         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
7905         (TARGET_MODES_TIEABLE_P): Likewise.
7907 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7909         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
7910         level Ofast and Og.
7912 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
7913             Chung-Ju Wu  <jasonwucj@gmail.com>
7915         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7916         for unaligned access.
7917         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7918         unaligned access.
7919         * config/nds32/nds32-intrinsic.md: Likewise.
7920         * config/nds32/nds32_intrinsic.h: Likewise.
7921         * config/nds32/nds32.h (nds32_builtins): Likewise.
7922         * config/nds32/nds32.opt (munaligned-access): New option.
7923         * config/nds32/nds32.c (nds32_asm_file_start): Display
7924         flag_unaligned_access status.
7926 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7928         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
7929         -mno-relax is present.
7930         * config/riscv/linux.h (LINK_SPEC): Ditto.
7932 2018-04-20  Martin Sebor  <msebor@redhat.com>
7934         PR c/85365
7935         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7936         for null pointers.
7937         (gimple_fold_builtin_stxcpy_chk): Same.
7938         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7940 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
7942         PR target/85456
7943         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7944         __powikf2 when long double is IEEE 128-bit.
7946 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7948         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7949         step to make sure stack always aligned.
7951 2018-04-20  Carl Love  <cel@us.ibm.com>
7953         PR target/83402
7954         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7955         size check for arg0.
7957 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7958             Tom de Vries  <tom@codesourcery.com>
7960         PR target/85445
7961         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7962         Emit insns for calls too.
7963         (nvptx_find_par): Always look for worker-level predecessor insn.
7964         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
7965         calls.
7966         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7967         (nvptx_process_pars): Propagate frames for calls.
7969 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
7971         PR target/85469
7972         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7973         Removed.
7974         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7975         (ix86_handle_option): Don't handle OPT_mibt.
7976         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7977         __SHSTK__.
7978         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7979         has_ibt and ibt.
7980         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7981         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7982         (ix86_target_macros): Define __CET__ with flag_cf_protection
7983         for -fcf-protection.
7984         * config/i386/i386.c (isa2_opts): Remove -mibt.
7985         * config/i386/i386.h (TARGET_IBT): Removed.
7986         (TARGET_IBT_P): Likewise.
7987         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7988         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7989         * config/i386/i386.opt (mcet): Update help message.
7990         (mshstk): Likewise.
7991         (mibt): Removed.
7992         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
7993         -mcet as an alias for -mshstk.
7995 2018-04-20  Richard Biener <rguenther@suse.de>
7997         PR middle-end/85475
7998         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7999         complexity by forcing a single use of the multiply operand.
8001 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8003         ipa/85449
8004         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8005         recursion dependency to only apply to non-clones.
8007 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8009         ipa/85447
8010         * ipa-cp.c (create_specialized_node): Check that clones of
8011         self-recursive edges exist during IPA-CP.
8013 2018-04-19  Toon Moene  <toon@moene.org>
8015         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8016         by -O3.
8018 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8020         PR tree-optimization/85467
8021         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8022         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
8023         VECTOR_CST element to type.
8025 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8027         PR target/85397
8028         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8029         * config/i386/i386.md (builtin_setjmp_setup): Removed.
8030         (builtin_longjmp): Likewise.
8031         (save_stack_nonlocal): New pattern.
8032         (restore_stack_nonlocal): Likewise.
8034 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8036         PR target/85404
8037         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8038         Replace ASM_OUTPUT_LABEL with fprintf.
8040 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8042         PR target/85417
8043         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8044         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8045         * config/i386/i386-c.c (ix86_target_macros_internal): Also
8046         define __IBT__ and __SHSTK__ for -fcf-protection.
8047         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8048         TARGET_IBT.
8049         (ix86_trampoline_init): Likewise.
8050         (x86_output_mi_thunk): Likewise.
8051         (ix86_notrack_prefixed_insn_p): Likewise.
8052         (ix86_option_override_internal): Don't disallow -fcf-protection.
8053         * config/i386/i386.md (rdssp<mode>): Also enable for
8054         -fcf-protection.
8055         (incssp<mode>): Likewise.
8056         (nop_endbr): Likewise.
8057         * config/i386/i386.opt (mcet): Change help message to built-in
8058         functions only.
8059         (mibt): Likewise.
8060         (mshstk): Likewise.
8061         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8062         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
8063         enable CET built-in functions.
8065 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
8067         * common/config/i386/i386-common.c
8068         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8069         OPTION_MASK_ISA_MOVDIRI_UNSET,
8070         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8071         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8072         * config.gcc (movdirintrin.h): New header.
8073         * config/i386/cpuid.h (bit_MOVDIRI,
8074         bit_MOVDIR64B): New bits.
8075         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8076         and -mmvodir64b.
8077         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8078         (VOID, PVOID, PCVOID)): New function types.
8079         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8080         __builtin_ia32_directstoreu_u64,
8081         __builtin_ia32_movdir64b): New builtins.
8082         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8083         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8084         and -mmovdiri.
8085         (ix86_valid_target_attribute_inner_p): Ditto.
8086         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8087         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8088         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8089         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8090         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8091         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8092         (movdiri<mode>, movdir64b_<mode>): New.
8093         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8094         * config/i386/immintrin.h: Include movdirintrin.h.
8095         * config/i386/movdirintrin.h: New file.
8096         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8098 2018-04-19  Richard Biener  <rguenther@suse.de>
8100         PR middle-end/85455
8101         * cfg.c (clear_bb_flags): When loop state says we have
8102         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8104 2018-04-19  Richard Biener  <rguenther@suse.de>
8106         PR tree-optimization/84737
8107         * tree-vect-data-refs.c (vect_copy_ref_info): New function
8108         copying restrict info.
8109         (vect_setup_realignment): Use it.
8110         * tree-vectorizer.h (vect_copy_ref_info): Declare.
8111         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8112         the first DR to all generated stores.
8113         (vectorizable_load): Likewise for loads.
8115 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8117         PR tree-optimization/85446
8118         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8119         the integral and pointer types to have the same precision.
8121         * doc/install.texi: Document --disable-cet being the default and
8122         --enable-cet=auto.
8124 2018-04-18  Martin Liska  <mliska@suse.cz>
8126         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8127         style.
8129 2018-04-18  Martin Liska  <mliska@suse.cz>
8131         Revert
8132         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
8134         PR ipa/83983
8135         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8136         arguments if they are comparable.
8138 2018-04-18  Martin Liska  <mliska@suse.cz>
8140         Revert
8141         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8143         PR lto/84805
8144         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8145         incomplete types.
8147 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
8149         PR target/85388
8150         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8151         ENDBR after calling __morestack.
8153 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
8155         PR jit/85384
8156         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8157         by using gcc_base_ver to generate a gcc_driver_version, and use
8158         it when generating GCC_DRIVER_NAME.
8159         * configure: Regenerate.
8161 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
8163         PR target/81084
8164         * config.gcc: Obsolete powerpc*-*-*spe*.
8166 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8168         PR debug/84637
8169         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8170         (stabstr_D): Change type of unum from unsigned int to
8171         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
8172         type.
8174 2018-04-17  Jim Wilson  <jimw@sifive.com>
8176         PR 84856
8177         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8178         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8179         Set arg_pointer_offset after using pretend_args_size.
8181 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8183         PR rtl-optimization/85431
8184         * dse.c (record_store): Ignore zero width stores.
8186         PR sanitizer/85230
8187         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
8188         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8189         __builtin_stack_restore rather than after it.
8190         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8191         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8192         argument instead of virtual_dynamic_stack_rtx.
8194 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8196         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8197         New prototype.
8198         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8199         Add note to error message to explain internal mapping of overloaded
8200         built-in function name to non-overloaded built-in function name.
8201         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8202         function.
8204 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
8206         PR target/85424
8207         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8208         where the inputs overlap with the output.
8210 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8212         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8213         (=v, v) alternative and explicit "memory" attribute.
8214         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
8215         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8216         attributes.
8217         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8218         "sselog1" type instead of "sselog".
8219         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8220         "sselog".  Remove explicit "memory" attribute.
8221         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8222         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8223         attributes.
8224         (vec_extract_hi_v32hi): Merge all alternatives into one, use
8225         "sselog1" type instead of "sselog".  Remove explicit "memory"
8226         attribute.
8227         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8228         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8229         attribute.
8230         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8231         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8232         attributes.
8233         (vec_extract_hi_v64qi): Merge all alternatives into one, use
8234         "sselog1" type instead of "sselog".  Remove explicit "memory"
8235         attribute.
8236         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8237         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8238         attribute.
8240         PR target/85430
8241         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8243         PR middle-end/85414
8244         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8245         on a SUBREG.
8247 2018-04-17  Martin Jambor  <mjambor@suse.cz>
8249         PR ipa/85421
8250         * ipa-cp.c (create_specialized_node): Call
8251         expand_all_artificial_thunks if necessary.
8253 2018-04-17  Martin Liska  <mliska@suse.cz>
8255         PR lto/85405
8256         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8257         in message, remote space in between '_G' and '('.
8259 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8261         PR target/85281
8262         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8263         avx512f_vmcmp<mode>3<round_saeonly_name>,
8264         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8265         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8266         avx512f_rndscale<mode><round_saeonly_name>,
8267         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8268         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8269         Use %<iptr>2 instead of %2 for -masm=intel.
8270         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8271         avx512f_vcvttss2usi<round_saeonly_name>,
8272         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8273         -masm=intel.
8274         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8275         avx512f_vcvttsd2usi<round_saeonly_name>,
8276         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8277         Use %q1 instead of %1 for -masm=intel.
8278         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8279         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8280         of %3 for -masm=intel.
8281         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8282         -masm=intel.
8283         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8284         -masm=intel.
8285         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8286         -masm=intel.
8287         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8288         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8289         %g1.
8290         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8291         -masm=intel.
8292         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8293         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8294         %g1 and one with %0 and %1.
8295         (avx512er_vmrcp28<mode><round_saeonly_name>,
8296         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8297         %1 for -masm=intel.
8298         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8299         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8300         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8301         of %0 and %{%4%} for -masm=intel.
8302         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8303         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8304         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8305         order of %0 and %{%5%}%{z%} for -masm=intel.
8307 2018-04-17  Jan Hubicka  <jh@suse.cz>
8309         PR lto/85405
8310         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8312 2018-04-17  Martin Liska  <mliska@suse.cz>
8314         PR ipa/85329
8315         * multiple_target.c (create_dispatcher_calls): Set apostrophes
8316         for target_clone error message.  Make default implementation
8317         clone to be a local declaration.
8318         (separate_attrs): Add new argument and check for an empty
8319         string.
8320         (expand_target_clones): Handle it.
8321         (ipa_target_clone): Make redirection just for target_clones
8322         functions.
8324 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
8325             Tom de Vries  <tom@codesourcery.com>
8327         PR middle-end/84955
8328         * omp-expand.c (expand_oacc_for): Add dummy false branch for
8329         tiled basic blocks without omp continue statements.
8331 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
8333         PR target/83660
8334         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8335         vec_extract expression as having side effects to make sure it gets
8336         a cleanup point.
8338 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
8340         PR target/85403
8341         * config/i386/i386.c (get_builtin_code_for_version): Check
8342         error_mark_node.
8344 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
8346         PR target/84331
8347         * gcc/config.gcc: Support "skylake".
8348         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8349         PROCESSOR_SKYLAKE.
8350         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8351         (processor_target_table): Add "skylake".
8352         (ix86_option_override_internal): Add "skylake".
8353         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8354         PROCESSOR_CANNONLAKE.
8355         (get_builtin_code_for_version): Fix priority for
8356         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8357         PROCESSOR_SKYLAKE-AVX512.
8358         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8359         (processor_type): Add PROCESSOR_SKYLAKE.
8361 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
8362             Jason Merrill  <jason@redhat.com>
8364         PR c++/85112
8365         * convert.c (convert_to_integer_1): Use direct recursion for
8366         enumeral types and types with a precision less than the number
8367         of bits in their mode.
8369 2018-04-16  Julia Koval  <julia.koval@intel.com>
8371         PR target/84413
8372         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
8373         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
8375 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
8377         PR target/85293
8378         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
8379         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
8380         and -mno-direct-move.
8382 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
8384         PR target/83402
8385         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
8386         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
8387         Ensure negative shifts result in {0}.
8389 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
8391         PR rtl-optimization/79916
8392         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
8393         regs (if any) to define how to gnerate SD moves when LRA is in
8394         progress.
8396 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
8398         PR rtl-optimization/85393
8399         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8400         * except.c (expand_dw2_landing_pad_for_region): Make static.
8401         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8402         a label and unconditional jump to old_bb, rather than
8403         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8404         basic block.
8406         PR rtl-optimization/85376
8407         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8408         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8409         instead of a specific value.
8411 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8412             Bin Cheng  <bin.cheng@arm.com>
8414         PR tree-optimization/82965
8415         PR tree-optimization/83991
8416         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8417         by_profile_only parameter.
8418         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8419         information if the loop was predicted to iterate too many times.
8420         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8422 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8424         PR lto/71991
8425         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8426         always inline.
8428 2018-04-13  Martin Liska  <mliska@suse.cz>
8429             Jakub Jelinek  <jakub@redhat.com>
8431         PR middle-end/81657
8432         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8433         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8434         * builtins.c (expand_builtin_memory_copy_args): Use
8435         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8436         handle dest_addr == pc_rtx.
8438 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
8440         PR target/85291
8441         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8442         asked to not generate direct moves.
8443         (fix_trunc<mode>si2_stfiwx): Similar.
8444         (fix_trunc<mode>si2_internal): Similar.
8446 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8448         PR debug/83157
8449         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8450         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8451         lookup if dest in some wider mode is known to be const0_rtx and
8452         if so, record permanent equivalence for it to be ZERO_EXTEND of
8453         the narrower mode destination.
8455 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8457         * lto-streamer-out.c (output_function): Revert 259346.
8458         * omp-expand.c (expand_oacc_for): Likewise.
8460 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
8462         PR rtl-optimization/85354
8463         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8464         * sel-sched.c (sel_global_init): ... here.
8466 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
8468         PR target/85238
8469         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8470         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8471         mode for PE-COFF targets.
8472         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8473         (i386_pe_asm_lto_end): Likewise.
8474         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8475         (TARGET_ASM_LTO_END): Likewise.
8476         * config/i386/winnt.c (saved_debug_info_level): New static variable.
8477         (i386_pe_asm_lto_start): New function.
8478         (i386_pe_asm_lto_end): Likewise.
8480 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8481             Richard Biener  <rguenther@suse.de>
8483         PR middle-end/84955
8484         * lto-streamer-out.c (output_function): Fix CFG loop state before
8485         streaming out.
8486         * omp-expand.c (expand_oacc_for): Handle calls to internal
8487         functions like regular functions.
8489 2018-04-12  Richard Biener  <rguenther@suse.de>
8491         PR lto/85371
8492         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8493         for the early LTO debug to properly generate references to it
8494         during DIE emission.  Do not re-use that for the skeleton for
8495         split-dwarf.
8496         (dwarf2out_early_finish): Likewise.
8498 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8500         PR target/85328
8501         * config/i386/sse.md
8502         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8503         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8504         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8505         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8506         and output is a reg, avoid creating invalid lowpart subreg, but
8507         instead split into a 512-bit move.  Don't split if not AVX512VL,
8508         input is xmm16+ reg and output is a mem.
8509         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8510         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8511         xmm16+ reg and output is a mem.
8513 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8515         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8516         also for flag_dwarf2_cfi_asm.
8518 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8520         PR rtl-optimization/85342
8521         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8522         a bool scalar var inside of the loop instead.  Don't try to update
8523         recog_data.operand after failed apply_change_group.
8525 2018-04-12  Tom de Vries  <tom@codesourcery.com>
8527         PR target/85296
8528         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8529         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
8530         array with flexible array member as array without given dimension.
8531         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
8532         argument for undefined param to true.
8534 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
8536         PR target/85321
8537         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8538         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
8539         from PowerPC section.
8540         * config/rs6000/sysv4.opt (mcall-): Improve help text.
8541         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
8542         help text that is too long.
8543         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
8544         help text that is too long.
8545         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
8546         help text that is too long.
8548 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
8550         * config/alpha/alpha.md (stack_probe_internal): Rename
8551         from "probe_stack".  Update all callers.
8553 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8555         PR rtl-optimization/84566
8556         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
8557         sched_macro_fuse_insns.
8559 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8561         PR target/84301
8562         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
8563         (compute_block_dependences): ... from here.
8565 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8567         PR tree-optimization/85331
8568         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
8569         from int to HOST_WIDE_INT.
8571 2018-04-11  Martin Jambor  <mjambor@suse.cz>
8573         PR ipa/84149
8574         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
8575         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
8576         not the same as the source val.
8577         (cgraph_edge_brings_value_p): New parameter.
8578         (gather_edges_for_value): Pass destination value to
8579         cgraph_edge_brings_value_p.
8580         (perhaps_add_new_callers): Likewise.
8581         (get_info_about_necessary_edges): Likewise and exclude values brought
8582         only by self-recursive edges.
8583         (create_specialized_node): Redirect only clones of self-calling edges.
8584         (+self_recursive_pass_through_p): New function.
8585         (find_more_scalar_values_for_callers_subset): Use it.
8586         (find_aggregate_values_for_callers_subset): Likewise.
8587         (known_aggs_to_agg_replacement_list): Removed.
8588         (decide_whether_version_node): Re-calculate known constants for all
8589         remaining context clones.
8591 2018-04-11  Richard Biener  <rguenther@suse.de>
8593         PR lto/85339
8594         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
8595         from early DWARF output.
8596         (dwarf2out_early_finish): Output line info unconditionally into
8597         early DWARF and add reference to it.
8599 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8601         PR target/85281
8602         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
8603         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
8604         other than V2DFmode using iptr mode attribute.
8605         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
8607 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8609         PR rtl-optimization/84659
8610         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
8612 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8614         PR debug/85302
8615         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
8616         SIZEP is NULL.
8617         (output_loc_list): Pass address of a dummy size variable even in the
8618         locview handling loop.
8619         (index_location_lists): Add comment on why skip_loc_list_entry can't
8620         call size_of_locs.
8622 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8624         PR target/85261
8625         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
8626         into register.
8628 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
8630         PR target/85321
8631         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8632         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
8633         and -mstring-compare-inline-limit.
8635 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
8637         PR target/85287
8638         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
8639         for stack clash protection in a register whenever we need it to be in
8640         a register.
8642 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
8644         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
8645         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
8647 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
8649         PR target/85321
8650         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
8651         the help text.
8652         (mlong-double-): Ditto.
8653         * config/rs6000/sysv4.opt (msdata=): Ditto.
8654         (mtls-size=): Ditto.
8656 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8658         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8659         erroneous entries for
8660         "vector int vec_ldl (int, long int *)", and
8661         "vector unsigned int vec_ldl (int, unsigned long int *)".
8662         Add comments and entries for
8663         "vector bool char vec_ldl (int, bool char *)",
8664         "vector bool short vec_ldl (int, bool short *)",
8665         "vector bool int vec_ldl (int, bool int *)",
8666         "vector bool long long vec_ldl (int, bool long long *)",
8667         "vector pixel vec_ldl (int, pixel *)",
8668         "vector long long vec_ldl (int, long long *)",
8669         "vector unsigned long long vec_ldl (int, unsigned long long *)".
8670         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
8671         type tree bool_long_long_type_node and correct definition of
8672         bool_V2DI_type_node to make reference to this new type tree.
8673         (rs6000_mangle_type): Replace erroneous reference to
8674         bool_long_type_node with bool_long_long_type_node.
8675         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
8676         comments to emphasize sign distinctions for char and int types and
8677         replace RS6000_BTI_bool_long constant with
8678         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
8679         use of RS6000_BTI_pixel.
8680         (bool_long_type_node): Remove this macro definition.
8681         (bool_long_long_type_node): New macro definition
8683 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
8685         PR rtl-optimization/85300
8686         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
8687         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
8688         simplify_unary_operation fails.
8690 2018-04-10  Martin Liska  <mliska@suse.cz>
8692         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
8693         cgraph_edge and ipa_ref.
8695 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
8697         PR target/85177
8698         PR target/85255
8699         * config/i386/sse.md
8700         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
8701         computation of the VEC_MERGE selector from mask.
8702         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
8703         Fix decoding of the VEC_MERGE selector into mask.
8705 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
8707         PR tree-optimization/85286
8708         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
8710 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
8712         * final.c (final_1): Set insn_last_address as well as
8713         insn_current_address.
8715 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8717         PR target/85173
8718         * explow.c (emit_stack_probe): Call validize_mem on memory location
8719         before passing it to gen_probe_stack.  Create address operand and
8720         legitimize it for the probe_stack_address case.
8722 2018-04-09  Jan Hubicka  <jh@suse.cz>
8724         PR lto/85078
8725         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
8726         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
8727         * tree.c (free_lang_data_in_type): Fix handling of binfos;
8728         walk basetypes.
8729         (free_lang_data): Rebuild type inheritance graph.
8731 2018-04-09  Martin Sebor  <msebor@redhat.com>
8733         * invoke.texi (-finline-small-functions): Mention other optimization
8734         options.
8735         (-findirect-inlining, -fpartial-inlining): Same.
8736         (-finline-functions-called-once): Same.
8737         (-freorder-blocks-and-partition): Same.
8739 2018-04-09  Jan Hubicka  <jh@suse.cz>
8741         PR rtl/84058
8742         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
8743         jumps; choose last target that matches the criteria (i.e.
8744         no partition changes for non-crossing jumps).
8745         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
8746         support for redirecting crossing jumps to non-crossing.
8748 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
8750         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
8751         also for naked functions.
8753 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
8755         * config/arc/arc.md (add_shift): New pattern.
8756         (add_shift2): Likewise.
8757         (sub_shift): Likewise.
8758         (sub_shift_cmp0_noout): Likewise.
8759         (compare_si_ashiftsi): Likewise.
8760         (xbfu_cmp0_noout): New combine pattern.
8761         (xbfu_cmp0"): Likewise.
8762         (movsi_set_cc_insn): Place the predicable variant first.
8763         (commutative_binary_cmp0_noout): Remove clobber.
8764         (commutative_binary_cmp0): New pattern.
8765         (noncommutative_binary_cmp0): Likewise.
8766         (noncommutative_binary_cmp0_noout): Likewise.
8767         (noncommutative_binary_comparison_result_used): Removed.
8768         (rsub_cmp0): New pattern.
8769         (rsub_cmp0_noout): Likewise.
8770         (extzvsi): Changed, keep only meaningful variants.
8771         (SQH, SEZ): New iterators.
8772         (SQH_postfix): New mode attribute.
8773         (SEZ_prefix): New code attribute.
8774         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
8775         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
8776         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
8777         of numerical value.
8778         (noncommutative_operator): Check the availability of barrel
8779         shifter option.
8781 2018-04-09  Richard Biener  <rguenther@suse.de>
8783         PR tree-optimization/85284
8784         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
8785         Only use the niter constraining form of simple_iv when the exit
8786         is always executed.
8788 2018-04-09  Tom de Vries  <tom@codesourcery.com>
8790         PR target/84041
8791         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8792         (define_expand "*memory_barrier"): New define_expand.
8793         (define_insn "memory_barrier"): New insn.
8795 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8797         PR rtl-optimization/80463
8798         PR rtl-optimization/83972
8799         PR rtl-optimization/83480
8801         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
8802         correct producer for the insn.
8803         (tidy_control_flow): Fixup seqnos in case of debug insns.
8805 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8807         PR rtl-optimization/83913
8809         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
8810         different sched-times when merging exprs.
8812 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8814         PR rtl-optimization/83962
8816         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
8817         tidy_fallthru_edge and tidy_control_flow.
8819 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
8821         PR rtl-optimization/83530
8823         * sel-sched.c (force_next_insn): New global variable.
8824         (remove_insn_for_debug): When force_next_insn is true, also leave only
8825         next insn in the ready list.
8826         (sel_sched_region): When the region wasn't scheduled, make another pass
8827         over it with force_next_insn set to 1.
8829 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
8831         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
8832         into tm_file.
8833         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8834         for interrupt control.
8835         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8836         functions for interrupt control.
8837         * config/nds32/nds32-intrinsic.md: Likewise.
8838         * config/nds32/nds32_intrinsic.h: Likewise.
8839         * config/nds32/nds32.h (nds32_builtins): Likewise.
8841 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
8843         * config/nds32/nds32.c (nds32_init_machine_status,
8844         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
8845         strict_aligned_p field.
8846         (nds32_expand_to_rtl_hook): New function.
8847         (TARGET_EXPAND_TO_RTL_HOOK): Define.
8848         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
8850 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8851             Chung-Ju Wu  <jasonwucj@gmail.com>
8853         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
8854         * config/nds32/nds32-n7.md: New file.
8855         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
8856         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
8857         pipeline.
8858         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
8859         * config/nds32/nds32.md (pipeline_model): Add n7.
8860         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
8861         * config/nds32/pipelines.md: Include n7 settings.
8863 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8864             Chung-Ju Wu  <jasonwucj@gmail.com>
8866         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
8867         * config/nds32/nds32-e8.md: New file.
8868         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
8869         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
8870         pipeline.
8871         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
8872         * config/nds32/nds32.md (pipeline_model): Add e8.
8873         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
8874         * config/nds32/pipelines.md: Include e8 settings.
8876 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8877             Chung-Ju Wu  <jasonwucj@gmail.com>
8879         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
8880         * config/nds32/nds32-n8.md: New file.
8881         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
8882         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
8883         pipeline.
8884         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
8885         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
8886         * config/nds32/nds32.md (pipeline_model): Add n8.
8887         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
8888         * config/nds32/pipelines.md: Include n8 settings.
8890 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
8891             Chung-Ju Wu  <jasonwucj@gmail.com>
8893         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
8894         * config/nds32/nds32-n9-2r1w.md: New file.
8895         * config/nds32/nds32-n9-3r2w.md: New file.
8896         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
8897         nds32_register_ports): New or modify for cpu n9.
8898         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
8899         pipeline.
8900         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
8901         * config/nds32/nds32-utils.c: New file.
8902         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
8903         TARGET_MUL_SLOW): Define.
8904         * config/nds32/nds32.md (pipeline_model): New attribute.
8905         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
8906         New options that support cpu n9.
8907         * config/nds32/pipelines.md: Include n9 settings.
8908         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
8910 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
8912         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
8913         information if necessary.
8914         (output_cond_branch_compare_zero): Likewise.
8915         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
8916         (nds32_target_alignment): Refine for alignment.
8917         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
8918         (FUNCTION_BOUNDARY): Modify.
8919         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
8920         align case.
8921         * config/nds32/nds32.opt (malways-align, malign-functions): New.
8923 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
8925         * config/nds32/constants.md (unspec_volatile_element): Add values for
8926         TLB operation and data prefetch.
8927         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8928         functions for TLB operation and data prefetch.
8929         * config/nds32/nds32-intrinsic.md: Likewise.
8930         * config/nds32/nds32_intrinsic.h: Likewise.
8931         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
8932         (nds32_print_operand): Likewise.
8933         * config/nds32/nds32.h (nds32_builtins): Likewise.
8935 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
8936         Andrew Pinski <pinsika@gcc.gnu.org>
8938         PR middle-end/82976
8939         * match.pd: Use constant_boolean_node of correct type instead of
8940         boolean_true_node or boolean_false_node for simplifying
8941         pointer comparisons to zero.
8943 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8945         PR tree-optimization/80021
8946         * tree.c (verify_type_variant): Make error call in verify_variant_match
8947         translatable and remove final full stop.
8949 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8951         * config/nds32/constants.md (unspec_volatile_element): Add
8952         UNSPEC_VOLATILE_EH_RETURN.
8953         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8954         nds32_output_stack_pop): Support dwarf exception handling process.
8955         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8956         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8957         exception handling process.
8958         (nds32_compute_stack_frame): Likewise.
8959         (nds32_return_addr_rtx): Likewise.
8960         (nds32_initial_elimination_offset): Likewise.
8961         (nds32_expand_prologue): Likewise.
8962         (nds32_expand_epilogue): Likewise.
8963         (nds32_dynamic_chain_address): New function.
8964         * config/nds32/nds32.h (machine_function): Add fields for dwarf
8965         exception handling.
8966         (DYNAMIC_CHAIN_ADDRESS): Define.
8967         (EH_RETURN_DATA_REGNO): Define.
8968         (EH_RETURN_STACKADJ_RTX): Define.
8969         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8970         patterns for dwarf exception handling.
8972 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8974         * config/nds32/nds32.h: Clean up obsolete macros.
8976 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8978         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8979         Add enum values for particular instructions.
8980         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8981         particular intrinsic functions.
8982         * config/nds32/nds32-intrinsic.md: Likewise.
8983         * config/nds32/nds32_intrinsic.h: Likewise.
8984         * config/nds32/nds32.h (nds32_builtins): Likewise.
8985         * config/nds32/nds32.md (type): Add pbsad and pbsada.
8986         (btst, ave): New patterns for particular instructions.
8988 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8990         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8991         Add enum values for atomic load/store and memory sync.
8992         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8993         and memory sync.
8994         * config/nds32/nds32-intrinsic.md: Likewise.
8995         * config/nds32/nds32_intrinsic.h: Likewise.
8996         * config/nds32/nds32.h (nds32_builtins): Likewise.
8998 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9000         PR tree-optimization/85257
9001         * fold-const.c (native_encode_vector): If not all elts could fit
9002         and off is -1, return 0 rather than offset.
9003         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9004         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9005         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
9006         adjust buffer in native_interpret_expr call.
9008 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9010         * config/nds32/constants.md (unspec_volatile_element): Add cache
9011         control enum values.
9012         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9013         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9014         * config/nds32/nds32.c (nds32_cctl_names): New.
9015         (nds32_print_operand): Handle cache control register names.
9016         * config/nds32/nds32.h (nds32_builtins): New enum values.
9017         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9018         macros.
9019         * config/nds32/nds32.md (type): Add mmu.
9020         * config/nds32/pipelines.md (simple_insn): Add mmu.
9022 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9024         * config/nds32/nds32.md (type): Remove call.
9025         * config/nds32/pipelines.md (simple_insn): Likewise.
9027 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9029         * config/nds32/constants.md (unspec_volatile_element): Add
9030         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9031         UNSPEC_VOLATILE_FMFCFG.
9032         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9033         description for fmfcfg and fmfcsr.
9034         (bdesc_1arg): Add fmtcsr.
9035         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9036         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9037         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9038         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9039         unspec_fmfcfg): New patterns.
9040         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9041         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9042         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9043         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9044         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9045         __nds32__fmfcfg): Define.
9047 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9049         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9050         intrinsic register names.
9051         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9052         intrinsic register enum values and macros.
9054 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9056         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9057         for load/store addressing form.
9058         (nds32_print_operand_address): Likewise.
9060 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
9062         PR target/85196
9063         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9064         based on LABEL_REF.  Remove useless assertion.
9065         (pic_address_needs_scratch): Fix formatting.
9066         (sparc_legitimize_pic_address): Minor tweaks.
9067         (sparc_delegitimize_address): Adjust assertion accordingly.
9068         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9069         into symbolic_operand.
9070         (movsi_high_pic_label_ref): Likewise.
9071         (movsi_lo_sum_pic_label_ref): Likewise.
9072         (movdi_pic_label_ref): Likewise.
9073         (movdi_high_pic_label_ref): Likewise.
9074         (movdi_lo_sum_pic_label_ref): Likewise.
9076 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
9078         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9079         custom LIB_SPEC setup.
9081 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
9082             Kito Cheng  <kito.cheng@gmail.com>
9084         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9085         * config/riscv/freebsd.h: New.
9087 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9089         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9090         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9091         file.
9093 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9094             Kito Cheng  <kito.cheng@gmail.com>
9096         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9097         nds32_output_call, nds32_symbol_binds_local_p): New functions.
9098         * config/nds32/nds32-protos.h (nds32_output_call,
9099         nds32_output_return): Declare.
9100         * config/nds32/nds32.md: Refine all the call and return patterns.
9102 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9104         PR debug/85252
9105         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9106         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9108         PR rtl-optimization/84872
9109         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9110         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9111         EDGE_CROSSING edge.
9113 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
9115         * expr.c (copy_blkmode_to_reg): Revert 254862.
9116         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9118 2018-04-06  Richard Biener  <rguenther@suse.de>
9120         PR middle-end/85244
9121         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9122         after seeing a component reference with an adjacent field.  Treat
9123         refs to arrays at struct end of external decls similar to
9124         refs to unconstrained commons.
9126 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9128         PR sanitizer/85213
9129         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9130         look through SAVE_EXPRs with non-side-effects argument.  Adjust
9131         recursive calls.
9132         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9133         save_p here.
9135 2018-04-06  Richard Biener  <rguenther@suse.de>
9137         PR middle-end/85180
9138         * alias.c (find_base_term): New wrapper around find_base_term
9139         unwinding CSELIB_VAL_PTR changes.
9140         (find_base_term): Do not restore CSELIB_VAL_PTR during the
9141         recursion.
9143 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9145         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9146         instructions.
9147         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9148         constant definitions.
9149         ("nop"): lr 0,0 -> nopr r0
9150         ("nop_lr0", "nop_lr1"): New insn definitions.
9152 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9154         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9155         NDS32_V3PUSH_AVAILABLE_P macro.
9157 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
9158             Chung-Ju Wu  <jasonwucj@gmail.com>
9160         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9161         (nds32*-*-*): Add float and fpu_config into supported_defaults.
9162         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9163         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9164         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9165         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9166         * config/nds32/constraints.md: New constraints and checking for hard
9167         float configuration.
9168         * config/nds32/iterators.md: New mode iterator and attribute for hard
9169         float configuration.
9170         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9171         patterns.
9172         * config/nds32/nds32-fpu.md: New file.
9173         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9174         deal with hard float code generation.
9175         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9176         ARCH_V3S.
9177         (abi_type, float_reg_number): New enum type.
9178         * config/nds32/nds32-predicates.c: New predicates for hard float.
9179         * config/nds32/nds32-protos.h: Declare functions for hard float.
9180         * config/nds32/nds32.c: Implementation for hard float configuration.
9181         * config/nds32/nds32.h: Definitions for hard float configuration.
9182         * config/nds32/nds32.md: Include hard float machine description and
9183         modify patterns for hard float configuration.
9184         * config/nds32/nds32.opt: New options for hard float configuration.
9185         * config/nds32/predicates.md: New predicates for hard float
9186         configuration.
9188 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9190         * common/config/nds32/nds32-common.c
9191         (nds32_option_optimization_table): Enable -mreleax-hint by default.
9193 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
9195         PR middle-end/85195
9196         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9197         CONSTRUCTOR_ELT (ctor, ...)->value.
9199 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
9201         PR target/85193
9202         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9204 2018-04-05  Tom de Vries  <tom@codesourcery.com>
9206         PR target/85204
9207         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9208         cond jump.
9210 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9211             Kito Cheng  <kito.cheng@gmail.com>
9213         * config/nds32/constraints.md (U33): Fine-tune checking condition.
9214         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9215         * config/nds32/nds32.h (nds32_16bit_address_type): Add
9216         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9218 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9219             Kito Cheng  <kito.cheng@gmail.com>
9221         * config/nds32/constraints.md (Ufe): New memory constraint.
9222         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9223         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9224         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9225         operands.
9226         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9227         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9229 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9231         * config/nds32/nds32.md: Use optimize_size in the condition for
9232         alu-shift instructions.
9234 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9236         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9238 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9240         * config/nds32/nds32.md (negsi2): Refine pattern.
9242 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9243             Chung-Ju Wu  <jasonwucj@gmail.com>
9245         * config/nds32/iterators.md (shift_rotate): New code iterator.
9246         (shift): New code attribute.
9247         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9248         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9249         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9250         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9251         bit-wise operations.
9252         (andsi3, *andsi3): Ditto.
9253         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9254         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9255         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9256         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9257         nds32_ior_operand, nds32_xor_operand): New predicates.
9259 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9261         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9262         (addsi3, subsi3): ... this.
9264 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9266         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9268 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9270         * config/nds32/nds32.md: Adjust indention.
9272 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9274         * config/nds32/nds32.md (feature): New attribute.
9276 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9278         * config/nds32/nds32.md (subtype): New attribute.
9280 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9282         PR target/85203
9283         * config/arm/arm-builtins.c (arm_expand_builtin): Change
9284         expansion to perform a bitwise AND of the argument followed by a
9285         boolean negation of the result.
9287 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
9289         PR rtl-optimization/84878
9290         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9291         the basic block.  Assert the use reference is not artificial and that
9292         it has an associated insn.
9294 2018-04-04  Michael Matz  <matz@suse.de>
9296         * builtins.c (compute_objsize): Pass correct operand
9297         to array_at_struct_end_p.
9299 2018-04-04  Richard Biener  <rguenther@suse.de>
9301         PR lto/85176
9302         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9303         from contexts for DINFO_LEVEL_TERSE and below.
9305 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9307         * config/nds32/nds32-doubleword.md (move_<mode>): Require
9308         resiter_operand condition.
9309         * config/nds32/nds32.md (*move<mode>): Ditto.
9311 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9312             Monk Chiang  <sh.chiang04@gmail.com>
9314         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9316 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9318         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9320 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9321             Kito Cheng  <kito.cheng@gmail.com>
9323         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9324         nds32_cond_code_str, output_cond_branch,
9325         output_cond_branch_compare_zero, nds32_expand_cbranch,
9326         nds32_expand_cstore, nds32_expand_movcc,
9327         nds32_output_cbranchsi4_equality_zero,
9328         nds32_output_cbranchsi4_equality_reg,
9329         nds32_output_cbranchsi4_equality_reg_or_const_int,
9330         nds32_output_cbranchsi4_greater_less_zero: New functions.
9331         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9332         nds32_expand_cstore, nds32_expand_movcc,
9333         nds32_output_cbranchsi4_equality_zero,
9334         nds32_output_cbranchsi4_equality_reg,
9335         nds32_output_cbranchsi4_equality_reg_or_const_int,
9336         nds32_output_cbranchsi4_greater_less_zero): Declare.
9337         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9338         nds32_rimm11s_operand): New predicates.
9339         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9340         * config/nds32/nds32.md: Rewrite all the branch and conditional move
9341         patterns.
9343 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9345         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9346         * config/nds32/nds32.md: Ditto.
9347         * config/nds32/pipelines.md: Ditto.
9349 2018-04-04  Richard Biener  <rguenther@suse.de>
9351         PR tree-optimization/85168
9352         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9353         propagating abnormals.
9355 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9357         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9359 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9360             Kito Cheng  <kito.cheng@gmail.com>
9362         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9363         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9364         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9365         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9366         * config/nds32/nds32.md (sibcall_internal): New.
9367         (sibcall_register): Remove.
9368         (sibcall_immediate): Remove.
9369         (sibcall_value_internal): New.
9370         (sibcall_value_register): Remove.
9371         (sibcall_value_immediate): Remove.
9372         * config/nds32/predicates.md (nds32_general_register_operand): New.
9373         (nds32_call_address_operand): New.
9375 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9377         PR rtl-optimization/85167
9378         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
9379         bb_defs if *split_p, instead preinitialize it to NULL.
9381         PR tree-optimization/85156
9382         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
9383         evaluating the argument multiple times.
9385 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
9387         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
9388         than vector.
9389         (_mm_cvtpd_ps): Likewise.
9390         (_mm_cvttpd_epi32): Likewise.
9391         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
9392         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
9393         vector, pixel, and bool following altivec.h include.
9395 2018-04-03  Martin Sebor  <msebor@redhat.com>
9397         * doc/extend.texi (Common Function Attributes): Clarify.
9398         (const attribute): Likewise.
9399         (pure attribute): Likewise.
9401 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9403         PR target/85169
9404         * config/i386/i386.c (ix86_expand_vector_set): Use
9405         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
9407 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
9409         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9410         instructions when changing rounding bits to preserve precision bits
9411         in the x87 control word.
9413 2018-04-03  Martin Liska  <mliska@suse.cz>
9415         PR tree-optimization/82491
9416         * rtl.h (strip_offset_and_add): Replace += suboffset with
9417         poly_uint64 () + suboffset.
9419 2018-03-29  Martin Liska  <mliska@suse.cz>
9420             Martin Jambor  <mjambor@suse.cz>
9422         PR ipa/84947
9423         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9424         param_type is not an integral or pointer type.
9426 2018-04-03  Richard Biener  <rguenther@suse.de>
9428         * sese.h (recompute_all_dominators): Remove.
9430 2018-04-02  Martin Sebor  <msebor@redhat.com>
9432         * doc/invoke.texi (-Wrestrict): Fix typos.
9434 2018-04-02  Jim Wilson  <jimw@sifive.com>
9436         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9437         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9438         (<optab>di3, <optab>si3_extend): Likewise.
9439         (<optab>si3_mask, <optab>si3_mask_1): New.
9440         (<optab>di3_mask, <optab>di3_mask_1): New.
9441         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9442         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9443         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9445 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
9447         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9448         example.
9450 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9452         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9453         (nds32_canonicalize_comparison): New function.
9455 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9456             Kito Cheng  <kito.cheng@gmail.com>
9457             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9459         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9460         * config/nds32/constants.md (unspec_volatile_element): Add
9461         UNSPEC_VOLATILE_RELAX_GROUP.
9462         * config/nds32/nds32-relax-opt.c: New file.
9463         * config/nds32/nds32-predicates.c
9464         (nds32_symbol_load_store_p): New function.
9465         * config/nds32/nds32-protos.h
9466         (nds32_symbol_load_store_p): Declare function.
9467         (make_pass_nds32_relax_opt): Declare new rtl pass function.
9468         * config/nds32/nds32.c
9469         (nds32_register_pass): New function to register pass.
9470         (nds32_register_passes): New function to register passes.
9471         * config/nds32/nds32.md (relax_group): New pattern.
9472         * config/nds32/nds32.opt (mrelax-hint): New option.
9473         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9475 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
9477         * config/nds32/t-nds32: Modify files dependency.
9479 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9481         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9482         (PROFILE_HOOK): Define its implementation.
9484 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9486         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9487         type and 32-bit size.
9489 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
9491         PR middle-end/85090
9492         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9493         (V_128_256): New mode iterator.
9494         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9495         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9496         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9497         of V.
9498         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9499         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9501 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
9503         PR target/83315
9504         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9505         NaN inputs correctly.
9507 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
9509         PR target/80546
9510         * config/rs6000/vsx.md (??r): New mode attribute.
9511         (*vsx_mov<mode>_64bit): Use it.
9512         (*vsx_mov<mode>_32bit): Likewise.
9514 2018-03-30  Martin Sebor  <msebor@redhat.com>
9516         PR tree-optimization/84818
9517         * builtins.c (check_access): Use warning_n.
9519 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9521         PR target/83822
9522         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9523         condition.
9524         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9525         condition.
9527 2018-03-30  Julia Koval  <julia.koval@intel.com>
9529         PR target/84413
9530         * x86-tune.def (movx, partial_reg_dependency): Enable for
9531         m_SKYLAKE_AVX512.
9533 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
9535         PR inline-asm/84985
9536         * lra-constraints.c (process_alt_operands): Move setting
9537         this_alternative_matches below.
9539 2018-03-29  Martin Liska  <mliska@suse.cz>
9541         PR lto/84995.
9542         * doc/invoke.texi: Document how LTO works with debug info.
9543         Describe auto-load support of binutils.  Mention 'x86-64'
9544         as valid option value of -march option.
9546 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
9548         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
9550         PR c/85094
9551         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
9552         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
9553         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
9554         checking.
9556 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
9558         PR target/84912
9559         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
9560         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
9561         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
9562         for RS6000_BTM_POWERPC64.
9563         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
9564         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
9565         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
9566         definition.
9567         (DIVDE): Use it.
9568         (DIVDEU): Likewise.
9570 2018-03-28 Carl Love  <cel@us.ibm.com>
9572         Revert
9573         2017-09-27  Carl Love  <cel@us.ibm.com>
9575         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9576         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9577         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9578         fctiw instruction.
9580 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9582         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
9583         instead of __vector bool.
9584         (_mm_max_pu8): Likewise.
9585         (_mm_min_pi16): Likewise.
9587 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
9589         PR target/84912
9590         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
9591         (DIVWEUO): Likewise.
9592         (DIVDEO): Likewise.
9593         (DIVDEUO): Likewise.
9594         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
9595         DIVWEUO and DIVDEUO.
9596         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
9597         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
9598         (div_extend): Likewise.
9599         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
9600         builtin function.
9601         (__builtin_divweuo): Likewise.
9602         (__builtin_divdeo): Likewise.
9603         (__builtin_divdeuo): Likewise.
9605 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
9607         PR target/85095
9608         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
9609         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
9611         PR tree-optimization/82004
9612         * gimple-match-head.c (optimize_pow_to_exp): New function.
9613         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
9614         Don't fold to exp if optimize_pow_to_exp is false.
9616 2018-03-28  Martin Liska  <mliska@suse.cz>
9618         PR other/84819
9619         * calls.c (initialize_argument_information): Fix trailing space.
9620         * common.opt: Fix typo and provide better explanation for
9621         -fsanitize-coverage option.
9622         * config/i386/i386.opt: Fix typo.
9624 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
9625             Martin Liska  <mliska@suse.cz>
9627         PR sanitizer/85081
9628         * gimplify.c (asan_poison_variable): Don't do the check for
9629         gimplify_omp_ctxp here.
9630         (gimplify_decl_expr): Do it here.
9631         (gimplify_target_expr): Likewise.
9633 2018-03-28  Martin Liska  <mliska@suse.cz>
9635         PR target/84988
9636         * config/i386/i386.c (ix86_function_arg_advance): Do not call
9637         chkp_type_bounds_count if MPX is not enabled.
9639 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9641         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
9643 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
9645         PR target/84914
9646         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
9647         function to create the function decl for complex long double
9648         multiply and divide for -mabi=ieeelongdouble.
9649         (init_float128_ieee): Call it.
9651 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
9653         PR target/85044
9654         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
9655         -fcf-protection=branch -mibt.
9656         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
9658 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9660         PR target/81863
9661         * config/arm/arm.c (arm_valid_symbolic_address): Handle
9662         arm_word_relocations.
9664 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
9666         PR target/85056
9667         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
9668         extern array declarations.
9670 2018-03-27  Richard Biener  <rguenther@suse.de>
9672         PR middle-end/84067
9673         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
9674         explicit single_use checks.
9676 2018-03-27  Richard Biener  <rguenther@suse.de>
9678         PR tree-optimization/85082
9679         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
9680         Valueize the VUSE.
9682 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9684         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
9685         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
9686         Turn on fasynchronous-unwind-tables and funwind-tables.
9688 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
9690         PR target/85073
9691         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
9692         (*bmi_blsr_<mode>_ccz): Ditto.
9694 2018-03-26  Tom de Vries  <tom@codesourcery.com>
9696         PR tree-optimization/85063
9697         * omp-general.c (offloading_function_p): New function.  Factor out
9698         of ...
9699         * omp-offload.c (pass_omp_target_link::gate): ... here.
9700         * omp-general.h (offloading_function_p): Declare.
9701         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
9702         with attribute omp declare target for offloading functions.
9704 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
9706         PR tree-optimization/84005
9707         * tree-data-ref.h (get_base_for_alignment): Declare.
9708         * tree-data-ref.c (get_base_for_alignment_1): New function.
9709         (get_base_for_alignment): Likewise.
9710         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
9711         get_base_for_alignment to find a suitable base object, instead
9712         of always using drb->base_address.
9714 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
9716         PR inline-asm/85022
9717         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
9718         known size by default.
9720 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
9722         PR inline-asm/85030
9723         * lra-constraints.c (process_alt_operands): Don't match BLKmode
9724         and non BLKmode operands.
9726 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9728         PR target/85026
9729         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
9730         Clean up attributes.
9732 2018-03-23  Richard Biener  <rguenther@suse.de>
9734         PR debug/85020
9735         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
9736         we are going to emit early debug for LTO.
9738 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
9740         PR inline-asm/85034
9741         * function.c (match_asm_constraints_1): Don't optimize if input
9742         doesn't satisfy general_operand predicate for output's mode.
9744         PR inline-asm/85022
9745         * alias.c (write_dependence_p): Don't require for x_canonicalized
9746         non-VOIDmode if x has VOIDmode.
9748         PR sanitizer/85029
9749         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
9750         just don't try to optimize it rather than assert it never happens.
9752 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9754         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
9755         macro expansions for definition of ST_INTERNAL_<mode> and
9756         LD_INTERNAL_<mode> builtins.
9757         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
9758         Remove prototype.
9759         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
9760         function.
9761         (altivec_expand_st_builtin): Likewise.
9762         (altivec_expand_builtin): Remove calls to deleted functions.
9763         (rs6000_address_for_altivec): Delete this function.
9764         * config/rs6000/vector.md: Remove expands for
9765         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
9767 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
9769         PR target/84826
9770         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
9771         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
9772         re-computing once computed.
9773         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
9774         (arm_init_machine_status): Initialize
9775         machine->static_chain_stack_bytes.
9777 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9779         PR target/84760
9780         * doc/extend.texi: Add four new prototypes for vec_ld.
9781         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
9782         definitions for more logical presentation.
9783         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
9784         entries for V1TI variants of __builtin_altivec_ld builtin.
9785         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
9786         handling of V1TI variant of LVX icode pattern.
9787         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
9788         (rs6000_gimple_fold_builtin): Likewise.
9789         (altivec_init_builtins): Add code to define
9790         __builtin_altivec_lvx_v1ti function.
9792 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
9794         PR inline-asm/84941
9795         * function.c (match_asm_constraints_1): Don't do the optimization
9796         if input isn't a REG, SUBREG, MEM or constant.
9798 2018-03-22  Tom de Vries  <tom@codesourcery.com>
9800         PR tree-optimization/84956
9801         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
9802         bb_has_abnormal_pred.
9804 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
9806         PR sanitizer/85018
9807         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
9808         DECL_INITIAL (decl) to decl at the end.
9809         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
9810         adjust the comment.
9812 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
9814         * doc/extend.texi (__builtin_tgmath): Document when complex
9815         integer types are treated as _Complex _Float64.
9817 2018-03-21  Tom de Vries  <tom@codesourcery.com>
9819         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
9821 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9823         PR tree-optimization/84960
9824         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
9825         if it is ENTRY block, move them into single succ of ENTRY in that case.
9827 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
9829         PR tree-optimization/84811
9830         * poly-int.h (poly_span_traits): Remove the T3 parameter and
9831         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
9832         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
9833         (known_subrange_p): Update accordingly.  Cast each value involved
9834         in the size comparison, rather than casting the result of the
9835         subtraction.
9837 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9839         PR tree-optimization/84982
9840         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
9841         by flipping the least significant bit rather than all bits from
9842         bitpos to bitpos + bitsize - 1.
9844 2018-03-21  Nathan Sidwell  <nathan@acm.org>
9846         * doc/extend.texi (Deprecated Features): Remove mention of
9847         long-deleted deprecations.
9849 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9851         PR jit/84288
9852         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
9853         * configure: Regenerate.
9855 2018-03-21  Tom de Vries  <tom@codesourcery.com>
9857         PR tree-optimization/83126
9858         * tree-parloops.c (num_phis): New function.
9859         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
9861 2018-03-21  Nathan Sidwell  <nathan@acm.org>
9863         * doc/extend.texi (Deprecated Features): Update deprecated flags,
9864         mention anon-struct/union members and trailing attributes.
9866 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
9868         PR tree-optimization/84969
9869         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
9870         builtin memset partitions if they set different rhs values.
9872 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
9874         PR rtl-optimization/84989
9875         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
9876         VEC_DUPLICATE with scalar result mode.
9878 2018-03-21  Martin Liska  <mliska@suse.cz>
9880         PR ipa/84963
9881         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
9882         not intended return statement.
9884 2018-03-21  Martin Liska  <mliska@suse.cz>
9886         PR target/84988
9887         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
9888         (chkp_find_bound_slots_1): Limit number of iterations.
9890 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
9892         PR target/84838
9893         * Minor grammar fixes for x86 options.
9895 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9897         PR debug/84875
9898         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
9899         holding REG_CFA_RESTORE notes, instead turn them into a USE.
9901 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
9903         PR target/83789
9904         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
9905         (altivec_lvx_<mode>_1op): Likewise.
9906         (altivec_stvx_<mode>_2op): Likewise.
9907         (altivec_stvx_<mode>_1op): Likewise.
9908         (altivec_lvx_<VM2:mode>): New define_expand.
9909         (altivec_stvx_<VM2:mode>): Likewise.
9910         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
9911         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9912         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
9913         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9914         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
9915         (rs6000_gen_lvx): Likewise.
9916         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
9917         (altivec_expand_stv_builtin): Likewise.
9918         (altivec_expand_builtin): Likewise.
9919         * config/rs6000/vector.md: Likewise.
9921 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9923         PR target/82518
9924         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
9925         BYTES_BIG_ENDIAN.
9927 2018-03-20  Richard Biener  <rguenther@suse.de>
9929         PR target/84986
9930         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
9931         sign-conversions as zero, fall back to standard scalar_stmt
9932         cost for the rest.
9934 2018-03-20  Martin Liska  <mliska@suse.cz>
9936         PR ipa/84825
9937         * predict.c (rebuild_frequencies): Handle case when we have
9938         PROFILE_ABSENT, but flag_guess_branch_prob is false.
9940 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9942         PR target/84990
9943         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9944         flag_section_anchors.
9945         * varasm.c (use_blocks_for_decl_p): Remove hack for
9946         dw2_force_const_mem.
9948         PR target/84845
9949         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9950         to ...
9951         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
9952         be created, use lowpart_subreg of operands[0] rather than operands[0]
9953         itself.
9954         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9955         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9956         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9957         and n constraint instead of aarch64_shift_imm_di and Usd.
9958         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9959         (*aarch64_<optab>_reg_minus<mode>3): ... this.
9961 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
9963         PR target/82989
9964         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9965         to favor GPR over NEON registers.
9966         (<shift>di3_neon): Likewise.
9968 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9970         PR target/84952
9971         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9972         (nvptx_process_pars): Emit bar.sync asap and alap.
9974 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9976         PR target/84954
9977         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9978         seen_label if seen_label is already set.
9980 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9982         PR target/84945
9983         * config/i386/i386.c (fold_builtin_cpu): For features above 31
9984         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9985         Use 1U instead of 1.  Formatting fixes.
9987         PR c/84953
9988         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9989         instead of TREE_TYPE (s1) for the return value.
9991 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
9993         PR tree-optimization/84946
9994         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9995         bitsize + bitsize in poly_uint64 rather than poly_int64.
9997         PR sanitizer/78651
9998         * dwarf2asm.c: Include fold-const.c.
9999         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10000         of decl rather than decl itself.
10002         PR rtl-optimization/84643
10003         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10005 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
10007         PR sanitizer/78651
10008         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10009         calling assemble_variable.
10011 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
10013         PR target/81647
10014         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10015         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10017 2018-03-19  Jim Wilson  <jimw@sifive.com>
10019         PR bootstrap/84856
10020         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10021         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10022         (riscv_first_stack_step): Likewise.
10023         (riscv_option_override): Use STACK_BOUNDARY instead of
10024         MIN_STACK_BOUNDARY.
10025         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10026         MIN_STACK_BOUNDARY.
10027         (BIGGEST_ALIGNMENT): Set to 128.
10028         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10029         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10030         STACK_BOUNDARY.
10032 2018-03-19  Richard Biener  <rguenther@suse.de>
10034         PR tree-optimization/84933
10035         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10036         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10038 2018-03-19  Richard Biener  <rguenther@suse.de>
10040         PR tree-optimization/84859
10041         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10042         (cond_if_else_store_replacement): Perform sinking operation on
10043         single-store BBs regardless of MAX_STORES_TO_SINK setting.
10044         Generalize what a BB with a single eligible store is.
10046 2018-03-19  Richard Biener  <rguenther@suse.de>
10048         PR tree-optimization/84929
10049         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10050         chrec_is_positive against non-chrec arg.
10052 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
10054         PR target/84711
10055         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10057 2018-03-18  Martin Liska  <mliska@suse.cz>
10059         PR rtl-optimization/84635
10060         * regrename.c (build_def_use): Use matches_mode only when
10061         matches >= 0.
10063 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
10065         PR tree-optimization/84913
10066         * tree-vect-loop.c (vectorizable_reduction): Don't try to
10067         vectorize chains of COND_EXPRs.
10069 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10071         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10073 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10075         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10077 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10079         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10081 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10082             Kito Cheng  <kito.cheng@gmail.com>
10084         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10085         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10086         (nds32_adjust_reg_alloc_order): New function.
10087         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10089 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
10091         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10092         nds32_print_operand, nds32_print_operand_address): Use
10093         HOST_WIDE_INT_PRINT_DEC instead.
10095 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10097         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10099 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
10101         PR target/84902
10102         * config/i386/i386.c (initial_ix86_tune_features,
10103         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10104         unsigned long long.
10105         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10106         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10107         rather than 1u << ix86_tune.  Formatting fix.
10108         (ix86_option_override_internal): Change ix86_arch_mask from
10109         unsigned int to unsigned HOST_WIDE_INT, initialize to
10110         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10111         (ix86_function_specific_restore): Likewise.
10113 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10115         PR target/84899
10116         * postreload.c (reload_combine_recognize_pattern): Perform
10117         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10118         truncate_int_for_mode the result for the destination's mode.
10120         PR c/84909
10121         * hsa-gen.c (mem_type_for_type): Fix comment typo.
10122         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10123         Likewise.
10124         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10125         Likewise.
10127 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
10129         PR target/84876
10130         * lra-assigns.c (lra_split_hard_reg_for): Don't use
10131         regno_allocno_class_array and sorted_pseudos.
10132         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10133         insns where regno is used.
10135 2018-03-16  Martin Liska  <mliska@suse.cz>
10137         PR ipa/84833
10138         * multiple_target.c (create_dispatcher_calls): Redirect
10139         reference in the symbol table.
10141 2018-03-16  Martin Liska  <mliska@suse.cz>
10143         PR ipa/84722
10144         * multiple_target.c (create_dispatcher_calls): Redirect also
10145         an alias.
10147 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10149         PR c++/79937
10150         PR c++/82410
10151         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10152         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10153         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10155 2018-03-16  Julia Koval  <julia.koval@intel.com>
10157         * doc/invoke.texi (Skylake Server): Add CLWB.
10158         Cannonlake): Remove CLWB.
10160 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10162         PR tree-optimization/84841
10163         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10164         1 << 3.
10165         (FLOAT_ONE_CONST_TYPE): Define.
10166         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10167         (sort_by_operand_rank): Put entries with higher constant_type last
10168         rather than first to match comments.
10170 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
10172         * config/nios2/nios2.md (movsi_internal): Fix thinko in
10173         split predicate.
10175 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10177         PR c++/79085
10178         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10179         check and use address of target always.
10181 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
10183         PR target/84574
10184         * config/i386/i386.c (indirect_thunk_needed): Update comments.
10185         (indirect_thunk_bnd_needed): Likewise.
10186         (indirect_thunks_used): Likewise.
10187         (indirect_thunks_bnd_used): Likewise.
10188         (indirect_return_needed): New.
10189         (indirect_return_bnd_needed): Likewise.
10190         (output_indirect_thunk_function): Add a bool argument for
10191         function return.
10192         (output_indirect_thunk_function): Don't generate alias for
10193         function return thunk.
10194         (ix86_code_end): Call output_indirect_thunk_function to generate
10195         function return thunks.
10196         (ix86_output_function_return): Set indirect_return_bnd_needed
10197         and indirect_return_needed instead of indirect_thunk_bnd_needed
10198         and indirect_thunk_needed.
10200 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
10202         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10203         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10204         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10206 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
10207             Paul Hua <paul.hua.gm@gmail.com>
10209         PR c/84852
10210         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10212 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
10214         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10215         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10216         resp. SFmode cases.
10218 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
10220         PR target/84711
10221         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10222         instead of GET_MODE_SIZE when comparing Units.
10224 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10226         PR target/68256
10227         * varasm.c (hash_section): Return an unchangeble hash value
10228         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10229         Return !aarch64_can_use_per_function_literal_pools_p ().
10231 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10233         PR target/84860
10234         * optabs.c (emit_conditional_move): Pass address of cmode's copy
10235         rather than address of cmode as last argument to prepare_cmp_insn.
10237 2018-03-15  Julia Koval  <julia.koval@intel.com>
10239         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10240         F_AVX512VNNI, F_AVX512BITALG): New.
10242 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
10244         PR target/83451
10245         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
10246         insn for floating-point loads and stores.
10248 2018-03-14  Carl Love  <cel@us.ibm.com>
10250         * config/rs6000/rs6000-c.c: Add macro definitions for
10251         ALTIVEC_BUILTIN_VEC_PERMXOR.
10252         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10253         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10254         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10255         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10256         UNSPEC_VPERMXOR.
10257         * config/doc/extend.texi: Add prototypes for vec_permxor.
10259 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
10261         PR c/84852
10262         * diagnostic-show-locus.c (class layout_point): Convert m_line
10263         from int to linenum_type.
10264         (line_span::comparator): Use linenum "compare" function when
10265         comparing line numbers.
10266         (test_line_span): New function.
10267         (layout_range::contains_point): Convert param "row" from int to
10268         linenum_type.
10269         (layout_range::intersects_line_p): Likewise.
10270         (layout::will_show_line_p): Likewise.
10271         (layout::print_source_line): Likewise.
10272         (layout::should_print_annotation_line_p): Likewise.
10273         (layout::print_annotation_line): Likewise.
10274         (layout::print_leading_fixits): Likewise.
10275         (layout::annotation_line_showed_range_p): Likewise.
10276         (struct line_corrections): Likewise for field m_row.
10277         (line_corrections::line_corrections): Likewise for param "row".
10278         (layout::print_trailing_fixits): Likewise.
10279         (layout::get_state_at_point): Likewise.
10280         (layout::get_x_bound_for_row): Likewise.
10281         (layout::print_line): Likewise.
10282         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10283         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10284         * input.c (selftest::test_linenum_comparisons): New function.
10285         (selftest::input_c_tests): Call it.
10286         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10287         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10288         * selftest.h (ASSERT_GT): New macro.
10289         (ASSERT_GT_AT): New macro.
10290         (ASSERT_LT): New macro.
10291         (ASSERT_LT_AT): New macro.
10293 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
10295         PR rtl-optimization/84780
10296         * combine.c (distribute_links): Don't make a link based on pc_rtx.
10298 2018-03-14  Martin Liska  <mliska@suse.cz>
10300         * tree.c (record_node_allocation_statistics): Use
10301         get_stats_node_kind.
10302         (get_stats_node_kind): New function extracted from
10303         record_node_allocation_statistics.
10304         (free_node): Use get_stats_node_kind.
10306 2018-03-14  Richard Biener  <rguenther@suse.de>
10308         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10309         that the value-set of ANTIC_IN doesn't grow.
10311         Revert
10312         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10313         member.
10314         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10315         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10317 2018-03-14  Julia Koval  <julia.koval@intel.com>
10319         * config.gcc (icelake-client, icelake-server): New.
10320         (icelake): Remove.
10321         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10322         (initial_ix86_arch_features): Ditto.
10323         (PTA_SKYLAKE): Add SGX.
10324         (PTA_ICELAKE): Remove.
10325         (PTA_ICELAKE_CLIENT): New.
10326         (PTA_ICELAKE_SERVER): New.
10327         (ix86_option_override_internal): Split up icelake on icelake client and
10328         icelake server.
10329         (get_builtin_code_for_version): Ditto.
10330         (fold_builtin_cpu): Ditto.
10331         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10332         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10333         * config/i386/i386.h (processor_type): Ditto.
10334         * doc/invoke.texi: Ditto.
10336 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
10338         PR sanitizer/83392
10339         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10340         INTEGER_CST offset, add it together with bitpos / 8 and
10341         sign extend based on POINTER_SIZE.
10343         PR target/84844
10344         Revert
10345         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
10347         PR target/78090
10348         * config/i386/constraints.md (Yc): New register constraint.
10349         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10350         Use Yc constraint for alternative 2 of operand 0.  Remove
10351         preferred_for_speed attribute.
10353 2018-03-14  Richard Biener  <rguenther@suse.de>
10355         PR tree-optimization/84830
10356         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10357         with the old one to avoid oscillations.
10359 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
10361         PR target/83712
10362         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10363         pseudos.
10364         (assign_by_spills): Return a flag of reload assignment failure.
10365         Do not process the reload assignment failures.  Do not spill other
10366         reload pseudos if they has the same reg class.  Update n if
10367         necessary.
10368         (lra_assign): Add a return arg.  Set up from the result of
10369         assign_by_spills call.
10370         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10371         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10372         usage_insns if it is not NULL.
10373         (spill_hard_reg_in_range): New function.
10374         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10375         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10376         function prototypes.
10377         (lra_assign): Change prototype.
10378         * lra.c (lra): Add code to deal with fails by splitting hard reg
10379         live ranges.
10381 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
10383         * config/riscv/riscv.opt (mrelax): New option.
10384         * config/riscv/riscv.c (riscv_file_start): Emit ".option
10385         "norelax" when riscv_mrelax is disabled.
10386         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
10388 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10390         PR target/84743
10391         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
10392         reassociation for int modes.
10394 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10396         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10397         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10398         for big-endian.
10399         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10400         * config/aarch64/aarch64-sve.md
10401         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10402         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10403         (*extend<mode><Vwide>2): Rename to...
10404         (aarch64_sve_extend<mode><Vwide>2): ...this.
10405         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10406         renaming the old pattern to...
10407         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
10408         unsigned packs.
10409         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10410         define_expand, renaming the old pattern to...
10411         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10412         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10413         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10414         account when deciding which SVE instruction the optab should use.
10415         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10417 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10419         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10420         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10421         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10422         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10423         (tlsdesc_small_<mode>): Turn a define_expand and use
10424         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
10425         (tlsdesc_small_advsimd_<mode>): ...this.
10426         (tlsdesc_small_sve_<mode>): New pattern.
10428 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10430         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10431         (UNSPEC_UMUL_HIGHPART): New constants.
10432         (MUL_HIGHPART): New int iteraor.
10433         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10434         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10435         define_expand.
10436         (*<su>mul<mode>3_highpart): New define_insn.
10438 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10440         PR lto/84805
10441         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10442         incomplete types.
10444 2018-03-13  Martin Liska  <mliska@suse.cz>
10446         PR ipa/84658.
10447         * (sem_item_optimizer::sem_item_optimizer): Initialize new
10448         vector.
10449         (sem_item_optimizer::~sem_item_optimizer): Release it.
10450         (sem_item_optimizer::merge_classes): Register variable aliases.
10451         (sem_item_optimizer::fixup_pt_set): New function.
10452         (sem_item_optimizer::fixup_points_to_sets): Likewise.
10453         * ipa-icf.h: Declare new variables and functions.
10455 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
10457         PR middle-end/84834
10458         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10459         integer_pow2p@2 and test integer_pow2p in condition.
10460         (A < 0 ? C : 0): Similarly for @1.
10462         PR middle-end/84831
10463         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10464         characters starting at p contain '\0' character, don't look beyond
10465         that.
10467         PR target/84827
10468         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10469         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10471         PR target/84828
10472         * reg-stack.c (change_stack): Change update_end var from int to
10473         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10474         also call set_block_for_insn on the newly added insns and rescan.
10476         PR target/84786
10477         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10478         on the last operand.
10480         PR c++/84704
10481         * tree.c (stabilize_reference_1): Return save_expr (e) for
10482         STATEMENT_LIST even if it doesn't have side-effects.
10484 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
10486         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10488 2018-03-12  Renlin Li  <renlin.li@arm.com>
10490         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10491         aarch64_output_scalar_simd_mov_immediate.
10493 2018-03-12  Martin Sebor  <msebor@redhat.com>
10495         PR tree-optimization/83456
10496         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10497         for perfectly overlapping calls to memcpy.
10498         (gimple_fold_builtin_memory_chk): Same.
10499         (gimple_fold_builtin_strcpy): Handle no-warning.
10500         (gimple_fold_builtin_stxcpy_chk): Same.
10501         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10503 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10505         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10506         parameter.  Use it for SFmode.
10507         (rs6000_function_arg_advance_1): Adjust.
10508         (rs6000_function_arg): Adjust.
10509         (rs6000_gimplify_va_arg): Pass false for that new parameter.
10511 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10513         PR rtl-optimization/84169
10514         PR rtl-optimization/84780
10515         * combine.c (can_combine_p): Check for a 2-insn combination whether
10516         the destination register is used between the two insns, too.
10518 2018-03-12  Richard Biener  <rguenther@suse.de>
10520         PR tree-optimization/84803
10521         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10522         for refs DR analysis didn't process.
10524 2018-03-12  Richard Biener  <rguenther@suse.de>
10526         PR tree-optimization/84777
10527         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10528         force-vectorize loops ignore whether we are optimizing for size.
10530 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10532         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
10533         (TARGET_MD_ASM_ADJUST): Define.
10535 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
10536             Kito Cheng  <kito.cheng@gmail.com>
10537             Chung-Ju Wu  <jasonwucj@gmail.com>
10539         * config/nds32/nds32.c (nds32_compute_stack_frame,
10540         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
10541         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
10542         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
10543         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
10544         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
10545         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
10546         * config/nds32/nds32.md (prologue, epilogue): Use macro
10547         NDS32_V3PUSH_AVAILABLE_P to do checking.
10549 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
10551         PR debug/58150
10552         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
10553         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
10554         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
10555         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
10556         addition of most attributes on !orig_type_die or the attribute not
10557         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
10559 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10560             Chung-Ju Wu  <jasonwucj@gmail.com>
10562         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
10563         __NDS32_VH__ macro.
10564         * config/nds32/nds32.opt (mvh): New option.
10566 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10567             Chung-Ju Wu  <jasonwucj@gmail.com>
10569         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
10570         function.
10571         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
10572         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
10573         definition.
10575 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10576             Chung-Ju Wu  <jasonwucj@gmail.com>
10578         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
10579         function.
10580         * config/nds32/nds32-multiple.md (strlensi): New pattern.
10581         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
10583 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
10584             Kito Cheng  <kito.cheng@gmail.com>
10585             Chung-Ju Wu  <jasonwucj@gmail.com>
10587         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
10588         UNSPEC_FFMISM and UNSPEC_FLMISM.
10589         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
10590         for ffb, ffmism and flmism.
10591         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
10592         (unspec_ffmism): Ditto.
10593         (unspec_flmism): Ditto.
10594         (nds32_expand_builtin_impl): Check if string extension is available.
10595         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
10596         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
10598 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
10600         Reverting patch:
10601         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
10603         PR target/83712
10604         * lra-assigns.c (assign_by_spills): Return a flag of reload
10605         assignment failure.  Do not process the reload assignment
10606         failures.  Do not spill other reload pseudos if they has the same
10607         reg class.
10608         (lra_assign): Add a return arg.  Set up from the result of
10609         assign_by_spills call.
10610         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10611         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10612         usage_insns if it is not NULL.
10613         (spill_hard_reg_in_range): New function.
10614         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10615         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10616         function prototypes.
10617         (lra_assign): Change prototype.
10618         * lra.c (lra): Add code to deal with fails by splitting hard reg
10619         live ranges.
10621 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
10623         PR target/84807
10624         * config/i386/i386.opt: Replace Enforcment with Enforcement.
10626 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
10628         PR debug/84620
10629         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
10630         (dw_val_node): Add val_symbolic_view.
10631         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
10632         (symview_upper_bound): New.
10633         (new_line_info_table): Initialize symviews_since_reset.
10634         (dwarf2out_source_line): Count symviews_since_reset and set
10635         symview_upper_bound.
10636         (dw_val_equal_p): Handle symview.
10637         (add_AT_symview): New.
10638         (print_dw_val): Handle symview.
10639         (attr_checksum, attr_checksum_ordered): Likewise.
10640         (same_dw_val_p, size_of_die): Likewise.
10641         (value_format, output_die): Likewise.
10642         (add_high_low_attributes): Use add_AT_symview for entry_view.
10643         (dwarf2out_finish): Reset symview_upper_bound, clear
10644         zero_view_p.
10646 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
10648         PR target/83969
10649         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
10650         Add strict argument and use it.
10651         (rs6000_split_multireg_move): Update for new strict argument.
10652         (mem_operand_gpr): Disallow all non-offsettable addresses.
10653         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
10655 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
10657         PR target/84772
10658         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
10659         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
10660         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
10662         PR c++/84767
10663         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
10664         decl, use remap_type if we want to use the type.
10666 2018-03-09  Martin Sebor  <msebor@redhat.com>
10668         PR tree-optimization/84526
10669         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10670         Remove dead code.
10671         (builtin_access::generic_overlap): Be prepared to handle non-array
10672         base objects.
10674 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
10676         PR rtl-optimization/84682
10677         * lra-constraints.c (process_address_1): Check is_address flag
10678         for address constraints.
10679         (process_alt_operands): Likewise.
10680         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
10681         preprocess_constraints.
10682         * recog.h (preprocess_constraints): Add oploc parameter.
10683         Adjust callers.
10684         * recog.c (preprocess_constraints): Test address_operand for
10685         CT_ADDRESS constraints.
10687 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
10689         PR target/83712
10690         * lra-assigns.c (assign_by_spills): Return a flag of reload
10691         assignment failure.  Do not process the reload assignment
10692         failures.  Do not spill other reload pseudos if they has the same
10693         reg class.
10694         (lra_assign): Add a return arg.  Set up from the result of
10695         assign_by_spills call.
10696         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10697         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10698         usage_insns if it is not NULL.
10699         (spill_hard_reg_in_range): New function.
10700         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10701         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10702         function prototypes.
10703         (lra_assign): Change prototype.
10704         * lra.c (lra): Add code to deal with fails by splitting hard reg
10705         live ranges.
10707 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10709         PR target/83193
10710         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
10711         Accept complain bool parameter.  Only emit errors if it is true.
10712         (arm_parse_cpu_option_name): Likewise.
10713         (arm_target_thumb_only): Adjust callers of the above.
10714         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
10715         prototype to take a default true bool parameter.
10716         (arm_parse_arch_option_name): Likewise.
10718 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
10719             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
10721         PR jit/64089
10722         PR jit/84288
10723         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
10724         * configure: Regenerate.
10725         * configure.ac ("linker --version-script option"): New.
10726         ("linker soname option"): New.
10728 2018-03-09  Richard Biener  <rguenther@suse.de>
10730         PR tree-optimization/84775
10731         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
10732         immediate uses of predicate stmts and mark them modified.
10734         Revert
10735         PR tree-optimization/84178
10736         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10737         to caller.
10738         (version_loop_for_if_conversion): Delay update_ssa call.
10739         (tree_if_conversion): Delay update_ssa until after predicate
10740         insertion.
10742 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
10744         PR target/84763
10745         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
10746         when the function accesses prior frames.
10748 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
10750         PR debug/84456
10751         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
10752         gen_llsym, otherwise call maybe_gen_llsym.
10754         PR inline-asm/84742
10755         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
10756         has ',' character inside of it.
10758 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10760         PR target/84748
10761         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
10762         as clobbering CC_REGNUM.
10764 2018-03-08  Richard Biener  <rguenther@suse.de>
10766         PR middle-end/84552
10767         * tree-scalar-evolution.c: Include tree-into-ssa.h.
10768         (follow_copies_to_constant): Do not follow SSA names registered
10769         for update.
10771 2018-03-08  Richard Biener  <rguenther@suse.de>
10773         PR tree-optimization/84178
10774         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10775         to caller.
10776         (version_loop_for_if_conversion): Delay update_ssa call.
10777         (tree_if_conversion): Delay update_ssa until after predicate
10778         insertion.
10780 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
10782         PR tree-optimization/84178
10783         * tree-if-conv.c (release_bb_predicate): Remove the
10784         the assertion that the stmts have NULL use_ops.
10785         Discard the statements, asserting that they haven't
10786         yet been added to a BB.
10788 2018-03-08  Richard Biener  <rguenther@suse.de>
10790         PR tree-optimization/84746
10791         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
10792         (phi_translate): Pass in destination ANTIC_OUT set.
10793         (phi_translate_1): Likewise.  For a simplified result lookup
10794         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
10795         (phi_translate_set): Adjust.
10796         (do_pre_regular_insertion): Likewise.
10797         (do_pre_partial_partial_insertion): Likewise.
10799 2018-03-08  Martin Liska  <mliska@suse.cz>
10801         PR gcov-profile/84735
10802         * doc/gcov.texi: Document usage of profile files.
10803         * gcov-io.h: Document changes in the format.
10805 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
10807         PR debug/84404
10808         PR debug/84408
10809         * dwarf2out.c (struct dw_line_info_table): Update comments for
10810         view == -1.
10811         (FORCE_RESET_NEXT_VIEW): New.
10812         (FORCE_RESETTING_VIEW_P): New.
10813         (RESETTING_VIEW_P): Check for -1 too.
10814         (ZERO_VIEW_P): Likewise.
10815         (new_line_info_table): Force-reset next view.
10816         (dwarf2out_begin_function): Likewise.
10817         (dwarf2out_source_line): Simplify zero_view_p initialization.
10818         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
10819         view directly.  Omit view when omitting .loc at line 0.
10821 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
10823         PR tree-optimization/84740
10824         * tree-switch-conversion.c (process_switch): Call build_constructors
10825         only if info.phi_count is non-zero.
10827         PR tree-optimization/84739
10828         * tree-tailcall.c (find_tail_calls): Check call arguments against
10829         DECL_ARGUMENTS (current_function_decl) rather than
10830         DECL_ARGUMENTS (func) when checking for tail recursion.
10832 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
10834         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
10835         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
10836         Volker Reichelt's entry and add entries for people that perform
10837         GCC fuzzy testing and report numerous bugs.
10839 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
10841         PR target/82411
10842         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
10843         readonly data in sdata, if that is disabled.
10844         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
10845         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
10846         -mreadonly-in-sdata option.
10848 2018-03-07  Martin Sebor  <msebor@redhat.com>
10850         PR tree-optimization/84468
10851         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
10852         basic block when looking for nul assignment.
10854 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
10856         PR target/84277
10857         * except.h (output_function_exception_table): Adjust prototype.
10858         * except.c (output_function_exception_table): Remove FNNAME parameter
10859         and add SECTION parameter.  Ouput one part of the table at a time.
10860         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
10861         the first part of the exception table and emit unwind directives.
10862         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
10863         (i386_pe_seh_cold_init): Likewise.
10864         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
10865         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
10866         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
10867         (ix86_output_call_insn): Emit a nop in one more case for SEH.
10868         * config/i386/winnt.c: Include except.h.
10869         (struct seh_frame_state): Add reg_offset, after_prologue and
10870         in_cold_section fields.
10871         (i386_pe_seh_end_prologue): Set seh->after_prologue.
10872         (i386_pe_seh_cold_init): New function.
10873         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
10874         to seh->in_cold_section.
10875         (seh_emit_push): Record the offset of the push.
10876         (seh_emit_save): Record the offet of the save.
10877         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
10878         Test seh->after_prologue to disregard the epilogue.
10879         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
10880         (i386_pe_end_cold_function): New function.
10882 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
10884         PR fortran/84565
10885         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
10886         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
10888         PR c++/84704
10889         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
10890         on tmp_var.
10891         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
10892         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
10894         PR middle-end/84723
10895         * multiple_target.c: Include tree-inline.h and intl.h.
10896         (expand_target_clones): Diagnose and fail if node->definition and
10897         !tree_versionable_function_p (node->decl).
10899 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
10901         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
10902         sprint_ul.
10903         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
10904         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10905         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
10907 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10909         PR target/84710
10910         * combine.c (try_combine): Use reg_or_subregno instead of handling
10911         just paradoxical SUBREGs and REGs.
10913 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
10915         * config/arc/arc.c (arc_finalize_pic): Remove function.
10916         (arc_must_save_register): We use single base PIC register, remove
10917         checks to save/restore the PIC register.
10918         (arc_expand_prologue): Likewise.
10919         * config/arc/arc-protos.h (arc_set_default_type_attributes):
10920         Remove.
10921         (arc_verify_short): Likewise.
10922         (arc_attr_type): Likewise.
10923         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
10924         (walk_stores): Likewise.
10925         (arc_address_cost): Make it static.
10926         (arc_verify_short): Likewise.
10927         (branch_dest): Likewise.
10928         (arc_attr_type): Likewise.
10929         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
10930         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
10931         (arc_final_prescan_insn): Remove inserting the nops due to
10932         hardware hazards.  It is done in reorg step.
10933         (insn_length_variant_t): Remove.
10934         (insn_length_parameters_t): Likewise.
10935         (arc_insn_length_parameters): Likewise.
10936         (arc_get_insn_variants): Likewise.
10937         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10939 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10941         PR inline-asm/84683
10942         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10943         assertion failure.
10945         PR tree-optimization/84687
10946         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10947         on new_node->decl.
10948         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10950 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10952         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10953         Rename to ppc_speculation_barrier.
10954         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10955         __builtin_ppc_speculation_barrier.
10957 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10959         PR target/84700
10960         * combine.c (combine_simplify_rtx): Don't try to simplify if
10961         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10962         are equal to x.
10964 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
10966         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10967         to 32 bytes when compiling for POWER9.
10969 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10971         PR target/84564
10972         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10973         regparm >= 3 with no arg reg available also for calls with
10974         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
10976         PR target/84524
10977         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10978         orig,vex.
10979         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
10981 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
10983         PR target/84264
10984         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10986 2018-03-05  Richard Biener  <rguenther@suse.de>
10988         PR tree-optimization/84486
10989         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10990         When inserting a __builtin_assume_aligned call set the LHS
10991         SSA name alignment info accordingly.
10993 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
10995         PR tree-optimization/84114
10996         * config/aarch64/aarch64.c (aarch64_reassociation_width)
10997         Avoid reassociation of FLOAT_MODE addition.
10999 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
11001         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11002         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11003         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11004         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11005         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11006         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11007         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11008         and -mwbnoinvd.
11009         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11010         __builtin_ia32_wbinvd): New builtins.
11011         (SPECIAL_ARGS2): New.
11012         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11013         (SPECIAL_ARGS2): New.
11014         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11015         (ix86_valid_target_attribute_inner_p): Ditto.
11016         (ix86_init_mmx_sse_builtins): Add special_args2.
11017         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11018         TARGET_WBNOINVD_P): New.
11019         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11020         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11021         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11022         * config/i386/immintrin.h (_wbinvd): New intrinsic.
11023         * config/i386/pconfigintrin.h: New file.
11024         * config/i386/wbnoinvdintrin.h: Ditto.
11025         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11026         wbnoinvdintrin.h.
11027         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11029 2018-03-05  Richard Biener  <rguenther@suse.de>
11031         PR tree-optimization/84670
11032         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11033         member.
11034         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11035         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11036         (compute_antic_aux): Only assert the number of values in ANTIC_IN
11037         doesn't grow if all successors (recursively) were visited at least
11038         once.
11040 2018-03-05  Richard Biener  <rguenther@suse.de>
11042         PR tree-optimization/84650
11043         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11044         if executed in the loop pipeline.
11046 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
11048         * doc/configfiles.texi (Configuration Files): Move info about
11049         conditionalizing $target-protos.h to...
11050         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
11051         differs from $target-protos.h.
11053 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
11054             Chung-Ju Wu  <jasonwucj@gmail.com>
11056         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11057         * config/nds32/nds32-multiple.md (setmemsi): Define.
11058         * config/nds32/nds32-memory-manipulation.c
11059         (nds32_gen_dup_4_byte_to_word_value): New.
11060         (emit_setmem_word_loop): New.
11061         (emit_setmem_byte_loop): New.
11062         (nds32_expand_setmem_loop): New.
11063         (nds32_expand_setmem_loop_v3m): New.
11064         (nds32_expand_setmem_unroll): New.
11065         (nds32_expand_setmem): New.
11067 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11068             Chung-Ju Wu  <jasonwucj@gmail.com>
11070         * config/nds32/nds32-memory-manipulation.c
11071         (nds32_emit_load_store): New.
11072         (nds32_emit_post_inc_load_store): New.
11073         (nds32_emit_mem_move): New.
11074         (nds32_emit_mem_move_block): New.
11075         (nds32_expand_movmemsi_loop_unknown_size): New.
11076         (nds32_expand_movmemsi_loop_known_size): New.
11077         (nds32_expand_movmemsi_loop): New.
11078         (nds32_expand_movmemsi_unroll): New.
11079         (nds32_expand_movmemqi): Rename ...
11080         (nds32_expand_movmemsi): ... to this.
11081         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11082         (movmemsi): ... to this.
11083         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11084         (nds32_expand_movmemsi): ... to this.
11086 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11087             Monk Chiang  <sh.chiang04@gmail.com>
11088             Chung-Ju Wu  <jasonwucj@gmail.com>
11090         * config/nds32/nds32-protos.h
11091         (nds32_expand_load_multiple): New arguments.
11092         (nds32_expand_store_multiple): Ditto.
11093         (nds32_valid_multiple_load_store): Rename ...
11094         (nds32_valid_multiple_load_store_p): ... to this.
11095         * config/nds32/nds32-memory-manipulation.c
11096         (nds32_expand_load_multiple): Refine implementation.
11097         (nds32_expand_store_multiple): Ditto.
11098         * config/nds32/nds32-multiple.md
11099         (load_multiple): Update nds32_expand_load_multiple interface.
11100         (store_multiple): Update nds32_expand_store_multiple interface.
11101         * config/nds32/nds32-predicates.c
11102         (nds32_valid_multiple_load_store): Rename ...
11103         (nds32_valid_multiple_load_store_p): ... to this and refine
11104         implementation.
11105         * config/nds32/predicates.md
11106         (nds32_load_multiple_and_update_address_operation): New predicate.
11107         (nds32_store_multiple_and_update_address_operation): New predicate.
11109 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11110             Chung-Ju Wu  <jasonwucj@gmail.com>
11112         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11113         (combo): New attribute.
11114         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11116 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11118         * config/nds32/nds32.opt: Change -mcmodel= default value.
11120 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
11121             Monk Chiang  <sh.chiang04@gmail.com>
11122             Chung-Ju Wu  <jasonwucj@gmail.com>
11124         * config/nds32/constants.md (unspec_element): New enum.
11125         * config/nds32/constraints.md (Umw): New constraint.
11126         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11127         * config/nds32/nds32-intrinsic.md: Likewise.
11128         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11129         (nds32_valid_smw_lwm_base_p): New.
11130         (nds32_output_smw_single_word): New.
11131         (nds32_output_lmw_single_word): New.
11132         (nds32_expand_unaligned_load): New.
11133         (nds32_expand_unaligned_store): New.
11134         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11135         (nds32_output_smw_single_word): Declare.
11136         (nds32_output_lmw_single_word): Declare.
11137         (nds32_expand_unaligned_load): Declare.
11138         (nds32_expand_unaligned_store): Declare.
11139         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11140         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11141         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11142         NDS32_BUILTIN_UASTORE_DW.
11143         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11144         predicate.
11146 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
11147             Kito Cheng  <kito.cheng@gmail.com>
11148             Chung-Ju Wu  <jasonwucj@gmail.com>
11150         * config/nds32/nds32-intrinsic.c
11151         (nds32_expand_builtin_null_ftype_reg): Delete.
11152         (nds32_expand_builtin_reg_ftype_imm): Ditto.
11153         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11154         (nds32_read_argument): New.
11155         (nds32_legitimize_target): Ditto.
11156         (nds32_legitimize_argument): Ditto.
11157         (nds32_check_constant_argument): Ditto.
11158         (nds32_expand_unop_builtin): Ditto.
11159         (nds32_expand_unopimm_builtin): Ditto.
11160         (nds32_expand_binop_builtin): Ditto.
11161         (nds32_builtin_decl_impl): Ditto.
11162         (builtin_description): Ditto.
11163         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11164         (nds32_init_builtins_impl): Ditto.
11165         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11166         (nds32_builtin_decl): New.
11167         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11168         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11170 2018-03-02  Jeff Law  <law@redhat.com>
11172         * reorg.c (stop_search_p): Handle DEBUG_INSN.
11173         (redundant_insn, fill_simple_delay_slots): Likewise.
11174         (fill_slots_from_thread): Likewise.
11175         * resource.c (mark_referenced_resources): Likewise.
11176         (mark_set_resources, find_dead_or_set_registers): Likewise.
11178 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11180         * substring-locations.h (format_warning_va): Formatting fix for
11181         ATTRIBUTE_GCC_DIAG.
11182         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11183         argument.
11184         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11185         * substring-locations.c: Include intl.h.
11186         (format_warning_va): Turned into small wrapper around
11187         format_warning_n_va, renamed to ...
11188         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11189         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11190         use ngettext.
11191         (format_warning_at_substring_n): New function.
11192         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11193         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
11194         format_warning_at_substring with just a shorter name instead of
11195         const function pointer.
11196         (fmtwarn_n): New function.
11197         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11198         appropriate, get rid of all the fmtstr temporaries, move conditionals
11199         with G_() wrapped string literals directly into fmtwarn arguments,
11200         cast dir.len to (int), formatting fixes.
11202 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
11204         * doc/invoke.texi: Remove "Cilk Plus" references.
11206 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11207             Richard Biener  <rguenther@suse.de>
11209         PR ipa/84628
11210         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11211         for error or warning attributes if CALL_FROM_THUNK_P is set.
11212         Formatting fixes.
11214 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11216         PR target/56540
11217         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11218         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11220         PR target/56540
11221         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11222         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11224         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11225         instead of -1U in last predictors element's probability member.
11227 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11229         PR ipa/83983
11230         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11231         arguments if they are comparable.
11233 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11235         PR tree-optimization/84634
11236         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11237         masks and masked_loop_p with a single loop_masks, making sure it's
11238         null for bb vectorization.
11240 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11242         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11243         (vect_analyze_data_ref_access): Use loop->safe_len rather than
11244         loop->force_vectorize to check whether there is no alias.
11246 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11248         PR target/84614
11249         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11250         prototypes.
11251         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11252         comments.
11253         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11254         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11255         instead of a loop around prev_real_insn.
11256         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11257         prev_real_insn.
11259         PR inline-asm/84625
11260         * config/i386/i386.c (ix86_print_operand): Use conditional
11261         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11262         zero vector.
11264 2018-03-02  Richard Biener  <rguenther@suse.de>
11266         PR tree-optimization/84427
11267         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11268         (bitmap_set_subtract_values): Rewrite to handle multiple
11269         exprs per value.
11270         (clean): Likewise.
11271         (prune_clobbered_mems): Likewise.
11272         (phi_translate): Take edge instead of pred/phiblock.
11273         (phi_translate_1): Likewise.
11274         (phi_translate_set): Likewise.  Insert all translated
11275         exprs for a value into the set, keeping possibly multiple
11276         expressions per value.
11277         (compute_antic_aux): Adjust for phi_translate changes.
11278         When intersecting union the expressions and prune those
11279         not in the final value set, keeping possibly multiple
11280         expressions per value.  Do not use value-insertion
11281         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11282         all expressions.  Add verification that the value-sets
11283         only shrink during iteration.
11284         (compute_partial_antic_aux): Adjust for the phi_translate changes.
11285         (do_pre_regular_insertion): Likewise.
11286         (do_pre_partial_partial_insertion): Likewise.
11288 2018-03-02  Richard Biener  <rguenther@suse.de>
11290         PR target/82005
11291         * config/darwin.c (saved_debug_info_level): New static global.
11292         (darwin_asm_lto_start): Disable debug info generation for LTO out.
11293         (darwin_asm_lto_end): Restore debug info generation settings.
11295 2018-03-01  Martin Liska  <mliska@suse.cz>
11297         PR sanitizer/82484
11298         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11299         volatile arguments.
11301 2018-03-01  Richard Biener  <rguenther@suse.de>
11303         PR debug/84645
11304         * dwarf2out.c (gen_variable_die): Properly handle late VLA
11305         type annotation with LTO when debug was disabled at compile-time.
11307 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
11309         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11310         XINT with INTVAL.
11311         (mips_final_postscan_insn): Likewise.
11313 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
11315         PR rtl-optimization/84528
11316         * alias.c (init_alias_target): Add commentary.
11317         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11318         a unique base value if the frame pointer is not eliminated
11319         to the stack pointer.
11321 2018-03-01  Tom de Vries  <tom@codesourcery.com>
11323         PR rtl-optimization/83327
11324         * lra-int.h (hard_regs_spilled_into): Declare.
11325         * lra.c (hard_regs_spilled_into): Define.
11326         (init_reg_info): Init hard_regs_spilled_into.
11327         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11328         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11329         (process_bb_lives): Handle hard_regs_spilled_into.
11330         (lra_create_live_ranges_1): Before doing liveness propagation, clear
11331         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11333 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
11335         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11336         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11337         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11338         * config/rs6000/aix72.h: New file.
11340 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
11342         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11343         instead of warning_at with conditional singular and plural messages
11344         where possible.
11346         PR target/52991
11347         * stor-layout.c (update_alignment_for_field): For
11348         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11349         && !DECL_PACKED (field), do the alignment update, just use
11350         only desired_align instead of MAX (type_align, desired_align)
11351         as the alignment.
11352         (place_field): Don't do known_align < desired_align handling
11353         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11354         is non-NULL, instead do it after rli->prev_field handling and
11355         only if not within a bitfield word.  For DECL_PACKED (field)
11356         use type_align of BITS_PER_UNIT.
11358 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
11360         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11361         superfluous parentheses and trailing spaces.
11363 2018-02-28  Richard Biener  <rguenther@suse.de>
11365         PR tree-optimization/84584
11366         * graphite-scop-detection.c (scop_detection::add_scop): Discard
11367         SCoPs with fake exit edge.
11369 2018-02-28  Martin Liska  <mliska@suse.cz>
11371         PR testsuite/84597
11372         * timevar.c (timer::print): Fix format to properly print 100%
11373         values.
11375 2018-02-28  Richard Biener  <rguenther@suse.de>
11377         PR middle-end/84607
11378         * genmatch.c (capture_info::walk_match): Do not mark
11379         captured expressions without operands as expr_p given
11380         they act more like predicates and should be subject to
11381         "lost tail" side-effect preserving.
11383 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
11385         PR rtl-optimization/81611
11386         * auto-inc-dec.c (attempt_change): Move dead note from
11387         mem_insn if it's the next use of regno
11388         (find_address): Take address use of reg holding
11389         non-incremented value.  Add parm to limit search to the named
11390         reg only.
11391         (merge_in_block): Attempt to use a mem insn that is the next
11392         use of the original regno.
11394 2018-02-27  Martin Sebor  <msebor@redhat.com>
11396         PR c++/83871
11397         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11398         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11400 2018-02-27  Martin Sebor  <msebor@redhat.com>
11402         PR translation/84207
11403         * diagnostic-core.h (warning_n, error_n, inform_n): Change
11404         n argument to unsigned HOST_WIDE_INT.
11405         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11406         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
11407         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11408         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11410 2018-02-27  Richard Biener  <rguenther@suse.de>
11412         PR tree-optimization/84512
11413         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11414         Do not use the estimate returned from record_stmt_cost for
11415         the scalar iteration cost but sum properly using add_stmt_cost.
11417 2018-02-27  Richard Biener  <rguenther@suse.de>
11419         PR tree-optimization/84466
11420         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11421         Adjust last change to less strictly validate use operands.
11423 2018-02-27  Martin Liska  <mliska@suse.cz>
11425         PR gcov-profile/84548
11426         * gcov.c (process_file): Allow partial overlap and consider it
11427         also as group functions.
11428         (output_lines): Properly calculate range of lines for a group.
11430 2018-02-27  Martin Liska  <mliska@suse.cz>
11432         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11433         'ggc' suffixes.  Change first column width.
11434         (timer::print): Fix formatting of the column.
11436 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
11438         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11439         preserve inline entry blocks for the sake of debug inline
11440         entry point markers alone.
11441         (remove_unused_locals): Suggest in comments a better place to
11442         force the preservation of inline entry blocks that are
11443         otherwise unused, but do not preserve them.
11445 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11447         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11449 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11451         PR target/84039
11452         * config/i386/constraints.md (Bs): Replace
11453         ix86_indirect_branch_register with
11454         TARGET_INDIRECT_BRANCH_REGISTER.
11455         (Bw): Likewise.
11456         * config/i386/i386.md (indirect_jump): Likewise.
11457         (tablejump): Likewise.
11458         (*sibcall_memory): Likewise.
11459         (*sibcall_value_memory): Likewise.
11460         Peepholes of indirect call and jump via memory: Likewise.
11461         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11462         (*sibcall_value_GOT_32): Likewise.
11463         * config/i386/predicates.md (indirect_branch_operand): Likewise.
11464         (GOT_memory_operand): Likewise.
11465         (call_insn_operand): Likewise.
11466         (sibcall_insn_operand): Likewise.
11467         (GOT32_symbol_operand): Likewise.
11468         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11470 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11472         PR rtl-optimization/83496
11473         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11474         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
11475         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11476         redundant insn, if any.
11477         (relax_delay_slots): Likewise.
11478         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11480 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
11482         PR tree-optimization/83965
11483         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11484         that grouped statements are part of a reduction chain.  Return
11485         true if the statement is not marked as a reduction itself but
11486         is part of a group.
11487         (vect_recog_dot_prod_pattern): Don't check whether the statement
11488         is part of a group here.
11489         (vect_recog_sad_pattern): Likewise.
11490         (vect_recog_widen_sum_pattern): Likewise.
11492 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11494         PR debug/84545
11495         * final.c (rest_of_clean_state): Also look for calls inside sequences.
11497 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11499         PR target/84530
11500         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11501         the bool argument.
11502         (ix86_output_indirect_function_return): New prototype.
11503         (ix86_split_simple_return_pop_internal): Likewise.
11504         * config/i386/i386.c (indirect_return_via_cx): New.
11505         (indirect_return_via_cx_bnd): Likewise.
11506         (indirect_thunk_name): Handle return va CX_REG.
11507         (output_indirect_thunk_function): Create alias for
11508         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11509         (ix86_output_indirect_jmp): Remove the bool argument.
11510         (ix86_output_indirect_function_return): New function.
11511         (ix86_split_simple_return_pop_internal): Likewise.
11512         * config/i386/i386.md (*indirect_jump): Don't pass false
11513         to ix86_output_indirect_jmp.
11514         (*tablejump_1): Likewise.
11515         (simple_return_pop_internal): Change it to define_insn_and_split.
11516         Call ix86_split_simple_return_pop_internal to split it for
11517         -mfunction-return=.
11518         (simple_return_indirect_internal): Call
11519         ix86_output_indirect_function_return instead of
11520         ix86_output_indirect_jmp.
11522 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
11524         PR bootstrap/84405
11525         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11526         memset and value initialization afterwards.
11528 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
11530         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
11532 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11534         PR target/84521
11535         * common/config/aarch64/aarch64-common.c
11536         (aarch_option_optimization_table[]): Switch
11537         off fomit-frame-pointer
11539 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
11540             Chung-Ju Wu  <jasonwucj@gmail.com>
11542         * config/nds32/nds32-multiple.md (load_multiple): Disallow
11543         volatile memory.
11544         (store_multiple): Ditto.
11546 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
11548         * config.gcc: Add --with-cpu support for nds32 target.
11549         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
11550         * config/nds32/nds32.opt: Add -mcpu= option.
11552 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
11554         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
11555         isel=yes): Warn for these deprecated options.
11557 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
11559         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
11560         ISA_2_5_MASKS_EMBEDDED.
11562 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
11564         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
11565         p->max as pointers rather than using iterative_hash_expr.
11567 2018-02-23  Carl Love  <cel@us.ibm.com>
11569         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
11570         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
11571         BU_P8V_OVERLOAD_2.
11572         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
11573         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
11574         P8V_BUILTIN_VEC_VUNSIGNED2.
11576 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
11578         PR target/81572
11579         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
11580         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
11581         LRA_UNKNOWN_ALT.
11582         * lra-constraints.c (curr_insn_transform): Set up
11583         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
11584         LRA_UNKNOWN_ALT.
11585         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
11586         * lra-eliminations.c (spill_pseudos): Ditto.
11587         (process_insn_for_elimination): Ditto.
11588         * lra-lives.c (reg_early_clobber_p): Use the new macros.
11589         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
11590         LRA_NON_CLOBBERED_ALT.
11592 2018-02-22  Martin Sebor  <msebor@redhat.com>
11594         PR tree-optimization/84480
11595         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
11596         to maybe_diag_stxncpy_trunc.  Call it.
11597         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
11598         from gimple_fold_builtin_strcpy.  Print inlining stack.
11599         (handle_builtin_stxncpy): Print inlining stack.
11600         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
11602 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
11604         PR target/84176
11605         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
11606         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
11607         and -fcheck-pointer-bounds are used together.
11608         (indirect_thunk_prefix): New enum.
11609         (indirect_thunk_need_prefix): New function.
11610         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
11611         "_nt" instead of "_bnd" for NOTRACK prefix.
11612         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
11613         (output_indirect_thunk_function): Likewise.
11614         (): Likewise.
11615         (ix86_code_end): Update output_indirect_thunk_function calls.
11616         (ix86_output_indirect_branch_via_reg): Replace
11617         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
11618         (ix86_output_indirect_branch_via_push): Likewise.
11619         (ix86_output_function_return): Likewise.
11620         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
11621         incompatible with -fcf-protection=branch and
11622         -fcheck-pointer-bounds.
11624 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
11626         PR target/83335
11627         * config/aarch64/aarch64.c (aarch64_print_address_internal):
11628         Change gcc_assert call to output_operand_lossage.
11630 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
11632         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
11634 2018-02-22  DJ Delorie  <dj@redhat.com>
11635             Sebastian Perta  <sebastian.perta@renesas.com>
11636             Oleg Endo  <olegendo@gcc.gnu.org>
11638         * config/rx/rx.c (rx_rtx_costs): New function.
11639         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
11641 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11643         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
11645 2018-02-22  Martin Liska  <mliska@suse.cz>
11647         PR driver/83193
11648         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
11649         Add "native" as a possible value.
11651 2018-02-22  Martin Liska  <mliska@suse.cz>
11653         PR driver/83193
11654         * config/i386/i386.c (ix86_option_override_internal):
11655         Add "native" as a possible value for -march and -mtune.
11657 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
11659         PR target/84502
11660         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
11661         to all type variants.
11663         PR tree-optimization/84503
11664         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
11665         width as info->bitpos + info->bitsize - start.
11666         (merged_store_group::merge_overlapping): Simplify width computation.
11667         (check_no_overlap): New function.
11668         (imm_store_chain_info::try_coalesce_bswap): Compute expected
11669         start + width and last_order of the group, fail if check_no_overlap
11670         fails.
11671         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
11672         to group if check_no_overlap fails.
11674 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
11676         * config/rs6000/altivec.md: Delete contraint arguments to
11677         define_expand, define_split, and define_peephole2, and in
11678         define_insn_and_split if always unused.
11679         * config/rs6000/darwin.md: Ditto.
11680         * config/rs6000/dfp.md: Ditto.
11681         * config/rs6000/rs6000.md: Ditto.
11682         * config/rs6000/sync.md: Ditto.
11683         * config/rs6000/vector.md: Ditto.
11684         * config/rs6000/vsx.md: Ditto.
11686 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
11688         * config/rs6000/altivec.md: Write output control strings as braced
11689         blocks instead of double-quoted strings.
11690         * config/rs6000/darwin.md: Ditto.
11691         * config/rs6000/rs6000.md: Ditto.
11692         * config/rs6000/vector.md: Ditto.
11693         * config/rs6000/vsx.md: Ditto.
11695 2018-02-21  Jason Merrill  <jason@redhat.com>
11697         PR c++/84314 - ICE with templates and fastcall attribute.
11698         * attribs.c (build_type_attribute_qual_variant): Remove assert.
11700 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
11702         * ipa-cp.c (determine_versionability): Fix comment typos.
11704 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
11706         PR c/84229
11707         * ipa-cp.c (determine_versionability): Do not version functions caling
11708         va_arg_pack.
11710 2018-02-21  Martin Liska  <mliska@suse.cz>
11712         PR driver/83193
11713         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
11714         Add "native" as a possible value.
11715         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
11716         the macro when native cpu detection is available.
11718 2018-02-21  Martin Liska  <mliska@suse.cz>
11720         PR driver/83193
11721         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
11722         Add "native" as a possible value.
11723         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
11724         when native cpu detection is available.
11726 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
11727             Martin Sebor  <msebor@redhat.com>
11729         PR tree-optimization/84478
11730         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
11731         false.
11732         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
11733         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
11734         support which is conservatively correct, for 2 only stay conservative
11735         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
11736         argument to the 2 argument get_range_strlen, adjust 6 arg
11737         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
11738         false.
11739         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
11740         (gimple_fold_builtin_strlen): Pass true as last argument to
11741         get_range_strlen.
11743 2018-02-20  Martin Sebor  <msebor@redhat.com>
11745         PR middle-end/84095
11746         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
11747         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
11748         (builtin_memref::builtin_memref): Factor out parts into
11749         set_base_and_offset and call it.
11751 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
11753         PR middle-end/84406
11754         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
11755         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
11756         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
11757         search at the associated MODE_INT.
11759 2018-02-20  Jeff Law  <law@redhat.com>
11761         PR middle-end/82123
11762         PR tree-optimization/81592
11763         PR middle-end/79257
11764         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
11765         for range data rather than using global data.
11766         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
11767         range data rather than using global data.
11768         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
11769         pass it to children as needed.
11770         (struct directive::fmtresult): Similarly.
11771         (struct directive::set_width): Similarly.
11772         (struct directive::set_precision): Similarly.
11773         (format_integer, format_directive, parse_directive): Similarly.
11774         (format_none): Accept unnamed vr_values parameter.
11775         (format_percent, format_floating, format_character): Similarly.
11776         (format_string, format_plain): Similarly.
11777         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
11778         the EVRP range analyzer for range data rather than using global data.
11779         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
11780         gimple-ssa-evrp-analyze.h
11781         (class sprintf_dom_walker): Add after_dom_children member function.
11782         Add evrp_range_analyzer member.
11783         (sprintf_dom_walker::before_dom_children): Call into the EVRP
11784         range analyzer as needed.
11785         (sprintf_dom_walker::after_dom_children): New member function.
11786         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
11787         if not optimizing.
11788         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
11789         (evrp_range_analyzer::pop_to_marker): Likewise.
11791 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
11793         PR tree-optimization/84419
11794         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
11795         with the required type if its current type is compatible but
11796         different.
11798 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
11800         PR middle-end/82004
11801         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
11802         after vectorization.
11804 2018-02-20  Martin Liska  <mliska@suse.cz>
11806         PR driver/83193
11807         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
11808         possible values if we don't have a hint.
11810 2018-02-20  Martin Liska  <mliska@suse.cz>
11812         PR c/84310
11813         PR target/79747
11814         * final.c (shorten_branches): Build align_tab array with one
11815         more element.
11816         * opts.c (finish_options): Add alignment option limit check.
11817         (MAX_CODE_ALIGN): Likewise.
11818         (MAX_CODE_ALIGN_VALUE): Likewise.
11819         * doc/invoke.texi: Document maximum allowed option value for
11820         all -falign-* options.
11822 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
11824         PR target/84146
11825         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
11826         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
11827         * var-tracking.c (emit_note_insn_var_location): Remove all references
11828         to NOTE_INSN_CALL_ARG_LOCATION.
11829         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
11830         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
11831         Use copy_rtx_if_shared.
11832         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
11833         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
11834         (dwarf2out_var_location): Remove handling of
11835         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
11836         on call_insn.
11837         * final.c (final_scan_insn): Remove all references to
11838         NOTE_INSN_CALL_ARG_LOCATION.
11839         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
11840         before dumping final insns.
11841         * except.c (emit_note_eh_region_end): Remove all references to
11842         NOTE_INSN_CALL_ARG_LOCATION.
11843         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
11844         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
11845         * config/arc/arc.c (hwloop_optimize): Likewise.
11846         * config/arm/arm.c (create_fix_barrier): Likewise.
11847         * config/s390/s390.c (s390_chunkify_start): Likewise.
11848         * config/sh/sh.c (find_barrier): Likewise.
11849         * config/i386/i386.c (rest_of_insert_endbranch,
11850         ix86_seh_fixup_eh_fallthru): Likewise.
11851         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
11852         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
11853         * config/frv/frv.c (frv_function_prologue): Likewise.
11854         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
11855         reg note.
11856         (note_outside_basic_block_p): Remove all references to
11857         NOTE_INSN_CALL_ARG_LOCATION.
11858         * gengtype.c (adjust_field_rtx_def): Likewise.
11859         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
11860         Likewise.
11861         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
11862         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
11864         PR c++/84444
11865         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
11866         is ADDR_EXPR.
11868         PR tree-optimization/84452
11869         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
11870         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
11871         is NULL.
11873 2018-02-19  Martin Liska  <mliska@suse.cz>
11875         PR sanitizer/82183
11876         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
11878 2018-02-19  Martin Liska  <mliska@suse.cz>
11879             Richard Sandiford  <richard.sandiford@linaro.org>
11881         PR tree-optimization/82491
11882         * gimple-fold.c (get_base_constructor): Make earlier bail out
11883         to prevent ubsan.
11885 2018-02-19  Carl Love  <cel@us.ibm.com>
11887         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
11888         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
11889         BU_P8V_OVERLOAD_1.
11890         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
11891         P8V_BUILTIN_VEC_NEG.
11893 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
11895         * config/rl78/rl78.md (movdf): New define expand.
11897 2018-02-19  Martin Liska  <mliska@suse.cz>
11899         PR other/80589
11900         * doc/invoke.texi: Fix typo.
11901         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
11903 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
11905         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
11906         handle rs6000_single_float and rs6000_double_float specially for
11907         e500 family CPUs.
11909 2018-02-16  Jeff Law  <law@redhat.com>
11911         * config/rx/rx.c (add_pop_cfi_notes): New function.;
11912         (pop_regs): Use it.
11914 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11916         PR ipa/84425
11917         * ipa-inline.c (inline_small_functions): Fix a typo.
11919 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11921         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
11923 2018-02-16  Carl Love  <cel@us.ibm.com>
11925         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
11926         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
11927         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
11928         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
11929         expansion to P8V_BUILTIN_VEC_FLOAT2.
11931 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
11933         PR rtl-optimization/70023
11934         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11935         src_regno into account.
11937 2018-02-16  Carl Love  <cel@us.ibm.com>
11939         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11940         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11941         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11942         * config/rs6000/rs6000.c: Remove case statements for
11943         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11944         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11945         and P9V_BUILTIN_VEC_VINSERT4B.
11946         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11947         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11948         * config/rs6000/vsx.md:
11949         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11950         vec_insert4b.
11952 2018-02-16  Carl Love  <cel@us.ibm.com>
11954         * config/rs6000/altivec.h: Add builtin names vec_extract4b
11955         vec_insert4b.
11956         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11957         definitions.
11958         * config/rs6000/rs6000-c.c: Add the definitions for
11959         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11960         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11961         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11962         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
11963         definition for insert4b and define insn *insert3b_internal.
11964         * doc/extend.texi: Add documentation for vec_extract4b.
11966 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11968         * doc/extend.texi (Backwards Compatibility): Mention friend
11969         injection.  Note for-scope is deprecated.
11970         * doc/invoke.texi (-ffriend-injection): Deprecate.
11972 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
11974         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11975         that moved to I2, also allow destinations that are a paradoxical
11976         subreg (instead of a normal reg).
11978 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
11980         PR target/83831
11981         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11982         to QImode.
11984 2018-02-16  Richard Biener  <rguenther@suse.de>
11986         PR tree-optimization/84037
11987         PR tree-optimization/84016
11988         PR target/82862
11989         * config/i386/i386.c (ix86_builtin_vectorization_cost):
11990         Adjust vec_construct for the fact we need additional higher latency
11991         128bit inserts for AVX256 and AVX512 vector builds.
11992         (ix86_add_stmt_cost): Scale vector construction cost for
11993         elementwise loads.
11995 2018-02-16  Richard Biener  <rguenther@suse.de>
11997         PR tree-optimization/84417
11998         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11999         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12000         (non_rewritable_lvalue_p): Likewise, use poly-ints.
12002 2018-02-16  Martin Liska  <mliska@suse.cz>
12004         PR sanitizer/84307
12005         * internal-fn.def (ASAN_CHECK): Set proper flags.
12006         (ASAN_MARK): Likewise.
12008 2018-02-16  Julia Koval  <julia.koval@intel.com>
12010         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12011         from PTA_CANNONLAKE.
12013 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12015         PR target/84272
12016         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12017         Use ++iter rather than iter++ for std::list iterators.
12018         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
12019         defer deleting them until all nodes in the forest are processed.  Do
12020         free even leaf nodes.  Change to_process into auto_vec.
12022         PR bootstrap/84405
12023         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12024         * vec.h (vec_default_construct): Use memset instead of placement new
12025         if BROKEN_VALUE_INITIALIZATION is defined.
12026         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12027         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12028         is defined.
12030         PR rtl-optimization/83723
12031         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12032         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
12033         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
12034         recursive calls.
12035         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12036         callers.
12037         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12039 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
12041         PR rtl-optimization/81443
12042         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12043         from inner REGs to paradoxical SUBREGs.
12045 2018-02-16  Richard Biener  <rguenther@suse.de>
12047         PR tree-optimization/84399
12048         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12049         For operands we can analyze at their definition make sure we can
12050         analyze them at each use as well.
12052 2018-02-16  Richard Biener  <rguenther@suse.de>
12054         PR tree-optimization/84190
12055         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12056         volatile accesses if the decl isn't volatile.
12058 2018-02-15  Jason Merrill  <jason@redhat.com>
12060         PR c++/84314 - ICE with templates and fastcall attribute.
12061         * attribs.c (build_type_attribute_qual_variant): Don't clobber
12062         TYPE_CANONICAL on an existing type.
12064 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
12066         PR tree-optimization/84383
12067         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12068         dstoff nor call operand_equal_p if dstbase is NULL.
12070         PR tree-optimization/84334
12071         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12072         also a CONSTANT_CLASS_P, punt.
12074 2018-02-14  Jim Wilson  <jimw@sifive.com>
12076         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12077         first SMALL_OPERAND check.  New local min_second_step.  Move assert
12078         to where locals are set.  Add TARGET_RVC support.
12079         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12081 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
12083         * doc/invoke.texi: Correct -Wformat-overflow code sample.
12085 2018-02-14  Martin Sebor  <msebor@redhat.com>
12087         PR tree-optimization/83698
12088         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12089         arrays constrain the offset range to their bounds.
12090         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12091         (builtin_access::overlap): Avoid setting the size of overlap if it's
12092         already been set.
12093         (maybe_diag_overlap): Also consider arrays when deciding what values
12094         of offsets to include in diagnostics.
12096 2018-02-14  Martin Sebor  <msebor@redhat.com>
12098         PR c/84108
12099         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12100         that correspond to the kind of a declaration.
12102 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
12104         PR target/83984
12105         * config/pa/pa.md: Load address of PIC label using the linkage table
12106         if the label is nonlocal.
12108 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12110         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12111         warning message if user requests -maltivec=be.
12112         * doc/invoke.texi: Document deprecation of -maltivec=be.
12114 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
12116         PR target/84220
12117         * config/rs6000/rs6000-c.c: Update definitions for
12118         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12119         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12121 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12123         PR target/84239
12124         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12125         add _get_ssp intrinsics. Remove argument from
12126         __builtin_ia32_rdssp[d|q].
12127         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12128         * config/i386/i386-builtin.def: Remove argument from
12129         __builtin_ia32_rdssp[d|q].
12130         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12131         ix86_expand_special_args_builtin for _rdssp[d|q].
12132         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12133         Clear register before usage.
12134         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12135         Add documentation for new _get_ssp and _inc_ssp intrinsics.
12137 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
12139         PR tree-optimization/84357
12140         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12141         operand 1 of an ARRAY_REF too.
12143 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
12145         PR target/83831
12146         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12147         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12148         declarations.
12149         (set_of_reg): New struct.
12150         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12151         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12152         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12153         functions.
12154         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12155         Split into bitclr, bitset, bitinvert patterns if appropriate.
12156         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12157         use rx_fuse_in_memory_bitop.
12158         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12159         to named insn, correct maximum insn length.
12161 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
12163         PR target/79242
12164         * machmode.def: Define a complex mode for PARTIAL_INT.
12165         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12166         MODE_PARTIAL_INT.
12167         * doc/rtl.texi: Document CSPImode.
12168         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12169         handling.
12170         (msp430_hard_regno_nregs_with_padding): Likewise.
12172 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
12174         PR target/84279
12175         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12177 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
12179         PR rtl-optimization/84169
12180         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
12181         we generated a parallel as new i3 and we split that to new i2 and i3
12182         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
12183         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
12184         those to i2, not i1.  Partially rewrite this scan code.
12186 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12188         PR c/82210
12189         * stor-layout.c (place_field): For variable length fields, adjust
12190         offset_align afterwards not just based on the field's alignment,
12191         but also on the size.
12193         PR middle-end/84309
12194         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12195         of exps and logs in the use_exp2 case.
12197 2018-02-13  Jeff Law  <law@redhat.com>
12199         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12200         entry for "vector".
12202         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12203         ARGS as unused.
12205 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
12207         PR debug/84342
12208         PR debug/84319
12209         * common.opt (gas-loc-support, gas-locview-support): New.
12210         (ginline-points, ginternal-reset-location-views): New.
12211         * doc/invoke.texi: Document them.  Use @itemx where intended.
12212         (gvariable-location-views): Adjust.
12213         * target.def (reset_location_view): New.
12214         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12215         (TARGET_RESET_LOCATION_VIEW): New.
12216         * doc/tm.texi: Rebuilt.
12217         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12218         (dwarf2out_default_as_locview_support): New.
12219         (output_asm_line_debug_info): Use option variables.
12220         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12221         (output_loc_list): Likewise.
12222         (add_high_low_attributes): Check option variables.
12223         Don't output entry view attribute in strict mode.
12224         (gen_inlined_subroutine_die): Check option variables.
12225         (dwarf2out_inline_entry): Likewise.
12226         (init_sections_and_labels): Likewise.
12227         (dwarf2out_early_finish): Likewise.
12228         (maybe_reset_location_view): New, from...
12229         (dwarf2out_var_location): ... here.  Call it.
12230         * debug.h (dwarf2out_default_as_loc_support): Declare.
12231         (dwarf2out_default_as_locview_support): Declare.
12232         * hooks.c (hook_int_rtx_insn_0): New.
12233         * hooks.h (hook_int_rtx_insn_0): Declare.
12234         * toplev.c (process_options): Take -gas-loc-support and
12235         -gas-locview-support from dwarf2out.  Enable
12236         -gvariable-location-views by default only with locview
12237         assembler support.  Enable -ginternal-reset-location-views by
12238         default only if the target defines the corresponding hook.
12239         Enable -ginline-points by default if location views are
12240         enabled; force it disabled if statement frontiers are
12241         disabled.
12242         * tree-inline.c (expand_call_inline): Check option variables.
12243         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12245 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
12247         PR tree-optimization/84321
12248         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12249         handling.  Also check whether the anti-range contains any values
12250         that satisfy the mask; switch to a VR_RANGE if not.
12252 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
12254         PR sanitizer/84340
12255         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12257 2018-02-13  Martin Jambor  <mjambor@suse.cz>
12259         PR c++/83990
12260         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12261         of call statements, also set location of a load to a temporary.
12263 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
12265         * config/rl78/rl78.c (add_vector_labels): New function.
12266         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12267         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12268         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12269         which checks that no arguments are passed.
12270         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12271         * doc/extend.texi: Documentation for the new attribute.
12273 2018-02-13  Andreas Schwab  <schwab@suse.de>
12275         * config/riscv/linux.h (CPP_SPEC): Define.
12277 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12279         PR target/84335
12280         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12281         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12282         OPTION_MASK_ISA_AES as first argument to def_builtin_const
12283         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12284         instead of OPTION_MASK_ISA_PCLMUL as first argument to
12285         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12286         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12287         temporarily for AES and PCLMUL builtins.
12289         PR tree-optimization/84339
12290         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12291         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12292         Formatting fixes.
12294         PR middle-end/84309
12295         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12296         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12297         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12298         inline function.
12299         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12300         inline function.
12301         * omp-simd-clone.h: New file.
12302         * omp-simd-clone.c: Include omp-simd-clone.h.
12303         (expand_simd_clones): No longer static.
12304         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12305         cgraph.h and omp-simd-clone.h.
12306         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12307         (vect_recog_widen_shift_pattern): Formatting fix.
12308         (vect_pattern_recog_1): Don't check optab for calls.
12310         PR target/84336
12311         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12312         operands[2] into a REG before using gen_lowpart on it.
12314 2018-02-12  Jeff Law  <law@redhat.com>
12316         PR target/83760
12317         * config/sh/sh.c (find_barrier): Consider a sibling call
12318         a barrier as well.
12320         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12321         successfully back substituting a reg.
12323 2018-02-12  Richard Biener  <rguenther@suse.de>
12325         PR tree-optimization/84037
12326         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12327         parameter, move visited init to caller.
12328         (vect_slp_analyze_operations): Separate cost from validity
12329         check, initialize visited once for all instances.
12330         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12331         for all instances.
12332         * tree-vect-stmts.c (vect_model_simple_cost): Make early
12333         out an assert.
12334         (vect_model_promotion_demotion_cost): Likewise.
12335         (vectorizable_bswap): Guard cost modeling with !slp_node
12336         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12337         SLP stmts.
12338         (vectorizable_call): Likewise.
12339         (vectorizable_conversion): Likewise.
12340         (vectorizable_assignment): Likewise.
12341         (vectorizable_shift): Likewise.
12342         (vectorizable_operation): Likewise.
12343         (vectorizable_store): Likewise.
12344         (vectorizable_load): Likewise.
12345         (vectorizable_condition): Likewise.
12346         (vectorizable_comparison): Likewise.
12348 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
12350         PR sanitizer/84307
12351         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12352         (ASAN_MARK): Fix fnspec to account for return value, change pointer
12353         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12355 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
12357         PR middle-end/83665
12358         * params.def (inline-min-speedup): Increase from 8 to 15.
12359         (max-inline-insns-auto): Decrease from 40 to 30.
12360         * ipa-split.c (consider_split): Add some buffer for function to
12361         be considered inlining candidate.
12362         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12363         default values.
12365 2018-02-12  Richard Biener  <rguenther@suse.de>
12367         PR tree-optimization/84037
12368         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
12369         matched stmts if we cannot swap the non-matched ones.
12371 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12373         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
12374         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
12375         _mm_maskz_scalef_round_ss): New intrinsics.
12376         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
12377         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
12378         __builtin_ia32_scalefss_round): Remove.
12379         (__builtin_ia32_scalefsd_mask_round,
12380         __builtin_ia32_scalefss_mask_round): New intrinsics.
12381         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
12382         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
12383         ((match_operand:VF_128 2 "<round_nimm_predicate>"
12384         "<round_constraint>")): Changed to ...
12385         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
12386         "<round_scalar_constraint>")): ... this.
12387         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
12388         %0, %1, %2<round_op3>}"): Changed to ...
12389         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
12390         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
12391         %2<round_scalar_mask_op3>}"): ... this.
12392         * config/i386/subst.md (round_scalar_nimm_predicate): New.
12394 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12396         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12397         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12398         (_mm_maskz_sqrt_round_ss): New intrinsics.
12399         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12400         (__builtin_ia32_sqrtsd_mask_round)
12401         (__builtin_ia32_sqrtss_mask_round): New builtins.
12402         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12403         (__builtin_ia32_sqrtss_round): Remove.
12404         (__builtin_ia32_sqrtsd_mask_round)
12405         (__builtin_ia32_sqrtss_mask_round): New builtins.
12406         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12407         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12408         ((match_operand:VF_128 1 "vector_operand"
12409         "xBm,<round_constraint>")): Changed to ...
12410         ((match_operand:VF_128 1 "vector_operand"
12411         "xBm,<round_scalar_constraint>")): ... this.
12412         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12413         %0, %2, %<iptr>1<round_op3>}): Changed to ...
12414         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12415         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12416         %<iptr>1<round_scalar_mask_op3>}): ... this.
12417         ((set_attr "prefix" "<round_prefix>")): Changed to ...
12418         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12420 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
12422         PR target/84266
12423         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12424         Cast vec_cmpeq result to correct type.
12425         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12426         Cast vec_cmpgt result to correct type.
12428 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
12430         * final.c (final_scan_insn_1): Renamed from...
12431         (final_scan_insn): ... this.  New wrapper, to recover
12432         seen from the outermost call in recursive ones.
12433         * config/sparc/sparc.c (output_return): Drop seen from call.
12434         (output_sibcall): Likewise.
12435         * config/visium/visium.c (output_branch): Likewise.
12437 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
12439         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12440         function label.
12442 2018-02-10  Alan Modra  <amodra@gmail.com>
12444         PR target/84300
12445         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12446         Specify LR as an input.
12448 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
12450         PR sanitizer/83987
12451         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12452         remove_member_access_dummy_vars): New functions.
12453         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12454         lower_omp_1, execute_lower_omp): Use them.
12456         PR rtl-optimization/84308
12457         * shrink-wrap.c (spread_components): Release todo vector.
12459 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
12461         PR rtl-optimization/57193
12462         * ira-color.c (struct allocno_color_data): Add member
12463         conflict_allocno_hard_prefs.
12464         (update_conflict_allocno_hard_prefs): New.
12465         (bucket_allocno_compare_func): Add a preference based on
12466         conflict_allocno_hard_prefs.
12467         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12468         (color_allocnos): Remove a dead code.  Initiate
12469         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
12471 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12473         PR target/84226
12474         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12475         constraint from =wa to wa.  Avoid a subreg on the output operand,
12476         instead use a pseudo and subreg it in a move.
12477         (p9_xxbrd_<mode>): Changed to ...
12478         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12479         (p9_xxbrd_v2df): New expander.
12480         (p9_xxbrw_<mode>): Changed to ...
12481         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12482         (p9_xxbrw_v4sf): New expander.
12484 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12486         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12488 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
12490         PR target/83926
12491         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12492         multiply in 32-bit mode.
12493         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12494         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12495         mode.
12497 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12499         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12500         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12501         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12502         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12504 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
12506         PR lto/84213
12507         * dwarf2out.c (is_trivial_indirect_ref): New function.
12508         (dwarf2out_late_global_decl): Do not generate a location
12509         attribute for variables that have a non-trivial DECL_VALUE_EXPR
12510         and that are not defined in the current unit.
12512 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12514         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12515         instead of a libcall for UNORDERED.
12517 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
12519         PR target/82641
12520         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12521         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12523 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12525         PR target/PR84295
12526         * config/s390/s390.c (s390_set_current_function): Invoke
12527         s390_indirect_branch_settings also if fndecl didn't change.
12529 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12531         * config/rs6000/rs6000.md (blockage): Set length to zero.
12533 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12535         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
12537 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12539         PR sanitizer/84285
12540         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
12541         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
12542         -static-lib*san.
12544         PR debug/84252
12545         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
12546         PARALLEL incoming that failed vt_get_decl_and_offset check.
12548         PR middle-end/84237
12549         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
12550         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
12551         TREE_READONLY bit.
12552         (get_variable_section): For decls in named .bss* sections pass true as
12553         second argument to bss_initializer_p.
12555 2018-02-09  Marek Polacek  <polacek@redhat.com>
12556             Jakub Jelinek  <jakub@redhat.com>
12558         PR c++/83659
12559         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
12560         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
12561         Sync some changes from cxx_fold_indirect_ref.
12563 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12565         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
12566         markers.
12567         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
12568         (BLOCK_INLINE_ENTRY_LABEL): New.
12569         (dwarf2out_var_location): Disregard inline entry markers.
12570         (inline_entry_data): New struct.
12571         (inline_entry_data_hasher): New hashtable type.
12572         (inline_entry_data_hasher::hash): New.
12573         (inline_entry_data_hasher::equal): New.
12574         (inline_entry_data_table): New variable.
12575         (add_high_low_attributes): Add DW_AT_entry_pc and
12576         DW_AT_GNU_entry_view attributes if a pending entry is found
12577         in inline_entry_data_table.  Add old entry_pc attribute only
12578         if debug nonbinding markers are disabled.
12579         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
12580         markers are enabled.
12581         (block_within_block_p, dwarf2out_inline_entry): New.
12582         (dwarf2out_finish): Check that no entries remained in
12583         inline_entry_data_table.
12584         * final.c (reemit_insn_block_notes): Handle inline entry notes.
12585         (final_scan_insn, notice_source_line): Likewise.
12586         (rest_of_clean_state): Skip inline entry markers.
12587         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
12588         markers.
12589         * gimple.c (gimple_build_debug_inline_entry): New.
12590         * gimple.h (enum gimple_debug_subcode): Add
12591         GIMPLE_DEBUG_INLINE_ENTRY.
12592         (gimple_build_debug_inline_entry): Declare.
12593         (gimple_debug_inline_entry_p): New.
12594         (gimple_debug_nonbind_marker_p): Adjust.
12595         * insn-notes.def (INLINE_ENTRY): New.
12596         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
12597         inline entry marker notes.
12598         (print_insn): Likewise.
12599         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
12600         (INSN_DEBUG_MARKER_KIND): Likewise.
12601         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
12602         * tree-inline.c (expand_call_inline): Build and insert
12603         debug_inline_entry stmt.
12604         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
12605         inline entry blocks early, if nonbind markers are enabled.
12606         (dump_scope_block): Dump fragment info.
12607         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
12608         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
12609         (gimple_build_debug_inline_entry): New.
12610         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
12611         Enable/disable inline entry points too.
12612         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
12613         (DEBUG_INSN): Describe inline entry markers.
12615         * common.opt (gvariable-location-views): New.
12616         (gvariable-location-views=incompat5): New.
12617         * config.in: Rebuilt.
12618         * configure: Rebuilt.
12619         * configure.ac: Test assembler for view support.
12620         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
12621         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
12622         * dwarf2out.c (var_loc_view): New typedef.
12623         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
12624         (dwarf2out_locviews_in_attribute): New.
12625         (dwarf2out_locviews_in_loclist): New.
12626         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
12627         (enum dw_line_info_opcode): Add LI_adv_address.
12628         (struct dw_line_info_table): Add view.
12629         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
12630         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
12631         (zero_view_p): New variable.
12632         (ZERO_VIEW_P): New macro.
12633         (output_asm_line_debug_info): New.
12634         (struct var_loc_node): Add view.
12635         (add_AT_view_list, AT_loc_list): New.
12636         (add_var_loc_to_decl): Add view param.  Test it against last.
12637         (new_loc_list): Add view params.  Record them.
12638         (AT_loc_list_ptr): Handle loc and view lists.
12639         (view_list_to_loc_list_val_node): New.
12640         (print_dw_val): Handle dw_val_class_view_list.
12641         (size_of_die): Likewise.
12642         (value_format): Likewise.
12643         (loc_list_has_views): New.
12644         (gen_llsym): Set vl_symbol too.
12645         (maybe_gen_llsym, skip_loc_list_entry): New.
12646         (dwarf2out_maybe_output_loclist_view_pair): New.
12647         (output_loc_list): Output view list or entries too.
12648         (output_view_list_offset): New.
12649         (output_die): Handle dw_val_class_view_list.
12650         (output_dwarf_version): New.
12651         (output_compilation_unit_header): Use it.
12652         (output_skeleton_debug_sections): Likewise.
12653         (output_rnglists, output_line_info): Likewise.
12654         (output_pubnames, output_aranges): Update version comments.
12655         (output_one_line_info_table): Output view numbers in asm comments.
12656         (dw_loc_list): Determine current endview, pass it to new_loc_list.
12657         Call maybe_gen_llsym.
12658         (loc_list_from_tree_1): Adjust.
12659         (add_AT_location_description): Create view list attribute if
12660         needed, check it's absent otherwise.
12661         (convert_cfa_to_fb_loc_list): Adjust.
12662         (maybe_emit_file): Call output_asm_line_debug_info for test.
12663         (dwarf2out_var_location): Reset views as needed.  Precompute
12664         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
12665         attribute.  Set view.
12666         (new_line_info_table): Reset next view.
12667         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
12668         (dwarf2out_source_line): Likewise.  Output view resets and labels to
12669         the assembler, or select appropriate line info opcodes.
12670         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
12671         (optimize_string_length): Catch it.  Adjust.
12672         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
12673         dw_val_class_view_list, and remove it if no longer needed.
12674         (hash_loc_list): Hash view numbers.
12675         (loc_list_hasher::equal): Compare them.
12676         (optimize_location_lists): Check whether a view list symbol is
12677         needed, and whether the locview attribute is present, and
12678         whether they match.  Remove the locview attribute if no longer
12679         needed.
12680         (index_location_lists): Call skip_loc_list_entry for test.
12681         (dwarf2out_finish): Call output_asm_line_debug_info for test.
12682         Use output_dwarf_version.
12683         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
12684         (struct dw_val_node): Add val_view_list.
12685         * final.c (SEEN_NEXT_VIEW): New.
12686         (set_next_view_needed): New.
12687         (clear_next_view_needed): New.
12688         (maybe_output_next_view): New.
12689         (final_start_function): Rename to...
12690         (final_start_function_1): ... this.  Take pointer to FIRST,
12691         add SEEN parameter.  Emit param bindings in the initial view.
12692         (final_start_function): Reintroduce SEEN-less interface.
12693         (final): Rename to...
12694         (final_1): ... this.  Take SEEN parameter.  Output final pending
12695         next view at the end.
12696         (final): Reintroduce seen-less interface.
12697         (final_scan_insn): Output pending next view before switching
12698         sections or ending a block.  Mark the next view as needed when
12699         outputting variable locations.  Notify debug backend of section
12700         changes, and of location view changes.
12701         (rest_of_handle_final): Adjust.
12702         * toplev.c (process_options): Autodetect value for debug variable
12703         location views option.  Warn on incompat5 without -gdwarf-5.
12704         * doc/invoke.texi (gvariable-location-views): New.
12705         (gvariable-location-views=incompat5): New.
12706         (gno-variable-location-views): New.
12708 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
12710         PR tree-optimization/84136
12711         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
12712         that the result of find_edge is non-NULL.
12714 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
12716         PR target/83008
12717         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
12718         storing integer register in SImode.  Fix cost of 256 and 512
12719         byte aligned SSE register store.
12721 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
12723         * config/i386/i386.c (ix86_multiplication_cost): Fix
12724         multiplication cost for TARGET_AVX512DQ.
12726 2018-02-08  Marek Polacek  <polacek@redhat.com>
12728         PR tree-optimization/84238
12729         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
12730         get_range_strlen.
12732 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
12734         PR tree-optimization/84265
12735         * tree-vect-stmts.c (vectorizable_store): Don't treat
12736         VMAT_CONTIGUOUS accesses as grouped.
12737         (vectorizable_load): Likewise.
12739 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
12741         PR tree-optimization/81635
12742         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
12743         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
12744         (test_round_for_mask): New functions.
12745         (wide_int_cc_tests): Call test_round_for_mask.
12746         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
12747         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
12748         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
12749         range returned by get_range_info.
12751 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
12753         PR ipa/81360
12754         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
12755         * symtab.c: Include builtins.h
12756         (symtab_node::output_to_lto_symbol_table_p): Move here
12757         from lto-streamer-out.c:output_symbol_p.
12758         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
12759         (output_symbol_p): Move all logic to symtab.c
12760         (produce_symtab): Update.
12762 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12764         * config/s390/s390-opts.h (enum indirect_branch): Define.
12765         * config/s390/s390-protos.h (s390_return_addr_from_memory)
12766         (s390_indirect_branch_via_thunk)
12767         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
12768         (enum s390_indirect_branch_type): Define.
12769         * config/s390/s390.c (struct s390_frame_layout, struct
12770         machine_function): Remove.
12771         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
12772         (indirect_branch_table_label_no, indirect_branch_table_name):
12773         Define variables.
12774         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
12775         (enum s390_indirect_branch_option): Define.
12776         (s390_return_addr_from_memory): New function.
12777         (s390_handle_string_attribute): New function.
12778         (s390_attribute_table): Add new attribute handler.
12779         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
12780         (s390_indirect_branch_via_thunk): New function.
12781         (s390_indirect_branch_via_inline_thunk): New function.
12782         (s390_function_ok_for_sibcall): When jumping via thunk disallow
12783         sibling call optimization for non z10 compiles.
12784         (s390_emit_call): Force indirect branch target to be a single
12785         register.  Add r1 clobber for non-z10 compiles.
12786         (s390_emit_epilogue): Emit return jump via return_use expander.
12787         (s390_reorg): Handle JUMP_INSNs as execute targets.
12788         (s390_option_override_internal): Perform validity checks for the
12789         new command line options.
12790         (s390_indirect_branch_attrvalue): New function.
12791         (s390_indirect_branch_settings): New function.
12792         (s390_set_current_function): Invoke s390_indirect_branch_settings.
12793         (s390_output_indirect_thunk_function):  New function.
12794         (s390_code_end): Implement target hook.
12795         (s390_case_values_threshold): Implement target hook.
12796         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
12797         macros.
12798         * config/s390/s390.h (struct s390_frame_layout)
12799         (struct machine_function): Move here from s390.c.
12800         (TARGET_INDIRECT_BRANCH_NOBP_RET)
12801         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
12802         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
12803         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
12804         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
12805         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
12806         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
12807         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
12808         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
12809         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
12810         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
12811         (mnemonic attribute): Add values which aren't recognized
12812         automatically.
12813         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
12814         pattern for branch conversion.  Fix mnemonic attribute.
12815         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
12816         indirect branch via thunk if requested.
12817         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
12818         ("*indirect_jump"): Disable for branch conversion using out of
12819         line thunks.
12820         ("indirect_jump_via_thunk<mode>_z10")
12821         ("indirect_jump_via_thunk<mode>")
12822         ("indirect_jump_via_inlinethunk<mode>_z10")
12823         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
12824         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
12825         ("casesi_jump_via_inlinethunk<mode>_z10")
12826         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
12827         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
12828         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
12829         ("*indirect2_jump"): Disable for branch conversion.
12830         ("casesi_jump"): Turn into expander and expand patterns for branch
12831         conversion.
12832         ("return_use"): New expander.
12833         ("*return"): Emit return via thunk and rename it to ...
12834         ("*return<mode>"): ... this one.
12835         * config/s390/s390.opt: Add new options and and enum for the
12836         option values.
12838 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
12840         * lra-constraints.c (match_reload): Unconditionally use
12841         gen_lowpart_SUBREG, rather than selecting between that
12842         and equivalent gen_rtx_SUBREG code.
12844 2018-02-08  Richard Biener  <rguenther@suse.de>
12846         PR tree-optimization/84233
12847         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
12848         changed flag instead of boguously re-using phi_inserted.
12850 2018-02-08  Martin Jambor  <mjambor@suse.cz>
12852         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
12853         static local variables.
12855 2018-02-08  Richard Biener  <rguenther@suse.de>
12857         PR tree-optimization/84278
12858         * tree-vect-stmts.c (vectorizable_store): When looking for
12859         smaller vector types to perform grouped strided loads/stores
12860         make sure the mode is supported by the target.
12861         (vectorizable_load): Likewise.
12863 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
12865         * config/aarch64/aarch64.c (aarch64_components_for_bb):
12866         Increase LDP/STP opportunities by adding adjacent callee-saves.
12868 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
12870         PR rtl-optimization/84068
12871         PR rtl-optimization/83459
12872         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
12874 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
12876         PR tree-optimization/84224
12877         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
12878         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
12879         non-zero arguments.
12881 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
12883         PR target/84113
12884         * config/rs6000/altivec.md (*restore_world): Remove LR use.
12885         * config/rs6000/predicates.md (restore_world_operation): Adjust op
12886         count, remove one USE.
12888 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
12890         * doc/install.texi (Configuration): Document the
12891         --with-long-double-format={ibm,ieee} PowerPC configuration
12892         options.
12894         PR target/84154
12895         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
12896         Convert from define_expand to be define_insn_and_split.  Rework
12897         float/double/_Float128 conversions to QI/HI/SImode to work with
12898         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
12899         conversions to QI/HImode types did a store and then a load to
12900         truncate the value.  For conversions to VSX registers, don't split
12901         the insn, instead emit the code directly.  Use the code iterator
12902         any_fix to combine signed and unsigned conversions.
12903         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
12904         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
12905         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12906         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
12907         (fix_<mode>di2_hw): Likewise.
12908         (fixuns_<mode>di2_hw): Likewise.
12909         (fix_<mode>si2_hw): Likewise.
12910         (fixuns_<mode>si2_hw): Likewise.
12911         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
12912         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12913         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
12914         fix<uns>_trunc<SFDF:mode>si2_p8.
12915         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
12916         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
12917         (fix<uns>_<mode>_mem): Likewise.
12918         (fctiw<u>z_<mode>_mem): Likewise.
12919         (fix<uns>_<mode>_mem): Likewise.
12920         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
12921         the register allocator from doing a direct move to the GPRs to do
12922         a store, and instead use the ISA 3.0 store byte/half-word from
12923         vector register instruction.  For IEEE 128-bit floating point,
12924         also optimize stores of 32-bit ints.
12925         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
12927 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
12929         * genextract.c (push_pathstr_operand): New function to support
12930         [a-zA-Z].
12931         (walk_rtx): Call push_pathstr_operand.
12932         (print_path): Support [a-zA-Z].
12934 2018-02-07  Richard Biener  <rguenther@suse.de>
12936         PR tree-optimization/84037
12937         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12938         (cse_and_gimplify_to_preheader): Declare.
12939         (vect_get_place_in_interleaving_chain): Likewise.
12940         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12941         ivexpr_map.
12942         (_loop_vec_info::~_loop_vec_info): Delete it.
12943         (cse_and_gimplify_to_preheader): New function.
12944         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12945         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12946         (vectorizable_load): Likewise.  For grouped stores always base
12947         the IV on the first element.
12948         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12949         condition before gimplifying.
12951 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12953         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12954         *DIV_EXPR and *MOD_EXPR.
12956 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
12958         PR target/84248
12959         * config/i386/i386.c (ix86_option_override_internal): Mask out
12960         the CF_SET bit when checking -fcf-protection.
12962 2018-02-07  Tom de Vries  <tom@codesourcery.com>
12964         PR libgomp/84217
12965         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12966         enough.
12968 2018-02-07  Richard Biener  <rguenther@suse.de>
12970         PR tree-optimization/84204
12971         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12972         this place.
12974         PR tree-optimization/84205
12975         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12976         special-case isl_ast_op_zdiv_r.
12978         PR tree-optimization/84223
12979         * graphite-scop-detection.c (gather_bbs::before_dom_children):
12980         Only add conditions from within the region.
12981         (gather_bbs::after_dom_children): Adjust.
12983 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
12985         PR target/84209
12986         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12987         * config/avr/avr.md: Only post-reload split REG-REG moves if
12988         either register is GENERAL_REG_P.
12990 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12992         PR tree-optimization/84235
12993         * tree-ssa-scopedtables.c
12994         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12995         if the subtraction is performed in floating point type where NaNs are
12996         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12997         build 1.  Formatting fix.
12999 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
13001         PR target/84146
13002         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13003         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13004         and skip it regardless of bb boundaries.  Use CALL_P macro,
13005         don't test INSN_P (insn) together with CALL_P or JUMP_P check
13006         unnecessarily, formatting fix.
13008 2018-02-06  Michael Collison  <michael.collison@arm.com>
13010         * config/arm/thumb2.md:
13011         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13012         (*thumb_mov_notscc): Ditto.
13014 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
13016         PR target/84154
13017         * config/rs6000/rs6000.md (su code attribute): Use "u" for
13018         unsigned_fix, not "s".
13020 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13022         * configure.ac (gcc_fn_eh_frame_ro): New function.
13023         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13024         correct .eh_frame permissions.
13025         * configure: Regenerate.
13027 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
13029         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13030         irrelevant options.
13032 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13034         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13035         Display warning message for -mno-speculate-indirect-jumps.
13037 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
13039         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13040         Undocumented.
13041         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13043 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
13045         PR tree-optimization/84225
13046         * tree-eh.c (find_trapping_overflow): Only call
13047         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13049 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13051         PR target/84145
13052         * config/i386/i386.c: Reimplement the check of possible options
13053         -mibt/-mshstk conbination. Change error messages.
13054         * doc/invoke.texi: Fix a typo: remove extra '='.
13056 2018-02-06  Marek Polacek  <polacek@redhat.com>
13058         PR tree-optimization/84228
13059         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13061 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
13063         PR target/82641
13064         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13065         emitted arch directives.
13066         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13067         __ARM_FEATURE_COPROC before changing architectures.
13069 2018-02-06  Richard Biener  <rguenther@suse.de>
13071         * config/i386/i386.c (print_reg): Fix typo.
13072         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13074 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
13076         * configure: Regenerate.
13078 2018-02-05  Martin Sebor  <msebor@redhat.com>
13080         PR tree-optimization/83369
13081         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13082         inlining context.
13084 2018-02-05  Martin Liska  <mliska@suse.cz>
13086         * doc/invoke.texi: Cherry-pick upstream r323995.
13088 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
13090         * ira.c (ira_init_register_move_cost): Adjust comment.
13092 2018-02-05  Martin Liska  <mliska@suse.cz>
13094         PR gcov-profile/84137
13095         * doc/gcov.texi: Fix typo in documentation.
13097 2018-02-05  Martin Liska  <mliska@suse.cz>
13099         PR gcov-profile/83879
13100         * doc/gcov.texi: Document necessity of --dynamic-list-data when
13101         using dlopen functionality.
13103 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
13105         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13106         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13107         _mm_maskz_range_ss, _mm_mask_range_round_ss,
13108         _mm_maskz_range_round_ss): New intrinsics.
13109         (__builtin_ia32_rangesd128_round)
13110         (__builtin_ia32_rangess128_round): Remove.
13111         (__builtin_ia32_rangesd128_mask_round,
13112         __builtin_ia32_rangess128_mask_round): New builtins.
13113         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13114         __builtin_ia32_rangess128_round): Remove.
13115         (__builtin_ia32_rangesd128_mask_round,
13116         __builtin_ia32_rangess128_mask_round): New builtins.
13117         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13118         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13119         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13120         "<round_saeonly_constraint>")): Changed to ...
13121         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13122         "<round_saeonly_scalar_constraint>")): ... this.
13123         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13124         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13125         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13126         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13127         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13129 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
13131         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13132         options.
13133         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13134         Remove all values except native, 8540 and 8548.
13136 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
13138         * config/i386/i386.c (ix86_output_function_return): Pass
13139         INVALID_REGNUM, instead of -1, as invalid register number to
13140         indirect_thunk_name and output_indirect_thunk.
13142 2018-02-02  Julia Koval  <julia.koval@intel.com>
13144         * config.gcc: Add -march=icelake.
13145         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13146         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13147         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13148         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13149         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13150         (processor_target_table): Add icelake.
13151         (ix86_option_override_internal): Handle new PTAs.
13152         (get_builtin_code_for_version): Handle icelake.
13153         (M_INTEL_COREI7_ICELAKE): New.
13154         (fold_builtin_cpu): Handle icelake.
13155         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13156         * doc/invoke.texi: Add -march=icelake.
13158 2018-02-02  Julia Koval  <julia.koval@intel.com>
13160         * config/i386/i386.c (ix86_option_override_internal): Change flags type
13161         to wide_int_bitmask.
13162         * wide-int-bitmask.h: New.
13164 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13166         PR target/84066
13167         * config/i386/i386.md: Replace Pmode with word_mode in
13168         builtin_setjmp_setup and builtin_longjmp to support x32.
13170 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
13172         PR target/56010
13173         PR target/83743
13174         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13175         #include "opts.h".
13176         (rs6000_supported_cpu_names): New static variable.
13177         (linux_cpu_translation_table): Likewise.
13178         (elf_platform) <cpu>: Define new static variable and use it.
13179         Translate kernel AT_PLATFORM name to canonical name if needed.
13180         Error if platform name is unknown.
13182 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
13184         PR target/84089
13185         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13187 2018-02-01  Jeff Law  <law@redhat.com>
13189         PR target/84128
13190         * config/i386/i386.c (release_scratch_register_on_entry): Add new
13191         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
13192         the scratch if RELEASE_VIA_POP is false.
13193         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13194         If we have to save a temporary register, decrement SIZE appropriately.
13195         Pass new arguments to release_scratch_register_on_entry.
13196         (ix86_adjust_stack_and_probe): Likewise.
13197         (ix86_emit_probe_stack_range): Pass new arguments to
13198         release_scratch_register_on_entry.
13200 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
13202         PR rtl-optimization/84157
13203         * combine.c (change_zero_ext): Use REG_P predicate in
13204         front of HARD_REGISTER_P predicate.
13206 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
13208         * config/avr/avr.c (avr_option_override): Move disabling of
13209         -fdelete-null-pointer-checks to...
13210         * common/config/avr/avr-common.c (avr_option_optimization_table):
13211         ...here.
13213 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13215         PR tree-optimization/81635
13216         * tree-data-ref.c (split_constant_offset_1): For types that
13217         wrap on overflow, try to use range info to prove that wrapping
13218         cannot occur.
13220 2018-02-01  Renlin Li  <renlin.li@arm.com>
13222         PR target/83370
13223         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13224         TAILCALL_ADDR_REGS.
13225         (aarch64_register_move_cost): Likewise.
13226         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13227         TAILCALL_ADDR_REGS.
13228         (REG_CLASS_NAMES): Likewise.
13229         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13230         TAILCALL_ADDR_REGS. Remove IP registers.
13231         * config/aarch64/aarch64.md (Ucs): Update register constraint.
13233 2018-02-01  Richard Biener  <rguenther@suse.de>
13235         * domwalk.h (dom_walker::dom_walker): Add additional constructor
13236         for specifying RPO order and allow NULL for that.
13237         * domwalk.c (dom_walker::dom_walker): Likewise.
13238         (dom_walker::walk): Handle NULL RPO order.
13239         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13240         in RPO order.
13241         (rewrite_update_dom_walker): Likewise.
13242         (mark_def_dom_walker): Likewise.
13244 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13246         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13247         (aarch64_maybe_expand_sve_subreg_move): Declare.
13248         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13249         * config/aarch64/predicates.md (aarch64_any_register_operand): New
13250         predicate.
13251         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13252         that are semantically a reverse operation.
13253         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13254         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13255         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13256         functions.
13257         (aarch64_can_change_mode_class): For big-endian, forbid changes
13258         between two SVE modes if they have different element sizes.
13260 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13262         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13263         the TImode handling for big-endian targets.
13265 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13267         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13268         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
13269         not just bytes.
13270         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13271         Remove BSWAP handing for big-endian targets and use the form of
13272         LD1RQ appropariate for the mode.
13274 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13276         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13277         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13278         duplicated element.
13280 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13282         PR tearget/83845
13283         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13284         check for operands that need to go through aarch64_sve_reload_be.
13286 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
13288         PR tree-optimization/81661
13289         PR tree-optimization/84117
13290         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13291         * tree-eh.c: Include gimplify.h.
13292         (find_trapping_overflow, replace_trapping_overflow,
13293         rewrite_to_non_trapping_overflow): New functions.
13294         * tree-vect-loop.c: Include tree-eh.h.
13295         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13296         * tree-data-ref.c: Include tree-eh.h.
13297         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13299 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
13301         PR rtl-optimization/84123
13302         * combine.c (change_zero_ext): Check if hard register satisfies
13303         can_change_dest_mode before calling gen_lowpart_SUBREG.
13305 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
13307         PR target/82444
13308         * ira.c (ira_init_register_move_cost): Remove assert.
13310 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13312         PR rtl-optimization/84071
13313         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13314         * doc/tm.texi: Regenerate.
13316 2018-01-31  Richard Biener  <rguenther@suse.de>
13318         PR tree-optimization/84132
13319         * tree-data-ref.c (analyze_miv_subscript): Properly
13320         check whether evolution_function_is_affine_multivariate_p
13321         before calling gcd_of_steps_may_divide_p.
13323 2018-01-31  Julia Koval  <julia.koval@intel.com>
13325         PR target/83618
13326         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13327         * config/i386/i386.md (rdpid_rex64) New.
13328         (rdpid): Make 32bit only.
13330 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
13332         PR lto/84105
13333         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13334         an IDENTIFIER_NODE for FUNCTION_TYPE's.
13336 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13338         Revert
13339         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13341         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13343 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13345         PR rtl-optimization/84071
13346         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13347         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13349 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13351         * config/arc/arc.c (arc_handle_aux_attribute): New function.
13352         (arc_attribute_table): Add 'aux' attribute.
13353         (arc_in_small_data_p): Consider aux like variables.
13354         (arc_is_aux_reg_p): New function.
13355         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13356         (arc_get_aux_arg): New function.
13357         (prepare_move_operands): Handle aux-register access.
13358         (arc_handle_aux_attribute): New function.
13359         * doc/extend.texi (ARC Variable attributes): Add subsection.
13361 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13363         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13364         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13365         (arc_attribute_table): Add 'uncached' attribute.
13366         (arc_print_operand): Print '.di' flag for uncached memory
13367         accesses.
13368         (arc_in_small_data_p): Do not consider for small data the uncached
13369         types.
13370         (arc_is_uncached_mem_p): New function.
13371         * config/arc/predicates.md (compact_store_memory_operand): Check
13372         for uncached memory accesses.
13373         (nonvol_nonimm_operand): Likewise.
13374         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
13376 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
13378         PR c/84100
13379         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
13380         falign-loops=): Add Optimization flag.
13382 2018-01-30  Jeff Law  <law@redhat.com>
13384         PR target/84064
13385         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
13386         INT_REGISTERS_SAVED.  Check it prior to calling
13387         get_scratch_register_on_entry.
13388         (ix86_adjust_stack_and_probe): Similarly.
13389         (ix86_emit_probe_stack_range): Similarly.
13390         (ix86_expand_prologue): Corresponding changes.
13392 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13394         PR target/40411
13395         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13396         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13398 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
13400         PR target/84112
13401         * lra-constraints.c (curr_insn_transform): Process AND in the
13402         address.
13404 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
13406         PR rtl-optimization/83986
13407         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13408         dependence against last_pending_memory_flush in addition to
13409         pending_jump_insns.
13411 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
13413         PR tree-optimization/81611
13414         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13415         copies.
13417 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13419         PR target/83758
13420         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13421         a reg rtx.
13423 2018-01-30  Richard Biener  <rguenther@suse.de>
13424             Jakub Jelinek  <jakub@redhat.com>
13426         PR tree-optimization/84111
13427         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13428         inner loops added during recursion, as they don't have up-to-date
13429         SSA form.
13431 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13433         PR ipa/81360
13434         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13435         (can_inline_edge_by_limits_p): ... here.
13436         (can_early_inline_edge_p, check_callers,
13437         update_caller_keys, update_callee_keys, recursive_inlining,
13438         add_new_edges_to_heap, speculation_useful_p,
13439         inline_small_functions,
13440         inline_small_functions, flatten_function,
13441         inline_to_all_callers_1): Update.
13443 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13445         * profile-count.c (profile_count::combine_with_ipa_count): Handle
13446         zeros correctly.
13448 2018-01-30  Richard Biener  <rguenther@suse.de>
13450         PR tree-optimization/83008
13451         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13452         invariant and constant vector uses in stmts when they need
13453         more than one stmt.
13455 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13457         PR bootstrap/84017
13458         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13459         * configure: Regenerate.
13461 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13463         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13464         pattern.
13465         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13466         Use gen_rtx_REG rather than gen_lowpart.
13468 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13470         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13471         rather than 0 when creating partial subregs.
13473 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13475         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13476         of usage.
13478 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
13480         PR target/81550
13481         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13482         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13483         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13484         flags.  This restores the settings used before the 2017-07-24.
13485         Turning off pre increment/decrement/modify allows IVOPTS to
13486         optimize DF/SF loops where the index is an int.
13488 2018-01-29  Richard Biener  <rguenther@suse.de>
13489             Kelvin Nilsen  <kelvin@gcc.gnu.org>
13491         PR bootstrap/80867
13492         * tree-vect-stmts.c (vectorizable_call): Don't call
13493         targetm.vectorize_builtin_md_vectorized_function if callee is
13494         NULL.
13496 2018-01-22  Carl Love  <cel@us.ibm.com>
13498         * doc/extend.tex: Fix typo in second arg in
13499         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13501 2018-01-29  Richard Biener  <rguenther@suse.de>
13503         PR tree-optimization/84086
13504         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13505         (flush_ssaname_freelist): When SSA names were released reset
13506         the SCEV hash table.
13508 2018-01-29  Richard Biener  <rguenther@suse.de>
13510         PR tree-optimization/84057
13511         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13512         removed paths when removing edges.
13514 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
13516         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13517         -mfunction-return=@var{choice}.
13519 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13521         PR diagnostic/84034
13522         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13523         Handle CR like TAB.
13524         (layout::print_source_line): Likewise.
13525         (test_get_line_width_without_trailing_whitespace): Add test cases.
13527 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
13529         PR middle-end/84040
13530         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13531         debug insns.
13533 2018-01-26  Jim Wilson  <jimw@sifive.com>
13535         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
13537         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
13538         specified.
13540 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13542         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
13543         and CMP + SUB-immediate -> SUBS.
13545 2018-01-26  Martin Sebor  <msebor@redhat.com>
13547         PR tree-optimization/83896
13548         * tree-ssa-strlen.c (get_string_len): Rename...
13549         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
13550         Avoid assuming length is constant.
13551         (handle_char_store): Use HOST_WIDE_INT for string length.
13553 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
13555         PR target/81763
13556         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
13557         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
13559 2018-01-26  Richard Biener  <rguenther@suse.de>
13561         PR rtl-optimization/84003
13562         * dse.c (record_store): Only record redundant stores when
13563         the earlier store aliases at least all accesses the later one does.
13565 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
13567         PR rtl-optimization/83985
13568         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
13569         REG_CFA_RESTORE insns.
13570         (delete_unmarked_insns): Don't ignore separate shrink wrapping
13571         REG_CFA_RESTORE insns here.
13573         PR c/83989
13574         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
13575         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
13577 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13579         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
13580         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
13581         (arc_init): Likewise.
13582         (arc_override_options): Likewise.
13583         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
13584         value.
13585         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
13586         support.
13587         * config/arc/arc.h (TARGET_DBNZ): Define.
13588         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
13589         properly set the tune attribute.
13590         (dbnz): Use TARGET_DBNZ guard.
13591         * config/arc/arc.opt (mtune): Add core3 option.
13593 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13595         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
13596         recognize new pic like addresses.
13597         (arc_delegitimize_address): Clean up.
13599 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13601         * config/arc/arc-arches.def: Option mrf16 valid for all
13602         architectures.
13603         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
13604         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
13605         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
13606         * config/arc/arc-tables.opt: Regenerate.
13607         * config/arc/arc.c (arc_conditional_register_usage): Handle
13608         reduced register file case.
13609         (arc_file_start): Set must have build attributes.
13610         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
13611         mrf16 option value.
13612         * config/arc/arc.opt (mrf16): Add new option.
13613         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
13614         * config/arc/genmultilib.awk: Handle new mrf16 option.
13615         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
13616         * config/arc/t-multilib: Regenerate.
13617         * doc/invoke.texi (ARC Options): Document mrf16 option.
13619 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13621         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
13622         * config/arc/arc.c (arc_handle_secure_attribute): New function.
13623         (arc_attribute_table): Add 'secure_call' attribute.
13624         (arc_print_operand): Print secure call operand.
13625         (arc_function_ok_for_sibcall): Don't optimize tail calls when
13626         secure.
13627         (arc_is_secure_call_p): New function.  * config/arc/arc.md
13628         (call_i): Add support for sjli instruction.
13629         (call_value_i): Likewise.
13630         * config/arc/constraints.md (Csc): New constraint.
13632 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13633             John Eric Martin  <John.Martin@emmicro-us.com>
13635         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
13636         * config/arc/arc.c (_arc_jli_section): New struct.
13637         (arc_jli_section): New type.
13638         (rc_jli_sections): New static variable.
13639         (arc_handle_jli_attribute): New function.
13640         (arc_attribute_table): Add jli_always and jli_fixed attribute.
13641         (arc_file_end): New function.
13642         (TARGET_ASM_FILE_END): Define.
13643         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
13644         (arc_add_jli_section): New function.
13645         (jli_call_scan): Likewise.
13646         (arc_reorg): Call jli_call_scan.
13647         (arc_output_addsi): Remove 'S' from printing asm operand.
13648         (arc_is_jli_call_p): New function.
13649         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
13650         operand.
13651         (movhi_insn): Likewise.
13652         (movsi_insn): Likewise.
13653         (movsi_set_cc_insn): Likewise.
13654         (loadqi_update): Likewise.
13655         (load_zeroextendqisi_update): Likewise.
13656         (load_signextendqisi_update): Likewise.
13657         (loadhi_update): Likewise.
13658         (load_zeroextendhisi_update): Likewise.
13659         (load_signextendhisi_update): Likewise.
13660         (loadsi_update): Likewise.
13661         (loadsf_update): Likewise.
13662         (movsicc_insn): Likewise.
13663         (bset_insn): Likewise.
13664         (bxor_insn): Likewise.
13665         (bclr_insn): Likewise.
13666         (bmsk_insn): Likewise.
13667         (bicsi3_insn): Likewise.
13668         (cmpsi_cc_c_insn): Likewise.
13669         (movsi_ne): Likewise.
13670         (movsi_cond_exec): Likewise.
13671         (clrsbsi2): Likewise.
13672         (norm_f): Likewise.
13673         (normw): Likewise.
13674         (swap): Likewise.
13675         (divaw): Likewise.
13676         (flag): Likewise.
13677         (sr): Likewise.
13678         (kflag): Likewise.
13679         (ffs): Likewise.
13680         (ffs_f): Likewise.
13681         (fls): Likewise.
13682         (call_i): Remove 'S' asm letter, add jli instruction.
13683         (call_value_i): Likewise.
13684         * config/arc/arc.op (mjli-always): New option.
13685         * config/arc/constraints.md (Cji): New constraint.
13686         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
13687         operand.
13688         (subsf3_fpx): Likewise.
13689         (mulsf3_fpx): Likewise.
13690         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
13691         asm operand.
13692         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
13693         function attrbutes.
13694         * doc/invoke.texi (ARC): Document mjli-always option.
13696 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
13698         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
13699         avoid addition with 0 and use incw and decw where possible.
13701 2018-01-26  Richard Biener  <rguenther@suse.de>
13703         PR tree-optimization/81082
13704         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
13705         association if it requires casting to unsigned.
13706         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
13707         from fold_plusminus_mult_expr to catch important cases late when
13708         range info is available.
13710 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13712         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
13713         * configure.ac (hidden_linkonce): New test.
13714         * configure: Regenerate.
13715         * config.in: Regenerate.
13717 2018-01-26  Julia Koval  <julia.koval@intel.com>
13719         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
13720         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
13721         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
13722         _mm_mask_bitshuffle_epi64_mask): Fix type.
13723         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
13724         USI_FTYPE_V4DI_V4DI_USI): Remove.
13725         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
13726         __builtin_ia32_vpshufbitqmb256_mask,
13727         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
13728         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
13729         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
13731 2018-01-26  Alan Modra  <amodra@gmail.com>
13733         PR target/84033
13734         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
13735         UNSPEC_VBPERMQ.  Sort other unspecs.
13737 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
13739         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
13741 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
13743         PR middle-end/83055
13744         * predict.c (drop_profile): Do not push/pop cfun; update also
13745         node->count.
13746         (handle_missing_profiles): Fix logic looking for zero profiles.
13748 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
13750         PR middle-end/83977
13751         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
13752         on functions with #pragma omp declare simd or functions with simd
13753         attribute.
13754         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
13755         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
13756         Remove trailing \n from warning_at calls.
13758 2018-01-25  Tom de Vries  <tom@codesourcery.com>
13760         PR target/84028
13761         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13762         for neutered workers.
13764 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
13766         PR target/68467
13767         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
13768         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
13770 2018-01-24  Jeff Law  <law@redhat.com>
13772         PR target/83994
13773         * i386.c (get_probe_interval): Move to earlier point.
13774         (ix86_compute_frame_layout): If -fstack-clash-protection and
13775         the frame is larger than the probe interval, then use pushes
13776         to save registers rather than reg->mem moves.
13777         (ix86_expand_prologue): Remove conditional for int_registers_saved
13778         assertion.
13780 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
13782         PR target/84014
13783         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
13784         min/max for never referenced object.
13786 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
13788         PR middle-end/83977
13789         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
13790         here.
13791         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
13792         attributes from DECL_ATTRIBUTES (decl) without affecting
13793         DECL_ATTRIBUTES (current_function_decl).
13794         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
13795         functions with non-NULL DECL_ABSTRACT_ORIGIN.
13797 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
13799         PR tree-optimization/83979
13800         * fold-const.c (fold_comparison): Use constant_boolean_node
13801         instead of boolean_{true,false}_node.
13803 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
13805         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
13806         with zero counts.
13808 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13810         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13811         Simplify the clause that sets the length attribute.
13812         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13813         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
13814         clause that sets the length attribute.
13815         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13817 2018-01-24  Tom de Vries  <tom@codesourcery.com>
13819         PR target/83589
13820         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
13821         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
13822         Add strict parameter.
13823         (prevent_branch_around_nothing): Insert dummy insn between branch to
13824         label and label with no ptx insn inbetween.
13825         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
13827 2018-01-24  Tom de Vries  <tom@codesourcery.com>
13829         PR target/81352
13830         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13831         for neutered threads in warp.
13832         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
13834 2018-01-24  Richard Biener  <rguenther@suse.de>
13836         PR tree-optimization/83176
13837         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
13838         operands.
13840 2018-01-24  Richard Biener  <rguenther@suse.de>
13842         PR tree-optimization/82819
13843         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
13844         code generating pluses that are no-ops in the target precision.
13846 2018-01-24  Richard Biener  <rguenther@suse.de>
13848         PR middle-end/84000
13849         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
13851 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13853         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
13854         to merge probabilities.
13855         * predict.c (probably_never_executed): Also mark as cold functions
13856         with global 0 profile and guessed local profile.
13857         * profile-count.c (profile_probability::combine_with_count): New
13858         member function.
13859         * profile-count.h (profile_probability::operator*,
13860         profile_probability::operator*=, profile_probability::operator/,
13861         profile_probability::operator/=): Reduce precision to adjusted
13862         and set value to guessed on contradictory divisions.
13863         (profile_probability::combine_with_freq): Remove.
13864         (profile_probability::combine_wiht_count): Declare.
13865         (profile_count::force_nonzero):: Set to adjusted.
13866         (profile_count::probability_in):: Set quality to adjusted.
13867         * tree-ssa-tail-merge.c (replace_block_by): Use
13868         combine_with_count.
13870 2018-01-23  Andrew Waterman  <andrew@sifive.com>
13871             Jim Wilson  <jimw@sifive.com>
13873         * config/riscv/riscv.c (riscv_stack_boundary): New.
13874         (riscv_option_override): Set riscv_stack_boundary.  Handle
13875         riscv_preferred_stack_boundary_arg.
13876         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
13877         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
13878         (STACK_BOUNDARY): Set to riscv_stack_boundary.
13879         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
13880         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
13881         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
13883 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
13885         PR target/83905
13886         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
13887         of struct ix86_frame.
13888         (ix86_expand_epilogue): Likewise.  Add a local variable for
13889         the reg_save_offset field in struct ix86_frame.
13891 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
13893         PR tree-optimization/82604
13894         * tree-loop-distribution.c (enum partition_kind): New enum item
13895         PKIND_PARTIAL_MEMSET.
13896         (partition_builtin_p): Support above new enum item.
13897         (generate_code_for_partition): Ditto.
13898         (compute_access_range): Differentiate cases that equality can be
13899         proven at all loops, the innermost loops or no loops.
13900         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
13901         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
13902         (finalize_partitions, distribute_loop): Don't fuse partition of
13903         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
13904         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
13905         parloop is enabled.
13907 2018-01-23  Martin Liska  <mliska@suse.cz>
13909         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
13910         order to ignore the predictor.
13911         (PRED_POLYMORPHIC_CALL): Likewise.
13912         (PRED_RECURSIVE_CALL): Likewise.
13914 2018-01-23  Martin Liska  <mliska@suse.cz>
13916         * tree-profile.c (tree_profiling): Print function header to
13917         aware reader which function we are working on.
13918         * value-prof.c (gimple_find_values_to_profile): Do not print
13919         not interesting value histograms.
13921 2018-01-23  Martin Liska  <mliska@suse.cz>
13923         * profile-count.h (enum profile_quality): Add
13924         profile_uninitialized as the first value. Do not number values
13925         as they are zero based.
13926         (profile_count::verify): Update sanity check.
13927         (profile_probability::verify): Likewise.
13929 2018-01-23  Nathan Sidwell  <nathan@acm.org>
13931         * doc/invoke.texi (ffor-scope): Deprecate.
13933 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13935         PR tree-optimization/83510
13936         * domwalk.c (set_all_edges_as_executable): New function.
13937         (dom_walker::dom_walker): Convert bool param
13938         "skip_unreachable_blocks" to enum reachability.  Move setup of
13939         edge flags to set_all_edges_as_executable and only do it when
13940         reachability is REACHABLE_BLOCKS.
13941         * domwalk.h (enum dom_walker::reachability): New enum.
13942         (dom_walker::dom_walker): Convert bool param
13943         "skip_unreachable_blocks" to enum reachability.
13944         (set_all_edges_as_executable): New decl.
13945         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
13946         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13947         "reachability".
13948         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13949         but converting true to REACHABLE_BLOCKS.
13950         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13951         * tree-vrp.c
13952         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13953         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13954         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13955         REACHABLE_BLOCKS.
13956         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13957         if check_all_array_refs will be called.
13959 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13961         * tree.c (selftest::test_location_wrappers): Add more test
13962         coverage.
13964 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13966         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13967         (selftest::test_bit_in_range): Likewise.
13969 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13971         PR testsuite/83888
13972         * doc/sourcebuild.texi (vect_float): Say that the selector
13973         only describes the situation when -funsafe-math-optimizations is on.
13974         (vect_float_strict): Document.
13976 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13978         PR tree-optimization/83965
13979         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13980         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13981         instead of checking only for a reduction.
13982         (vect_recog_widen_sum_pattern): Likewise.
13984 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13986         * predict.c (probably_never_executed): Only use precise profile info.
13987         (compute_function_frequency): Skip after inlining hack since we now
13988         have quality checking.
13990 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13992         * profile-count.h (profile_probability::very_unlikely,
13993         profile_probability::unlikely, profile_probability::even): Set
13994         precision to guessed.
13996 2018-01-23  Richard Biener  <rguenther@suse.de>
13998         PR tree-optimization/83963
13999         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14000         Properly terminate dominator walk when crossing the exit edge not
14001         when visiting its source block.
14003 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
14005         PR c++/83918
14006         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14007         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14009 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
14011         PR tree-optimization/83957
14012         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
14013         semicolon after for body surrounded by braces.
14015         PR tree-optimization/83081
14016         * profile-count.h (profile_probability::split): New method.
14017         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14018         Use profile_probability::split.
14019         (do_compare_rtx_and_jump): Fix adjustment of probabilities
14020         when splitting a single conditional jump into 2.
14022 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
14024         PR tree-optimization/69452
14025         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14026         decl.
14028 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14030         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14031         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14032         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14034 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14036         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14037         declaration.
14038         * config/rl78/rl78.md (movdi): New define_expand.
14039         * config/rl78/rl78.c (rl78_split_movdi): New function.
14041 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
14043         PR target/83862
14044         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14045         no longer used.
14046         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14047         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14048         128-bit to produce an UNSPEC move to get the double word with the
14049         signbit and then a shift directly to do signbit.
14050         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14051         implementation with a new version that just does either a direct
14052         move or a regular move.  Move memory interface to separate insns.
14053         Move insns so they are next to the expander.
14054         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14055         with signbit move.  Split big and little endian case.
14056         (signbit<mode>2_dm_mem_le): Likewise.
14057         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14058         (signbit<mode>2_dm2): Likewise.
14060 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14062         * config/rl78/rl78.md (anddi3): New define_expand.
14064 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14066         * config/rl78/rl78.md (umindi3): New define_expand.
14068 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14070         * config/rl78/rl78.md (smindi3): New define_expand.
14072 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14074         * config/rl78/rl78.md (smaxdi3): New define_expand.
14076 2018-01-22  Carl Love  <cel@us.ibm.com>
14078         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14079         LVX_V1TI): Add macro expansion.
14080         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14081         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14082         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14083         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14084         Change check to determine if the instruction is a byte reversing
14085         entry.  Fix typo in comment.
14086         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14087         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14088         Add def_builtin calls for new builtins.
14089         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14090         Add define_insn expansion.
14092 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14094         * config/rl78/rl78.md (umaxdi3): New define_expand.
14096 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14098         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14099         for non-QImode registers.
14101 2018-01-22  Richard Biener  <rguenther@suse.de>
14103         PR tree-optimization/83963
14104         * graphite-scop-detection.c (scop_detection::get_sese): Delay
14105         including the loop exit block.
14106         (scop_detection::merge_sese): Likewise.
14107         (scop_detection::add_scop): Do it here instead.
14109 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14111         * doc/sourcebuild.texi (arm_softfloat): Document.
14113 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
14115         PR gcc/77734
14116         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14117         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14118         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14120 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14121             David Edelsohn  <dje.gcc@gmail.com>
14123         PR target/83946
14124         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14125         Change "crset eq" to "crset 2".
14126         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14127         (*call_indirect_aix<mode>_nospec): Likewise.
14128         (*call_value_indirect_aix<mode>_nospec): Likewise.
14129         (*call_indirect_elfv2<mode>_nospec): Likewise.
14130         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14131         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14132         change assembly output from . to $.
14133         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14134         (indirect_jump<mode>_nospec): Change assembly output from . to $.
14135         (*tablejump<mode>_internal1_nospec): Likewise.
14137 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
14139         PR target/80870
14140         * config/sh/sh_optimize_sett_clrt.cc:
14141         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14143 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
14145         PR tree-optimization/83940
14146         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14147         offset_dt to vect_constant_def rather than vect_unknown_def_type.
14148         (vect_check_load_store_mask): Add a mask_dt_out parameter and
14149         use it to pass back the definition type.
14150         (vect_check_store_rhs): Likewise rhs_dt_out.
14151         (vect_build_gather_load_calls): Add a mask_dt argument and use
14152         it instead of a call to vect_is_simple_use.
14153         (vectorizable_store): Update calls to vect_check_load_store_mask
14154         and vect_check_store_rhs.  Use the dt returned by the latter instead
14155         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
14156         instead of calls to vect_is_simple_use.  Pass the scalar rather
14157         than the vector operand to vect_is_simple_use when handling
14158         second and subsequent copies of an rhs value.
14159         (vectorizable_load): Update calls to vect_check_load_store_mask
14160         and vect_build_gather_load_calls.  Use the cached mask_dt and
14161         gs_info.offset_dt instead of calls to vect_is_simple_use.
14163 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
14165         PR middle-end/83945
14166         * tree-emutls.c: Include gimplify.h.
14167         (lower_emutls_2): New function.
14168         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14169         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14170         it before further processing.
14172         PR target/83930
14173         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14174         UINTVAL (trueop1) instead of INTVAL (op1).
14176 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
14178         PR debug/81570
14179         PR debug/83728
14180         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14181         INCOMING_FRAME_SP_OFFSET if not defined.
14182         (scan_trace): Add ENTRY argument.  If true and
14183         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14184         emit a note to adjust the CFA offset.
14185         (create_cfi_notes): Adjust scan_trace callers.
14186         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14187         INCOMING_FRAME_SP_OFFSET in the CIE.
14188         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14189         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14190         Likewise.
14191         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14192         * doc/tm.texi: Regenerated.
14194 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14196         PR rtl-optimization/83147
14197         * lra-constraints.c (remove_inheritance_pseudos): Use
14198         lra_substitute_pseudo_within_insn.
14200 2018-01-19  Tom de Vries  <tom@codesourcery.com>
14201             Cesar Philippidis  <cesar@codesourcery.com>
14203         PR target/83920
14204         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14206 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
14208         PR target/83790
14209         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14210         spaces for function labels.
14212 2018-01-19  Martin Liska  <mliska@suse.cz>
14214         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14215         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14216         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14217         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14218         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14219         (PRED_CONST_RETURN): Change from 69 to 65.
14220         (PRED_NULL_RETURN): Change from 91 to 71.
14221         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14222         (PRED_LOOP_GUARD): Change from 66 to 73.
14224 2018-01-19  Martin Liska  <mliska@suse.cz>
14226         * predict.c (predict_insn_def): Add new assert.
14227         (struct branch_predictor): Change type to signed integer.
14228         (test_prediction_value_range): Amend test to cover
14229         PROB_UNINITIALIZED.
14230         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14231         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14232         (PRED_LOOP_ITERATIONS_MAX): Likewise.
14233         (PRED_LOOP_IV_COMPARE): Likewise.
14234         * predict.h (PROB_UNINITIALIZED): Define new constant.
14236 2018-01-19  Martin Liska  <mliska@suse.cz>
14238         * predict.c (dump_prediction): Add new format for
14239         analyze_brprob.py script which is enabled with -details
14240         suboption.
14241         * profile-count.h (precise_p): New function.
14243 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14245         PR tree-optimization/83922
14246         * tree-vect-loop.c (vect_verify_full_masking): Return false if
14247         there are no statements that need masking.
14248         (vect_active_double_reduction_p): New function.
14249         (vect_analyze_loop_operations): Use it when handling phis that
14250         are not in the loop header.
14252 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14254         PR tree-optimization/83914
14255         * tree-vect-loop.c (vectorizable_induction): Don't convert
14256         init_expr or apply the peeling adjustment for inductions
14257         that are nested within the vectorized loop.
14259 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14261         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14262         instead of NEG.
14264 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14266         PR sanitizer/81715
14267         PR testsuite/83882
14268         * function.h (gimplify_parameters): Add gimple_seq * argument.
14269         * function.c: Include gimple.h and options.h.
14270         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14271         for the added local temporaries if needed.
14272         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14273         if there are any parameter cleanups, wrap whole body into a
14274         try/finally with the cleanups.
14276 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
14278         PR target/82964
14279         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14280         Use GET_MODE_CLASS for scalar floating point.
14282 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14284         PR ipa/82256
14285         patch by PaX Team
14286         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14287         Fix call of call_cgraph_insertion_hooks.
14289 2018-01-18  Martin Sebor  <msebor@redhat.com>
14291         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14293 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14295         PR ipa/83619
14296         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14297         frequencies.
14299 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
14301         PR other/70268
14302         * common.opt: (-ffile-prefix-map): New option.
14303         * opts.c (common_handle_option): Defer it.
14304         * opts-global.c (handle_common_deferred_options): Handle it.
14305         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14306         * file-prefix-map.h: New file.
14307         (remap_debug_filename, add_debug_prefix_map): ...here.
14308         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14309         * final.c (debug_prefix_map, add_debug_prefix_map
14310         remap_debug_filename): Move to...
14311         * file-prefix-map.c: New file.
14312         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14313         generalize, get rid of alloca(), use strrchr() instead of strchr().
14314         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14315         Implement in terms of add_prefix_map().
14316         (remap_macro_filename, remap_debug_filename): Implement in term of
14317         remap_filename().
14318         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14319         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14320         * dbxout.c: Include file-prefix-map.h.
14321         * varasm.c: Likewise.
14322         * vmsdbgout.c: Likewise.
14323         * xcoffout.c: Likewise.
14324         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14325         * doc/cppopts.texi (-fmacro-prefix-map): Document.
14326         * doc/invoke.texi (-ffile-prefix-map): Document.
14327         (-fdebug-prefix-map): Update description.
14329 2018-01-18  Martin Liska  <mliska@suse.cz>
14331         * config/i386/i386.c (indirect_thunk_name): Document that also
14332         lfence is emitted.
14333         (output_indirect_thunk): Document why both instructions
14334         (pause and lfence) are generated.
14336 2018-01-18  Richard Biener  <rguenther@suse.de>
14338         PR tree-optimization/83887
14339         * graphite-scop-detection.c
14340         (scop_detection::get_nearest_dom_with_single_entry): Remove.
14341         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14342         (scop_detection::merge_sese): Re-implement with a flood-fill
14343         algorithm that properly finds a SESE region if it exists.
14345 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14347         PR c/61240
14348         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14349         pointer_diff optimizations use view_convert instead of convert.
14351 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14353         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14354         Generate different code for -mno-speculate-indirect-jumps.
14355         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14356         (*call_indirect_aix<mode>): Disable for
14357         -mno-speculate-indirect-jumps.
14358         (*call_indirect_aix<mode>_nospec): New define_insn.
14359         (*call_value_indirect_aix<mode>): Disable for
14360         -mno-speculate-indirect-jumps.
14361         (*call_value_indirect_aix<mode>_nospec): New define_insn.
14362         (*sibcall_nonlocal_sysv<mode>): Generate different code for
14363         -mno-speculate-indirect-jumps.
14364         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14366 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14368         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
14369         long double type, set the flags for noting the default long double
14370         type, even if we don't pass or return a long double type.
14372 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
14374         PR ipa/83051
14375         * ipa-inline.c (flatten_function): Do not overwrite final inlining
14376         failure.
14378 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
14380         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
14381         support for merge[hl].
14382         (fold_mergehl_helper): New helper function.
14383         (tree-vector-builder.h): New #include for tree_vector_builder usage.
14384         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
14385         (altivec_vmrglw_direct): Add xxmrglw insn.
14387 2018-01-17  Andrew Waterman  <andrew@sifive.com>
14389         * config/riscv/riscv.c (riscv_conditional_register_usage): If
14390         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
14392 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
14394         PR lto/83121
14395         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14396         call the lto_location_cache before reading the
14397         DECL_SOURCE_LOCATION of the types.
14399 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
14400             Richard Sandiford  <richard.sandiford@linaro.org>
14402         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14403         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14404         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14405         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14406         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14407         Add declaration.
14408         * config/aarch64/constraints.md (aarch64_movti_operand):
14409         Limit immediates.
14410         * config/aarch64/predicates.md (Uti): Add new constraint.
14412 2018-01-17 Carl Love  <cel@us.ibm.com>
14414         * config/rs6000/vsx.md (define_expand xl_len_r,
14415         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14416         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14417         lxvll.
14418         (define_expand, define_insn): Move the shift left from  the
14419         define_insn to the define_expand for lxvl and stxvl instructions.
14420         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14421         and XL_LEN_R definitions to PURE.
14423 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
14425         * config/i386/i386.c (indirect_thunk_name): Declare regno
14426         as unsigned int.  Compare regno with INVALID_REGNUM.
14427         (output_indirect_thunk): Ditto.
14428         (output_indirect_thunk_function): Ditto.
14429         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
14430         in the call to output_indirect_thunk_function.
14432 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
14434         PR middle-end/83884
14435         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14436         rather than the size of inner_type to determine the stack slot size
14437         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14439 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
14441         PR target/83546
14442         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14443         to PTA_SILVERMONT.
14445 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
14447         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14448         endian Linux systems to optionally enable multilibs for selecting
14449         the long double type if the user configured an explicit type.
14450         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14451         have no long double multilibs if not defined.
14452         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14453         warn if the user used -mabi={ieee,ibm}longdouble and we built
14454         multilibs for long double.
14455         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14456         appropriate multilib option.
14457         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14458         multilib options.
14459         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14460         for building long double multilibs.
14461         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14463 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
14465         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14466         copies.
14468         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14469         64 bits.
14470         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14471         128 bits.
14473         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14474         variables.
14476         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14477         return value.
14479 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14481         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14482         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14484 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14486         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14487         different rtl trees depending on TARGET_64BIT.
14488         (rs6000_gen_lvx): Likewise.
14490 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14492         * config/visium/visium.md (nop): Tweak comment.
14493         (hazard_nop): Likewise.
14495 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14497         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14498         -mspeculate-indirect-jumps.
14499         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14500         for -mno-speculate-indirect-jumps.
14501         (*call_indirect_elfv2<mode>_nospec): New define_insn.
14502         (*call_value_indirect_elfv2<mode>): Disable for
14503         -mno-speculate-indirect-jumps.
14504         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14505         (indirect_jump): Emit different RTL for
14506         -mno-speculate-indirect-jumps.
14507         (*indirect_jump<mode>): Disable for
14508         -mno-speculate-indirect-jumps.
14509         (*indirect_jump<mode>_nospec): New define_insn.
14510         (tablejump): Emit different RTL for
14511         -mno-speculate-indirect-jumps.
14512         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14513         (tablejumpsi_nospec): New define_expand.
14514         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14515         (tablejumpdi_nospec): New define_expand.
14516         (*tablejump<mode>_internal1): Disable for
14517         -mno-speculate-indirect-jumps.
14518         (*tablejump<mode>_internal1_nospec): New define_insn.
14519         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14520         option.
14522 2018-01-16  Artyom Skrobov tyomitch@gmail.com
14524         * caller-save.c (insert_save): Drop unnecessary parameter.  All
14525         callers updated.
14527 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14528             Richard Biener  <rguenth@suse.de>
14530         PR libgomp/83590
14531         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
14532         return early, inline manually is_gimple_sizepos.  Make sure if we
14533         call gimplify_expr we don't end up with a gimple constant.
14534         * tree.c (variably_modified_type_p): Don't return true for
14535         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
14536         * gimplify.h (is_gimple_sizepos): Remove.
14538 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14540         PR tree-optimization/83857
14541         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
14542         vectorizable_live_operation for pure SLP statements.
14543         (vectorizable_live_operation): Handle PHIs.
14545 2018-01-16  Richard Biener  <rguenther@suse.de>
14547         PR tree-optimization/83867
14548         * tree-vect-stmts.c (vect_transform_stmt): Precompute
14549         nested_in_vect_loop_p since the scalar stmt may get invalidated.
14551 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14553         PR c/83844
14554         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
14555         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
14556         If off is not INTEGER_CST, issue a may not be aligned warning
14557         rather than isn't aligned.  Use isn%'t rather than isn't.
14558         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
14559         into MULT_EXPR.
14560         <case MULT_EXPR>: Improve the case when bottom and one of the
14561         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
14562         operand, in that case check if the other operand is multiple of
14563         bottom divided by the INTEGER_CST operand.
14565 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14567         PR target/83858
14568         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
14569         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
14570         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
14571         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
14572         * config/pa/pa.c (pa_function_arg_advance): Likewise.
14573         (pa_function_arg, pa_arg_partial_bytes): Likewise.
14574         (pa_function_arg_size): New function.
14576 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14578         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
14579         in a separate statement.
14581 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14583         PR tree-optimization/83847
14584         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
14585         group gathers and scatters.
14587 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14589         PR rtl-optimization/86620
14590         * params.def (max-sched-ready-insns): Bump minimum value to 1.
14592         PR rtl-optimization/83213
14593         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
14594         to last if both are JUMP_INSNs.
14596         PR tree-optimization/83843
14597         * gimple-ssa-store-merging.c
14598         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
14599         store_immediate_info for bswap/nop orig_stores.
14601 2018-01-15  Andrew Waterman  <andrew@sifive.com>
14603         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
14604         !TARGET_MUL.
14605         <UDIV>: Increase cost if !TARGET_DIV.
14607 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
14609         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
14610         (define_attr "cr_logical_3op"): New.
14611         (cceq_ior_compare): Adjust.
14612         (cceq_ior_compare_complement): Adjust.
14613         (*cceq_rev_compare): Adjust.
14614         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
14615         (is_cracked_insn): Adjust.
14616         (insn_must_be_first_in_group): Adjust.
14617         * config/rs6000/40x.md: Adjust.
14618         * config/rs6000/440.md: Adjust.
14619         * config/rs6000/476.md: Adjust.
14620         * config/rs6000/601.md: Adjust.
14621         * config/rs6000/603.md: Adjust.
14622         * config/rs6000/6xx.md: Adjust.
14623         * config/rs6000/7450.md: Adjust.
14624         * config/rs6000/7xx.md: Adjust.
14625         * config/rs6000/8540.md: Adjust.
14626         * config/rs6000/cell.md: Adjust.
14627         * config/rs6000/e300c2c3.md: Adjust.
14628         * config/rs6000/e500mc.md: Adjust.
14629         * config/rs6000/e500mc64.md: Adjust.
14630         * config/rs6000/e5500.md: Adjust.
14631         * config/rs6000/e6500.md: Adjust.
14632         * config/rs6000/mpc.md: Adjust.
14633         * config/rs6000/power4.md: Adjust.
14634         * config/rs6000/power5.md: Adjust.
14635         * config/rs6000/power6.md: Adjust.
14636         * config/rs6000/power7.md: Adjust.
14637         * config/rs6000/power8.md: Adjust.
14638         * config/rs6000/power9.md: Adjust.
14639         * config/rs6000/rs64.md: Adjust.
14640         * config/rs6000/titan.md: Adjust.
14642 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14644         * config/i386/predicates.md (indirect_branch_operand): Rewrite
14645         ix86_indirect_branch_register logic.
14647 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14649         * config/i386/constraints.md (Bs): Update
14650         ix86_indirect_branch_register check.  Don't check
14651         ix86_indirect_branch_register with GOT_memory_operand.
14652         (Bw): Likewise.
14653         * config/i386/predicates.md (GOT_memory_operand): Don't check
14654         ix86_indirect_branch_register here.
14655         (GOT32_symbol_operand): Likewise.
14657 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14659         * config/i386/predicates.md (constant_call_address_operand):
14660         Rewrite ix86_indirect_branch_register logic.
14661         (sibcall_insn_operand): Likewise.
14663 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14665         * config/i386/constraints.md (Bs): Replace
14666         ix86_indirect_branch_thunk_register with
14667         ix86_indirect_branch_register.
14668         (Bw): Likewise.
14669         * config/i386/i386.md (indirect_jump): Likewise.
14670         (tablejump): Likewise.
14671         (*sibcall_memory): Likewise.
14672         (*sibcall_value_memory): Likewise.
14673         Peepholes of indirect call and jump via memory: Likewise.
14674         * config/i386/i386.opt: Likewise.
14675         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14676         (GOT_memory_operand): Likewise.
14677         (call_insn_operand): Likewise.
14678         (sibcall_insn_operand): Likewise.
14679         (GOT32_symbol_operand): Likewise.
14681 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
14683         PR middle-end/83837
14684         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
14685         type rather than type addr's type points to.
14686         (expand_omp_atomic_mutex): Likewise.
14687         (expand_omp_atomic): Likewise.
14689 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
14691         PR target/83839
14692         * config/i386/i386.c (output_indirect_thunk_function): Use
14693         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
14694         for  __x86_return_thunk.
14696 2018-01-15  Richard Biener  <rguenther@suse.de>
14698         PR middle-end/83850
14699         * expmed.c (extract_bit_field_1): Fix typo.
14701 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14703         PR target/83687
14704         * config/arm/iterators.md (VF): New mode iterator.
14705         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
14706         Remove integer-related logic from pattern.
14707         (neon_vabd<mode>_3): Likewise.
14709 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
14711         PR middle-end/82694
14712         * common.opt (fstrict-overflow): No longer an alias.
14713         (fwrapv-pointer): New option.
14714         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
14715         also for pointer types based on flag_wrapv_pointer.
14716         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
14717         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
14718         opts->x_flag_wrapv got set.
14719         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
14720         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
14721         POINTER_TYPE_OVERFLOW_UNDEFINED.
14722         * match.pd: Likewise in address comparison pattern.
14723         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
14725 2018-01-15  Richard Biener  <rguenther@suse.de>
14727         PR lto/83804
14728         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
14729         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
14730         Reset type names to their identifier if their TYPE_DECL doesn't
14731         have linkage (and thus is used for ODR and devirt).
14732         (save_debug_info_for_decl): Remove.
14733         (save_debug_info_for_type): Likewise.
14734         (add_tree_to_fld_list): Adjust.
14735         * tree-pretty-print.c (dump_generic_node): Make dumping of
14736         type names more robust.
14738 2018-01-15  Richard Biener  <rguenther@suse.de>
14740         * BASE-VER: Bump to 8.0.1.
14742 2018-01-14  Martin Sebor  <msebor@redhat.com>
14744         PR other/83508
14745         * builtins.c (check_access): Avoid warning when the no-warning bit
14746         is set.
14748 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
14750         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
14751         * ira-color (allocno_hard_regs_compare): Likewise.
14753 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
14755         PR target/83013
14756         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
14757         Use .pushsection/.popsection.
14759 2018-01-14  Martin Sebor  <msebor@redhat.com>
14761         PR c++/81327
14762         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
14764 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
14766         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
14767         entry from extra_headers.
14768         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
14769         extra_headers, make the list bitwise identical to the i?86-*-* one.
14771 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14773         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
14774         -mcmodel=large with -mindirect-branch=thunk,
14775         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
14776         -mfunction-return=thunk-extern.
14777         * doc/invoke.texi: Document -mcmodel=large is incompatible with
14778         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
14779         -mfunction-return=thunk and -mfunction-return=thunk-extern.
14781 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14783         * config/i386/i386.c (print_reg): Print the name of the full
14784         integer register without '%'.
14785         (ix86_print_operand): Handle 'V'.
14786         * doc/extend.texi: Document 'V' modifier.
14788 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14790         * config/i386/constraints.md (Bs): Disallow memory operand for
14791         -mindirect-branch-register.
14792         (Bw): Likewise.
14793         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14794         (GOT_memory_operand): Likewise.
14795         (call_insn_operand): Likewise.
14796         (sibcall_insn_operand): Likewise.
14797         (GOT32_symbol_operand): Likewise.
14798         * config/i386/i386.md (indirect_jump): Call convert_memory_address
14799         for -mindirect-branch-register.
14800         (tablejump): Likewise.
14801         (*sibcall_memory): Likewise.
14802         (*sibcall_value_memory): Likewise.
14803         Disallow peepholes of indirect call and jump via memory for
14804         -mindirect-branch-register.
14805         (*call_pop): Replace m with Bw.
14806         (*call_value_pop): Likewise.
14807         (*sibcall_pop_memory): Replace m with Bs.
14808         * config/i386/i386.opt (mindirect-branch-register): New option.
14809         * doc/invoke.texi: Document -mindirect-branch-register option.
14811 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14813         * config/i386/i386-protos.h (ix86_output_function_return): New.
14814         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
14815         set function_return_type.
14816         (indirect_thunk_name): Add ret_p to indicate thunk for function
14817         return.
14818         (output_indirect_thunk_function): Pass false to
14819         indirect_thunk_name.
14820         (ix86_output_indirect_branch_via_reg): Likewise.
14821         (ix86_output_indirect_branch_via_push): Likewise.
14822         (output_indirect_thunk_function): Create alias for function
14823         return thunk if regno < 0.
14824         (ix86_output_function_return): New function.
14825         (ix86_handle_fndecl_attribute): Handle function_return.
14826         (ix86_attribute_table): Add function_return.
14827         * config/i386/i386.h (machine_function): Add
14828         function_return_type.
14829         * config/i386/i386.md (simple_return_internal): Use
14830         ix86_output_function_return.
14831         (simple_return_internal_long): Likewise.
14832         * config/i386/i386.opt (mfunction-return=): New option.
14833         (indirect_branch): Mention -mfunction-return=.
14834         * doc/extend.texi: Document function_return function attribute.
14835         * doc/invoke.texi: Document -mfunction-return= option.
14837 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
14839         * config/i386/i386-opts.h (indirect_branch): New.
14840         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
14841         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
14842         with local indirect jump when converting indirect call and jump.
14843         (ix86_set_indirect_branch_type): New.
14844         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
14845         (indirectlabelno): New.
14846         (indirect_thunk_needed): Likewise.
14847         (indirect_thunk_bnd_needed): Likewise.
14848         (indirect_thunks_used): Likewise.
14849         (indirect_thunks_bnd_used): Likewise.
14850         (INDIRECT_LABEL): Likewise.
14851         (indirect_thunk_name): Likewise.
14852         (output_indirect_thunk): Likewise.
14853         (output_indirect_thunk_function): Likewise.
14854         (ix86_output_indirect_branch_via_reg): Likewise.
14855         (ix86_output_indirect_branch_via_push): Likewise.
14856         (ix86_output_indirect_branch): Likewise.
14857         (ix86_output_indirect_jmp): Likewise.
14858         (ix86_code_end): Call output_indirect_thunk_function if needed.
14859         (ix86_output_call_insn): Call ix86_output_indirect_branch if
14860         needed.
14861         (ix86_handle_fndecl_attribute): Handle indirect_branch.
14862         (ix86_attribute_table): Add indirect_branch.
14863         * config/i386/i386.h (machine_function): Add indirect_branch_type
14864         and has_local_indirect_jump.
14865         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
14866         to true.
14867         (tablejump): Likewise.
14868         (*indirect_jump): Use ix86_output_indirect_jmp.
14869         (*tablejump_1): Likewise.
14870         (simple_return_indirect_internal): Likewise.
14871         * config/i386/i386.opt (mindirect-branch=): New option.
14872         (indirect_branch): New.
14873         (keep): Likewise.
14874         (thunk): Likewise.
14875         (thunk-inline): Likewise.
14876         (thunk-extern): Likewise.
14877         * doc/extend.texi: Document indirect_branch function attribute.
14878         * doc/invoke.texi: Document -mindirect-branch= option.
14880 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
14882         PR ipa/83051
14883         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
14885 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
14887         * ipa-inline.c (want_inline_small_function_p): Return false if
14888         inlining has already failed with CIF_FINAL_ERROR.
14889         (update_caller_keys): Call want_inline_small_function_p before
14890         can_inline_edge_p.
14891         (update_callee_keys): Likewise.
14893 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14895         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
14896         New function.
14897         (rs6000_quadword_masked_address_p): Likewise.
14898         (quad_aligned_load_p): Likewise.
14899         (quad_aligned_store_p): Likewise.
14900         (const_load_sequence_p): Add comment to describe the outer-most loop.
14901         (mimic_memory_attributes_and_flags): New function.
14902         (rs6000_gen_stvx): Likewise.
14903         (replace_swapped_aligned_store): Likewise.
14904         (rs6000_gen_lvx): Likewise.
14905         (replace_swapped_aligned_load): Likewise.
14906         (replace_swapped_load_constant): Capitalize argument name in
14907         comment describing this function.
14908         (rs6000_analyze_swaps): Add a third pass to search for vector loads
14909         and stores that access quad-word aligned addresses and replace
14910         with stvx or lvx instructions when appropriate.
14911         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
14912         New function prototype.
14913         (rs6000_quadword_masked_address_p): Likewise.
14914         (rs6000_gen_lvx): Likewise.
14915         (rs6000_gen_stvx): Likewise.
14916         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
14917         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
14918         when memory address is aligned.
14919         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
14920         this split to select lvx instruction when memory address is aligned.
14921         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
14922         instruction when memory address is aligned.
14923         (*vsx_le_perm_load_v16qi): Likewise.
14924         (four unnamed splitters): Modify to select the stvx instruction
14925         when memory is aligned.
14927 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
14929         * predict.c (determine_unlikely_bbs): Handle correctly BBs
14930         which appears in the queue multiple times.
14932 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14933             Alan Hayward  <alan.hayward@arm.com>
14934             David Sherwood  <david.sherwood@arm.com>
14936         * tree-vectorizer.h (vec_lower_bound): New structure.
14937         (_loop_vec_info): Add check_nonzero and lower_bounds.
14938         (LOOP_VINFO_CHECK_NONZERO): New macro.
14939         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14940         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14941         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14942         fields.  Make seg_len the distance travelled, not including the
14943         access size.
14944         (dr_direction_indicator): Declare.
14945         (dr_zero_step_indicator): Likewise.
14946         (dr_known_forward_stride_p): Likewise.
14947         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14948         tree-ssanames.h.
14949         (runtime_alias_check_p): Allow runtime alias checks with
14950         variable strides.
14951         (operator ==): Compare access_size and align.
14952         (prune_runtime_alias_test_list): Rework for new distinction between
14953         the access_size and seg_len.
14954         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
14955         segment lengths.
14956         (get_segment_min_max): New function.
14957         (create_intersect_range_checks): Use it.
14958         (dr_step_indicator): New function.
14959         (dr_direction_indicator): Likewise.
14960         (dr_zero_step_indicator): Likewise.
14961         (dr_known_forward_stride_p): Likewise.
14962         * tree-loop-distribution.c (data_ref_segment_size): Return
14963         DR_STEP * (niters - 1).
14964         (compute_alias_check_pairs): Update call to the dr_with_seg_len
14965         constructor.
14966         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14967         (vect_preserves_scalar_order_p): New function, split out from...
14968         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
14969         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14970         (vect_vfa_access_size): New function.
14971         (vect_vfa_align): Likewise.
14972         (vect_compile_time_alias): Take access_size_a and access_b arguments.
14973         (dump_lower_bound): New function.
14974         (vect_check_lower_bound): Likewise.
14975         (vect_small_gap_p): Likewise.
14976         (vectorizable_with_step_bound_p): Likewise.
14977         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14978         depencies if the vectorization factor is 1.  Convert the checks
14979         for nonzero steps into checks on the bounds of DR_STEP.  Try using
14980         a bunds check for variable steps if the minimum required step is
14981         relatively small. Update calls to the dr_with_seg_len
14982         constructor and to vect_compile_time_alias.
14983         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14984         function.
14985         (vect_loop_versioning): Call it.
14986         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14987         when retrying.
14988         (vect_estimate_min_profitable_iters): Account for any bounds checks.
14990 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14991             Alan Hayward  <alan.hayward@arm.com>
14992             David Sherwood  <david.sherwood@arm.com>
14994         * doc/sourcebuild.texi (vect_scatter_store): Document.
14995         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14996         optabs.
14997         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14998         Document.
14999         * genopinit.c (main): Add supports_vec_scatter_store and
15000         supports_vec_scatter_store_cached to target_optabs.
15001         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15002         IFN_MASK_SCATTER_STORE.
15003         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15004         functions.
15005         * internal-fn.h (internal_store_fn_p): Declare.
15006         (internal_fn_stored_value_index): Likewise.
15007         * internal-fn.c (scatter_store_direct): New macro.
15008         (expand_scatter_store_optab_fn): New function.
15009         (direct_scatter_store_optab_supported_p): New macro.
15010         (internal_store_fn_p): New function.
15011         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15012         IFN_MASK_SCATTER_STORE.
15013         (internal_fn_mask_index): Likewise.
15014         (internal_fn_stored_value_index): New function.
15015         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15016         for scatter stores.
15017         * optabs-query.h (supports_vec_scatter_store_p): Declare.
15018         * optabs-query.c (supports_vec_scatter_store_p): New function.
15019         * tree-vectorizer.h (vect_get_store_rhs): Declare.
15020         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15021         true for scatter stores.
15022         (vect_gather_scatter_fn_p): Handle scatter stores too.
15023         (vect_check_gather_scatter): Consider using scatter stores if
15024         supports_vec_scatter_store_p.
15025         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15026         scatter stores too.
15027         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15028         internal_fn_stored_value_index.
15029         (check_load_store_masking): Handle scatter stores too.
15030         (vect_get_store_rhs): Make public.
15031         (vectorizable_call): Use internal_store_fn_p.
15032         (vectorizable_store): Handle scatter store internal functions.
15033         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15034         when deciding whether the end of the group has been reached.
15035         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15036         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15037         (mask_scatter_store<mode>): New insns.
15039 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15040             Alan Hayward  <alan.hayward@arm.com>
15041             David Sherwood  <david.sherwood@arm.com>
15043         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15044         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15045         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15046         function.
15047         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15048         Use vect_truncate_gather_scatter_offset if we can't treat the
15049         operation as a normal gather load or scatter store.
15050         (get_group_load_store_type): Take the gather_scatter_info
15051         as argument.  Try using a gather load or scatter store for
15052         single-element groups.
15053         (get_load_store_type): Update calls to get_group_load_store_type
15054         and vect_use_strided_gather_scatters_p.
15056 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15057             Alan Hayward  <alan.hayward@arm.com>
15058             David Sherwood  <david.sherwood@arm.com>
15060         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15061         optional tree argument.
15062         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15063         null target hooks.
15064         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15065         but continue to use the current value as a fallback.
15066         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15067         to compare the updates.
15068         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15069         (get_load_store_type): Use it when handling a strided access.
15070         (vect_get_strided_load_store_ops): New function.
15071         (vect_get_data_ptr_increment): Likewise.
15072         (vectorizable_load): Handle strided gather loads.  Always pass
15073         a step to vect_create_data_ref_ptr and bump_vector_ptr.
15075 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15076             Alan Hayward  <alan.hayward@arm.com>
15077             David Sherwood  <david.sherwood@arm.com>
15079         * doc/md.texi (gather_load@var{m}): Document.
15080         (mask_gather_load@var{m}): Likewise.
15081         * genopinit.c (main): Add supports_vec_gather_load and
15082         supports_vec_gather_load_cached to target_optabs.
15083         * optabs-tree.c (init_tree_optimization_optabs): Use
15084         ggc_cleared_alloc to allocate target_optabs.
15085         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15086         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15087         functions.
15088         * internal-fn.h (internal_load_fn_p): Declare.
15089         (internal_gather_scatter_fn_p): Likewise.
15090         (internal_fn_mask_index): Likewise.
15091         (internal_gather_scatter_fn_supported_p): Likewise.
15092         * internal-fn.c (gather_load_direct): New macro.
15093         (expand_gather_load_optab_fn): New function.
15094         (direct_gather_load_optab_supported_p): New macro.
15095         (direct_internal_fn_optab): New function.
15096         (internal_load_fn_p): Likewise.
15097         (internal_gather_scatter_fn_p): Likewise.
15098         (internal_fn_mask_index): Likewise.
15099         (internal_gather_scatter_fn_supported_p): Likewise.
15100         * optabs-query.c (supports_at_least_one_mode_p): New function.
15101         (supports_vec_gather_load_p): Likewise.
15102         * optabs-query.h (supports_vec_gather_load_p): Declare.
15103         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15104         and memory_type field.
15105         (NUM_PATTERNS): Bump to 15.
15106         * tree-vect-data-refs.c: Include internal-fn.h.
15107         (vect_gather_scatter_fn_p): New function.
15108         (vect_describe_gather_scatter_call): Likewise.
15109         (vect_check_gather_scatter): Try using internal functions for
15110         gather loads.  Recognize existing calls to a gather load function.
15111         (vect_analyze_data_refs): Consider using gather loads if
15112         supports_vec_gather_load_p.
15113         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15114         (vect_get_gather_scatter_offset_type): Likewise.
15115         (vect_convert_mask_for_vectype): Likewise.
15116         (vect_add_conversion_to_patterm): Likewise.
15117         (vect_try_gather_scatter_pattern): Likewise.
15118         (vect_recog_gather_scatter_pattern): New pattern recognizer.
15119         (vect_vect_recog_func_ptrs): Add it.
15120         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15121         internal_fn_mask_index and internal_gather_scatter_fn_p.
15122         (check_load_store_masking): Take the gather_scatter_info as an
15123         argument and handle gather loads.
15124         (vect_get_gather_scatter_ops): New function.
15125         (vectorizable_call): Check internal_load_fn_p.
15126         (vectorizable_load): Likewise.  Handle gather load internal
15127         functions.
15128         (vectorizable_store): Update call to check_load_store_masking.
15129         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15130         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15131         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15132         (aarch64_gather_scale_operand_d): New predicates.
15133         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15134         (mask_gather_load<mode>): New insns.
15136 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15137             Alan Hayward  <alan.hayward@arm.com>
15138             David Sherwood  <david.sherwood@arm.com>
15140         * optabs.def (fold_left_plus_optab): New optab.
15141         * doc/md.texi (fold_left_plus_@var{m}): Document.
15142         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15143         * internal-fn.c (fold_left_direct): Define.
15144         (expand_fold_left_optab_fn): Likewise.
15145         (direct_fold_left_optab_supported_p): Likewise.
15146         * fold-const-call.c (fold_const_fold_left): New function.
15147         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15148         * tree-parloops.c (valid_reduction_p): New function.
15149         (gather_scalar_reductions): Use it.
15150         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15151         (vect_finish_replace_stmt): Declare.
15152         * tree-vect-loop.c (fold_left_reduction_fn): New function.
15153         (needs_fold_left_reduction_p): New function, split out from...
15154         (vect_is_simple_reduction): ...here.  Accept reductions that
15155         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15156         (vect_force_simple_reduction): Also store the reduction type in
15157         the assignment's STMT_VINFO_REDUC_TYPE.
15158         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15159         (merge_with_identity): New function.
15160         (vect_expand_fold_left): Likewise.
15161         (vectorize_fold_left_reduction): Likewise.
15162         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
15163         scalar phi in place for it.  Check for target support and reject
15164         cases that would reassociate the operation.  Defer the transform
15165         phase to vectorize_fold_left_reduction.
15166         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15167         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15168         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15170 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15172         * tree-if-conv.c (predicate_mem_writes): Remove redundant
15173         call to ifc_temp_var.
15175 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15176             Alan Hayward  <alan.hayward@arm.com>
15177             David Sherwood  <david.sherwood@arm.com>
15179         * target.def (legitimize_address_displacement): Take the original
15180         offset as a poly_int.
15181         * targhooks.h (default_legitimize_address_displacement): Update
15182         accordingly.
15183         * targhooks.c (default_legitimize_address_displacement): Likewise.
15184         * doc/tm.texi: Regenerate.
15185         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15186         as an argument, moving assert of ad->disp == ad->disp_term to...
15187         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
15188         Try calling targetm.legitimize_address_displacement before expanding
15189         the address rather than afterwards, and adjust for the new interface.
15190         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15191         Match the new hook interface.  Handle SVE addresses.
15192         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15193         new hook interface.
15195 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15197         * Makefile.in (OBJS): Add early-remat.o.
15198         * target.def (select_early_remat_modes): New hook.
15199         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15200         * doc/tm.texi: Regenerate.
15201         * targhooks.h (default_select_early_remat_modes): Declare.
15202         * targhooks.c (default_select_early_remat_modes): New function.
15203         * timevar.def (TV_EARLY_REMAT): New timevar.
15204         * passes.def (pass_early_remat): New pass.
15205         * tree-pass.h (make_pass_early_remat): Declare.
15206         * early-remat.c: New file.
15207         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15208         function.
15209         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15211 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15212             Alan Hayward  <alan.hayward@arm.com>
15213             David Sherwood  <david.sherwood@arm.com>
15215         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15216         vfm1 with a bound_epilog parameter.
15217         (vect_do_peeling): Update calls accordingly, and move the prologue
15218         call earlier in the function.  Treat the base bound_epilog as 0 for
15219         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
15220         this base when peeling for gaps.
15221         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15222         with fully-masked loops.
15223         (vect_estimate_min_profitable_iters): Handle the single peeled
15224         iteration in that case.
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-vect-data-refs.c (vect_analyze_group_access_1): Allow
15231         single-element interleaving even if the size is not a power of 2.
15232         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15233         accesses for single-element interleaving if the group size is
15234         not a power of 2.
15236 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15237             Alan Hayward  <alan.hayward@arm.com>
15238             David Sherwood  <david.sherwood@arm.com>
15240         * doc/md.texi (fold_extract_last_@var{m}): Document.
15241         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15242         * optabs.def (fold_extract_last_optab): New optab.
15243         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15244         * internal-fn.c (fold_extract_direct): New macro.
15245         (expand_fold_extract_optab_fn): Likewise.
15246         (direct_fold_extract_optab_supported_p): Likewise.
15247         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15248         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15249         EXTRACT_LAST_REDUCTION.
15250         (get_initial_def_for_reduction): Do not create an initial vector
15251         for EXTRACT_LAST_REDUCTION reductions.
15252         (vectorizable_reduction): Leave the scalar phi in place for
15253         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
15254         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
15255         epilogue code for EXTRACT_LAST_REDUCTION and defer the
15256         transform phase to vectorizable_condition.
15257         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15258         split out from...
15259         (vect_finish_stmt_generation): ...here.
15260         (vect_finish_replace_stmt): New function.
15261         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15262         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15263         pattern.
15264         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15266 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15267             Alan Hayward  <alan.hayward@arm.com>
15268             David Sherwood  <david.sherwood@arm.com>
15270         * doc/md.texi (extract_last_@var{m}): Document.
15271         * optabs.def (extract_last_optab): New optab.
15272         * internal-fn.def (EXTRACT_LAST): New internal function.
15273         * internal-fn.c (cond_unary_direct): New macro.
15274         (expand_cond_unary_optab_fn): Likewise.
15275         (direct_cond_unary_optab_supported_p): Likewise.
15276         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15277         loops using EXTRACT_LAST.
15278         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15279         (extract_last_<mode>): ...this optab.
15280         (vec_extract<mode><Vel>): Update accordingly.
15282 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15283             Alan Hayward  <alan.hayward@arm.com>
15284             David Sherwood  <david.sherwood@arm.com>
15286         * target.def (empty_mask_is_expensive): New hook.
15287         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15288         * doc/tm.texi: Regenerate.
15289         * targhooks.h (default_empty_mask_is_expensive): Declare.
15290         * targhooks.c (default_empty_mask_is_expensive): New function.
15291         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15292         if the target says that empty masks are expensive.
15293         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15294         New function.
15295         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15297 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15298             Alan Hayward  <alan.hayward@arm.com>
15299             David Sherwood  <david.sherwood@arm.com>
15301         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15302         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15303         (vect_use_loop_mask_for_alignment_p): New function.
15304         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15305         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15306         niters_skip argument.  Make sure that the first niters_skip elements
15307         of the first iteration are inactive.
15308         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15309         Update call to vect_set_loop_masks_directly.
15310         (get_misalign_in_elems): New function, split out from...
15311         (vect_gen_prolog_loop_niters): ...here.
15312         (vect_update_init_of_dr): Take a code argument that specifies whether
15313         the adjustment should be added or subtracted.
15314         (vect_update_init_of_drs): Likewise.
15315         (vect_prepare_for_masked_peels): New function.
15316         (vect_do_peeling): Skip prologue peeling if we're using a mask
15317         instead.  Update call to vect_update_inits_of_drs.
15318         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15319         mask_skip_niters.
15320         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15321         alignment.  Do not include the number of peeled iterations in
15322         the minimum threshold in that case.
15323         (vectorizable_induction): Adjust the start value down by
15324         LOOP_VINFO_MASK_SKIP_NITERS iterations.
15325         (vect_transform_loop): Call vect_prepare_for_masked_peels.
15326         Take the number of skipped iterations into account when calculating
15327         the loop bounds.
15328         * tree-vect-stmts.c (vect_gen_while_not): New function.
15330 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15331             Alan Hayward  <alan.hayward@arm.com>
15332             David Sherwood  <david.sherwood@arm.com>
15334         * doc/sourcebuild.texi (vect_fully_masked): Document.
15335         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15336         default value to 0.
15337         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15338         split out from...
15339         (vect_analyze_loop_2): ...here. Don't check the vectorization
15340         factor against the number of loop iterations if the loop is
15341         fully-masked.
15343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15344             Alan Hayward  <alan.hayward@arm.com>
15345             David Sherwood  <david.sherwood@arm.com>
15347         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15348         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15349         (dump_groups): Update accordingly.
15350         (iv_use::mem_type): New member variable.
15351         (address_p): New function.
15352         (record_use): Add a mem_type argument and initialize the new
15353         mem_type field.
15354         (record_group_use): Add a mem_type argument.  Use address_p.
15355         Remove obsolete null checks of base_object.  Update call to record_use.
15356         (find_interesting_uses_op): Update call to record_group_use.
15357         (find_interesting_uses_cond): Likewise.
15358         (find_interesting_uses_address): Likewise.
15359         (get_mem_type_for_internal_fn): New function.
15360         (find_address_like_use): Likewise.
15361         (find_interesting_uses_stmt): Try find_address_like_use before
15362         calling find_interesting_uses_op.
15363         (addr_offset_valid_p): Use the iv mem_type field as the type
15364         of the addressed memory.
15365         (add_autoinc_candidates): Likewise.
15366         (get_address_cost): Likewise.
15367         (split_small_address_groups_p): Use address_p.
15368         (split_address_groups): Likewise.
15369         (add_iv_candidate_for_use): Likewise.
15370         (autoinc_possible_for_pair): Likewise.
15371         (rewrite_groups): Likewise.
15372         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
15373         (determine_group_iv_cost): Update after split of USE_ADDRESS.
15374         (get_alias_ptr_type_for_ptr_address): New function.
15375         (rewrite_use_address): Rewrite address uses in calls that were
15376         identified by find_address_like_use.
15378 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15379             Alan Hayward  <alan.hayward@arm.com>
15380             David Sherwood  <david.sherwood@arm.com>
15382         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
15383         TARGET_MEM_REFs.
15384         * gimple-expr.h (is_gimple_addressable: Likewise.
15385         * gimple-expr.c (is_gimple_address): Likewise.
15386         * internal-fn.c (expand_call_mem_ref): New function.
15387         (expand_mask_load_optab_fn): Use it.
15388         (expand_mask_store_optab_fn): Likewise.
15390 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15391             Alan Hayward  <alan.hayward@arm.com>
15392             David Sherwood  <david.sherwood@arm.com>
15394         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15395         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15396         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15397         (cond_umax@var{mode}): Document.
15398         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15399         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15400         (cond_umin_optab, cond_umax_optab): New optabs.
15401         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15402         (COND_IOR, COND_XOR): New internal functions.
15403         * internal-fn.h (get_conditional_internal_fn): Declare.
15404         * internal-fn.c (cond_binary_direct): New macro.
15405         (expand_cond_binary_optab_fn): Likewise.
15406         (direct_cond_binary_optab_supported_p): Likewise.
15407         (get_conditional_internal_fn): New function.
15408         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15409         Cope with reduction statements that are vectorized as calls rather
15410         than assignments.
15411         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15412         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15413         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15414         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15415         (UNSPEC_COND_EOR): New unspecs.
15416         (optab): Add mappings for them.
15417         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15418         (sve_int_op, sve_fp_op): New int attributes.
15420 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15421             Alan Hayward  <alan.hayward@arm.com>
15422             David Sherwood  <david.sherwood@arm.com>
15424         * optabs.def (while_ult_optab): New optab.
15425         * doc/md.texi (while_ult@var{m}@var{n}): Document.
15426         * internal-fn.def (WHILE_ULT): New internal function.
15427         * internal-fn.h (direct_internal_fn_supported_p): New override
15428         that takes two types as argument.
15429         * internal-fn.c (while_direct): New macro.
15430         (expand_while_optab_fn): New function.
15431         (convert_optab_supported_p): Likewise.
15432         (direct_while_optab_supported_p): New macro.
15433         * wide-int.h (wi::udiv_ceil): New function.
15434         * tree-vectorizer.h (rgroup_masks): New structure.
15435         (vec_loop_masks): New typedef.
15436         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15437         and fully_masked_p.
15438         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15439         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15440         (vect_max_vf): New function.
15441         (slpeel_make_loop_iterate_ntimes): Delete.
15442         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15443         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15444         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15445         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15446         internal-fn.h, stor-layout.h and optabs-query.h.
15447         (vect_set_loop_mask): New function.
15448         (add_preheader_seq): Likewise.
15449         (add_header_seq): Likewise.
15450         (interleave_supported_p): Likewise.
15451         (vect_maybe_permute_loop_masks): Likewise.
15452         (vect_set_loop_masks_directly): Likewise.
15453         (vect_set_loop_condition_masked): Likewise.
15454         (vect_set_loop_condition_unmasked): New function, split out from
15455         slpeel_make_loop_iterate_ntimes.
15456         (slpeel_make_loop_iterate_ntimes): Rename to..
15457         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
15458         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15459         (vect_do_peeling): Update call accordingly.
15460         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15461         loops.
15462         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15463         mask_compare_type, can_fully_mask_p and fully_masked_p.
15464         (release_vec_loop_masks): New function.
15465         (_loop_vec_info): Use it to free the loop masks.
15466         (can_produce_all_loop_masks_p): New function.
15467         (vect_get_max_nscalars_per_iter): Likewise.
15468         (vect_verify_full_masking): Likewise.
15469         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15470         retries, and free the mask rgroups before retrying.  Check loop-wide
15471         reasons for disallowing fully-masked loops.  Make the final decision
15472         about whether use a fully-masked loop or not.
15473         (vect_estimate_min_profitable_iters): Do not assume that peeling
15474         for the number of iterations will be needed for fully-masked loops.
15475         (vectorizable_reduction): Disable fully-masked loops.
15476         (vectorizable_live_operation): Likewise.
15477         (vect_halve_mask_nunits): New function.
15478         (vect_double_mask_nunits): Likewise.
15479         (vect_record_loop_mask): Likewise.
15480         (vect_get_loop_mask): Likewise.
15481         (vect_transform_loop): Handle the case in which the final loop
15482         iteration might handle a partial vector.  Call vect_set_loop_condition
15483         instead of slpeel_make_loop_iterate_ntimes.
15484         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15485         (check_load_store_masking): New function.
15486         (prepare_load_store_mask): Likewise.
15487         (vectorizable_store): Handle fully-masked loops.
15488         (vectorizable_load): Likewise.
15489         (supportable_widening_operation): Use vect_halve_mask_nunits for
15490         booleans.
15491         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15492         (vect_gen_while): New function.
15493         * config/aarch64/aarch64.md (umax<mode>3): New expander.
15494         (aarch64_uqdec<mode>): New insn.
15496 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15497             Alan Hayward  <alan.hayward@arm.com>
15498             David Sherwood  <david.sherwood@arm.com>
15500         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15501         (reduc_xor_scal_optab): New optabs.
15502         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15503         (reduc_xor_scal_@var{m}): Document.
15504         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15505         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15506         internal functions.
15507         * fold-const-call.c (fold_const_call): Handle them.
15508         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15509         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15510         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15511         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15512         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15513         (UNSPEC_XORV): New unspecs.
15514         (optab): Add entries for them.
15515         (BITWISEV): New int iterator.
15516         (bit_reduc_op): New int attributes.
15518 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15519             Alan Hayward  <alan.hayward@arm.com>
15520             David Sherwood  <david.sherwood@arm.com>
15522         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15523         * internal-fn.def (VEC_SHL_INSERT): New internal function.
15524         * optabs.def (vec_shl_insert_optab): New optab.
15525         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15526         (duplicate_and_interleave): Likewise.
15527         * tree-vect-loop.c: Include internal-fn.h.
15528         (neutral_op_for_slp_reduction): New function, split out from
15529         get_initial_defs_for_reduction.
15530         (get_initial_def_for_reduction): Handle option 2 for variable-length
15531         vectors by loading the neutral value into a vector and then shifting
15532         the initial value into element 0.
15533         (get_initial_defs_for_reduction): Replace the code argument with
15534         the neutral value calculated by neutral_op_for_slp_reduction.
15535         Use gimple_build_vector for constant-length vectors.
15536         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
15537         but the first group_size elements have a neutral value.
15538         Use duplicate_and_interleave otherwise.
15539         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
15540         Update call to get_initial_defs_for_reduction.  Handle SLP
15541         reductions for variable-length vectors by creating one vector
15542         result for each scalar result, with the elements associated
15543         with other scalar results stubbed out with the neutral value.
15544         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
15545         Require IFN_VEC_SHL_INSERT for double reductions on
15546         variable-length vectors, or SLP reductions that have
15547         a neutral value.  Require can_duplicate_and_interleave_p
15548         support for variable-length unchained SLP reductions if there
15549         is no neutral value, such as for MIN/MAX reductions.  Also require
15550         the number of vector elements to be a multiple of the number of
15551         SLP statements when doing variable-length unchained SLP reductions.
15552         Update call to vect_create_epilog_for_reduction.
15553         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
15554         and remove initial values.
15555         (duplicate_and_interleave): Make public.
15556         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
15557         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
15559 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15560             Alan Hayward  <alan.hayward@arm.com>
15561             David Sherwood  <david.sherwood@arm.com>
15563         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
15564         (can_duplicate_and_interleave_p): New function.
15565         (vect_get_and_check_slp_defs): Take the vector of statements
15566         rather than just the current one.  Remove excess parentheses.
15567         Restriction rejectinon of vect_constant_def and vect_external_def
15568         for variable-length vectors to boolean types, or types for which
15569         can_duplicate_and_interleave_p is false.
15570         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
15571         (duplicate_and_interleave): New function.
15572         (vect_get_constant_vectors): Use gimple_build_vector for
15573         constant-length vectors and suitable variable-length constant
15574         vectors.  Use duplicate_and_interleave for other variable-length
15575         vectors.  Don't defer the update when inserting new statements.
15577 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15578             Alan Hayward  <alan.hayward@arm.com>
15579             David Sherwood  <david.sherwood@arm.com>
15581         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
15582         min_profitable_iters doesn't go negative.
15584 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15585             Alan Hayward  <alan.hayward@arm.com>
15586             David Sherwood  <david.sherwood@arm.com>
15588         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
15589         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
15590         * optabs.def (vec_mask_load_lanes_optab): New optab.
15591         (vec_mask_store_lanes_optab): Likewise.
15592         * internal-fn.def (MASK_LOAD_LANES): New internal function.
15593         (MASK_STORE_LANES): Likewise.
15594         * internal-fn.c (mask_load_lanes_direct): New macro.
15595         (mask_store_lanes_direct): Likewise.
15596         (expand_mask_load_optab_fn): Handle masked operations.
15597         (expand_mask_load_lanes_optab_fn): New macro.
15598         (expand_mask_store_optab_fn): Handle masked operations.
15599         (expand_mask_store_lanes_optab_fn): New macro.
15600         (direct_mask_load_lanes_optab_supported_p): Likewise.
15601         (direct_mask_store_lanes_optab_supported_p): Likewise.
15602         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
15603         parameter.
15604         (vect_load_lanes_supported): Likewise.
15605         * tree-vect-data-refs.c (strip_conversion): New function.
15606         (can_group_stmts_p): Likewise.
15607         (vect_analyze_data_ref_accesses): Use it instead of checking
15608         for a pair of assignments.
15609         (vect_store_lanes_supported): Take a masked_p parameter.
15610         (vect_load_lanes_supported): Likewise.
15611         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
15612         vect_store_lanes_supported and vect_load_lanes_supported.
15613         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15614         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
15615         parameter.  Don't allow gaps for masked accesses.
15616         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
15617         and vect_load_lanes_supported.
15618         (get_load_store_type): Take a masked_p parameter and update
15619         call to get_group_load_store_type.
15620         (vectorizable_store): Update call to get_load_store_type.
15621         Handle IFN_MASK_STORE_LANES.
15622         (vectorizable_load): Update call to get_load_store_type.
15623         Handle IFN_MASK_LOAD_LANES.
15625 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15626             Alan Hayward  <alan.hayward@arm.com>
15627             David Sherwood  <david.sherwood@arm.com>
15629         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
15630         modes for SVE.
15631         * config/aarch64/aarch64-protos.h
15632         (aarch64_sve_struct_memory_operand_p): Declare.
15633         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
15634         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
15635         (VPRED, vpred): Handle SVE structure modes.
15636         * config/aarch64/constraints.md (Utx): New constraint.
15637         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
15638         (aarch64_sve_struct_nonimmediate_operand): New predicates.
15639         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
15640         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
15641         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
15642         structure modes.  Split into pieces after RA.
15643         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
15644         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
15645         New patterns.
15646         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
15647         SVE structure modes.
15648         (aarch64_classify_address): Likewise.
15649         (sizetochar): Move earlier in file.
15650         (aarch64_print_operand): Handle SVE register lists.
15651         (aarch64_array_mode): New function.
15652         (aarch64_sve_struct_memory_operand_p): Likewise.
15653         (TARGET_ARRAY_MODE): Redefine.
15655 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15656             Alan Hayward  <alan.hayward@arm.com>
15657             David Sherwood  <david.sherwood@arm.com>
15659         * target.def (array_mode): New target hook.
15660         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
15661         * doc/tm.texi: Regenerate.
15662         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
15663         * hooks.c (hook_optmode_mode_uhwi_none): New function.
15664         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
15665         targetm.array_mode.
15666         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
15667         type sizes.
15669 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15670             Alan Hayward  <alan.hayward@arm.com>
15671             David Sherwood  <david.sherwood@arm.com>
15673         * fold-const.c (fold_binary_loc): Check the argument types
15674         rather than the result type when testing for a vector operation.
15676 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15678         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
15679         * doc/tm.texi: Regenerate.
15681 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15682             Alan Hayward  <alan.hayward@arm.com>
15683             David Sherwood  <david.sherwood@arm.com>
15685         * doc/invoke.texi (-msve-vector-bits=): Document new option.
15686         (sve): Document new AArch64 extension.
15687         * doc/md.texi (w): Extend the description of the AArch64
15688         constraint to include SVE vectors.
15689         (Upl, Upa): Document new AArch64 predicate constraints.
15690         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
15691         enum.
15692         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
15693         (msve-vector-bits=): New option.
15694         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
15695         SVE when these are disabled.
15696         (sve): New extension.
15697         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
15698         modes.  Adjust their number of units based on aarch64_sve_vg.
15699         (MAX_BITSIZE_MODE_ANY_MODE): Define.
15700         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
15701         aarch64_addr_query_type.
15702         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
15703         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
15704         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
15705         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
15706         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
15707         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
15708         (aarch64_simd_imm_zero_p): Delete.
15709         (aarch64_check_zero_based_sve_index_immediate): Declare.
15710         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15711         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15712         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15713         (aarch64_sve_float_mul_immediate_p): Likewise.
15714         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15715         rather than an rtx.
15716         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
15717         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
15718         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
15719         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
15720         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
15721         (aarch64_regmode_natural_size): Likewise.
15722         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
15723         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
15724         left one place.
15725         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
15726         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
15727         for VG and the SVE predicate registers.
15728         (V_ALIASES): Add a "z"-prefixed alias.
15729         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
15730         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
15731         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
15732         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
15733         (REG_CLASS_NAMES): Add entries for them.
15734         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
15735         and the predicate registers.
15736         (aarch64_sve_vg): Declare.
15737         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
15738         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
15739         (REGMODE_NATURAL_SIZE): Define.
15740         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
15741         SVE macros.
15742         * config/aarch64/aarch64.c: Include cfgrtl.h.
15743         (simd_immediate_info): Add a constructor for series vectors,
15744         and an associated step field.
15745         (aarch64_sve_vg): New variable.
15746         (aarch64_dbx_register_number): Handle VG and the predicate registers.
15747         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
15748         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
15749         (VEC_ANY_DATA, VEC_STRUCT): New constants.
15750         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
15751         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
15752         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
15753         (aarch64_get_mask_mode): New functions.
15754         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
15755         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
15756         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
15757         predicate modes and predicate registers.  Explicitly restrict
15758         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
15759         to store a vector mode if it is recognized by
15760         aarch64_classify_vector_mode.
15761         (aarch64_regmode_natural_size): New function.
15762         (aarch64_hard_regno_caller_save_mode): Return the original mode
15763         for predicates.
15764         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
15765         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
15766         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
15767         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
15768         functions.
15769         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
15770         does not overlap dest if the function is frame-related.  Handle
15771         SVE constants.
15772         (aarch64_split_add_offset): New function.
15773         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
15774         them aarch64_add_offset.
15775         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
15776         and update call to aarch64_sub_sp.
15777         (aarch64_add_cfa_expression): New function.
15778         (aarch64_expand_prologue): Pass extra temporary registers to the
15779         functions above.  Handle the case in which we need to emit new
15780         DW_CFA_expressions for registers that were originally saved
15781         relative to the stack pointer, but now have to be expressed
15782         relative to the frame pointer.
15783         (aarch64_output_mi_thunk): Pass extra temporary registers to the
15784         functions above.
15785         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
15786         IP0 and IP1 values for SVE frames.
15787         (aarch64_expand_vec_series): New function.
15788         (aarch64_expand_sve_widened_duplicate): Likewise.
15789         (aarch64_expand_sve_const_vector): Likewise.
15790         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
15791         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
15792         into the register, rather than emitting a SET directly.
15793         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
15794         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
15795         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
15796         (offset_9bit_signed_scaled_p): New functions.
15797         (aarch64_replicate_bitmask_imm): New function.
15798         (aarch64_bitmask_imm): Use it.
15799         (aarch64_cannot_force_const_mem): Reject expressions involving
15800         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
15801         (aarch64_classify_index): Handle SVE indices, by requiring
15802         a plain register index with a scale that matches the element size.
15803         (aarch64_classify_address): Handle SVE addresses.  Assert that
15804         the mode of the address is VOIDmode or an integer mode.
15805         Update call to aarch64_classify_symbol.
15806         (aarch64_classify_symbolic_expression): Update call to
15807         aarch64_classify_symbol.
15808         (aarch64_const_vec_all_in_range_p): New function.
15809         (aarch64_print_vector_float_operand): Likewise.
15810         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
15811         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
15812         and the FP immediates 1.0 and 0.5.
15813         (aarch64_print_address_internal): Handle SVE addresses.
15814         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
15815         (aarch64_regno_regclass): Handle predicate registers.
15816         (aarch64_secondary_reload): Handle big-endian reloads of SVE
15817         data modes.
15818         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
15819         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
15820         (aarch64_convert_sve_vector_bits): New function.
15821         (aarch64_override_options): Use it to handle -msve-vector-bits=.
15822         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15823         rather than an rtx.
15824         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
15825         Handle SVE vector and predicate modes.  Accept VL-based constants
15826         that need only one temporary register, and VL offsets that require
15827         no temporary registers.
15828         (aarch64_conditional_register_usage): Mark the predicate registers
15829         as fixed if SVE isn't available.
15830         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
15831         Return true for SVE vector and predicate modes.
15832         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
15833         rather than an unsigned int.  Handle SVE modes.
15834         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
15835         SVE modes.
15836         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
15837         if SVE is enabled.
15838         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15839         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15840         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15841         (aarch64_sve_float_mul_immediate_p): New functions.
15842         (aarch64_sve_valid_immediate): New function.
15843         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
15844         Explicitly reject structure modes.  Check for INDEX constants.
15845         Handle PTRUE and PFALSE constants.
15846         (aarch64_check_zero_based_sve_index_immediate): New function.
15847         (aarch64_simd_imm_zero_p): Delete.
15848         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
15849         vector modes.  Accept constants in the range of CNT[BHWD].
15850         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
15851         ask for an Advanced SIMD mode.
15852         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
15853         (aarch64_simd_vector_alignment): Handle SVE predicates.
15854         (aarch64_vectorize_preferred_vector_alignment): New function.
15855         (aarch64_simd_vector_alignment_reachable): Use it instead of
15856         the vector size.
15857         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
15858         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
15859         functions.
15860         (MAX_VECT_LEN): Delete.
15861         (expand_vec_perm_d): Add a vec_flags field.
15862         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
15863         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
15864         (aarch64_evpc_ext): Don't apply a big-endian lane correction
15865         for SVE modes.
15866         (aarch64_evpc_rev): Rename to...
15867         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
15868         (aarch64_evpc_rev_global): New function.
15869         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
15870         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
15871         MAX_VECT_LEN.
15872         (aarch64_evpc_sve_tbl): New function.
15873         (aarch64_expand_vec_perm_const_1): Update after rename of
15874         aarch64_evpc_rev.  Handle SVE permutes too, trying
15875         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
15876         than aarch64_evpc_tbl.
15877         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
15878         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
15879         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
15880         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
15881         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
15882         (aarch64_expand_sve_vcond): New functions.
15883         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
15884         of aarch64_vector_mode_p.
15885         (aarch64_dwarf_poly_indeterminate_value): New function.
15886         (aarch64_compute_pressure_classes): Likewise.
15887         (aarch64_can_change_mode_class): Likewise.
15888         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
15889         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
15890         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
15891         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
15892         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
15893         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
15894         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
15895         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
15896         constraints.
15897         (Dn, Dl, Dr): Accept const as well as const_vector.
15898         (Dz): Likewise.  Compare against CONST0_RTX.
15899         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
15900         of "vector" where appropriate.
15901         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
15902         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
15903         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
15904         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
15905         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
15906         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
15907         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
15908         (v_int_equiv): Extend to SVE modes.
15909         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
15910         mode attributes.
15911         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
15912         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
15913         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
15914         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
15915         (SVE_COND_FP_CMP): New int iterators.
15916         (perm_hilo): Handle the new unpack unspecs.
15917         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
15918         attributes.
15919         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
15920         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
15921         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
15922         (aarch64_equality_operator, aarch64_constant_vector_operand)
15923         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
15924         (aarch64_sve_nonimmediate_operand): Likewise.
15925         (aarch64_sve_general_operand): Likewise.
15926         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
15927         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
15928         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
15929         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
15930         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
15931         (aarch64_sve_float_arith_immediate): Likewise.
15932         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
15933         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
15934         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15935         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15936         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15937         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15938         (aarch64_sve_float_arith_operand): Likewise.
15939         (aarch64_sve_float_arith_with_sub_operand): Likewise.
15940         (aarch64_sve_float_mul_operand): Likewise.
15941         (aarch64_sve_vec_perm_operand): Likewise.
15942         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15943         (aarch64_mov_operand): Accept const_poly_int and const_vector.
15944         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15945         as well as const_vector.
15946         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15947         in file.  Use CONST0_RTX and CONSTM1_RTX.
15948         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
15949         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15950         Use aarch64_simd_imm_zero.
15951         * config/aarch64/aarch64-sve.md: New file.
15952         * config/aarch64/aarch64.md: Include it.
15953         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15954         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15955         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15956         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15957         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15958         (sve): New attribute.
15959         (enabled): Disable instructions with the sve attribute unless
15960         TARGET_SVE.
15961         (movqi, movhi): Pass CONST_POLY_INT operaneds through
15962         aarch64_expand_mov_immediate.
15963         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15964         CNT[BHSD] immediates.
15965         (movti): Split CONST_POLY_INT moves into two halves.
15966         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15967         Split additions that need a temporary here if the destination
15968         is the stack pointer.
15969         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15970         (*add<mode>3_poly_1): New instruction.
15971         (set_clobber_cc): New expander.
15973 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15975         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15976         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
15977         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15978         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15979         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
15980         Change innermode from fixed_mode_size to machine_mode.
15981         (simplify_subreg): Update call accordingly.  Handle a constant-sized
15982         subreg of a variable-length CONST_VECTOR.
15984 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15985             Alan Hayward  <alan.hayward@arm.com>
15986             David Sherwood  <david.sherwood@arm.com>
15988         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15989         (add_offset_to_base): New function, split out from...
15990         (create_mem_ref): ...here.  When handling a scale other than 1,
15991         check first whether the address is valid without the offset.
15992         Add it into the base if so, leaving the index and scale as-is.
15994 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15996         PR c++/83778
15997         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15998         fold_for_warn before checking if arg2 is INTEGER_CST.
16000 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
16002         * config/rs6000/predicates.md (load_multiple_operation): Delete.
16003         (store_multiple_operation): Delete.
16004         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16005         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16006         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16007         guarded by TARGET_STRING.
16008         (rs6000_output_load_multiple): Delete.
16009         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16010         OPTION_MASK_STRING / TARGET_STRING handling.
16011         (print_operand) <'N', 'O'>: Add comment that these are unused now.
16012         (const rs6000_opt_masks) <"string">: Change mask to 0.
16013         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16014         (MASK_STRING): Delete.
16015         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16016         parts.  Simplify.
16017         (load_multiple): Delete.
16018         (*ldmsi8): Delete.
16019         (*ldmsi7): Delete.
16020         (*ldmsi6): Delete.
16021         (*ldmsi5): Delete.
16022         (*ldmsi4): Delete.
16023         (*ldmsi3): Delete.
16024         (store_multiple): Delete.
16025         (*stmsi8): Delete.
16026         (*stmsi7): Delete.
16027         (*stmsi6): Delete.
16028         (*stmsi5): Delete.
16029         (*stmsi4): Delete.
16030         (*stmsi3): Delete.
16031         (movmemsi_8reg): Delete.
16032         (corresponding unnamed define_insn): Delete.
16033         (movmemsi_6reg): Delete.
16034         (corresponding unnamed define_insn): Delete.
16035         (movmemsi_4reg): Delete.
16036         (corresponding unnamed define_insn): Delete.
16037         (movmemsi_2reg): Delete.
16038         (corresponding unnamed define_insn): Delete.
16039         (movmemsi_1reg): Delete.
16040         (corresponding unnamed define_insn): Delete.
16041         * config/rs6000/rs6000.opt (mno-string): New.
16042         (mstring): Replace by deprecation warning stub.
16043         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16045 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16047         * regrename.c (regrename_do_replace): If replacing the same
16048         reg multiple times, try to reuse last created gen_raw_REG.
16050         PR debug/81155
16051         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16052         main to workaround a bug in GDB.
16054 2018-01-12  Tom de Vries  <tom@codesourcery.com>
16056         PR target/83737
16057         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16059 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
16061         PR rtl-optimization/80481
16062         * ira-color.c (get_cap_member): New function.
16063         (allocnos_conflict_by_live_ranges_p): Use it.
16064         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16065         (setup_slot_coalesced_allocno_live_ranges): Ditto.
16067 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
16069         PR target/83628
16070         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16071         (*saddl_se_1): Ditto.
16072         (*ssubsi_1): Ditto.
16073         (*ssubl_se_1): Ditto.
16075 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16077         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16078         rather than wi::to_widest for DR_INITs.
16079         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16080         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16081         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16082         INTEGER_CSTs.
16083         (vect_analyze_group_access_1): Note that here.
16085 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16087         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16088         polynomial type sizes.
16090 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16092         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16093         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16094         (gimple_add_tmp_var): Likewise.
16096 2018-01-12  Martin Liska  <mliska@suse.cz>
16098         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16099         (gimple_alloc_sizes): Likewise.
16100         (dump_gimple_statistics): Use PRIu64 in printf format.
16101         * gimple.h: Change uint64_t to int.
16103 2018-01-12  Martin Liska  <mliska@suse.cz>
16105         * tree-core.h: Use uint64_t instead of int.
16106         * tree.c (tree_node_counts): Likewise.
16107         (tree_node_sizes): Likewise.
16108         (dump_tree_statistics): Use PRIu64 in printf format.
16110 2018-01-12  Martin Liska  <mliska@suse.cz>
16112         * Makefile.in: As qsort_chk is implemented in vec.c, add
16113         vec.o to linkage of gencfn-macros.
16114         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16115         passing the info to record_node_allocation_statistics.
16116         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16117         and pass the info.
16118         * ggc-common.c (struct ggc_usage): Add operator== and use
16119         it in operator< and compare function.
16120         * mem-stats.h (struct mem_usage): Likewise.
16121         * vec.c (struct vec_usage): Remove operator< and compare
16122         function. Can be simply inherited.
16124 2018-01-12  Martin Jambor  <mjambor@suse.cz>
16126         PR target/81616
16127         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16128         * tree-ssa-math-opts.c: Include domwalk.h.
16129         (convert_mult_to_fma_1): New function.
16130         (fma_transformation_info): New type.
16131         (fma_deferring_state): Likewise.
16132         (cancel_fma_deferring): New function.
16133         (result_of_phi): Likewise.
16134         (last_fma_candidate_feeds_initial_phi): Likewise.
16135         (convert_mult_to_fma): Added deferring logic, split actual
16136         transformation to convert_mult_to_fma_1.
16137         (math_opts_dom_walker): New type.
16138         (math_opts_dom_walker::after_dom_children): New method, body moved
16139         here from pass_optimize_widening_mul::execute, added deferring logic
16140         bits.
16141         (pass_optimize_widening_mul::execute): Moved most of code to
16142         math_opts_dom_walker::after_dom_children.
16143         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16144         * config/i386/i386.c (ix86_option_override_internal): Added
16145         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16147 2018-01-12  Richard Biener  <rguenther@suse.de>
16149         PR debug/83157
16150         * dwarf2out.c (gen_variable_die): Do not reset old_die for
16151         inline instance vars.
16153 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
16155         PR target/81819
16156         * config/rx/rx.c (rx_is_restricted_memory_address):
16157         Handle SUBREG case.
16159 2018-01-12  Richard Biener  <rguenther@suse.de>
16161         PR tree-optimization/80846
16162         * target.def (split_reduction): New target hook.
16163         * targhooks.c (default_split_reduction): New function.
16164         * targhooks.h (default_split_reduction): Declare.
16165         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16166         target requests first reduce vectors by combining low and high
16167         parts.
16168         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16169         (get_vectype_for_scalar_type_and_size): Export.
16170         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16171         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16172         * doc/tm.texi: Regenerate.
16173         * config/i386/i386.c (ix86_split_reduction): Implement
16174         TARGET_VECTORIZE_SPLIT_REDUCTION.
16176 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16178         PR target/83368
16179         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16180         in PIC mode except for TARGET_VXWORKS_RTP.
16181         * config/sparc/sparc.c: Include cfgrtl.h.
16182         (TARGET_INIT_PIC_REG): Define.
16183         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16184         (sparc_pic_register_p): New predicate.
16185         (sparc_legitimate_address_p): Use it.
16186         (sparc_legitimize_pic_address): Likewise.
16187         (sparc_delegitimize_address): Likewise.
16188         (sparc_mode_dependent_address_p): Likewise.
16189         (gen_load_pcrel_sym): Remove 4th parameter.
16190         (load_got_register): Adjust call to above.  Remove obsolete stuff.
16191         (sparc_expand_prologue): Do not call load_got_register here.
16192         (sparc_flat_expand_prologue): Likewise.
16193         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16194         (sparc_use_pseudo_pic_reg): New function.
16195         (sparc_init_pic_reg): Likewise.
16196         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16197         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16199 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
16201         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16202         Add item for branch_cost.
16204 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16206         PR rtl-optimization/83565
16207         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16208         not extend the result to a larger mode for rotate operations.
16209         (num_sign_bit_copies1): Likewise.
16211 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16213         PR target/40411
16214         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16215         -symbolic.
16216         Use values-Xc.o for -pedantic.
16217         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16219 2018-01-12  Martin Liska  <mliska@suse.cz>
16221         PR ipa/83054
16222         * ipa-devirt.c (final_warning_record::grow_type_warnings):
16223         New function.
16224         (possible_polymorphic_call_targets): Use it.
16225         (ipa_devirt): Likewise.
16227 2018-01-12  Martin Liska  <mliska@suse.cz>
16229         * profile-count.h (enum profile_quality): Use 0 as invalid
16230         enum value of profile_quality.
16232 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16234         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16235         -mext-string options.
16237 2018-01-12  Richard Biener  <rguenther@suse.de>
16239         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16240         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16241         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16242         Likewise.
16243         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16245 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16247         * configure.ac (--with-long-double-format): Add support for the
16248         configuration option to change the default long double format on
16249         PowerPC systems.
16250         * config.gcc (powerpc*-linux*-*): Likewise.
16251         * configure: Regenerate.
16252         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16253         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16254         used without modification.
16256 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16258         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16259         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16260         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16261         MISC_BUILTIN_SPEC_BARRIER.
16262         (rs6000_init_builtins): Likewise.
16263         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16264         enum value.
16265         (speculation_barrier): New define_insn.
16266         * doc/extend.texi: Document __builtin_speculation_barrier.
16268 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16270         PR target/83203
16271         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16272         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16273         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16274         iterators.
16275         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
16276         integral modes instead of "ss" and "sd".
16277         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16278         vectors with 32-bit and 64-bit elements.
16279         (vecdupssescalarmodesuffix): New mode attribute.
16280         (vec_dup<mode>): Use it.
16282 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
16284         PR target/83330
16285         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16286         frame if argument is passed on stack.
16288 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16290         PR target/82682
16291         * ree.c (combine_reaching_defs): Optimize also
16292         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16293         reg2=any_extend(exp); reg1=reg2;, formatting fix.
16295 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16297         PR middle-end/83189
16298         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16300 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16302         PR middle-end/83718
16303         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16304         after they are computed.
16306 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
16308         PR tree-optimization/83695
16309         * gimple-loop-linterchange.cc
16310         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16311         reset cached scev information after interchange.
16312         (pass_linterchange::execute): Remove call to scev_reset_htab.
16314 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16316         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16317         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16318         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16319         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16320         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16321         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16322         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16323         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16324         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16325         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16326         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16327         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16328         (V_lane_reg): Likewise.
16329         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16330         New define_expand.
16331         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16332         (vfmal_lane_low<mode>_intrinsic,
16333         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16334         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16335         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16336         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16337         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16338         vfmsl_lane_high<mode>_intrinsic): New define_insns.
16340 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16342         * config/arm/arm-cpus.in (fp16fml): New feature.
16343         (ALL_SIMD): Add fp16fml.
16344         (armv8.2-a): Add fp16fml as an option.
16345         (armv8.3-a): Likewise.
16346         (armv8.4-a): Add fp16fml as part of fp16.
16347         * config/arm/arm.h (TARGET_FP16FML): Define.
16348         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16349         when appropriate.
16350         * config/arm/arm-modes.def (V2HF): Define.
16351         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16352         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16353         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16354         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16355         vfmsl_low, vfmsl_high): New set of builtins.
16356         * config/arm/iterators.md (PLUSMINUS): New code iterator.
16357         (vfml_op): New code attribute.
16358         (VFMLHALVES): New int iterator.
16359         (VFML, VFMLSEL): New mode attributes.
16360         (V_reg): Define mapping for V2HF.
16361         (V_hi, V_lo): New mode attributes.
16362         (VF_constraint): Likewise.
16363         (vfml_half, vfml_half_selector): New int attributes.
16364         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16365         define_expand.
16366         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16367         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
16368         New define_insn.
16369         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
16370         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
16371         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
16372         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
16373         documentation.
16374         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
16375         Document new effective target and option set.
16377 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16379         * config/arm/arm-cpus.in (armv8_4): New feature.
16380         (ARMv8_4a): New fgroup.
16381         (armv8.4-a): New arch.
16382         * config/arm/arm-tables.opt: Regenerate.
16383         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
16384         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
16385         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
16386         Add matching rules for -march=armv8.4-a and extensions.
16387         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
16389 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
16391         PR target/81821
16392         * config/rx/rx.md (BW): New mode attribute.
16393         (sync_lock_test_and_setsi): Add mode suffix to insn output.
16395 2018-01-11  Richard Biener  <rguenther@suse.de>
16397         PR tree-optimization/83435
16398         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16399         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16400         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16402 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16403             Alan Hayward  <alan.hayward@arm.com>
16404             David Sherwood  <david.sherwood@arm.com>
16406         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16407         field.
16408         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
16409         (aarch64_print_address_internal): Use it to check for a zero offset.
16411 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16412             Alan Hayward  <alan.hayward@arm.com>
16413             David Sherwood  <david.sherwood@arm.com>
16415         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16416         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16417         Return a poly_int64 rather than a HOST_WIDE_INT.
16418         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16419         rather than a HOST_WIDE_INT.
16420         * config/aarch64/aarch64.h (aarch64_frame): Protect with
16421         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
16422         hard_fp_offset, frame_size, initial_adjust, callee_offset and
16423         final_offset from HOST_WIDE_INT to poly_int64.
16424         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16425         to_constant when getting the number of units in an Advanced SIMD
16426         mode.
16427         (aarch64_builtin_vectorized_function): Check for a constant number
16428         of units.
16429         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16430         GET_MODE_SIZE.
16431         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16432         attribute instead of GET_MODE_NUNITS.
16433         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16434         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16435         GET_MODE_SIZE for fixed-size registers.
16436         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16437         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16438         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16439         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16440         (aarch64_print_operand, aarch64_print_address_internal)
16441         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16442         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16443         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16444         Handle polynomial GET_MODE_SIZE.
16445         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
16446         wider than SImode without modification.
16447         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16448         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16449         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16450         passing and returning SVE modes.
16451         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16452         rather than GEN_INT.
16453         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16454         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16455         (aarch64_allocate_and_probe_stack_space): Likewise.
16456         (aarch64_layout_frame): Cope with polynomial offsets.
16457         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16458         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
16459         polynomial offsets.
16460         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16461         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16462         poly_int64 rather than a HOST_WIDE_INT.
16463         (aarch64_get_separate_components, aarch64_process_components)
16464         (aarch64_expand_prologue, aarch64_expand_epilogue)
16465         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16466         (aarch64_anchor_offset): New function, split out from...
16467         (aarch64_legitimize_address): ...here.
16468         (aarch64_builtin_vectorization_cost): Handle polynomial
16469         TYPE_VECTOR_SUBPARTS.
16470         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16471         GET_MODE_NUNITS.
16472         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16473         number of elements from the PARALLEL rather than the mode.
16474         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16475         rather than GET_MODE_BITSIZE.
16476         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16477         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16478         (aarch64_expand_vec_perm_const_1): Handle polynomial
16479         d->perm.length () and d->perm elements.
16480         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
16481         Apply to_constant to d->perm elements.
16482         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16483         polynomial CONST_VECTOR_NUNITS.
16484         (aarch64_move_pointer): Take amount as a poly_int64 rather
16485         than an int.
16486         (aarch64_progress_pointer): Avoid temporary variable.
16487         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16488         the mode attribute instead of GET_MODE.
16490 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16491             Alan Hayward  <alan.hayward@arm.com>
16492             David Sherwood  <david.sherwood@arm.com>
16494         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16495         x exists before using it.
16496         (aarch64_add_constant_internal): Rename to...
16497         (aarch64_add_offset_1): ...this.  Replace regnum with separate
16498         src and dest rtxes.  Handle the case in which they're different,
16499         including when the offset is zero.  Replace scratchreg with an rtx.
16500         Use 2 additions if there is no spare register into which we can
16501         move a 16-bit constant.
16502         (aarch64_add_constant): Delete.
16503         (aarch64_add_offset): Replace reg with separate src and dest
16504         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
16505         Use aarch64_add_offset_1.
16506         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16507         an rtx rather than an int.  Take the delta as a poly_int64
16508         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
16509         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16510         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16511         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16512         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16513         and aarch64_add_sp.
16514         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16515         aarch64_add_constant.
16517 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16519         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16520         Use scalar_float_mode.
16522 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16524         * config/aarch64/aarch64-simd.md
16525         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16526         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16527         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16528         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16529         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16530         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16531         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
16532         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
16533         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
16534         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
16536 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16538         PR target/83514
16539         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
16540         targ_options->x_arm_arch_string is non NULL.
16542 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
16544         * config/aarch64/aarch64.h
16545         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
16547 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
16549         PR target/82096
16550         * expmed.c (emit_store_flag_force): Swap if const op0
16551         and change VOIDmode to mode of op0.
16553 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16555         PR rtl-optimization/83761
16556         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
16557         than bytes to mode_for_size.
16559 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16561         PR middle-end/83189
16562         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
16563         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
16564         profile.
16566 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16568         PR middle-end/83575
16569         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
16570         when in layout mode.
16571         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
16572         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
16573         partition fixup.
16575 2018-01-10  Michael Collison  <michael.collison@arm.com>
16577         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
16578         * config/aarch64/aarch64-option-extension.def: Add
16579         AARCH64_OPT_EXTENSION of 'fp16fml'.
16580         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16581         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
16582         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
16583         * config/aarch64/constraints.md (Ui7): New constraint.
16584         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
16585         (VFMLA_SEL_W): Ditto.
16586         (f16quad): Ditto.
16587         (f16mac1): Ditto.
16588         (VFMLA16_LOW): New int iterator.
16589         (VFMLA16_HIGH): Ditto.
16590         (UNSPEC_FMLAL): New unspec.
16591         (UNSPEC_FMLSL): Ditto.
16592         (UNSPEC_FMLAL2): Ditto.
16593         (UNSPEC_FMLSL2): Ditto.
16594         (f16mac): New code attribute.
16595         * config/aarch64/aarch64-simd-builtins.def
16596         (aarch64_fmlal_lowv2sf): Ditto.
16597         (aarch64_fmlsl_lowv2sf): Ditto.
16598         (aarch64_fmlalq_lowv4sf): Ditto.
16599         (aarch64_fmlslq_lowv4sf): Ditto.
16600         (aarch64_fmlal_highv2sf): Ditto.
16601         (aarch64_fmlsl_highv2sf): Ditto.
16602         (aarch64_fmlalq_highv4sf): Ditto.
16603         (aarch64_fmlslq_highv4sf): Ditto.
16604         (aarch64_fmlal_lane_lowv2sf): Ditto.
16605         (aarch64_fmlsl_lane_lowv2sf): Ditto.
16606         (aarch64_fmlal_laneq_lowv2sf): Ditto.
16607         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
16608         (aarch64_fmlalq_lane_lowv4sf): Ditto.
16609         (aarch64_fmlsl_lane_lowv4sf): Ditto.
16610         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
16611         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
16612         (aarch64_fmlal_lane_highv2sf): Ditto.
16613         (aarch64_fmlsl_lane_highv2sf): Ditto.
16614         (aarch64_fmlal_laneq_highv2sf): Ditto.
16615         (aarch64_fmlsl_laneq_highv2sf): Ditto.
16616         (aarch64_fmlalq_lane_highv4sf): Ditto.
16617         (aarch64_fmlsl_lane_highv4sf): Ditto.
16618         (aarch64_fmlalq_laneq_highv4sf): Ditto.
16619         (aarch64_fmlsl_laneq_highv4sf): Ditto.
16620         * config/aarch64/aarch64-simd.md:
16621         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
16622         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16623         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
16624         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16625         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
16626         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
16627         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
16628         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
16629         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
16630         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
16631         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
16632         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
16633         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
16634         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
16635         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
16636         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
16637         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
16638         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
16639         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
16640         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
16641         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
16642         (vfmlsl_low_u32): Ditto.
16643         (vfmlalq_low_u32): Ditto.
16644         (vfmlslq_low_u32): Ditto.
16645         (vfmlal_high_u32): Ditto.
16646         (vfmlsl_high_u32): Ditto.
16647         (vfmlalq_high_u32): Ditto.
16648         (vfmlslq_high_u32): Ditto.
16649         (vfmlal_lane_low_u32): Ditto.
16650         (vfmlsl_lane_low_u32): Ditto.
16651         (vfmlal_laneq_low_u32): Ditto.
16652         (vfmlsl_laneq_low_u32): Ditto.
16653         (vfmlalq_lane_low_u32): Ditto.
16654         (vfmlslq_lane_low_u32): Ditto.
16655         (vfmlalq_laneq_low_u32): Ditto.
16656         (vfmlslq_laneq_low_u32): Ditto.
16657         (vfmlal_lane_high_u32): Ditto.
16658         (vfmlsl_lane_high_u32): Ditto.
16659         (vfmlal_laneq_high_u32): Ditto.
16660         (vfmlsl_laneq_high_u32): Ditto.
16661         (vfmlalq_lane_high_u32): Ditto.
16662         (vfmlslq_lane_high_u32): Ditto.
16663         (vfmlalq_laneq_high_u32): Ditto.
16664         (vfmlslq_laneq_high_u32): Ditto.
16665         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
16666         (AARCH64_FL_FOR_ARCH8_4): New.
16667         (AARCH64_ISA_F16FML): New ISA flag.
16668         (TARGET_F16FML): New feature flag for fp16fml.
16669         (doc/invoke.texi): Document new fp16fml option.
16671 2018-01-10  Michael Collison  <michael.collison@arm.com>
16673         * config/aarch64/aarch64-builtins.c:
16674         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
16675         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16676         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
16677         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
16678         (AARCH64_ISA_SHA3): New ISA flag.
16679         (TARGET_SHA3): New feature flag for sha3.
16680         * config/aarch64/iterators.md (sha512_op): New int attribute.
16681         (CRYPTO_SHA512): New int iterator.
16682         (UNSPEC_SHA512H): New unspec.
16683         (UNSPEC_SHA512H2): Ditto.
16684         (UNSPEC_SHA512SU0): Ditto.
16685         (UNSPEC_SHA512SU1): Ditto.
16686         * config/aarch64/aarch64-simd-builtins.def
16687         (aarch64_crypto_sha512hqv2di): New builtin.
16688         (aarch64_crypto_sha512h2qv2di): Ditto.
16689         (aarch64_crypto_sha512su0qv2di): Ditto.
16690         (aarch64_crypto_sha512su1qv2di): Ditto.
16691         (aarch64_eor3qv8hi): Ditto.
16692         (aarch64_rax1qv2di): Ditto.
16693         (aarch64_xarqv2di): Ditto.
16694         (aarch64_bcaxqv8hi): Ditto.
16695         * config/aarch64/aarch64-simd.md:
16696         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
16697         (aarch64_crypto_sha512su0qv2di): Ditto.
16698         (aarch64_crypto_sha512su1qv2di): Ditto.
16699         (aarch64_eor3qv8hi): Ditto.
16700         (aarch64_rax1qv2di): Ditto.
16701         (aarch64_xarqv2di): Ditto.
16702         (aarch64_bcaxqv8hi): Ditto.
16703         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
16704         (vsha512h2q_u64): Ditto.
16705         (vsha512su0q_u64): Ditto.
16706         (vsha512su1q_u64): Ditto.
16707         (veor3q_u16): Ditto.
16708         (vrax1q_u64): Ditto.
16709         (vxarq_u64): Ditto.
16710         (vbcaxq_u16): Ditto.
16711         * config/arm/types.md (crypto_sha512): New type attribute.
16712         (crypto_sha3): Ditto.
16713         (doc/invoke.texi): Document new sha3 option.
16715 2018-01-10  Michael Collison  <michael.collison@arm.com>
16717         * config/aarch64/aarch64-builtins.c:
16718         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
16719         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16720         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
16721         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
16722         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
16723         (AARCH64_ISA_SM4): New ISA flag.
16724         (TARGET_SM4): New feature flag for sm4.
16725         * config/aarch64/aarch64-simd-builtins.def
16726         (aarch64_sm3ss1qv4si): Ditto.
16727         (aarch64_sm3tt1aq4si): Ditto.
16728         (aarch64_sm3tt1bq4si): Ditto.
16729         (aarch64_sm3tt2aq4si): Ditto.
16730         (aarch64_sm3tt2bq4si): Ditto.
16731         (aarch64_sm3partw1qv4si): Ditto.
16732         (aarch64_sm3partw2qv4si): Ditto.
16733         (aarch64_sm4eqv4si): Ditto.
16734         (aarch64_sm4ekeyqv4si): Ditto.
16735         * config/aarch64/aarch64-simd.md:
16736         (aarch64_sm3ss1qv4si): Ditto.
16737         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
16738         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
16739         (aarch64_sm4eqv4si): Ditto.
16740         (aarch64_sm4ekeyqv4si): Ditto.
16741         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
16742         (sm3part_op): Ditto.
16743         (CRYPTO_SM3TT): Ditto.
16744         (CRYPTO_SM3PART): Ditto.
16745         (UNSPEC_SM3SS1): New unspec.
16746         (UNSPEC_SM3TT1A): Ditto.
16747         (UNSPEC_SM3TT1B): Ditto.
16748         (UNSPEC_SM3TT2A): Ditto.
16749         (UNSPEC_SM3TT2B): Ditto.
16750         (UNSPEC_SM3PARTW1): Ditto.
16751         (UNSPEC_SM3PARTW2): Ditto.
16752         (UNSPEC_SM4E): Ditto.
16753         (UNSPEC_SM4EKEY): Ditto.
16754         * config/aarch64/constraints.md (Ui2): New constraint.
16755         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
16756         * config/arm/types.md (crypto_sm3): New type attribute.
16757         (crypto_sm4): Ditto.
16758         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
16759         (vsm3tt1aq_u32): Ditto.
16760         (vsm3tt1bq_u32): Ditto.
16761         (vsm3tt2aq_u32): Ditto.
16762         (vsm3tt2bq_u32): Ditto.
16763         (vsm3partw1q_u32): Ditto.
16764         (vsm3partw2q_u32): Ditto.
16765         (vsm4eq_u32): Ditto.
16766         (vsm4ekeyq_u32): Ditto.
16767         (doc/invoke.texi): Document new sm4 option.
16769 2018-01-10  Michael Collison  <michael.collison@arm.com>
16771         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
16772         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
16773         (AARCH64_FL_FOR_ARCH8_4): New.
16774         (AARCH64_FL_V8_4): New flag.
16775         (doc/invoke.texi): Document new armv8.4-a option.
16777 2018-01-10  Michael Collison  <michael.collison@arm.com>
16779         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16780         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
16781         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
16782         * config/aarch64/aarch64-option-extension.def: Add
16783         AARCH64_OPT_EXTENSION of 'sha2'.
16784         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
16785         (crypto): Disable sha2 and aes if crypto disabled.
16786         (crypto): Enable aes and sha2 if enabled.
16787         (simd): Disable sha2 and aes if simd disabled.
16788         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
16789         New flags.
16790         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
16791         (TARGET_SHA2): New feature flag for sha2.
16792         (TARGET_AES): New feature flag for aes.
16793         * config/aarch64/aarch64-simd.md:
16794         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
16795         conditional on TARGET_AES.
16796         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
16797         (aarch64_crypto_sha1hsi): Make pattern conditional
16798         on TARGET_SHA2.
16799         (aarch64_crypto_sha1hv4si): Ditto.
16800         (aarch64_be_crypto_sha1hv4si): Ditto.
16801         (aarch64_crypto_sha1su1v4si): Ditto.
16802         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
16803         (aarch64_crypto_sha1su0v4si): Ditto.
16804         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
16805         (aarch64_crypto_sha256su0v4si): Ditto.
16806         (aarch64_crypto_sha256su1v4si): Ditto.
16807         (doc/invoke.texi): Document new aes and sha2 options.
16809 2018-01-10  Martin Sebor  <msebor@redhat.com>
16811         PR tree-optimization/83781
16812         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
16813         as string arrays.
16815 2018-01-11  Martin Sebor  <msebor@gmail.com>
16816             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16818         PR tree-optimization/83501
16819         PR tree-optimization/81703
16821         * tree-ssa-strlen.c (get_string_cst): Rename...
16822         (get_string_len): ...to this.  Handle global constants.
16823         (handle_char_store): Adjust.
16825 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
16826             Jim Wilson  <jimw@sifive.com>
16828         * config/riscv/riscv-protos.h (riscv_output_return): New.
16829         * config/riscv/riscv.c (struct machine_function): New naked_p field.
16830         (riscv_attribute_table, riscv_output_return),
16831         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
16832         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
16833         (riscv_compute_frame_info): Only compute frame->mask if not a naked
16834         function.
16835         (riscv_expand_prologue): Add early return for naked function.
16836         (riscv_expand_epilogue): Likewise.
16837         (riscv_function_ok_for_sibcall): Return false for naked function.
16838         (riscv_set_current_function): New.
16839         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
16840         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
16841         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
16842         * doc/extend.texi (RISC-V Function Attributes): New.
16844 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
16846         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
16847         check for 128-bit long double before checking TCmode.
16848         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
16849         128-bit long doubles before checking TFmode or TCmode.
16850         (FLOAT128_IBM_P): Likewise.
16852 2018-01-10  Martin Sebor  <msebor@redhat.com>
16854         PR tree-optimization/83671
16855         * builtins.c (c_strlen): Unconditionally return zero for the empty
16856         string.
16857         Use -Warray-bounds for warnings.
16858         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
16859         for non-constant array indices with COMPONENT_REF, arrays of
16860         arrays, and pointers to arrays.
16861         (gimple_fold_builtin_strlen): Determine and set length range for
16862         non-constant character arrays.
16864 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
16866         PR middle-end/81897
16867         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
16868         empty blocks.
16870 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
16872         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
16874 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
16876         PR target/83399
16877         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
16878         VECTOR_MEM_ALTIVEC_OR_VSX_P.
16879         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
16880         indexed_or_indirect_operand predicate.
16881         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
16882         (*vsx_le_perm_load_v8hi): Likewise.
16883         (*vsx_le_perm_load_v16qi): Likewise.
16884         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
16885         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
16886         (*vsx_le_perm_store_v8hi): Likewise.
16887         (*vsx_le_perm_store_v16qi): Likewise.
16888         (eight unnamed splitters): Likewise.
16890 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
16892         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
16893         * config/rs6000/emmintrin.h: Likewise.
16894         * config/rs6000/mmintrin.h: Likewise.
16895         * config/rs6000/xmmintrin.h: Likewise.
16897 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
16899         PR c++/43486
16900         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
16901         "public_flag".
16902         * tree.c (tree_nop_conversion): Return true for location wrapper
16903         nodes.
16904         (maybe_wrap_with_location): New function.
16905         (selftest::check_strip_nops): New function.
16906         (selftest::test_location_wrappers): New function.
16907         (selftest::tree_c_tests): Call it.
16908         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
16909         (maybe_wrap_with_location): New decl.
16910         (EXPR_LOCATION_WRAPPER_P): New macro.
16911         (location_wrapper_p): New inline function.
16912         (tree_strip_any_location_wrapper): New inline function.
16914 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
16916         PR target/83735
16917         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
16918         stack_realign_offset for the largest alignment of stack slot
16919         actually used.
16920         (ix86_find_max_used_stack_alignment): New function.
16921         (ix86_finalize_stack_frame_flags): Use it.  Set
16922         max_used_stack_alignment if we don't realign stack.
16923         * config/i386/i386.h (machine_function): Add
16924         max_used_stack_alignment.
16926 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
16928         * config/arm/arm.opt (-mbranch-cost): New option.
16929         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
16930         account.
16932 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
16934         PR target/83629
16935         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16936         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16938 2018-01-10  Richard Biener  <rguenther@suse.de>
16940         PR debug/83765
16941         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16942         early out so it also covers the case where we have a non-NULL
16943         origin.
16945 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16947         PR tree-optimization/83753
16948         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16949         for non-strided grouped accesses if the number of elements is 1.
16951 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16953         PR target/81616
16954         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16955         * i386.h (TARGET_USE_GATHER): Define.
16956         * x86-tune.def (X86_TUNE_USE_GATHER): New.
16958 2018-01-10  Martin Liska  <mliska@suse.cz>
16960         PR bootstrap/82831
16961         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16962         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16963         partitioning.
16964         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16965         CLEANUP_NO_PARTITIONING is not set.
16967 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16969         * doc/rtl.texi: Remove documentation of (const ...) wrappers
16970         for vectors, as a partial revert of r254296.
16971         * rtl.h (const_vec_p): Delete.
16972         (const_vec_duplicate_p): Don't test for vector CONSTs.
16973         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16974         * expmed.c (make_tree): Likewise.
16976         Revert:
16977         * common.md (E, F): Use CONSTANT_P instead of checking for
16978         CONST_VECTOR.
16979         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16980         checking for CONST_VECTOR.
16982 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16984         PR middle-end/83575
16985         * predict.c (force_edge_cold): Handle in more sane way edges
16986         with no prediction.
16988 2018-01-09  Carl Love  <cel@us.ibm.com>
16990         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16991         V4SI, V4SF types.
16992         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16993         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16994         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16995         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
16996         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16997         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
16998         * config/rs6000/rs6000-protos.h: Add extern defition for
16999         rs6000_generate_float2_double_code.
17000         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17001         function.
17002         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17003         (float2_v2df): Add define_expand.
17005 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
17007         PR target/83628
17008         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17009         op_mode in the force_to_mode call.
17011 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17013         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17014         instead of checking each element individually.
17015         (aarch64_evpc_uzp): Likewise.
17016         (aarch64_evpc_zip): Likewise.
17017         (aarch64_evpc_ext): Likewise.
17018         (aarch64_evpc_rev): Likewise.
17019         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17020         instead of checking each element individually.  Return true without
17021         generating rtl if
17022         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17023         whether all selected elements come from the same input, instead of
17024         checking each element individually.  Remove calls to gen_rtx_REG,
17025         start_sequence and end_sequence and instead assert that no rtl is
17026         generated.
17028 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17030         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17031         order of HIGH and CONST checks.
17033 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17035         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17036         if the destination isn't an SSA_NAME.
17038 2018-01-09  Richard Biener  <rguenther@suse.de>
17040         PR tree-optimization/83668
17041         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17042         move prologue...
17043         (canonicalize_loop_form): ... here, renamed from ...
17044         (canonicalize_loop_closed_ssa_form): ... this and amended to
17045         swap successor edges for loop exit blocks to make us use
17046         the RPO order we need for initial schedule generation.
17048 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
17050         PR tree-optimization/64811
17051         * match.pd: When optimizing comparisons with Inf, avoid
17052         introducing or losing exceptions from comparisons with NaN.
17054 2018-01-09  Martin Liska  <mliska@suse.cz>
17056         PR sanitizer/82517
17057         * asan.c (shadow_mem_size): Add gcc_assert.
17059 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
17061         Don't save registers in main().
17063         PR target/83738
17064         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17065         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17066         * config/avr/avr.c (avr_set_current_function): Don't error if
17067         naked, OS_task or OS_main are specified at the same time.
17068         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17069         OS_main.
17070         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17071         attribute.
17072         * common/config/avr/avr-common.c (avr_option_optimization_table):
17073         Switch on -mmain-is-OS_task for optimizing compilations.
17075 2018-01-09  Richard Biener  <rguenther@suse.de>
17077         PR tree-optimization/83572
17078         * graphite.c: Include cfganal.h.
17079         (graphite_transform_loops): Connect infinite loops to exit
17080         and remove fake edges at the end.
17082 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17084         * ipa-inline.c (edge_badness): Revert accidental checkin.
17086 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17088         PR ipa/80763
17089         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17090         symbols; not inline clones.
17092 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
17094         PR target/83507
17095         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17096         hard registers.  Formatting fixes.
17098         PR preprocessor/83722
17099         * gcc.c (try_generate_repro): Pass
17100         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17101         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17102         do_report_bug.
17104 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
17105             Kito Cheng  <kito.cheng@gmail.com>
17107         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17108         (riscv_leaf_function_p): Delete.
17109         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17111 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17113         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17114         function.
17115         (do_ifelse): New function.
17116         (do_isel): New function.
17117         (do_sub3): New function.
17118         (do_add3): New function.
17119         (do_load_mask_compare): New function.
17120         (do_overlap_load_compare): New function.
17121         (expand_compare_loop): New function.
17122         (expand_block_compare): Call expand_compare_loop() when appropriate.
17123         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17124         option description.
17125         (-mblock-compare-inline-loop-limit): New option.
17127 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17129         PR target/83677
17130         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17131         Reverse order of second and third operands in first alternative.
17132         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17133         of first and second elements in UNSPEC_VPERMR vector.
17134         (altivec_expand_vec_perm_le): Likewise.
17136 2018-01-08  Jeff Law  <law@redhat.com>
17138         PR rtl-optimizatin/81308
17139         * tree-switch-conversion.c (cfg_altered): New file scoped static.
17140         (process_switch): If group_case_labels makes a change, then set
17141         cfg_altered.
17142         (pass_convert_switch::execute): If a switch is converted, then
17143         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
17145         PR rtl-optimization/81308
17146         * recog.c (split_all_insns): Conditionally cleanup the CFG after
17147         splitting insns.
17149 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
17151         PR target/83663 - Revert r255946
17152         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17153         generation for cases where splatting a value is not useful.
17154         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17155         across a vec_duplicate and a paradoxical subreg forming a vector
17156         mode to a vec_concat.
17158 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17160         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17161         -march=armv8.3-a variants.
17162         * config/arm/t-multilib: Likewise.
17163         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
17165 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17167         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17168         to generate rtl.
17169         (cceq_ior_compare_complement): Give it a name so I can use it, and
17170         change boolean_or_operator predicate to boolean_operator so it can
17171         be used to generate a crand.
17172         (eqne): New code iterator.
17173         (bd/bd_neg): New code_attrs.
17174         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17175         a single define_insn.
17176         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17177         decrement (bdnzt/bdnzf/bdzt/bdzf).
17178         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17179         with the new names of the branch decrement patterns, and added the
17180         names of the branch decrement conditional patterns.
17182 2018-01-08  Richard Biener  <rguenther@suse.de>
17184         PR tree-optimization/83563
17185         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17186         cache.
17188 2018-01-08  Richard Biener  <rguenther@suse.de>
17190         PR middle-end/83713
17191         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17193 2018-01-08  Richard Biener  <rguenther@suse.de>
17195         PR tree-optimization/83685
17196         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17197         references to abnormals.
17199 2018-01-08  Richard Biener  <rguenther@suse.de>
17201         PR lto/83719
17202         * dwarf2out.c (output_indirect_strings): Handle empty
17203         skeleton_debug_str_hash.
17204         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17206 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17208         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17209         (emit_store_direct): Likewise.
17210         (arc_trampoline_adjust_address): Likewise.
17211         (arc_asm_trampoline_template): New function.
17212         (arc_initialize_trampoline): Use asm_trampoline_template.
17213         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17214         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17215         * config/arc/arc.md (flush_icache): Delete pattern.
17217 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17219         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17220         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17221         munaligned-access.
17223 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17225         PR target/83681
17226         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17227         by not USED_FOR_TARGET.
17228         (make_pass_resolve_sw_modes): Likewise.
17230 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17232         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17233         USED_FOR_TARGET.
17235 2018-01-08  Richard Biener  <rguenther@suse.de>
17237         PR middle-end/83580
17238         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17240 2018-01-08  Richard Biener  <rguenther@suse.de>
17242         PR middle-end/83517
17243         * match.pd ((t * 2) / 2) -> t): Add missing :c.
17245 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
17247         PR middle-end/81897
17248         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17249         basic blocks with a small number of successors.
17250         (convert_control_dep_chain_into_preds): Improve handling of
17251         forwarder blocks.
17252         (dump_predicates): Split apart into...
17253         (dump_pred_chain): ...here...
17254         (dump_pred_info): ...and here.
17255         (can_one_predicate_be_invalidated_p): Add debugging printfs.
17256         (can_chain_union_be_invalidated_p): Improve check for invalidation
17257         of paths.
17258         (uninit_uses_cannot_happen): Avoid unnecessary if
17259         convert_control_dep_chain_into_preds yielded nothing.
17261 2018-01-06  Martin Sebor  <msebor@redhat.com>
17263         PR tree-optimization/83640
17264         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17265         subtracting negative offset from size.
17266         (builtin_access::overlap): Adjust offset bounds of the access to fall
17267         within the size of the object if possible.
17269 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
17271         PR rtl-optimization/83699
17272         * expmed.c (extract_bit_field_1): Restrict the vector usage of
17273         extract_bit_field_as_subreg to cases in which the extracted
17274         value is also a vector.
17276         * lra-constraints.c (process_alt_operands): Test for the equivalence
17277         substitutions when detecting a possible reload cycle.
17279 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
17281         PR debug/83480
17282         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17283         by default if flag_selective_schedling{,2}.  Formatting fixes.
17285         PR rtl-optimization/83682
17286         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17287         if it has non-VECTOR_MODE element mode.
17288         (vec_duplicate_p): Likewise.
17290         PR middle-end/83694
17291         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17292         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17294 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17296         PR target/83604
17297         * config/i386/i386-builtin.def
17298         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17299         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17300         Require also OPTION_MASK_ISA_AVX512F in addition to
17301         OPTION_MASK_ISA_GFNI.
17302         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17303         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17304         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17305         to OPTION_MASK_ISA_GFNI.
17306         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17307         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17308         OPTION_MASK_ISA_AVX512BW.
17309         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17310         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17311         addition to OPTION_MASK_ISA_GFNI.
17312         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17313         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17314         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17315         to OPTION_MASK_ISA_GFNI.
17316         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17317         a requirement for all ISAs rather than any of them with a few
17318         exceptions.
17319         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17320         processing.
17321         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17322         bitmasks to be enabled with 3 exceptions, instead of requiring any
17323         enabled ISA with lots of exceptions.
17324         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17325         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17326         Change avx512bw in isa attribute to avx512f.
17327         * config/i386/sgxintrin.h: Add license boilerplate.
17328         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
17329         to __AVX512F__ and __AVX512VL to __AVX512VL__.
17330         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17331         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17332         defined.
17333         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17334         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17335         temporarily sse2 rather than sse if not enabled already.
17337         PR target/83604
17338         * config/i386/sse.md (VI248_VLBW): Rename to ...
17339         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
17340         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17341         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17342         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17343         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17344         mode iterator instead of VI248_VLBW.
17346 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
17348         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17349         (record_modified): Skip clobbers; add debug output.
17350         (param_change_prob): Use sreal frequencies.
17352 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17354         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17355         punt for user-aligned variables.
17357 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17359         * tree-chrec.c (chrec_contains_symbols): Return true for
17360         POLY_INT_CST.
17362 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
17364         PR target/82439
17365         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17366         of (x|y) == x for BICS pattern.
17368 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17370         PR tree-optimization/83605
17371         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
17372         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
17373         can throw.
17375 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17377         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
17378         * config/epiphany/rtems.h: New file.
17380 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17381             Uros Bizjak  <ubizjak@gmail.com>
17383         PR target/83554
17384         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
17385         QIreg_operand instead of register_operand predicate.
17386         * config/i386/i386.c (ix86_rop_should_change_byte_p,
17387         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
17388         comments instead of -fmitigate[-_]rop.
17390 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17392         PR bootstrap/81926
17393         * cgraphunit.c (symbol_table::compile): Switch to text_section
17394         before calling assembly_start debug hook.
17395         * run-rtl-passes.c (run_rtl_passes): Likewise.
17396         Include output.h.
17398 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17400         * tree-vrp.c (extract_range_from_binary_expr_1): Check
17401         range_int_cst_p rather than !symbolic_range_p before calling
17402         extract_range_from_multiplicative_op_1.
17404 2018-01-04  Jeff Law  <law@redhat.com>
17406         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17407         redundant test in assertion.
17409 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17411         * doc/rtl.texi: Document machine_mode wrapper classes.
17413 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17415         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17416         using tree_to_uhwi.
17418 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17420         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17421         the VEC_PERM_EXPR fold to fail.
17423 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17425         PR debug/83585
17426         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17427         to switched_sections.
17429 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17431         PR target/83680
17432         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17433         test for d.testing.
17435 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
17437         PR target/83387
17438         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17439         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17441 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17443         PR debug/83666
17444         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17445         is BLKmode and bitpos not zero or mode change is needed.
17447 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17449         PR target/83675
17450         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17451         TARGET_VIS2.
17453 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
17455         PR target/83628
17456         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17457         instead of MULT rtx.  Update all corresponding splitters.
17458         (*saddl_se): Ditto.
17459         (*ssub<modesuffix>): Ditto.
17460         (*ssubl_se): Ditto.
17461         (*cmp_sadd_di): Update split patterns.
17462         (*cmp_sadd_si): Ditto.
17463         (*cmp_sadd_sidi): Ditto.
17464         (*cmp_ssub_di): Ditto.
17465         (*cmp_ssub_si): Ditto.
17466         (*cmp_ssub_sidi): Ditto.
17467         * config/alpha/predicates.md (const23_operand): New predicate.
17468         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17469         Look for ASHIFT, not MULT inner operand.
17470         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17472 2018-01-04  Martin Liska  <mliska@suse.cz>
17474         PR gcov-profile/83669
17475         * gcov.c (output_intermediate_file): Add version to intermediate
17476         gcov file.
17477         * doc/gcov.texi: Document new field 'version' in intermediate
17478         file format. Fix location of '-k' option of gcov command.
17480 2018-01-04  Martin Liska  <mliska@suse.cz>
17482         PR ipa/82352
17483         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17485 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17487         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17489 2018-01-03  Martin Sebor  <msebor@redhat.com>
17491         PR tree-optimization/83655
17492         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17493         checking calls with invalid arguments.
17495 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17497         * tree-vect-stmts.c (vect_get_store_rhs): New function.
17498         (vectorizable_mask_load_store): Delete.
17499         (vectorizable_call): Return false for masked loads and stores.
17500         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
17501         instead of gimple_assign_rhs1.
17502         (vectorizable_load): Handle IFN_MASK_LOAD.
17503         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17505 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17507         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17508         split out from..,
17509         (vectorizable_mask_load_store): ...here.
17510         (vectorizable_load): ...and here.
17512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17514         * tree-vect-stmts.c (vect_build_all_ones_mask)
17515         (vect_build_zero_merge_argument): New functions, split out from...
17516         (vectorizable_load): ...here.
17518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17520         * tree-vect-stmts.c (vect_check_store_rhs): New function,
17521         split out from...
17522         (vectorizable_mask_load_store): ...here.
17523         (vectorizable_store): ...and here.
17525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17527         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17528         split out from...
17529         (vectorizable_mask_load_store): ...here.
17531 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17533         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
17534         (vect_model_store_cost): Take a vec_load_store_type instead of a
17535         vect_def_type.
17536         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
17537         (vect_model_store_cost): Take a vec_load_store_type instead of a
17538         vect_def_type.
17539         (vectorizable_mask_load_store): Update accordingly.
17540         (vectorizable_store): Likewise.
17541         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
17543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17545         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
17546         IFN_MASK_LOAD calls here rather than...
17547         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
17549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17550             Alan Hayward  <alan.hayward@arm.com>
17551             David Sherwood  <david.sherwood@arm.com>
17553         * expmed.c (extract_bit_field_1): For vector extracts,
17554         fall back to extract_bit_field_as_subreg if vec_extract
17555         isn't available.
17557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17558             Alan Hayward  <alan.hayward@arm.com>
17559             David Sherwood  <david.sherwood@arm.com>
17561         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
17562         they are variable or constant sized.
17563         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
17564         slots for constant-sized data.
17566 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17567             Alan Hayward  <alan.hayward@arm.com>
17568             David Sherwood  <david.sherwood@arm.com>
17570         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
17571         handling COND_EXPRs with boolean comparisons, try to find a better
17572         basis for the mask type than the boolean itself.
17574 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17576         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
17577         is calculated and how it can be overridden.
17578         * genmodes.c (max_bitsize_mode_any_mode): New variable.
17579         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
17580         if defined.
17581         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
17582         if nonzero.
17584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17585             Alan Hayward  <alan.hayward@arm.com>
17586             David Sherwood  <david.sherwood@arm.com>
17588         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
17589         Remove the mode argument.
17590         (aarch64_simd_valid_immediate): Remove the mode and inverse
17591         arguments.
17592         * config/aarch64/iterators.md (bitsize): New iterator.
17593         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
17594         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
17595         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
17596         aarch64_simd_valid_immediate.
17597         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
17598         (aarch64_reg_or_bic_imm): Likewise.
17599         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
17600         with an insn_type enum and msl with a modifier_type enum.
17601         Replace element_width with a scalar_mode.  Change the shift
17602         to unsigned int.  Add constructors for scalar_float_mode and
17603         scalar_int_mode elements.
17604         (aarch64_vect_float_const_representable_p): Delete.
17605         (aarch64_can_const_movi_rtx_p)
17606         (aarch64_simd_scalar_immediate_valid_for_move)
17607         (aarch64_simd_make_constant): Update call to
17608         aarch64_simd_valid_immediate.
17609         (aarch64_advsimd_valid_immediate_hs): New function.
17610         (aarch64_advsimd_valid_immediate): Likewise.
17611         (aarch64_simd_valid_immediate): Remove mode and inverse
17612         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
17613         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
17614         and aarch64_float_const_representable_p on the result.
17615         (aarch64_output_simd_mov_immediate): Remove mode argument.
17616         Update call to aarch64_simd_valid_immediate and use of
17617         simd_immediate_info.
17618         (aarch64_output_scalar_simd_mov_immediate): Update call
17619         accordingly.
17621 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17622             Alan Hayward  <alan.hayward@arm.com>
17623             David Sherwood  <david.sherwood@arm.com>
17625         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
17626         (mode_nunits): Likewise CONST_MODE_NUNITS.
17627         * machmode.def (ADJUST_NUNITS): Document.
17628         * genmodes.c (mode_data::need_nunits_adj): New field.
17629         (blank_mode): Update accordingly.
17630         (adj_nunits): New variable.
17631         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
17632         parameter.
17633         (emit_mode_size_inline): Set need_bytesize_adj for all modes
17634         listed in adj_nunits.
17635         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
17636         listed in adj_nunits.  Don't emit case statements for such modes.
17637         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
17638         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
17639         nothing if adj_nunits is nonnull.
17640         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
17641         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
17642         (emit_mode_fbit): Update use of print_maybe_const_decl.
17643         (emit_move_size): Likewise.  Treat the array as non-const
17644         if adj_nunits.
17645         (emit_mode_adjustments): Handle adj_nunits.
17647 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17649         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
17650         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
17651         (VECTOR_MODES): Use it.
17652         (make_vector_modes): Take the prefix as an argument.
17654 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17655             Alan Hayward  <alan.hayward@arm.com>
17656             David Sherwood  <david.sherwood@arm.com>
17658         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
17659         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
17660         for MODE_VECTOR_BOOL.
17661         * machmode.def (VECTOR_BOOL_MODE): Document.
17662         * genmodes.c (VECTOR_BOOL_MODE): New macro.
17663         (make_vector_bool_mode): New function.
17664         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
17665         MODE_VECTOR_BOOL.
17666         * lto-streamer-in.c (lto_input_mode_table): Likewise.
17667         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
17668         Likewise.
17669         * stor-layout.c (int_mode_for_mode): Likewise.
17670         * tree.c (build_vector_type_for_mode): Likewise.
17671         * varasm.c (output_constant_pool_2): Likewise.
17672         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
17673         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
17674         for MODE_VECTOR_BOOL.
17675         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
17676         of mode class checks.
17677         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
17678         instead of a list of mode class checks.
17679         (expand_vector_scalar_condition): Likewise.
17680         (type_for_widest_vector_mode): Handle BImode as an inner mode.
17682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17683             Alan Hayward  <alan.hayward@arm.com>
17684             David Sherwood  <david.sherwood@arm.com>
17686         * machmode.h (mode_size): Change from unsigned short to
17687         poly_uint16_pod.
17688         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
17689         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17690         or if measurement_type is not polynomial.
17691         (fixed_size_mode::includes_p): Check for constant-sized modes.
17692         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
17693         return a poly_uint16 rather than an unsigned short.
17694         (emit_mode_size): Change the type of mode_size from unsigned short
17695         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
17696         (emit_mode_adjustments): Cope with polynomial vector sizes.
17697         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17698         for GET_MODE_SIZE.
17699         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17700         for GET_MODE_SIZE.
17701         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
17702         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
17703         * caller-save.c (setup_save_areas): Likewise.
17704         (replace_reg_with_saved_mem): Likewise.
17705         * calls.c (emit_library_call_value_1): Likewise.
17706         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
17707         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
17708         (gen_lowpart_for_combine): Likewise.
17709         * convert.c (convert_to_integer_1): Likewise.
17710         * cse.c (equiv_constant, cse_insn): Likewise.
17711         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
17712         (cselib_subst_to_values): Likewise.
17713         * dce.c (word_dce_process_block): Likewise.
17714         * df-problems.c (df_word_lr_mark_ref): Likewise.
17715         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
17716         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
17717         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
17718         (rtl_for_decl_location): Likewise.
17719         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
17720         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
17721         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
17722         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
17723         (expand_expr_real_1): Likewise.
17724         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
17725         (pad_below): Likewise.
17726         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17727         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
17728         * ira.c (get_subreg_tracking_sizes): Likewise.
17729         * ira-build.c (ira_create_allocno_objects): Likewise.
17730         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
17731         (ira_sort_regnos_for_alter_reg): Likewise.
17732         * ira-costs.c (record_operand_costs): Likewise.
17733         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
17734         (resolve_simple_move): Likewise.
17735         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
17736         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
17737         (lra_constraints): Likewise.
17738         (CONST_POOL_OK_P): Reject variable-sized modes.
17739         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
17740         (add_pseudo_to_slot, lra_spill): Likewise.
17741         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17742         * optabs-query.c (get_best_extraction_insn): Likewise.
17743         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17744         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
17745         (expand_mult_highpart, valid_multiword_target_p): Likewise.
17746         * recog.c (offsettable_address_addr_space_p): Likewise.
17747         * regcprop.c (maybe_mode_change): Likewise.
17748         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
17749         * regrename.c (build_def_use): Likewise.
17750         * regstat.c (dump_reg_info): Likewise.
17751         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
17752         (find_reloads, find_reloads_subreg_address): Likewise.
17753         * reload1.c (eliminate_regs_1): Likewise.
17754         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
17755         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
17756         (simplify_binary_operation_1, simplify_subreg): Likewise.
17757         * targhooks.c (default_function_arg_padding): Likewise.
17758         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
17759         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
17760         (verify_gimple_assign_ternary): Likewise.
17761         * tree-inline.c (estimate_move_cost): Likewise.
17762         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17763         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
17764         (get_address_cost_ainc): Likewise.
17765         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
17766         (vect_supportable_dr_alignment): Likewise.
17767         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17768         (vectorizable_reduction): Likewise.
17769         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
17770         (vectorizable_operation, vectorizable_load): Likewise.
17771         * tree.c (build_same_sized_truth_vector_type): Likewise.
17772         * valtrack.c (cleanup_auto_inc_dec): Likewise.
17773         * var-tracking.c (emit_note_insn_var_location): Likewise.
17774         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
17775         (ADDR_VEC_ALIGN): Likewise.
17777 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17778             Alan Hayward  <alan.hayward@arm.com>
17779             David Sherwood  <david.sherwood@arm.com>
17781         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
17782         unsigned short.
17783         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17784         or if measurement_type is polynomial.
17785         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
17786         * combine.c (make_extraction): Likewise.
17787         * dse.c (find_shift_sequence): Likewise.
17788         * dwarf2out.c (mem_loc_descriptor): Likewise.
17789         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
17790         (extract_bit_field, extract_low_bits): Likewise.
17791         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
17792         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
17793         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
17794         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
17795         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17796         * reload.c (find_reloads): Likewise.
17797         * reload1.c (alter_reg): Likewise.
17798         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
17799         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
17800         * tree-if-conv.c (predicate_mem_writes): Likewise.
17801         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17802         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
17803         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17804         * valtrack.c (dead_debug_insert_temp): Likewise.
17805         * varasm.c (mergeable_constant_section): Likewise.
17806         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
17808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17809             Alan Hayward  <alan.hayward@arm.com>
17810             David Sherwood  <david.sherwood@arm.com>
17812         * expr.c (expand_assignment): Cope with polynomial mode sizes
17813         when assigning to a CONCAT.
17815 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17816             Alan Hayward  <alan.hayward@arm.com>
17817             David Sherwood  <david.sherwood@arm.com>
17819         * machmode.h (mode_precision): Change from unsigned short to
17820         poly_uint16_pod.
17821         (mode_to_precision): Return a poly_uint16 rather than an unsigned
17822         short.
17823         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
17824         or if measurement_type is not polynomial.
17825         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
17826         in which the mode is already known to be a scalar_int_mode.
17827         * genmodes.c (emit_mode_precision): Change the type of mode_precision
17828         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
17829         initializer.
17830         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17831         for GET_MODE_PRECISION.
17832         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17833         for GET_MODE_PRECISION.
17834         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
17835         as polynomial.
17836         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
17837         (expand_field_assignment, make_extraction): Likewise.
17838         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
17839         (get_last_value): Likewise.
17840         * convert.c (convert_to_integer_1): Likewise.
17841         * cse.c (cse_insn): Likewise.
17842         * expr.c (expand_expr_real_1): Likewise.
17843         * lra-constraints.c (simplify_operand_subreg): Likewise.
17844         * optabs-query.c (can_atomic_load_p): Likewise.
17845         * optabs.c (expand_atomic_load): Likewise.
17846         (expand_atomic_store): Likewise.
17847         * ree.c (combine_reaching_defs): Likewise.
17848         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
17849         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
17850         * tree.h (type_has_mode_precision_p): Likewise.
17851         * ubsan.c (instrument_si_overflow): Likewise.
17853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17854             Alan Hayward  <alan.hayward@arm.com>
17855             David Sherwood  <david.sherwood@arm.com>
17857         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
17858         polynomial numbers of units.
17859         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
17860         (valid_vector_subparts_p): New function.
17861         (build_vector_type): Remove temporary shim and take the number
17862         of units as a poly_uint64 rather than an int.
17863         (build_opaque_vector_type): Take the number of units as a
17864         poly_uint64 rather than an int.
17865         * tree.c (build_vector_from_ctor): Handle polynomial
17866         TYPE_VECTOR_SUBPARTS.
17867         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
17868         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
17869         (build_vector_from_val): If the number of units is variable,
17870         use build_vec_duplicate_cst for constant operands and
17871         VEC_DUPLICATE_EXPR otherwise.
17872         (make_vector_type): Remove temporary is_constant ().
17873         (build_vector_type, build_opaque_vector_type): Take the number of
17874         units as a poly_uint64 rather than an int.
17875         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
17876         VECTOR_CST_NELTS.
17877         * cfgexpand.c (expand_debug_expr): Likewise.
17878         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
17879         (store_constructor, expand_expr_real_1): Likewise.
17880         (const_scalar_mask_from_tree): Likewise.
17881         * fold-const-call.c (fold_const_reduction): Likewise.
17882         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
17883         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
17884         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
17885         (fold_relational_const): Likewise.
17886         (native_interpret_vector): Likewise.  Change the size from an
17887         int to an unsigned int.
17888         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
17889         TYPE_VECTOR_SUBPARTS.
17890         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
17891         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
17892         duplicating a non-constant operand into a variable-length vector.
17893         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
17894         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
17895         * ipa-icf.c (sem_variable::equals): Likewise.
17896         * match.pd: Likewise.
17897         * omp-simd-clone.c (simd_clone_subparts): Likewise.
17898         * print-tree.c (print_node): Likewise.
17899         * stor-layout.c (layout_type): Likewise.
17900         * targhooks.c (default_builtin_vectorization_cost): Likewise.
17901         * tree-cfg.c (verify_gimple_comparison): Likewise.
17902         (verify_gimple_assign_binary): Likewise.
17903         (verify_gimple_assign_ternary): Likewise.
17904         (verify_gimple_assign_single): Likewise.
17905         * tree-pretty-print.c (dump_generic_node): Likewise.
17906         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17907         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
17908         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
17909         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
17910         (vect_shift_permute_load_chain): Likewise.
17911         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
17912         (expand_vector_condition, optimize_vector_constructor): Likewise.
17913         (lower_vec_perm, get_compute_type): Likewise.
17914         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17915         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
17916         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
17917         (vect_recog_mask_conversion_pattern): Likewise.
17918         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
17919         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
17920         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17921         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
17922         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
17923         (vectorizable_shift, vectorizable_operation, vectorizable_store)
17924         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
17925         (supportable_widening_operation): Likewise.
17926         (supportable_narrowing_operation): Likewise.
17927         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
17928         Likewise.
17929         * varasm.c (output_constant): Likewise.
17931 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17932             Alan Hayward  <alan.hayward@arm.com>
17933             David Sherwood  <david.sherwood@arm.com>
17935         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17936         so that both the length == 3 and length != 3 cases set up their
17937         own permute vectors.  Add comments explaining why we know the
17938         number of elements is constant.
17939         (vect_permute_load_chain): Likewise.
17941 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17942             Alan Hayward  <alan.hayward@arm.com>
17943             David Sherwood  <david.sherwood@arm.com>
17945         * machmode.h (mode_nunits): Change from unsigned char to
17946         poly_uint16_pod.
17947         (ONLY_FIXED_SIZE_MODES): New macro.
17948         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17949         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17950         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17951         New typedefs.
17952         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17953         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17954         or if measurement_type is not polynomial.
17955         * genmodes.c (ZERO_COEFFS): New macro.
17956         (emit_mode_nunits_inline): Make mode_nunits_inline return a
17957         poly_uint16.
17958         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17959         Use ZERO_COEFFS when emitting initializers.
17960         * data-streamer.h (bp_pack_poly_value): New function.
17961         (bp_unpack_poly_value): Likewise.
17962         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17963         for GET_MODE_NUNITS.
17964         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17965         for GET_MODE_NUNITS.
17966         * tree.c (make_vector_type): Remove temporary shim and make
17967         the real function take the number of units as a poly_uint64
17968         rather than an int.
17969         (build_vector_type_for_mode): Handle polynomial nunits.
17970         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17971         * emit-rtl.c (const_vec_series_p_1): Likewise.
17972         (gen_rtx_CONST_VECTOR): Likewise.
17973         * fold-const.c (test_vec_duplicate_folding): Likewise.
17974         * genrecog.c (validate_pattern): Likewise.
17975         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17976         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17977         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17978         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17979         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17980         * rtlanal.c (subreg_get_info): Likewise.
17981         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17982         (vect_grouped_load_supported): Likewise.
17983         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17984         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17985         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17986         (simplify_const_unary_operation, simplify_binary_operation_1)
17987         (simplify_const_binary_operation, simplify_ternary_operation)
17988         (test_vector_ops_duplicate, test_vector_ops): Likewise.
17989         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17990         instead of CONST_VECTOR_NUNITS.
17991         * varasm.c (output_constant_pool_2): Likewise.
17992         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17993         explicit-encoded elements in the XVEC for variable-length vectors.
17995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17997         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18000             Alan Hayward  <alan.hayward@arm.com>
18001             David Sherwood  <david.sherwood@arm.com>
18003         * coretypes.h (fixed_size_mode): Declare.
18004         (fixed_size_mode_pod): New typedef.
18005         * builtins.h (target_builtins::x_apply_args_mode)
18006         (target_builtins::x_apply_result_mode): Change type to
18007         fixed_size_mode_pod.
18008         * builtins.c (apply_args_size, apply_result_size, result_vector)
18009         (expand_builtin_apply_args_1, expand_builtin_apply)
18010         (expand_builtin_return): Update accordingly.
18012 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18014         * cse.c (hash_rtx_cb): Hash only the encoded elements.
18015         * cselib.c (cselib_hash_rtx): Likewise.
18016         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18017         CONST_VECTOR encoding.
18019 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18020             Jeff Law  <law@redhat.com>
18022         PR target/83641
18023         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18024         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18025         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18026         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18028         PR target/83641
18029         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18030         explicitly probe *sp in a noreturn function if there were any callee
18031         register saves or frame pointer is needed.
18033 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18035         PR debug/83621
18036         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18037         BLKmode for ternary, binary or unary expressions.
18039         PR debug/83645
18040         * var-tracking.c (delete_vta_debug_insn): New inline function.
18041         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18042         insns from get_insns () to NULL instead of each bb separately.
18043         Use delete_vta_debug_insn.  No longer static.
18044         (vt_debug_insns_local, variable_tracking_main_1): Adjust
18045         delete_vta_debug_insns callers.
18046         * rtl.h (delete_vta_debug_insns): Declare.
18047         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18048         instead of variable_tracking_main.
18050 2018-01-03  Martin Sebor  <msebor@redhat.com>
18052         PR tree-optimization/83603
18053         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18054         arguments past the endof the argument list in functions declared
18055         without a prototype.
18056         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18057         Avoid checking when arguments are null.
18059 2018-01-03  Martin Sebor  <msebor@redhat.com>
18061         PR c/83559
18062         * doc/extend.texi (attribute const): Fix a typo.
18063         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18064         issuing -Wsuggest-attribute for void functions.
18066 2018-01-03  Martin Sebor  <msebor@redhat.com>
18068         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18069         offset_int::from instead of wide_int::to_shwi.
18070         (maybe_diag_overlap): Remove assertion.
18071         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18072         * gimple-ssa-sprintf.c (format_directive): Same.
18073         (parse_directive): Same.
18074         (sprintf_dom_walker::compute_format_length): Same.
18075         (try_substitute_return_value): Same.
18077 2018-01-03  Jeff Law  <law@redhat.com>
18079         PR middle-end/83654
18080         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18081         non-constant residual for zero at runtime and avoid probing in
18082         that case.  Reorganize code for trailing problem to mirror handling
18083         of the residual.
18085 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18087         PR tree-optimization/83501
18088         * tree-ssa-strlen.c (get_string_cst): New.
18089         (handle_char_store): Call get_string_cst.
18091 2018-01-03  Martin Liska  <mliska@suse.cz>
18093         PR tree-optimization/83593
18094         * tree-ssa-strlen.c: Include tree-cfg.h.
18095         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18096         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18097         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18098         to false.
18099         (strlen_dom_walker::before_dom_children): Call
18100         gimple_purge_dead_eh_edges. Dump tranformation with details
18101         dump flags.
18102         (strlen_dom_walker::before_dom_children): Update call by adding
18103         new argument cleanup_eh.
18104         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18106 2018-01-03  Martin Liska  <mliska@suse.cz>
18108         PR ipa/83549
18109         * cif-code.def (VARIADIC_THUNK): New enum value.
18110         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18111         thunks.
18113 2018-01-03  Jan Beulich  <jbeulich@suse.com>
18115         * sse.md (mov<mode>_internal): Tighten condition for when to use
18116         vmovdqu<ssescalarsize> for TI and OI modes.
18118 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18120         Update copyright years.
18122 2018-01-03  Martin Liska  <mliska@suse.cz>
18124         PR ipa/83594
18125         * ipa-visibility.c (function_and_variable_visibility): Skip
18126         functions with noipa attribure.
18128 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18130         * gcc.c (process_command): Update copyright notice dates.
18131         * gcov-dump.c (print_version): Ditto.
18132         * gcov.c (print_version): Ditto.
18133         * gcov-tool.c (print_version): Ditto.
18134         * gengtype.c (create_file): Ditto.
18135         * doc/cpp.texi: Bump @copying's copyright year.
18136         * doc/cppinternals.texi: Ditto.
18137         * doc/gcc.texi: Ditto.
18138         * doc/gccint.texi: Ditto.
18139         * doc/gcov.texi: Ditto.
18140         * doc/install.texi: Ditto.
18141         * doc/invoke.texi: Ditto.
18143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18145         * vector-builder.h (vector_builder::m_full_nelts): Change from
18146         unsigned int to poly_uint64.
18147         (vector_builder::full_nelts): Update prototype accordingly.
18148         (vector_builder::new_vector): Likewise.
18149         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18150         (vector_builder::operator ==): Likewise.
18151         (vector_builder::finalize): Likewise.
18152         * int-vector-builder.h (int_vector_builder::int_vector_builder):
18153         Take the number of elements as a poly_uint64 rather than an
18154         unsigned int.
18155         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18156         from unsigned int to poly_uint64.
18157         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18158         (vec_perm_indices::new_vector): Likewise.
18159         (vec_perm_indices::length): Likewise.
18160         (vec_perm_indices::nelts_per_input): Likewise.
18161         (vec_perm_indices::input_nelts): Likewise.
18162         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18163         number of elements per input as a poly_uint64 rather than an
18164         unsigned int.  Use the original encoding for variable-length
18165         vectors, rather than clamping each individual element.
18166         For the second and subsequent elements in each pattern,
18167         clamp the step and base before clamping their sum.
18168         (vec_perm_indices::series_p): Handle polynomial element counts.
18169         (vec_perm_indices::all_in_range_p): Likewise.
18170         (vec_perm_indices_to_tree): Likewise.
18171         (vec_perm_indices_to_rtx): Likewise.
18172         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18173         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18174         (tree_vector_builder::new_binary_operation): Handle polynomial
18175         element counts.  Return false if we need to know the number
18176         of elements at compile time.
18177         * fold-const.c (fold_vec_perm): Punt if the number of elements
18178         isn't known at compile time.
18180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18182         * vec-perm-indices.h (vec_perm_builder): Change element type
18183         from HOST_WIDE_INT to poly_int64.
18184         (vec_perm_indices::element_type): Update accordingly.
18185         (vec_perm_indices::clamp): Handle polynomial element_types.
18186         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18187         (vec_perm_indices::all_in_range_p): Likewise.
18188         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18189         than shwi trees.
18190         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18191         polynomial vec_perm_indices element types.
18192         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18193         * fold-const.c (fold_vec_perm): Likewise.
18194         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18195         * tree-vect-generic.c (lower_vec_perm): Likewise.
18196         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18197         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18198         element type to HOST_WIDE_INT.
18200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18201             Alan Hayward  <alan.hayward@arm.com>
18202             David Sherwood  <david.sherwood@arm.com>
18204         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18205         rather than an int.  Use plus_constant.
18206         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18207         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18209 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18210             Alan Hayward  <alan.hayward@arm.com>
18211             David Sherwood  <david.sherwood@arm.com>
18213         * calls.c (emit_call_1, expand_call): Change struct_value_size from
18214         a HOST_WIDE_INT to a poly_int64.
18216 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18217             Alan Hayward  <alan.hayward@arm.com>
18218             David Sherwood  <david.sherwood@arm.com>
18220         * calls.c (load_register_parameters): Cope with polynomial
18221         mode sizes.  Require a constant size for BLKmode parameters
18222         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
18223         forces a parameter to be padded at the lsb end in order to
18224         fill a complete number of words, require the parameter size
18225         to be ordered wrt UNITS_PER_WORD.
18227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18228             Alan Hayward  <alan.hayward@arm.com>
18229             David Sherwood  <david.sherwood@arm.com>
18231         * reload1.c (spill_stack_slot_width): Change element type
18232         from unsigned int to poly_uint64_pod.
18233         (alter_reg): Treat mode sizes as polynomial.
18235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18236             Alan Hayward  <alan.hayward@arm.com>
18237             David Sherwood  <david.sherwood@arm.com>
18239         * reload.c (complex_word_subreg_p): New function.
18240         (reload_inner_reg_of_subreg, push_reload): Use it.
18242 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18243             Alan Hayward  <alan.hayward@arm.com>
18244             David Sherwood  <david.sherwood@arm.com>
18246         * lra-constraints.c (process_alt_operands): Reject matched
18247         operands whose sizes aren't ordered.
18248         (match_reload): Refer to this check here.
18250 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18251             Alan Hayward  <alan.hayward@arm.com>
18252             David Sherwood  <david.sherwood@arm.com>
18254         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18255         that the mode size is in the set {1, 2, 4, 8, 16}.
18257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18258             Alan Hayward  <alan.hayward@arm.com>
18259             David Sherwood  <david.sherwood@arm.com>
18261         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18262         Use plus_constant instead of gen_rtx_PLUS.
18264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18265             Alan Hayward  <alan.hayward@arm.com>
18266             David Sherwood  <david.sherwood@arm.com>
18268         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18269         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18270         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18271         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18272         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18273         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18274         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18275         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18276         * config/i386/i386.c (ix86_push_rounding): ...this new function.
18277         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18278         a poly_int64.
18279         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18280         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18281         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18282         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18283         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18284         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18285         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18286         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18287         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18288         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18289         function.
18290         * expr.c (emit_move_resolve_push): Treat the input and result
18291         of PUSH_ROUNDING as a poly_int64.
18292         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18293         (emit_push_insn): Likewise.
18294         * lra-eliminations.c (mark_not_eliminable): Likewise.
18295         * recog.c (push_operand): Likewise.
18296         * reload1.c (elimination_effects): Likewise.
18297         * rtlanal.c (nonzero_bits1): Likewise.
18298         * calls.c (store_one_arg): Likewise.  Require the padding to be
18299         known at compile time.
18301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18302             Alan Hayward  <alan.hayward@arm.com>
18303             David Sherwood  <david.sherwood@arm.com>
18305         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18306         Use plus_constant instead of gen_rtx_PLUS.
18308 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18309             Alan Hayward  <alan.hayward@arm.com>
18310             David Sherwood  <david.sherwood@arm.com>
18312         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18313         rather than an int.
18315 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18316             Alan Hayward  <alan.hayward@arm.com>
18317             David Sherwood  <david.sherwood@arm.com>
18319         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18320         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18321         via stack temporaries.  Treat the mode size as polynomial too.
18323 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18324             Alan Hayward  <alan.hayward@arm.com>
18325             David Sherwood  <david.sherwood@arm.com>
18327         * expr.c (expand_expr_real_2): When handling conversions involving
18328         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18329         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
18330         as a poly_uint64 too.
18332 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18333             Alan Hayward  <alan.hayward@arm.com>
18334             David Sherwood  <david.sherwood@arm.com>
18336         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18338 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18339             Alan Hayward  <alan.hayward@arm.com>
18340             David Sherwood  <david.sherwood@arm.com>
18342         * combine.c (can_change_dest_mode): Handle polynomial
18343         REGMODE_NATURAL_SIZE.
18344         * expmed.c (store_bit_field_1): Likewise.
18345         * expr.c (store_constructor): Likewise.
18346         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18347         and polynomial REGMODE_NATURAL_SIZE.
18348         (gen_lowpart_common): Likewise.
18349         * reginfo.c (record_subregs_of_mode): Likewise.
18350         * rtlanal.c (read_modify_subreg_p): Likewise.
18352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18353             Alan Hayward  <alan.hayward@arm.com>
18354             David Sherwood  <david.sherwood@arm.com>
18356         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18357         numbers of elements.
18359 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18360             Alan Hayward  <alan.hayward@arm.com>
18361             David Sherwood  <david.sherwood@arm.com>
18363         * match.pd: Cope with polynomial numbers of vector elements.
18365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18366             Alan Hayward  <alan.hayward@arm.com>
18367             David Sherwood  <david.sherwood@arm.com>
18369         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
18370         in a POINTER_PLUS_EXPR.
18372 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18373             Alan Hayward  <alan.hayward@arm.com>
18374             David Sherwood  <david.sherwood@arm.com>
18376         * omp-simd-clone.c (simd_clone_subparts): New function.
18377         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
18378         (ipa_simd_modify_function_body): Likewise.
18380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18381             Alan Hayward  <alan.hayward@arm.com>
18382             David Sherwood  <david.sherwood@arm.com>
18384         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
18385         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
18386         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
18387         (expand_vector_condition, vector_element): Likewise.
18388         (subparts_gt): New function.
18389         (get_compute_type): Use subparts_gt.
18390         (count_type_subparts): Delete.
18391         (expand_vector_operations_1): Use subparts_gt instead of
18392         count_type_subparts.
18394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18395             Alan Hayward  <alan.hayward@arm.com>
18396             David Sherwood  <david.sherwood@arm.com>
18398         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18399         (vect_compile_time_alias): ...this new function.  Do the calculation
18400         on poly_ints rather than trees.
18401         (vect_prune_runtime_alias_test_list): Update call accordingly.
18403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18404             Alan Hayward  <alan.hayward@arm.com>
18405             David Sherwood  <david.sherwood@arm.com>
18407         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18408         numbers of units.
18409         (vect_schedule_slp_instance): Likewise.
18411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18412             Alan Hayward  <alan.hayward@arm.com>
18413             David Sherwood  <david.sherwood@arm.com>
18415         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18416         constant and extern definitions for variable-length vectors.
18417         (vect_get_constant_vectors): Note that the number of units
18418         is known to be constant.
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         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18425         of units as polynomial.  Choose between WIDE and NARROW based
18426         on multiple_p.
18428 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18429             Alan Hayward  <alan.hayward@arm.com>
18430             David Sherwood  <david.sherwood@arm.com>
18432         * tree-vect-stmts.c (simd_clone_subparts): New function.
18433         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18435 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18436             Alan Hayward  <alan.hayward@arm.com>
18437             David Sherwood  <david.sherwood@arm.com>
18439         * tree-vect-stmts.c (vectorizable_call): Treat the number of
18440         vectors as polynomial.  Use build_index_vector for
18441         IFN_GOMP_SIMD_LANE.
18443 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18444             Alan Hayward  <alan.hayward@arm.com>
18445             David Sherwood  <david.sherwood@arm.com>
18447         * tree-vect-stmts.c (get_load_store_type): Treat the number of
18448         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18449         for variable-length vectors.
18450         (vectorizable_mask_load_store): Treat the number of units as
18451         polynomial, asserting that it is constant if the condition has
18452         already been enforced.
18453         (vectorizable_store, vectorizable_load): Likewise.
18455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18456             Alan Hayward  <alan.hayward@arm.com>
18457             David Sherwood  <david.sherwood@arm.com>
18459         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18460         of units as polynomial.  Punt if we can't tell at compile time
18461         which vector contains the final result.
18463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18464             Alan Hayward  <alan.hayward@arm.com>
18465             David Sherwood  <david.sherwood@arm.com>
18467         * tree-vect-loop.c (vectorizable_induction): Treat the number
18468         of units as polynomial.  Punt on SLP inductions.  Use an integer
18469         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
18470         cast of such a series for variable-length floating-point
18471         reductions.
18473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18474             Alan Hayward  <alan.hayward@arm.com>
18475             David Sherwood  <david.sherwood@arm.com>
18477         * tree.h (build_index_vector): Declare.
18478         * tree.c (build_index_vector): New function.
18479         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18480         of units as polynomial, forcibly converting it to a constant if
18481         vectorizable_reduction has already enforced the condition.
18482         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
18483         to create a {1,2,3,...} vector.
18484         (vectorizable_reduction): Treat the number of units as polynomial.
18485         Choose vectype_in based on the largest scalar element size rather
18486         than the smallest number of units.  Enforce the restrictions
18487         relied on above.
18489 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18490             Alan Hayward  <alan.hayward@arm.com>
18491             David Sherwood  <david.sherwood@arm.com>
18493         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18494         number of units as polynomial.
18496 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18497             Alan Hayward  <alan.hayward@arm.com>
18498             David Sherwood  <david.sherwood@arm.com>
18500         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18501         * target.def (autovectorize_vector_sizes): Return the vector sizes
18502         by pointer, using vector_sizes rather than a bitmask.
18503         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18504         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18505         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18506         Likewise.
18507         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18508         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18509         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18510         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18511         * omp-general.c (omp_max_vf): Likewise.
18512         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18513         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18514         * tree-vect-loop.c (vect_analyze_loop): Likewise.
18515         * tree-vect-slp.c (vect_slp_bb): Likewise.
18516         * doc/tm.texi: Regenerate.
18517         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18518         to a poly_uint64.
18519         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18520         the vector size as a poly_uint64 rather than an unsigned int.
18521         (current_vector_size): Change from an unsigned int to a poly_uint64.
18522         (get_vectype_for_scalar_type): Update accordingly.
18523         * tree.h (build_truth_vector_type): Take the size and number of
18524         units as a poly_uint64 rather than an unsigned int.
18525         (build_vector_type): Add a temporary overload that takes
18526         the number of units as a poly_uint64 rather than an unsigned int.
18527         * tree.c (make_vector_type): Likewise.
18528         (build_truth_vector_type): Take the number of units as a poly_uint64
18529         rather than an unsigned int.
18531 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18532             Alan Hayward  <alan.hayward@arm.com>
18533             David Sherwood  <david.sherwood@arm.com>
18535         * target.def (get_mask_mode): Take the number of units and length
18536         as poly_uint64s rather than unsigned ints.
18537         * targhooks.h (default_get_mask_mode): Update accordingly.
18538         * targhooks.c (default_get_mask_mode): Likewise.
18539         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18540         * doc/tm.texi: Regenerate.
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-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
18547         * omp-general.c (omp_max_vf): Likewise.
18548         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
18549         (expand_omp_simd): Handle polynomial safelen.
18550         * omp-low.c (omplow_simd_context): Add a default constructor.
18551         (omplow_simd_context::max_vf): Change from int to poly_uint64.
18552         (lower_rec_simd_input_clauses): Update accordingly.
18553         (lower_rec_input_clauses): Likewise.
18555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18556             Alan Hayward  <alan.hayward@arm.com>
18557             David Sherwood  <david.sherwood@arm.com>
18559         * tree-vectorizer.h (vect_nunits_for_cost): New function.
18560         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
18561         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
18562         (vect_analyze_slp_cost): Likewise.
18563         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
18564         (vect_model_load_cost): Likewise.
18566 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18567             Alan Hayward  <alan.hayward@arm.com>
18568             David Sherwood  <david.sherwood@arm.com>
18570         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
18571         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
18572         from an unsigned int * to a poly_uint64_pod *.
18573         (calculate_unrolling_factor): New function.
18574         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
18576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18577             Alan Hayward  <alan.hayward@arm.com>
18578             David Sherwood  <david.sherwood@arm.com>
18580         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
18581         from an unsigned int to a poly_uint64.
18582         (_loop_vec_info::slp_unrolling_factor): Likewise.
18583         (_loop_vec_info::vectorization_factor): Change from an int
18584         to a poly_uint64.
18585         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
18586         (vect_get_num_vectors): New function.
18587         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
18588         (vect_get_num_copies): Use vect_get_num_vectors.
18589         (vect_analyze_data_ref_dependences): Change max_vf from an int *
18590         to an unsigned int *.
18591         (vect_analyze_data_refs): Change min_vf from an int * to a
18592         poly_uint64 *.
18593         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18594         than an unsigned HOST_WIDE_INT.
18595         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
18596         (vect_analyze_data_ref_dependence): Change max_vf from an int *
18597         to an unsigned int *.
18598         (vect_analyze_data_ref_dependences): Likewise.
18599         (vect_compute_data_ref_alignment): Handle polynomial vf.
18600         (vect_enhance_data_refs_alignment): Likewise.
18601         (vect_prune_runtime_alias_test_list): Likewise.
18602         (vect_shift_permute_load_chain): Likewise.
18603         (vect_supportable_dr_alignment): Likewise.
18604         (dependence_distance_ge_vf): Take the vectorization factor as a
18605         poly_uint64 rather than an unsigned HOST_WIDE_INT.
18606         (vect_analyze_data_refs): Change min_vf from an int * to a
18607         poly_uint64 *.
18608         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
18609         vfm1 as a poly_uint64 rather than an int.  Make the same change
18610         for the returned bound_scalar.
18611         (vect_gen_vector_loop_niters): Handle polynomial vf.
18612         (vect_do_peeling): Likewise.  Update call to
18613         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
18614         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
18615         be constant.
18616         * tree-vect-loop.c (vect_determine_vectorization_factor)
18617         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
18618         (vect_get_known_peeling_cost): Likewise.
18619         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
18620         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
18621         (vect_transform_loop): Likewise.  Use the lowest possible VF when
18622         updating the upper bounds of the loop.
18623         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
18624         rather than an int.
18625         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
18626         polynomial unroll factors.
18627         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
18628         (vect_make_slp_decision): Likewise.
18629         (vect_supported_load_permutation_p): Likewise, and polynomial
18630         vf too.
18631         (vect_analyze_slp_cost): Handle polynomial vf.
18632         (vect_slp_analyze_node_operations): Likewise.
18633         (vect_slp_analyze_bb_1): Likewise.
18634         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18635         than an unsigned HOST_WIDE_INT.
18636         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
18637         (vectorizable_load): Handle polynomial vf.
18638         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
18639         a poly_uint64.
18640         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
18642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18643             Alan Hayward  <alan.hayward@arm.com>
18644             David Sherwood  <david.sherwood@arm.com>
18646         * match.pd: Handle bit operations involving three constants
18647         and try to fold one pair.
18649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18651         * tree-vect-loop-manip.c: Include gimple-fold.h.
18652         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
18653         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
18654         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
18655         Add a path that uses a step of VF instead of 1, but disable it
18656         for now.
18657         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
18658         and niters_no_overflow parameters.  Update calls to
18659         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
18660         Create a new SSA name if the latter choses to use a ste other
18661         than zero, and return it via niters_vector_mult_vf_var.
18662         * tree-vect-loop.c (vect_transform_loop): Update calls to
18663         vect_do_peeling, vect_gen_vector_loop_niters and
18664         slpeel_make_loop_iterate_ntimes.
18665         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
18666         (vect_gen_vector_loop_niters): Update declarations after above changes.
18668 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
18670         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
18671         128-bit round to integer instructions.
18672         (ceil<mode>2): Likewise.
18673         (btrunc<mode>2): Likewise.
18674         (round<mode>2): Likewise.
18676 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18678         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
18679         unaligned VSX load/store on P8/P9.
18680         (expand_block_clear): Allow the use of unaligned VSX
18681         load/store on P8/P9.
18683 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18685         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
18686         New function.
18687         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
18688         swap associated with both a load and a store.
18690 2018-01-02  Andrew Waterman  <andrew@sifive.com>
18692         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
18693         * config/riscv/riscv.md (clear_cache): Use it.
18695 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
18697         * web.c: Remove out-of-date comment.
18699 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18701         * expr.c (fixup_args_size_notes): Check that any existing
18702         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
18703         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
18704         (emit_single_push_insn): ...here.
18706 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18708         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
18709         (const_vector_encoded_nelts): New function.
18710         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
18711         (const_vector_int_elt, const_vector_elt): Declare.
18712         * emit-rtl.c (const_vector_int_elt_1): New function.
18713         (const_vector_elt): Likewise.
18714         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
18715         of CONST_VECTOR_ELT.
18717 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18719         * expr.c: Include rtx-vector-builder.h.
18720         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
18721         directly on the tree encoding.
18722         (const_vector_from_tree): Likewise.
18723         * optabs.c: Include rtx-vector-builder.h.
18724         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
18725         sequence of "u" values.
18726         * vec-perm-indices.c: Include rtx-vector-builder.h.
18727         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
18728         directly on the vec_perm_indices encoding.
18730 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18732         * doc/rtl.texi (const_vector): Describe new encoding scheme.
18733         * Makefile.in (OBJS): Add rtx-vector-builder.o.
18734         * rtx-vector-builder.h: New file.
18735         * rtx-vector-builder.c: Likewise.
18736         * rtl.h (rtx_def::u2): Add a const_vector field.
18737         (CONST_VECTOR_NPATTERNS): New macro.
18738         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
18739         (CONST_VECTOR_DUPLICATE_P): Likewise.
18740         (CONST_VECTOR_STEPPED_P): Likewise.
18741         (CONST_VECTOR_ENCODED_ELT): Likewise.
18742         (const_vec_duplicate_p): Check for a duplicated vector encoding.
18743         (unwrap_const_vec_duplicate): Likewise.
18744         (const_vec_series_p): Check for a non-duplicated vector encoding.
18745         Say that the function only returns true for integer vectors.
18746         * emit-rtl.c: Include rtx-vector-builder.h.
18747         (gen_const_vec_duplicate_1): Delete.
18748         (gen_const_vector): Call gen_const_vec_duplicate instead of
18749         gen_const_vec_duplicate_1.
18750         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
18751         (gen_const_vec_duplicate): Use rtx_vector_builder.
18752         (gen_const_vec_series): Likewise.
18753         (gen_rtx_CONST_VECTOR): Likewise.
18754         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
18755         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18756         Build a new vector rather than modifying a CONST_VECTOR in-place.
18757         (handle_special_swappables): Update call accordingly.
18758         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
18759         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18760         Build a new vector rather than modifying a CONST_VECTOR in-place.
18761         (handle_special_swappables): Update call accordingly.
18763 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18765         * simplify-rtx.c (simplify_const_binary_operation): Use
18766         CONST_VECTOR_ELT instead of XVECEXP.
18768 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18770         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
18771         the selector elements to be different from the data elements
18772         if the selector is a VECTOR_CST.
18773         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
18774         ssizetype for the selector.
18776 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18778         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
18779         before testing each element individually.
18780         * tree-vect-generic.c (lower_vec_perm): Likewise.
18782 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18784         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
18785         * selftest-run-tests.c (selftest::run_tests): Call it.
18786         * vector-builder.h (vector_builder::operator ==): New function.
18787         (vector_builder::operator !=): Likewise.
18788         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
18789         (vec_perm_indices::all_from_input_p): New function.
18790         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18791         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
18792         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
18793         instead of reading the VECTOR_CST directly.  Detect whether both
18794         vector inputs are the same before constructing the vec_perm_indices,
18795         and update the number of inputs argument accordingly.  Use the
18796         utility functions added above.  Only construct sel2 if we need to.
18798 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18800         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
18801         the broadcast of the low byte.
18802         (expand_mult_highpart): Use an explicit encoding for the permutes.
18803         * optabs-query.c (can_mult_highpart_p): Likewise.
18804         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
18805         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18806         (vectorizable_bswap): Likewise.
18807         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
18808         explicit encoding for the power-of-2 permutes.
18809         (vect_permute_store_chain): Likewise.
18810         (vect_grouped_load_supported): Likewise.
18811         (vect_permute_load_chain): Likewise.
18813 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18815         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
18816         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
18817         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
18818         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18819         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
18820         (vect_gen_perm_mask_any): Likewise.
18822 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18824         * int-vector-builder.h: New file.
18825         * vec-perm-indices.h: Include int-vector-builder.h.
18826         (vec_perm_indices): Redefine as an int_vector_builder.
18827         (auto_vec_perm_indices): Delete.
18828         (vec_perm_builder): Redefine as a stand-alone class.
18829         (vec_perm_indices::vec_perm_indices): New function.
18830         (vec_perm_indices::clamp): Likewise.
18831         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
18832         (vec_perm_indices::new_vector): New function.
18833         (vec_perm_indices::new_expanded_vector): Update for new
18834         vec_perm_indices class.
18835         (vec_perm_indices::rotate_inputs): New function.
18836         (vec_perm_indices::all_in_range_p): Operate directly on the
18837         encoded form, without computing elided elements.
18838         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
18839         encoding.  Update for new vec_perm_indices class.
18840         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
18841         the given vec_perm_builder.
18842         (expand_vec_perm_var): Update vec_perm_builder constructor.
18843         (expand_mult_highpart): Use vec_perm_builder instead of
18844         auto_vec_perm_indices.
18845         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
18846         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
18847         or double series encoding as appropriate.
18848         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
18849         vec_perm_indices instead of auto_vec_perm_indices.
18850         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18851         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18852         (vect_permute_store_chain): Likewise.
18853         (vect_grouped_load_supported): Likewise.
18854         (vect_permute_load_chain): Likewise.
18855         (vect_shift_permute_load_chain): Likewise.
18856         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18857         (vect_transform_slp_perm_load): Likewise.
18858         (vect_schedule_slp_instance): Likewise.
18859         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18860         (vectorizable_mask_load_store): Likewise.
18861         (vectorizable_bswap): Likewise.
18862         (vectorizable_store): Likewise.
18863         (vectorizable_load): Likewise.
18864         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
18865         vec_perm_indices instead of auto_vec_perm_indices.  Use
18866         tree_to_vec_perm_builder to read the vector from a tree.
18867         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
18868         vec_perm_builder instead of a vec_perm_indices.
18869         (have_whole_vector_shift): Use vec_perm_builder and
18870         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
18871         truncation to calc_vec_perm_mask_for_shift.
18872         (vect_create_epilog_for_reduction): Likewise.
18873         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
18874         from auto_vec_perm_indices to vec_perm_indices.
18875         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18876         instead of changing individual elements.
18877         (aarch64_vectorize_vec_perm_const): Use new_vector to install
18878         the vector in d.perm.
18879         * config/arm/arm.c (expand_vec_perm_d::perm): Change
18880         from auto_vec_perm_indices to vec_perm_indices.
18881         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18882         instead of changing individual elements.
18883         (arm_vectorize_vec_perm_const): Use new_vector to install
18884         the vector in d.perm.
18885         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
18886         Update vec_perm_builder constructor.
18887         (rs6000_expand_interleave): Likewise.
18888         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
18889         (rs6000_expand_interleave): Likewise.
18891 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18893         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
18894         to qimode could truncate the indices.
18895         * optabs.c (expand_vec_perm_var): Likewise.
18897 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18899         * Makefile.in (OBJS): Add vec-perm-indices.o.
18900         * vec-perm-indices.h: New file.
18901         * vec-perm-indices.c: Likewise.
18902         * target.h (vec_perm_indices): Replace with a forward class
18903         declaration.
18904         (auto_vec_perm_indices): Move to vec-perm-indices.h.
18905         * optabs.h: Include vec-perm-indices.h.
18906         (expand_vec_perm): Delete.
18907         (selector_fits_mode_p, expand_vec_perm_var): Declare.
18908         (expand_vec_perm_const): Declare.
18909         * target.def (vec_perm_const_ok): Replace with...
18910         (vec_perm_const): ...this new hook.
18911         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
18912         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
18913         * doc/tm.texi: Regenerate.
18914         * optabs.def (vec_perm_const): Delete.
18915         * doc/md.texi (vec_perm_const): Likewise.
18916         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
18917         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
18918         expand_vec_perm for constant permutation vectors.  Assert that
18919         the mode of variable permutation vectors is the integer equivalent
18920         of the mode that is being permuted.
18921         * optabs-query.h (selector_fits_mode_p): Declare.
18922         * optabs-query.c: Include vec-perm-indices.h.
18923         (selector_fits_mode_p): New function.
18924         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
18925         is defined, instead of checking whether the vec_perm_const_optab
18926         exists.  Use targetm.vectorize.vec_perm_const instead of
18927         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
18928         fit in the vector mode before using a variable permute.
18929         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
18930         vec_perm_indices instead of an rtx.
18931         (expand_vec_perm): Replace with...
18932         (expand_vec_perm_const): ...this new function.  Take the selector
18933         as a vec_perm_indices rather than an rtx.  Also take the mode of
18934         the selector.  Update call to shift_amt_for_vec_perm_mask.
18935         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18936         Use vec_perm_indices::new_expanded_vector to expand the original
18937         selector into bytes.  Check whether the indices fit in the vector
18938         mode before using a variable permute.
18939         (expand_vec_perm_var): Make global.
18940         (expand_mult_highpart): Use expand_vec_perm_const.
18941         * fold-const.c: Includes vec-perm-indices.h.
18942         * tree-ssa-forwprop.c: Likewise.
18943         * tree-vect-data-refs.c: Likewise.
18944         * tree-vect-generic.c: Likewise.
18945         * tree-vect-loop.c: Likewise.
18946         * tree-vect-slp.c: Likewise.
18947         * tree-vect-stmts.c: Likewise.
18948         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18949         Delete.
18950         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18951         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18952         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18953         (aarch64_vectorize_vec_perm_const): ...this new function.
18954         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18955         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18956         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18957         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18958         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18959         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18960         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18961         into...
18962         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
18963         check for NEON modes.
18964         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18965         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18966         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18967         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18968         into...
18969         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
18970         the old VEC_PERM_CONST conditions.
18971         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18972         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18973         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18974         (ia64_vectorize_vec_perm_const_ok): Merge into...
18975         (ia64_vectorize_vec_perm_const): ...this new function.
18976         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18977         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18978         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18979         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18980         * config/mips/mips.c (mips_expand_vec_perm_const)
18981         (mips_vectorize_vec_perm_const_ok): Merge into...
18982         (mips_vectorize_vec_perm_const): ...this new function.
18983         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18984         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18985         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18986         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18987         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18988         (rs6000_expand_vec_perm_const): Delete.
18989         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18990         Delete.
18991         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18992         (altivec_expand_vec_perm_const_le): Take each operand individually.
18993         Operate on constant selectors rather than rtxes.
18994         (altivec_expand_vec_perm_const): Likewise.  Update call to
18995         altivec_expand_vec_perm_const_le.
18996         (rs6000_expand_vec_perm_const): Delete.
18997         (rs6000_vectorize_vec_perm_const_ok): Delete.
18998         (rs6000_vectorize_vec_perm_const): New function.
18999         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19000         an element count and rtx array.
19001         (rs6000_expand_extract_even): Update call accordingly.
19002         (rs6000_expand_interleave): Likewise.
19003         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19004         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19005         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19006         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19007         (rs6000_expand_vec_perm_const): Delete.
19008         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19009         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19010         (altivec_expand_vec_perm_const_le): Take each operand individually.
19011         Operate on constant selectors rather than rtxes.
19012         (altivec_expand_vec_perm_const): Likewise.  Update call to
19013         altivec_expand_vec_perm_const_le.
19014         (rs6000_expand_vec_perm_const): Delete.
19015         (rs6000_vectorize_vec_perm_const_ok): Delete.
19016         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
19017         reference to the SPE evmerge intructions.
19018         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19019         an element count and rtx array.
19020         (rs6000_expand_extract_even): Update call accordingly.
19021         (rs6000_expand_interleave): Likewise.
19022         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19023         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19024         new function.
19025         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19027 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19029         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19030         vector mode and that that mode matches the mode of the data
19031         being permuted.
19032         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19033         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
19034         directly using expand_vec_perm_1 when forcing selectors into
19035         registers.
19036         (expand_vec_perm_var): New function, split out from expand_vec_perm.
19038 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19040         * optabs-query.h (can_vec_perm_p): Delete.
19041         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19042         * optabs-query.c (can_vec_perm_p): Split into...
19043         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19044         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19045         particular selector is valid.
19046         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19047         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19048         (vect_grouped_load_supported): Likewise.
19049         (vect_shift_permute_load_chain): Likewise.
19050         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19051         (vect_transform_slp_perm_load): Likewise.
19052         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19053         (vectorizable_bswap): Likewise.
19054         (vect_gen_perm_mask_checked): Likewise.
19055         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
19056         implementations of variable permutation vectors into account
19057         when deciding which selector to use.
19058         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19059         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19060         with a false third argument.
19061         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19062         to test whether the constant selector is valid and can_vec_perm_var_p
19063         to test whether a variable selector is valid.
19065 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19067         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19068         * optabs-query.c (can_vec_perm_p): Likewise.
19069         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19070         instead of vec_perm_indices.
19071         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19072         (vect_gen_perm_mask_checked): Likewise,
19073         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19074         (vect_gen_perm_mask_checked): Likewise,
19076 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19078         * optabs-query.h (qimode_for_vec_perm): Declare.
19079         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19080         (qimode_for_vec_perm): ...this new function.
19081         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19083 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19085         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19086         does not have a conditional at the top.
19088 2018-01-02  Richard Biener  <rguenther@suse.de>
19090         * ipa-inline.c (big_speedup_p): Fix expression.
19092 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19094         PR target/81616
19095         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19096         for generic 4->6.
19098 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19100         PR target/81616
19101         Generic tuning.
19102         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19103         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19104         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19105         cond_taken_branch_cost 3->4.
19107 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
19109         PR tree-optimization/83581
19110         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19111         TODO_cleanup_cfg if any changes have been made.
19113         PR middle-end/83608
19114         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19115         convert_modes if target mode has the right side, but different mode
19116         class.
19118         PR middle-end/83609
19119         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19120         last argument when extracting from CONCAT.  If either from_real or
19121         from_imag is NULL, use expansion through memory.  If result is not
19122         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19123         the parts directly to inner mode, if even that fails, use expansion
19124         through memory.
19126         PR middle-end/83623
19127         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19128         check for bswap in mode rather than HImode and use that in expand_unop
19129         too.
19131 Copyright (C) 2018 Free Software Foundation, Inc.
19133 Copying and distribution of this file, with or without modification,
19134 are permitted in any medium without royalty provided the copyright
19135 notice and this notice are preserved.