varasm.c (compare_constant): Compare type size of STRING_CSTs.
[platform/upstream/gcc.git] / gcc / ChangeLog
1 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2
3         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4         (get_constant_size): Don't make STRING_CSTs larger than they are.
5         (check_string_literal): New check function for STRING_CSTs.
6         (output_constant): Use it.
7
8 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
9
10         PR target/86812
11         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
12
13 2018-09-13  Richard Biener  <rguenther@suse.de>
14
15         PR tree-optimization/87263
16         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
17         (struct unwind_state): Add max_rpo field.
18         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
19         Compute max_rpo, the max RPO number a block can be backwards reached
20         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
21         separating it from the iterating mode.
22
23 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
24
25         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
26         (rfs_decision): New scheduling decision.
27
28 2018-09-13  Richard Biener  <rguenther@suse.de>
29
30         PR bootstrap/87134
31         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
32         (vn_nary_op_insert_pieces_predicated): Do not write useless
33         valid_dominated_by_p entry outside of the allocated storage.
34
35 2018-09-13  Omar Sandoval  <osandov@osandov.com>
36             Tom de Vries  <tdevries@suse.de>
37
38         PR debug/86985
39         * dwarf2out.c (is_c): New function.
40         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
41
42 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
43
44         PR target/85628
45         * config/aarch64/aarch64.md (*aarch64_bfxil):
46         Define.
47         * config/aarch64/constraints.md (Ulc): Define.
48         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
49         Define.
50         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
51         New function.
52
53 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
54
55         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
56         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
57         aarch64_layout_frame call. 
58         (aarch64_expand_epilogue): Likewise.
59         (aarch64_initial_elimination_offset): Likewise.
60         (aarch64_get_separate_components): Likewise.
61         (aarch64_use_return_insn_p): Likewise.
62         (aarch64_layout_frame): Remove unneeded check.
63
64 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
65
66         * configure.ac: Only append
67         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
68         gcc_config_arguments if it was never reconfigured or last reconfigure
69         was with different arguments.
70         * configure: Regenerated.
71
72 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
73             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
74
75         PR middle-end/87290
76         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
77         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
78
79 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
80
81         PR tree-optimization/87287
82         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
83         X % C == 0 to X % (unsigned) C == 0 optimization to ...
84         * match.pd (X % C == 0): ... here.  New optimization.
85
86 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
87
88         PR middle-end/82853
89         * expr.h (maybe_optimize_mod_cmp): Declare.
90         * expr.c (mod_inv): New function.
91         (maybe_optimize_mod_cmp): New function.
92         (do_store_flag): Use it.
93         * cfgexpand.c (expand_gimple_cond): Likewise.
94
95 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
96             Julian Brown  <julian@codesourcery.com>
97
98         PR middle-end/86336
99         * gimplify.c (gimplify_scan_omp_clauses): Set
100         target_firstprivatize_array_bases in OpenACC parallel and kernels
101         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
102         OpenACC data regions.
103
104 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
105
106         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
107         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
108
109 2018-09-12  Richard Biener  <rguenther@suse.de>
110
111         PR tree-optimization/87280
112         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
113         edge but unreachable target.
114         (do_rpo_vn): For conservatively handling a PHI only mark
115         the backedge executable but not the block reachable.
116
117 2018-09-12  Richard Biener  <rguenther@suse.de>
118
119         PR tree-optimization/87266
120         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
121         visited blocks.
122
123 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
124
125         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
126         constants.
127         ("trunc<BFP:mode><DFP_ALL:mode>2")
128         ("trunc<DFP_ALL:mode><BFP:mode>2")
129         ("extend<BFP:mode><DFP_ALL:mode>2")
130         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
131         according to the target operand type.
132
133 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
134             Andreas Krebbel  <krebbel@linux.ibm.com>
135
136         PR tree-optimization/86844
137         * gimple-ssa-store-merging.c
138         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
139         there are any overlapping stores in between them, make sure they are
140         also coalesced or we give up completely.
141
142 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
143
144         PR middle-end/87248
145         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
146         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
147
148 2018-09-12  Tom de Vries  <tdevries@suse.de>
149
150         * common.opt (gdescribe-dies): Add option.
151         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
152         attribute for artifical and nameless decls.
153         (dwarf2out_register_external_die): Add description attribute to
154         external reference die.
155         (add_desc_attribute): New functions.
156         (gen_subprogram_die): Add description attribute to
157         DW_TAG_call_site_parameter.
158         * tree-pretty-print.c (print_generic_expr_to_str): New function.
159         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
160         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
161         -gno-describe-dies.
162         (@item -gdescribe-dies): Add.
163
164 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
165
166         * tree-vrp.c (vrp_shift_undefined_p): Remove.
167         (extract_range_from_binary_expr_1: Call
168         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
169         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
170         depend on sign.
171
172 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
173
174         * gimple-ssa-warn-alloca.c
175         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
176         field for ALLOCA_BOUND_*_LARGE.
177
178 2018-09-11  Nathan Sidwell  <nathan@acm.org>
179
180         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
181
182 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
183
184         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
185         for clobbers.  Remove obsolete comment.
186
187 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
188
189         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
190         mpxchk, mpxld and mpxst types.
191         (define_attr length_immediate): Remove all processing of mpx types.
192         (define_attr prefix_0f): Ditto.
193         (define_attr memory): Ditto.
194
195 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
196
197         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
198         (log<mode>2): Change operand 1 predicate to general_operand.
199         Extend operand 1 to XFmode and generate logxf3 insn.
200         (log10<mode>2): Change operand 1 predicate to general_operand.
201         Extend operand 1 to XFmode and generate log10xf3 insn.
202         (log2<mode>2): Change operand 1 predicate to general_operand.
203         Extend operand 1 to XFmode and generate log2xf3 insn.
204         (fyl2xp1_extend<mode>xf3_i387): Remove.
205         (log1p<mode>2): Change operand 1 predicate to general_operand.
206         Extend operand 1 to XFmode and generate log1pxf3 insn.
207         (fxtract_extend<mode>xf3_i387): Remove.
208         (logb<mode>2): Change operand 1 predicate to general_operand.
209         Extend operand 1 to XFmode and generate logbxf3 insn.
210         (ilogb<mode>2): Change operand 1 predicate to general_operand.
211         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
212         (significand<mode>2): Change operand 1 predicate to general_operand.
213         Extend operand 1 to XFmode and generate significandxf3 insn.
214
215 2018-09-11  Nathan Sidwell  <nathan@acm.org>
216
217         * gcc.c (perror_with_name, pfatal_with_name): Delete.
218         (load_specs): Use fatal_error.
219         (DELETE_IF_ORDINARY, process_command): Use error.
220         (execute, run_attempt): Use fatal_error.
221
222 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
223
224         * diagnostic-core.h (sorry_at): New prototype.
225         * diagnostic.c (sorry_at): New function.
226
227 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
228
229         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
230         by zero as VR_UNDEFINED.
231
232 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
233
234         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
235         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
236         (<sincos>mode2): New expander.
237         (sincos_extend<mode>xf3_i387): Remove insn pattern.
238         (sincos -> sin, cos splitters): Remove splitter patterns.
239         (sincos<mode>3): Change operand 2 predicate to general_operand.
240         Extend operand 2 to XFmode and generate sincosxf3 insn.
241         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
242         Change operand 3 predicate to const1_operand.
243         (fptan_extend<mode>xf4_i387): Remove insn pattern.
244         (tanxf2): Update operands in the call to fptanxf4_i387.
245         (tan<mode>2): Change operand 1 predicate to general_operand.
246         Extend operand 1 to XFmode and generate tanxf3 insn.
247         (atan2xf3): Rename from *fpatanxf3_i387.
248         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
249         (atan2xf3): Remove expander.
250         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
251         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
252         (atan<mode>2): Change operand 1 predicate to general_operand.
253         Extend operand 1 to XFmode and generate atanxf3 insn.
254
255 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
256
257         * config/i386/i386.md (x87/SSE constant load splitter): Use
258         memory_operand instead of nonimmediate_operand for input operand
259         predicate.
260
261 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
262
263         * config/i386/i386.md (float partial SSE register stall splitter): Move
264         splitter near its instruction pattern.
265         (float_extend partial SSE register stall splitter): Ditto.
266         (float_truncate partial SSE register stall splitter): Ditto.
267
268 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
269
270         PR target/86794
271         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
272         to speculation_safe_value_not_needed.
273
274         PR target/85666
275         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
276         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
277         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
278         leaf_function_p, instead use has_hard_reg_initial_val.
279
280 2018-09-09  Nathan Sidwell  <nathan@acm.org>
281
282         * gcc.h (pfatal_with_name): Don't declare here.
283         * gcc.c (pfatal_with_name): Make static.
284
285 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
286
287         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
288         earlyclobber.
289
290 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
291
292         PR rtl-optimization/85458
293         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
294         priority hook to reduce the priority of EXPR.
295
296 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
297
298         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
299         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
300         with X87_ENABLE_FLOAT.  Remove preparation code.
301         (*float<SWI48:mode><MODEF:mode>2): Rename from
302         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
303         math using "enabled" attribute.
304         (*floatdi<MODEF:mode>2_i387): Rename from
305         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
306         enable for 32bit targets only.
307         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
308         splitter.
309         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
310         as operand 1 predicate.  Rewrite as define_insn_and_split.
311         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
312
313 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
314
315         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
316         to fallthru to FLOAT case.
317
318 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
319
320         PR target/86731
321         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
322         around folding of vec_sl to handle out of range shift values.
323
324 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
325
326         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
327         Update callers to gen_fix_trunc<mode>_i387_fisttp
328         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
329         nonimmediate_operand.
330         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
331         and corresponding splitters.
332         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
333         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
334         (fix_truncdi_i387_with_temp): Remove insn pattern
335         and corresponding splitters.
336         (fix_trunc<mode>_i387): Change operand 0 predicate to
337         nonimmediate_operand.
338         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
339         and corresponding splitters.
340         (*fistdi2_1): Remove.
341         (fistdi2): Ditto.
342         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
343         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
344         (*fist<mode>2_1): Remove.
345         (fist<mode>2): Ditto.
346         (fist<mode>2_with_temp): Remove insn pattern and corresponding
347         splitters.
348         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
349         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
350         (fistdi2_<rounding>): Change operand 0 predicate to
351         nonimmediate_operand.
352         (fistdi2_<rounding>_with_temp): Remove insn pattern
353         and corresponding splitters.
354         (fist<mode>2_<rounding>): Change operand 0 predicate to
355         nonimmediate_operand.
356         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
357         and corresponding splitters.
358
359         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
360
361 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
362
363         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
364         the init value.
365
366 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
367
368         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
369         early gimple folding of vec_splat().
370         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
371         * gimple-fold.h: Add an extern define for tree_vec_extract().
372
373 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
374
375         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
376         wrappers around TREE_TYPE comparisons.
377
378 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
379
380         PR target/80080
381         * config/s390/predicates.md: Add nonsym_memory_operand.
382         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
383         contains a SYMBOL_REF, load it into an intermediate pseudo.
384         (s390_emit_compare_and_swap): Legitimize operand.
385         * config/s390/s390.md: Use the new nonsym_memory_operand
386         with UNSPECV_CAS patterns.
387
388 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
389
390         PR target/80080
391         * config/s390/s390-passes.def: New file.
392         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
393         declaration.
394         (make_pass_s390_early_mach): Add declaration.
395         * config/s390/s390.c (make_pass_s390_early_mach):
396         (s390_option_override): Remove dynamic registration.
397         * config/s390/t-s390: Add s390-passes.def.
398
399 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
400
401         * config/s390/s390.c (s390_decompose_constant_pool_ref):
402         Remove UNSPEC_LTREL_BASE check.
403         (annotate_constant_pool_refs): Likewise.
404         (find_constant_pool_ref): Likewise.
405         (find_ltrel_base): Removed.
406         (replace_ltrel_base): Removed.
407         (s390_mainpool_finish): Remove replace_ltrel_base call.
408         (s390_chunkify_start): Remove pending LTREL_BASE logic.
409         (s390_chunkify_finish): Remove replace_ltrel_base call.
410         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
411
412 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
413
414         PR target/86779
415         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
416         to speculation_safe_value_not_needed.
417
418 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
419             Bernd Schmidt  <bernds_cb1@t-online.de>
420
421         * config/nvptx/nvptx-opts.h: New file.
422         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
423         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
424         (ASM_SPEC): Define.
425         (TARGET_SM35): New macro.
426         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
427         correct predicate.
428         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
429         values.
430         (misa=): New option.
431         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
432
433 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
434
435         * config/i386/i386.md (truncdfsf2): Remove expander.
436         (truncdfsf2_with_temp): Ditto.
437         (truncxf<mode>2): Ditto.
438         (*truncdfsf_fast_mixed): Remove insn pattern.
439         (*truncdfsf_fast_i387): Ditto.
440         (*truncdfsf_mixed): Ditto.
441         (*truncdfsf_i387): Ditto.
442         (*truncdfsf2_i387_1): Ditto.
443         (*truncxfsf2_mixed): Ditto.
444         (*truncxfdf2_mixed): Ditto.
445         (*truncxf<mode>2_i387_noop): Ditto. Update callers
446         to call gen_truncxf<mode>2 instead.
447         (*truncxf<mode>2_i387): Remove.
448         (reg->reg splitters): Remove splitter pattern.
449         (reg->mem splitters): Ditto.
450
451         (truncdfsf2): New insn pattern.
452         (truncxf<mode>2): Ditto.
453
454 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
455
456         * tree-ssa-math-opts.c (is_mult_by): New function.
457         (is_square_of): Use the above.
458         (optimize_recip_sqrt): New function.
459         (pass_cse_reciprocals::execute): Use the above.
460
461 2018-09-05  Richard Biener  <rguenther@suse.de>
462
463         PR bootstrap/87134
464         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
465         to zero-init the emplaced vec.
466
467 2018-09-05  Martin Liska  <mliska@suse.cz>
468
469         PR tree-optimization/87205
470         * tree-switch-conversion.c (pass_lower_switch::execute):
471         Group cases for switch statements.
472
473 2018-09-05  Richard Biener  <rguenther@suse.de>
474
475         PR tree-optimization/87217
476         * tree-ssa-sccvn.c (vuse_valueize): New.
477         (vn_reference_lookup_pieces): Use it.
478         (vn_reference_lookup): Likewise.
479
480 2018-09-05  Nathan Sidwell  <nathan@acm.org>
481
482         PR c++/87137
483         * stor-layout.c (place_field): Scan forwards to check last
484         bitfield when ms_bitfield_placement is in effect.
485
486 2018-09-05  Richard Biener  <rguenther@suse.de>
487
488         PR bootstrap/87225
489         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
490         return.
491
492 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
493             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
494
495         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
496         * config.gcc (extra_objs): Build it.
497         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
498         Likewise.
499         * config/aarch64/aarch64-passes.def
500         (pass_tag_collision_avoidance): New pass.
501         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
502         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
503         (aarch64_classify_address): Remove static qualifier.
504         (aarch64_address_info, aarch64_address_type): Move to...
505         * config/aarch64/aarch64-protos.h: ... here.
506         (make_pass_tag_collision_avoidance): New function.
507         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
508         New tuning flag.
509
510 2018-09-05  Martin Liska  <mliska@suse.cz>
511
512         * doc/gcov.texi: Update documentation of humar
513         readable mode.
514         * gcov.c (format_count): Print one decimal place, it provides
515         more fine number of situations like '1G' vs. '1.4G'.
516
517 2018-09-05  Martin Liska  <mliska@suse.cz>
518
519         PR target/87164
520         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
521         * optc-gen.awk: Allow 'Var' for Deprecated options in order
522         to generate a MASK value.
523
524 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
525
526         PR debug/86593
527         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
528         if frame pointer isn't used.
529         (compute_frame_pointer_to_fb_displacement): Likewise.
530
531 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
532
533         PR target/87198
534         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
535         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
536         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
537         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
538         and OPTION_MASK_ISA_XSAVEC_UNSET.
539
540 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
541
542         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
543         XOR operations in NAND case.
544
545 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
546
547         * wide-int-range.cc (wide_int_range_convert): New.
548         * wide-int-range.h (wide_int_range_convert): New.
549         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
550         code into wide_int_range_convert.
551         (extract_range_into_wide_ints): Do not munge anti range constants
552         into the entire domain.  Just return the range back.
553
554 2018-09-04  Martin Liska  <mliska@suse.cz>
555
556         * genmatch.c (output_line_directive): Add new argument
557         fnargs.
558         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
559
560 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
561
562         * doc/invoke.texi (Option Summary): Add whitespace.
563
564         * doc/invoke.texi (Option Summary): Add -Waligned-new.
565
566 2018-09-04  Richard Biener  <rguenther@suse.de>
567
568         PR tree-optimization/87211
569         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
570         backedge value we're supposed to treat as VARYING also number
571         the PHI to VARYING in case it got a different value-number already.
572
573 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
574
575         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
576         (extract_range_from_binary_expr_1): Do not call
577         vrp_can_optimize_bit_op.
578         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
579         static.
580         (wide_int_range_get_mask_and_bounds): New.
581         (wide_int_range_optimize_bit_op): New.
582         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
583         (wide_int_range_bit_and): Same.
584         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
585         (wide_int_range_optimize_bit_op): New.
586         (wide_int_range_get_mask_and_bounds): New.
587
588 2018-09-04  Richard Biener  <rguenther@suse.de>
589
590         PR tree-optimization/87176
591         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
592         variable.  When value-numbering a virtual PHI node make sure
593         to not value-number to the backedge value.
594
595 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
596
597         * doc/extend.texi (Long Long, Hex Floats): Document support for
598         long long and hex floats in more recent versions of ISO C++.
599
600 2018-09-03  Richard Biener  <rguenther@suse.de>
601
602         PR tree-optimization/87177
603         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
604         cleanup.
605
606 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
607
608         * bb-reorder.c (edge_order): Convert to C-qsort-style
609         tri-state comparator.
610         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
611
612 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
613
614         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
615         tri-state comparator.
616         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
617
618 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
619
620         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
621         (mergesort): ... here as maximum count for using netsort.
622         (gcc_qsort): Set nlim to 3 if stable sort is requested.
623         (gcc_stablesort): New.
624         * system.h (gcc_stablesort): Declare.
625
626 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
627
628         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
629         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
630         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
631
632 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
633
634         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
635         lxsdx and stxsdx alternatives.
636         (*mov<mode>_hardfloat64): Ditto.
637         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
638
639 2018-09-03  Richard Biener  <rguenther@suse.de>
640
641         PR tree-optimization/87200
642         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
643         simplify result.
644
645 2018-09-03  Martin Liska  <mliska@suse.cz>
646
647         PR tree-optimization/87201
648         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
649         Fix parenthesis in an expression.
650
651 2018-09-03  Richard Biener  <rguenther@suse.de>
652
653         PR tree-optimization/87197
654         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
655         visited.  CSE the VN_INFO hashtable lookup.
656
657         PR tree-optimization/87169
658         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
659         iterating make sure there's no extra backedges from irreducible
660         regions feeding the header.  Mark the destination block
661         executable.
662
663 2018-09-03  Martin Liska  <mliska@suse.cz>
664
665         PR driver/83193
666         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
667         * common/common-targhooks.c (default_get_valid_option_values):
668         New function.
669         * common/common-targhooks.h (default_get_valid_option_values):
670         Likewise.
671         * common/config/i386/i386-common.c: Move processor_target_table
672         from i386.c.
673         (ix86_get_valid_option_values): New function.
674         (TARGET_GET_VALID_OPTION_VALUES): New macro.
675         * config/i386/i386.c (struct ptt): Move to i386-common.c.
676         (PTA_*): Move all defined masks into i386-common.c.
677         (ix86_function_specific_restore): Use new processor_cost_table.
678         * config/i386/i386.h (struct ptt): Moved from i386.c.
679         (struct pta): Likewise.
680         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
681         * doc/tm.texi.in: Likewise.
682         * opt-suggestions.c (option_proposer::suggest_option):
683         Pass prefix to build_option_suggestions.
684         (option_proposer::get_completions): Likewise.
685         (option_proposer::build_option_suggestions): Use the new target
686         hook.
687         * opts.c (struct option_help_tuple): New struct.
688         (print_filtered_help): Use the new target hook.
689
690 2018-09-03  Martin Liska  <mliska@suse.cz>
691
692         PR middle-end/59521
693         * predict.c (set_even_probabilities): Add likely_edges
694         argument and handle cases where we have precisely one
695         likely edge.
696         (combine_predictions_for_bb): Catch also likely_edges.
697         (tree_predict_by_opcode): Handle gswitch statements.
698         * tree-cfg.h (find_case_label_for_value): New declaration.
699         (find_taken_edge_switch_expr): Likewise.
700         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
701         Find pivot in decision tree based on probabily, not by number of
702         nodes.
703
704 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
705
706         * doc/standards.texi (Standards): Update Objective-C reference.
707
708 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
709
710         * doc/install.texi (Prerequisites): Update link for MPC.
711
712 2018-09-01  Michael Matz  <matz@suse.de>
713
714         PR tree-optimization/87074
715         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
716         PHIs for outer-loop uses.
717
718 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
719
720         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
721         * doc/invoke.texi (C Dialect Options): Ditto.
722
723 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
724
725         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
726
727 2018-08-31  Richard Biener  <rguenther@suse.de>
728
729         PR tree-optimization/87168
730         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
731         (rpo_elim::eliminate_avail): When OP was not visited it must
732         be available.
733
734 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
735
736         * tree-vrp.c (copy_value_range): Convert param "from" from
737         "value_range *" to "const value_range *".
738         (range_is_null): Likewise for param "vr".
739         (range_int_cst_p): Likewise.
740         (range_int_cst_singleton_p): Likewise.
741         (symbolic_range_p): Likewise.
742         (value_ranges_intersect_p): Likewise for both params.
743         (value_range_nonnegative_p): Likewise for param "vr".
744         (value_range_constant_singleton): Likewise.
745         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
746         (extract_range_into_wide_ints): Likewise for param "vr".
747         (extract_range_from_multiplicative_op): Likewise for params "vr0"
748         and "vr1".
749         (vrp_can_optimize_bit_op): Likewise.
750         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
751         "vr1_".
752         (extract_range_from_unary_expr): Likewise.
753         (debug_value_range): Likewise for param "vr".
754         (value_range::dump): Add "const" qualifier.
755         (vrp_prop::check_array_ref): Convert local "vr" from
756         "value_range *" to "const value_range *".
757         (vrp_prop::check_mem_ref): Likewise.
758         (vrp_prop::visit_stmt): Likewise for local "old_vr".
759         (vrp_intersect_ranges_1): Likewise for param "vr_1".
760         (vrp_intersect_ranges): Likewise.
761         (simplify_stmt_for_jump_threading): Likewise for local "vr".
762         (vrp_prop::vrp_finalize): Likewise.
763         * tree-vrp.h (value_range::dump): Add "const" qualifier.
764         (vrp_intersect_ranges): Add "const" qualifier to params as above.
765         (extract_range_from_unary_expr): Likewise.
766         (value_range_constant_singleton): Likewise.
767         (symbolic_range_p): Likewise.
768         (copy_value_range): Likewise.
769         (extract_range_from_binary_expr_1): Likewise.
770         (range_int_cst_p): Likewise.
771         (vrp_set_zero_nonzero_bits): Likewise.
772         (range_int_cst_singleton_p): Likewise.
773
774 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
775
776         * config/aarch64/arm_neon.h (vabsd_s64): New.
777         (vnegd_s64): Likewise.
778
779 2018-08-31  Martin Jambor  <mjambor@suse.cz>
780
781         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
782
783 2018-08-31  Martin Liska  <mliska@suse.cz>
784
785         * ipa-icf.c (sem_item::add_type): Use
786         sem_item::m_type_hash_cache.
787         * ipa-icf.h: Move the cache from sem_item_optimizer
788         to sem_item.
789
790 2018-08-31  Nathan Sidwell  <nathan@acm.org>
791
792         * doc/extend.texi (Backwards Compatibility): Remove implicit
793         extern C leeway of () being (...).
794
795 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
796
797         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
798
799 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
800
801         PR target/86684
802         PR target/87149
803         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
804
805 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
806
807         PR middle-end/87138
808         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
809         gen_int_mode.  Formatting fixes.
810
811 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
812
813         * target.def (custom_function_descriptors): Improve documentation.
814         * doc/tm.texi.in (Trampolines): Expand discussion of function
815         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
816         beginning of the section.
817         * doc/tm.texi: Regenerated.
818
819 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
820
821         * cfg.h (class auto_edge_flag): Spell out the template-id of the
822         base class in the initializer list.  This is a workaround for
823         building with older GCC.
824         (class auto_bb_flag): Likewise.
825
826 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
827
828         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
829         (altivec_vcmpequ<VI_char>_p): Remove star.
830         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
831         vector load modes.
832         (expand_strncmp_vec_sequence): New function.
833         (emit_final_str_compare_vec): New function.
834         (expand_strn_compare): Add support for vector strncmp.
835         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
836         length specification to bytes.
837         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
838         (vcmpnezb_p): New pattern.
839         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
840         for option -mstring-compare-inline-limit.
841
842 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
843
844         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
845         (PTA_SKYLAKE): Add PTA_AES.
846         (PTA_GOLDMONT): Likewise.
847
848 2018-08-29  Jan Hubicka  <jh@suse.cz>
849
850         PR lto/86517
851         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
852         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
853
854 2018-08-29  Jan Hubicka  <jh@suse.cz>
855
856         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
857         TYPE_STUB_DECL.
858         (hash_tree): Do not visit TYPE_STUB_DECL.
859         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
860         stream TYPE_STUB_DECL.
861         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
862         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
863         after free_lang_data.
864         (type_in_anonymous_namespace_p): Likewise.
865
866 2018-08-29  Jan Hubicka  <jh@suse.cz>
867
868         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
869         comment that it has to be even number.
870         (class sreal): Change m_sig type to int32_t.
871         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
872         int64_t for temporary calculations.
873         (sreal_verify_basics): Drop one bit from minimum and maximum.
874
875 2018-08-30  Richard Biener  <rguenther@suse.de>
876
877         PR tree-optimization/87147
878         * tree-ssa-sccvn.c (SSA_VISITED): New function.
879         (visit_phi): When the degenerate result is from the backedge and
880         we didn't visit its definition yet drop to VARYING.
881         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
882
883 2018-08-29  Jan Hubicka  <jh@suse.cz>
884
885         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
886         DECL_VINDEX.
887         (hash_tree): Likewise.
888
889 2018-08-29  Jan Hubicka  <jh@suse.cz>
890
891         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
892         and TYPE_NEXT_REF_TO.
893
894 2018-08-29  Jan Hubicka  <jh@suse.cz>
895
896         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
897         comment that it has to be even number.
898         (class sreal): Change m_sig type to int32_t.
899         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
900         int64_t for temporary calculations.
901         (sreal_verify_basics): Drop one bit from minimum and maximum.
902
903 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
904
905         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
906
907 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
908
909         PR middle-end/86995
910         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
911         if to_add is negative.
912
913 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
914
915         PR middle-end/87053
916         * builtins.c (c_strlen): Improve range checks.
917
918 2018-08-29  Martin Sebor  <msebor@redhat.com>
919             Jeff Law  <law@redhat.com>
920
921         PR tree-optimization/86714
922         PR tree-optimization/86711
923         * builtins.c (c_strlen): Add arguments to call to string_constant.
924         * expr.c (string_constant): Add argument.  Detect missing nul
925         terminator and outermost declaration it's missing in.
926         * expr.h (string_constant): Add argument.
927         * fold-const.c (read_from_constant_string): Add arguments to call to
928         string_constant.
929         (c_getstr): Likewise.
930         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
931         to string_constant.
932         * tree-ssa-strlen.c (get_stridx): Likewise.
933
934 2018-08-29  Jan Hubicka  <jh@suse.cz>
935
936         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
937         Do not stream DECL_VINDEX.
938         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
939         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
940         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
941
942 2018-08-29  Richard Biener  <rguenther@suse.de>
943
944         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
945         virtual operands that are not default defs to honor region
946         boundaries.
947         (rpo_vn_valueize): Remove ineffective code here.
948
949 2018-08-29  Richard Biener  <rguenther@suse.de>
950
951         PR tree-optimization/87132
952         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
953         when skipping defs reachable over backedges.
954
955 2018-08-29  Richard Biener  <rguenther@suse.de>
956
957         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
958         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
959         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
960         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
961         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
962         (vn_reference_lookup_3): Remove use of const_parms.
963         (free_rpo_vn): Do not free const_parms.
964         (do_rpo_vn): Do not call init_const_parms.
965         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
966         SSA_NAME_POINTS_TO_READONLY_MEMORY.
967         (call_may_clobber_ref_p_1): Likewise.
968
969 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
970
971         PR other/86726
972         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
973         (-O): Ditto.
974         (-ftree-scev-cprop): Document.
975
976 2018-08-29  Jan Hubicka  <jh@suse.cz>
977
978         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
979         parameters.
980         (sreal constructor): Update.
981         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
982         sreal:operator/): Update.
983
984 2018-08-29  Martin Liska  <mliska@suse.cz>
985
986         * tree-switch-conversion.c (switch_conversion::expand):
987         Strenghten assumption about gswitch statements.
988
989 2018-08-29  Richard Biener  <rguenther@suse.de>
990
991         PR tree-optimization/87117
992         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
993         re-value-number released SSA VDEFs.
994
995 2018-08-29  Richard Biener  <rguenther@suse.de>
996
997         PR tree-optimization/87126
998         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
999
1000 2018-08-28  Jim Wilson  <jimw@sifive.com>
1001
1002         * config/riscv/pic.md: Rewrite.
1003         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1004         invalid address.
1005         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1006         (SOFTF, default_load, softload, softstore): New.
1007
1008 2018-08-28  Jeff Law  <law@redhat.com>
1009
1010         * fold-const.c (fold_binary_loc): Remove recently added assert.
1011
1012 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1013
1014         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1015         to OP parmeter of generated function.
1016
1017 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
1018
1019         PR tree-optimization/87009
1020         * match.pd: Add boolean optimizations.
1021
1022 2018-08-28  Martin Sebor  <msebor@redhat.com>
1023
1024         PR middle-end/86631
1025         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1026         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1027         (pass_walloca::gate): Use it.
1028         (alloca_call_type): Same.
1029         (pass_walloca::execute): Same.
1030         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1031
1032 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
1033
1034         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1035         GCC_VERSION for usage of "__gcc_dump_printf__" format from
1036         >= 3005 to >= 9000.
1037
1038 2018-08-28  Richard Biener  <rguenther@suse.de>
1039
1040         PR tree-optimization/87124
1041         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1042         constants before looking up avail.
1043
1044 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
1045
1046         PR middle-end/87099
1047         * calls.c (maybe_warn_nonstring_arg): Punt early if
1048         warn_stringop_overflow is zero.  Don't call get_range_strlen
1049         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1050         Swap comparison operands to have constants on rhs.  Only use
1051         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
1052         increment lenrng[0].
1053
1054 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
1055
1056         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1057         use of tree_to_shwi.  Remove duplicated test for the size being
1058         a whole number of bytes.
1059
1060 2018-08-28  Richard Biener  <rguenther@suse.de>
1061
1062         PR tree-optimization/87117
1063         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1064         Handle removed stmt without LHS (GIMPLE_NOP).
1065
1066 2018-08-28  Richard Biener  <rguenther@suse.de>
1067
1068         PR tree-optimization/87117
1069         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1070         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1071
1072 2018-08-28  Richard Biener  <rguenther@suse.de>
1073
1074         PR tree-optimization/87117
1075         * tree-ssa-pre.c (compute_avail): Do not make expressions
1076         with predicated values available.
1077         (get_expr_value_id): Assert we do not run into predicated value
1078         expressions.
1079
1080 2018-08-28  Richard Biener  <rguenther@suse.de>
1081
1082         PR tree-optimization/87117
1083         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1084         get virtual operands.
1085         (get_expr_operands): Handle STRING_CST like other decls.
1086
1087 2018-08-28  Martin Liska  <mliska@suse.cz>
1088
1089         * tree.h: Update documentation of fndecl_built_in_p
1090         functions.
1091
1092
1093 2018-08-27  Jeff Law  <law@redhat.com>
1094         PR tree-optimization/87110
1095         * tree-ssa-dse.c (compute_trims): Handle non-constant
1096         TYPE_SIZE_UNIT.
1097
1098 2018-08-27  Martin Sebor  <msebor@redhat.com>
1099
1100         PR tree-optimization/86914
1101         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1102
1103 2018-08-27  Martin Sebor  <msebor@redhat.com>
1104
1105         PR tree-optimization/87112
1106         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1107         the type of the bound argument.
1108
1109 2018-08-27  Jeff Law  <law@redhat.com>
1110
1111         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1112         type does not have a TYPE_SIZE_UNIT.
1113
1114 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
1115
1116         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1117         with include of backend.h.
1118
1119 2018-08-27  Richard Biener  <rguenther@suse.de>
1120
1121         PR tree-optimization/86927
1122         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1123         use const cond reduction code.
1124
1125 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
1126
1127         PR tree-optimization/85758
1128         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1129
1130 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1131
1132         PR c++/87091
1133         * diagnostic-show-locus.c (class layout_range): Update for
1134         conversion of show_caret_p to a tri-state.
1135         (layout_range::layout_range): Likewise.
1136         (make_range): Likewise.
1137         (layout::maybe_add_location_range): Likewise.
1138         (layout::should_print_annotation_line_p): Don't show annotation
1139         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1140         (layout::get_state_at_point): Update for conversion of
1141         show_caret_p to a tri-state.  Bail out early for
1142         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1143         underlining or source colorization.
1144         (gcc_rich_location::add_location_if_nearby): Update for conversion
1145         of show_caret_p to a tri-state.
1146         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1147         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1148         Likewise.
1149         (selftest::test_one_liner_labels): Likewise.
1150         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1151         conversion of show_caret_p to a tri-state.
1152         * pretty-print.c (text_info::set_location): Likewise.
1153         * pretty-print.h (text_info::set_location): Likewise.
1154         * substring-locations.c (format_warning_n_va): Likewise.
1155         * tree-diagnostic.c (default_tree_printer): Likewise.
1156         * tree-pretty-print.c (newline_and_indent): Likewise.
1157
1158 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1159
1160         PR c++/87091
1161         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1162         line above for line-insertion fix-it hints.
1163         (selftest::test_fixit_insert_containing_newline): Update the
1164         expected results, and add a test with line-numbering enabled.
1165
1166 2018-08-27  Martin Liska  <mliska@suse.cz>
1167
1168         PR sanitizer/86962
1169         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1170         params with DECL_HAS_VALUE_EXPR_P.
1171
1172 2018-08-27  Martin Liska  <mliska@suse.cz>
1173
1174         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1175         selected expansion strategy.
1176
1177 2018-08-27  Martin Liska  <mliska@suse.cz>
1178
1179         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1180         * builtins.c (is_builtin_fn): Likewise.
1181         * attribs.c (diag_attr_exclusions): Use new function
1182         fndecl_built_in_p and remove check for FUNCTION_DECL if
1183         possible.
1184         (builtin_mathfn_code): Likewise.
1185         (fold_builtin_expect): Likewise.
1186         (fold_call_expr): Likewise.
1187         (fold_builtin_call_array): Likewise.
1188         (fold_call_stmt): Likewise.
1189         (set_builtin_user_assembler_name): Likewise.
1190         (is_simple_builtin): Likewise.
1191         * calls.c (gimple_alloca_call_p): Likewise.
1192         (maybe_warn_nonstring_arg): Likewise.
1193         * cfgexpand.c (expand_call_stmt): Likewise.
1194         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1195         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1196         (cgraph_node::verify_node): Likewise.
1197         * cgraphclones.c (build_function_decl_skip_args): Likewise.
1198         (cgraph_node::create_clone): Likewise.
1199         * config/arm/arm.c (arm_insert_attributes): Likewise.
1200         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1201         * dse.c (scan_insn): Likewise.
1202         * expr.c (expand_expr_real_1): Likewise.
1203         * fold-const.c (operand_equal_p): Likewise.
1204         (fold_binary_loc): Likewise.
1205         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1206         * gimple-low.c (lower_stmt): Likewise.
1207         * gimple-pretty-print.c (dump_gimple_call): Likewise.
1208         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1209         * gimple.c (gimple_build_call_from_tree): Likewise.
1210         (gimple_call_builtin_p): Likewise.
1211         (gimple_call_combined_fn): Likewise.
1212         * gimplify.c (gimplify_call_expr): Likewise.
1213         (gimple_boolify): Likewise.
1214         (gimplify_modify_expr): Likewise.
1215         (gimplify_addr_expr): Likewise.
1216         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1217         * ipa-cp.c (determine_versionability): Likewise.
1218         * ipa-fnsummary.c (compute_fn_summary): Likewise.
1219         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1220         * ipa-split.c (visit_bb): Likewise.
1221         (split_function): Likewise.
1222         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1223         * lto-cgraph.c (input_node): Likewise.
1224         * lto-streamer-out.c (write_symbol): Likewise.
1225         * omp-low.c (setjmp_or_longjmp_p): Likewise.
1226         (lower_omp_1): Likewise.
1227         * predict.c (strip_predict_hints): Likewise.
1228         * print-tree.c (print_node): Likewise.
1229         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1230         * trans-mem.c (is_tm_irrevocable): Likewise.
1231         (is_tm_load): Likewise.
1232         (is_tm_simple_load): Likewise.
1233         (is_tm_store): Likewise.
1234         (is_tm_simple_store): Likewise.
1235         (is_tm_abort): Likewise.
1236         (tm_region_init_1): Likewise.
1237         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1238         * tree-cfg.c (verify_gimple_call): Likewise.
1239         (move_stmt_r): Likewise.
1240         (stmt_can_terminate_bb_p): Likewise.
1241         * tree-eh.c (lower_eh_constructs_2): Likewise.
1242         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1243         * tree-inline.c (remap_gimple_stmt): Likewise.
1244         (copy_bb): Likewise.
1245         (estimate_num_insns): Likewise.
1246         (fold_marked_statements): Likewise.
1247         * tree-sra.c (scan_function): Likewise.
1248         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1249         (optimize_stack_restore): Likewise.
1250         (pass_fold_builtins::execute): Likewise.
1251         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1252         (mark_all_reaching_defs_necessary_1): Likewise.
1253         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1254         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1255         (pass_forwprop::execute): Likewise.
1256         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1257         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1258         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1259         * tree-ssa-strlen.c (get_string_length): Likewise.
1260         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1261         (find_func_aliases_for_call): Likewise.
1262         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1263         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1264         * tree-tailcall.c (find_tail_calls): Likewise.
1265         * tree.c (need_assembler_name_p): Likewise.
1266         (free_lang_data_in_decl): Likewise.
1267         (get_call_combined_fn): Likewise.
1268         * ubsan.c (is_ubsan_builtin_p): Likewise.
1269         * varasm.c (incorporeal_function_p): Likewise.
1270         * tree.h (DECL_BUILT_IN): Remove and replace with
1271         fndecl_built_in_p.
1272         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1273         (fndecl_built_in_p): New.
1274
1275 2018-08-27  Martin Liska  <mliska@suse.cz>
1276
1277         PR tree-optimization/86847
1278         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1279         Dump also subtree probability.
1280         (switch_decision_tree::do_jump_if_equal): New function.
1281         (switch_decision_tree::emit_case_nodes): Handle special
1282         situations in balanced tree that can be emitted much simpler.
1283         Fix calculation of probabilities that happen in tree expansion.
1284         * tree-switch-conversion.h (struct cluster): Add
1285         is_single_value_p.
1286         (struct simple_cluster): Likewise.
1287         (struct case_tree_node): Add new function has_child.
1288         (do_jump_if_equal): New.
1289
1290 2018-08-27  Martin Liska  <mliska@suse.cz>
1291
1292         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1293         Add new argument to bit_test_cluster constructor.
1294         (bit_test_cluster::emit): Set bits really number of values
1295         handlel by a test.
1296         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1297         probability argument.
1298         * tree-switch-conversion.h (struct bit_test_cluster):
1299         Add m_handles_entire_switch.
1300
1301 2018-08-27  Martin Liska  <mliska@suse.cz>
1302
1303         PR tree-optimization/86702
1304         * tree-switch-conversion.c (jump_table_cluster::emit):
1305         Make probabilities even for values in jump table
1306         according to number of cases handled.
1307         (switch_decision_tree::compute_cases_per_edge): Pass
1308         argument to reset_out_edges_aux function.
1309         (switch_decision_tree::analyze_switch_statement): Likewise.
1310         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1311         Make it static.
1312
1313 2018-08-27  Martin Liska  <mliska@suse.cz>
1314
1315         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1316         cfun argument explicitly.
1317         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1318         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1319         function gimple_switch_default_bb.
1320         (convert_switch_statements):
1321         (expand_builtins):
1322         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1323         * stmt.c (label_to_block_fn): Use label_to_block and pass
1324         cfun argument explicitly and use gimple_switch_label_bb.
1325         (expand_case): Likewise.
1326         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1327         cfun argument explicitly. Likewise.
1328         (make_edges_bb): Likewise.
1329         (make_cond_expr_edges): Likewise.
1330         (get_cases_for_edge): Likewise.
1331         (make_gimple_switch_edges): Likewise.
1332         (label_to_block_fn): Likewise.
1333         (label_to_block): Likewise.
1334         (make_goto_expr_edges): Likewise.
1335         (make_gimple_asm_edges): Likewise.
1336         (main_block_label): Likewise.
1337         (group_case_labels_stmt): Likewise.
1338         (find_taken_edge_computed_goto): Likewise.
1339         (find_taken_edge_switch_expr): Likewise.
1340         (gimple_verify_flow_info): Likewise.
1341         (gimple_redirect_edge_and_branch): Likewise.
1342         (gimple_switch_label_bb): New function.
1343         (gimple_switch_default_bb): Likewise.
1344         (gimple_switch_edge): Likewise.
1345         (gimple_switch_default_edge): Likewise.
1346         * tree-cfg.h (label_to_block_fn): Remove and replace ...
1347         (label_to_block): ... with this.
1348         (gimple_switch_label_bb): New.
1349         (gimple_switch_default_bb): Likewise.
1350         (gimple_switch_edge): Likewise.
1351         (gimple_switch_default_edge): Likewise.
1352         * tree-cfgcleanup.c (convert_single_case_switch): Use
1353         new gimple functions and pass new argument to label_to_block.
1354         (cleanup_control_flow_bb):
1355         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1356         cfun argument explicitly.
1357         (make_eh_edges): Likewise.
1358         (redirect_eh_dispatch_edge): Likewise.
1359         (lower_resx): Likewise.
1360         (lower_eh_dispatch): Likewise.
1361         (maybe_remove_unreachable_handlers): Likewise.
1362         (unsplit_eh): Likewise.
1363         (cleanup_empty_eh): Likewise.
1364         (verify_eh_edges): Likewise.
1365         (verify_eh_dispatch_edge): Likewise.
1366         * tree-ssa-dom.c (record_edge_info): Likewise.
1367         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1368         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1369         (thread_through_normal_block): Likewise.
1370         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1371         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1372         * tree-switch-conversion.c (switch_conversion::collect): Use new
1373         gimple functions.
1374         (switch_conversion::check_final_bb): Likewise.
1375         (switch_conversion::gather_default_values): Pass new argument
1376         to label_to_block.
1377         (switch_conversion::build_constructors): Likewise.
1378         (switch_decision_tree::compute_cases_per_edge): Use new
1379         gimple_switch_edge function.
1380         (switch_decision_tree::analyze_switch_statement): Pass new argument
1381         to label_to_block.
1382         (switch_decision_tree::try_switch_expansion): Use
1383         gimple_switch_default_edge.
1384         * tree-vrp.c (find_switch_asserts): Pass new argument
1385         to label_to_block.
1386         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1387         (vr_values::simplify_switch_using_ranges): Likewise.
1388
1389 2018-08-27  Richard Biener  <rguenther@suse.de>
1390
1391         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1392         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1393
1394         * tree-ssa-sccvn.h (struct vn_pval): New structure.
1395         (struct vn_nary_op_s): Add unwind_to member.  Add
1396         predicated_values flag and put result into a union together
1397         with a linked list of vn_pval.
1398         (struct vn_ssa_aux): Add name member to make maintaining
1399         a map of SSA name to vn_ssa_aux possible.  Remove no longer
1400         needed info, dfsnum, low, visited, on_sccstack, use_processed
1401         and range_info_anti_range_p members.
1402         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1403         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1404         New functions.
1405         (vn_valueize): New global.
1406         (vn_context_bb): Likewise.
1407         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1408         VN_INFO_PTR_INFO): Remove.
1409         * tree-ssa-sccvn.c: ... (rewrite)
1410         (pass_fre::execute): For -O2+ initialize loops and run
1411         RPO VN in optimistic mode (iterating).  For -O1 and -Og
1412         run RPO VN in non-optimistic mode.
1413         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1414         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1415         * doc/invoke.texi (sccvn-max-scc-size): Remove.
1416         (rpo-vn-max-loop-depth): Document.
1417         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1418         when valuezing the VUSE signals we walked out of the region.
1419         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1420         (phi_translate): Set VN context block to use for availability
1421         lookup.
1422         (compute_avail): Likewise.
1423         (pre_valueize): New function.
1424         (pass_pre::execute): Adjust to the RPO VN API.
1425
1426         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1427         (propagate_constants_for_unrolling): Remove.
1428         (tree_unroll_loops_completely): Perform value-numbering
1429         on the unrolled bodies loop parent.
1430
1431 2018-08-27  Richard Biener  <rguenther@suse.de>
1432
1433         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1434         for partial antic compute.
1435
1436 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
1437
1438         PR rtl-optimization/87065
1439         * combine.c (simplify_if_then_else): Formatting fix.
1440         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1441         check.
1442         (known_cond): Don't return const_true_rtx for vector modes.  Use
1443         CONST0_RTX instead of const0_rtx.  Formatting fixes.
1444
1445 2018-08-27  Martin Liska  <mliska@suse.cz>
1446
1447         PR gcov-profile/87069
1448         * gcov.c (process_file): Record files already processed
1449         and warn about a file being processed multiple times.
1450
1451 2018-08-27  Martin Liska  <mliska@suse.cz>
1452
1453         PR driver/83193
1454         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1455         Set default values for x_aarch64_*_string strings.
1456         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1457         prefix.  For -mabi do not print '=ABI' in help and use
1458         <option_value> format for -msve-vector-bits and -moverride
1459         options.
1460
1461 2018-08-26  Jeff Law  <law@redhat.com>
1462
1463         * config/mips/frame-header-opt.c: Include "backend.h" rather than
1464         "cfg.h"
1465
1466 2018-08-26  Marek Polacek  <polacek@redhat.com>
1467
1468         PR c++/87029, Implement -Wredundant-move.
1469         * doc/invoke.texi: Document -Wredundant-move.
1470
1471 2018-08-25  Martin Sebor  <msebor@redhat.com>
1472
1473         PR tree-optimization/87059
1474         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1475         to the same type as the other.
1476         * fold-const.c (fold_binary_loc): Assert expectation.
1477
1478 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1479
1480         * config/darwin.c (machopic_legitimize_pic_address): Clean up
1481         extraneous parentheses, dead code section and formatting.
1482
1483 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1484
1485         PR c++/87091
1486         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1487         wide enough for jumps in the line-numbering to be visible.
1488         (layout::print_gap_in_line_numbering): New member function.
1489         (layout::calculate_line_spans): When using line numbering, merge
1490         line spans that are only 1 line apart.
1491         (diagnostic_show_locus): When printing line numbers, show gaps in
1492         line numbering directly, rather than printing headers.
1493         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1494         line-numbering with multiple line spans.
1495         (selftest::test_fixit_insert_containing_newline_2): Add test of
1496         line-numbering, in which the spans are close enough to be merged.
1497
1498 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1499
1500         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1501         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1502         * tree-vrp.c (range_is_nonnull): Remove.
1503         (range_includes_zero_p): Accept value_range instead of min/max.
1504         (extract_range_from_binary_expr_1): Do not early bail on
1505         POINTER_PLUS_EXPR.
1506         Use range_includes_zero_p instead of range_is_nonnull.
1507         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1508         of range_is_nonnull.
1509         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1510         special case VR_ANTI_RANGE.
1511         (vrp_finalize): Same.
1512         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1513         instead of min/max.
1514         (range_is_nonnull): Remove.
1515         * vr-values.c (vrp_stmt_computes_nonzero): Use
1516         range_includes_zero_p instead of range_is_nonnull.
1517         (extract_range_basic): Pass value_range to range_includes_zero_p
1518         instead of range_is_nonnull.
1519
1520 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1521
1522         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1523         * emit-rtl.h (rtl_data): Remove return_bnd.
1524         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1525         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1526         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1527         (POINTER_BOUNDS_MODE): Remove definition.
1528         (make_pointer_bounds_mode): Remove.
1529         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1530         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1531         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1532         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1533         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1534         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1535         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1536
1537         * config/i386/i386-modes.def (BND32, BND64): Remove.
1538         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1539         (dbx64_register_map): Ditto.
1540         (svr4_dbx_register_map): Ditto.
1541         (indirect_thunk_bnd_needed): Remove.
1542         (indirect_thunks_bnd_used): Ditto.
1543         (indirect_return_bnd_needed): Ditto.
1544         (indirect_return_via_cx_bnd): Ditto.
1545         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1546         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1547         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1548         (output_indirect_thunk_function): Remove handling of
1549         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1550         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1551         (ix86_save_reg): Remove handling of crtl->return_bnd.
1552         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1553         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1554         and UNSPEC_BNDLX_ADDR.
1555         (ix86_output_indirect_branch_via_reg): Remove handling of
1556         indirect_thunk_prefix_bnd.
1557         (ix86_output_indirect_branch_via_push): Ditto.
1558         (ix86_output_function_return): Ditto.
1559         (ix86_output_indirect_function_return): Ditto.
1560         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1561         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1562         (CALL_USED_REGISTERS): Ditto.
1563         (REG_ALLOC_ORDER): Update for removal of bound registers.
1564         (HI_REGISTER_NAMES): Ditto.
1565         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1566         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1567         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1568         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1569         (FIRST_PSEUDO_REG): Update.
1570         (BND): Remove mode iterator.
1571         * config/i386/predicates.md (bnd_mem_operator): Remove.
1572
1573 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1574
1575         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1576         vectors.
1577
1578 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1579
1580         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1581         the case in which the permute needs only a single element and
1582         repeats for every vector of the result.  Extend that case to
1583         handle variable-length vectors.
1584         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1585
1586 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1587
1588         PR debug/79342
1589         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1590         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1591
1592 2018-08-24  Richard Biener  <rguenther@suse.de>
1593
1594         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1595         bb_flags_allocated members.
1596         (auto_flag): New RAII class for allocating flags.
1597         (auto_edge_flag): New RAII class for allocating edge flags.
1598         (auto_bb_flag): New RAII class for allocating bb flags.
1599         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1600         flag dynamically.
1601         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1602         in favor of temporarily allocated BB flag.
1603         * hsa-brig.c: Re-order includes.
1604         * hsa-dump.c: Likewise.
1605         * hsa-regalloc.c: Likewise.
1606         * print-rtl.c: Likewise.
1607         * profile-count.c: Likewise.
1608
1609 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1610
1611         PR target/86989
1612         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1613         the TOC register.
1614
1615 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1616
1617         PR 87073/bootstrap
1618         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1619         from wide_int_range_multiplicative_op.
1620
1621 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1622
1623         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1624         "permutaion".
1625
1626 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1627
1628         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1629         to 'expanded'.
1630
1631 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1632
1633         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1634         full GENERIC expression used for replacement.
1635
1636 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1637
1638         * tree-vrp.c (abs_extent_range): Remove.
1639         (extract_range_into_wide_ints): Pass wide ints by reference.
1640         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1641         Pass wide ints by reference in all calls to
1642         extract_range_into_wide_ints.
1643         * wide-int-range.cc (wide_int_range_div): New.
1644         * wide-int-range.h (wide_int_range_div): New.
1645         (wide_int_range_includes_zero_p): New.
1646         (wide_int_range_zero_p): New.
1647
1648 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1649
1650         * config/aarch64/aarch64.md (arches): New enum.
1651         (arch): New enum attr.
1652         (arch_enabled): New attr.
1653         (enabled): Now uses arch_enabled only.
1654         (simd, sve, fp16): Removed attribute.
1655         (fp): Attr now defined in terms of 'arch'.
1656         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1657         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1658         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1659         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1660         attributes into 'arch'.
1661         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1662         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1663         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1664         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1665         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1666         'simd' attribute into 'arch'.
1667         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1668         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1669         Convert use of 'fp' attribute to 'arch'.
1670         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1671         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1672         into 'arch'.
1673         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1674         (different modes) Merge 'fp' and 'simd' into 'arch'.
1675         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1676         'simd' into 'arch'.
1677
1678 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1679
1680         PR rtl-optimization/87026
1681         * expmed.c (canonicalize_comparison): If we can no longer create
1682         pseudoregisters, don't.
1683
1684 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1685
1686         PR target/86951
1687         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1688         prototype.
1689         * config/arm/arm.c (speculation_barrier_libfunc): New static
1690         variable.
1691         (arm_init_libfuncs): Initialize it.
1692         (arm_emit_speculation_barrier): New function.
1693         * config/arm/arm.md (speculation_barrier): Call
1694         arm_emit_speculation_barrier for architectures that do not have
1695         DSB or ISB.
1696         (speculation_barrier_insn): Only match on Armv7 or later.
1697
1698 2018-08-23  Richard Biener  <rguenther@suse.de>
1699
1700         PR middle-end/87024
1701         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1702         calls.
1703
1704 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1705
1706         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1707         of single-vector TBLs.
1708         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1709         one input is given.
1710
1711 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1712
1713         PR target/85910
1714         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1715         aarch64_evpc_tbl guard.
1716
1717 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1718
1719         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1720         behaviour.
1721
1722 2018-08-22  Martin Sebor  <msebor@redhat.com>
1723
1724         PR middle-end/87052
1725         * tree-pretty-print.c (pretty_print_string): Add argument.
1726         (dump_generic_node): Call to pretty_print_string with string size.
1727
1728 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1729
1730         PR rtl-optimization/86771
1731         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1732         of two SETs into those two SETs, one to be placed at i2, if that SETs
1733         destination is modified between i2 and i3.
1734
1735 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1736
1737         PR tree-optimization/86725
1738         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1739         function.
1740         (vect_analyze_scalar_cycles_1): Check it.
1741
1742 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1743
1744         PR tree-optimization/86725
1745         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1746         an outer loop phi as a double reduction, make sure that the
1747         single user of the phi result is an inner loop phi.
1748
1749 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1750
1751         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1752         grouped stores with gaps to a strided group.
1753
1754 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1755
1756         * tree-vect-stmts.c (get_group_load_store_type)
1757         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1758         first statement in a group.
1759
1760 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1761
1762         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1763         the sequence used in gcc/gcc.c.
1764
1765 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1766
1767         PR other/704
1768         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1769         building it.
1770
1771 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1772
1773         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1774         Darwin10-specific unwinder-shim.
1775         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1776         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1777         New to cater for Darwin10 Rosetta.
1778
1779 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1780
1781         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1782         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1783
1784 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1785
1786         PR bootstrap/81033
1787         PR target/81733
1788         PR target/52795
1789         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1790         (dwarf2out_switch_text_section): Generate a local label for the
1791         second function sub-section and apply it as the second FDE start
1792         label.
1793         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1794         second sub-section start.
1795
1796 2018-08-22  Richard Biener  <rguenther@suse.de>
1797
1798         PR tree-optimization/86988
1799         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1800
1801 2018-08-22  Richard Biener  <rguenther@suse.de>
1802
1803         PR tree-optimization/86945
1804         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1805
1806 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1807
1808         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1809         a comment about how uses of r2 for .sdata2 come about.
1810
1811 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1812
1813         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1814
1815 2018-08-21  Marek Polacek  <polacek@redhat.com>
1816
1817         PR c++/86981, Implement -Wpessimizing-move.
1818         * doc/invoke.texi: Document -Wpessimizing-move.
1819
1820 2018-08-21  Jan Hubicka  <jh@suse.cz>
1821
1822         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1823         * tree.h (is_redundant_typedef): Remove.
1824         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1825
1826 2018-08-21  Jan Hubicka  <jh@suse.cz>
1827
1828         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1829         when possible.
1830
1831 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1832
1833         * expmed.c (extract_low_bits): Reject invalid subregs early.
1834
1835 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1836
1837         PR middle-end/86121
1838         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1839         behaviour.
1840
1841 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1842
1843         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1844         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1845         * config/vxworks.c: Likewise.
1846
1847 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1848
1849         * config/vxworks.c: Set targetm.have_ctors_dtors
1850         if HAVE_INITFINI_ARRAY_SUPPORT.
1851         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1852         if HAVE_INITFINI_ARRAY_SUPPORT.
1853
1854 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1855
1856         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1857         default search path for VxWorks < 7.
1858
1859 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1860
1861         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1862         (get_format_string): Refer to c_getstr.
1863
1864 2018-08-21  Tom de Vries  <tdevries@suse.de>
1865
1866         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1867         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1868         (debuginfo_early_stop): Declare.
1869         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1870         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1871         (debuginfo_early_stop): New function.
1872         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1873         and debuginfo_early_stop.
1874         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1875         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1876         (general_init): Call debuginfo_early_init.
1877         (finalize): Call debuginfo_fini.
1878         (do_compile): Call debuginfo_init.
1879         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1880         -fdump-early-debug.
1881         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1882
1883 2018-08-21  Tom de Vries  <tdevries@suse.de>
1884
1885         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1886         flag_dump_noaddr and flag_dump_unnumbered.
1887
1888 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1889
1890         * wide-int-range.cc (wide_int_range_abs): New.
1891         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1892         * wide-int-range.h (wide_int_range_abs): New.
1893         (wide_int_range_min_max): New.
1894         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1895         case to call wide_int_range_abs.
1896         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1897         (extract_range_from_abs_expr): Delete.
1898
1899 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1900
1901         PR target/87033
1902         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1903         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1904         for indexed loads.
1905
1906 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1907             Jeff Law <law@redhat.com>
1908
1909         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1910         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1911
1912 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1913
1914         PR other/84889
1915         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1916         (decl_attributes): Likewise.
1917         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1918         instance.
1919         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1920         * diagnostic-core.h (class auto_diagnostic_group): New class.
1921         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1922         (diagnostic_report_diagnostic): Handle the first diagnostics within
1923         a group.
1924         (emit_diagnostic): Add auto_diagnostic_group instance.
1925         (inform): Likewise.
1926         (inform_n): Likewise.
1927         (warning): Likewise.
1928         (warning_at): Likewise.
1929         (warning_n): Likewise.
1930         (pedwarn): Likewise.
1931         (permerror): Likewise.
1932         (error): Likewise.
1933         (error_n): Likewise.
1934         (error_at): Likewise.
1935         (sorry): Likewise.
1936         (fatal_error): Likewise.
1937         (internal_error): Likewise.
1938         (internal_error_no_backtrace): Likewise.
1939         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1940         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1941         * diagnostic.h (struct diagnostic_context): Add fields
1942         "diagnostic_group_nesting_depth",
1943         "diagnostic_group_emission_count", "begin_group_cb",
1944         "end_group_cb".
1945         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1946         Add auto_diagnostic_group instance(s).
1947         (find_explicit_erroneous_behavior): Likewise.
1948         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1949         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1950         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1951         (gimplify_va_arg_expr): Likewise.
1952         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1953         (HSA_SORRY_AT): Likewise.
1954         * ipa-devirt.c (compare_virtual_tables): Likewise.
1955         (warn_odr): Likewise.
1956         * multiple_target.c (expand_target_clones): Likewise.
1957         * opts-common.c (cmdline_handle_error): Likewise.
1958         * reginfo.c (globalize_reg): Likewise.
1959         * substring-locations.c (format_warning_n_va): Likewise.
1960         * tree-inline.c (expand_call_inline): Likewise.
1961         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1962         * tree-ssa-loop-niter.c
1963         (do_warn_aggressive_loop_optimizations): Likewise.
1964         * tree-ssa-uninit.c (warn_uninit): Likewise.
1965         * tree.c (warn_deprecated_use): Likewise.
1966
1967 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1968
1969         PR target/87014
1970         * config/i386/i386.md (eh_return): Always update EH return
1971         address in word_mode.
1972
1973 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
1974
1975         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1976         TARGET_SPLIT_COMPLEX_ARG is defined.
1977
1978 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1979
1980         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1981
1982 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1983
1984         PR target/86984
1985         * expr.c (expand_assignment): Assert that bitpos is positive.
1986         (store_field): Likewise
1987         (expand_expr_real_1): Make sure that bitpos is positive.
1988         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1989         integer overflow.
1990
1991 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1992
1993         * Makefile.in (CPP_ID_DATA_H): Delete.
1994         (CPP_INTERNAL_H): Don't add it.
1995         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1996         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1997
1998 2018-08-20  Richard Biener  <rguenther@suse.de>
1999
2000         PR tree-optimization/78655
2001         * tree-vrp.c (extract_range_from_binary_expr_1): Make
2002         pointer + offset nonnull if either operand is nonnull work.
2003
2004 2018-08-20  Tom de Vries  <tdevries@suse.de>
2005
2006         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2007         unless the referenced die describes the added property using
2008         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
2009         Otherwise, add a DW_AT_location to the referenced die.
2010
2011 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
2012
2013         PR target/86994
2014         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2015         register_operand when calling ix86_set_reg_reg_cost.
2016         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2017         Set *total to 0 for operands that satisfy x86_64_immediate_operand
2018         predicate and to 1 otherwise.
2019
2020 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2021
2022         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2023         emit a diagnostic that it is not supported and reset the option.
2024         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2025         supported and consume the option.  (ASM_FINAL_SPEC): New.
2026
2027 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2028
2029         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2030         a sentence.
2031
2032 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
2033
2034         C-SKY port: Documentation
2035
2036         * doc/extend.texi (C-SKY Function Attributes): New section.
2037         * doc/invoke.texi (Option Summary): Add C-SKY options.
2038         (C-SKY Options): New section.
2039         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2040
2041 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2042             Huibin Wang  <huibin_wang@c-sky.com>
2043             Sandra Loosemore  <sandra@codesourcery.com>
2044             Chung-Lin Tang  <cltang@codesourcery.com>
2045
2046         C-SKY port: Backend implementation
2047
2048         * config/csky/*: New.
2049         * common/config/csky/*: New.
2050
2051 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2052             Huibin Wang  <huibin_wang@c-sky.com>
2053             Sandra Loosemore  <sandra@codesourcery.com>
2054             Chung-Lin Tang  <cltang@codesourcery.com>
2055             Andrew Jenner  <andrew@codesourcery.com>
2056
2057         C-SKY port: Configury
2058
2059         * config.gcc (csky-*-*): New.
2060         * configure.ac: Add csky to targets for dwarf2 debug_line support.
2061         * configure: Regenerated.
2062
2063 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
2064
2065         * dump-context.h: Include "dumpfile.h".
2066         (dump_context::dump_printf_va): Convert final param from va_list
2067         to va_list *.  Convert from ATTRIBUTE_PRINTF to
2068         ATTRIBUTE_GCC_DUMP_PRINTF.
2069         (dump_context::dump_printf_loc_va): Likewise.
2070         * dumpfile.c: Include "stringpool.h".
2071         (make_item_for_dump_printf_va): Delete.
2072         (make_item_for_dump_printf): Delete.
2073         (class dump_pretty_printer): New class.
2074         (dump_pretty_printer::dump_pretty_printer): New ctor.
2075         (dump_pretty_printer::emit_items): New member function.
2076         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2077         function.
2078         (dump_pretty_printer::emit_item): New member function.
2079         (dump_pretty_printer::stash_item): New member function.
2080         (dump_pretty_printer::format_decoder_cb): New member function.
2081         (dump_pretty_printer::decode_format): New member function.
2082         (dump_context::dump_printf_va): Reimplement in terms of
2083         dump_pretty_printer.
2084         (dump_context::dump_printf_loc_va): Convert final param from va_list
2085         to va_list *.
2086         (dump_context::begin_scope): Reimplement call to
2087         make_item_for_dump_printf.
2088         (dump_printf): Update for change to dump_printf_va.
2089         (dump_printf_loc): Likewise.
2090         (selftest::test_capture_of_dump_calls): Convert "stmt" from
2091         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
2092         with %T, %E, and %G.
2093         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2094         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2095         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2096         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2097         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2098         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2099         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2100         within a dump_printf_loc call to "%wu".
2101         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2102         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
2103         missing space after "=".
2104         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2105         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2106         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2107         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2108         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
2109         duplicate "vectorized" from message.
2110
2111 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2112
2113         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2114         polyNxK_t element's TYPE_STRING_FLAG.
2115
2116 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2117
2118         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2119         (they were unnamed before).  Fix comments.
2120
2121 2018-08-17  Nathan Sidwell  <nathan@acm.org>
2122
2123         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2124
2125 2018-08-17  Richard Biener  <rguenther@suse.de>
2126
2127         PR tree-optimization/86841
2128         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2129
2130 2018-08-17  Martin Liska  <mliska@suse.cz>
2131
2132         * common.opt: Remove Warn, Init and Report for options with
2133         Ignore/Deprecated flag. Warning is done automatically for
2134         Deprecated flags.
2135         * config/i386/i386.opt: Likewise.
2136         * config/ia64/ia64.opt: Likewise.
2137         * config/rs6000/rs6000.opt: Likewise.
2138         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2139         Remove usage of flag_check_pointer_bounds.
2140         * lto-wrapper.c (merge_and_complain): Do not handle
2141         OPT_fcheck_pointer_bounds.
2142         (append_compiler_options): Likewise.
2143         * opt-functions.awk: Do not handle Deprecated.
2144         * optc-gen.awk: Check that Var, Report and Init are not
2145         used for an option with Ignore/Deprecated flag.
2146         * opts-common.c (decode_cmdline_option): Do not report
2147         CL_ERR_DEPRECATED.
2148         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2149         options.
2150         * opts.h (struct cl_option): Remove cl_deprecated flag.
2151         (CL_ERR_DEPRECATED): Remove error enum value.
2152
2153 2018-08-17  Richard Biener  <rguenther@suse.de>
2154
2155         PR middle-end/86505
2156         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2157         across a va-arg-pack using call adjust its return value accordingly.
2158
2159 2018-08-16  Martin Sebor  <msebor@redhat.com>
2160
2161         PR tree-optimization/86853
2162         * gimple-ssa-sprintf.c (struct format_result): Rename member.
2163         (struct fmtresult): Add member and initialize it in ctors.
2164         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
2165         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
2166         (format_directive): Set POSUNDER4K when MAYFAIL is set.
2167         (parse_directive): Handle %C same as %c.
2168         (sprintf_dom_walker::compute_format_length): Adjust.
2169         (is_call_safe): Adjust.
2170
2171 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2172
2173         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
2174         for determining how to count the elements.
2175         * builtins.h (c_strlen): Adjust prototype.
2176         * expr.c (string_constant): Add new parameter mem_size.
2177         Set *mem_size appropriately.
2178         * expr.h (string_constant): Adjust protoype.
2179         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2180         * gimple-fold.h (get_range_strlen): Adjust prototype.
2181         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2182         (format_string): Call get_string_length with eltsize.
2183
2184 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2185
2186         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2187         to emit the span, rather than setting it as the prefix.
2188
2189 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2190
2191         * diagnostic-show-locus.c (layout::start_annotation_line): Add
2192         "margin_char" parameter, defaulting to space.  Use it in place
2193         of pp_space for the initial part of the margin.
2194         (layout::print_leading_fixits): Use '+' when filling the margin
2195         of line-insertion fix-it hints.
2196
2197 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2198
2199         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2200         Delete.
2201
2202 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2203
2204         * config/rs6000/altivec.md: Don't set length attribute to the default
2205         value.
2206         * config/rs6000/darwin.md: Ditto.
2207         * config/rs6000/dfp.md: Ditto.
2208         * config/rs6000/htm.md: Ditto.
2209         * config/rs6000/rs6000.md: Ditto.
2210         * config/rs6000/sync.md: Ditto.
2211         * config/rs6000/vsx.md: Ditto.
2212
2213 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2214
2215         * config/rs6000/altivec.md: Don't set length attribute to the default
2216         value, for branch instructions.
2217         * config/rs6000/darwin.md: Ditto.
2218         * config/rs6000/rs6000.md: Ditto.
2219
2220 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2221
2222         * config/rs6000/rs6000.md (length): Always define as const_int 4.
2223         (unnamed conditional branch define_insn): Set length to 4 or 8
2224         depending on offset.
2225         (<bd>_<mode>): Similar, for alternative 0.
2226         (<bd>tf_<mode>): Ditto.
2227
2228 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2229
2230         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2231
2232 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
2233
2234         * doc/rtl.texi: Replace old RTX class names with new names.
2235
2236
2237 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
2238
2239         * expmed.h (canonicalize_comparison): New declaration.
2240         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2241         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2242         * optabs.c (prepare_cmp_insn): Likewise.
2243         * rtl.h (unsigned_condition_p): New function which checks if a
2244         comparison operator is unsigned.
2245
2246 2018-08-16  Nathan Sidwell  <nathan@acm.org>
2247
2248         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2249         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2250
2251 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2252
2253         PR target/84711
2254         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2255         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2256         (mov<mov>): ..this and enable unconditionally.
2257
2258 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2259
2260         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2261
2262 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
2263
2264         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2265         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2266         "Common" with "Target".
2267
2268 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2269
2270         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2271         * doc/invoke.texi (mmitigate-rop): Remove.
2272         * config/i386/i386.c: Do not include "regrename.h".
2273         (ix86_rop_should_change_byte_p, reg_encoded_number)
2274         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2275         Remove.
2276         (ix86_reorg): Remove call to ix86_mitigate_rop.
2277         * config/i386/i386.md (attr "modrm_class"): Remove.
2278         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2279         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2280         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2281
2282 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2283
2284         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2285         allow folding of mergeh() and mergel() for the float and double types.
2286         (fold_mergehl_helper): Rework to handle building a permute tree
2287         for float vectors.
2288
2289 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2290
2291         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2292         for TARGET_SSE.
2293
2294 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2295
2296         * common.opt (fdiagnostics-show-labels): New option.
2297         * diagnostic-show-locus.c (class layout_range): Add field
2298         "m_label".
2299         (class layout): Add field "m_show_labels_p".
2300         (layout_range::layout_range): Add param "label" and use it to
2301         initialize m_label.
2302         (make_range): Pass in NULL for new "label" param of layout_range's
2303         ctor.
2304         (layout::layout): Initialize m_show_labels_p.
2305         (layout::maybe_add_location_range): Pass in loc_range->m_label
2306         when constructing layout_range instances.
2307         (struct line_label): New struct.
2308         (layout::print_any_labels): New member function.
2309         (layout::print_line): Call it if label-printing is enabled.
2310         (selftest::test_one_liner_labels): New test.
2311         (selftest::test_diagnostic_show_locus_one_liner): Call it.
2312         * diagnostic.c (diagnostic_initialize): Initialize
2313         context->show_labels_p.
2314         * diagnostic.h (struct diagnostic_context): Add field
2315         "show_labels_p".
2316         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2317         -fno-diagnostics-show-labels.
2318         * dwarf2out.c (gen_producer_string): Add
2319         OPT_fdiagnostics_show_labels to the ignored options.
2320         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2321         param.
2322         (gcc_rich_location::maybe_add_expr): Likewise.
2323         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2324         label" param, defaulting to NULL.
2325         (gcc_rich_location::add_expr): Add "label" param.
2326         (gcc_rich_location::maybe_add_expr): Likewise.
2327         (class text_range_label): New class.
2328         (class range_label_for_type_mismatch): New class.
2329         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2330         of format_warning_va.
2331         (fmtwarn_n): Likewise for new params of format_warning_n_va.
2332         * lto-wrapper.c (merge_and_complain): Add
2333         OPT_fdiagnostics_show_labels to the "pick one setting" options.
2334         (append_compiler_options): Likewise to the dropped options.
2335         (append_diag_options): Likewise to the passed-on options.
2336         * opts.c (common_handle_option): Handle the new option.
2337         * selftest-diagnostic.c
2338         (test_diagnostic_context::test_diagnostic_context): Enable
2339         show_labels_p.
2340         * substring-locations.c: Include "gcc-rich-location.h".
2341         (format_warning_n_va): Add "fmt_label" and "param_label" params
2342         and use them as appropriate.
2343         (format_warning_va): Add "fmt_label" and "param_label" params,
2344         passing them on to format_warning_n_va.
2345         (format_warning_at_substring): Likewise.
2346         (format_warning_at_substring_n): Likewise.
2347         * substring-locations.h (format_warning_va): Add "fmt_label" and
2348         "param_label" params.
2349         (format_warning_n_va): Likewise.
2350         (format_warning_at_substring): Likewise.
2351         (format_warning_at_substring_n): Likewise.
2352         * toplev.c (general_init): Initialize global_dc->show_labels_p.
2353
2354 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
2355
2356         PR testsuite/86519
2357         * builtins.c (expand_builtin_memcmp): Do not expand the call
2358         when overflow is detected.
2359
2360 2018-08-15  Martin Sebor  <msebor@redhat.com>
2361
2362         PR tree-optimization/71625
2363         * config/aarch64/aarch64-builtins.c
2364         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2365
2366 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
2367
2368         * config/s390/s390.c (s390_reorg): Remove loop.
2369
2370 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2371
2372         * config/darwin.c
2373          (darwin_function_switched_text_sections): Delete.
2374         * gcc/config/darwin.h
2375          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2376
2377 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2378
2379         PR target/81685
2380         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2381         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
2382         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2383
2384 2018-08-15  Martin Liska  <mliska@suse.cz>
2385
2386         PR tree-optimization/86925
2387         * predict.c (expr_expected_value_1): When taking
2388         later predictor, assign also probability.
2389         Use fold_build2_initializer_loc in order to fold
2390         the expression in -frounding-math.
2391
2392 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
2393
2394         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2395         patterns.
2396         (expand_vec_perm_1): Try the new method.
2397
2398 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2399
2400         PR target/86547
2401         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2402         Check whether lra_live_max_point is 0 before dividing.
2403
2404 2018-08-14  Martin Sebor  <msebor@redhat.com>
2405
2406         PR tree-optimization/86650
2407         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2408         (vrp_prop::check_mem_ref): Same.
2409
2410 2018-08-13  Liu Hao <lh_mouse@126.com>
2411
2412         * pretty-print.c (eat_esc_sequence): Swap the foreground and
2413         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2414         and clear it thereafter, as it only works for DBCS.
2415
2416 2018-08-13  Liu Hao <lh_mouse@126.com>
2417
2418         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2419         handle returned by _get_osf_handle().
2420
2421 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2422
2423         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2424         for folding vec_perm.
2425
2426 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2427
2428         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2429         Add support for gimple-folding of vec_pack() and vec_unpack()
2430         intrinsics.
2431
2432 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
2433
2434         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2435         vec_xst variants to the list.
2436         (rs6000_gimple_fold_builtin): Add support for folding unaligned
2437         vector loads and stores.
2438
2439 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
2440
2441         * config.gcc (rs6000-ibm-aix4.x): Delete.
2442         (rs6000-ibm-aix5.1): Delete.
2443         (rs6000-ibm-aix5.2): Delete.
2444         (rs6000-ibm-aix5.3): Delete.
2445         * config/rs6000/aix43.h: Delete.
2446         * config/rs6000/aix51.h: Delete.
2447         * config/rs6000/aix52.h: Delete.
2448         * config/rs6000/t-aix43: Delete.
2449
2450 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
2451
2452         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2453         New function.
2454         (s390_decompose_address): Factor out constant pool ref
2455         decomposition.
2456
2457 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2458
2459         * config/nds32/nds32-predicates.c
2460         (nds32_can_use_bclr_p): Change return type as bool.
2461         (nds32_can_use_bset_p): Ditto.
2462         (nds32_can_use_btgl_p): Ditto.
2463         (nds32_can_use_bitci_p): Ditto.
2464         * config/nds32/nds32-protos.h
2465         (nds32_can_use_bclr_p): Change declaration.
2466         (nds32_can_use_bset_p): Ditto.
2467         (nds32_can_use_btgl_p): Ditto.
2468         (nds32_can_use_bitci_p): Ditto.
2469
2470 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2471
2472         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2473         Support -msched-prolog-epilog option.
2474         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2475
2476 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2477
2478         * common/config/nds32/nds32-common.c
2479         (nds32_option_optimization_table): Enalbe -malways-align.
2480
2481 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2482
2483         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2484         extra_headers.
2485         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2486         OPT_misr_secure_ case.
2487         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2488         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2489         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2490         secure attribute.
2491         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2492         (nds32_isr_info): New field security_level.
2493         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2494         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2495         * config/nds32/nds32.opt (misr-secure): New option.
2496         * config/nds32/nds32_init.inc: New file.
2497         * config/nds32/nds32_isr.h: New file.
2498
2499 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2500
2501         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2502         Update comment for atomic instructions.
2503         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2504         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2505         Remove.
2506         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2507         load for __ATOMIC_SEQ_CST model.
2508         (atomic_loaddi_1): Remove float register target.
2509         (atomic_storedi): Handle CONST_INT values.
2510         (atomic_storedi_1): Remove float register source.  Add special case
2511         for zero value.
2512         (memory_barrier): New expander and insn.
2513
2514 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2515
2516         PR tree-optimization/86835
2517         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2518         new_stmt after def_gsi, make sure to insert new_square_stmt after
2519         that stmt, not 2 stmts before it.
2520
2521 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2522
2523         PR target/82418
2524         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2525         instead of SWI48.
2526
2527 2018-08-10  Martin Liska  <mliska@suse.cz>
2528
2529         PR target/83610
2530         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2531         function type.
2532         * builtins.c (expand_builtin_expect_with_probability):
2533         New function.
2534         (expand_builtin_expect_with_probability): New function.
2535         (build_builtin_expect_predicate): Add new argumnet probability
2536         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2537         (fold_builtin_expect):
2538         (fold_builtin_2):
2539         (fold_builtin_3):
2540         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2541         * builtins.h (fold_builtin_expect): Set new argument.
2542         * doc/extend.texi: Document __builtin_expect_with_probability.
2543         * doc/invoke.texi: Likewise.
2544         * gimple-fold.c (gimple_fold_call): Pass new argument.
2545         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2546         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2547         * predict.c (get_predictor_value): New function.
2548         (expr_expected_value): Add new argument probability. Assume
2549         that predictor and probability are always non-null.
2550         (expr_expected_value_1): Likewise.  For __builtin_expect and
2551         __builtin_expect_with_probability set probability.  Handle
2552         combination in binary expressions.
2553         (tree_predict_by_opcode): Simplify code by simply calling
2554         get_predictor_value.
2555         (pass_strip_predict_hints::execute): Add handling of
2556         BUILT_IN_EXPECT_WITH_PROBABILITY.
2557         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2558         new predictor.
2559         * tree.h (DECL_BUILT_IN_P): New function.
2560
2561 2018-08-10  Martin Liska  <mliska@suse.cz>
2562
2563         PR tree-optimization/85799
2564         * passes.def: Add argument for pass_strip_predict_hints.
2565         * predict.c (class pass_strip_predict_hints): Add new argument
2566         early_p.
2567         (strip_predictor_early): New function.
2568         (pass_strip_predict_hints::execute): Call the function to
2569         strip predictors.
2570         (strip_predict_hints): New function.
2571         * predict.def: Fix comment.
2572
2573 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2574
2575         * Makefile.in: Clarify which tm.texi to copy over to assert the
2576         right to grant a GFDL license for all.
2577
2578 2018-08-09  Jeff Law  <law@redhat.com>
2579
2580         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2581         unused variable.
2582
2583 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2584
2585         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2586         prototype.
2587
2588 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2589
2590         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2591         reductions for variable-length vectors.
2592
2593 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2594
2595         PR other/84889
2596         * common.opt (fdiagnostics-show-line-numbers): New option.
2597         * diagnostic-show-locus.c (class layout): Add fields
2598         "m_show_line_numbers_p" and "m_linenum_width";
2599         (num_digits): New function.
2600         (test_num_digits): New function.
2601         (layout::layout): Initialize new fields.  Update m_x_offset
2602         logic to handle any left margin.
2603         (layout::print_source_line): Print line number when requested.
2604         (layout::start_annotation_line): New member function.
2605         (layout::print_annotation_line): Call it.
2606         (layout::print_leading_fixits): Likewise.
2607         (layout::print_trailing_fixits): Likewise.  Update calls to
2608         move_to_column for new parameter.
2609         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2610         it to potentially call start_annotation_line.
2611         (layout::show_ruler): Call start_annotation_line.
2612         (selftest::test_line_numbers_multiline_range): New selftest.
2613         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2614         and selftest::test_line_numbers_multiline_range.
2615         * diagnostic.c (diagnostic_initialize): Initialize
2616         show_line_numbers_p.
2617         * diagnostic.h (struct diagnostic_context): Add field
2618         "show_line_numbers_p".
2619         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2620         -fno-diagnostics-show-line-numbers.
2621         * dwarf2out.c (gen_producer_string): Add
2622         OPT_fdiagnostics_show_line_numbers to the ignored options.
2623         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2624         one setting" options.
2625         (append_compiler_options): Likewise to the dropped options.
2626         (append_diag_options): Likewise to the passed-on options.
2627         * opts.c (common_handle_option): Handle the new option.
2628         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2629
2630 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2631
2632         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2633         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2634         third argument of type "const signed char" to descriptions of
2635         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2636         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2637         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2638         __builtin_bcdsub_ov functions.
2639
2640 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2641
2642         PR tree-optimization/86858
2643         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2644         flow_bb_inside_loop_p calls.
2645
2646 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2647
2648         PR tree-optimization/86871
2649         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2650         instead of gimple_assign_lhs.
2651
2652 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2653
2654         PR target/86887
2655         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2656         register constraint to operand 0.
2657         (add<mode>3_carryinC): Likewise.
2658         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2659
2660 2018-08-09  Martin Liska  <mliska@suse.cz>
2661
2662         PR c/86895
2663         * common.opt: Remove extra line.
2664
2665 2018-08-09  Martin Liska  <mliska@suse.cz>
2666
2667         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2668         at the end of a line, make first letter capital and end up
2669         a sentence with a dot.
2670         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2671         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2672         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2673         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2674         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2675         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2676         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2677         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2678         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2679         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2680         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2681         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2682         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2683         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2684         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2685         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2686         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2687         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2688
2689 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2690
2691         PR target/84332
2692         * config/s390/s390.c (s390_option_override_internal): Reduce the
2693         stack-clash-protection-probe-interval param if it would be too big
2694         for z900.
2695
2696 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2697
2698         PR target/46179
2699         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2700         * config/m68k/m68k.c (handle_move_double): Don't call
2701         m68k_final_prescan_insn.
2702         (m68k_adjust_decorated_operand): Renamed from
2703         m68k_final_prescan_insn, remove first and third operand and
2704         simplify.
2705         (print_operand): Call it.
2706         (print_operand_address): Call it.
2707
2708 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2709
2710         * diagnostic.c (diagnostic_report_current_module): Use
2711         linemap_included_from & linemap_included_from_linemap.
2712
2713 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2714
2715         * config/aarch64/aarch64-cores.def: Add phecda core.
2716         * config/aarch64/aarch64-tune.md: Regenerate.
2717         * doc/invoke.texi: Add phecda core.
2718
2719 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2720
2721         PR target/85295
2722         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2723         definitions.
2724         * config/s390/s390.md ("movti"): Add more alternatives for
2725         constant to GPR copies.
2726
2727 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2728
2729         * config/s390/s390.c: Fix whitespace damage throughout the file.
2730         * config/s390/s390.h: Likewise.
2731         * config/s390/tpf.h: Likewise.
2732
2733 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2734
2735         * config/s390/s390.c (s390_loadrelative_operand_p):
2736         Remove TARGET_CPU_ZARCH usages.
2737         (s390_rtx_costs): Likewise.
2738         (s390_legitimate_constant_p): Likewise.
2739         (s390_cannot_force_const_mem): Likewise.
2740         (legitimate_reload_constant_p): Likewise.
2741         (s390_preferred_reload_class): Likewise.
2742         (legitimize_pic_address): Likewise.
2743         (legitimize_tls_address): Likewise.
2744         (s390_split_branches): Removed.
2745         (s390_add_execute): Removed.
2746         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2747         (s390_mainpool_start): Likewise.
2748         (s390_mainpool_finish): Likewise.
2749         (s390_mainpool_cancel): Removed.
2750         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2751         (s390_chunkify_cancel): Likewise.
2752         (s390_return_addr_rtx): Likewise.
2753         (s390_register_info): Remove split_branches_pending_p uages.
2754         (s390_optimize_register_info): Likewise.
2755         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2756         split_branches_pending_p usages.
2757         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2758         (s390_load_got): Likewise.
2759         (s390_expand_split_stack_prologue): Likewise.
2760         (output_asm_nops): Likewise.
2761         (s390_function_profiler): Likewise.
2762         (s390_emit_call): Likewise.
2763         (s390_conditional_register_usage): Likewise.
2764         (s390_optimize_prologue): Likewise.
2765         (s390_reorg): Remove TARGET_CPU_ZARCH and
2766         split_branches_pending_p usages.
2767         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2768         usages.
2769         (s390_output_indirect_thunk_function): Likewise.
2770         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2771         (TARGET_CPU_ZARCH_P): Removed.
2772         (struct machine_function): Remove split_branches_pending_p.
2773         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2774
2775 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2776
2777         * common/config/s390/s390-common.c (processor_flags_table):
2778         Remove flags.
2779         * config.gcc: Remove with_arch/with_tune support.
2780         * config/s390/2064.md: Remove cpu attribute comparisons.
2781         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2782         Remove MTN.
2783         * config/s390/linux.h (ASM_SPEC):
2784         Remove -march support.
2785         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2786         Use a table to get an arch level.
2787         * config/s390/s390-opts.h (enum processor_type):
2788         Remove enum values.
2789         * config/s390/s390.c
2790         (processor_table): Remove entries, add arch_level values.
2791         (s390_issue_rate): Remove cases.
2792         (s390_option_override): Adjust
2793         s390_option_override_internal() call.
2794         (s390_option_override_internal): Remove deprecation warning.
2795         (s390_valid_target_attribute_tree): Adjust
2796         s390_option_override_internal() call.
2797         * config/s390/s390.h (struct s390_processor):
2798         Share with s390-c.c, add arch_level field.
2799         * config/s390/s390.md:
2800         Remove occurrences in cpu attribute.
2801         * config/s390/s390.opt: Remove -march/-mtune support.
2802         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2803         * doc/invoke.texi: Remove deprecation warning.
2804
2805 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2806
2807         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2808         global.
2809         (qdf24xx_tunings): Set vector cost structure to
2810         qdf24xx_vector_cost.
2811
2812         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2813         <register_sextend>: Set to 3.
2814
2815 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2816
2817         PR target/86838
2818         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2819         * config/aarch64/aarch64-simd.md
2820         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2821         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2822         (aarch64_frecpx<mode>): ...this new pattern.
2823         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2824         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2825
2826 2018-08-07  Martin Liska  <mliska@suse.cz>
2827
2828         PR middle-end/83023
2829         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2830         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2831         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2832         * doc/extend.texi: Document that malloc attribute adds
2833         hit to compiler.
2834
2835 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2836
2837         PR target/86785
2838         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2839         Define to speculation_safe_value_not_needed.
2840
2841 2018-08-06  Jeff Law  <law@redhat.com>
2842
2843         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2844         the vr_values instance to cprop_into_stmt.
2845         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2846         (cprop_operand): Also query EVRP to determine if OP is a constant.
2847
2848 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2849
2850         * diagnostic.c (diagnostic_report_current_module): Reroll
2851         included-at loop.  Translate text.
2852
2853 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2854
2855         * function-tests.c (selftest::test_expansion_to_rtl): Call
2856         free_after_compilation.
2857
2858 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2859
2860         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2861
2862 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2863
2864         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2865         loops with memory block operations from getting unrolled.
2866
2867 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2868
2869         PR target/86807
2870         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2871         Define to speculation_safe_value_not_needed.
2872
2873 2018-08-06  Jeff Law  <law@redhat.com>
2874
2875         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2876         assert.
2877
2878 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2879
2880         PR target/86662
2881         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2882         with all enabled __intN types.
2883
2884         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2885
2886 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2887
2888         * alias.c (record_set): Check for clobber high.
2889         * cfgexpand.c (expand_gimple_stmt): Likewise.
2890         * combine-stack-adj.c (single_set_for_csa): Likewise.
2891         * combine.c (find_single_use_1): Likewise.
2892         (set_nonzero_bits_and_sign_copies): Likewise.
2893         (get_combine_src_dest): Likewise.
2894         (is_parallel_of_n_reg_sets): Likewise.
2895         (try_combine): Likewise.
2896         (record_dead_and_set_regs_1): Likewise.
2897         (reg_dead_at_p_1): Likewise.
2898         (reg_dead_at_p): Likewise.
2899         * dce.c (deletable_insn_p): Likewise.
2900         (mark_nonreg_stores_1): Likewise.
2901         (mark_nonreg_stores_2): Likewise.
2902         * df-scan.c (df_find_hard_reg_defs): Likewise.
2903         (df_uses_record): Likewise.
2904         (df_get_call_refs): Likewise.
2905         * dwarf2out.c (mem_loc_descriptor): Likewise.
2906         * haifa-sched.c (haifa_classify_rtx): Likewise.
2907         * ira-build.c (create_insn_allocnos): Likewise.
2908         * ira-costs.c (scan_one_insn): Likewise.
2909         * ira.c (equiv_init_movable_p): Likewise.
2910         (rtx_moveable_p): Likewise.
2911         (interesting_dest_for_shprep): Likewise.
2912         * jump.c (mark_jump_label_1): Likewise.
2913         * postreload-gcse.c (record_opr_changes): Likewise.
2914         * postreload.c (reload_cse_simplify): Likewise.
2915         (struct reg_use): Add source expr.
2916         (reload_combine): Check for clobber high.
2917         (reload_combine_note_use): Likewise.
2918         (reload_cse_move2add): Likewise.
2919         (move2add_note_store): Likewise.
2920         * print-rtl.c (print_pattern): Likewise.
2921         * recog.c (decode_asm_operands): Likewise.
2922         (store_data_bypass_p): Likewise.
2923         (if_test_bypass_p): Likewise.
2924         * regcprop.c (kill_clobbered_value): Likewise.
2925         (kill_set_value): Likewise.
2926         * reginfo.c (reg_scan_mark_refs): Likewise.
2927         * reload1.c (maybe_fix_stack_asms): Likewise.
2928         (eliminate_regs_1): Likewise.
2929         (elimination_effects): Likewise.
2930         (mark_not_eliminable): Likewise.
2931         (scan_paradoxical_subregs): Likewise.
2932         (forget_old_reloads_1): Likewise.
2933         * reorg.c (find_end_label): Likewise.
2934         (try_merge_delay_insns): Likewise.
2935         (redundant_insn): Likewise.
2936         (own_thread_p): Likewise.
2937         (fill_simple_delay_slots): Likewise.
2938         (fill_slots_from_thread): Likewise.
2939         (dbr_schedule): Likewise.
2940         * resource.c (update_live_status): Likewise.
2941         (mark_referenced_resources): Likewise.
2942         (mark_set_resources): Likewise.
2943         * rtl.c (copy_rtx): Likewise.
2944         * rtlanal.c (reg_referenced_p): Likewise.
2945         (single_set_2): Likewise.
2946         (noop_move_p): Likewise.
2947         (note_stores): Likewise.
2948         * sched-deps.c (sched_analyze_reg): Likewise.
2949         (sched_analyze_insn): Likewise.
2950
2951 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2952
2953         * cse.c (invalidate_reg): New function extracted from...
2954         (invalidate): ...here.
2955         (canonicalize_insn): Check for clobber high.
2956         (invalidate_from_clobbers): invalidate clobber highs.
2957         (invalidate_from_sets_and_clobbers): Likewise.
2958         (count_reg_usage): Check for clobber high.
2959         (insn_live_p): Likewise.
2960         * cselib.c (cselib_expand_value_rtx_1):Likewise.
2961         (cselib_invalidate_regno): Check for clobber in setter.
2962         (cselib_invalidate_rtx): Pass through setter.
2963         (cselib_invalidate_rtx_note_stores):
2964         (cselib_process_insn): Check for clobber high.
2965         * cselib.h (cselib_invalidate_rtx): Add operand.
2966
2967 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2968
2969         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2970         (mark_not_eliminable): Likewise.
2971         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2972         * lra-lives.c (process_bb_lives): Check for clobber high.
2973         * lra.c (new_insn_reg): Remember clobber highs.
2974         (collect_non_operand_hard_regs): Check for clobber high.
2975         (lra_set_insn_recog_data): Likewise.
2976         (add_regs_to_insn_regno_info): Likewise.
2977         (lra_update_insn_regno_info): Likewise.
2978
2979 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2980
2981         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2982         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2983
2984 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2985
2986         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2987         (copy_insn_1): Likewise.
2988         (gen_hard_reg_clobber_high): New gen function.
2989         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2990         * genemit.c (gen_exp): Likewise.
2991         (gen_emit_seq): Pass through info.
2992         (gen_insn): Check for CLOBBER_HIGH.
2993         (gen_expand): Pass through info.
2994         (gen_split): Likewise.
2995         (output_add_clobbers): Likewise.
2996         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2997         (remove_clobbers): Likewise.
2998         * rtl.h (gen_hard_reg_clobber_high): New declaration.
2999
3000 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3001
3002         * doc/rtl.texi (clobber_high): Add.
3003         (parallel): Add in clobber high
3004         * rtl.c (rtl_check_failed_code3): Add function.
3005         * rtl.def (CLOBBER_HIGH): Add expression.
3006         * rtl.h (RTL_CHECKC3): Add macro.
3007         (rtl_check_failed_code3): Add declaration.
3008         (XC3EXP): Add macro.
3009
3010 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
3011
3012         PR target/86386
3013         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3014         cfun->machine->max_used_stack_alignment if needed.
3015
3016 2018-08-04  Martin Sebor  <msebor@redhat.com>
3017
3018         PR tree-optimization/86571
3019         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3020         NaN output to 4.
3021
3022 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3023
3024         PR target/86799
3025         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3026         Define.
3027
3028 2018-08-03  Jeff Law  <law@redhat.com>
3029
3030         PR target/86795
3031         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3032         Define to speculation_safe_value_not_needed.
3033
3034 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
3035
3036         * doc/gcov.texi (-x): Remove duplicate "to".
3037         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3038         (-Wif-not-aligned): Remove duplicate "is".
3039         (-flto): Remove duplicate "the".
3040         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3041         duplicate "v5.00.b".
3042         (MSP430 Options): Remove duplicate "and" from the description
3043         of "-mgprel-sec=regexp".
3044         (x86 Options): Remove duplicate copies of "vmldLog102" and
3045         vmlsLog104 from description of "-mveclibabi=type".
3046
3047 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
3048
3049         * internal-fn.h (first_commutative_argument): Declare.
3050         * internal-fn.c (first_commutative_argument): New function.
3051         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3052         restrictions for pattern statements.  Use first_commutative_argument
3053         to look for commutative operands in calls to internal functions.
3054
3055 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
3056
3057         * Makefile.in (wide-int-range.o): New.
3058         * tree-vrp.c: Move all the wide_int_* functions to...
3059         * wide-int-range.cc: ...here.
3060         * tree-vrp.h: Move all the wide_int_* prototypes to...
3061         * wide-int-range.h: ...here.
3062
3063 2018-08-03  Tom de Vries  <tdevries@suse.de>
3064
3065         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3066         UI_NONE.
3067         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3068         * except.c (output_function_exception_table): Do early exit if
3069         targetm_common.except_unwind_info (&global_options) == UI_NONE.
3070
3071 2018-08-03  Martin Liska  <mliska@suse.cz>
3072
3073         * predict.c (dump_prediction): Change to 2 digits
3074         in fraction part.
3075
3076 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3077
3078         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3079         neon_dup_q to...
3080         (falkor_am_1_gtov_gtov): ... a new insn reservation.
3081
3082 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3083
3084         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3085         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3086         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3087         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3088         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3089
3090 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3091
3092         * diagnostic-show-locus.c (diagnostic_show_locus): Use
3093         pp_take_prefix when saving the existing prefix.
3094         * diagnostic.c (diagnostic_append_note): Likewise.
3095         * langhooks.c (lhd_print_error_function): Likewise.
3096         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3097         param's type.  Free the existing prefix.
3098         (pp_take_prefix): New function.
3099         (pretty_printer::pretty_printer): Drop the prefix parameter.
3100         Rename the length parameter to match the comment.
3101         (pretty_printer::~pretty_printer): Free the prefix.
3102         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3103         parameter.
3104         (struct pretty_printer): Drop the "const" from "prefix" field's
3105         type and clarify memory management.
3106         (pp_set_prefix): Drop the "const" from the 2nd param.
3107         (pp_take_prefix): New decl.
3108
3109 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3110
3111         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3112         for word_mode_ok here instead of passing as argument.
3113         (expand_block_compare): Change select_block_compare_mode() call.
3114         (expand_strncmp_gpr_sequence): New function.
3115         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3116
3117 2018-08-02  Jeff Law  <law@redhat.com>
3118
3119         PR target/86790
3120         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3121         Define to speculation_safe_value_not_needed.
3122
3123         PR target/86784
3124         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3125         Define to speculation_safe_value_not_needed.
3126
3127 2018-08-02  Tom de Vries  <tdevries@suse.de>
3128
3129         PR target/86660
3130         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3131         function.  Return UI_TARGET unconditionally.
3132         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3133         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3134
3135 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3136
3137         * genemit.c (print_overload_test): Fix typo.
3138
3139 2018-08-02  Richard Biener  <rguenther@suse.de>
3140
3141         PR tree-optimization/86816
3142         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3143         which checks for value availability before querying it.
3144         (gvn_uses_equal): Use it.
3145         (same_succ_hash): Likewise.
3146         (gimple_equal_p): Likewise.
3147
3148 2018-08-02  Nick Clifton  <nickc@redhat.com>
3149
3150         PR target/86813
3151         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3152         Define to speculation_safe_value_not_needed.
3153
3154         PR target/86810
3155         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3156         Define to speculation_safe_value_not_needed.
3157
3158         PR target/86810
3159         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3160         Define to speculation_safe_value_not_needed.
3161
3162         PR target/86803
3163         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3164         Define to speculation_safe_value_not_needed.
3165
3166         PR target/86797
3167         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3168         Define to speculation_safe_value_not_needed.
3169
3170         PR target/86791
3171         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3172         Define to speculation_safe_value_not_needed.
3173
3174         PR target/86789
3175         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3176         Define to speculation_safe_value_not_needed.
3177
3178         PR target/86787
3179         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3180         Define to speculation_safe_value_not_needed.
3181
3182         PR target/86782
3183         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3184         speculation_safe_value_not_needed.
3185
3186         PR target/86781
3187         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3188         to speculation_safe_value_not_needed.
3189
3190 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3191
3192         * doc/md.texi: Expand the documentation of instruction names
3193         to mention port-local uses.  Document '@' in pattern names.
3194         * read-md.h (overloaded_instance, overloaded_name): New structs.
3195         (mapping): Declare.
3196         (md_reader::handle_overloaded_name): New member function.
3197         (md_reader::get_overloads): Likewise.
3198         (md_reader::m_first_overload): New member variable.
3199         (md_reader::m_next_overload_ptr): Likewise.
3200         (md_reader::m_overloads_htab): Likewise.
3201         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3202         m_next_overload_ptr and m_overloads_htab.
3203         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3204         (get_mode_token, get_code_token, get_int_token): New functions.
3205         (map_attr_string): Add an optional argument that passes back
3206         the associated iterator.
3207         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3208         (md_reader::handle_overloaded_name, add_overload_instance): New
3209         functions.
3210         (apply_iterators): Handle '@' names.  Report an error if '@'
3211         is used without iterators.
3212         (initialize_iterators): Initialize the new iterator_group fields.
3213         * genopinit.c (handle_overloaded_code_for)
3214         (handle_overloaded_gen): New functions.
3215         (main): Use them to print declarations of maybe_code_for_* and
3216         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3217         * genemit.c (print_overload_arguments, print_overload_test)
3218         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3219         (main): Use it to print definitions of maybe_code_for_* and
3220         maybe_gen_* functions.
3221         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3222         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3223         instead of explicit mode checks.
3224         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3225         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3226         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3227         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3228         (aarch64_expand_compare_and_swap): Likewise
3229         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3230         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3231         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3232         (aarch64_constant_pool_reload_icode): Delete.
3233         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3234         instead of aarch64_constant_pool_reload_icode.  Use
3235         code_for_aarch64_reload_mov instead of explicit mode checks.
3236         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3237         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3238         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3239         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3240         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3241         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3242         (aarch64_atomic_load_op_code): Delete.
3243         (aarch64_emit_atomic_load_op): Likewise.
3244         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3245         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
3246         instead of aarch64_emit_atomic_load_op.
3247         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3248         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3249         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3250         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3251         character before the pattern name.
3252         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3253         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3254         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3255         (aarch64_frecps<mode>): Likewise.
3256         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3257         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3258         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3259         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3260         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3261
3262 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3263
3264         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3265         Allow HFmode constants if TARGET_FP_F16INST.
3266
3267 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
3268
3269         PR target/86014
3270         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3271         No longer check last store for clobber of address register.
3272
3273 2018-08-02  Martin Liska  <mliska@suse.cz>
3274
3275         PR gcov-profile/86817
3276         * gcov.c (process_all_functions): New function.
3277         (main): Call it.
3278         (process_file): Move functions processing to
3279         process_all_functions.
3280
3281 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3282
3283         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3284         "const" to the "gimple *" and "rtx_insn *" parameters.
3285         * dumpfile.h (dump_user_location_t::dump_user_location_t):
3286         Likewise.
3287         (dump_location_t::dump_location_t): Likewise.
3288
3289 2018-08-01  Martin Sebor  <msebor@redhat.com>
3290
3291         PR tree-optimization/86650
3292         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3293         rather than a "gcall *".  Directly pass the data of interest
3294         to percent_K_format, rather than building a temporary CALL_EXPR
3295         to hold it.
3296         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3297         (gimple_fold_builtin_strncat): Adjust.
3298         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3299         gcall* argument with gimple*.
3300         * gimple-ssa-warn-restrict.c (check_call): Same.
3301         (wrestrict_dom_walker::before_dom_children): Same.
3302         (builtin_access::builtin_access): Same.
3303         (check_bounds_or_overlap): Same
3304         (maybe_diag_overlap): Same.
3305         (maybe_diag_offset_bounds): Same.
3306         * tree-diagnostic.c (default_tree_printer): Move usage of
3307         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3308         to this callsite.
3309         * tree-pretty-print.c (percent_K_format): Add argument.
3310         * tree-pretty-print.h: Add argument.
3311         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3312         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3313         (maybe_diag_stxncpy_trunc): Same.
3314         (handle_builtin_stxncpy): Same.
3315         (handle_builtin_strcat): Same.
3316
3317 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3318
3319         * match.pd: Optimise pointer range checks.
3320
3321 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3322
3323         PR tree-optimization/86758
3324         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3325         to remove pattern statements.
3326
3327 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3328
3329         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3330         result of dfs_enumerate_from when constructing stmt_vec_infos,
3331         instead of additionally calling get_loop_body.
3332
3333 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3334
3335         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3336         parameter.
3337         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3338         When creating an iv, assert that the step is not known to be zero.
3339         (vect_setup_realignment): Update call accordingly.
3340         * tree-vect-stmts.c (vectorizable_store): Likewise.
3341         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
3342
3343 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3344
3345         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3346         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3347         (vectorizable_reduction): Likewise.
3348         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3349         (vect_detect_hybrid_slp_stmts): Likewise.
3350         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3351
3352 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
3353
3354         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3355         (wide_int_set_zero_nonzero_bits): ...this.
3356         (zero_nonzero_bits_from_vr): Rename to...
3357         (vrp_set_zero_nonzero_bits): ...this.
3358         (extract_range_from_multiplicative_op_1): Abstract wide int
3359         code...
3360         (wide_int_range_multiplicative_op): ...here.
3361         (extract_range_from_binary_expr_1): Extract wide int binary
3362         operations into their own functions.
3363         (wide_int_range_lshift): New.
3364         (wide_int_range_can_optimize_bit_op): New.
3365         (wide_int_range_shift_undefined_p): New.
3366         (wide_int_range_bit_xor): New.
3367         (wide_int_range_bit_ior): New.
3368         (wide_int_range_bit_and): New.
3369         (wide_int_range_trunc_mod): New.
3370         (extract_range_into_wide_ints): New.
3371         (vrp_shift_undefined_p): New.
3372         (extract_range_from_multiplicative_op): New.
3373         (vrp_can_optimize_bit_op): New.
3374         * tree-vrp.h (value_range::dump): New.
3375         (wide_int_range_multiplicative_op): New.
3376         (wide_int_range_lshift):New.
3377         (wide_int_range_shift_undefined_p): New.
3378         (wide_int_range_bit_xor): New.
3379         (wide_int_range_bit_ior): New.
3380         (wide_int_range_bit_and): New.
3381         (wide_int_range_trunc_mod): New.
3382         (zero_nonzero_bits_from_bounds): Rename to...
3383         (wide_int_set_zero_nonzero_bits): ...this.
3384         (zero_nonzero_bits_from_vr): Rename to...
3385         (vrp_set_zero_nonzero_bits): ...this.
3386         (range_easy_mask_min_max): Rename to...
3387         (wide_int_range_can_optimize_bit_op): this.
3388         * vr-values.c (simplify_bit_ops_using_ranges): Rename
3389         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3390
3391 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3392
3393         * tree-vectorizer.h (vect_orig_stmt): New function.
3394         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3395         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3396         (vect_create_epilog_for_reduction): Likewise.
3397         (vectorizable_live_operation): Likewise.
3398         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3399         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3400         * tree-vect-stmts.c (vectorizable_call): Likewise.
3401         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3402
3403 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3404
3405         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3406         argument.
3407         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3408         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3409         (vect_transform_loop): Likewise.
3410         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3411
3412 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3413
3414         * tree-vectorizer.h (vect_schedule_slp): Return void.
3415         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3416         (vect_schedule_slp): Likewise.
3417
3418 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3419
3420         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3421         argument.
3422         (vect_transform_loop): Update calls accordingly.  Schedule SLP
3423         instances before the main loop, if any exist.
3424
3425 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3426
3427         PR tree-optimization/86749
3428         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3429         If the lhs is used in a COND_EXPR, check that it is being used
3430         as the "then" or "else" value.
3431
3432 2018-08-01  Tom de Vries  <tdevries@suse.de>
3433
3434         PR target/86800
3435         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3436         speculation_safe_value_not_needed.
3437
3438 2018-08-01  Richard Biener  <rguenther@suse.de>
3439
3440         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3441         as base and offset.
3442
3443 2018-08-01  Martin Liska  <mliska@suse.cz>
3444
3445         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3446         format how successful transformation is dumped.
3447         (gimple_mod_pow2_value_transform): Likewise.
3448         (gimple_mod_subtract_transform): Likewise.
3449         (gimple_stringops_transform): Likewise.
3450
3451 2018-08-01  Martin Liska  <mliska@suse.cz>
3452
3453         PR value-prof/35543
3454         * value-prof.c (interesting_stringop_to_profile_p):
3455         Simplify the code and add BUILT_IN_MEMMOVE.
3456         (gimple_stringops_transform): Likewise.
3457
3458 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
3459
3460         * config/aarch64/aarch64-simd.md
3461         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3462         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3463         use GPI iterator instead of SI mode.
3464
3465 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3466
3467         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3468         rs6000_speculation_barrier.
3469         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3470         new barrier pattern name.
3471
3472 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3473
3474         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3475         (speculation_barrier): New insn.
3476
3477 2018-08-01  Richard Biener  <rguenther@suse.de>
3478
3479         PR bootstrap/86724
3480         * graphite.h: Include isl/id.h and isl/space.h to allow build
3481         with ISL 0.20.
3482
3483 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3484
3485         PR target/86651
3486         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3487         mode for COFF targets.
3488         * defaults.h (TARGET_COFF): Define.
3489         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3490         TARGET_COFF): Define.
3491         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3492         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3493         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3494
3495 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3496
3497         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3498         * gimple-streamer-out.c (output_bb): Save it.
3499         * lto-streamer-in.c (input_struct_function_base): Restore
3500         instance discriminator if available.  Create map on demand.
3501         * lto-streamer-out.c (output_struct_function_base): Save it if
3502         available.
3503         * final.c (decl_to_instance_map): Document LTO strategy.
3504
3505 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3506             Olivier Hainque  <hainque@adacore.com>
3507
3508         * debug.h (decl_to_instance_map_t): New type.
3509         (decl_to_instance_map): Declare.
3510         (maybe_create_decl_to_instance_map): New inline function.
3511         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3512         to track basic block discriminators.
3513         (final_start_function_1): Initialize them.
3514         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3515         bb_discriminator.
3516         (decl_to_instance_map): New variable.
3517         (map_decl_to_instance, maybe_set_discriminator): New functions.
3518         (notice_source_line): Set discriminator.
3519
3520 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3521
3522         * targhooks.c (default_have_speculation_safe_value): Add
3523         ATTRIBUTE_UNUSED.
3524
3525 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3526
3527         * dump-context.h: Include "pretty-print.h".
3528         (dump_context::refresh_dumps_are_enabled): New decl.
3529         (dump_context::emit_item): New decl.
3530         (class dump_context): Add fields "m_test_pp" and
3531         "m_test_pp_flags".
3532         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3533         (temp_dump_context::get_dumped_text): New decl.
3534         (class temp_dump_context): Add field "m_pp".
3535         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3536         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3537         m_test_pp.
3538         (set_dump_file): Update for above change.
3539         (set_alt_dump_file): Likewise.
3540         (dump_loc): New overload, taking a pretty_printer *.
3541         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3542         to any test pretty-printer.
3543         (make_item_for_dump_gimple_stmt): New function, adapted from
3544         optinfo::add_gimple_stmt.
3545         (dump_context::dump_gimple_stmt): Call it, and use the result,
3546         eliminating the direct usage of dump_file and alt_dump_file in
3547         favor of indirectly using them via emit_item.
3548         (make_item_for_dump_gimple_expr): New function, adapted from
3549         optinfo::add_gimple_expr.
3550         (dump_context::dump_gimple_expr): Call it, and use the result,
3551         eliminating the direct usage of dump_file and alt_dump_file in
3552         favor of indirectly using them via emit_item.
3553         (make_item_for_dump_generic_expr): New function, adapted from
3554         optinfo::add_tree.
3555         (dump_context::dump_generic_expr): Call it, and use the result,
3556         eliminating the direct usage of dump_file and alt_dump_file in
3557         favor of indirectly using them via emit_item.
3558         (make_item_for_dump_printf_va): New function, adapted from
3559         optinfo::add_printf_va.
3560         (make_item_for_dump_printf): New function.
3561         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3562         and use the result, eliminating the direct usage of dump_file and
3563         alt_dump_file in favor of indirectly using them via emit_item.
3564         (make_item_for_dump_dec): New function.
3565         (dump_context::dump_dec): Call it, and use the result,
3566         eliminating the direct usage of dump_file and alt_dump_file in
3567         favor of indirectly using them via emit_item.
3568         (make_item_for_dump_symtab_node): New function, adapted from
3569         optinfo::add_symtab_node.
3570         (dump_context::dump_symtab_node): Call it, and use the result,
3571         eliminating the direct usage of dump_file and alt_dump_file in
3572         favor of indirectly using them via emit_item.
3573         (dump_context::begin_scope): Reimplement, avoiding direct usage
3574         of dump_file and alt_dump_file in favor of indirectly using them
3575         via emit_item.
3576         (dump_context::emit_item): New member function.
3577         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3578         Set up test pretty-printer on the underlying context.  Call
3579         refresh_dumps_are_enabled.
3580         (temp_dump_context::~temp_dump_context): Call
3581         refresh_dumps_are_enabled.
3582         (temp_dump_context::get_dumped_text): New member function.
3583         (selftest::verify_dumped_text): New function.
3584         (ASSERT_DUMPED_TEXT_EQ): New macro.
3585         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3586         and then without optinfo enabled.  Add uses of
3587         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3588         * dumpfile.h: Update comment for the dump_* API.
3589         * optinfo-emit-json.cc
3590         (selftest::test_building_json_from_dump_calls): Update for new
3591         param for temp_dump_context ctor.
3592         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3593         and "m_owned" field.
3594         (optinfo_item::~optinfo_item): Likewise.
3595         (optinfo::add_item): New member function.
3596         (optinfo::emit): Update comment.
3597         (optinfo::add_string): Delete.
3598         (optinfo::add_printf): Delete.
3599         (optinfo::add_printf_va): Delete.
3600         (optinfo::add_gimple_stmt): Delete.
3601         (optinfo::add_gimple_expr): Delete.
3602         (optinfo::add_tree): Delete.
3603         (optinfo::add_symtab_node): Delete.
3604         (optinfo::add_dec): Delete.
3605         * optinfo.h (class dump_context): New forward decl.
3606         (optinfo::add_item): New decl.
3607         (optinfo::add_string): Delete.
3608         (optinfo::add_printf): Delete.
3609         (optinfo::add_printf_va): Delete.
3610         (optinfo::add_gimple_stmt): Delete.
3611         (optinfo::add_gimple_expr): Delete.
3612         (optinfo::add_tree): Delete.
3613         (optinfo::add_symtab_node): Delete.
3614         (optinfo::add_dec): Delete.
3615         (optinfo::add_poly_int): Delete.
3616         (optinfo_item::optinfo_item): Remove "owned" param.
3617         (class optinfo_item): Remove field "m_owned".
3618
3619 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3620
3621         PR middle-end/86705
3622         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3623         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3624         requested variable alignment.
3625         (expand_one_ssa_partition): Likewise.
3626         (expand_one_var): Likewise.
3627
3628 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3629
3630         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3631         to speculation_safe_value_not_needed.
3632
3633 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3634
3635         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3636         * targhooks.c (speculation_safe_value_not_needed): New function.
3637         * target.def (have_speculation_safe_value): Update documentation.
3638         * doc/tm.texi: Regenerated.
3639
3640 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3641
3642         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3643         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3644         expand.
3645         (despeculate_copy<ALLI:mode>_insn): New insn.
3646         (despeculate_copyti_insn): New insn.
3647         (despeculate_simple<ALLI:mode>): New insn
3648         (despeculate_simpleti): New insn.
3649         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3650         function.
3651         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3652         aarch64_speculation_safe_value.
3653         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3654
3655 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3656
3657         * config/aarch64/aarch64-speculation.cc: New file.
3658         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3659         before pass_reorder_blocks.
3660         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3661         prototype.
3662         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3663         X14 and X15 when tracking speculation.
3664         * config/aarch64/aarch64.md (register name constants): Add
3665         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3666         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3667         (speculation_barrier): New insn attribute.
3668         (cmp<mode>): Allow SP in comparisons.
3669         (speculation_tracker): New insn.
3670         (speculation_barrier): Add speculation_barrier attribute.
3671         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3672         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3673         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3674
3675 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3676
3677         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3678         aarch64_track_speculation is true.
3679         (tb<optab><mode>1): Likewise.
3680         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3681         generate CB[N]Z when tracking speculation.
3682         (aarch64_split_compare_and_swap): Likewise.
3683         (aarch64_split_atomic_op): Likewise.
3684
3685 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3686
3687         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3688
3689 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3690
3691         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3692         (speculation_barrier): New insn.
3693
3694 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3695
3696         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3697         * config/arm/arm.md (speculation_barrier): New expand.
3698         (speculation_barrier_insn): New pattern.
3699
3700 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3701
3702         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3703         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3704         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3705         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3706         list.
3707         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3708         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3709         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3710         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3711         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3712         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3713         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3714         * builtins.c (expand_speculation_safe_value): New function.
3715         (expand_builtin): Call it.
3716         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3717         * doc/extend.texi: Document __builtin_speculation_safe_value.
3718         * doc/md.texi: Document "speculation_barrier" pattern.
3719         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3720         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3721         * doc/tm.texi: Regenerated.
3722         * target.def (have_speculation_safe_value, speculation_safe_value): New
3723         hooks.
3724         * targhooks.c (default_have_speculation_safe_value): New function.
3725         (default_speculation_safe_value): New function.
3726         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3727         (default_speculation_safe_value): Add prototype.
3728
3729 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3730
3731         * dump-context.h (dump_context::dump_loc): New decl.
3732         * dumpfile.c (dump_context::dump_loc): New member function.
3733         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3734         and dump_gimple_stmt.
3735         (dump_context::dump_gimple_expr_loc): Likewise, using
3736         dump_gimple_expr.
3737         (dump_context::dump_generic_expr_loc): Likewise, using
3738         dump_generic_expr.
3739         (dump_context::dump_printf_loc_va): Likewise, using
3740         dump_printf_va.
3741         (dump_context::begin_scope): Explicitly using the global function
3742         "dump_loc", rather than the member function.
3743
3744 2018-07-31  Martin Sebor  <msebor@redhat.com>
3745
3746         PR tree-optimization/86741
3747         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3748
3749 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3750
3751         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3752         depend on whether prefetch instructions will be emitted or not.
3753         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3754         will be emitted or not.
3755         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3756         (TARGET_SETMEM_PFD): New macros.
3757
3758 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3759
3760         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3761         (NULL_STMT_VEC_INFO): Delete.
3762         (stmt_vec_info::operator*): Likewise.
3763         (stmt_vec_info::operator gimple *): Likewise.
3764         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3765         of NULL_STMT_VEC_INFO.
3766         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3767         (vect_reassociating_reduction_p): Likewise.
3768         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3769         (vectorizable_store): Likewise.
3770         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3771         (vec_info::free_stmt_vec_infos): Likewise.
3772
3773 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3774
3775         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3776         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3777
3778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3779
3780         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3781         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3782         (vec_info::free_stmt_vec_info): New private member functions.
3783         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3784         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3785         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3786         set_stmt_vec_info_vec and free_stmt_vec_infos.
3787         * tree-vect-loop.c (_loop_vec_info): Remove call to
3788         set_stmt_vec_info_vec.
3789         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3790         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3791         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3792         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3793         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3794         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3795         with the clearing in the xcalloc.
3796         (stmt_vec_info_vec): Delete.
3797         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3798         (vectorize_loops): Likewise.
3799         (vec_info::~vec_info): Remove argument from call to
3800         free_stmt_vec_infos.
3801         (vec_info::add_stmt): Remove vinfo argument from call to
3802         new_stmt_vec_info.
3803
3804 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3805
3806         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3807         rather than a gimple stmt.
3808         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3809         information for pattern statements when passed the original
3810         statement; instead wait to be passed the pattern statement itself.
3811         Don't call set_vinfo_for_stmt here.
3812         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3813         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3814         stmt_vec_infos here.
3815         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3816         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3817         stmt_vec_infos entry.
3818
3819 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3820
3821         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3822         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3823         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3824         * tree-vect-stmts.c (vectorizable_call): Likewise.
3825         (vectorizable_simd_clone_call): Likewise.
3826
3827 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3828
3829         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3830         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3831         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3832         * tree-vect-loop.c (vect_transform_loop): Likewise.
3833         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3834         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3835
3836 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3837
3838         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3839         (vect_dr_stmt): Delete.
3840         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3841         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3842         of DR_VECT_AUX.
3843         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3844         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3845         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3846         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3847         (vect_analyze_data_refs): Likewise.
3848         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3849         argument.
3850         (vect_find_same_alignment_drs): Likewise.
3851         (vect_slp_analyze_node_dependences): Update calls accordingly.
3852         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3853         instead of DR_VECT_AUX.
3854         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3855         of a vector data references.  Use vec_info::lookup_dr instead of
3856         DR_VECT_AUX.
3857         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3858         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3859         instead of DR_VECT_AUX.
3860
3861 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3862
3863         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3864         dr_vec_info.
3865         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3866         accordingly.
3867         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3868         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3869         (vect_gen_prolog_loop_niters): Likewise.
3870
3871 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3872
3873         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3874         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3875         (vect_known_alignment_in_bytes, vect_dr_behavior)
3876         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3877         instead of data_references.  Update calls to other routines for
3878         which the same change has been made.
3879         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3880         dr_vec_infos instead of stmt_vec_infos.
3881         (vect_analyze_data_ref_dependence): Update call accordingly.
3882         (vect_slp_analyze_data_ref_dependence)
3883         (vect_record_base_alignments): Use DR_VECT_AUX.
3884         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3885         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3886         (vector_alignment_reachable_p, vect_get_data_access_cost)
3887         (vect_peeling_supportable, vect_analyze_group_access_1)
3888         (vect_analyze_group_access, vect_analyze_data_ref_access)
3889         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3890         (vect_compile_time_alias, vect_small_gap_p)
3891         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3892         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3893         instead of data_references.  Update calls to other routines for
3894         which the same change has been made.
3895         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3896         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3897         (vect_slp_analyze_and_verify_node_alignment)
3898         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3899         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3900         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3901         above changes.
3902         (_vect_peel_info::dr): Replace with...
3903         (_vect_peel_info::dr_info): ...this new field.
3904         (vect_peeling_hash_get_most_frequent)
3905         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3906         (vect_peeling_hash_get_lowest_cost):
3907         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3908         routines for which the same change has been made.
3909         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3910         data_reference.
3911         * tree-vect-loop-manip.c (get_misalign_in_elems)
3912         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3913         above changes.
3914         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3915         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3916         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3917         (get_group_load_store_type, get_negative_load_store_type)
3918         (vect_get_data_ptr_increment, vectorizable_store)
3919         (vectorizable_load): Likewise.
3920         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3921         Update calls to other routines for which the same change has been made.
3922
3923 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3924
3925         * tree-vectorizer.h (vec_info::move_dr): New member function.
3926         (dataref_aux): Rename to...
3927         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3928         (_stmt_vec_info::dr_aux): Update accordingly.
3929         (_stmt_vec_info::data_ref_info): Delete.
3930         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3931         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3932         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3933         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3934         of data_ref.
3935         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3936         (STMT_VINFO_DR_INFO): New macro.
3937         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3938         (set_dr_misalignment): Update after rename of dataref_aux.
3939         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3940         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3941         initialization of STMT_VINFO_DATA_REF.
3942         * tree-vectorizer.c (vec_info::move_dr): New function.
3943         * tree-vect-patterns.c (vect_recog_bool_pattern)
3944         (vect_recog_mask_conversion_pattern)
3945         (vect_recog_gather_scatter_pattern): Use it.
3946         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3947         the "dr" and "stmt" fields of dr_vec_info instead of
3948         STMT_VINFO_DATA_REF.
3949
3950 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3951
3952         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3953         (is_pattern_stmt_p): Use it.
3954         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3955         on pattern statements.
3956
3957 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3958
3959         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3960         original stmt as a stmt_vec_info rather than a gimple stmt.
3961         (vect_pattern_recog_1): Take the statement directly as a
3962         stmt_vec_info, rather than via a gimple_stmt_iterator.
3963         Update call to vect_mark_pattern_stmts.
3964         (vect_pattern_recog): Update calls accordingly.
3965
3966 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3967
3968         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3969         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3970         a vect_def_type for the first argument.
3971         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3972         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
3973         operand if it isn't defined by a vectorized statement.
3974         (vect_build_gather_load_calls): Remove the mask_dt argument and
3975         update calls to vect_get_vec_def_for_stmt_copy.
3976         (vectorizable_bswap): Likewise the dt argument.
3977         (vectorizable_call): Update calls to vectorizable_bswap and
3978         vect_get_vec_def_for_stmt_copy.
3979         (vectorizable_simd_clone_call, vectorizable_assignment)
3980         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3981         (vectorizable_comparison): Update calls to
3982         vect_get_vec_def_for_stmt_copy.
3983         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
3984         vect_is_simple_use.
3985         (vect_get_loop_based_defs): Remove dt argument and update call
3986         to vect_get_vec_def_for_stmt_copy.
3987         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3988         and vect_get_vec_def_for_stmt_copy.
3989         (vectorizable_load): Update calls to vect_build_gather_load_calls
3990         and vect_get_vec_def_for_stmt_copy.
3991         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3992         (vectorizable_reduction, vectorizable_live_operation): Update calls
3993         to vect_get_vec_def_for_stmt_copy.
3994
3995 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3996
3997         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3998         and gimple stmt arguments with a stmt_vec_info.
3999         (vect_record_base_alignments): Update calls accordingly.
4000         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4001         and gimple stmt arguments with a stmt_vec_info.
4002         (vect_build_slp_tree_1): Remove vinfo argument and update call
4003         to vect_record_max_nunits.
4004         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4005         and vect_record_max_nunits.
4006
4007 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4008
4009         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4010         file and take a stmt_vec_info instead of a gimple stmt.
4011         (supportable_widening_operation, vect_finish_replace_stmt)
4012         (vect_finish_stmt_generation, vect_get_store_rhs)
4013         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4014         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4015         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4016         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4017         (vect_create_data_ref_ptr, bump_vector_ptr)
4018         (vect_permute_store_chain, vect_setup_realignment)
4019         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4020         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4021         (vectorizable_reduction, vectorizable_induction)
4022         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4023         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4024         than gimple stmts as arguments.
4025         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4026         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4027         (can_group_stmts_p, vect_check_gather_scatter)
4028         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4029         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4030         (vect_permute_load_chain, vect_shift_permute_load_chain)
4031         (vect_transform_grouped_load)
4032         (vect_record_grouped_load_vectors): Likewise.
4033         * tree-vect-loop.c (vect_fixup_reduc_chain)
4034         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4035         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4036         (vectorizable_reduction, vectorizable_induction)
4037         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4038         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4039         (vect_get_load_store_mask): Likewise.
4040         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4041         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4042         * tree-vect-stmts.c (vect_mark_relevant)
4043         (is_simple_and_all_uses_invariant)
4044         (exist_non_indexing_operands_for_use_p, process_use)
4045         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4046         (vect_get_vec_def_for_operand, vect_get_vec_defs)
4047         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4048         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4049         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4050         (get_negative_load_store_type, get_load_store_type)
4051         (vect_check_load_store_mask, vect_check_store_rhs)
4052         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4053         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4054         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4055         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4056         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4057         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4058         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4059         (supportable_widening_operation): Likewise.
4060
4061 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4062
4063         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4064         a stmt_vec_info instead of a gcall.
4065         (vect_check_gather_scatter): Update call accordingly.
4066         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4067         of a gphi.
4068         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4069         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4070         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4071         instead of a gimple stmt.
4072         (vect_transform_loop): Update calls accordingly.
4073         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4074         stmt_vec_infos instead of gimple stmts.
4075         (vect_analyze_slp_instance): Update use accordingly.
4076         * tree-vect-stmts.c (read_vector_array, write_vector_array)
4077         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4078         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4079         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4080         (vect_gen_widened_results_half, vect_get_loop_based_defs)
4081         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4082         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4083         down to subroutines.
4084
4085 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4086
4087         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4088         of the worklist from a vector of gimple stmts to a vector of
4089         stmt_vec_infos.
4090         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4091         (vect_mark_stmts_to_be_vectorized): Likewise
4092
4093 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4094
4095         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4096         statement before passing it to vect_analyze_stmt.
4097         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4098         the chain of phi vector definitions.  Track the exit phi via its
4099         stmt_vec_info.
4100         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4101         STMT_VINFO_REDUC_DEF.
4102         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4103         stmt_vec_infos to handle the statement chains.
4104         (vect_get_slp_defs): Record the first statement in the node
4105         using a stmt_vec_info.
4106         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4107         statements here and pass their stmt_vec_info down to subroutines.
4108         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4109         down to vect_finish_stmt_generation.
4110         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4111         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4112         stmt_vec_infos to subroutines.
4113         (vect_remove_stores): Use stmt_vec_infos to handle the statement
4114         chains.
4115
4116 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4117
4118         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4119         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4120         (vect_permute_store_chain, vect_setup_realignment)
4121         (vect_permute_load_chain, vect_shift_permute_load_chain)
4122         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4123         stmts internally, and when passing values to other vectorizer routines.
4124         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4125         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4126         (vect_analyze_loop_operations, get_initial_def_for_reduction)
4127         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4128         (vectorizable_reduction, vectorizable_induction)
4129         (vectorizable_live_operation, vect_transform_loop_stmt)
4130         (vect_transform_loop): Likewise.
4131         * tree-vect-patterns.c (vect_reassociating_reduction_p)
4132         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4133         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4134         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4135         (vect_slp_analyze_node_operations_1): Likewise.
4136         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4137         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4138         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4139         (vect_finish_stmt_generation_1, get_group_load_store_type)
4140         (get_load_store_type, vect_build_gather_load_calls)
4141         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4142         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4143         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4144         (vectorizable_store, vectorizable_load, vectorizable_condition)
4145         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4146         (supportable_widening_operation): Likewise.
4147         (vect_get_vector_types_for_stmt): Likewise.
4148         * tree-vectorizer.h (vect_dr_behavior): Likewise.
4149
4150 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4151
4152         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4153         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4154         (vect_permute_store_chain, vect_permute_load_chain)
4155         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4156         repeated stmt_vec_info lookups.
4157         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4158         (vect_update_ivs_after_vectorizer): Likewise.
4159         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4160         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4161         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4162         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4163         (vect_bb_slp_scalar_cost): Likewise.
4164         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4165
4166 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4167
4168         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4169         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4170         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4171         to get gassigns and gcalls, rather than operating on generc gimple
4172         stmts.
4173         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4174         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4175         (vectorizable_load, vect_analyze_stmt): Likewise.
4176         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4177
4178 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4179
4180         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4181         return stmt_vec_infos rather than gimple stmts.  Do not accept
4182         null arguments.
4183         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4184         of a gimple stmt.
4185         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4186         Update use of get_later_stmt.
4187         (vect_get_constant_vectors): Update call accordingly.
4188         (vect_schedule_slp_instance): Likewise
4189         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4190         (vect_slp_analyze_instance_dependence): Likewise.
4191         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4192
4193 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4194
4195         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4196         (stmt_info_for_cost::stmt_info): ...this new field.
4197         (add_stmt_costs): Update accordingly.
4198         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4199         (vect_get_known_peeling_cost): Likewise.
4200         (vect_estimate_min_profitable_iters): Likewise.
4201         * tree-vect-stmts.c (record_stmt_cost): Likewise.
4202
4203 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4204
4205         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4206         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4207         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4208         accordingly.
4209         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4210
4211 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4212
4213         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4214         a gimple stmt to a stmt_vec_info.
4215         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4216
4217 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4218
4219         * tree-vectorizer.h (vec_info::grouped_stores): Change from
4220         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4221         (_loop_vec_info::reduction_chains): Likewise.
4222         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4223         accordingly.
4224         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4225
4226 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4227
4228         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4229         a gimple stmt to a stmt_vec_info.
4230         (_stmt_vec_info::next_element): Likewise.
4231         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4232         (vect_slp_analyze_and_verify_node_alignment)
4233         (vect_analyze_group_access_1, vect_analyze_group_access)
4234         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4235         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4236         (vect_supportable_dr_alignment): Update accordingly.
4237         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4238         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4239         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4240         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4241         * tree-vect-slp.c (vect_build_slp_tree_1)
4242         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4243         (vect_split_slp_store_group, vect_analyze_slp_instance)
4244         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4245         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4246         (get_group_load_store_type, get_load_store_type)
4247         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4248         (vect_transform_stmt, vect_remove_stores): Likewise.
4249
4250 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4251
4252         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4253         than a gimple stmt.
4254         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4255         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4256         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4257         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4258         (vector_alignment_reachable_p, vect_get_data_access_cost)
4259         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4260         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4261         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4262         (vect_analyze_group_access_1, vect_analyze_group_access)
4263         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4264         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4265         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4266         result of vect_dr_stmt and use the stmt_vec_info instead of
4267         the associated gimple stmt.
4268         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4269         (vect_gen_prolog_loop_niters): Likewise.
4270         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4271
4272 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4273
4274         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4275         to a vec<stmt_vec_info>.
4276         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4277         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4278         vec<stmt_vec_info>.
4279         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4280         to a vec<stmt_vec_info>.
4281         (bst_traits::value_type, bst_traits::value_type): Likewise.
4282         (bst_traits::hash): Update accordingly.
4283         (vect_get_and_check_slp_defs): Change the stmts parameter from
4284         a vec<gimple *> to a vec<stmt_vec_info>.
4285         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4286         (vect_build_slp_tree): Likewise.
4287         (vect_build_slp_tree_2): Likewise.  Update uses of
4288         SLP_TREE_SCALAR_STMTS.
4289         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4290         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4291         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4292         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4293         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4294         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4295         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4296         (vect_get_constant_vectors, vect_get_slp_defs)
4297         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4298         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4299         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4300         instead of gimple stmts.
4301         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4302         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4303         (vect_slp_analyze_instance_dependence): Update uses of
4304         SLP_TREE_SCALAR_STMTS.
4305         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4306         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4307         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4308         (get_initial_defs_for_reduction): Likewise.
4309         (vect_create_epilog_for_reduction): Likewise.
4310         (vectorize_fold_left_reduction): Likewise.
4311         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4312         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4313         (can_vectorize_live_stmts): Likewise.
4314
4315 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4316
4317         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4318         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4319         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4320         than gimple stmts.
4321         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4322         of a gimple stmt.
4323         (gather_scalar_reductions): Update after above interface changes.
4324         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4325         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4326         than gimple stmts.
4327         (vect_force_simple_reduction): Likewise.
4328         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4329         LOOP_VINFO_REDUCTIONS.
4330         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4331
4332 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4333
4334         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4335         a gimple stmt to a stmt_vec_info.
4336         * tree-vect-loop.c (vect_active_double_reduction_p)
4337         (vect_force_simple_reduction, vectorizable_reduction): Update
4338         accordingly.
4339
4340 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4341
4342         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4343         vec<gimple *> to a vec<stmt_vec_info>.
4344         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4345         the reduction_phis argument from a vec<gimple *> to a
4346         vec<stmt_vec_info>.
4347         (vectorizable_reduction): Likewise the phis local variable that
4348         is passed to vect_create_epilog_for_reduction.  Update for new type
4349         of SLP_TREE_VEC_STMTS.
4350         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4351         (vectorizable_live_operation): Likewise.
4352         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4353         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4354
4355 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4356
4357         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4358         a gimple stmt to a stmt_vec_info.
4359         (vectorizable_condition, vectorizable_live_operation)
4360         (vectorizable_reduction, vectorizable_induction): Pass back the
4361         vectorized statement as a stmt_vec_info.
4362         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4363         use of STMT_VINFO_VEC_STMT.
4364         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4365         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4366         as stmt_vec_infos rather than gimple stmts.
4367         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4368         to a stmt_vec_info.
4369         (vectorizable_live_operation): Likewise.
4370         (vectorizable_reduction, vectorizable_induction): Likewise,
4371         updating use of STMT_VINFO_VEC_STMT.
4372         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4373         of STMT_VINFO_VEC_STMT.
4374         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4375         (vectorizable_simd_clone_call, vectorizable_conversion)
4376         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4377         (vectorizable_store, vectorizable_load, vectorizable_condition)
4378         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4379         from a gimple stmt to a stmt_vec_info.
4380         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
4381         pointer to a stmt_vec_info to the vectorizable_* routines.
4382
4383 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4384
4385         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4386         a gimple stmt to a stmt_vec_info.
4387         (is_pattern_stmt_p): Update accordingly.
4388         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4389         (vect_record_grouped_load_vectors): Likewise.
4390         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4391         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4392         (vect_model_reduction_cost): Likewise.
4393         (vect_create_epilog_for_reduction): Likewise.
4394         (vectorizable_reduction, vectorizable_induction): Likewise.
4395         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4396         Return the stmt_vec_info for the pattern statement.
4397         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4398         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4399         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4400         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4401         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4402         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4403         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4404         (free_stmt_vec_info, vect_is_simple_use): Likewise.
4405
4406 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4407
4408         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4409         (vect_finish_stmt_generation): Likewise.
4410         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4411         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4412         (vect_build_gather_load_calls): Use the return value of the above
4413         functions instead of a separate call to vinfo_for_stmt.  Use narrow
4414         scopes for the input gimple stmt and wider scopes for the associated
4415         stmt_vec_info.  Use vec_info::lookup_def when setting these
4416         stmt_vec_infos from an SSA_NAME definition.
4417         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4418         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4419         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4420         (vectorizable_store, vectorizable_load, vectorizable_condition)
4421         (vectorizable_comparison): Likewise.
4422         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4423         (vectorizable_reduction): Likewise.
4424
4425 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4426
4427         * tree-vectorizer.h (vect_is_simple_use): Add an optional
4428         stmt_vec_info * parameter before the optional gimple **.
4429         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4430         (process_use, vect_get_vec_def_for_operand_1): Update callers.
4431         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4432         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4433         (vectorizable_live_operation): Likewise.
4434         * tree-vect-patterns.c (type_conversion_p): Likewise.
4435         (vect_look_through_possible_promotion): Likewise.
4436         (vect_recog_rotate_pattern): Likewise.
4437         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4438
4439 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4440
4441         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4442         a typedef to a wrapper class.
4443         (NULL_STMT_VEC_INFO): New macro.
4444         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4445         (stmt_vec_info::operator*): New function.
4446         (stmt_vec_info::operator gimple *): Likewise.
4447         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4448         (add_stmt_costs): Likewise.
4449         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4450         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4451         (vect_get_known_peeling_cost): Likewise.
4452         (vect_estimate_min_profitable_iters): Likewise.
4453         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4454         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4455         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4456         (vectorizable_store, free_stmt_vec_infos): Likewise.
4457         (new_stmt_vec_info): Change return type of xcalloc to
4458         _stmt_vec_info *.
4459
4460 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4461
4462         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4463         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4464         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4465         a single_imm_use-based sequence.
4466         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4467
4468 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4469
4470         * tree-vectorizer.h (vec_info::lookup_def): Declare.
4471         * tree-vectorizer.c (vec_info::lookup_def): New function.
4472         * tree-vect-patterns.c (vect_get_internal_def): Use it.
4473         (vect_widened_op_tree): Likewise.
4474         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4475         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4476         (vectorizable_reduction): Likewise.
4477         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4478         of a gimple *.
4479         (vect_is_slp_reduction): Update calls accordingly.  Use
4480         vec_info::lookup_def.
4481         (vect_is_simple_reduction): Likewise
4482         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4483
4484 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4485
4486         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4487         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4488         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4489         of vinfo_for_stmt.
4490         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4491         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4492         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4493         (vect_is_slp_reduction, vectorizable_induction)
4494         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4495         * tree-vect-patterns.c (vect_init_pattern_stmt):
4496         (vect_determine_min_output_precision_1, vect_determine_precisions)
4497         (vect_pattern_recog): Likewise.
4498         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4499         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4500         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4501         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4502         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4503         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4504         info field from a loop to a loop_vec_info.
4505
4506 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4507
4508         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4509         (vec_info::add_stmt): Declare.
4510         * tree-vectorizer.c (vec_info::add_stmt): New function.
4511         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4512         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4513         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4514         (vectorizable_induction): Likewise.
4515         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4516         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4517         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4518         (vectorizable_load): Likewise.
4519         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4520         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4521         (vect_recog_gather_scatter_pattern): Likewise.
4522         (append_pattern_def_seq): Likewise.  Remove a check that is
4523         performed by add_stmt itself.
4524
4525 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4526
4527         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4528         which make_ssa_name was called with new_stmt before new_stmt
4529         had been created.
4530
4531 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4532
4533         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4534         split out from...
4535         (vect_is_slp_reduction): ...here...
4536         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4537         that are already known to be false.
4538
4539 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4540
4541         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4542         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4543         STMT_VINFO_NUM_SLP_USES when it's true.
4544         (vect_free_slp_instance): Add a final_p parameter and pass it to
4545         vect_free_slp_tree.
4546         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4547         (vect_analyze_slp_instance): Likewise.
4548         (vect_slp_analyze_operations): Likewise.
4549         (vect_slp_analyze_bb_1): Likewise.
4550         * tree-vectorizer.c (vec_info): Likewise.
4551         * tree-vect-loop.c (vect_transform_loop): Likewise.
4552
4553 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4554
4555         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4556         function is not called for second and subsequent members of
4557         a reduction group.
4558
4559 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4560
4561         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4562         cases for nested loops from here to ...
4563         (vect_create_epilog_for_reduction): ...here.  Only call
4564         vect_is_simple_use for inner-loop reductions.
4565
4566 2018-07-31  Martin Liska  <mliska@suse.cz>
4567
4568         PR gcov-profile/85338
4569         PR gcov-profile/85350
4570         PR gcov-profile/85372
4571         * profile.c (struct location_triplet): New.
4572         (struct location_triplet_hash): Likewise.
4573         (output_location): Do not output a BB that
4574         is already recorded for a line.
4575         (branch_prob): Use streamed_locations.
4576
4577 2018-07-31  Martin Liska  <mliska@suse.cz>
4578
4579         PR gcov-profile/85370
4580         * coverage.c (coverage_begin_function): Do not mark target
4581         clones as artificial functions.
4582
4583 2018-07-31  Martin Liska  <mliska@suse.cz>
4584
4585         PR gcov-profile/83813
4586         PR gcov-profile/84758
4587         PR gcov-profile/85217
4588         PR gcov-profile/85332
4589         * profile.c (branch_prob): Do not record GOTO expressions
4590         for GIMPLE statements which locations are already streamed.
4591
4592 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4593
4594         * gcc.c (handle_spec_function): Accept a soft_matched_part
4595         argument, as do_spec_1.  Pass it down to ...
4596         (eval_spec_function): Accept a soft_matched_part argument,
4597         and pass it down to ...
4598         (do_spec_2): Accept a soft_matched_part argument, and pass
4599         it down to do_spec_1.
4600         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4601         (handle_braces): Update call to handle_spec_function.
4602         (driver::set_up_specs): Update calls to do_spec_2.
4603         (compare_debug_dump_opt_spec_function): Likewise.
4604         (compare_debug_self_opt_spec_function): Likewise.
4605
4606 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4607
4608         * common.opt (nolibc): New option.
4609         * doc/invoke.texi (Link Options): Document it.
4610         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4611         * config/alpha/linux.h: Likewise.
4612         * config/arc/elf.h: Likewise.
4613         * config/arm/uclinux-elf.h: Likewise.
4614         * config/arm/unknown-elf.h: Likewise.
4615         * config/avr/avrlibc.h: Likewise.
4616         * config/bfin/bfin.h: Likewise.
4617         * config/bfin/linux.h: Likewise.
4618         * config/bfin/uclinux.h: Likewise.
4619         * config/darwin.h: Likewise.
4620         * config/darwin10.h: Likewise.
4621         * config/darwin12.h: Likewise.
4622         * config/gnu-user.h: Likewise.
4623         * config/lm32/uclinux-elf.h: Likewise.
4624         * config/pa/pa-hpux11.h: Likewise.
4625         * config/pa/pa64-hpux.h: Likewise.
4626         * config/sparc/sparc.h: Likewise.
4627
4628 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4629
4630         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4631         undefined variables.
4632
4633 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4634
4635         PR target/86640
4636         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4637         instead of GEN_INT.
4638
4639 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4640
4641         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4642         terminated string literal.
4643
4644 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4645
4646         PR rtl-optimization/85160
4647         * combine.c (is_just_move): New function.
4648         (try_combine): Allow combining two instructions into two if neither of
4649         the original instructions was a move.
4650
4651 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4652
4653         PR target/86673
4654         * doc/extend.texi (Global Register Variables): Discourage use of type
4655         qualifiers.
4656         (Local Register Variables): Likewise.
4657
4658 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4659
4660         PR tree-optimization/86506
4661         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4662
4663 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4664
4665         PR target/86547
4666         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4667         hard_regno, make sure no insn between `from` and `to` clobbers it.
4668
4669 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4670             Tom de Vries  <tdevries@suse.de>
4671
4672         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4673         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4674         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4675         PTX_DEFAULT_RUNTIME_DIM.
4676         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4677
4678 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4679
4680         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4681         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4682         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4683
4684 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4685
4686         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4687         used.
4688         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4689         predicate to reflect toc fusion has been deleted.
4690         (toc_fusion_mem_raw): Delete, no longer used.
4691         (toc_fusion_mem_wrapped): Likewise.
4692         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4693         fusion mask bit.
4694         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4695         Delete, no longer used.
4696         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4697         meant to be used for toc fusion.
4698         (rs6000_debug_print_mode): Delete toc fusion debugging.
4699         (rs6000_debug_reg_global): Likewise.
4700         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4701         fusion and secondary reload support that were never used.
4702         (rs6000_option_override_internal): Delete TOC fusion, that was only
4703         partially defined, and it did not work unless you also used the
4704         -mcmodel= switch.
4705         (rs6000_legitimate_address_p): Delete TOC fusion support.
4706         (rs6000_opt_masks): Likewise.
4707         (fusion_wrap_memory_address): Delete function, no longer used.
4708         (fusion_split_address); Delete TOC fusion support.
4709         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4710         longer used with toc fusion being deleted.
4711         (TARGET_TOC_FUSION_FP): Likewise.
4712         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4713         UNSPEC.
4714         (toc fusion spliter): Delete TOC fusion support.
4715         (toc_fusionload_<mode>): Likewise.
4716         (toc_fusionload_di): Likewise.
4717         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4718         longer needs to be named.  Rename predicate to delete TOC fusion.
4719         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4720         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4721         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4722         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4723         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4724
4725 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4726
4727         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4728         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4729         __int128 in built-in function prototypes.
4730         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4731         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4732
4733 2018-07-27  Martin Sebor  <msebor@redhat.com>
4734
4735         PR tree-optimization/86696
4736         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4737         types, including enums.
4738         (handle_char_store): Be prepared for the above function to fail.
4739
4740 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4741
4742         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4743         when optimization level is lower than 2 or optimize for size.
4744
4745 2018-07-26  Martin Sebor  <msebor@redhat.com>
4746
4747         PR tree-optimization/86043
4748         PR tree-optimization/86042
4749         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4750         (get_string_cst_length): Rename...
4751         (get_min_string_length): ...to this.  Add argument.
4752         (handle_char_store): Extend to handle multi-character stores by
4753         MEM_REF.
4754         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4755         * tree.h (initializer_zerop): Add argument.
4756
4757 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4758
4759         PR middle-end/86660
4760         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4761         declare target to variables if they have always,{to,from,tofrom} map
4762         kinds.
4763
4764 2018-07-26  Martin Liska  <mliska@suse.cz>
4765
4766         PR lto/86548
4767         * lto-wrapper.c: Add linker_output as prefix
4768         for ltrans_output_file.
4769
4770 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4771
4772         PR rtl-optimization/85805
4773         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4774         value for hard registers if that was written in the same mode.
4775
4776 2018-07-26  Martin Liska  <mliska@suse.cz>
4777
4778         PR gcov-profile/86536
4779         * gcov.c (format_gcov): Use printf format %.*f directly
4780         and do not handle special values.
4781
4782 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4783
4784         * common/config/arc/arc-common.c (arc_option_optimization_table):
4785         Update default optimizations for size.
4786
4787 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4788
4789         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4790         * config/arc/constraints.md (CfZ): New constraint.
4791         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4792         (subsf3_fpu): Likewise.
4793         (cmpsf_fpu): Likewise.
4794         (cmpsf_fpu_uneq): Likewise.
4795
4796 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4797
4798         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4799         accesses as well.
4800         (arc_is_uncached_mem_p): uncached applies to both the variable and
4801         the pointer.
4802
4803 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4804
4805         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4806         register names.
4807
4808 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4809
4810         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4811         field "m_scopes" from vec to auto_vec.
4812
4813 2018-07-25  Martin Liska  <mliska@suse.cz>
4814
4815         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4816         return type.
4817
4818 2018-07-25  Richard Biener  <rguenther@suse.de>
4819
4820         PR debug/86654
4821         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4822         special wrt context_die late.
4823         (gen_subprogram_die): Re-use DIEs in local scope.
4824
4825 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4826
4827         PR tree-optimization/86644
4828         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4829
4830 2018-07-25  Martin Liska  <mliska@suse.cz>
4831
4832         PR middle-end/86645
4833         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4834         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4835
4836 2018-07-25  Martin Liska  <mliska@suse.cz>
4837
4838         PR sanitizer/79635
4839         * params.def: Explain ASan abbreviation and provide
4840         a documentation link.
4841
4842 2018-07-24  Martin Sebor  <msebor@redhat.com>
4843
4844         PR tree-optimization/86622
4845         PR tree-optimization/86532
4846         * builtins.h (string_length): Declare.
4847         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4848         (check_access): Be prepared for non-constant length ranges.
4849         (string_length): Make extern.
4850         * expr.c (string_constant): Only handle the minor non-constant
4851         array index.  Use string_constant to compute the length of
4852         a generic string constant.
4853
4854 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4855
4856         PR tree-optimization/86618
4857         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4858         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4859
4860 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4861
4862         PR tree-optimization/86636
4863         * json.cc (json::object::set): Fix comment.  Add assertions.
4864         (json::array::append): Move here from json.h.  Add comment and an
4865         assertion.
4866         (json::string::string): Likewise.
4867         * json.h (json::array::append): Move to json.cc.
4868         (json::string::string): Likewise.
4869         * optinfo-emit-json.cc
4870         (optrecord_json_writer::impl_location_to_json): Assert that we
4871         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4872         wrapper around it.  Expand the location once, rather than three
4873         times.
4874         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4875         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4876         wrappers.
4877         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4878         places.  Fix some overlong lines.
4879
4880 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4881
4882         * config/aarch64/aarch64-simd.md
4883         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4884         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4885         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4886         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4887         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4888         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4889         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4890         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4891         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4892
4893 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4894
4895         PR middle-end/86627
4896         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4897         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4898         and abs_d == d, do the power of two handling if profitable.
4899
4900 2018-07-24  Richard Biener  <rguenther@suse.de>
4901
4902         * match.pd: Add BIT_FIELD_REF canonicalizations.
4903
4904 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4905
4906         PR c/86617
4907         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4908
4909 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4910
4911         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4912         terminated STRING_CST object.
4913
4914 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4915
4916         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4917
4918 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4919
4920         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4921         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4922         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4923         the elements into a register.
4924         (rs6000_split_v4si_init_di_reg): Delete.
4925         (rs6000_split_v4si_init): Delete.
4926         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4927         (vsx_init_v4si): Rewrite as a define_expand.
4928
4929 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4930
4931         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4932         zero_extend argument from memory): New.
4933
4934 2018-07-22  Martin Sebor  <msebor@redhat.com>
4935
4936         PR bootstrap/86621
4937         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4938         diagnosing calls with unknown arguments unless -Walloca-larger-than
4939         is restricted to less than PTRDIFF_MAX bytes.
4940
4941 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4942
4943         * doc/gcov.texi (Invoking Gcov): Editorial changes.
4944
4945 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4946
4947         * pretty-print.c (text_info::set_location): Remove redundant
4948         "line_table" parameter from call to rich_location::set_range.
4949
4950 2018-07-20  Martin Sebor  <msebor@redhat.com>
4951
4952         PR middle-end/82063
4953         * builtins.c (expand_builtin_alloca): Adjust.
4954         * calls.c (alloc_max_size): Simplify.
4955         * cgraphunit.c (cgraph_node::expand): Adjust.
4956         * common.opt (larger_than_size, warn_frame_larger_than): Remove
4957         variables.
4958         (frame_larger_than_size): Same.
4959         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4960         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4961         Initialize.
4962         * doc/invoke.texi (GCC Command Options): Document option arguments.
4963         Explain byte-size arguments and suffixes.
4964         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4965         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4966         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4967         * doc/options.texi (UInteger): Expand.
4968         (Host_Wide_Int, ByteSize): Document new properties.
4969         * final.c (final_start_function_1): Include sizes in an error message.
4970         * function.c (frame_offset_overflow): Same.
4971         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4972         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4973         Diagnose unbounded alloca calls only for limits of less than
4974         PTRDIFF_MAX.
4975         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
4976         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
4977         for alloca(0).
4978         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
4979         only for limits of less than PTRDIFF_MAX.
4980         * langhooks-def.h (lhd_handle_option): Change function argument
4981         to HOST_WIDE_INT.
4982         * langhooks.c (lhd_handle_option): Same.
4983         * langhooks.h (handle_option): Same.
4984         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4985         ByteSize flags.
4986         (var_type, var_type_struct): Same.
4987         (var_set): Handle ByteSize flag.
4988         * optc-gen.awk: Add comments to output to ease debugging.  Make
4989         use of HOST_WIDE_INT where appropriate.
4990         * opts-gen-save.awk:  Use %lx to format unsigned long.
4991         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4992         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4993         arguments.  Parse bytes-size suffixes.
4994         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4995         (enum_value_to_arg): Same.
4996         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
4997         (handle_option): Adjust.
4998         (generate_option): Change function argument to HOST_WIDE_INT.
4999         (cmdline_handle_error): Adjust.
5000         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5001         (set_option): Change function argument to HOST_WIDE_INT.
5002         (option_enabled): Handle cl_host_wide_int.
5003         (get_option_state): Handle CLVC_SIZE.
5004         (control_warning_option): Same.
5005         * opts.c (common_handle_option): Change function argument to
5006         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
5007         OPT_Wvla_larger_than_.
5008         * opts.h (enum cl_var_type): Add an enumerator.
5009         * stor-layout.c (layout_decl): Print a more meaningful warning.
5010         * toplev.c (output_stack_usage): Adjust.
5011
5012 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
5013
5014         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5015         call to inline_expand_builtin_string_cmp.
5016         (expand_builtin_strcmp): Likewise.
5017         (expand_builtin_strncmp): Likewise.
5018         (inline_string_cmp): Delete the last parameter, change char_type_node
5019         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5020         two operands.
5021         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5022         the inlining expansion on target where the type of the call has same or
5023         narrower precision than unsigned char.
5024
5025 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5026
5027         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5028         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5029         * common.opt (fsave-optimization-record): New option.
5030         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5031         * doc/invoke.texi (-fsave-optimization-record): New option.
5032         * dumpfile.c: Include "optinfo-emit-json.h".
5033         (struct kv_pair): Move to coretypes.h.
5034         (optgroup_options): Make non-static.
5035         (dump_context::end_scope): Call
5036         optimization_records_maybe_pop_dump_scope.
5037         * dumpfile.h (optgroup_options): New decl.
5038         * json.cc: New file.
5039         * json.h: New file.
5040         * optinfo-emit-json.cc: New file.
5041         * optinfo-emit-json.h: New file.
5042         * optinfo.cc: Include "optinfo-emit-json.h".
5043         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5044         (optinfo_enabled_p): Check optimization_records_enabled_p.
5045         (optinfo_wants_inlining_info_p): Likewise.
5046         * optinfo.h: Update comment.
5047         * profile-count.c (profile_quality_as_string): New function.
5048         * profile-count.h (profile_quality_as_string): New decl.
5049         (profile_count::quality): New accessor.
5050         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5051         and optinfo_emit_json_cc_tests.
5052         * selftest.h (selftest::json_cc_tests): New decl.
5053         (selftest::optinfo_emit_json_cc_tests): New decl.
5054         * toplev.c: Include "optinfo-emit-json.h".
5055         (compile_file): Call optimization_records_finish.
5056         (do_compile): Call optimization_records_start.
5057         * tree-ssa-live.c: Include optinfo.h.
5058         (remove_unused_scope_block_p): Retain inlining information if
5059         optinfo_wants_inlining_info_p returns true.
5060
5061 2018-07-20  Richard Biener  <rguenther@suse.de>
5062
5063         PR debug/86585
5064         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5065         to cover -flto-partition=none.
5066
5067 2018-07-20  Martin Liska  <mliska@suse.cz>
5068
5069         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5070         (get_decl_source_range): Remove unused function.
5071
5072 2018-07-20  Richard Biener  <rguenther@suse.de>
5073
5074         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5075         (struct vn_phi_s): Likewise.
5076         (struct vn_reference_s): Likewise.
5077         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5078         for searching the slot of an entry known to be in the hash itself.
5079         (vn_phi_hasher::equal): Likewise.
5080         (vn_reference_hasher::equal): Likewise.
5081         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5082         globals.
5083         (optimistic_info, current_info): Remove, keeping only valid_info.
5084         (vn_reference_lookup_1): Remove fallback lookup.
5085         (vn_reference_lookup_2): Likewise.
5086         (vn_nary_op_lookup_1): Likewise.
5087         (vn_phi_lookup): Likewise.
5088         (vn_nary_build_or_lookup_1): Make sure to not chain the built
5089         hash element.
5090         (vn_reference_insert): Adjust, chain the inserted hash element
5091         at last_inserted_ref.
5092         (vn_reference_insert_pieces): Likewise.
5093         (visit_reference_op_call): Likewise.
5094         (vn_nary_op_insert_into): Chain the inserted hash element at
5095         last_inserted_nary.
5096         (vn_nary_op_insert_pieces): Adjust.
5097         (vn_nary_op_insert): Likewise.
5098         (vn_nary_op_insert_stmt): Likewise.
5099         (vn_phi_insert): Adjust, chain the inserted hash element at
5100         last_inserted_phi.
5101         (process_scc): Remove clearing and copying the optimistic
5102         table.  Instead remove elements inserted during an optimistic
5103         iteration from the single table we maintain.
5104         (init_scc_vn): Adjust.
5105         (free_scc_vn): Likewise.
5106         (sccvn_dom_walker::record_cond): Likewise.
5107         (sccvn_dom_walker::after_dom_children): Likewise.
5108
5109 2018-07-19  Martin Sebor  <msebor@redhat.com>
5110
5111         PR tree-optimization/84047
5112         PR tree-optimization/83776
5113         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5114         (check_array_bounds): Call it.
5115
5116 2018-07-19  Martin Sebor  <msebor@redhat.com>
5117
5118         * align.h (align_flags): Use member initialization.
5119
5120 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
5121
5122         * Makefile.in (OBJS): Add optinfo.o.
5123         * coretypes.h (class symtab_node): New forward decl.
5124         (struct cgraph_node): New forward decl.
5125         (class varpool_node): New forward decl.
5126         * dump-context.h: New file.
5127         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5128         "tree-pass.h".
5129         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5130         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5131         (set_alt_dump_file): Likewise.
5132         (dump_context::~dump_context): New dtor.
5133         (dump_gimple_stmt): Move implementation to...
5134         (dump_context::dump_gimple_stmt): ...this new member function.
5135         Add the stmt to any pending optinfo, creating one if need be.
5136         (dump_gimple_stmt_loc): Move implementation to...
5137         (dump_context::dump_gimple_stmt_loc): ...this new member function.
5138         Start a new optinfo and add the stmt to it.
5139         (dump_gimple_expr): Move implementation to...
5140         (dump_context::dump_gimple_expr): ...this new member function.
5141         Add the stmt to any pending optinfo, creating one if need be.
5142         (dump_gimple_expr_loc): Move implementation to...
5143         (dump_context::dump_gimple_expr_loc): ...this new member function.
5144         Start a new optinfo and add the stmt to it.
5145         (dump_generic_expr): Move implementation to...
5146         (dump_context::dump_generic_expr): ...this new member function.
5147         Add the tree to any pending optinfo, creating one if need be.
5148         (dump_generic_expr_loc): Move implementation to...
5149         (dump_context::dump_generic_expr_loc): ...this new member
5150         function.  Add the tree to any pending optinfo, creating one if
5151         need be.
5152         (dump_printf): Move implementation to...
5153         (dump_context::dump_printf_va): ...this new member function.  Add
5154         the text to any pending optinfo, creating one if need be.
5155         (dump_printf_loc): Move implementation to...
5156         (dump_context::dump_printf_loc_va): ...this new member function.
5157         Start a new optinfo and add the stmt to it.
5158         (dump_dec): Move implementation to...
5159         (dump_context::dump_dec): ...this new member function.  Add the
5160         value to any pending optinfo, creating one if need be.
5161         (dump_context::dump_symtab_node): New member function.
5162         (dump_context::get_scope_depth): New member function.
5163         (dump_context::begin_scope): New member function.
5164         (dump_context::end_scope): New member function.
5165         (dump_context::ensure_pending_optinfo): New member function.
5166         (dump_context::begin_next_optinfo): New member function.
5167         (dump_context::end_any_optinfo): New member function.
5168         (dump_context::s_current): New global.
5169         (dump_context::s_default): New global.
5170         (dump_scope_depth): Delete global.
5171         (dumpfile_ensure_any_optinfo_are_flushed): New function.
5172         (dump_symtab_node): New function.
5173         (get_dump_scope_depth): Reimplement in terms of dump_context.
5174         (dump_begin_scope): Likewise.
5175         (dump_end_scope): Likewise.
5176         (selftest::temp_dump_context::temp_dump_context): New ctor.
5177         (selftest::temp_dump_context::~temp_dump_context): New dtor.
5178         (selftest::verify_item): New function.
5179         (ASSERT_IS_TEXT): New macro.
5180         (ASSERT_IS_TREE): New macro.
5181         (ASSERT_IS_GIMPLE): New macro.
5182         (selftest::test_capture_of_dump_calls): New test.
5183         (selftest::dumpfile_c_tests): Call it.
5184         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5185         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5186         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5187         descriptive comment.
5188         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5189         (dump_node, dump_bb): Move these unrelated decls.
5190         (class dump_manager): Add leading comment.
5191         * optinfo.cc: New file.
5192         * optinfo.h: New file.
5193
5194 2018-07-19  Michael Collison  <michael.collison@arm.com>
5195             Richard Henderson <rth@redhat.com>
5196
5197         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5198         (subti): Handle op1 zero.
5199         (subvti4, usub4ti4): New.
5200         (*sub<GPI>3_compare1_imm): New.
5201         (sub<GPI>3_carryinCV): New.
5202         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5203         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5204
5205 2018-07-19  Michael Collison  <michael.collison@arm.com>
5206             Richard Henderson <rth@redhat.com>
5207
5208         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5209         (addti3): Create simpler code if low part is already known to be 0.
5210         (addvti4, uaddvti4): New.
5211         (*add<GPI>3_compareC_cconly_imm): New.
5212         (*add<GPI>3_compareC_cconly): New.
5213         (*add<GPI>3_compareC_imm): New.
5214         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5215         handle constants within this pattern..
5216         (*add<GPI>3_compareV_cconly_imm): New.
5217         (*add<GPI>3_compareV_cconly): New.
5218         (*add<GPI>3_compareV_imm): New.
5219         (add<GPI>3_compareV): New.
5220         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5221         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5222         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5223         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5224         with 'comparison' operator.
5225         (*add<GPI>3_compareV_cconly_imm): Ditto.
5226         (*add<GPI>3_compareV_cconly): Ditto.
5227         (*add<GPI>3_compareV_imm): Ditto.
5228         (add<GPI>3_compareV): Ditto.
5229         (add<mode>3_carryinC): Ditto.
5230         (*add<mode>3_carryinC_zero): Ditto.
5231         (*add<mode>3_carryinC): Ditto.
5232         (add<mode>3_carryinV): Ditto.
5233         (*add<mode>3_carryinV_zero): Ditto.
5234         (*add<mode>3_carryinV): Ditto.
5235
5236 2018-07-19  Michael Collison  <michael.collison@arm.com>
5237             Richard Henderson <rth@redhat.com>
5238
5239         * config/aarch64/aarch64-modes.def (CC_V): New.
5240         * config/aarch64/aarch64-protos.h
5241         (aarch64_addti_scratch_regs): Declare
5242         (aarch64_subvti_scratch_regs): Declare.
5243         (aarch64_expand_subvti): Declare.
5244         (aarch64_gen_unlikely_cbranch): Declare
5245         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5246         for signed overflow using CC_Vmode.
5247         (aarch64_get_condition_code_1): Handle CC_Vmode.
5248         (aarch64_gen_unlikely_cbranch): New function.
5249         (aarch64_addti_scratch_regs): New function.
5250         (aarch64_subvti_scratch_regs): New function.
5251         (aarch64_expand_subvti): New function.
5252
5253 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5254
5255         * config/aarch64/aarch64-option-extensions.def: New entry for profile
5256         extension.
5257         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5258         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5259         extension.
5260
5261 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5262
5263         PR target/83009
5264         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5265         address check not strict.
5266
5267 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5268
5269         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5270         Umq with Umn.
5271         (store_pair_lanes<mode>): Likewise.
5272         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5273         enum value 'ADDR_QUERY_LDP_STP_N'.
5274         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5275         (aarch64_print_address_internal): Add declaration.
5276         (aarch64_print_ldpstp_address): Remove.
5277         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5278         (aarch64_print_operand): Change printing of 'y'.
5279         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5280         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5281         'true' rather than '1'.
5282         * config/aarch64/constraints.md (Uml): Likewise.
5283         (Uml): Rename to Umn.
5284         (Umq): Remove.
5285
5286 2018-07-19  Richard Biener  <rguenther@suse.de>
5287
5288         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5289         a trailing array.
5290         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5291         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5292         (vn_reference_hasher): Likewise.
5293         (struct vn_tables_s): Remove obstack and alloc-pool members.
5294         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5295         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5296         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5297         (vn_reference_insert_pieces): Likewise.
5298         (alloc_vn_nary_op_noinit): Adjust.
5299         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5300         (vn_phi_eq): Adjust.
5301         (shared_lookup_phiargs): Remove.
5302         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5303         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5304         (visit_reference_op_call): Likewise.
5305         (copy_nary, copy_phi, copy_reference): Remove.
5306         (process_scc): Rewind the obstack when iterating.  Do not
5307         copy the elements to valid_info but just move them from one
5308         hashtable to the other.
5309         (allocate_vn_table): Adjust.
5310         (free_vn_table): Likewise.
5311         (init_scc_vn): Likewise.
5312         (free_scc_vn): Likewise.
5313
5314 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
5315
5316         PR target/86560
5317         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5318         indirect_return as function type attribute.
5319         (ix86_attribute_table): Change indirect_return to function
5320         type attribute.
5321         * doc/extend.texi: Update indirect_return attribute.
5322
5323 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
5324
5325         * wide-int.h (widest2_int): New.
5326         * gimple-fold.c (arith_overflowed_p): Use it.
5327         * tree.h (widest2_int_cst): New.
5328         * tree-vrp.c (wide_int_binop_overflow): Rename from
5329         vrp_int_const_binop.
5330         Rewrite to work on trees.
5331         (extract_range_from_multiplicative_op_1): Abstract code to...
5332         (wide_int_range_min_max): ...here.
5333         (wide_int_range_cross_product): ...and here.
5334         (extract_range_from_binary_expr_1): Abstract overflow code to...
5335         (wide_int_range_mult_wrapping): ...here.
5336         * tree-vrp.h (wide_int_range_cross_product): New.
5337         (wide_int_range_mult_wrapping): New.
5338
5339 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
5340             Julia Koval  <julia.koval@intel.com>
5341
5342         * config/i386/x86-tune-costs.h (skylake_memcpy,
5343         skylake_memset): Replace rep_prefix with unrolling for size 512.
5344
5345 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
5346
5347         PR middle-end/86544
5348         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5349         comparision with EQ_EXPR in last stmt.
5350
5351 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5352
5353         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5354         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5355         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5356         previously known as "PowerPC AltiVec Built-in Functions".  Move
5357         some material to new subsubsections "PowerPC AltiVec Built-in
5358         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5359         ISA 2.07".
5360         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5361         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5362         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5363         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5364
5365 2018-07-18  Richard Biener  <rguenther@suse.de>
5366
5367         PR tree-optimization/86557
5368         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5369         EXACT_DIV_EXPR.
5370
5371 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
5372
5373         * config/s390/s390.c (s390_function_profiler): Generate CFI.
5374
5375 2018-07-17  Jeff Law  <law@redhat.com>
5376
5377         * config/arm/arm.c (get_label_padding): Update for recent
5378         changes to label_to_alignment.
5379
5380         PR tree-optimization/86010
5381         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5382
5383         * config/mips/mips.c (vr4130_align_insns): Update for recent
5384         changes to label_to_alignment.
5385
5386         * config/frv/frv.c (frv_label_align): Update for recent changes
5387         to label_to_alignment.
5388
5389         * config/nios2/nios2.c (nios2_label_align): Update for recent
5390         changes which dropped ALIGN_LABELS_LOG.
5391
5392 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
5393
5394         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5395         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5396
5397 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
5398
5399         * config/arc/arc.c (arc_label_align): Use align_labels instead of
5400         deprecated align_labels_log.
5401
5402 2018-07-17  Richard Biener  <rguenther@suse.de>
5403
5404         PR lto/86456
5405         * dwarf2out.c (init_sections_and_labels): Always generate
5406         a debug_line_str_section for early LTO debug.
5407         (dwarf2out_finish): Reset debug_line_str_hash output early.
5408         Bump counter for extra dwarf5 .debug_loc labels to not conflict
5409         with fat LTO part.
5410         (dwarf2out_early_finish): Output debug_line_str.
5411
5412 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5413
5414         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5415         index register on z196 or later.
5416
5417 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5418
5419         * config/s390/s390.c (s390_default_align): Set default function
5420         alignment to 16.
5421         (s390_override_options_after_change): Call s390_default align.
5422         (s390_option_override_internal): Call s390_default_align.
5423         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5424
5425 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5426
5427         PR middle-end/86542
5428         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5429         to _looptemp_ clauses, other than the first two.
5430
5431 2018-07-17  Martin Liska  <mliska@suse.cz>
5432
5433         * opts.c: Do not enable OPT_falign_* for -Os.
5434
5435 2018-07-17  Martin Liska  <mliska@suse.cz>
5436
5437         * align.h (MAX_CODE_ALIGN): New.
5438         (MAX_CODE_ALIGN_VALUE): New.
5439         * common/config/i386/i386-common.c (ix86_handle_option):
5440         (MAX_CODE_ALIGN): Moved to align.h.
5441         * final.c (MAX_CODE_ALIGN): Likewise.
5442         * opts.c (parse_and_check_align_values):
5443         (MAX_CODE_ALIGN): Likewise.
5444         (MAX_CODE_ALIGN_VALUE): Likewise.
5445
5446 2018-07-17  Martin Liska  <mliska@suse.cz>
5447
5448         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5449         in order to fulfil coding style.
5450         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5451         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5452         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5453         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5454         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5455         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5456         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5457         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5458         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5459
5460 2018-07-17  Martin Liska  <mliska@suse.cz>
5461
5462         * align.h: New file.
5463         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5464         directly.
5465         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5466         align_flags of label_to_alignment.
5467         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5468         align_flags class.
5469         * config/m68k/m68k.c: Do not use removed align_labels_value and
5470         align_loops_value.
5471         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5472         (LOOP_ALIGN): Likewise.
5473         (LABEL_ALIGN): Likewise.
5474         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5475         Remove not used macro.
5476         (rs6000_loop_align): Change return type to align_flags.
5477         (rs6000_loop_align_max_skip): Remove.
5478         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5479         Change return type to align_flags.
5480         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5481         Remove not used macro.
5482         (rs6000_loop_align):  Change return type to align_flags.
5483         (rs6000_loop_align_max_skip): Remove.
5484         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5485         * config/rx/rx-protos.h (rx_align_for_label): Make it
5486         static function.
5487         * config/rx/rx.c (rx_align_for_label): Change return type
5488         to align_flags.
5489         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5490         macro definitions.
5491         into align_flags class.
5492         (LABEL_ALIGN): Likewise.
5493         (LOOP_ALIGN): Likewise.
5494         * config/s390/s390.c (s390_label_align): Use align_flags
5495         class member.
5496         (s390_asm_output_function_label): Likewise.
5497         * config/sh/sh.c (sh_override_options_after_change):
5498         Use align_flags class directly without macros.
5499         (find_barrier): Likewise.
5500         (barrier_align): Likewise.
5501         (sh_loop_align): Likewise.
5502         * config/spu/spu.c (spu_option_override):
5503         Use align_flags_tuple::get_value instead of removed macros.
5504         (spu_sched_init): Likewise.
5505         * config/spu/spu.h (GTY): Likewise.
5506         * config/visium/visium.c (visium_option_override):
5507         Set "8" as default secondary alignment.
5508         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5509         in order to guarantee secondary alignment of 8.
5510         * coretypes.h: Include align.h header file.
5511         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5512         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5513         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5514         * doc/tm.texi.in: Likewise.
5515         * final.c (struct label_alignment): Remove not used structure.
5516         (LABEL_ALIGN): Change type to align_flags.
5517         (LOOP_ALIGN): Likewise.
5518         (JUMP_ALIGN): Likewise.
5519         (default_loop_align_max_skip): Remove.
5520         (default_label_align_max_skip): Likewise.
5521         (default_jump_align_max_skip): Likewise.
5522         (default_label_align_after_barrier_max_skip):
5523         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5524         (LABEL_TO_MAX_SKIP): Remove.
5525         (label_to_alignment): Return align_flags type instead of integer.
5526         (label_to_max_skip): Remove.
5527         (align_fuzz): Use align_flags type.
5528         (compute_alignments): Use align_flags type and use align_flags::max
5529         to combine multiple alignments.
5530         (grow_label_align): Grow vec instead of C array.
5531         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5532         (shorten_branches):  Use align_flags type and use align_flags::max
5533         to combine multiple alignments.
5534         (final_scan_insn_1): Remove usage of secondary alignment that comes
5535         from label alignment, but instead use proper secondary alignment
5536         which is computed in grow_label_align.
5537         * flags.h (struct align_flags_tuple): Move to align.h.
5538         (struct align_flags): Likewise.
5539         (state_align_loops): Rename to align_loops.
5540         (state_align_jumps): Rename to align_jumps.
5541         (state_align_labels): Rename to align_labels.
5542         (state_align_functions): Rename to align_functions.
5543         (align_loops_log): Remove.
5544         (align_jumps_log): Remove.
5545         (align_labels_log): Remove.
5546         (align_functions_log): Remove.
5547         (align_loops_max_skip): Remove.
5548         (align_jumps_max_skip): Remove.
5549         (align_labels_max_skip): Remove.
5550         (align_functions_max_skip): Remove.
5551         (align_loops_value): Remove.
5552         (align_jumps_value): Remove.
5553         (align_labels_value): Remove.
5554         (align_functions_value): Remove.
5555         * output.h (label_to_alignment): Change return type to align_flags.
5556         (label_to_max_skip): Remove.
5557         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5558         jump_align_max_skip macros.
5559         * targhooks.h (default_loop_align_max_skip): Remove.
5560         (default_label_align_max_skip): Likewise.
5561         (default_jump_align_max_skip): Likewise.
5562         (default_label_align_after_barrier_max_skip): Remove.
5563         * toplev.c (read_log_maxskip): Use ::normalize function.
5564         (parse_N_M): Remove not used argument and also call ::normalize.
5565         (parse_alignment_opts): Do not pass unused arguments.
5566         * varasm.c (assemble_start_function): Use directly align_functions
5567         instead of removed macros.
5568         * system.h: Do not poison removed macros.
5569
5570 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5571
5572         PR middle-end/86539
5573         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5574         and cond temporaries don't have reference type if iterator has
5575         pointer type.  For init use &for_pre_body instead of pre_p if
5576         for_pre_body is non-empty.
5577
5578 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5579
5580         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5581         double-double modes to SFmode directly directly.
5582         (trunc<mode>sf2_fprs): Delete.
5583
5584 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5585
5586         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5587         for conversions between IFmode and the decimal floating point modes.
5588         (init_float128_ieee): Use the correct names for conversions between
5589         KFmode and the decimal floating point modes.
5590
5591 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5592
5593         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5594         for the conversions between TDmode and IFmode.
5595         (init_float128_ieee): Use more correct names for the conversions
5596         between TDmode and KFmode.
5597
5598 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5599
5600         PR tree-optimization/86526
5601         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5602         (inline_expand_builtin_string_cmp): Likewise.
5603         (inline_string_cmp): Likewise.  Use c_readstr instead of
5604         builtin_memcpy_read_str.  Add unit_mode temporary.
5605
5606 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5607
5608         PR middle-end/86528
5609         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5610         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5611
5612 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5613
5614         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5615         Alphabetize prototypes of built-in functions, separating out
5616         built-in functions that are listed in this section but should be
5617         described elsewhere.
5618
5619 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5620
5621         PR target/86511
5622         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5623         conditional move when trapping comparison was split to a
5624         non-trapping one (and vice versa).
5625
5626 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5627
5628         * config/s390/s390.c (s390_function_profiler): Generate nops
5629         instead of profiler call sequences.
5630         * config/s390/s390.opt: Add the new option.
5631
5632 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5633
5634         * config/s390/s390.c (s390_function_profiler): Generate
5635         __mcount_loc section.
5636         * config/s390/s390.opt: Add the new option.
5637
5638 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5639
5640         * common.opt: Add the new warning.
5641         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5642         %r0,__fentry__" when -mfentry is specified.
5643         (s390_option_override_internal): Disallow -mfentry for 31-bit
5644         CPUs.
5645         * config/s390/s390.opt: Add the new option.
5646
5647 2018-07-16  Richard Biener  <rguenther@suse.de>
5648
5649         PR lto/86523
5650         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5651         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5652
5653 2018-07-16  Martin Liska  <mliska@suse.cz>
5654
5655         PR ipa/86529
5656         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5657         to ::get_create.
5658
5659 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5660
5661         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5662
5663 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5664
5665         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5666         for ARCHS4x.
5667         * config/arc/arc-cpus.def (hs4x): New cpu.
5668         (hs4xd): Likewise.
5669         * config/arc/arc-tables.opt: Regenerate.
5670         * config/arc/arc.c (arc_sched_issue_rate): New function.
5671         (TARGET_SCHED_ISSUE_RATE): Define.
5672         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5673         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5674         fpu_cvt.
5675         (attr tune): Add ARCHS4x tune values.
5676         (attr tune_dspmpy): Define.
5677         (*tst): Correct instruction type.
5678         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5679         * config/arc/arcHS4x.md: New file.
5680         * config/arc/fpu.md: Update instruction type attributes.
5681         * config/arc/t-multilib: Regenerate.
5682
5683 2018-07-16  Tom de Vries  <tdevries@suse.de>
5684
5685         PR debug/86455
5686         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5687
5688 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5689
5690         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5691         early clobber.
5692
5693 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5694
5695         PR tree-optimization/86514
5696         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5697         conversion to a boolean type from a type with greater precision.
5698
5699 2018-07-16  Tom de Vries  <tdevries@suse.de>
5700
5701         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5702         dump_flags request TDF_SLIM.
5703
5704 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5705
5706         * fold-const.c (int_const_binop_1): Abstract...
5707         (wide_int_binop): ...wide int code here.
5708         (poly_int_binop): ...poly int code here.
5709         Abstract the rest of int_const_binop_1 into int_const_binop.
5710         * fold-const.h (wide_int_binop): New.
5711         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5712         Remove useless PLUS/MINUS_EXPR case.
5713         (zero_nonzero_bits_from_vr): Move wide int code...
5714         (zero_nonzero_bits_from_bounds): ...here.
5715         (extract_range_from_binary_expr_1): Move mask optimization code...
5716         (range_easy_mask_min_max): ...here.
5717         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5718         (range_easy_mask_min_max): New.
5719
5720 2018-07-15  Jeff Law  <law@redhat.com>
5721
5722         PR target/85993
5723         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5724         block.
5725
5726 2018-07-14  Jim Wilson  <jimw@sifive.com>
5727
5728         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5729
5730 2018-07-14  Paul Koning  <ni1d@arrl.net>
5731
5732         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5733
5734 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5735
5736         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5737         copying section.
5738
5739 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5740             Steve Munroe  <munroesj52@gmail.com>
5741
5742         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5743         (_mm_andnot_si128): Likewise.
5744         (_mm_or_si128): Likewise.
5745         (_mm_xor_si128): Likewise.
5746
5747 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5748
5749         PR middle-end/78809
5750         * builtins.c (expand_builtin_memcmp): Inline the calls first
5751         when result_eq is false.
5752         (expand_builtin_strcmp): Inline the calls first.
5753         (expand_builtin_strncmp): Likewise.
5754         (inline_string_cmp): New routine. Expand a string compare
5755         call by using a sequence of char comparison.
5756         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5757         a call to str(n)cmp/memcmp.
5758         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5759         New option.
5760         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5761
5762 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5763
5764         * config/arm/driver-arm.c: Include arm-native.h.
5765         (host_detect_local_cpu): Use auto-generated data tables.
5766         (vendors, arm_cpu_table): Delete.  Move part information to ...
5767         * config/arm/arm-cpus.in: ... here.
5768         * config/arm/parsecpu.awk (gen_native): New function.
5769         (vendor, part): New CPU fields.
5770         (END): Add support for building the native CPU detection tables.
5771         * config/arm/t-arm (arm-native.h): Add build rule.
5772         (driver-arm.o): Add dependency on arm-native.h.
5773
5774 2018-07-13  Richard Biener  <rguenther@suse.de>
5775
5776         PR middle-end/85974
5777         * match.pd (addr1 - addr2): Allow either of the operand to
5778         have a conversion.
5779
5780 2018-07-13  Tom de Vries  <tdevries@suse.de>
5781
5782         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5783         in remap_ssa_name.
5784
5785 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5786
5787         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5788         arrays instead of numbered variables.
5789
5790 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5791
5792         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5793         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5794
5795 2018-07-13  Richard Biener  <rguenther@suse.de>
5796
5797         PR debug/86452
5798         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5799         instead of get_context_die.
5800
5801 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5802             Richard Biener  <rguenther@suse.de>
5803
5804         PR middle-end/86489
5805         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5806         that the loop latch destination where phi is defined.
5807
5808 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5809
5810         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5811         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5812         (riscv_set_current_function): Extract getting interrupt type to new
5813         function.
5814         (riscv_get_interrupt_type): New function.
5815         (riscv_merge_decl_attributes): New function, checking interrupt type is
5816         same.
5817         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5818
5819 2018-07-12  Paul Koning  <ni1d@arrl.net>
5820
5821         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5822         directive.
5823
5824 2018-07-12  Paul Koning  <ni1d@arrl.net>
5825
5826         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5827         zero reference, add doloop_end instead.
5828         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5829         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5830         detail for doloop_end.
5831
5832 2018-07-12  Martin Sebor  <msebor@redhat.com>
5833
5834         PR c/86453
5835         * attribs.c (decl_attributes): Reject conflicting attributes before
5836         calling attribute handlers.
5837
5838 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5839
5840         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5841          parameter.
5842         (gcc::dump_manager::get_dump_file_name): likewise.
5843         (dump_begin): Likewise.
5844         * dumpfile.h (dump_begin): Update prototype.
5845         (gcc::dump_manager::get_dump_file_name,
5846         gcc::dump_manager::get_dump_file_name): Update prototype.
5847
5848 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5849
5850         * internal-fn.h (vectorizable_internal_fn_p): New function.
5851         * tree-vect-slp.c (compatible_calls_p): Likewise.
5852         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5853         to internal functions.
5854         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5855
5856 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5857
5858         * fold-const.h (inverse_conditions_p): Declare.
5859         * fold-const.c (inverse_conditions_p): New function.
5860         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5861         that test the inverse condition of a conditional internal function.
5862         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5863         * internal-fn.c (internal_fn_mask_index): Handle conditional
5864         internal functions.
5865         (vectorized_internal_fn_supported_p): New function.
5866         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5867         (any_pred_load_store): Replace with...
5868         (need_to_predicate): ...this new variable.
5869         (redundant_ssa_names): New variable.
5870         (ifcvt_can_use_mask_load_store): Move initial checks to...
5871         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5872         for which a conditional internal function exists.
5873         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5874         instead of ifcvt_can_use_mask_load_store.  Update after variable
5875         name change.
5876         (predicate_load_or_store): New function, split out from
5877         predicate_mem_writes.
5878         (check_redundant_cond_expr): New function.
5879         (value_available_p): Likewise.
5880         (predicate_rhs_code): Likewise.
5881         (predicate_mem_writes): Rename to...
5882         (predicate_statements): ...this.  Use predicate_load_or_store
5883         and predicate_rhs_code.
5884         (combine_blocks, tree_if_conversion): Update after above name changes.
5885         (ifcvt_local_dce): Handle redundant_ssa_names.
5886         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5887         general conditional functions.
5888         * tree-vect-stmts.c (vectorizable_call): Likewise.
5889
5890 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5891             Alan Hayward  <alan.hayward@arm.com>
5892             David Sherwood  <david.sherwood@arm.com>
5893
5894         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5895         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5896         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5897         plus and minus and convert them into IFN_COND_FMA-based sequences.
5898         (convert_mult_to_fma): Handle conditional plus and minus.
5899
5900 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5901
5902         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5903         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5904         (cond_fnms_optab): New optabs.
5905         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5906         internal functions.
5907         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5908         * internal-fn.h (get_conditional_internal_fn): Declare.
5909         (get_unconditional_internal_fn): Likewise.
5910         * internal-fn.c (cond_ternary_direct): New macro.
5911         (expand_cond_ternary_optab_fn): Likewise.
5912         (direct_cond_ternary_optab_supported_p): Likewise.
5913         (FOR_EACH_COND_FN_PAIR): Likewise.
5914         (get_conditional_internal_fn): New function.
5915         (get_unconditional_internal_fn): Likewise.
5916         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5917         (gimple_match_op::gimple_match_op): Add a new overload for 5
5918         operands.
5919         (gimple_match_op::set_op): Likewise.
5920         (gimple_resimplify5): Declare.
5921         * genmatch.c (decision_tree::gen): Generate simplifications for
5922         5 operands.
5923         * gimple-match-head.c (gimple_simplify): Define an overload for
5924         5 operands.  Handle calls with 5 arguments in the top-level overload.
5925         (convert_conditional_op): Handle conversions from unconditional
5926         internal functions to conditional ones.
5927         (gimple_resimplify5): New function.
5928         (build_call_internal): Pass a fifth operand.
5929         (maybe_push_res_to_seq): Likewise.
5930         (try_conditional_simplification): Try converting conditional
5931         internal functions to unconditional internal functions.
5932         Handle 3-operand unconditional forms.
5933         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5934         Define ternary equivalents of the current rules for binary conditional
5935         internal functions.
5936         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5937         ternary operations.
5938         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5939         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5940         (optab): Handle them.
5941         (SVE_COND_FP_TERNARY): New int iterator.
5942         (sve_fmla_op, sve_fmad_op): New int attributes.
5943         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5944         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5945         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5946
5947 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5948
5949         * target.def (preferred_else_value): New target hook.
5950         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5951         * doc/tm.texi: Regenerate.
5952         * targhooks.h (default_preferred_else_value): Declare.
5953         * targhooks.c (default_preferred_else_value): New function.
5954         * internal-fn.h (conditional_internal_fn_code): Declare.
5955         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5956         (get_conditional_internal_fn): Use it.
5957         (conditional_internal_fn_code): New function.
5958         * gimple-match.h (gimple_match_cond): New struct.
5959         (gimple_match_op): Add a cond member function.
5960         (gimple_match_op::gimple_match_op): Update all forms to take a
5961         gimple_match_cond.
5962         * genmatch.c (expr::gen_transform): Use the same condition as res_op
5963         for the suboperation, but don't specify a particular else_value.
5964         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5965         (visit_nary_op, visit_reference_op_load): Pass
5966         gimple_match_cond::UNCOND to the gimple_match_op constructor.
5967         * gimple-match-head.c: Include tree-eh.h
5968         (convert_conditional_op): New function.
5969         (maybe_resimplify_conditional_op): Likewise.
5970         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5971         (gimple_resimplify2): Likewise.
5972         (gimple_resimplify3): Likewise.
5973         (gimple_resimplify4): Likewise.
5974         (maybe_push_res_to_seq): Return null for conditional operations.
5975         (try_conditional_simplification): New function.
5976         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
5977         constructor.
5978         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5979         IFN_COND_* call.
5980         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5981         function.
5982         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5983
5984 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5985
5986         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5987         DECL_FCONTEXT
5988         (hash_tree): Do not hash DECL_FCONTEXT
5989         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5990         Do not stream DECL_FCONTEXT.
5991         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5992         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5993
5994 2018-07-12  Richard Biener  <rguenther@suse.de>
5995
5996         PR debug/86462
5997         * dwarf2out.c (gen_block_die): Only output blocks when they have
5998         at least one !DECL_IGNORED_P variable.
5999
6000 2018-07-12  Richard Biener  <rguenther@suse.de>
6001
6002         PR target/84829
6003         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6004         Remove -mieee-fp handling.
6005
6006 2018-07-12  Richard Biener  <rguenther@suse.de>
6007
6008         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6009         left-over from last patch.
6010
6011 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
6012
6013         PR tree-optimization/86492
6014         * gimple-ssa-store-merging.c
6015         (imm_store_chain_info::coalesce_immediate_stores): Call
6016         check_no_overlap even for the merge_overlapping case.  Formatting fix.
6017
6018 2018-07-12  Richard Biener  <rguenther@suse.de>
6019
6020         PR middle-end/86479
6021         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6022         move possibly trapping operations into the conditional.
6023
6024 2018-07-12  Richard Biener  <rguenther@suse.de>
6025
6026         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6027         (vn_lookup_simplify_result): Remove recursion limit applied
6028         here.
6029         (vn_nary_build_or_lookup_1): Adjust.
6030         (try_to_simplify): Likewise.
6031         * gimple-match-head.c (gimple_resimplify1): Instead apply one
6032         here.
6033         (gimple_resimplify2): Likewise.
6034         (gimple_resimplify3): Likewise.
6035         (gimple_resimplify4): Likewise.
6036
6037 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
6038
6039         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6040         Use __mmask64 type instead of __mmask8 for __M argument.
6041         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6042         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6043         __U argument.
6044         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6045         __mmask16 for __M argument.
6046         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6047         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6048         to __mmask16 instead of __mmask8.
6049         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6050         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6051         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6052         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6053         instead of __mmask16 for __U argument.
6054         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6055         __mmask16 instead of __mmask8 for __U argument.
6056         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6057         __U argument.
6058         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6059         __mmask16.
6060         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6061         argument.
6062         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6063         __U argument.
6064         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6065         __mmask16.
6066         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6067         of __mmask16.
6068         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6069         __U argument.
6070         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6071         __U argument.
6072         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6073         __U argument.
6074         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6075         __U argument.
6076         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6077         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6078         return type as well as __M argument type and all casts from __mmask8
6079         to __mmask32.
6080         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6081         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6082         return type as well as __M argument type and all casts from __mmask8
6083         to __mmask16.
6084         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6085         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6086         return type as well as __M argument type and all casts from __mmask8
6087         to __mmask32.
6088         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6089         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6090         return type as well as __M argument type and all casts from __mmask8
6091         to __mmask16.
6092         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6093         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6094         __mmask16.
6095
6096 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
6097
6098         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6099         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6100         for __U argument.
6101
6102 2018-07-11  Paul Koning  <ni1d@arrl.net>
6103
6104         * doc/md.texi (define_subst): Document how multiple occurrences of
6105         the same argument in the replacement pattern are handled.
6106
6107 2018-07-11  Paul Koning  <ni1d@arrl.net>
6108
6109         * doc/extend.texi (Common Variable Attributes): Move "mode" into
6110         alphabetical order.
6111         (Common Type Attributes): Add "mode" attribute.
6112
6113 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
6114
6115         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6116         stream DECL_ORIGINAL_TYPE.
6117         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6118         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6119         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6120         Do not walk original type.
6121         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6122         external decls.
6123         (write_ts_decl_non_common_tree_pointers): Do not stream
6124         DECL_ORIGINAL_TYPE
6125         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6126         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6127
6128 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6129
6130         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6131         thread twice from the same starting edge.
6132
6133 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6134
6135         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6136         * gimple.c (gimple_call_nonnull_result_p): ...here...
6137         (gimple_call_nonnull_arg): ...and here.
6138         * gimple.h (gimple_call_nonnull_result_p): New.
6139         (gimple_call_nonnull_arg): New.
6140
6141 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
6142
6143         * config/arm/arm-cpus.in: Move information from fpu field of each
6144         cpu definition to the isa field.
6145         * config/arm/parsecpu.awk (fpu): Delete match rule.
6146         (gen_comm_data): Don't add bits from the CPU's FPU entry.
6147
6148 2018-07-11  Richard Biener  <rguenther@suse.de>
6149
6150         PR debug/86457
6151         * dwarf2out.c (init_sections_and_labels): Use
6152         output_asm_line_debug_info consistently.
6153         (dwarf2out_early_finish): Likewise.
6154         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6155         type units.
6156
6157 2018-07-11  Richard Biener  <rguenther@suse.de>
6158
6159         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6160         Rework father_bb setting in a way to avoid propagating constants
6161         multiple times on a loop body.
6162
6163 2018-07-10  Mark Wielaard  <mark@klomp.org>
6164
6165         PR debug/86459
6166         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6167
6168 2018-07-10  Richard Biener  <rguenther@suse.de>
6169
6170         * hash-map.h (hash_map::iterator::operator*): Return
6171         references to key and value.
6172
6173 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
6174
6175         PR c++/86443
6176         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6177         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6178         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6179         (gimplify_omp_for): For composite loops, move outer
6180         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6181         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
6182         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
6183         TREE_LIST for both the original class iterator and the "last" helper
6184         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
6185         loop, remember has_decl_expr from outer composite loops for the
6186         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6187
6188 2018-07-09  Martin Sebor  <msebor@redhat.com>
6189
6190         PR middle-end/77357
6191         PR middle-end/86428
6192         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6193         accessing implicitly initialized array elements.
6194         * expr.c (string_constant): Handle string initializers of
6195         character arrays within aggregates.
6196         * gimple-fold.c (fold_array_ctor_reference): Add argument.
6197         Store element offset.  As a special case, handle zero size.
6198         (fold_nonarray_ctor_reference): Same.
6199         (fold_ctor_reference): Add argument.  Store subobject offset.
6200         * gimple-fold.h (fold_ctor_reference): Add argument.
6201
6202 2018-07-09  Paul Koning  <ni1d@arrl.net>
6203
6204         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6205         (pdp11_insn_cost): New function.
6206         (pdp11_md_asm_adjust): New function.
6207         (TARGET_INVALID_WITHIN_DOLOOP): Define.
6208         (pdp11_rtx_costs): Update to match machine better.
6209         (output_addr_const_pdp11): Correct format mismatch warnings.
6210         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6211         * config/pdp11/pdp11.md: General change to add base_cost and/or
6212         length attributes for use by new pdp11_insn_cost function.
6213         (MIN_BRANCH): Correct definition.
6214         (MIN_SOB): Ditto.
6215         (doloop_end): Use standard pattern name for looping pattern.
6216         (doloop_end_nocc): New.
6217         (movsf): Add another constraint alternative.
6218         (zero_extendqihi2): Add constraint alternatives for not in place
6219         extend.
6220         (zero_extendhisi2): Remove.
6221         (shift patterns): Add CC handling variants.
6222         (bswaphi2): New.
6223         (bswapsi2): New.
6224         (rothi3): New.
6225         (define_peephole2): New peephole to recognize mov that sets CC for
6226         subsequent test.
6227
6228 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6229
6230         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6231         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6232         wi::add.
6233
6234 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
6235
6236         PR c/86420
6237         * real.c (real_nextafter): Return true if result is denormal.
6238
6239 2018-07-09  Martin Liska  <mliska@suse.cz>
6240
6241         * common.opt: Add back wrongly removed attribute.
6242
6243 2018-07-09  Richard Biener  <rguenther@suse.de>
6244
6245         PR debug/86413
6246         * dwarf2out.c (gen_block_die): For an early generated DIE
6247         always output high/low PC attributes.
6248
6249 2018-07-09  Tom de Vries  <tdevries@suse.de>
6250
6251         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6252         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6253         onto VAR_DECL with abstract origin.
6254
6255 2018-07-07  Jim Wilson  <jimw@sifive.com>
6256
6257         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6258
6259 2018-07-07  Tom de Vries  <tdevries@suse.de>
6260
6261         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6262
6263 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
6264
6265         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6266         overflow_type.
6267         (combine_bound): Use wide-int overflow calculation instead of
6268         rolling our own.
6269         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6270         overflow_type.
6271         * fold-const.c (int_const_binop_2): Same.
6272         (extract_muldiv_1): Same.
6273         (fold_div_compare): Same.
6274         (fold_abs_const): Same.
6275         * match.pd: Same.
6276         * poly-int.h (add): Same.
6277         (sub): Same.
6278         (neg): Same.
6279         (mul): Same.
6280         * predict.c (predict_iv_comparison): Same.
6281         * profile-count.c (slow_safe_scale_64bit): Same.
6282         * simplify-rtx.c (simplify_const_binary_operation): Same.
6283         * tree-chrec.c (tree_fold_binomial): Same.
6284         * tree-data-ref.c (split_constant_offset_1): Same.
6285         * tree-if-conv.c (idx_within_array_bound): Same.
6286         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6287         * tree-ssa-phiopt.c (minmax_replacement): Same.
6288         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6289         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6290         * vr-values.c (vr_values::adjust_range_with_scev): Same.
6291         * wide-int.cc (wi::add_large): Same.
6292         (wi::mul_internal): Same.
6293         (wi::sub_large): Same.
6294         (wi::divmod_internal): Same.
6295         * wide-int.h: Change overflow type to overflow_type for neg, add,
6296         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6297         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6298         mul_internal, divmod_internal.
6299         (overflow_type): New enum.
6300         (accumulate_overflow): New.
6301
6302 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6303
6304         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6305         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6306
6307 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6308
6309         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6310         argument is checked for zero before entering loop, avoid checking again.
6311
6312 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6313
6314         * gimplify.h (generic_expr_could_trap_p): Set as global function.
6315         * gimplify.h (generic_expr_could_trap_p): Likwise.
6316         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6317
6318 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
6319
6320         PR tree-optimization/86401
6321         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6322         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6323         (fold_bit_and_mask): ... here.  New helper function for match.pd.
6324         * fold-const.h (fold_bit_and_mask): Declare.
6325         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6326
6327 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
6328
6329         PR target/86324
6330         * target.def (translate_mode_attribute): New hook.
6331         * targhooks.h (default_translate_mode_attribute): Declare.
6332         * targhooks.c (default_translate_mode_attribute): New function.
6333         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6334         * doc/tm.texi: Regenerate.
6335         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6336         (rs6000_translate_mode_attribute): New function.
6337
6338 2018-07-06  Paul Koning  <ni1d@arrl.net>
6339
6340         * doc/md.texi (define_split): Document DONE and FAIL.
6341         (define_peephole2): Ditto.
6342
6343 2018-07-05  Jeff Law  <law@redhat.com>
6344
6345         PR tree-optimization/86010
6346         * tree-ssa-dse.c (compute_trims): More aggressively trim at
6347         both the head and tail of mem* and str* calls.
6348
6349 2018-07-05  Jim Wilson  <jimw@sifive.com>
6350
6351         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6352
6353 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
6354
6355         * config/aarch64/aarch64-simd.md: correct flags text for
6356         MIN_EXPR replacement.
6357
6358 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
6359
6360         * configure: Regenerated.
6361
6362 2018-07-05  Carl Love  <cel@us.ibm.com>
6363
6364         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6365         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6366         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6367         VSX_BUILTIN_DOUBLEL_V4SF.
6368
6369 2018-07-05  Martin Sebor  <msebor@redhat.com>
6370
6371         PR c++/86400
6372         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6373         than its domain to compute its the upper bound of a char array.
6374
6375 2018-07-05  Nathan Sidwell  <nathan@acm.org>
6376
6377         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6378         * doc/cpp.texi: Update comment.
6379         * doc/tm.texi: Rebuilt.
6380         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6381         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6382         * doc/extend.texi (Backwards Compatibility): Clarify it is system
6383         headers affected by extern "C".
6384         * system.h: Poison NO_IMPLICIT_EXTERN_C.
6385         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6386         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6387         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6388         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6389         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6390         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6391         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6392         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6393         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6394         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6395         config/sparc/sp64-elf.h, config/spu/spu.h,
6396         config/stormy16/stormy16.h, config/v850/v850.h,
6397         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6398         define NO_IMPLICIT_EXTERN_C.
6399         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6400
6401 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6402
6403         PR target/84711
6404         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6405         instead of GET_MODE_SIZE when comparing Units.
6406
6407 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6408
6409         PR target/84711
6410         * rtlanal.c (set_noop_p): Constrain on mode change,
6411         include hard-reg-set.h
6412
6413 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6414
6415         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6416
6417 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
6418
6419         Revert
6420         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6421
6422         PR sanitizer/84250
6423         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6424         libasan.
6425         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6426
6427 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6428
6429         PR sanitizer/84250
6430         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6431         libasan.
6432         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6433
6434 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
6435
6436         PR middle-end/86380
6437         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6438
6439 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
6440
6441         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6442         neg_*_op* variables.
6443
6444 2018-07-04  Martin Liska  <mliska@suse.cz>
6445
6446         * tree-switch-conversion.c: Define
6447         max_ratio_for_speed and max_ratio_for_size constants.
6448
6449 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6450             Martin Liska  <mliska@suse.cz>
6451
6452         PR middle-end/66240
6453         PR target/45996
6454         PR c/84100
6455         * common.opt: Rename align options with 'str_' prefix.
6456         * common/config/i386/i386-common.c (set_malign_value): New
6457         function.
6458         (ix86_handle_option): Use it to set -falign-* options/
6459         * config/aarch64/aarch64-protos.h (struct tune_params): Change
6460         type from int to string.
6461         * config/aarch64/aarch64.c: Update default values from int
6462         to string.
6463         * config/alpha/alpha.c (alpha_override_options_after_change):
6464         Likewise.
6465         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6466         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6467         max skip conditionally.
6468         * config/i386/freebsd.h (SUBALIGN_LOG): New.
6469         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6470         max skip conditionally.
6471         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6472         max skip conditionally.
6473         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6474         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6475         max skip conditionally.
6476         * config/i386/i386.c (struct ptt): Change type from int to
6477         string.
6478         (ix86_default_align): Set default values.
6479         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6480         max skip conditionally.
6481         * config/i386/iamcu.h (SUBALIGN_LOG): New.
6482         (ASM_OUTPUT_MAX_SKIP_ALIGN):
6483         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6484         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6485         max skip conditionally.
6486         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6487         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6488         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6489         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6490         max skip conditionally.
6491         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6492         * config/ia64/ia64.c (ia64_option_override): Set default values
6493         for alignment options.
6494         * config/m68k/m68k.c: Handle new str_align_* options.
6495         * config/mips/mips.c (mips_set_compression_mode): Change
6496         type of constants.
6497         (mips_option_override): Set default values for options.
6498         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6499         Likewise.
6500         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6501         Likewise.
6502         * config/rx/rx.c (rx_option_override): Likewise.
6503         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6504         (LABEL_ALIGN): Use align_labels_log.
6505         (LOOP_ALIGN): Use align_loops_align.
6506         * config/s390/s390.c (s390_asm_output_function_label): Use new
6507         macros.
6508         * config/sh/sh.c (sh_override_options_after_change):
6509         Change type of constants.
6510         * config/spu/spu.c (spu_sched_init): Likewise.
6511         * config/sparc/sparc.c (sparc_option_override): Set default
6512         values for options.
6513         * config/visium/visium.c (visium_option_override): Likewise.
6514         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6515         emit p2align format with last argument if it's not needed.
6516         * doc/invoke.texi: Document extended format of -falign-*.
6517         * final.c: Use align_labels alignment.
6518         * flags.h (struct target_flag_state): Change type to use
6519         align_flags.
6520         (struct align_flags_tuple): New.
6521         (struct align_flags): Likewise.
6522         (align_loops_log): Redefine macro to use new types.
6523         (align_loops_max_skip): Redefine macro to use new types.
6524         (align_jumps_log): Redefine macro to use new types.
6525         (align_jumps_max_skip): Redefine macro to use new types.
6526         (align_labels_log): Redefine macro to use new types.
6527         (align_labels_max_skip): Redefine macro to use new types.
6528         (align_functions_log): Redefine macro to use new types.
6529         (align_loops): Redefine macro to use new types.
6530         (align_jumps): Redefine macro to use new types.
6531         (align_labels): Redefine macro to use new types.
6532         (align_functions): Redefine macro to use new types.
6533         (align_functions_max_skip): Redefine macro to use new types.
6534         (align_loops_value): New macro.
6535         (align_jumps_value): New macro.
6536         (align_labels_value): New macro.
6537         (align_functions_value): New macro.
6538         * function.c (invoke_set_current_function_hook): Propagate
6539         alignment values from flags to global variables default in
6540         topleev.h.
6541         * ipa-icf.c (sem_function::equals_wpa): Use
6542         cl_optimization_option_eq instead of memcmp.
6543         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6544         of string types.
6545         (cl_optimization_stream_in): Likewise.
6546         * optc-save-gen.awk: Support strings in cl_optimization.
6547         * opth-gen.awk: Likewise.
6548         * opts.c (finish_options): Remove error checking of invalid
6549         value ranges.
6550         (MAX_CODE_ALIGN): Remove.
6551         (MAX_CODE_ALIGN_VALUE): Likewise.
6552         (parse_and_check_align_values): New function.
6553         (check_alignment_argument): Likewise.
6554         (common_handle_option): Use check_alignment_argument.
6555         * opts.h (parse_and_check_align_values): Declare.
6556         * toplev.c (init_alignments): Remove.
6557         (read_log_maxskip): New.
6558         (parse_N_M): Likewise.
6559         (parse_alignment_opts): Likewise.
6560         (backend_init_target): Remove usage of init_alignments.
6561         * toplev.h (parse_alignment_opts): Declare.
6562         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6563         argument.
6564         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6565         * tree.c (cl_option_hasher::equal): New.
6566         * varasm.c: Use new global macros.
6567
6568 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6569
6570         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6571         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6572         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6573         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6574         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6575         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6576         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6577         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6578         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6579         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6580         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6581         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6582         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6583
6584 2018-07-04  Martin Liska  <mliska@suse.cz>
6585             Jonathan Wakely  <jwakely@redhat.com>
6586
6587         * coverage.c: Use correct type.
6588         * doc/invoke.texi: Language correction.
6589
6590 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6591
6592         PR target/85620
6593         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6594         ENDBRANCH for non-tail call which may return via indirect branch.
6595         * doc/extend.texi: Document indirect_return attribute.
6596
6597 2018-07-03  Martin Sebor  <msebor@redhat.com>
6598
6599         PR tree-optimization/86274
6600         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6601         precondition.
6602         (format_floating): Correct handling of infinities and NaNs.
6603
6604 2018-07-03  Martin Sebor  <msebor@redhat.com>
6605
6606         * print-tree.c (print_real_cst): New function.
6607         (print_node_brief): Call it.
6608         (print_node): Ditto.
6609
6610 2018-07-03  Jeff Law  <law@redhat.com>
6611
6612         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6613         into a single pattern.
6614
6615         * config/h8300/h8300.md (ors code_iterator): New.
6616         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6617         a single pattern and single splitter.
6618         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6619         (iorqi3_1, xorqi3_1): Likewise.
6620         (iorqi3, xorqi3 expanders): Similarly.
6621
6622         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6623         (movmd_internal) into a single pattern using the P mode iterator.
6624         (movmd splitters): Similarly.
6625         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6626         (movsd splitters): Similarly.
6627
6628         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6629         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6630         right table based on the size of the operand.
6631         * config/h8300/h8300.md (length_table): Corresponding changes. All
6632         references to "addb", "addw" and "addl" changed to "add".
6633         (btst patterns): Merge two variants into a single pattern.
6634         (tstqi, tsthi): Likewise.
6635         (addhi3_incdec, addsi3_incdec): Likewise.
6636         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6637         (mulhi3, mulsi3): Likewise.
6638         (udivhi3, udivsi3): Likewise.
6639         (divhi3, divsi3): Likewise.
6640         (andorqi3, andorhi3, andorsi3): Likewise.
6641
6642 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6643
6644         PR target/85694
6645         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6646         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6647
6648 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6649
6650         PR tree-optimization/85694
6651         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6652         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6653         UNSPEC_URHADD.
6654         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6655         (<u>avg<mode>3_ceil): New patterns.
6656
6657 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6658
6659         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6660         scan-tree-dump directive.
6661         * gcc.dg/vect/slp-perm-2.c: Likewise.
6662         * gcc.dg/vect/slp-perm-3.c: Likewise.
6663         * gcc.dg/vect/slp-perm-5.c: Likewise.
6664         * gcc.dg/vect/slp-perm-6.c: Likewise.
6665         * gcc.dg/vect/slp-perm-7.c: Likewise.
6666         * gcc.dg/vect/slp-perm-8.c: Likewise.
6667
6668 2018-07-03  Marek Polacek  <polacek@redhat.com>
6669
6670         PR middle-end/86202
6671         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6672
6673 2018-07-03  Richard Biener  <rguenther@suse.de>
6674
6675         PR ipa/86389
6676         * tree-ssa-structalias.c (find_func_clobbers): Properly
6677         handle indirect calls.
6678
6679 2018-07-03  Jeff Law  <law@redhat.com>
6680
6681         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6682         (shifts): New code iterator.
6683         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6684         expander.  Fix HImode handling on H8/SX.
6685         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6686         (subqi3, subhi3, subsi3 expanders): Likewise.
6687         (andqi3, andhi3, andsi3 expanders): Likewise.
6688         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6689         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6690         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6691         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6692         (zero_extendqihi2, zero_extendqisi2): Likewise.
6693         (extendqihi2, extendqisi2): Likewise.
6694         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6695         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6696         (rotlqi3_1, rotlhi3_1): Likewise.
6697         (logicalhi3_sn, logicalsi3_sn): Likewise.
6698         (logicalhi3, logicalsi3): Likewise.
6699
6700 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6701
6702         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6703         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6704         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6705         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6706         type to append_pattern_def_seq instead of creating a stmt_vec_info
6707         directly.
6708         (build_mask_conversion): Likewise.  Remove vinfo argument.
6709         (vect_add_conversion_to_patterm): Likewise, renaming to...
6710         (vect_add_conversion_to_pattern): ...this.
6711         (vect_recog_mask_conversion_pattern): Update call to
6712         build_mask_conversion.  Pass the vector type to
6713         append_pattern_def_seq here too.
6714         (vect_recog_gather_scatter_pattern): Update call to
6715         vect_add_conversion_to_pattern.
6716
6717 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6718
6719         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6720         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6721         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6722         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6723         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6724         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6725         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6726         append_pattern_def_seq instead of new_pattern_def_seq.
6727         (vect_recog_divmod_pattern): Do both of the above.
6728         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6729         is null.
6730
6731 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6732
6733         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6734         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6735         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6736         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6737         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6738         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6739         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6740         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6741         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6742         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6743         parameter with a single stmt_vec_info.
6744         (vect_recog_func_ptr): Likewise.
6745         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6746         (vect_try_gather_scatter_pattern): ...this.
6747         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6748         the stmt_vec_info of the statement to be matched.  Don't clear
6749         STMT_VINFO_RELATED_STMT.
6750         (vect_pattern_recog): Update call accordingly.
6751
6752 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6753
6754         PR tree-optimization/85694
6755         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6756         (uavgM3_ceil): Document new optabs.
6757         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6758         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6759         functions.
6760         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6761         (savg_ceil_optab): New optabs.
6762         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6763         (vect_vect_recog_func_ptrs): Add it.
6764         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6765         constant directly from the associated lhs.
6766
6767 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6768
6769         * tree-vect-patterns.c (vect_split_statement): New function.
6770         (vect_convert_input): Use it to try to split an existing cast.
6771
6772 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6773
6774         * poly-int.h (print_hex): New function.
6775         * dumpfile.h (dump_dec, dump_hex): Declare.
6776         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6777         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6778         min_input_precision, operation_precision and operation_sign.
6779         * tree-vect-patterns.c (vect_get_range_info): New function.
6780         (vect_same_loop_or_bb_p, vect_single_imm_use)
6781         (vect_operation_fits_smaller_type): Delete.
6782         (vect_look_through_possible_promotion): Add an optional
6783         single_use_p parameter.
6784         (vect_recog_over_widening_pattern): Rewrite to use new
6785         stmt_vec_info infomration.  Handle one operation at a time.
6786         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6787         (vect_truncatable_operation_p, vect_set_operation_type)
6788         (vect_set_min_input_precision): New functions.
6789         (vect_determine_min_output_precision_1): Likewise.
6790         (vect_determine_min_output_precision): Likewise.
6791         (vect_determine_precisions_from_range): Likewise.
6792         (vect_determine_precisions_from_users): Likewise.
6793         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6794         (vect_vect_recog_func_ptrs): Put over_widening first.
6795         Add cast_forwprop.
6796         (vect_pattern_recog): Call vect_determine_precisions.
6797
6798 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6799
6800         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6801         statements that have been replaced by further pattern statements.
6802         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6803
6804 2018-07-03  Richard Biener  <rguenther@suse.de>
6805
6806         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6807         always set *dt.  Dump vectype in vectype overload.
6808         * dumpfile.h (dump_gimple_expr): New function.
6809         (dump_gimple_expr_loc): Likewise.
6810         * dumpfile.c (dump_gimple_expr): New function.
6811         (dump_gimple_expr_loc): Likewise.
6812
6813 2018-07-02  Jeff Law  <law@redhat.com>
6814
6815         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6816         the H8/300, H8/300H and H8/S variants into a single pattern.
6817         (movhi_h8300, movqi_h8300hs): Similarly.
6818         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6819         (QHI mode iterator): New.
6820
6821         * config/h8300/h8300.md: Remove trailing whitespace.
6822
6823 2018-07-02  Jim Wilson  <jimw@sifive.com>
6824
6825         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6826         instead of emit_insn for interrupt returns.
6827         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6828         (riscv_sret, riscv_uret): Likewise.
6829
6830 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6831
6832         * pretty-print.c (selftest::test_pp_format): Move save and restore
6833         of quotes to class auto_fix_quotes, and add an instance.
6834         * selftest.c: Include "intl.h".
6835         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6836         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6837         * selftest.h (selftest::auto_fix_quotes): New class.
6838
6839 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6840
6841         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6842         (aarch64_sve_prepare_conditional_op): Remove.
6843         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6844         Allow aarch64_simd_reg_or_zero as select operand; remove
6845         the aarch64_sve_prepare_conditional_op call.
6846         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6847         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6848         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6849         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6850         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6851         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6852         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6853         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6854         and a splitters to match all of the *_any patterns.
6855         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6856
6857         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6858         (SVE_COND_FP_BINARY_REV): Remove.
6859         (sve_int_op_rev, sve_fp_op_rev): New.
6860         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6861         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6862         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6863         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6864         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6865         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6866         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6867         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6868         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6869
6870         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6871         Remove match_dup 1 from the inner unspec.
6872         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6873
6874         * config/aarch64/aarch64.md (movprfx): New attr.
6875         (length): Default movprfx to 8.
6876         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6877         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6878         (*<su>mul<SVE_I>3_highpart): Likewise.
6879         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6880         (*v<ASHIFT><SVE_I>3): Likewise.
6881         (*<su><MAXMIN><SVE_I>3): Likewise.
6882         (*<su><MAXMIN><SVE_F>3): Likewise.
6883         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6884         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6885         (*div<SVE_F>4): Likewise.
6886
6887 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6888
6889         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6890         in dump string.
6891
6892 2018-07-02  Richard Biener  <rguenther@suse.de>
6893
6894         PR tree-optimization/86363
6895         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6896         memset argument refers to a non-variable address.
6897
6898 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6899
6900         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6901         {PLUS,MINUS}_EXPR code to...
6902         (adjust_symbolic_bound): ...here,
6903         (combine_bound): ...here,
6904         (set_value_range_with_overflow): ...and here.
6905
6906 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6907
6908         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6909         code...
6910         (extract_range_from_abs_expr): ...here.
6911
6912 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6913
6914         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6915         -fno-omit-frame-pointer when not optimizing.
6916
6917 2018-07-02  Martin Liska  <mliska@suse.cz>
6918
6919         PR ipa/86279
6920         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6921         (propagate_nothrow): Likewise.
6922
6923 2018-07-02  Martin Liska  <mliska@suse.cz>
6924
6925         PR ipa/86323
6926         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6927
6928 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6929
6930         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6931         function in r262149, changing "loc" param from source_location to
6932         const dump_location_t &.
6933         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6934         declaration, as above.
6935
6936 2018-07-01  Paul Koning  <ni1d@arrl.net>
6937
6938         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6939         -munit-asm, -mgnu-asm, -mdec-asm.
6940         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6941         (pdp11_output_labelref): New.
6942         (pdp11_output_def): New.
6943         (pdp11_output_addr_vec_elt): New.
6944         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
6945         %# and %@ format codes.
6946         (pdp11_option_override): New.
6947         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6948         (pdp11_output_ident): New.
6949         (pdp11_asm_named_section): New.
6950         (pdp11_asm_init_sections): New.
6951         (pdp11_file_start): New.
6952         (pdp11_file_end): New.
6953         (output_ascii): Use .ascii/.asciz for -mdec-asm.
6954         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
6955         %o, like %c but octal.
6956         (pdp11_option_override): New.
6957         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6958         -mdec-asm.
6959         (DATA_SECTION_ASM_OP): Ditto.
6960         (READONLY_DATA_SECTION_ASM_OP): New.
6961         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6962         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6963         (ASM_OUTPUT_LABELREF): Ditto.
6964         (ASM_OUTPUT_DEF): Ditto.
6965         (ASM_OUTPUT_EXTERNAL): New.
6966         (ASM_OUTPUT_SOURCE_FILENAME): New.
6967         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6968         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6969         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
6970         %# and %@ format codes.
6971         * config/pdp11/pdp11.opt (mgnu-asm): New.
6972         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6973         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6974         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6975
6976 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
6977
6978         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6979         dereferencing path[] beyond its length.
6980         (debug_path): New.
6981         (debug_all_paths): New.
6982         (rewire_first_differing_edge): New.
6983         (adjust_paths_after_duplication): New.
6984         (duplicate_thread_path): Call adjust_paths_after_duplication.
6985         Add new argument.
6986         (thread_through_all_blocks): Add new argument to
6987         duplicate_thread_path.
6988
6989 2018-06-30  Jim Wilson  <jimw@sifive.com>
6990
6991         * config/riscv/predicates.md (p2m1_shift_operand): New.
6992         (high_mask_shift_operand): New.
6993         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6994         pattern using p2m1_shift_operand.
6995         (lshsi3_zero_extend_3+2): New combiner pattern using
6996         high_mask_shift_operand.
6997
6998 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6999
7000         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7001         split out from...
7002         (vect_recog_rotate_pattern): ...here.
7003         (vect_convert_input): Try to insert casts of invariants in the
7004         preheader.
7005         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7006         preheader to be empty.
7007
7008 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7009
7010         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7011         vector type.  If given, install it in the new statement's
7012         STMT_VINFO_VECTYPE.
7013         (vect_element_precision): New function.
7014         (vect_unpromoted_value): New struct.
7015         (vect_unpromoted_value::vect_unpromoted_value): New function.
7016         (vect_unpromoted_value::set_op): Likewise.
7017         (vect_look_through_possible_promotion): Likewise.
7018         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7019         (vect_widened_op_tree, vect_convert_input): Likewise.
7020         (vect_convert_inputs, vect_convert_output): Likewise.
7021         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7022         to handle the optional cast of the multiplication result and
7023         vect_widened_op_tree to detect the widened multiplication itself.
7024         Do not require the input and output of promotion casts to have
7025         the same sign, but base the signedness of the operation on the
7026         input rather than the result.  If the pattern includes two
7027         promotions, check that those promotions have the same sign.
7028         Do not restrict the MULT_EXPR handling to a double-width result;
7029         handle quadruple-width results and wider.  Use vect_convert_inputs
7030         to convert the inputs to the common type.
7031         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
7032         to handle the optional cast of the ABS result.  Also allow a sign
7033         change or a sign extension between the ABS and MINUS.
7034         Use vect_widened_op_tree to detect the widened subtraction and use
7035         vect_convert_inputs to convert the inputs to the common type.
7036         (vect_handle_widen_op_by_const): Delete.
7037         (vect_recog_widen_op_pattern): New function.
7038         (vect_recog_widen_mult_pattern): Use it.
7039         (vect_recog_widen_shift_pattern): Likewise.
7040         (vect_recog_widen_sum_pattern): Use
7041         vect_look_through_possible_promotion to handle the promoted
7042         PLUS_EXPR operand.
7043
7044 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7045
7046         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7047         the containing gimple_seq *.
7048         * gimple-iterator.h (gsi_for_stmt): Declare it.
7049         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7050         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7051         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7052         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7053         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7054         checks.
7055         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7056         split out from...
7057         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
7058         statement being replaced is part of an existing pattern
7059         definition sequence, inserting the new pattern statements before
7060         the original one.
7061         (vect_pattern_recog_1): Don't return a bool.  If the statement
7062         is already part of a pattern, instead apply pattern matching
7063         to the pattern definition statements.  Don't clear the
7064         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7065         (vect_pattern_recog): Don't break after the first match;
7066         continue processing the pattern definition statements instead.
7067         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7068
7069 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7070
7071         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7072         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7073         (vect_recog_widen_sum_pattern): Use it.
7074
7075 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7076
7077         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7078         phi is not a pattern statement and has not been replaced by
7079         a pattern statement.
7080         * tree-vect-patterns.c (type_conversion_p): Don't check
7081         STMT_VINFO_IN_PATTERN_P.
7082         (vect_recog_vector_vector_shift_pattern): Likewise.
7083         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7084         the pattern statement rather than the original statement; check
7085         directly for a WIDEN_MULT_EXPR here.
7086         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7087         vect_is_simple_use to return the pattern statement rather
7088         than the original statement; use is_pattern_stmt_p to check
7089         for such a pattern statement.
7090         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7091         to return the pattern statement rather than the original statement;
7092         don't do the same transformation here.
7093         (vect_is_simple_use): If the defining statement has been replaced
7094         by a pattern statement, return the pattern statement instead.
7095         Remove the corresponding (local) transformation from the vectype
7096         overload.
7097
7098 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7099
7100         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7101         end and default to null.
7102         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7103         (vectorizable_reduction): Update calls accordingly, dropping the
7104         gimple ** argument if the passed-back statement isn't needed.
7105         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7106         (vect_recog_rotate_pattern): Likewise.
7107         (vect_recog_mask_conversion_pattern): Likewise.
7108         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7109         (vect_mask_constant_operand_p): Likewise.
7110         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7111         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7112         (get_group_load_store_type, get_load_store_type): Likewise.
7113         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7114         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7115         (vectorizable_conversion, vectorizable_assignment): Likewise.
7116         (vectorizable_shift, vectorizable_operation): Likewise.
7117         (vectorizable_store, vect_is_simple_cond): Likewise.
7118         (vectorizable_condition, vectorizable_comparison): Likewise.
7119         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7120         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7121         and move it to the end.  Cope with null def_stmt_outs.
7122
7123 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7124
7125         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7126
7127 2018-06-29  Jeff Law  <law@redhat.com>
7128
7129         * config/v850/v850.c (v850_legitimate_address_p): Handle large
7130         displacements for TARGET_V850E2V3 and newer.
7131         (TARGET_LRA_P): Remove.  Defaults to LRA now.
7132         * config/v850/v850.md (sign23byte_load): Remove.
7133         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7134         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7135
7136 2018-06-29  Martin Liska  <mliska@suse.cz>
7137
7138         PR lto/85759
7139         * coverage.c (coverage_init): Mangle full path name.
7140         * doc/invoke.texi: Document the change.
7141         * gcov-io.c (mangle_path): New.
7142         * gcov-io.h (mangle_path): Likewise.
7143         * gcov.c (mangle_name): Use mangle_path for path mangling.
7144
7145 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7146
7147         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7148         if starting source register is not even.
7149
7150 2018-06-29  Martin Liska  <mliska@suse.cz>
7151
7152         PR tree-optimization/86263
7153         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7154         Make edge redirection.
7155
7156 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
7157
7158         * dumpfile.c (dump_loc): Add indentation based on scope depth.
7159         (dump_scope_depth): New variable.
7160         (get_dump_scope_depth): New function.
7161         (dump_begin_scope): New function.
7162         (dump_end_scope): New function.
7163         * dumpfile.h (get_dump_scope_depth): New declaration.
7164         (dump_begin_scope): New declaration.
7165         (dump_end_scope): New declaration.
7166         (class auto_dump_scope): New class.
7167         (AUTO_DUMP_SCOPE): New macro.
7168         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7169         AUTO_DUMP_SCOPE.
7170
7171 2018-06-29  Richard Biener  <rguenther@suse.de>
7172
7173         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7174         compute_all_dependences succeeds.
7175         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7176         exceed --param loop-max-datarefs-for-datadeps.
7177
7178 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
7179
7180         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7181
7182 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
7183
7184         PR target/86348
7185         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7186         alternative 0 in preferred_for_speed attribute.
7187
7188 2018-06-28  Paul Koning  <ni1d@arrl.net>
7189
7190         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7191         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7192         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7193         * config/pdp11/pdp11.md: Correct "length" attribute calculation
7194         for shift insn patterns.
7195
7196 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
7197
7198         * cgraph.c (cgraph_node::get_body): Replace assignments to
7199         "dump_file" with calls to set_dump_file.
7200         * dumpfile.c (alt_dump_file): Make static, and group with...
7201         (alt_flags): ...this definition.
7202         (dumps_are_enabled): New variable.
7203         (refresh_dumps_are_enabled): New function.
7204         (set_dump_file): New function.
7205         (set_alt_dump_file): New function.
7206         (gcc::dump_manager::dump_start): Replace assignments to
7207         "dump_file" and "alt_dump_file" with calls to set_dump_file and
7208         set_alt_dump_file.
7209         (gcc::dump_manager::dump_finish): Likewise.
7210         * dumpfile.h (alt_dump_file): Delete decl.
7211         (dumps_are_enabled): New variable decl.
7212         (set_dump_file): New function decl.
7213         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7214         global.
7215         * tree-nested.c (lower_nested_functions): Replace assignments to
7216         "dump_file" with calls to set_dump_file.
7217
7218 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7219
7220         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7221         goto_locus of each outgoing edge of each basic block.
7222
7223 2018-06-28  Richard Biener  <rguenther@suse.de>
7224
7225         * dwarf2out.c (decl_scope_table): Remove.
7226         (push_decl_scope): Likewise.
7227         (pop_decl_scope): Likewise.
7228         (gen_type_die_for_member): Do not call push/pop_decl_scope.
7229         (gen_struct_or_union_type_die): Likewise.
7230         (gen_tagged_type_die): Likewise.
7231         (dwarf2out_init): Do not initialize decl_scope_table.
7232         (dwarf2out_c_finalize): Do not free it.
7233
7234 2018-06-28  Richard Biener  <rguenther@suse.de>
7235
7236         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7237         deciding whether to not re-use a DIE.
7238
7239 2018-06-28  Richard Biener  <rguenther@suse.de>
7240
7241         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7242         DW_AT_abstract_origin attribute.
7243
7244 2018-06-28  Martin Liska  <mliska@suse.cz>
7245
7246         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7247         Use newly introduced constants.
7248         * tree-switch-conversion.h (struct jump_table_cluster):
7249         Define max_ratio_for_size and max_ratio_for_speed.
7250
7251 2018-06-28  Martin Liska  <mliska@suse.cz>
7252
7253         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7254         Add new checking assert to catch invalid state.
7255         (jump_table_cluster::can_be_handled): Handle single case
7256         clusters.
7257         (jump_table_cluster::is_beneficial): Bail out for such case.
7258         (bit_test_cluster::find_bit_tests):
7259         Add new checking assert to catch invalid state.
7260         (bit_test_cluster::can_be_handled): Handle single case
7261         clusters.
7262         (bit_test_cluster::is_beneficial): Bail out for such case.
7263         (switch_decision_tree::analyze_switch_statement):
7264         Fix comment.
7265
7266 2018-06-28  Martin Liska  <mliska@suse.cz>
7267
7268         * common.opt: Introduce -completion option.
7269         * gcc.c (driver_handle_option): Handle it.
7270         (driver::main): Print completions if completion
7271         is set.
7272         * opt-suggestions.c (option_proposer::get_completions):
7273         New function.
7274         (option_proposer::suggest_completion): Likewise.
7275         (option_proposer::find_param_completions): Likewise.
7276         (verify_autocompletions): Likewise.
7277         (test_completion_valid_options): Likewise.
7278         (test_completion_valid_params): Likewise.
7279         (in_completion_p): Likewise.
7280         (empty_completion_p): Likewise.
7281         (test_completion_partial_match): Likewise.
7282         (test_completion_garbage): Likewise.
7283         (opt_proposer_c_tests): Likewise.
7284         * opt-suggestions.h: Declare new functions.
7285         * opts.c (common_handle_option): Handle OPT__completion_.
7286         * selftest-run-tests.c (selftest::run_tests): Add
7287         opt_proposer_c_tests.
7288         * selftest.c (assert_str_startswith): New.
7289         * selftest.h (assert_str_startswith): Likewise.
7290         (opt_proposer_c_tests): New.
7291         (ASSERT_STR_STARTSWITH): Likewise.
7292
7293 2018-06-28  Martin Liska  <mliska@suse.cz>
7294
7295         * Makefile.in: Add opt-suggestions.o.
7296         * gcc-main.c: Include opt-suggestions.h.
7297         * gcc.c (driver::driver): Likewise.
7298         (driver::~driver): Remove m_option_suggestions.
7299         (driver::build_option_suggestions): Moved to option_proposer.
7300         (driver::suggest_option): Likewise.
7301         (driver::handle_unrecognized_options): Use option_proposer.
7302         * gcc.h (class driver): Add new memver m_option_proposer.
7303         * opt-suggestions.c: New file.
7304         * opt-suggestions.h: New file.
7305
7306 2018-06-28  Martin Liska  <mliska@suse.cz>
7307
7308         * vec.h (class auto_string_vec): New (moved from auto_argvec).
7309         (auto_string_vec::~auto_string_vec): Likewise.
7310
7311 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7312
7313         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7314         prevent_decl_creation_for_types fields up and add reset_location field.
7315         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7316         statement if id->reset_location is true.
7317         (copy_edges_for_bb): Do not set goto_locus on the new edges if
7318         id->reset_location is true.
7319         (copy_phis_for_bb): Force input_location on the arguments if
7320         id->reset_location is true.
7321         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7322         is set on the function to be inlined.
7323
7324 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
7325
7326         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7327
7328 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
7329
7330         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7331         registers for Pmode.
7332         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7333         hard registers for the clobbered pseudo.
7334
7335 2018-06-27  Paul Koning  <ni1d@arrl.net>
7336
7337         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7338         mutually exclusive options.
7339         * config/pdp11/constraints.md (h): New constraint.
7340         (O): Update definition to match shift code generation.
7341         (D): New constraint.
7342         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7343         (CCFP): Remove.
7344         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7345         function.
7346         (output_jump): Change arguments.
7347         (pdp11_fixed_cc_regs): New function.
7348         (pdp11_cc_mode): Ditto.
7349         (pdp11_expand_shift): Ditto.
7350         (pdp11_assemble_shift): Ditto.
7351         (pdp11_small_shift): Ditto.
7352         (pdp11_branch_cost): Remove.
7353         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7354         from output.
7355         (pdp11_register_move_cost): Update for CC registers.
7356         (pdp11_rtx_costs): Add case for LSHIFTRT.
7357         (pdp11_output_jump): Add CCNZ mode conditional branches.
7358         (notice_update_cc_on_set): Remove.
7359         (pdp11_cc_mode): New function.
7360         (simple_memory_operand): Correct pre/post decrement case.
7361         (no_side_effect_operand): New function.
7362         (pdp11_regno_reg_class): Add CC_REGS class.
7363         (pdp11_fixed_cc_regs): New function.
7364         (pdp11_small_shift): New function.
7365         (pdp11_expand_shift): New function to expand shift insns.
7366         (pdp11_assemble_shift): New function to output shifts.
7367         (pdp11_branch_cost): Remove.
7368         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7369         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7370         (WCHAR_TYPE): Ditto.
7371         (PTRDIFF_TYPE): Ditto.
7372         (ADJUST_INSN_LENGTH): New macro.
7373         (FIXED_REGISTERS): Add CC registers.
7374         (CALL_USED_REGISTERS): Ditto.
7375         (reg_class): Ditto.
7376         (REG_CLASS_NAMES): Ditto.
7377         (REG_CLASS_CONTENTS): Ditto.
7378         (SELECT_CC_MODE): Use new function.
7379         (TARGET_FLAGS_REGNUM): New macro.
7380         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7381         (cc0_reg_rtx): Remove.
7382         (CC_STATUS_MDEP): Remove.
7383         (CC_STATUS_MDEFP_INIT): Remove.
7384         (CC_IN_FPU): Remove.
7385         (NOTICE_UPDATE_CC): Remove.
7386         (REGISTER_NAMES): Add CC registers.
7387         (BRANCH_COST): Change to constant 1.
7388         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7389         handling.
7390         * config/pdp11/pdp11.opt (mbcopy): Remove.
7391         (mbcopy-builtin): Remove.
7392         (mbranch-cheap): Remove.
7393         (mbranch-expensive): Remove.
7394         * config/pdp11/predicates.md (expand_shift_operand): Update to
7395         match shift code generation.
7396         (ccnz_operator): New predicate.
7397         * doc/invoke.texi (PDP-11 Options): Remove deleted options
7398         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7399         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
7400         exclusive options.
7401         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
7402         description of O constraint.
7403
7404 2018-06-27  Jeff Law  <law@redhat.com>
7405             Austin Law  <austinklaw@gmail.com>
7406
7407         * config/v850/v850.md (addsi3_set_flags): New pattern.
7408         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7409         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7410         (zero_extendhisi2_v850_set_flags): Likewise.
7411         (zero_extendqisi2_v850_set_flags): Likewise.
7412         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7413         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7414         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7415
7416         * config/v850/v850-protos.h (notice_update_cc): Remove.
7417         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7418         (v850_print_operand): Handle 'D' and "d".
7419         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7420         Add handling of arithmetic/logical operations compared against zero.
7421         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7422         Do not look at v850_compare_op, instead get mode from last argument.
7423         (v850_gen_compare): Remove
7424         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7425         after reload for prologue insns.
7426         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7427         patterns.
7428         (construct_save_jarl): Likewise.
7429         (TARGET_FLAGS_REGNUM): Define.
7430         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7431         (NOTICE_UPDATE_CC): Remove.
7432         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7433         than cc0.  Conditionalize on reload_completed.
7434         (cmpsi_insn, setfcc_insn): Likewise.
7435         (tst1 splitter): Turn into define_and_split which sets the flags
7436         after reload.
7437         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7438         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7439         (cstoresf4, cstoredf4): Clobber the flags.
7440         (cmpsi, cmpsf, cmpdf): Remove expanders.
7441         (setf_insn): Remove pattern.
7442         (addsi3): Turn into define_and_split which clobbers the flags after
7443         reload and a suitable pattern (addsi3_clobber_flags) for use after
7444         reload.
7445         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7446         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7447         (ashrsi3, ashrsi3_v850e2): Likewise.
7448         (bins): Clobber the flags.
7449         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7450         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7451         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7452         (call_value_internal_short, call_value_internal_long): Likewise.
7453         (callt_save_interrupt, callt_return_interrupt): Likewise.
7454         (save_interrupt, return_interrupt): Likewise.
7455         (callt_save_all_interrupt, save_all_interrupt): Likewise.
7456         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7457         (restore_all_interrupt, _restore_all_interrupt): Likewise.
7458         (All FP comparisons): Only allow after reload has completed.
7459         (trfsr): Likewise.
7460         (divh, divhu): Tweak output template.
7461         (branch_z_normal, branch_z_invert): Remove
7462         (branch_nz_normal, branch_nz_invert): Likewise.
7463         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7464
7465         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7466         * config/v850/v850.c (notice_update_cc): Remove.
7467         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
7468         (CC_NO_CARRY): Likewise.
7469         (NOTICE_UPDATE_CC): Define to nothing.
7470         * config/v850/v850.md: Remove block comment on cc0 handling
7471         Remove "cc" attribute from all patterns.  Remove cc_status handling
7472         from all patterns.  Minor formatting fixes.
7473
7474 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7475
7476         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7477         (cortex-a76.cortex-a55): Likewise.
7478         * config/aarch64/aarch64-tune.md: Regenerate.
7479         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7480         cortex-a76.cortex-a55.
7481
7482 2018-06-27  Jeff Law  <law@redhat.com>
7483
7484         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7485         (MULTILIB_DIRNAMES): Similarly.
7486
7487 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7488
7489         * gimple.h (gimple_return_retbnd): Delete.
7490         (gimple_return_set_retbnd): Likewise.
7491         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7492         gimple_return_set_retbnd.
7493         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7494         gimple_return_retbnd and adjust.
7495         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7496         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7497         Explicitly return NULL in a couple more cases.  Move assertion
7498         on debug statements and remove unreachable code.
7499         (reset_debug_binding): Do not test id->retbnd.
7500         (expand_call_inline): Do not set it.
7501
7502 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7503
7504         * configure.ac: Add --disable-gcov option.
7505         * configure: Regenerate.
7506         * Makefile.in: Honour @enable_gcov@.
7507         * doc/install.texi: Document --disable-gcov.
7508
7509 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7510
7511         * config/arm/arm-cpus.in (cortex-a76): New entry.
7512         (cortex-a76.cortex-a55): Likewise.
7513         * config/arm/arm-tables.opt: Regenerate.
7514         * config/arm/arm-tune.md: Likewise.
7515         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7516         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7517         cortex-a76.cortex-a55.
7518
7519 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7520
7521         PR target/85769
7522         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7523
7524 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7525
7526         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7527         comment.
7528         (EPILOGUE_USES): Likewise.
7529
7530 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7531
7532         * tree-inline.c (remap_location): New function extracted from...
7533         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7534         (copy_phis_for_bb): ...here.  Call remap_location.
7535         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7536
7537 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7538
7539         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7540         unaligned vsx for 16B memset.
7541
7542 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7543
7544         PR target/86285
7545         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7546         ieee128_float_type_node to long_double_type_node unless
7547         TARGET_LONG_DOUBLE_128 is set.
7548
7549 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7550
7551         * cfgloop.c (get_loop_location): Convert return type from
7552         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7553         by implicit construction from rtx_insn *, and using
7554         dump_user_location_t::from_function_decl for the fallback case.
7555         * cfgloop.h (get_loop_location): Convert return type from
7556         location_t to dump_user_location_t.
7557         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7558         dump_printf_loc to pass in a dump_location_t rather than a
7559         location_t, via the gimple stmt.
7560         * coverage.c (get_coverage_counts): Update calls to
7561         dump_printf_loc to pass in dump_location_t rather than a
7562         location_t.
7563         * doc/optinfo.texi (Dump types): Convert example of
7564         dump_printf_loc from taking "locus" to taking "insn".  Update
7565         description of the "_loc" calls to cover dump_location_t.
7566         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7567         "selftest.h".
7568         (dump_user_location_t::dump_user_location_t): New constructors,
7569         from gimple *stmt and rtx_insn *.
7570         (dump_user_location_t::from_function_decl): New function.
7571         (dump_loc): Make static.
7572         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7573         const dump_location_t &.
7574         (dump_generic_expr_loc): Delete.
7575         (dump_printf_loc): Convert param "loc" from location_t to
7576         const dump_location_t &.
7577         (selftest::test_impl_location): New function.
7578         (selftest::dumpfile_c_tests): New function.
7579         * dumpfile.h: Include "profile-count.h".
7580         (class dump_user_location_t): New class.
7581         (struct dump_impl_location_t): New struct.
7582         (class dump_location_t): New class.
7583         (dump_printf_loc): Convert 2nd param from source_location to
7584         const dump_location_t &.
7585         (dump_generic_expr_loc): Delete.
7586         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7587         const dump_location_t &.
7588         * gimple-fold.c (fold_gimple_assign): Update call to
7589         dump_printf_loc to pass in a dump_location_t rather than a
7590         location_t, via the gimple stmt.
7591         (gimple_fold_call): Likewise.
7592         * gimple-loop-interchange.cc
7593         (loop_cand::analyze_iloop_reduction_var): Update for change to
7594         check_reduction_path.
7595         (tree_loop_interchange::interchange): Update for change to
7596         find_loop_location.
7597         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7598         change in return-type of find_loop_location.
7599         (graphite_regenerate_ast_isl): Likewise.
7600         * graphite-optimize-isl.c (optimize_isl): Likewise.
7601         * graphite.c (graphite_transform_loops): Likewise.
7602         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7603         pass in a dump_location_t rather than a location_t, via the
7604         gimple stmt.
7605         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7606         * ipa.c (walk_polymorphic_call_targets): Likewise.
7607         * loop-unroll.c (report_unroll): Convert "locus" param from
7608         location_t to dump_location_t.
7609         (decide_unrolling): Update for change to get_loop_location's
7610         return type.
7611         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7612         location_t to dump_user_location_t.
7613         (grid_find_single_omp_among_assignments_1): Updates calls to
7614         dump_printf_loc to pass in a dump_location_t rather than a
7615         location_t, via the gimple stmt.
7616         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7617         location_t to dump_location_t.  Updates calls to dump_printf_loc
7618         to pass in a dump_location_t rather than a location_t, via the
7619         gimple stmt.
7620         (grid_inner_loop_gridifiable_p): Likewise.
7621         (grid_dist_follows_simple_pattern): Likewise.
7622         (grid_gfor_follows_tiling_pattern): Likewise.
7623         (grid_target_follows_gridifiable_pattern): Likewise.
7624         (grid_attempt_target_gridification): Convert initialization
7625         of local "grid" from memset to zero-initialization; FIXME: does
7626         this require C++11?  Update call to dump_printf_loc to pass in a
7627         optinfo_location rather than a location_t, via the gimple stmt.
7628         * profile.c (read_profile_edge_counts): Updates call to
7629         dump_printf_loc to pass in a dump_location_t rather than a
7630         location_t
7631         (compute_branch_probabilities): Likewise.
7632         * selftest-run-tests.c (selftest::run_tests): Call
7633         dumpfile_c_tests.
7634         * selftest.h (dumpfile_c_tests): New decl.
7635         * tree-loop-distribution.c (pass_loop_distribution::execute):
7636         Update for change in return type of find_loop_location.
7637         * tree-parloops.c (parallelize_loops): Likewise.
7638         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7639         "locus" from location_t to dump_user_location_t.
7640         (canonicalize_loop_induction_variables): Likewise.
7641         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7642         for change in return type of find_loop_location.
7643         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7644         to dump_printf_loc to pass in a dump_location_t rather than a
7645         location_t, via the stmt.
7646         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7647         Likewise.
7648         * tree-vect-loop-manip.c (find_loop_location): Convert return
7649         type from source_location to dump_user_location_t.
7650         (vect_do_peeling): Update for above change.
7651         (vect_loop_versioning): Update for change in type of
7652         vect_location.
7653         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7654         from location_t to dump_user_location_t.
7655         (vect_estimate_min_profitable_iters): Update for change in type
7656         of vect_location.
7657         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7658         location_t to dump_location_t.
7659         (vect_slp_bb): Update for change in type of vect_location.
7660         * tree-vectorizer.c (vect_location): Convert from source_location
7661         to dump_user_location_t.
7662         (try_vectorize_loop_1): Update for change in vect_location's type.
7663         (vectorize_loops): Likewise.
7664         (increase_alignment): Likewise.
7665         * tree-vectorizer.h (vect_location): Convert from source_location
7666         to dump_user_location_t.
7667         (find_loop_location): Convert return type from source_location to
7668         dump_user_location_t.
7669         (check_reduction_path): Convert 1st param from location_t to
7670         dump_user_location_t.
7671         * value-prof.c (check_counter): Update call to dump_printf_loc to
7672         pass in a dump_user_location_t rather than a location_t; update
7673         call to error_at for change in type of "locus".
7674         (check_ic_target): Update call to dump_printf_loc to
7675         pass in a dump_user_location_t rather than a location_t, via the
7676         call_stmt.
7677
7678 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7679
7680         * config/s390/s390.h (enum processor_flags): Do not use
7681         default tune parameter when -march was specified.
7682
7683 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7684
7685         PR target/86314
7686         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7687         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7688         operands.
7689
7690 2018-06-26  Richard Biener  <rguenther@suse.de>
7691
7692         PR tree-optimization/86287
7693         PR bootstrap/86316
7694         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7695         (vect_analyze_loop): Initialize n_stmts.
7696
7697 2018-06-26  Richard Biener  <rguenther@suse.de>
7698
7699         PR middle-end/86271
7700         * fold-const.c (fold_convertible_p): Pointer extension
7701         isn't valid.
7702
7703 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7704
7705         PR debug/86064
7706         * dwarf2out.c (loc_list_has_views): Adjust comments.
7707         (dw_loc_list): Split single cross-partition range with
7708         nonzero locview.
7709
7710 2018-06-25  Jeff Law  <law@redhat.com>
7711
7712         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7713         on -mbig-switch by default.
7714
7715         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7716         test.
7717         (const_float_0_operand): Remove unused predicate.
7718         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7719         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7720         (recipsf2): New expander.  Original pattern now called
7721         (recipsf2_insn).
7722         (recipdf2, recipdf2_insn): Similarly.
7723         (rsqrtsf2, rsqrtsf2_insn): Similarly
7724         (rsqrtdf2, rsqrtdf2_insn): Similarly
7725
7726 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7727
7728         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7729         Simplify logic for FreeBSD (twice).
7730
7731 2018-06-25  Martin Sebor  <msebor@redhat.com>
7732
7733         PR tree-optimization/86204
7734         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7735         a strnlen result if it's less than the length of the string.
7736
7737 2018-06-25  Martin Sebor  <msebor@redhat.com>
7738
7739         PR tree-optimization/85700
7740         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7741         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7742         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7743
7744 2018-06-25  Martin Sebor  <msebor@redhat.com>
7745
7746         * doc/extend.texi (Zero-length arrays): Update and clarify.
7747
7748 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7749
7750         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7751         added IEEE/IBM long double multilib support on PowerPC little
7752         endian Linux systems.
7753         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7754         (MULTILIB_DEFAULTS): Likewise.
7755         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7756         Likewise.
7757         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7758         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7759         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7760
7761 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7762
7763         PR middle-end/86311
7764         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7765         (REORDER_45): Likewise.
7766
7767 2018-06-25  Jeff Law  <law@redhat.com>
7768
7769         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7770         dividend to 32 bits.  Adjust length.
7771         (udivmodhi4): Cleanup output template.  Fix length.
7772
7773 2018-06-25  Carl Love  <cel@us.ibm.com>
7774
7775         * config/rs6000/vsx.md: Change word selector to prefered location.
7776
7777 2018-06-25  Richard Biener  <rguenther@suse.de>
7778
7779         PR tree-optimization/86304
7780         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7781         epilogue-if-converted loops as well.
7782
7783 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7784
7785         * lto-section-out.c (lto_begin_section): Do not print section
7786         name for noaddr and unnumbered dumps.
7787
7788 2018-06-25  Richard Biener  <rguenther@suse.de>
7789
7790         * tree-vectorizer.h (struct vec_info_shared): New structure
7791         with parts split out from struct vec_info and loop_nest from
7792         struct _loop_vec_info.
7793         (struct vec_info): Adjust accordingly.
7794         (struct _loop_vec_info): Likewise.
7795         (LOOP_VINFO_LOOP_NEST): Adjust.
7796         (LOOP_VINFO_DATAREFS): Likewise.
7797         (LOOP_VINFO_DDRS): Likewise.
7798         (struct _bb_vec_info): Likewise.
7799         (BB_VINFO_DATAREFS): Likewise.
7800         (BB_VINFO_DDRS): Likewise.
7801         (struct _stmt_vec_info): Add dr_aux member.
7802         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7803         (DR_MISALIGNMENT_UNINITIALIZED): New.
7804         (set_dr_misalignment): Adjust.
7805         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7806         (vect_analyze_loop): Adjust prototype.
7807         (vect_analyze_loop_form): Likewise.
7808         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7809         Compute dependences lazily.
7810         (vect_record_base_alignments): Use shared datarefs/ddrs.
7811         (vect_verify_datarefs_alignment): Likewise.
7812         (vect_analyze_data_refs_alignment): Likewise.
7813         (vect_analyze_data_ref_accesses): Likewise.
7814         (vect_analyze_data_refs): Likewise.
7815         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7816         constructor parameter for shared part.
7817         (vect_analyze_loop_form): Pass in shared part and adjust.
7818         (vect_analyze_loop_2): Pass in storage for the number of
7819         stmts.  Move loop nest finding to the caller.  Compute
7820         datarefs lazily.
7821         (vect_analyze_loop): Pass in shared part.
7822         (vect_transform_loop): Verify shared datarefs are unchanged.
7823         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7824         constructor parameter for shared part.
7825         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7826         (vect_slp_bb): Verify shared datarefs are unchanged before
7827         transform.
7828         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7829         change.
7830         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7831         DR_MISALIGNMENT_UNINITIALIZED.
7832         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7833         parameter for shared part.
7834         (vec_info::~vec_info): Adjust.
7835         (vec_info_shared::vec_info_shared): New.
7836         (vec_info_shared::~vec_info_shared): Likewise.
7837         (vec_info_shared::save_datarefs): Likewise.
7838         (vec_info_shared::check_datarefs): Likewise.
7839         (try_vectorize_loop_1): Construct shared part live for analyses
7840         of a single loop for multiple vector sizes.
7841         * tree-parloops.c (gather_scalar_reductions): Adjust.
7842
7843 2018-06-25  Richard Biener  <rguenther@suse.de>
7844
7845         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7846         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7847         (vect_analyze_data_refs): Remove similar code from here and
7848         simplify accordingly.
7849
7850 2018-06-25  Richard Biener  <rguenther@suse.de>
7851
7852         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7853         for reverse storage order accesses rather than asserting
7854         they cannot happen here.
7855
7856 2018-06-25  Tom de Vries  <tdevries@suse.de>
7857
7858         PR debug/86257
7859         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7860         Use data16 instead of .byte for insn prefix.
7861
7862 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7863
7864         PR C++/86082
7865         * parser.c (make_char_string_pack): Pass this literal chars
7866         through cpp_interpret_string.
7867         (cp_parser_userdef_numeric_literal): Check the result of
7868         make_char_string_pack.
7869
7870 2018-06-24  Maya Rashish  <coypu@sdf.org>
7871
7872         * ginclude/stddef.h: Simplify conditions around avoiding
7873         re-definition of __size_t.
7874
7875 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7876
7877         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7878         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7879
7880 2018-06-22  Maya Rashish  <coypu@sdf.org>
7881
7882         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7883         made to OpenBSD and NetBSD through the years.
7884
7885 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7886
7887         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7888         behavior of vec_pack (vector double, vector double) to match
7889         behavior of vec_float2 (vector double, vector double).
7890
7891 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7892
7893         * gimplify.c (gimplify_function_tree): Prevent creation
7894         of a trampoline for the address of the current function
7895         passed to entry/exit instrumentation hooks.
7896
7897 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7898
7899         PR target/86222
7900         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7901         correctly.
7902
7903 2018-06-22  Martin Liska  <mliska@suse.cz>
7904
7905         PR tree-optimization/86263
7906         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7907         Bail out if is_enabled is false.
7908         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7909         New declaration.
7910         (jump_table_cluster::is_enabled): New function.
7911
7912 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7913
7914         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7915         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7916         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7917         (lto_input_ts_binfo_tree_pointers): Likewise.
7918         * tree-streamer-out.c (streamer_write_tree_bitfields,
7919         write_ts_binfo_tree_pointers): Likewise.
7920         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7921
7922 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7923
7924         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7925
7926 2018-06-22  Martin Liska  <mliska@suse.cz>
7927
7928         * symbol-summary.h (get): Make it pure and inline move
7929         functionality from ::get function.
7930         (get): Remove and inline into ::get and ::get_create.
7931         (get_create): Move code from ::get function.
7932
7933 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7934
7935         PR target/85994
7936         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7937         -x assembler-with-cpp.
7938
7939 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7940
7941         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7942         _FILE_OFFSET_BITS=64 for C++.
7943
7944 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
7945
7946         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7947         conversion insn that shows up when pr85657-3.c is compiled using
7948         IEEE 128-bit long double.
7949         (neg<mode>2_internal): Use the correct mode to check whether the
7950         mode is IBM extended.
7951         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7952         multiply and divide external functions from being created more
7953         than once.
7954
7955 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7956
7957         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7958         functions.
7959         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
7960         the edge can be forwarded.
7961         (cfg_layout_merge_blocks): Likewise.
7962
7963 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7964
7965         * except.c (finish_eh_generation): Commit edge insertions only after
7966         the EH edges have been redirected from post-landing to landing pads.
7967
7968 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7969
7970         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7971         create_tmp_var_for to create the FRAME decl.
7972         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7973
7974 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7975
7976         * tree-inline.c (copy_edges_for_bb): Minor tweak.
7977         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7978         debug statement when resetting its value.
7979         (expand_call_inline): Copy the locus of the call onto the assignment
7980         of the return value, if any.  Use local variable in more cases.
7981
7982 2018-06-21  Martin Liska  <mliska@suse.cz>
7983
7984         * ipa-pure-const.c (propagate_nothrow): Use
7985         funct_state_summaries->get.
7986         (dump_malloc_lattice): Likewise.
7987         (propagate_malloc): Likewise.
7988
7989 2018-06-21  Richard Biener  <rguenther@suse.de>
7990
7991         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7992         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7993         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7994         comment.
7995         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7996         BLOCK_ABSTRACT_ORIGIN unconditionally.
7997
7998 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
7999
8000         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8001         deleting it.
8002         * ipa-reference.c (ipa_reference_c_finalize): Delete
8003         ipa_ref_opt_sum_summaries and set it to NULL.
8004
8005 2018-06-21  Tom de Vries  <tdevries@suse.de>
8006
8007         PR tree-optimization/85859
8008         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8009         test with comment from bb_no_side_effects_p.
8010
8011 2018-06-21  Richard Biener  <rguenther@suse.de>
8012
8013         PR tree-optimization/86232
8014         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8015         max for constant niter.
8016
8017 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8018
8019         * config/aarch64/aarch64-simd.md
8020         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8021
8022 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8023
8024         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8025         Make opernads of the unspec commutative.
8026
8027 2018-06-21  Richard Biener  <rguenther@suse.de>
8028
8029         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8030         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8031         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8032         (vect_analyze_data_ref_dependence): Re-order checks to deal with
8033         NULL DR_STEP.
8034         (vect_record_base_alignments): Do not record base alignment
8035         for gathers or scatters.
8036         (vect_compute_data_ref_alignment): Drop return value that is always
8037         true.  Bail out early for gathers or scatters.
8038         (vect_enhance_data_refs_alignment): Bail out early for gathers
8039         or scatters.
8040         (vect_find_same_alignment_drs): Likewise.
8041         (vect_analyze_data_refs_alignment): Remove dead code.
8042         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8043         (vect_analyze_data_refs): For possible gathers or scatters do
8044         not create an alternate DR, just check their possible validity
8045         and mark them.  Adjust DECL_NONALIASED handling to not rely
8046         on DR_BASE_ADDRESS.
8047         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8048         update inits of gathers or scatters.
8049         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8050         Also copy gather/scatter flag to pattern vinfo.
8051
8052 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8053
8054         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8055         behavior of vec_packsu (vector unsigned long long, vector unsigned
8056         long long) to match behavior of vec_packs with same signature.
8057
8058 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
8059             Thomas Schwinge <thomas@codesourcery.com>
8060             Cesar Philippidis  <cesar@codesourcery.com>
8061
8062         * gimplify.c (gimplify_scan_omp_clauses): Add support for
8063         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8064         (gimplify_adjust_omp_clauses): Likewise.
8065         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8066         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8067         (gimplify_omp_target_update): Update handling of acc update and
8068         enter/exit data.
8069         * omp-low.c (install_var_field): Remove unused parameter
8070         base_pointers_restrict.
8071         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8072         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8073         FINALIZE}
8074         (omp_target_base_pointers_restrict_p): Delete.
8075         (scan_omp_target): Update call to scan_sharing_clauses.
8076         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8077         FINALIZE}.
8078         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8079         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8080         (convert_local_omp_clauses): Likewise.
8081         * tree-pretty-print.c (dump_omp_clause): Likewise.
8082         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
8083         FINALIZE}.
8084         (omp_clause_code_name): Likewise.
8085
8086 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8087
8088         PR debug/86194
8089         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8090         be narrowed.
8091
8092         PR tree-optimization/86231
8093         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
8094         anti-range don't overwrite *vr0min before using it to compute *vr0max.
8095
8096 2018-06-20  Tom de Vries  <tdevries@suse.de>
8097
8098         PR tree-optimization/86097
8099         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8100         iv type if signedness of iv type is not the same as that of *nit.
8101
8102 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8103
8104         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
8105         EDGE_EH edges, verify they are all EDGE_EH.
8106
8107 2018-06-20  Maya Rashish  <coypu@sdf.org>
8108
8109         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8110
8111 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8112
8113         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8114         * config/aarch64/aarch64.c (xgene1_tunings): Add
8115         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8116         (aarch64_mode_valid_for_sched_fusion_p):
8117         Allow 16-byte modes.
8118         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8119         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8120         128-bit modes.
8121         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8122         New pattern.
8123         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8124         * config/aarch64/iterators.md (VQ2): New mode iterator.
8125
8126 2018-06-20  Martin Liska  <mliska@suse.cz>
8127
8128         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8129         Change default ratio from 10 to 8.
8130
8131 2018-06-20  Martin Liska  <mliska@suse.cz>
8132
8133         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8134         New.
8135         (bit_test_cluster::find_bit_tests): Likewise.
8136         (switch_decision_tree::analyze_switch_statement): Find clusters.
8137         * tree-switch-conversion.h (struct jump_table_cluster): Document
8138         hierarchy.
8139
8140 2018-06-20  Martin Liska  <mliska@suse.cz>
8141
8142         * tree-switch-conversion.c (switch_conversion::collect):
8143         Record m_uniq property.
8144         (switch_conversion::expand): Bail out for special conditions.
8145         (group_cluster::~group_cluster): New.
8146         (group_cluster::group_cluster): Likewise.
8147         (group_cluster::dump): Likewise.
8148         (jump_table_cluster::emit): New.
8149         (switch_decision_tree::fix_phi_operands_for_edges): New.
8150         (struct case_node): Remove struct.
8151         (jump_table_cluster::can_be_handled): New.
8152         (case_values_threshold): Moved to header.
8153         (reset_out_edges_aux): Likewise.
8154         (jump_table_cluster::is_beneficial): New.
8155         (bit_test_cluster::can_be_handled): Likewise.
8156         (add_case_node): Remove.
8157         (bit_test_cluster::is_beneficial): New.
8158         (case_bit_test::cmp): New.
8159         (bit_test_cluster::emit): New.
8160         (expand_switch_as_decision_tree_p): Remove.
8161         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8162         (fix_phi_operands_for_edge): Likewise.
8163         (switch_decision_tree::analyze_switch_statement): New.
8164         (compute_cases_per_edge): Move ...
8165         (switch_decision_tree::compute_cases_per_edge): ... here.
8166         (try_switch_expansion): Likewise.
8167         (switch_decision_tree::try_switch_expansion): Likewise.
8168         (record_phi_operand_mapping): Likewise.
8169         (switch_decision_tree::record_phi_operand_mapping): Likewise.
8170         (emit_case_decision_tree): Likewise.
8171         (switch_decision_tree::emit): Likewise.
8172         (balance_case_nodes): Likewise.
8173         (switch_decision_tree::balance_case_nodes): Likewise.
8174         (dump_case_nodes): Likewise.
8175         (switch_decision_tree::dump_case_nodes): Likewise.
8176         (emit_jump): Likewise.
8177         (switch_decision_tree::emit_jump): Likewise.
8178         (emit_cmp_and_jump_insns): Likewise.
8179         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8180         (emit_case_nodes): Likewise.
8181         (switch_decision_tree::emit_case_nodes): Likewise.
8182         (conditional_probability): Remove.
8183         * tree-switch-conversion.h (enum cluster_type): New.
8184         (PRINT_CASE): New.
8185         (struct cluster): Likewise.
8186         (cluster::cluster): Likewise.
8187         (struct simple_cluster): Likewise.
8188         (simple_cluster::simple_cluster): Likewise.
8189         (struct group_cluster): Likewise.
8190         (struct jump_table_cluster): Likewise.
8191         (struct bit_test_cluster): Likewise.
8192         (struct min_cluster_item): Likewise.
8193         (struct case_tree_node): Likewise.
8194         (case_tree_node::case_tree_node): Likewise.
8195         (jump_table_cluster::case_values_threshold): Likewise.
8196         (struct case_bit_test): Likewise.
8197         (struct switch_decision_tree): Likewise.
8198         (struct switch_conversion): Likewise.
8199         (switch_decision_tree::reset_out_edges_aux): Likewise.
8200
8201 2018-06-20  Martin Liska  <mliska@suse.cz>
8202
8203         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8204         (hoist_edge_and_branch_if_true): Likewise.
8205         (expand_switch_using_bit_tests_p): Likewise.
8206         (struct case_bit_test): Likewise.
8207         (case_bit_test_cmp): Likewise.
8208         (emit_case_bit_tests): Likewise.
8209         (switch_conversion::switch_conversion): New class.
8210         (struct switch_conv_info): Remove old struct.
8211         (collect_switch_conv_info): More to ...
8212         (switch_conversion::collect): ... this.
8213         (check_range): Likewise.
8214         (switch_conversion::check_range): Likewise.
8215         (check_all_empty_except_final): Likewise.
8216         (switch_conversion::check_all_empty_except_final): Likewise.
8217         (check_final_bb): Likewise.
8218         (switch_conversion::check_final_bb): Likewise.
8219         (create_temp_arrays): Likewise.
8220         (switch_conversion::create_temp_arrays): Likewise.
8221         (free_temp_arrays): Likewise.
8222         (gather_default_values): Likewise.
8223         (switch_conversion::gather_default_values): Likewise.
8224         (build_constructors): Likewise.
8225         (switch_conversion::build_constructors): Likewise.
8226         (constructor_contains_same_values_p): Likewise.
8227         (switch_conversion::contains_same_values_p): Likewise.
8228         (array_value_type): Likewise.
8229         (switch_conversion::array_value_type): Likewise.
8230         (build_one_array): Likewise.
8231         (switch_conversion::build_one_array): Likewise.
8232         (build_arrays): Likewise.
8233         (switch_conversion::build_arrays): Likewise.
8234         (gen_def_assigns): Likewise.
8235         (switch_conversion::gen_def_assigns): Likewise.
8236         (prune_bbs): Likewise.
8237         (switch_conversion::prune_bbs): Likewise.
8238         (fix_phi_nodes): Likewise.
8239         (switch_conversion::fix_phi_nodes): Likewise.
8240         (gen_inbound_check): Likewise.
8241         (switch_conversion::gen_inbound_check): Likewise.
8242         (process_switch): Use the newly created class.
8243         (switch_conversion::expand): New.
8244         (switch_conversion::~switch_conversion): New.
8245         * tree-switch-conversion.h: New file.
8246
8247 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8248
8249         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8250         tree-vect-patterns.c.
8251         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8252         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
8253         (vect_recog_sad_pattern): Likewise.
8254         (vect_recog_widen_sum_pattern): Likewise.
8255         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
8256         (vect_recog_widen_shift_pattern): Remove the type_in argument.
8257         (vect_recog_rotate_pattern): Likewise.
8258         (vect_recog_mult_pattern): Likewise.
8259         (vect_recog_vector_vector_shift_pattern): Likewise.
8260         (vect_recog_divmod_pattern): Likewise.
8261         (vect_recog_mixed_size_cond_pattern): Likewise.
8262         (vect_recog_bool_pattern): Likewise.
8263         (vect_recog_mask_conversion_pattern): Likewise.
8264         (vect_try_gather_scatter_pattern): Likewise.
8265         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
8266         (vect_recog_over_widening_pattern): Likewise.
8267         (vect_recog_gather_scatter_pattern): Likewise.
8268         (vect_recog_func_ptr): Move from tree-vectorizer.h
8269         (vect_vect_recog_func_ptrs): Move further down the file.
8270         (vect_recog_func): Likewise.  Remove the third argument.
8271         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8272         (vect_pattern_recog_1): Expect the pattern function to do any
8273         necessary target tests.  Also expect it to provide a vector type.
8274         Remove the type_in handling.
8275
8276 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8277
8278         * tree-vect-patterns.c (vect_pattern_detected): New function.
8279         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8280         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8281         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8282         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8283         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8284         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8285         (vect_recog_mask_conversion_pattern)
8286         (vect_try_gather_scatter_pattern): Likewise.
8287
8288 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8289
8290         * tree-vect-patterns.c (vect_get_internal_def): New function.
8291         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8292         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8293         (search_type_for_mask_1): Use it.
8294
8295 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8296
8297         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8298         redundant WIDEN_SUM_EXPR handling.
8299         (vect_recog_sad_pattern): Likewise.
8300
8301 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8302
8303         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8304         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8305         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8306         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8307         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8308
8309 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8310
8311         * tree-vect-stmts.c (vectorizable_call): Make sure that we
8312         use the stmt_vec_info of the original bb statement for the
8313         new zero assignment, even if the call is part of a pattern.
8314
8315 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8316
8317         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8318         that the sequence is attached to the original statement rather
8319         than the pattern statement.
8320         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8321         PATTERN_DEF_SEQ from the original statement rather than
8322         the main pattern statement.
8323         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8324         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8325         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8326
8327 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8328
8329         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8330         definition statements before the early exit for statements that aren't
8331         live or relevant.
8332         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8333         split out from...
8334         (vect_transform_loop): ...here.  Process pattern definition
8335         statements without first checking whether the main pattern
8336         statement is live or relevant.
8337
8338 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8339
8340         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8341         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8342
8343 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
8344
8345         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8346         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8347         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8348         (expand_block_compare): Change select_block_compare_mode call.
8349         (expand_strncmp_align_check): Use new functions, fix comment.
8350         (emit_final_str_compare_gpr): New function.
8351         (expand_strn_compare): Refactor and clean up code.
8352         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8353
8354 2018-06-19  Tony Reix  <tony.reix@atos.com>
8355             Damien Bergamini  <damien.bergamini@atos.com>
8356             David Edelsohn  <dje.gcc@gmail.com>
8357
8358         * collect2.c (static_obj): New variable.
8359         (static_libs): New variable.
8360         (is_in_list): Uncomment declaration.
8361         (main): Track AIX libraries linked statically.
8362         (is_in_list): Uncomment definition.
8363         (scan_prog_file): Don't add AIX shared libraries initializer
8364         to constructor list if linking statically.
8365
8366 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
8367
8368         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8369         constant.
8370         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8371
8372 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
8373
8374         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8375         blocks.
8376
8377 2018-06-19  Martin Liska  <mliska@suse.cz>
8378
8379         * config/i386/i386.c (ix86_can_inline_p): Do not use
8380         ipa_fn_summaries::get_create.
8381         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8382         get.
8383         (devirtualization_time_bonus): Likewise.
8384         (ipcp_propagate_stage): Likewise.
8385         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8386         (edge_set_predicate): Likewise.
8387         (evaluate_conditions_for_known_args): Likewise.
8388         (evaluate_properties_for_edge): Likewise.
8389         (ipa_call_summary::reset): Tranform to ...
8390         (ipa_call_summary::~ipa_call_summary): ... this.
8391         (ipa_fn_summary::reset): Transform to ...
8392         (ipa_fn_summary::~ipa_fn_summary): ... this.
8393         (ipa_fn_summary_t::remove): Rename to ...
8394         (ipa_fn_summary_t::remove_callees): ... this.
8395         (ipa_fn_summary_t::duplicate): Use placement new
8396         instead of memory copy.
8397         (ipa_call_summary_t::duplicate): Likewise.
8398         (ipa_call_summary_t::remove): Remove.
8399         (dump_ipa_call_summary): Change get_create to get.
8400         (ipa_dump_fn_summary): Dump only when summary exists.
8401         (analyze_function_body): Use symbol_summary::get instead
8402         of get_create.
8403         (compute_fn_summary): Likewise.
8404         (estimate_edge_devirt_benefit): Likewise.
8405         (estimate_edge_size_and_time): Likewise.
8406         (inline_update_callee_summaries): Likewise.
8407         (remap_edge_change_prob): Likewise.
8408         (remap_edge_summaries): Likewise.
8409         (ipa_merge_fn_summary_after_inlining): Likewise.
8410         (write_ipa_call_summary): Likewise.
8411         (ipa_fn_summary_write): Likewise.
8412         (ipa_free_fn_summary): Likewise.
8413         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8414         (struct ipa_call_summary): Likewise.
8415         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8416         of get_create.
8417         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8418         (estimate_size_after_inlining): Likewise.
8419         (estimate_growth): Likewise.
8420         (growth_likely_positive): Likewise.
8421         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8422         (inline_call): Likewise.
8423         * ipa-inline.c (caller_growth_limits): Likewise.
8424         (can_inline_edge_p): Likewise.
8425         (can_inline_edge_by_limits_p): Likewise.
8426         (compute_uninlined_call_time): Likewise.
8427         (compute_inlined_call_time): Likewise.
8428         (want_inline_small_function_p): Likewise.
8429         (edge_badness): Likewise.
8430         (update_caller_keys): Likewise.
8431         (update_callee_keys): Likewise.
8432         (inline_small_functions): Likewise.
8433         (inline_to_all_callers_1): Likewise.
8434         (dump_overall_stats): Likewise.
8435         (early_inline_small_functions): Likewise.
8436         (early_inliner): Likewise.
8437         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8438         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8439         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8440         * ipa-split.c (execute_split_functions): Likewise.
8441         * symbol-summary.h: Likewise.
8442         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8443
8444 2018-06-19  Richard Biener  <rguenther@suse.de>
8445
8446         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8447         (vectorize_loops): ... here.  Fix dbgcnt handling.
8448         (try_vectorize_loop): Wrap try_vectorize_loop_1.
8449
8450 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
8451
8452         PR target/86197
8453         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8454         ieee128 argument takes up only one (vector) register, not two (floating
8455         point) registers.
8456
8457 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8458
8459         * gimplify.c (gimplify_init_constructor): Really never clear for an
8460         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8461
8462 2018-06-19  Richard Biener  <rguenther@suse.de>
8463
8464         PR tree-optimization/86179
8465         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8466         after failed recognition.
8467
8468 2018-06-18  Martin Sebor  <msebor@redhat.com>
8469
8470         PR middle-end/85602
8471         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8472         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8473         Handle integer subtraction.
8474         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8475         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8476
8477 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8478
8479         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8480         param from rtx to rtx_insn *.
8481         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8482         param.
8483         (frv_ifcvt_modify_insn): Likwise.
8484         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8485         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8486         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8487         as_a <rtx_insn *> cast to local "unprotected_region" once
8488         it's been established that it's not NULL or pc_rtx.
8489         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8490         param "sethi" from rtx to rtx_insn *.
8491         (nds32_group_float_insns): Likewise for param "insn".
8492         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8493         param.
8494         (vax_output_int_subtract): Likewise.
8495         * config/vax/vax.c (vax_output_int_add): Likewise for param
8496         "insn".
8497         (vax_output_int_subtract): Likewise.
8498         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8499         (emit_pattern_after): Likewise for param "after".
8500         (emit_insn_after): Likewise.
8501         (emit_jump_insn_after): Likewise.
8502         (emit_call_insn_after): Likewise.
8503         (emit_debug_insn_after): Likewise.
8504         (emit_pattern_before): Likewise for param "before".
8505         (emit_insn_before): Likewise.
8506         (emit_jump_insn_before): Likewise.
8507         * final.c (get_insn_template): Likewise for param "insn", removing
8508         a cast.
8509         * output.h (get_insn_template): Likewise for 2nd param.
8510         * rtl.h (emit_insn_before): Likewise.
8511         (emit_jump_insn_before): Likewise.
8512         (emit_debug_insn_before_noloc): Likewise.
8513         (emit_insn_after): Likewise.
8514         (emit_jump_insn_after): Likewise.
8515         (emit_call_insn_after): Likewise.
8516         (emit_debug_insn_after): Likewise.
8517         (set_insn_deleted): Likewise for param.
8518
8519 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8520
8521         PR target/85358
8522         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8523         floating point modes, so that IFmode is numerically greater than
8524         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8525         to declare the ordering.  This prevents IFmode from being
8526         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8527         machine.  Include rs6000-modes.h to share the fractional values
8528         between genmodes* and the rest of the compiler.
8529         (IFmode): Likewise.
8530         (KFmode): Likewise.
8531         (TFmode): Likewise.
8532         * config/rs6000/rs6000-modes.h: New file.
8533         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8534         meaning of rs6000_long_double_size so that 126..128 selects an
8535         appropriate 128-bit floating point type.
8536         (rs6000_option_override_internal): Likewise.
8537         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8538         (TARGET_LONG_DOUBLE_128): Change the meaning of
8539         rs6000_long_double_size so that 126..128 selects an appropriate
8540         128-bit floating point type.
8541         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8542         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8543         source and destination to match the standard usage.
8544         (truncifkf2): Likewise.
8545         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8546         ISA 2.07 to use an explicit clobber, instead of passing in a
8547         temporary.
8548         (copysign<mode>3_soft): Likewise.
8549
8550 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8551
8552         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8553         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8554         (vect_slp_analyze_instance_dependence): Likewise.
8555         (vect_enhance_data_refs_alignment): Likewise.
8556         (vect_analyze_data_refs_alignment): Likewise.
8557         (vect_slp_analyze_and_verify_instance_alignment
8558         (vect_analyze_data_ref_accesses): Likewise.
8559         (vect_prune_runtime_alias_test_list): Likewise.
8560         (vect_analyze_data_refs): Likewise.
8561         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8562         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8563         (vect_analyze_scalar_cycles_1): Likewise.
8564         (vect_get_loop_niters): Likewise.
8565         (vect_analyze_loop_form_1): Likewise.
8566         (vect_update_vf_for_slp): Likewise.
8567         (vect_analyze_loop_operations): Likewise.
8568         (vect_analyze_loop): Likewise.
8569         (vectorizable_induction): Likewise.
8570         (vect_transform_loop): Likewise.
8571         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8572         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8573         (vect_make_slp_decision): Likewise.
8574         (vect_detect_hybrid_slp): Likewise.
8575         (vect_slp_analyze_operations): Likewise.
8576         (vect_slp_bb): Likewise.
8577         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8578         (vectorizable_bswap): Likewise.
8579         (vectorizable_call): Likewise.
8580         (vectorizable_simd_clone_call): Likewise.
8581         (vectorizable_conversion): Likewise.
8582         (vectorizable_assignment): Likewise.
8583         (vectorizable_shift): Likewise.
8584         (vectorizable_operation): Likewise.
8585         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8586
8587 2018-06-18  Martin Sebor  <msebor@redhat.com>
8588
8589         PR tree-optimization/81384
8590         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8591         * builtins.c (expand_builtin_strnlen): New function.
8592         (expand_builtin): Call it.
8593         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8594         * builtins.def (BUILT_IN_STRNLEN): New.
8595         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8596         Warn for bounds in excess of maximum object size.
8597         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8598         single-value ranges.  Handle strnlen.
8599         (handle_builtin_strlen): Handle strnlen.
8600         (strlen_check_and_optimize_stmt): Same.
8601         * doc/extend.texi (Other Builtins): Document strnlen.
8602
8603 2018-06-18  Maya Rashish  <coypu@sdf.org>
8604
8605         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8606         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8607         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8608
8609         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8610         here to ...
8611         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8612
8613 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8614
8615         * tree.c (escaped_string::escape): Replace cast to char * by
8616         const_cast<char *> (unescaped).
8617
8618 2018-06-18  Nick Clifton  <nickc@redhat.com>
8619
8620         PR 84195
8621         * tree.c (escaped_string): New class.  Converts an unescaped
8622         string into its escaped equivalent.
8623         (warn_deprecated_use): Use the new class to convert the
8624         deprecation message, if present.
8625         (test_escaped_strings): New self test.
8626         (test_c_tests): Add test_escaped_strings.
8627         * doc/extend.texi (deprecated): Add a note that the
8628         deprecation message is affected by the -fmessage-length
8629         option, and that control characters will be escaped.
8630         (#pragma GCC error): Document this pragma.
8631         (#pragma GCC warning): Likewise.
8632         * doc/invoke.texi (-fmessage-length): Document this option's
8633         effect on the #warning and #error preprocessor directives and
8634         the deprecated attribute.
8635
8636 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8637
8638         * tree.c (decl_value_expr_lookup): Revert latest change.
8639         (decl_value_expr_insert): Likewise.
8640
8641 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8642
8643         * gimplify.c (nonlocal_vlas): Delete.
8644         (nonlocal_vla_vars): Likewise.
8645         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8646         referenced VLAs.
8647         (gimplify_body): Do not create and destroy nonlocal_vlas.
8648         * tree-nested.c: Include diagnostic.h.
8649         (use_pointer_in_frame): Tweak.
8650         (lookup_field_for_decl): Add assertion and declare the transformation.
8651         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8652         internal error when the reference is in a wrong context.  Do not
8653         create a debug decl by default.
8654         (note_nonlocal_block_vlas): Delete.
8655         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8656         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8657         create a debug decl by default.
8658         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8659         call is in a wrong context.
8660         (fixup_vla_decls): New function.
8661         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8662         debug variables were created.
8663         * tree.c (decl_value_expr_lookup): Add checking assertion.
8664         (decl_value_expr_insert): Likewise.
8665
8666 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8667
8668         PR middle-end/82479
8669         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8670         * tree-scalar-evolution.c (interpret_expr): Likewise.
8671         (expression_expensive_p): Likewise.
8672         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8673         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8674         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8675         (ssa_defined_by_minus_one_stmt_p): New.
8676
8677 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8678
8679         PR middle-end/64946
8680         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8681         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8682         * dojump.c (do_jump): Likewise.
8683         * expr.c (expand_expr_real_2): Check operand type's sign.
8684         * fold-const.c (const_unop): Handle ABSU_EXPR.
8685         (fold_abs_const): Likewise.
8686         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8687         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8688         (strip_sign_op_1): Likesise.
8689         * match.pd: Add new pattern to generate ABSU_EXPR.
8690         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8691         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8692         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8693         * tree-inline.c (estimate_operator_cost): Likewise.
8694         * tree-pretty-print.c (dump_generic_node): Likewise.
8695         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8696         * tree.def (ABSU_EXPR): New.
8697
8698 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8699
8700         PR middle-end/86095
8701         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8702         documented as preserved for backward compatibility only.
8703         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8704
8705         PR rtl-optimization/86108
8706         * bb-reorder.c (create_forwarder_block): Renamed to ...
8707         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8708         jump from new landing pad to the second part.
8709         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8710         Adjust callers.
8711
8712 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8713
8714         PR middle-end/85878
8715         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8716         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8717         Only call store_expr for halves if the mode is the same.
8718
8719         PR middle-end/86123
8720         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8721         Fix up comment formatting.
8722
8723 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8724
8725         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8726         (typed_splay_tree::closure,
8727         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8728         (typed_splay_tree::typed_splay_tree,
8729         typed_splay_tree::operator =): Declared private.
8730         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8731         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8732         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8733         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8734         typed_splay_tree::splay_tree_splay,
8735         typed_splay_tree::splay_tree_foreach_helper,
8736         typed_splay_tree::splay_tree_insert,
8737         typed_splay_tree::splay_tree_remove,
8738         typed_splay_tree::splay_tree_lookup,
8739         typed_splay_tree::splay_tree_predecessor,
8740         typed_splay_tree::splay_tree_successor,
8741         typed_splay_tree::splay_tree_min,
8742         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8743         (typed_splay_tree::root, typed_splay_tree::comp,
8744         typed_splay_tree::delete_key,
8745         typed_splay_tree::delete_value): New data members.
8746         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8747         typed_splay_tree::remove.
8748
8749 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8750
8751         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8752         -mginv and -mno-ginv to the assembler.
8753         * config/mips/mips.opt (-mcrc): New option.
8754         (-mginv): Likewise.
8755         * doc/invoke.text (-mcrc): Document.
8756         (-mginv): Likewise.
8757
8758 2018-06-15  Nick Clifton  <nickc@redhat.com>
8759
8760         PR 84195
8761         * tree.c (escaped_string): New class.  Converts an unescaped
8762         string into its escaped equivalent.
8763         (warn_deprecated_use): Use the new class to convert the
8764         deprecation message, if present.
8765         (test_escaped_strings): New self test.
8766         (test_c_tests): Add test_escaped_strings.
8767         * doc/extend.texi (deprecated): Add a note that the
8768         deprecation message is affected by the -fmessage-length
8769         option, and that control characters will be escaped.
8770         (#pragma GCC error): Document this pragma.
8771         (#pragma GCC warning): Likewise.
8772         * doc/invoke.texi (-fmessage-length): Document this option's
8773         effect on the #warning and #error preprocessor directives and
8774         the deprecated attribute.
8775
8776 2018-06-15  Richard Biener  <rguenther@suse.de>
8777
8778         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8779         here, also noting vector size used.
8780         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8781         size used in MSG_OPTIMIZED_LOCATIONS dump.
8782         (pass_slp_vectorize::execute): Adjust.
8783
8784 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8785
8786         PR target/85968
8787         * config/arc/arc.c (arc_return_address_register): Fix
8788         if-condition.
8789
8790 2018-06-15  Richard Biener  <rguenther@suse.de>
8791
8792         PR middle-end/86159
8793         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8794         leave useless conversion stripping to force_gimple_operand_gsi.
8795         (gimplify_build2): Likewise.
8796         (gimplify_build1): Likewise.
8797
8798 2018-06-15  Richard Biener  <rguenther@suse.de>
8799
8800         PR middle-end/86076
8801         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8802         before adjusting their block.
8803
8804 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8805
8806         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8807         multilibs for *-*-rtems*.
8808         * config/riscv/t-rtems: New file.
8809
8810 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8811
8812         PR middle-end/86122
8813         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8814         unsigned_type_for returns NULL.
8815
8816         PR target/85945
8817         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8818         subregs of multi-word pseudos unless the float mode has word size.
8819
8820 2018-06-14  Richard Biener  <rguenther@suse.de>
8821
8822         PR middle-end/86139
8823         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8824         duplicate and harmful type_hash_canon.
8825         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8826
8827 2018-06-14  Richard Biener  <rguenther@suse.de>
8828
8829         PR ipa/86124
8830         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8831         NULL cgraph_node.
8832
8833 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8834
8835         * config/rtems.h (STDINT_LONG32): Define.
8836
8837 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8838             Prachi Godbole  <prachi.godbole@imgtec.com>
8839
8840         * config/mips/mips-cpus.def: Define P6600.
8841         * config/mips/mips-tables.opt: Regenerate.
8842         * config/mips/mips.c (mips_ucbranch_type): New enum.
8843         (mips_rtx_cost_data): Add support for P6600.
8844         (mips_issue_rate): Likewise.
8845         (mips_multipass_dfa_lookahead): Likewise.
8846         (mips_avoid_hazard): Likewise.
8847         (mips_reorg_process_insns): Likewise.
8848         (mips_classify_branch_p6600): New function.
8849         * config/mips/mips.h (TUNE_P6600): New define.
8850         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8851         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8852         * config/mips/mips.md: Include p6600.md.
8853         (processor): Add p6600.
8854         * config/mips/p6600.md: New file.
8855         * doc/invoke.texi: Add p6600 to supported architectures.
8856
8857 2018-06-13  Martin Sebor  <msebor@redhat.com>
8858
8859         PR tree-optimization/86114
8860         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8861         of integer types.
8862         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8863
8864 2018-06-13  Richard Biener  <rguenther@suse.de>
8865
8866         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8867         Properly set vector type of the intermediate stmt.
8868         * tree-vect-stmts.c (vectorizable_operation): The destination
8869         var always has vectype_out type.
8870
8871 2018-06-13  Jeff Law  <law@redhat.com>
8872
8873         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8874         integer 0 for argument to print_rtl_with_bb.
8875         (rl78_reorg): Likewise.
8876
8877 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8878
8879         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8880         from rtx to rtx_insn *.
8881         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8882         "label".
8883         (add_sched_insns_for_speculation): Likewise for local "target",
8884         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8885         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8886         from rtx_insn ** to rtx_code_label **.
8887         (reorg_emit_nops): Likewise.
8888         (c6x_reorg): Likewise for local "call_labels".
8889         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8890         rtx to rtx_insn *.
8891         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8892         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8893         the loops over LABEL_REFS.
8894         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8895         braf_label.
8896         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8897         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8898         (split_branches): Strengthen local "olabel" from rtx to
8899         rtx_insn *, adding a safe_as_a cast.
8900         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8901         to "rtx_insn *".
8902         (add_insn_after): Likewise for first two params.
8903         (add_insn_before): Likewise.
8904         (remove_insn): Likewise for param.
8905         (emit_pattern_before_noloc): Likewise for second and third params.
8906         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8907         (emit_call_insn_before_noloc): Likewise.
8908         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8909         to "rtx_insn *".
8910         (emit_barrier_before): Likewise.
8911         (emit_label_before): Strengthen "label" param from "rtx" to
8912         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8913         "rtx_insn *".
8914         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8915         "rtx_insn *".
8916         (emit_pattern_after_noloc): Likewise.
8917         (emit_insn_after_noloc): Likewise.
8918         (emit_jump_insn_after_noloc): Likewise.
8919         (emit_call_insn_after_noloc): Likewise.
8920         (emit_debug_insn_after_noloc): Likewise.
8921         (emit_barrier_after): Likewise.
8922         (emit_label_after): Likewise for both params.
8923         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8924         "loc" param from "int" to "location_t".
8925         (emit_insn_after_setloc): Likewise.
8926         (emit_jump_insn_after_setloc): Likewise.
8927         (emit_call_insn_after_setloc): Likewise.
8928         (emit_debug_insn_after_setloc): Likewise.
8929         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8930         "loc" param from "int" to "location_t".
8931         (emit_pattern_before): Convert NULL_RTX to NULL.
8932         (emit_insn_before_setloc): Convert "loc" param from "int" to
8933         "location_t".
8934         (emit_jump_insn_before_setloc): Likewise.
8935         (emit_call_insn_before_setloc): Likewise.
8936         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8937         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8938         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8939         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8940         Convert 3rd param from "int" to "location_t".
8941         (emit_barrier_before, emit_barrier_after, next_real_insn):
8942         Strengthen param from rtx to rtx_insn *.
8943         (emit_label_before): Strengthen 1st param from "rtx" to
8944         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
8945         "rtx_insn *".
8946         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8947         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8948         Strengthen 2nd param from "rtx" to "rtx_insn *".
8949         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8950         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8951         Likewise. Convert 3rd param from "int" to "location_t".
8952         (emit_label_after): Strengthen 1st param from "rtx" to
8953         "rtx_code_label *".
8954         (next_real_insn, remove_insn): Strengthen param from "rtx" to
8955         "rtx_insn *".
8956         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8957         from "rtx" to "rtx_insn *".
8958
8959 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
8960
8961         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8962         bodies streamed in with -Q.
8963         * dumpfile.c (dump_files): Add lto-stream-out dump file.
8964         * dumpfile.h (tree_dump_index): Add lto_stream_out.
8965         * gimple-streamer-out.c: Include gimple-pretty-print.h
8966         (output_bb): Dump stmts streamed.
8967         * lto-section-out.c: Include print-tree.h
8968         (lto_begin_section): Dump sections created.
8969         (lto_output_decl_index): Dump decl encoded.
8970         * lto-streamer-out.c: Include print-tree.h
8971         (create_output_block): Dump output block created.
8972         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8973         (output_function): Dump function output.
8974         (output_constructor): Dump constructor streamed.
8975         (write_global_stream): Output indexes encoded.
8976         (produce_asm_for_decls): Dump streams encoded.
8977         * lto-streamer.c (streamer_dump_file): New global var.
8978         * lto-streamer.h (streamer_dump_file): Declare.
8979         * passes.c (ipa_write_summaries): Initialize streamer dump.
8980         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8981         in.
8982
8983 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8984
8985         PR target/86048
8986         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8987         offsets for register save directives.  Emit a second batch of save
8988         directives, if need be, when the function accesses prior frames.
8989
8990 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8991
8992         * config/arc/fpu.md (fmasf4): Force operand to register.
8993         (fnmasf4): Likewise.
8994
8995 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8996
8997         * config/arc/arc-protos.h (arc_pad_return): Remove.
8998         * config/arc/arc.c (machine_function): Remove force_short_suffix
8999         and size_reason.
9000         (arc_print_operand): Adjust printing of '&'.
9001         (arc_verify_short): Remove conditional printing of short suffix.
9002         (arc_final_prescan_insn): Remove reference to size_reason.
9003         (pad_return): New function.
9004         (arc_reorg): Call pad_return.
9005         (arc_pad_return): Remove.
9006         (arc_init_machine_status): Remove reference to force_short_suffix.
9007         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9008         (attr length): When attribute iscompact is true force to 2
9009         regardless; in the case of maybe check if we want to force the
9010         instruction to have 4 bytes length.
9011         (nopv): Change it to generate 4 byte long nop as well.
9012         (blockage): New pattern.
9013         (simple_return): Remove call to arc_pad_return.
9014         (p_return_i): Likewise.
9015
9016 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9017
9018         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9019
9020 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9021
9022         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9023         ARC cores.
9024
9025 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9026
9027         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9028         for ARC700 and ARCv2.
9029
9030 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
9031
9032         PR target/86076
9033         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9034         operands[2] instead of operands[1].
9035
9036
9037 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9038
9039         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9040         case, check whether the outer register overlaps an unallocatable
9041         register, not just whether it fits the required class.
9042
9043 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9044
9045         * poly-int.h (can_div_trunc_p): Add new overload in which all values
9046         are poly_ints.
9047         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9048         (memrefs_conflict_p): Likewise.
9049         (init_alias_analysis): Likewise.
9050         * cfgexpand.c (expand_debug_expr): Likewise.
9051         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9052         * cse.c (fold_rtx): Likewise.
9053         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9054         * expr.c (emit_block_move_hints): Likewise.
9055         (clear_storage_hints, push_block, emit_push_insn): Likewise.
9056         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9057         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9058         (emit_group_store): Likewise.
9059         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
9060         to read the PRE/POST_MODIFY increment.
9061         * calls.c (store_one_arg): Use strip_offset.
9062         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9063         poly_int_rtx_p.
9064         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9065         by a VEC_SELECT.
9066         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9067         (simplify_binary_operation_1): Extend CONST_INT handling to
9068         poly_int_rtx_p.
9069         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9070         than a HOST_WIDE_INT.
9071         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9072         poly_int64.
9073         (adjust_mems, add_stores): Update accodingly.
9074         (vt_canonicalize_addr): Track polynomial offsets.
9075         (emit_note_insn_var_location): Likewise.
9076         (vt_add_function_parameter): Likewise.
9077         (vt_initialize): Likewise.
9078
9079 2018-06-12  Jeff Law  <law@redhat.com>
9080
9081         * config.gcc (alpha*-*-freebsd*): Remove.
9082         * config/alpha/freebsd.h: Remove.
9083
9084 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
9085
9086         PR other/69968
9087         * spellcheck-tree.c (levenshtein_distance): Rename to...
9088         (get_edit_distance): ...this, and update for underlying renaming.
9089         * spellcheck-tree.h (levenshtein_distance): Rename to...
9090         (get_edit_distance): ...this.
9091         * spellcheck.c (levenshtein_distance): Rename to...
9092         (get_edit_distance): ...this.  Convert from Levenshtein distance
9093         to Damerau-Levenshtein distance by supporting transpositions of
9094         adjacent characters.  Rename "v1" to "v_next" and "v0" to
9095         "v_one_ago".
9096         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9097         (selftest::test_edit_distance_unit_test_oneway): ...this, and
9098         update for underlying renaming.
9099         (selftest::levenshtein_distance_unit_test): Rename to...
9100         (selftest::test_get_edit_distance_unit): ...this, and update for
9101         underlying renaming.
9102         (selftest::test_find_closest_string): Add example from PR 69968
9103         where transposition helps
9104         (selftest::test_metric_conditions): Update for renaming.
9105         (selftest::test_metric_conditions): Likewise.
9106         (selftest::spellcheck_c_tests): Likewise.
9107         * spellcheck.h (levenshtein_distance): Rename both overloads to...
9108         (get_edit_distance): ...this.
9109         (best_match::consider): Update for renaming.
9110
9111 2018-06-12  Martin Sebor  <msebor@redhat.com>
9112
9113         PR tree-optimization/85259
9114         * builtins.c (compute_objsize): Handle constant offsets.
9115         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9116         true iff a warning has been issued.
9117         * gimple.h (gimple_nonartificial_location): New function.
9118         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9119         gimple_nonartificial_location and handle -Wno-system-headers.
9120         (handle_builtin_stxncpy): Same.
9121
9122 2018-06-12  Martin Sebor  <msebor@redhat.com>
9123
9124         PR c/85931
9125         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9126
9127 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
9128
9129         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9130         BUILTIN_VEC_XST entries for pointer to double and long long.
9131
9132 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
9133
9134         PR target/85990
9135         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9136         Update comments.
9137         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9138         Likewise.
9139
9140 2018-06-12  Martin Liska  <mliska@suse.cz>
9141
9142         * doc/options.texi: Document IntegerRange.
9143
9144 2018-06-12  Martin Liska  <mliska@suse.cz>
9145
9146         * config/i386/i386.opt: Make MPX-related options as Deprecated.
9147         * opt-functions.awk: Handle Deprecated flag.
9148         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9149         and report error.
9150         (read_cmdline_option): Report warning for a deprecated option.
9151         * opts.h (struct cl_option): Add new field cl_deprecated.
9152         (CL_ERR_DEPRECATED): New.
9153
9154 2018-06-12  Martin Liska  <mliska@suse.cz>
9155
9156         * doc/options.texi: Document Deprecated option flag.
9157
9158 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9159
9160         * config/arc/arc-arch.h (arc_extras): New enum.
9161         (arc_cpu_t):Add field extra.
9162         (arc_cpu_types): Consider the extras.
9163         * config/arc/arc-cpus.def: Add extras info.
9164         * config/arc/arc-opts.h (processor_type): Consider extra field.
9165         * config/arc/arc.c (arc_override_options): Handle extra field.
9166
9167 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9168
9169         * config/arc/arc-arch.h: Update ARC_OPTX macro.
9170         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9171         field.
9172         * config/arc/arc.c (arc_init): Update pic warning.
9173         (irq_range): Update irq range parsing warnings.
9174         (arc_override_options): Update various warning messages.
9175         (arc_handle_aux_attribute): Likewise.
9176
9177 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
9178
9179         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9180
9181 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9182
9183         * doc/sourcebuild.texi: Document usage of line number 0 in verify
9184         compiler messages directives.
9185
9186 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
9187
9188         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9189         * config/mips/mips-tables.opt: Regenerate.
9190         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9191         mips64r6.
9192         * doc/invoke.texi: Document -march=i6500.
9193
9194 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
9195
9196         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9197         (i6400_gpmul): Add cpu_unit.
9198         (i6400_gpdiv): Likewise.
9199         (i6400_msa_add_d): Update reservations.
9200         (i6400_msa_int_add) Likewise.
9201         (i6400_msa_short_logic3) Likewise.
9202         (i6400_msa_short_logic2) Likewise.
9203         (i6400_msa_short_logic) Likewise.
9204         (i6400_msa_move) Likewise.
9205         (i6400_msa_cmp) Likewise.
9206         (i6400_msa_short_float2) Likewise.
9207         (i6400_msa_div_d) Likewise.
9208         (i6400_msa_long_logic1) Likewise.
9209         (i6400_msa_long_logic2) Likewise.
9210         (i6400_msa_mult) Likewise.
9211         (i6400_msa_long_float2) Likewise.
9212         (i6400_msa_long_float4) Likewise.
9213         (i6400_msa_long_float5) Likewise.
9214         (i6400_msa_long_float8) Likewise.
9215         (i6400_fpu_fadd): Include frint type.
9216         (i6400_fpu_store): New define_insn_reservation.
9217         (i6400_fpu_load): Likewise.
9218         (i6400_fpu_move): Likewise.
9219         (i6400_fpu_fcmp): Likewise.
9220         (i6400_fpu_fmadd): Likewise.
9221         (i6400_int_mult): Include imul3nc type and update reservation.
9222         (i6400_int_div): Include idiv3 type and update reservation.
9223         (i6400_int_load): Update to check type not move_type.
9224         (i6400_int_store): Likewise.
9225         (i6400_int_prefetch): Set zero latency.
9226
9227 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
9228
9229         * gcc.c: Document new %@{...} sequence.
9230         (LINK_COMMAND_SPEC): Use it for the -L switches.
9231         (cpp_unique_options): Use it for the -I switches.
9232         (at_file_argbuf): New global variable.
9233         (in_at_file): Likewise.
9234         (alloc_args): Create at_file_argbuf.
9235         (clear_args): Truncate at_file_argbuf.
9236         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9237         (open_at_file): New function.
9238         (close_at_file): Likewise.
9239         (create_at_file): Delete.
9240         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9241         <'o'>: Likewise.
9242         <'@'>: New case.
9243         (validate_switches_from_spec): Deal with %@{...} sequence.
9244         (validate_switches): Likewise.
9245         (driver::finalize): Call clear_args.
9246
9247 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
9248
9249         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9250
9251 2018-06-11  Martin Sebor  <msebor@redhat.com>
9252
9253         * doc/invoke.texi (-Wall): List -Wc++17-compat.
9254         (Wno-class-memaccess): Add @opindex.
9255         (Wno-templates, Wno-multiple-inheritance): Same.
9256         (Wno-virtual-inheritance, Wno-namespaces): Same.
9257         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9258         (Wno-format-overflow, Wno-format-truncation): Same.
9259         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9260         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9261         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9262         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9263         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9264         (Wno-misspelled-isr): Same.
9265
9266 2018-06-11  Martin Sebor  <msebor@redhat.com>
9267
9268         * PR tree-optimization/86083
9269         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9270
9271 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
9272
9273         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9274
9275 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
9276
9277         PR target/85755
9278         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9279         on the correct operand.
9280         (*movdi_internal64): Ditto.
9281
9282 2018-06-11  Martin Liska  <mliska@suse.cz>
9283
9284         PR tree-optimization/86089
9285         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9286
9287 2018-06-11  Julia Koval  <julia.koval@intel.com>
9288
9289         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9290         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9291         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9292
9293 2018-06-11  Olivier Hainque  <hainque@adacore.com>
9294
9295         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9296         for Ada with strict dwarf2.
9297
9298 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
9299
9300         PR target/85755
9301         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9302         addresses.
9303
9304 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
9305
9306         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9307
9308 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
9309
9310         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9311         TARGET_ELF.
9312
9313 2018-06-08  Martin Liska  <mliska@suse.cz>
9314
9315         * tree-cfg.h (debug_function): Fix argument type to match
9316         implementation.
9317
9318 2018-06-08  Martin Liska  <mliska@suse.cz>
9319
9320         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9321         Remove usage of MPX-related (and removed) fields.
9322         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9323
9324 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
9325
9326         * cfg.c (debug): Use TDF_NONE rather than 0.
9327         * cfghooks.c (debug): Likewise.
9328         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9329         (struct dump_option_value_info): Convert to...
9330         (struct kv_pair): ...this template type.
9331         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9332         rather than 0.
9333         (optinfo_verbosity_options): Likewise.
9334         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9335         OPTGROUP_NONE.
9336         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9337         than int for "optgroup_flags" param.
9338         (dump_generic_expr_loc): Use dump_flags_t rather than int for
9339         "dump_kind" param.
9340         (dump_dec): Likewise.
9341         (dump_finish): Use TDF_NONE rather than 0.
9342         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9343         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
9344         than 0.  Update for change to option_ptr.
9345         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9346         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
9347         0.  Update for changes to optinfo_verbosity_options and
9348         optgroup_options.
9349         (opt_info_switch_p): Convert optgroup_flags from int to
9350         optgroup_flags_t.
9351         (dump_basic_block): Use dump_flags_t rather than int
9352         for "dump_kind" param.
9353         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9354         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9355         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9356         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9357         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9358         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9359         TDF_NONE): Convert from macros to...
9360         (enum dump_flag): ...this new enum.
9361         (dump_flags_t): Update to use enum.
9362         (operator|, operator&, operator~, operator|=, operator&=):
9363         Implement for dump_flags_t.
9364         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9365         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9366         Convert from macros to...
9367         (enum optgroup_flag): ...this new enum.
9368         (optgroup_flags_t): New typedef.
9369         (operator|, operator|=): Implement for optgroup_flags_t.
9370         (struct dump_file_info): Convert field "alt_flags" to
9371         dump_flags_t.  Convert field "optgroup_flags" to
9372         optgroup_flags_t.
9373         (dump_basic_block): Use dump_flags_t rather than int for param.
9374         (dump_generic_expr_loc): Likewise.
9375         (dump_dec): Likewise.
9376         (dump_register): Convert param "optgroup_flags" to
9377         optgroup_flags_t.
9378         (opt_info_enable_passes): Likewise.
9379         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9380         than 0.
9381         * gimple-pretty-print.c (debug): Likewise.
9382         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9383         (merged_store_group::apply_stores): Likewise.
9384         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9385         * gimple.c (verify_gimple_pp): Likewise.
9386         * graphite-poly.c (print_pbb_body): Likewise.
9387         * passes.c (pass_manager::register_one_dump_file): Convert
9388         local "optgroup_flags" to optgroup_flags_t.
9389         * print-tree.c (print_node): Use TDF_NONE rather than 0.
9390         (debug): Likewise.
9391         (debug_body): Likewise.
9392         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9393         to optgroup_flags_t.
9394         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9395         than 0.
9396         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9397         (convert_mult_to_fma): Likewise.
9398         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9399         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9400         * tree-vect-data-refs.c (dump_lower_bound): Convert param
9401         "dump_kind" to dump_flags_t.
9402
9403 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9404
9405         * config/rs6000/rs6000.c (min, max): Delete.
9406
9407 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9408
9409         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9410         -mabi=spe and -mabi=no-spe.
9411
9412 2018-06-08  Martin Liska  <mliska@suse.cz>
9413
9414         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9415         where we expect an existing summary.
9416
9417 2018-06-08  Martin Liska  <mliska@suse.cz>
9418
9419         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9420         * ipa-inline.h (estimate_edge_growth): Likewise.
9421
9422 2018-06-08  Martin Liska  <mliska@suse.cz>
9423
9424         * cgraph.c (function_version_hasher::hash): Use
9425         cgraph_node::get_uid ().
9426         (function_version_hasher::equal):
9427         * cgraph.h (cgraph_node::get_uid): New method.
9428         * ipa-inline.c (update_caller_keys): Use
9429         cgraph_node::get_uid ().
9430         (update_callee_keys): Likewise.
9431         * ipa-utils.c (searchc): Likewise.
9432         (ipa_reduced_postorder): Likewise.
9433         * lto-cgraph.c (input_node): Likewise.
9434         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9435         * symbol-summary.h (symtab_insertion): Likewise.
9436         (symtab_removal): Likewise.
9437         (symtab_duplication): Likewise.
9438         * tree-pretty-print.c (dump_function_header): Likewise.
9439         * tree-sra.c (convert_callers_for_node): Likewise.
9440
9441 2018-06-08  Martin Liska  <mliska@suse.cz>
9442
9443         * cgraph.c (symbol_table::create_edge): Always assign a new
9444         unique number.
9445         (symbol_table::free_edge): Do not recycle numbers.
9446         * cgraph.h (cgraph_edge::get): New method.
9447         * symbol-summary.h (symtab_removal): Use it.
9448         (symtab_duplication): Likewise.
9449         (call_summary::hashable_uid): Remove.
9450
9451 2018-06-08  Martin Liska  <mliska@suse.cz>
9452
9453         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9454         (initialize_growth_caches): Remove.
9455         (free_growth_caches): Likewise.
9456         (do_estimate_edge_time): Use edge_growth_cache.
9457         (do_estimate_edge_size): Likewise.
9458         (do_estimate_edge_hints): Likewise.
9459         * ipa-inline.c (reset_edge_caches): Likewise.
9460         (recursive_inlining): Likewise.
9461         (inline_small_functions): Likewise.
9462         * ipa-inline.h (initialize_growth_caches): Remove.
9463         (estimate_edge_size): Likewise.
9464         (estimate_edge_time): Likewise.
9465         (estimate_edge_hints): Likewise.
9466         (reset_edge_growth_cache): Likewise.
9467         * symbol-summary.h (call_summary::remove): New method.
9468
9469 2018-06-08  Martin Liska  <mliska@suse.cz>
9470
9471         * ipa-cp.c (class edge_clone_summary): New summary.
9472         (grow_edge_clone_vectors): Remove.
9473         (ipcp_edge_duplication_hook): Remove.
9474         (class edge_clone_summary_t): New call_summary class.
9475         (ipcp_edge_removal_hook): Remove.
9476         (edge_clone_summary_t::duplicate): New function.
9477         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9478         (create_specialized_node): Likewise.
9479         (ipcp_driver): Initialize edge_clone_summaries and do not
9480         register hooks.
9481
9482 2018-06-08  Martin Liska  <mliska@suse.cz>
9483
9484         * symbol-summary.h (get): New function.
9485         (call_summary::m_initialize_when_cloning): New class member.
9486
9487 2018-06-08  Martin Liska  <mliska@suse.cz>
9488
9489         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9490         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9491         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9492         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9493         (remove_cgraph_node_from_order): Use the removed_nodes set.
9494         (do_per_function_toporder): Likwise.
9495         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9496         instead of summary_uid.
9497         (symtab_removal): Likewise.
9498         (symtab_duplication): Likewise.
9499
9500 2018-06-08  Martin Liska  <mliska@suse.cz>
9501
9502         * ipa-cp.c (ipcp_store_bits_results): Use
9503         ipcp_transformation_sum.
9504         (ipcp_store_vr_results): Likewise.
9505         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9506         to ...
9507         (ipcp_transformation_initialize): ... this.
9508         (ipa_set_node_agg_value_chain):
9509         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9510         (write_ipcp_transformation_info): Likewise.
9511         (read_ipcp_transformation_info): Likewise.
9512         (ipcp_update_bits): Likewise.
9513         (ipcp_update_vr): Likewise.
9514         (ipcp_transform_function): Likewise.
9515         * ipa-prop.h: Rename ipcp_transformation_summary to
9516         ipcp_transformation.
9517         (class ipcp_transformation_t): New function summary.
9518         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9519         (ipa_get_agg_replacements_for_node): Likewise.
9520
9521 2018-06-08  Martin Liska  <mliska@suse.cz>
9522
9523         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9524         of struct.
9525         (class funct_state_summary_t): New function_summary class.
9526         (has_function_state): Remove.
9527         (get_function_state): Likewise.
9528         (set_function_state): Likewise.
9529         (add_new_function): Likewise.
9530         (funct_state_summary_t::insert): New function.
9531         (duplicate_node_data): Remove.
9532         (remove_node_data): Remove.
9533         (funct_state_summary_t::duplicate): New function.
9534         (register_hooks): Create new funct_state_summaries.
9535         (pure_const_generate_summary): Use it.
9536         (pure_const_write_summary): Likewise.
9537         (pure_const_read_summary): Likewise.
9538         (propagate_pure_const): Likewise.
9539         (propagate_nothrow): Likewise.
9540         (dump_malloc_lattice): Likewise.
9541         (propagate_malloc): Likewise.
9542         (execute): Do not register hooks, just remove summary
9543         instead.
9544         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9545         constructor.
9546
9547 2018-06-08  Martin Liska  <mliska@suse.cz>
9548
9549         * ipa-reference.c (remove_node_data): Remove.
9550         (duplicate_node_data): Likewise.
9551         (class ipa_ref_var_info_summary_t): New class.
9552         (class ipa_ref_opt_summary_t): Likewise.
9553         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9554         (get_reference_optimization_summary): Use
9555         ipa_ref_opt_sum_summaries.
9556         (set_reference_vars_info): Remove.
9557         (set_reference_optimization_summary): Likewise.
9558         (ipa_init): Create summaries.
9559         (init_function_info): Use function summary.
9560         (ipa_ref_opt_summary_t::duplicate): New function.
9561         (ipa_ref_opt_summary_t::remove): New function.
9562         (get_read_write_all_from_node): Fix GNU coding style.
9563         (propagate): Use function summary.
9564         (write_node_summary_p): Fix GNU coding style.
9565         (stream_out_bitmap): Likewise.
9566         (ipa_reference_read_optimization_summary): Use function summary.
9567         (ipa_reference_c_finalize): Do not release hooks.
9568
9569 2018-06-08  Martin Liska  <mliska@suse.cz>
9570
9571         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9572         (analyze_function_body): Extract multiple calls of get_create.
9573         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9574         * ipa-inline.c (recursive_inlining): Use ::get method.
9575         * ipa-inline.h (estimate_edge_growth): Likewise.
9576
9577 2018-06-08  Martin Liska  <mliska@suse.cz>
9578
9579         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9580         HSA_INVALID.
9581         (hsa_function_summary::hsa_function_summary): Use the new enum
9582         value.
9583         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9584         * hsa-gen.c (hsa_get_host_function): Likewise.
9585         (get_brig_function_name): Likewise.
9586         * ipa-hsa.c (process_hsa_functions): Likewise.
9587         (ipa_hsa_write_summary): Likewise.
9588         * symbol-summary.h (symtab_duplication): Use ::get function/
9589         (get): New function.
9590
9591 2018-06-08  Martin Liska  <mliska@suse.cz>
9592
9593         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9594         of get.
9595         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9596         (hsa_register_kernel): Likewise.
9597         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9598         * hsa-gen.c (hsa_get_host_function): Likewise.
9599         (get_brig_function_name): Likewise.
9600         (generate_hsa): Likewise.
9601         (pass_gen_hsail::execute): Likewise.
9602         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9603         (devirtualization_time_bonus): Likewise.
9604         (ipcp_propagate_stage): Likewise.
9605         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9606         (edge_set_predicate): Likewise.
9607         (evaluate_conditions_for_known_args): Likewise.
9608         (evaluate_properties_for_edge): Likewise.
9609         (ipa_fn_summary::reset): Likewise.
9610         (ipa_fn_summary_t::duplicate): Likewise.
9611         (dump_ipa_call_summary): Likewise.
9612         (ipa_dump_fn_summary): Likewise.
9613         (analyze_function_body): Likewise.
9614         (compute_fn_summary): Likewise.
9615         (estimate_edge_devirt_benefit): Likewise.
9616         (estimate_edge_size_and_time): Likewise.
9617         (estimate_calls_size_and_time): Likewise.
9618         (estimate_node_size_and_time): Likewise.
9619         (inline_update_callee_summaries): Likewise.
9620         (remap_edge_change_prob): Likewise.
9621         (remap_edge_summaries): Likewise.
9622         (ipa_merge_fn_summary_after_inlining): Likewise.
9623         (ipa_update_overall_fn_summary): Likewise.
9624         (read_ipa_call_summary): Likewise.
9625         (inline_read_section): Likewise.
9626         (write_ipa_call_summary): Likewise.
9627         (ipa_fn_summary_write): Likewise.
9628         (ipa_free_fn_summary): Likewise.
9629         * ipa-hsa.c (process_hsa_functions): Likewise.
9630         (ipa_hsa_write_summary): Likewise.
9631         (ipa_hsa_read_section): Likewise.
9632         * ipa-icf.c (sem_function::merge): Likewise.
9633         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9634         (do_estimate_edge_time): Likewise.
9635         (estimate_size_after_inlining): Likewise.
9636         (estimate_growth): Likewise.
9637         (growth_likely_positive): Likewise.
9638         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9639         (inline_call): Likewise.
9640         * ipa-inline.c (caller_growth_limits): Likewise.
9641         (can_inline_edge_p): Likewise.
9642         (can_inline_edge_by_limits_p): Likewise.
9643         (compute_uninlined_call_time): Likewise.
9644         (compute_inlined_call_time): Likewise.
9645         (want_inline_small_function_p): Likewise.
9646         (edge_badness): Likewise.
9647         (update_caller_keys): Likewise.
9648         (update_callee_keys): Likewise.
9649         (recursive_inlining): Likewise.
9650         (inline_small_functions): Likewise.
9651         (inline_to_all_callers_1): Likewise.
9652         (dump_overall_stats): Likewise.
9653         (early_inline_small_functions): Likewise.
9654         (early_inliner): Likewise.
9655         * ipa-inline.h (estimate_edge_growth): Likewise.
9656         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9657         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9658         * ipa-prop.h (IPA_NODE_REF): Likewise.
9659         (IPA_EDGE_REF): Likewise.
9660         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9661         (propagate_malloc): Likewise.
9662         * ipa-split.c (execute_split_functions): Likewise.
9663         * symbol-summary.h: Rename get to get_create.
9664         (get): Likewise.
9665         (get_create): Likewise.
9666         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9667
9668 2018-06-08  Martin Liska  <mliska@suse.cz>
9669
9670         * symbol-summary.h (release): Move definition out of class
9671         declaration.
9672         (symtab_removal): Likewise.
9673         (symtab_duplication): Likewise.
9674
9675 2018-06-08  Martin Liska  <mliska@suse.cz>
9676
9677         * symbol-summary.h (function_summary): Move constructor
9678         implementation out of class declaration.
9679         (release): Likewise.
9680         (symtab_insertion): Likewise.
9681         (symtab_removal): Likewise.
9682         (symtab_duplication): Likewise.
9683         (get): Likewise.
9684
9685 2018-06-08  Martin Liska  <mliska@suse.cz>
9686
9687         * Makefile.in: Remove support for MPX (macros, related functions,
9688         fields in cgraph_node, ...).
9689         * builtin-types.def (BT_BND): Likewise.
9690         (BT_FN_BND_CONST_PTR): Likewise.
9691         (BT_FN_CONST_PTR_BND): Likewise.
9692         (BT_FN_VOID_PTR_BND): Likewise.
9693         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9694         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9695         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9696         (expand_builtin_mempcpy_with_bounds): Likewise.
9697         (expand_builtin_memset_with_bounds): Likewise.
9698         (expand_builtin_memset_args): Likewise.
9699         (std_expand_builtin_va_start): Likewise.
9700         (expand_builtin): Likewise.
9701         (expand_builtin_with_bounds): Likewise.
9702         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9703         (DEF_LIB_BUILTIN_CHKP): Likewise.
9704         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9705         (DEF_CHKP_BUILTIN): Likewise.
9706         (BUILT_IN_MEMCPY): Likewise.
9707         (BUILT_IN_MEMMOVE): Likewise.
9708         (BUILT_IN_MEMPCPY): Likewise.
9709         (BUILT_IN_MEMSET): Likewise.
9710         (BUILT_IN_STPCPY): Likewise.
9711         (BUILT_IN_STRCAT): Likewise.
9712         (BUILT_IN_STRCHR): Likewise.
9713         (BUILT_IN_STRCPY): Likewise.
9714         (BUILT_IN_STRLEN): Likewise.
9715         (BUILT_IN_MEMCPY_CHK): Likewise.
9716         (BUILT_IN_MEMMOVE_CHK): Likewise.
9717         (BUILT_IN_MEMPCPY_CHK): Likewise.
9718         (BUILT_IN_MEMSET_CHK): Likewise.
9719         (BUILT_IN_STPCPY_CHK): Likewise.
9720         (BUILT_IN_STRCAT_CHK): Likewise.
9721         (BUILT_IN_STRCPY_CHK): Likewise.
9722         * calls.c (store_bounds): Likewise.
9723         (emit_call_1): Likewise.
9724         (special_function_p): Likewise.
9725         (maybe_warn_nonstring_arg): Likewise.
9726         (initialize_argument_information): Likewise.
9727         (finalize_must_preallocate): Likewise.
9728         (compute_argument_addresses): Likewise.
9729         (expand_call): Likewise.
9730         * cfgexpand.c (expand_call_stmt): Likewise.
9731         (expand_return): Likewise.
9732         (expand_gimple_stmt_1): Likewise.
9733         (pass_expand::execute): Likewise.
9734         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9735         (cgraph_node::remove): Likewise.
9736         (cgraph_node::dump): Likewise.
9737         (cgraph_node::verify_node): Likewise.
9738         * cgraph.h (chkp_function_instrumented_p): Likewise.
9739         (symtab_node::get_alias_target): Likewise.
9740         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9741         (cgraph_local_p): Likewise.
9742         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9743         (cgraph_edge::rebuild_references): Likewise.
9744         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9745         (walk_polymorphic_call_targets): Likewise.
9746         (cgraph_node::expand_thunk): Likewise.
9747         (symbol_table::output_weakrefs): Likewise.
9748         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9749         (ix86_handle_option): Likewise.
9750         * config/i386/constraints.md: Likewise.
9751         * config/i386/i386-builtin-types.def (BND): Likewise.
9752         (VOID): Likewise.
9753         (PVOID): Likewise.
9754         (ULONG): Likewise.
9755         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9756         (BDESC_FIRST): Likewise.
9757         (BDESC): Likewise.
9758         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9759         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9760         * config/i386/i386.c (enum reg_class): Likewise.
9761         (ix86_target_string): Likewise.
9762         (ix86_option_override_internal): Likewise.
9763         (ix86_conditional_register_usage): Likewise.
9764         (ix86_valid_target_attribute_inner_p): Likewise.
9765         (ix86_set_indirect_branch_type): Likewise.
9766         (ix86_set_current_function): Likewise.
9767         (ix86_function_arg_regno_p): Likewise.
9768         (init_cumulative_args): Likewise.
9769         (ix86_function_arg_advance): Likewise.
9770         (ix86_function_arg): Likewise.
9771         (ix86_pass_by_reference): Likewise.
9772         (ix86_function_value_regno_p): Likewise.
9773         (ix86_function_value_1): Likewise.
9774         (ix86_function_value_bounds): Likewise.
9775         (ix86_return_in_memory): Likewise.
9776         (ix86_setup_incoming_vararg_bounds): Likewise.
9777         (ix86_va_start): Likewise.
9778         (indirect_thunk_need_prefix): Likewise.
9779         (print_reg): Likewise.
9780         (ix86_print_operand): Likewise.
9781         (ix86_expand_call): Likewise.
9782         (ix86_output_function_return): Likewise.
9783         (reg_encoded_number): Likewise.
9784         (BDESC_VERIFYS): Likewise.
9785         (ix86_init_mpx_builtins): Likewise.
9786         (ix86_init_builtins): Likewise.
9787         (ix86_emit_cmove): Likewise.
9788         (ix86_emit_move_max): Likewise.
9789         (ix86_expand_builtin): Likewise.
9790         (ix86_builtin_mpx_function): Likewise.
9791         (ix86_get_arg_address_for_bt): Likewise.
9792         (ix86_load_bounds): Likewise.
9793         (ix86_store_bounds): Likewise.
9794         (ix86_load_returned_bounds): Likewise.
9795         (ix86_store_returned_bounds): Likewise.
9796         (ix86_class_likely_spilled_p): Likewise.
9797         (ix86_hard_regno_mode_ok): Likewise.
9798         (x86_order_regs_for_local_alloc): Likewise.
9799         (ix86_mitigate_rop): Likewise.
9800         (ix86_bnd_prefixed_insn_p): Likewise.
9801         (ix86_mpx_bound_mode): Likewise.
9802         (ix86_make_bounds_constant): Likewise.
9803         (ix86_initialize_bounds): Likewise.
9804         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9805         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9806         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9807         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9808         (TARGET_CHKP_BOUND_MODE): Likewise.
9809         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9810         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9811         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9812         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9813         * config/i386/i386.h (TARGET_MPX): Likewise.
9814         (TARGET_MPX_P): Likewise.
9815         (VALID_BND_REG_MODE): Likewise.
9816         (FIRST_BND_REG): Likewise.
9817         (LAST_BND_REG): Likewise.
9818         (enum reg_class): Likewise.
9819         (BND_REG_P): Likewise.
9820         (BND_REGNO_P): Likewise.
9821         (BNDmode): Likewise.
9822         (ADJUST_INSN_LENGTH): Likewise.
9823         * config/i386/i386.md: Likewise.
9824         * config/i386/i386.opt: Likewise.
9825         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9826         (defined): Likewise.
9827         (LINK_MPX): Likewise.
9828         (MPX_SPEC): Likewise.
9829         (LIBMPX_SPEC): Likewise.
9830         (LIBMPXWRAPPERS_SPEC): Likewise.
9831         (CHKP_SPEC): Likewise.
9832         * config/i386/predicates.md: Likewise.
9833         * dbxout.c (dbxout_type): Likewise.
9834         * doc/extend.texi: Likewise.
9835         * doc/invoke.texi: Likewise.
9836         * doc/md.texi: Likewise.
9837         * doc/tm.texi: Likewise.
9838         * doc/tm.texi.in: Likewise.
9839         * dwarf2out.c (is_base_type): Likewise.
9840         (gen_formal_types_die): Likewise.
9841         (gen_subprogram_die): Likewise.
9842         (gen_type_die_with_usage): Likewise.
9843         (gen_decl_die): Likewise.
9844         (dwarf2out_late_global_decl): Likewise.
9845         * expr.c (expand_assignment): Likewise.
9846         (emit_storent_insn): Likewise.
9847         (store_expr_with_bounds): Likewise.
9848         (store_expr): Likewise.
9849         (expand_expr_real_1): Likewise.
9850         * expr.h (store_expr_with_bounds): Likewise.
9851         * function.c (use_register_for_decl): Likewise.
9852         (struct bounds_parm_data): Likewise.
9853         (assign_parms_augmented_arg_list): Likewise.
9854         (assign_parm_find_entry_rtl): Likewise.
9855         (assign_parm_is_stack_parm): Likewise.
9856         (assign_parm_load_bounds): Likewise.
9857         (assign_bounds): Likewise.
9858         (assign_parms): Likewise.
9859         (expand_function_start): Likewise.
9860         * gcc.c (CHKP_SPEC): Likewise.
9861         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9862         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9863         (wrestrict_dom_walker::check_call): Likewise.
9864         * gimple.c (gimple_build_call_from_tree): Likewise.
9865         * gimple.h (enum gf_mask): Likewise.
9866         (gimple_call_with_bounds_p): Likewise.
9867         (gimple_call_set_with_bounds): Likewise.
9868         * gimplify.c (gimplify_init_constructor): Likewise.
9869         * ipa-cp.c (initialize_node_lattices): Likewise.
9870         (propagate_constants_across_call): Likewise.
9871         (find_more_scalar_values_for_callers_subset): Likewise.
9872         * ipa-hsa.c (process_hsa_functions): Likewise.
9873         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9874         * ipa-icf.c (sem_function::merge): Likewise.
9875         * ipa-inline.c (early_inliner): Likewise.
9876         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9877         (warn_function_cold): Likewise.
9878         (propagate_pure_const): Likewise.
9879         * ipa-ref.h (enum GTY): Likewise.
9880         * ipa-split.c (find_retbnd): Likewise.
9881         (consider_split): Likewise.
9882         (split_function): Likewise.
9883         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9884         * ipa.c (walk_polymorphic_call_targets): Likewise.
9885         (symbol_table::remove_unreachable_nodes): Likewise.
9886         (process_references): Likewise.
9887         (cgraph_build_static_cdtor_1): Likewise.
9888         * lto-cgraph.c (lto_output_node): Likewise.
9889         (output_refs): Likewise.
9890         (compute_ltrans_boundary): Likewise.
9891         (input_overwrite_node): Likewise.
9892         (input_node): Likewise.
9893         (input_cgraph_1): Likewise.
9894         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9895         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9896         (class pass_chkp_instrumentation_passes): Likewise.
9897         (make_pass_chkp_instrumentation_passes): Likewise.
9898         * passes.def: Likewise.
9899         * rtl.h (struct GTY): Likewise.
9900         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9901         * stor-layout.c (layout_type): Likewise.
9902         * symtab.c: Likewise.
9903         * target.def: Likewise.
9904         * targhooks.c (default_chkp_bound_type): Likewise.
9905         (default_chkp_bound_mode): Likewise.
9906         (default_builtin_chkp_function): Likewise.
9907         (default_chkp_function_value_bounds): Likewise.
9908         (default_chkp_make_bounds_constant): Likewise.
9909         (default_chkp_initialize_bounds): Likewise.
9910         * targhooks.h (default_chkp_bound_type): Likewise.
9911         (default_chkp_bound_mode): Likewise.
9912         (default_builtin_chkp_function): Likewise.
9913         (default_chkp_function_value_bounds): Likewise.
9914         (default_chkp_make_bounds_constant): Likewise.
9915         (default_chkp_initialize_bounds): Likewise.
9916         * toplev.c (compile_file): Likewise.
9917         (process_options): Likewise.
9918         * tree-core.h (DEF_BUILTIN): Likewise.
9919         (DEF_BUILTIN_CHKP): Likewise.
9920         * tree-inline.c (declare_return_variable): Likewise.
9921         (remap_gimple_stmt): Likewise.
9922         (copy_bb): Likewise.
9923         (initialize_inlined_parameters): Likewise.
9924         (expand_call_inline): Likewise.
9925         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9926         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9927         (make_pass_ipa_chkp_produce_thunks): Likewise.
9928         (make_pass_chkp): Likewise.
9929         (make_pass_chkp_opt): Likewise.
9930         (make_pass_chkp_instrumentation_passes): Likewise.
9931         * tree-pretty-print.c (dump_generic_node): Likewise.
9932         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9933         * tree-ssa-dce.c (propagate_necessity): Likewise.
9934         (eliminate_unnecessary_stmts): Likewise.
9935         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9936         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9937         * tree-ssa-sccvn.h: Likewise.
9938         * tree-ssa-strlen.c (get_string_length): Likewise.
9939         (valid_builtin_call): Likewise.
9940         (adjust_last_stmt): Likewise.
9941         (handle_builtin_strchr): Likewise.
9942         (handle_builtin_strcpy): Likewise.
9943         (handle_builtin_stxncpy): Likewise.
9944         (handle_builtin_memcpy): Likewise.
9945         (handle_builtin_strcat): Likewise.
9946         (strlen_check_and_optimize_stmt): Likewise.
9947         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9948         * tree-streamer-in.c: Likewise.
9949         * tree-streamer.c (record_common_node): Likewise.
9950         * tree.c (tree_code_size): Likewise.
9951         (wide_int_to_tree_1): Likewise.
9952         (type_contains_placeholder_1): Likewise.
9953         (build_common_tree_nodes): Likewise.
9954         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9955         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9956         (POINTER_BOUNDS_P): Likewise.
9957         (BOUNDED_TYPE_P): Likewise.
9958         (BOUNDED_P): Likewise.
9959         (CALL_WITH_BOUNDS_P): Likewise.
9960         (pointer_bounds_type_node): Likewise.
9961         * value-prof.c (gimple_ic): Likewise.
9962         * var-tracking.c (vt_add_function_parameters): Likewise.
9963         * varasm.c (make_decl_rtl): Likewise.
9964         (assemble_start_function): Likewise.
9965         (output_constant): Likewise.
9966         (maybe_assemble_visibility): Likewise.
9967         * varpool.c (ctor_for_folding): Likewise.
9968         * chkp-builtins.def: Remove.
9969         * ipa-chkp.c: Remove.
9970         * ipa-chkp.h: Remove.
9971         * rtl-chkp.c: Remove.
9972         * rtl-chkp.h: Remove.
9973         * tree-chkp-opt.c: Remove.
9974         * tree-chkp.c: Remove.
9975         * tree-chkp.h: Remove.
9976
9977 2018-06-07  Carl Love  <cel@us.ibm.com>
9978
9979         * config/rs6000/vsx.md (vextract_fp_from_shorth,
9980         vextract_fp_from_shortl): Add BE support.
9981
9982 2018-06-07  Paul Koning  <ni1d@arrl.net>
9983
9984         * compare-elim.c (try_merge_compare): Don't merge compare if
9985         address contains a side effect.
9986         (try_eliminate_compare): Likewise.
9987
9988 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
9989
9990         * config.gcc: Support "tremont".
9991         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9992         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9993         PROCESSOR_TREMONT.
9994         * config/i386/i386.c (m_TREMONT): Define.
9995         (processor_target_table): Add "tremont".
9996         (PTA_TREMONT): Define.
9997         (ix86_lea_outperforms): Add TARGET_TREMONT.
9998         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9999         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10000         and M_INTEL_GOLDMONT_PLUS.
10001         (fold_builtin_cpu): Add "tremont".
10002         (ix86_add_stmt_cost): Add TARGET_TREMONT.
10003         (ix86_option_override_internal): Add "tremont".
10004         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10005         (processor_type): Add PROCESSOR_TREMONT.
10006         * config/i386/x86-tune.def: Add m_TREMONT.
10007         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10008
10009 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10010
10011         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10012         symbol defined for msp430i* devices to be lower case.
10013
10014 2018-06-07  Richard Biener  <rguenther@suse.de>
10015
10016         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10017         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
10018         Properly wrap signed arithmetic if overflow wraps.
10019
10020 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
10021
10022         PR tree-optimization/69615
10023         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10024         of a cast from a same precision integral SSA_NAME in a bb dominated
10025         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
10026         cast to utype if rhs2 has already a compatible type.
10027
10028 2018-06-07  Richard Biener  <rguenther@suse.de>
10029
10030         PR tree-optimization/85935
10031         * graphite-scop-detection.c (find_params_in_bb): Analyze
10032         condition operands with respect to the correct loop.  Assert
10033         the analysis doesn't fail.
10034
10035 2018-06-04  Carl Love  <cel@us.ibm.com>
10036
10037         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10038         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
10039         as it is slightly cheaper.
10040         (first_match_or_eos_index_<mode>):
10041         Calculate index using natural element order.
10042         (first_match_index_<mode>):
10043         Calculate index using natural element order.
10044         (first_match_or_eos_index_<mode>):
10045         Calculate index using natural order.
10046         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10047         for BE and LE modes.
10048         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10049         P9V_BUILTIN_VCLZLSBB_V16QI.
10050         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10051         specific.
10052
10053 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10054
10055         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10056         indentation and line wrap for many prototypes.  Add missing
10057         @smallexample directives around block of prototypes for vec_xl and
10058         vec_xst.
10059
10060 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
10061
10062         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10063         track if we pass or return IEEE 128-bit floating point.
10064         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10065         C++ mangling that is compatible with GCC 8.1.
10066         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10067         (init_cumulative_args): Note if we pass or return IEEE 128-bit
10068         floating point types.
10069         (rs6000_function_arg_advance_1): Likewise.
10070         (rs6000_mangle_type): Optionally generate mangled names that match
10071         what GCC 8.1 generated for IEEE 128-bit floating point types.
10072         (rs6000_globalize_decl_name): If we have an external function that
10073         passes or returns IEEE 128-bit types, generate a weak reference
10074         from the mangled name used in GCC 8.1 to the current mangled
10075         name.
10076         (rs6000_init_builtins): Make __ibm128 use the long double type if
10077         long double is IBM extended double.  Make __float128 use the long
10078         double type if long double is IEEE 128-bit.
10079
10080         PR target/85657
10081         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10082         macro for __ibm128 built-in functions.
10083         (PACK_IF): Add __ibm128 pack/unpack functions.
10084         (UNPACK_IF): Likewise.
10085         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10086         enable long double built-in functions if long double is IEEE
10087         128-bit floating point.
10088         (rs6000_invalid_builtin): Update long double built-in function
10089         error message.
10090         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10091         functions, adjust the built-in function to use the long double
10092         built-in function if __ibm128 and long double are the same type.
10093         * doc/extend.texi (PowerPC builtins): Update documention for
10094         __builtin_{,un}pack_longdouble.  Add documentation for
10095         __builtin_{,un}pack_ibm128.
10096
10097 2018-06-06  Jim Wilson  <jimw@sifive.com>
10098
10099         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10100         (struct machine_function): New field interrupt_mode.
10101         (riscv_handle_type_attribute): New function.  Add forward declaration.
10102         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10103         (riscv_expand_epilogue): Check interrupt_mode field.
10104         (riscv_set_current_function): Check interrupt attribute args and
10105         set interrupt_mode field.
10106         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10107         (riscv_sret, riscv_uret): New.
10108         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10109         new arguments to interrupt attribute.
10110
10111 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
10112
10113         PR target/63177
10114         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10115         Don't handle -mcpu=power8 if -mpower9-vector is also used.
10116
10117 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10118
10119         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10120         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10121         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10122         several redundant entries.
10123
10124 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
10125
10126         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10127         type from "rtx" to "rtx_insn *".
10128         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10129         for local "call_insn", removing cast.
10130         (ix86_expand_call): Likewise, introducing a "call_insn" local.
10131
10132 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10133
10134         PR tree-optimization/86066
10135         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10136         for BIT_INSERT_EXPR stores.
10137
10138 2018-06-06  Richard Biener  <rguenther@suse.de>
10139
10140         PR tree-optimization/86062
10141         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10142         component refs ontop
10143         of to be offsetted base.
10144
10145 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10146
10147         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10148         to be static and remove check on interrupt attribute name.
10149
10150 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10151
10152         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10153         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10154
10155 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
10156
10157         PR target/79924
10158         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10159         second argument.
10160         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10161         Remove second argument, change how error is called.
10162         (aarch64_layout_arg): Remove second argument from
10163         aarch64_err_no_fpadvsimd call.
10164         (aarch64_init_cumulative_args): Ditto.
10165         (aarch64_gimplify_va_arg_expr): Ditto.
10166         * config/aarch64/aarch64.md (mov<mode>): Ditto.
10167
10168 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
10169
10170         * config/i386/i386.md (simple_return_indirect_internal): New expander.
10171         (*simple_return_indirect_internal<mode>): Rename from
10172         simple_return_indirect_internal.  Use W mode iterator.
10173         (rstorssp): New expander.
10174         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
10175         (clrssbsy): New expander.
10176         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
10177
10178 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10179
10180         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10181         __typeof__.
10182         (cmse_check_pointed_object): Likewise.
10183
10184 2018-06-05  Martin Liska  <mliska@suse.cz>
10185
10186         PR gcov-profile/47618
10187         * doc/invoke.texi: Document how -fprofile-dir format
10188         is extended.
10189
10190 2018-06-05  Richard Biener  <rguenther@suse.de>
10191
10192         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10193         removal pretend DOM info isn't available so we do not update
10194         it and only remove edges, not dominated blocks.  Actually free
10195         DOM info in case we removed something.  Remove unreachable blocks.
10196         (mfb_keep_latches): Work with either DOM info or marked backedges.
10197         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10198         first.  Mark backedges if DOM info isn't available.
10199         (Re-)compute DOM info after cleanup_control_flow_pre.
10200
10201 2018-06-05  Richard Biener  <rguenther@suse.de>
10202
10203         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10204         (locus_discrim_hasher::hash): Adjust.
10205         (locus_discrim_hasher::equal): Likewise.
10206         (next_discriminator_for_locus): Work on line directly.
10207         (same_line_p): Pass in expanded locus1 as well.
10208         (assign_discriminators): Avoid redundant location expansions.
10209
10210 2018-06-05  Richard Biener  <rguenther@suse.de>
10211
10212         PR tree-optimization/86046
10213         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10214         if required after clearing TREE_ADDRESSABLE.
10215
10216 2018-06-05  Richard Biener  <rguenther@suse.de>
10217
10218         PR tree-optimization/86047
10219         * tree-ssa-loop.c (for_each_index): Glob handling of all
10220         decls and constants and really handle all of them.
10221
10222 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10223
10224         PR target/81497
10225         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10226         qualifier_void_pointer and qualifier_const_void_pointer.
10227         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10228         (arm_init_builtins): Handle the above.
10229         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10230         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10231         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10232         void intrinsics.
10233
10234 2018-06-05  Martin Liska  <mliska@suse.cz>
10235
10236         * auto-profile.c (read_autofdo_file): Do not use
10237         gcov_ctr_summary struct.
10238         (afdo_callsite_hot_enough_for_early_inline): Likewise.
10239         * coverage.c (struct counts_entry): Likewise.
10240         (read_counts_file): Read just single summary entry.
10241         (get_coverage_counts): Use gcov_summary struct.
10242         * coverage.h (get_coverage_counts): Likewise.
10243         * gcov-dump.c (dump_working_sets): Likewise.
10244         (tag_summary): Dump just single summary.
10245         * gcov-io.c (gcov_write_summary): Write just histogram
10246         summary.
10247         (gcov_read_summary): Read just single summary.
10248         (compute_working_sets): Use gcov_summary struct.
10249         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10250         of GCOV_COUNTERS_SUMMABLE.
10251         (GCOV_COUNTERS_SUMMABLE): Remove.
10252         (GCOV_FIRST_VALUE_COUNTER): Replace with
10253         GCOV_COUNTER_V_INTERVAL.
10254         (struct gcov_ctr_summary): Remove.
10255         (struct gcov_summary): Directly use fields of former
10256         gcov_ctr_summary.
10257         (compute_working_sets): Use gcov_summary struct.
10258         * gcov.c (read_count_file): Do not use ctrs fields.
10259         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10260         struct.
10261         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10262         struct.
10263         * profile.c: Likewise.
10264         * profile.h: Likewise.
10265
10266 2018-06-05  Martin Liska  <mliska@suse.cz>
10267
10268         PR gcov-profile/84846
10269         * gcov.c (output_lines): Print working directory only
10270         in intermediate format.
10271
10272 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
10273
10274         * config/s390/s390-builtin-types.def: Add void function type.
10275         * config/s390/s390-builtins.def: Use the function type for the
10276         tbeginc builtin.
10277
10278 2018-06-04  Jim Wilson  <jimw@sifive.com>
10279
10280         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10281         to int.
10282         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10283         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
10284         handle EH_RETURN_DATA_REGNO registers properly.
10285         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10286         (riscv_expand_epilogue): Update comment.  Change argument name and
10287         type.  Update code to use new name and type.  Pass new args to
10288         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
10289         EXCEPTION_RETURN.
10290         * config/riscv/riscv.md (NORMAL_RETURN): New.
10291         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10292         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10293         (eh_return): Call gen_eh_return_internal and emit barrier.
10294         (eh_return_internal): Call riscv_expand_epilogue.
10295
10296 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
10297
10298         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10299         bit_insertion field and declare can_be_merged_into method.
10300         (merged_store_group::can_be_merged_into): New method.
10301         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10302         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
10303         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10304
10305 2018-06-04  Richard Biener  <rguenther@suse.de>
10306
10307         PR tree-optimization/85955
10308         * builtins.c (fold_builtin_sincos): Convert pointers to
10309         destination to appropriate type before dereferencing.
10310
10311 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
10312
10313         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10314
10315 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
10316
10317         * expr.c (expand_expr_real_1): Force the operand into memory if
10318         its TYPE_MODE is BLKmode and if there is no integer mode for
10319         the number of bits being extracted.
10320
10321 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10322
10323         PR target/85832
10324         PR target/86036
10325         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10326         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10327
10328 2018-06-04  Richard Biener  <rguenther@suse.de>
10329
10330         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10331         (cleanup_tree_cfg_noloop): ... single caller.  Do
10332         start_recording_case_labels later.
10333
10334 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
10335
10336         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10337         to _IMMINTRIN_H_INCLUDED.
10338         * config/i386/pconfigintrin.h: Ditto.
10339         * config/i386/waitpkgintrin.h: Ditto.
10340         * config/i386/immintrin.h: Add includes for sgxintrin.h,
10341         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10342         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10343         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10344         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10345         waitpkgintrin.h and cldemoteintrin.h.
10346
10347 2018-06-04  Richard Biener  <rguenther@suse.de>
10348
10349         PR tree-optimization/86038
10350         * tracer.c (find_best_successor): Check probability for
10351         being initialized, bail out if not.
10352
10353 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
10354
10355         PR target/86003
10356         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10357         of bits to ignore when comparing architectures.
10358
10359 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10360
10361         PR tree-optimization/69615
10362         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10363         maximum or minimum of the type, try to merge it also as if
10364         range1 is + [-, x - 1] or + [x + 1, -].
10365
10366         PR c++/86025
10367         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10368
10369 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10370
10371         PR tree-optimization/86034
10372         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10373         the unsigned bitfield type in a bit insertion sequence if it does not
10374         have a larger precision than the bitfield size.
10375         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10376
10377 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
10378
10379         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10380
10381 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10382
10383         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10384         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10385         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10386         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10387
10388 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10389
10390         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10391         Disable -fdelete-null-pointer-checks for ELF toolchain.
10392
10393 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10394             Kito Cheng  <kito.cheng@gmail.com>
10395
10396         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10397         (nds32le-*-*, nds32be-*-*): Integrate checking process.
10398         (nds32*-*-*): Add glibc and uclibc conditions.
10399         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10400         (TARGET_EXCEPT_UNWIND_INFO): Define.
10401         * config/nds32/elf.h: New file.
10402         * config/nds32/linux.h: New file.
10403         * config/nds32/nds32-elf.opt: New file.
10404         * config/nds32/nds32-linux.opt: New file.
10405         * config/nds32/nds32-fp-as-gp.c
10406         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10407         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10408         TARGET_LINUX_ABI.
10409         (nds32_asm_file_end): Ditto.
10410         (nds32_print_operand): Ditto.
10411         (nds32_insert_attributes): Ditto.
10412         (nds32_init_libfuncs): New function.
10413         (TARGET_HAVE_TLS): Define.
10414         (TARGET_INIT_LIBFUNCS): Define.
10415         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10416         spec content.
10417         (TARGET_ELF): Apply different mcmodel setting.
10418         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10419         been migrated into elf.h and linux.h files.
10420         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10421         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10422         (mcmodel): The content has been migrated into nds32-elf.opt and
10423         nds32-linux.opt files.
10424         * config/nds32/t-elf: New file.
10425         * config/nds32/t-linux: New file.
10426
10427 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10428             Shiva Chen  <shiva0217@gmail.com>
10429
10430         * config/nds32/constants.md (unspec_volatile_element): Add
10431         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10432         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10433         optimization.
10434         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10435         (make_pass_nds32_fp_as_gp): Declare.
10436         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10437         optmization pass.
10438         (nds32_asm_function_end_prologue): Remove unused asm output.
10439         (nds32_asm_function_begin_epilogue): Remove unused asm output.
10440         (nds32_asm_file_start): Output necessary fp_as_gp information.
10441         (nds32_option_override): Adjust register usage.
10442         (nds32_expand_prologue): Consider fp_as_gp situation.
10443         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10444         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10445         (epilogue): Ditto.
10446         (return): Ditto.
10447         (simple_return): Ditto.
10448         (omit_fp_begin): Output special directive for fp_as_gp.
10449         (omit_fp_end): Output special directive for fp_as_gp.
10450         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10451         mforbid-fp-as-gp): New options.
10452
10453 2018-06-01  Mark Wielaard  <mark@klomp.org>
10454
10455         * dwarf2out.c (dwarf2out_finish): Remove generation of
10456         DW_AT_loclists_base.
10457
10458 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
10459
10460         * gimple-ssa-store-merging.c: Include gimple-fold.h.
10461         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10462         (struct merged_store_group): Add bit_insertion field.
10463         (dump_char_array): Use standard hexadecimal format.
10464         (merged_store_group::merged_store_group): Set bit_insertion to false.
10465         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
10466         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
10467         also print the mask in the dump file.
10468         (pass_store_merging::gate): Minor tweak.
10469         (imm_store_chain_info::coalesce_immediate): Fix wrong association
10470         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
10471         stores with INTEGER_CST stores.
10472         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10473         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10474         and use it throughout.  Generate bit insertion sequences if need be.
10475         (pass_store_merging::process_store): Remove redundant condition.
10476         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10477
10478 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
10479
10480         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10481         the 128-bit floating point types.  Fix function comment.
10482
10483 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10484
10485         * config/aarch64/aarch64-simd.md
10486         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10487         mnemonics.
10488         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10489         mnemonics.
10490
10491 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10492
10493         PR tree-optimization/85989
10494         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10495         variable.
10496         (backprop::intersect_uses): Check it when deciding whether this
10497         is a backedge reference.
10498         (backprop::process_block): Add each phi to m_visited_phis
10499         after visiting it, then clear it at the end.
10500
10501 2018-06-01  Richard Biener  <rguenther@suse.de>
10502
10503         * tree-vectorizer.h (vect_dr_stmt): New function.
10504         (vect_get_load_cost): Adjust.
10505         (vect_get_store_cost): Likewise.
10506         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10507         Use vect_dr_stmt instead of DR_SMTT.
10508         (vect_record_base_alignments): Likewise.
10509         (vect_calculate_target_alignment): Likewise.
10510         (vect_compute_data_ref_alignment): Likewise and make static.
10511         (vect_update_misalignment_for_peel): Likewise.
10512         (vect_verify_datarefs_alignment): Likewise.
10513         (vector_alignment_reachable_p): Likewise.
10514         (vect_get_data_access_cost): Likewise.  Pass down
10515         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10516         (vect_get_peeling_costs_all_drs): Likewise.
10517         (vect_peeling_hash_get_lowest_cost): Likewise.
10518         (vect_enhance_data_refs_alignment): Likewise.
10519         (vect_find_same_alignment_drs): Likewise.
10520         (vect_analyze_data_refs_alignment): Likewise.
10521         (vect_analyze_group_access_1): Likewise.
10522         (vect_analyze_group_access): Likewise.
10523         (vect_analyze_data_ref_access): Likewise.
10524         (vect_analyze_data_ref_accesses): Likewise.
10525         (vect_vfa_segment_size): Likewise.
10526         (vect_small_gap_p): Likewise.
10527         (vectorizable_with_step_bound_p): Likewise.
10528         (vect_prune_runtime_alias_test_list): Likewise.
10529         (vect_analyze_data_refs): Likewise.
10530         (vect_supportable_dr_alignment): Likewise.
10531         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10532         (vect_gen_prolog_loop_niters): Likewise.
10533         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10534         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10535         modify DR_STMT.
10536         (vect_recog_mask_conversion_pattern): Likewise.
10537         (vect_try_gather_scatter_pattern): Likewise.
10538         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10539         to vect_get_store_cost.
10540         (vect_get_store_cost): Get stmt_info instead of DR.
10541         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10542         (vect_get_load_cost): Get stmt_info instead of DR.
10543
10544 2018-06-01  Richard Biener  <rguenther@suse.de>
10545
10546         PR middle-end/86017
10547         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10548         vars wrapped in MEM_REFs.
10549
10550 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10551
10552         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10553         Fix subreg tests so that we only return a choice between
10554         GENERAL_REGS and FP_REGS if the original classes included both.
10555
10556 2018-06-01  Richard Biener  <rguenther@suse.de>
10557
10558         PR ipa/85960
10559         * tree-ssa-structalias.c (get_function_part_constraint):
10560         Handle NULL fi->decl.
10561         (find_func_aliases_for_call): Properly handle indirect
10562         fi from direct call.
10563         (find_func_clobbers): Likewise.
10564         (ipa_pta_execute): Likewise.
10565         (create_variable_info_for): For functions that are ifunc_resolver
10566         resolve to a varinfo that contains the result of the resolver call.
10567         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10568         aliases.
10569
10570 2018-05-31  Michael Collison  <michael.collison@arm.com>
10571
10572         * config/aarch64/aarch64.md:
10573         (*fix_to_zero_extenddfdi2): New pattern.
10574         * gcc.target/aarch64/fix_extend1.c: New testcase.
10575
10576 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10577
10578         PR middle-end/78809
10579         PR middle-end/83026
10580         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10581         and BUILT_IN_STRNCMP_EQ.
10582         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10583         BUILT_IN_STRNCMP_EQ.
10584         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10585         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10586         (gimple_fold_builtin): Likewise.
10587         * tree-ssa-strlen.c (compute_string_length): New function.
10588         (determine_min_obsize): New function.
10589         (handle_builtin_string_cmp): New function to handle calls to
10590         string compare functions.
10591         (strlen_optimize_stmt): Add handling to builtin string compare
10592         calls.
10593         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10594         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10595         * tree.c (build_common_builtin_nodes): Add new defines of
10596         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10597
10598 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10599
10600         PR target/85984
10601         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10602         functions with naked attribute.
10603
10604 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10605
10606         * config/i386/sse.md (avx_vec_concat<mode>):
10607         Substitute concat_tg_mode mode attribute with xtg_mode.
10608         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10609         (concat_tg_mode): Remove mode attribute.
10610
10611 2018-05-31  Martin Sebor  <msebor@redhat.com>
10612
10613         PR c/82063
10614         * calls.c (alloc_max_size): Correct a logic error/typo.
10615         Treat excessive arguments as infinite.  Warn for invalid arguments.
10616         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10617
10618 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10619
10620         PR target/85829
10621         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10622         and movx for Haswell.
10623
10624 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10625             Cesar Philippidis  <cesar@codesourcery.com>
10626
10627         PR middle-end/85879
10628         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10629         when emitting error on private/firstprivate reductions.
10630         * omp-low.c (lower_omp_target): Avoid reference-type processing
10631         on pointers for firstprivate clause.
10632
10633 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10634
10635         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10636         (st1x2): Likewise.
10637         (st1x3): Likewise.
10638         * config/aarch64/aarch64-simd.md
10639         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10640         (aarch64_ld1_x3_<mode>): Likewise
10641         (aarch64_st1x2<VALLDIF:mode>): Likewise
10642         (aarch64_st1_x2_<mode>): Likewise
10643         (aarch64_st1x3<VALLDIF:mode>): Likewise
10644         (aarch64_st1_x3_<mode>): Likewise
10645         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10646         (vld1_s8_x3): Likewise.
10647         (vld1_u16_x3): Likewise.
10648         (vld1_s16_x3): Likewise.
10649         (vld1_u32_x3): Likewise.
10650         (vld1_s32_x3): Likewise.
10651         (vld1_u64_x3): Likewise.
10652         (vld1_s64_x3): Likewise.
10653         (vld1_f16_x3): Likewise.
10654         (vld1_f32_x3): Likewise.
10655         (vld1_f64_x3): Likewise.
10656         (vld1_p8_x3): Likewise.
10657         (vld1_p16_x3): Likewise.
10658         (vld1_p64_x3): Likewise.
10659         (vld1q_u8_x3): Likewise.
10660         (vld1q_s8_x3): Likewise.
10661         (vld1q_u16_x3): Likewise.
10662         (vld1q_s16_x3): Likewise.
10663         (vld1q_u32_x3): Likewise.
10664         (vld1q_s32_x3): Likewise.
10665         (vld1q_u64_x3): Likewise.
10666         (vld1q_s64_x3): Likewise.
10667         (vld1q_f16_x3): Likewise.
10668         (vld1q_f32_x3): Likewise.
10669         (vld1q_f64_x3): Likewise.
10670         (vld1q_p8_x3): Likewise.
10671         (vld1q_p16_x3): Likewise.
10672         (vld1q_p64_x3): Likewise.
10673         (vst1_s64_x2): Likewise.
10674         (vst1_u64_x2): Likewise.
10675         (vst1_f64_x2): Likewise.
10676         (vst1_s8_x2): Likewise.
10677         (vst1_p8_x2): Likewise.
10678         (vst1_s16_x2): Likewise.
10679         (vst1_p16_x2): Likewise.
10680         (vst1_s32_x2): Likewise.
10681         (vst1_u8_x2): Likewise.
10682         (vst1_u16_x2): Likewise.
10683         (vst1_u32_x2): Likewise.
10684         (vst1_f16_x2): Likewise.
10685         (vst1_f32_x2): Likewise.
10686         (vst1_p64_x2): Likewise.
10687         (vst1q_s8_x2): Likewise.
10688         (vst1q_p8_x2): Likewise.
10689         (vst1q_s16_x2): Likewise.
10690         (vst1q_p16_x2): Likewise.
10691         (vst1q_s32_x2): Likewise.
10692         (vst1q_s64_x2): Likewise.
10693         (vst1q_u8_x2): Likewise.
10694         (vst1q_u16_x2): Likewise.
10695         (vst1q_u32_x2): Likewise.
10696         (vst1q_u64_x2): Likewise.
10697         (vst1q_f16_x2): Likewise.
10698         (vst1q_f32_x2): Likewise.
10699         (vst1q_f64_x2): Likewise.
10700         (vst1q_p64_x2): Likewise.
10701         (vst1_s64_x3): Likewise.
10702         (vst1_u64_x3): Likewise.
10703         (vst1_f64_x3): Likewise.
10704         (vst1_s8_x3): Likewise.
10705         (vst1_p8_x3): Likewise.
10706         (vst1_s16_x3): Likewise.
10707         (vst1_p16_x3): Likewise.
10708         (vst1_s32_x3): Likewise.
10709         (vst1_u8_x3): Likewise.
10710         (vst1_u16_x3): Likewise.
10711         (vst1_u32_x3): Likewise.
10712         (vst1_f16_x3): Likewise.
10713         (vst1_f32_x3): Likewise.
10714         (vst1_p64_x3): Likewise.
10715         (vst1q_s8_x3): Likewise.
10716         (vst1q_p8_x3): Likewise.
10717         (vst1q_s16_x3): Likewise.
10718         (vst1q_p16_x3): Likewise.
10719         (vst1q_s32_x3): Likewise.
10720         (vst1q_s64_x3): Likewise.
10721         (vst1q_u8_x3): Likewise.
10722         (vst1q_u16_x3): Likewise.
10723         (vst1q_u32_x3): Likewise.
10724         (vst1q_u64_x3): Likewise.
10725         (vst1q_f16_x3): Likewise.
10726         (vst1q_f32_x3): Likewise.
10727         (vst1q_f64_x3): Likewise.
10728         (vst1q_p64_x3): Likewise.
10729
10730 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10731
10732         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10733         user_label_prefix to name.
10734
10735         * tree-core.h: Update comment about the format of NAME string
10736         passed to handler in attribute_spec.
10737
10738         * config/msp430/msp430.md: Remove erroneous subreg expression from
10739         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10740         zero_extend{q,h}isi2.
10741
10742 2018-05-30  Borislav Petkov  <bp@suse.de>
10743
10744         * doc/extend.texi: Document some architecture specific
10745         constraints and sort entries.
10746
10747 2018-05-30  Martin Sebor  <msebor@redhat.com>
10748
10749         PR middle-end/85369
10750         * builtins.c (expand_builtin_stpcpy_1): New function.
10751         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10752         only if the former succeeds.
10753
10754 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10755
10756         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10757         in saphira.
10758
10759 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10760
10761         * doc/invoke.texi (-flinker-output): Document
10762
10763 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10764
10765         * passes.c (ipa_write_summaries): Only modify statements if body
10766         is in memory.
10767         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10768         incrementally linking.
10769         (ipa_passes): Likewise.
10770         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10771         pass down resolution info.
10772         * common.opt (flag_incremental_link): Update info.
10773         * gcc.c (plugin specs): Turn flinker-output=* to
10774         -plugin-opt=-linker-output-known
10775         * toplev.c (compile_file): Also cut compilation when doing incremental
10776         link.
10777         * flag-types. (enum lto_partition_model): Add
10778         LTO_LINKER_OUTPUT_NOLTOREL.
10779         (invoke.texi): Add -flinker-output docs.
10780         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10781         link same way as WPA; do not stream in dead initializers.
10782
10783         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10784         darf2out_register_external_decl): Support incremental link.
10785
10786 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10787
10788         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10789
10790 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10791
10792         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10793         it down to simple_object_copy_lto_debug_sections.
10794         (run_gcc): Determine incremental LTO link time and configure
10795         lto1 into non-wpa mode, disable renaming of debug sections.
10796
10797 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10798
10799         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10800         descriptions of various incorrectly documented functions.
10801
10802 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10803
10804         Revert:
10805         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10806         address check not strict.
10807
10808 2018-05-30  Richard Biener  <rguenther@suse.de>
10809
10810         PR tree-optimization/85964
10811         * tracer.c (better_p): Drop initialized count check, we only
10812         call the function with initialized counts now.
10813         (find_best_successor): Do find a best edge if one
10814         has uninitialized count.
10815         (find_best_predecessor): Likewise.  Do BB frequency check only
10816         if count is initialized.
10817
10818 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10819
10820         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10821         (aarch64_ldrstr_offset_compare): New.
10822         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10823         load/store orderings.
10824         (aarch64_gen_adjusted_ldpstp): Likewise.
10825
10826 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10827
10828         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10829         Check for subset of GENERAL_REGS and FP_REGS.
10830         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10831         r=w alternative.
10832
10833 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10834
10835         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10836         and wi::to_poly_offset.  Add the current offset and then check
10837         whether the sum fits, rather than using an unchecked addition of
10838         a checked term.  Check for a shwi rather than a uhwi.
10839         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10840         (store_constructor): Use poly_int_tree_p.
10841         (expand_expr_real_1): Likewise.
10842         * function.c (assign_temp): Likewise.
10843         * fold-const.c (const_binop): Use poly_int_tree_p and
10844         wi::to_poly_offset.
10845         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10846         division.
10847         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10848         to_poly_offset for MEM offsets.
10849         * ipa-icf.c (sem_variable::equals): Likewise.
10850         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10851         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10852         wi::to_poly_offset for BIT_FIELD_REF offsets.
10853         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10854         wi::to_poly_offset.
10855         * var-tracking.c (emit_note_insn_var_location): Use
10856         tree_to_poly_uint64.
10857
10858 2018-05-29  Jim Wilson  <jimw@sifive.com>
10859
10860         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10861
10862 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10863
10864         PR target/85950
10865         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10866         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10867         sequence.
10868         (sse4_1_round<mode>2): Use nonimmediate_operand
10869         for operand 1 predicate.
10870
10871 2018-05-29  Martin Sebor  <msebor@redhat.com>
10872             Richard Biener  <rguenther@suse.de>
10873
10874         PR testsuite/85888
10875         * calls.c (get_size_range): Call determine_value_range instead
10876         of get_value_range..
10877         * tree-vrp.h (determine_value_range): Declared new function.
10878         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10879
10880 2018-05-29  Richard Biener  <rguenther@suse.de>
10881
10882         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10883         sure to use non-pattern stmts for get_earlier_stmt arguments.
10884         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10885         called on pattern stmts.
10886         (get_later_stmt): Likewise.
10887
10888 2018-05-29  Martin Liska  <mliska@suse.cz>
10889
10890         PR gcov-profile/85759
10891         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10892         env variables.
10893
10894 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10895
10896         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10897         VEC_UNPACK_*_EXPR.
10898         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10899         VEC_PACK_*_EXPR.
10900
10901         PR target/85918
10902         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10903         VEC_PACK_FLOAT_EXPR): New tree codes.
10904         * tree-pretty-print.c (op_code_prio): Handle
10905         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10906         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10907         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10908         * tree-inline.c (estimate_operator_cost): Likewise.
10909         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10910         * fold-const.c (const_binop): Likewise.
10911         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10912         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10913         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10914         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10915         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10916         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10917         * expr.c (expand_expr_real_2): Likewise.
10918         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10919         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10920         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10921         optabs.
10922         * optabs.c (expand_widen_pattern_expr): For
10923         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10924         sign from result type rather than operand's type.
10925         (expand_binop_directly): For vec_packu_float_optab and
10926         vec_packs_float_optab allow result type to be different from operand's
10927         type.
10928         * optabs-tree.c (optab_for_tree_code): Handle
10929         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10930         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10931         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10932         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10933         VEC_PACK_FLOAT_EXPR.
10934         * tree-vect-stmts.c (supportable_widening_operation): Handle
10935         FIX_TRUNC_EXPR.
10936         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10937         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10938         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10939         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10940         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10941         mode attributes.
10942         (vec_pack<floatprefix>_float_<mode>): New expander.
10943         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10944         attributes.
10945         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10946         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10947         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10948         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10949         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10950         Document.
10951         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10952         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10953         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10954         VEC_PACK_FLOAT_EXPR): Document.
10955
10956 2018-05-29  Richard Biener  <rguenther@suse.de>
10957
10958         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10959         member.
10960         (stmt_vec_info_vec): Make pointer.
10961         (init_stmt_vec_info_vec): Remove.
10962         (free_stmt_vec_info_vec): Likewise.
10963         (set_stmt_vec_info_vec): New function.
10964         (free_stmt_vec_infos): Likewise.
10965         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10966         (set_vinfo_for_stmt): Likewise.
10967         (get_earlier_stmt): Likewise.
10968         (get_later_stmt): Likewise.
10969         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10970         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10971         (vec_info::~vec_info): Free stmt_vec_infos.
10972         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10973         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10974         (pass_slp_vectorize::execute): Likewise.
10975         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10976         (free_stmt_vec_info_vec): Likewise.
10977         (set_stmt_vec_info_vec): New function.
10978         (free_stmt_vec_infos): Likewise.
10979         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10980         the global stmt_vec_info_vec.
10981         * tree-parloops.c (gather_scalar_reductions): Use
10982         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10983         vector.
10984
10985 2018-05-29  Richard Biener  <rguenther@suse.de>
10986
10987         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10988
10989 2018-05-29  Martin Liska  <mliska@suse.cz>
10990             David Malcolm  <dmalcolm@redhat.com>
10991
10992         * vec.c (test_reverse): New.
10993         (vec_c_tests): Add new test.
10994         * vec.h (vl_ptr>::reverse): New function.
10995
10996 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
10997
10998         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10999
11000         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11001         and later.
11002
11003 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11004
11005         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11006
11007 2018-05-28  Richard Biener  <rguenther@suse.de>
11008
11009         PR tree-optimization/85933
11010         * tree-vect-data-refs.c (vect_record_base_alignments): Only
11011         look at stmts marked as vectorizable.
11012
11013 2018-05-28  Richard Biener  <rguenther@suse.de>
11014
11015         PR tree-optimization/85934
11016         * tree-vect-generic.c (expand_vector_operations_1): Hoist
11017         vector boolean check before scalar optimization.
11018
11019 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
11020
11021         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11022         for armv5te.
11023
11024 2018-05-28  Mark Wielaard  <mark@klomp.org>
11025
11026         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11027         if it is an expression containing a minus sign.
11028
11029 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
11030
11031         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11032
11033 2018-05-27  Paul Koning  <ni1d@arrl.net>
11034
11035         * config/pdp11/pdp11.md (truncsihi2): Remove.
11036
11037 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
11038             Chung-Ju Wu  <jasonwucj@gmail.com>
11039
11040         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11041         implementation.
11042         (unaligned_store_dw): Ditto.
11043         * config/nds32/nds32-memory-manipulation.c
11044         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11045         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11046         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11047         (emit_setmem_word_loop): Rename to ...
11048         (emit_setmem_doubleword_loop): ... this.
11049         (nds32_gen_dup_4_byte_to_word_value): New function.
11050         (nds32_gen_dup_8_byte_to_double_word_value): New function.
11051         (nds32_expand_setmem_loop): Refine implementation.
11052         (nds32_expand_setmem_loop_v3m): Ditto.
11053         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11054         pattern.
11055
11056 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11057
11058         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11059
11060 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11061
11062         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11063         (nds32_init_machine_status): Initialize machine->attr_naked_p and
11064         machine->attr_no_prologue_p.
11065         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11066         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11067         (nds32_expand_epilogue): Consider attr_naked_p.
11068         (nds32_expand_epilogue_v3pop): Likewise.
11069         (nds32_can_use_return_insn): Likewise.
11070         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11071         attr_no_prologue_p fields.
11072         * config/nds32/nds32.opt (mret-in-naked-func): New option.
11073
11074 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
11075
11076         PR target/85918
11077         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11078         attributes.
11079         * config/i386/sse.md
11080         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11081         Rename to ...
11082         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11083         ... this.
11084         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11085         Rename to ...
11086         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11087         ... this.
11088         (*<floatsuffix>floatv2div2sf2): Rename to ...
11089         (*float<floatunssuffix>v2div2sf2): ... this.
11090         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11091         (float<floatunssuffix>v2div2sf2_mask): ... this.
11092         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11093         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11094         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11095         to ...
11096         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11097         ... this.
11098         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11099         Rename to ...
11100         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11101         ... this.
11102         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11103         Rename to ...
11104         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11105         ... this.
11106         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11107         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11108         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11109         gen_ufix_truncv8dfv8si2.
11110         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11111         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11112         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11113         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11114         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11115         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11116         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11117         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11118
11119 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11120
11121         PR target/85900
11122         PR target/85345
11123         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11124
11125 2018-05-25  Jim Wilson  <jimw@sifive.com>
11126
11127         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11128         * config/riscv/riscv.c (struct machine_function): Add
11129         interrupt_handler_p and attribute_checked_p fields.
11130         (riscv_attribute_table): Add interrupt.
11131         (riscv_interrupt_type_p): New.
11132         (riscv_save_reg_p): Save extra regs for interrupt handler.
11133         (riscv_use_save_libcall): Return false  for interrupt handler.
11134         (riscv_first_stack_step): Add forward declaration.
11135         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
11136         for interrupt handler with large frame.  Use it for saved reg list.
11137         (riscv_expand_prologue): Move flag_stack_usage_info support to
11138         eliminate duplication.
11139         (riscv_expand_epilogue): Generate mret for interrupt handler.
11140         (riscv_epilogue_uses): New.
11141         (riscv_can_use_return_insn): Return false for interrupt handler.
11142         (riscv_function_ok_for_sibcall): Likewise.
11143         (riscv_set_current_function): Add interrupt handler support.
11144         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11145         * config/riscv/riscv.md (UNSPECV_MRET): New.
11146         (GP_REGNUM): New.
11147         (riscv_frflags, riscv_fsflags): Use tab after opcode.
11148         (riscv_mret): New.
11149         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11150
11151 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
11152
11153         PR tree-optimization/85712
11154         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11155         this candidate has already been replaced in-situ by a copy.
11156
11157 2018-05-25  Jason Merrill  <jason@redhat.com>
11158
11159         PR c++/80485 - inline function non-zero address.
11160         * symtab.c (nonzero_address): Check DECL_COMDAT.
11161
11162 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
11163
11164         PR target/83628
11165         * config/alpha/alpha.md (ashlsi3): New insn pattern.
11166         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
11167         extension of SImode operation.  Use const123_operand predicate.
11168         (*saddsi_1): Remove.
11169         (*saddl_se_1): Ditto.
11170         (*ssubsi_1): Ditto.
11171         (*ssubl_se_1): Ditto.
11172         * config/alpha/predicates.md (const123_operand): New predicate.
11173         * config/alpha/constraints.md (P): Use IN_RANGE.
11174
11175 2018-05-25  Richard Biener  <rguenther@suse.de>
11176
11177         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11178         defaulted to true.
11179         (ref_maybe_used_by_stmt_p): Likewise.
11180         (stmt_may_clobber_ref_p): Likewise.
11181         (stmt_may_clobber_ref_p_1): Likewise.
11182         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11183         and pass it along.
11184         (ref_maybe_used_by_stmt_p): Likewise.
11185         (stmt_may_clobber_ref_p): Likewise.
11186         (stmt_may_clobber_ref_p_1): Likewise.
11187         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11188         the alias oracle to disambiguate DRs with stmts DR analysis
11189         couldn't handle.
11190         (vect_analyze_data_refs): Do not give up on not analyzable
11191         DRs for BB vectorization.  Remove code truncating the dataref
11192         vector.
11193
11194 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
11195
11196         PR target/85832
11197         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11198         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
11199         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11200
11201 2018-05-25  Richard Biener  <rguenther@suse.de>
11202
11203         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11204         function, combining stmt data ref gathering and fatal analysis
11205         parts.
11206         (vect_analyze_data_refs): Remove now redudnant code and simplify.
11207         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11208         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11209         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11210         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11211
11212 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11213
11214         PR tree-optimization/85720
11215         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11216         SCC if all partitions are builtins.
11217         (version_loop_by_alias_check): New parameter.  Generate cancelable
11218         runtime alias check if all partitions are builtins.
11219         (distribute_loop): Update call to above function.
11220
11221 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11222
11223         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11224         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11225         (parm_default_def_partition_arg): Ditto.
11226         (set_parm_default_def_partition): Ditto.
11227         (get_parm_default_def_partitions): Ditto and make it static.
11228         (get_undefined_value_partitions): Ditto and make it static.
11229         (remove_ssa_form): Refactor call to init_var_map here.
11230         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11231         computation for loop region.
11232         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11233         (register_default_def): Delete.
11234         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11235         (parm_default_def_partition_arg): Ditto.
11236         (set_parm_default_def_partition): Ditto.
11237         (get_parm_default_def_partitions): Ditto and make it static.
11238         (get_undefined_value_partitions): Ditto and make it static.
11239         (coalesce_with_default, coalesce_with_default): Update comment.
11240         (create_coalesce_list_for_region): New func factored out from
11241         create_outofssa_var_map.
11242         (populate_coalesce_list_for_outofssa): New func factored out from
11243         create_outofssa_var_map and coalesce_ssa_name.
11244         (create_outofssa_var_map): Delete.
11245         (coalesce_ssa_name): Refactor to support live range computation.
11246         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11247         (get_parm_default_def_partitions): Delete.
11248         (get_undefined_value_partitions): Ditto.
11249         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11250         computation for loop region.
11251         (new_tree_live_info, loe_visit_block): Ditto.
11252         (live_worklist, set_var_live_on_entry): Ditto.
11253         (calculate_live_on_exit, verify_live_on_entry): Ditto.
11254         * tree-ssa-live.h (struct _var_map): New fields.
11255         (init_var_map): Change decl.
11256         (region_contains_p): New.
11257
11258 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11259
11260         * tree-ssa-live.h (live_merge_and_clear): Delete.
11261
11262 2018-05-25  Richard Biener  <rguenther@suse.de>
11263
11264         PR c++/85912
11265         * tree-dump.c (dequeue_and_dump): Remove access to removed
11266         operand 2 of a SWITCH_EXPR.
11267
11268 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11269
11270         * doc/sourcebuild.texi (vect_double_cond_arith): Include
11271         multiplication and division.
11272         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11273         (cond_udiv@var{m}, cond_umod@var{m}): Document.
11274         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11275         (cond_udiv_optab, cond_umod_optab): New optabs.
11276         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11277         (IFN_COND_RDIV): New internal functions.
11278         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11279         TRUNC_MOD_EXPR and RDIV_EXPR.
11280         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11281         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11282         New unspecs.
11283         (SVE_INT_BINARY): Include mult.
11284         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11285         (optab, sve_int_op): Handle mult.
11286         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11287         UNSPEC_COND_DIV.
11288         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11289         for SVE_INT_BINARY_SD.
11290
11291 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11292
11293         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11294         (optab, sve_int_op): Handle div and udiv.
11295         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11296         for SVE_INT_BINARY_SD.
11297         (*<optab><mode>3): New insn for the same.
11298
11299 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11300
11301         * tree-vect-patterns.c: Include predict.h.
11302         (vect_recog_divmod_pattern): Restrict check for division support
11303         to when optimizing for size.
11304
11305 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11306
11307         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11308         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11309         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11310         (gimple_match_op::set_op): Likewise.
11311         (gimple_resimplify4): Declare.
11312         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11313         (expr::gen_transform): Likewise.
11314         (decision_tree::gen): Generate a simplification routine for 4 operands.
11315         * gimple-match-head.c (gimple_simplify): Add an overload for
11316         4 operands.  In the top-level function, handle up to 4 call
11317         arguments and call gimple_resimplify4.
11318         (gimple_resimplify4): New function.
11319         (build_call_internal): Pass a fourth operand.
11320         (maybe_push_to_seq): Likewise.
11321         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11322         Fold VEC_COND_EXPRs of an operation and a default value into
11323         an IFN_COND_* function if possible.
11324         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11325         New unspecs.
11326         (SVE_COND_FP_BINARY): Include them.
11327         (optab, sve_fp_op): Handle them.
11328         (SVE_INT_BINARY_REV): New code iterator.
11329         (SVE_COND_FP_BINARY_REV): New int iterator.
11330         (commutative): New int attribute.
11331         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11332         Declare.
11333         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11334         function.
11335         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11336         (*cond_<optab><mode>): New patterns for reversed operands.
11337
11338 2018-05-25  Richard Biener  <rguenther@suse.de>
11339
11340         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11341         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11342         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11343         (STMT_VINFO_GROUPED_ACCESS): Adjust.
11344         * tree-vect-data-refs.c (everywhere): Adjust users.
11345         * tree-vect-loop.c (everywhere): Likewise.
11346         * tree-vect-slp.c (everywhere): Likewise.
11347         * tree-vect-stmts.c (everywhere): Likewise.
11348         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11349
11350 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11351
11352         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11353         Rename to...
11354         (gcc_cv_as_section_exclude): ... this.
11355         Try Solaris as #exclude syntax.
11356         * configure: Regenerate.
11357         * config.in: Regenerate.
11358         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11359         SECTION_EXCLUDE.
11360         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11361         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11362
11363         * varasm.c (default_elf_asm_named_section): Don't check if
11364         HAVE_GAS_SECTION_EXCLUDE is defined.
11365
11366 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11367
11368         * doc/md.texi: Update the documentation of the cond_* optabs
11369         to mention the new final operand.  Fix GET_MODE_NUNITS call.
11370         Describe the scalar case too.
11371         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11372         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11373         instead of 2.
11374         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11375         (get_conditional_internal_fn): Update comment.
11376         * tree-vect-loop.c (vectorizable_reduction): Pass the original
11377         accumulator value as a final argument to conditional functions.
11378         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11379         a define_expand and add an "else" operand.  Assert for now that
11380         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
11381         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11382         (*cond_<optab><mode>): New patterns.
11383         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11384         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11385         (UNSPEC_COND_EOR): Delete.
11386         (optab): Remove associated mappings.
11387         (SVE_INT_BINARY): New code iterator.
11388         (sve_int_op): Remove int attribute and add "minus" to the code
11389         attribute.
11390         (SVE_COND_INT_OP): Delete.
11391         (SVE_COND_FP_OP): Rename to...
11392         (SVE_COND_FP_BINARY): ...this.
11393
11394 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11395
11396         * optabs.c (can_reuse_operands_p): New function.
11397         (maybe_legitimize_operands): Try to reuse the results for
11398         earlier operands.
11399
11400 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11401
11402         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11403         Add {q} suffix to insn mnemonic.
11404
11405 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11406
11407         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11408         (msp430_warn_func_return): New.
11409
11410 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
11411
11412         * fold-const.c (tree_nonzero_bits): New function.
11413         * fold-const.h (tree_nonzero_bits): Likewise.
11414         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11415         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11416
11417 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11418
11419         PR target/85900
11420         PR target/85345
11421         * varasm.c (assemble_alias): Check ifunc_resolver only on
11422         FUNCTION_DECL.
11423
11424 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11425
11426         PR target/85903
11427         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11428         when memory input operand is handled.
11429
11430 2018-05-24  Luis Machado  <luis.machado@linaro.org>
11431
11432         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11433         global.
11434         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11435
11436 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11437
11438         * match.pd: Delay FMA folds until after vectorization.
11439
11440 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11441
11442         PR target/83009
11443         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11444         address check not strict.
11445
11446 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11447
11448         * gimple-match.h (gimple_match_op): New class.
11449         (mprts_hook): Replace parameters with a gimple_match_op *.
11450         (maybe_build_generic_op): Likewise.
11451         (gimple_simplified_result_is_gimple_val): Replace parameters with
11452         a const gimple_match_op *.
11453         (gimple_simplify): Replace code_helper * and tree * parameters with
11454         a gimple_match_op * parameter.
11455         (gimple_resimplify1): Replace code_helper *, tree and tree *
11456         parameters with a gimple_match_op * parameter.
11457         (gimple_resimplify2): Likewise.
11458         (gimple_resimplify3): Likewise.
11459         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11460         parameters with a gimple_match_op * parameter.
11461         * gimple-match-head.c (gimple_simplify): Change prototypes of
11462         auto-generated functions to take a gimple_match_op * instead of
11463         separate code_helper * and tree * parameters.  Make the same
11464         change in the top-level overload and update calls to the
11465         gimple_resimplify routines.  Update calls to the auto-generated
11466         functions and to maybe_push_res_to_seq in the publicly-facing
11467         operation-specific gimple_simplify overloads.
11468         (gimple_match_op::MAX_NUM_OPS): Define.
11469         (gimple_resimplify1): Replace rcode and ops with a single res_op
11470         parameter.  Update call to gimple_simplify.
11471         (gimple_resimplify2): Likewise.
11472         (gimple_resimplify3): Likewise.
11473         (mprts_hook): Replace parameters with a gimple_match_op *.
11474         (maybe_build_generic_op): Likewise.
11475         (build_call_internal): Replace type, nargs and ops with
11476         a gimple_match_op *.
11477         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11478         with a single gimple_match_op *.  Update calls to mprts_hook,
11479         build_call_internal and gimple_simplified_result_is_gimple_val.
11480         Factor out code that is common to the tree_code and combined_fn cases.
11481         * genmatch.c (expr::gen_transform): Replace tem_code and
11482         tem_ops with a gimple_match_op called tem_op.  Update calls
11483         to the gimple_resimplify functions and maybe_push_res_to_seq.
11484         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11485         res_ops.  Update call to the gimple_resimplify functions.
11486         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11487         (decision_tree::gen): Make the functions take a gimple_match_op *
11488         called res_op instead of separate res_code and res_ops parameters.
11489         Update call accordingly.
11490         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11491         and ops with a single res_op parameter.  Update calls to
11492         maybe_build_generic_op and maybe_push_res_to_seq.
11493         (fold_stmt_1): Update calls to gimple_simplify and
11494         replace_stmt_with_simplification.
11495         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11496         and gimple_simplified_result_is_gimple_val.
11497         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11498         gimple_simplify.
11499         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11500         with a gimple_match_op *.
11501         (vn_nary_build_or_lookup): Likewise.  Update call to
11502         vn_nary_build_or_lookup_1.
11503         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11504         gimple_match_op *.  Update calls to the gimple_resimplify routines
11505         and to gimple_simplified_result_is_gimple_val.
11506         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11507         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11508         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11509         (visit_nary_op): Likewise.
11510         (visit_reference_op_load): Likewise.
11511
11512 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11513
11514         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11515         modifier for printing the step amount.
11516
11517 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11518
11519         PR target/78849
11520         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11521         types.
11522
11523 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11524
11525         * doc/sourcebuild.texi (Endianness): New subsubsection.
11526
11527 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11528
11529         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11530         <prefetch_dynamic_strides>: New const bool field.
11531         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11532         prefetch_dynamic_strides.
11533         (exynosm1_prefetch_tune): Likewise.
11534         (thunderxt88_prefetch_tune): Likewise.
11535         (thunderx_prefetch_tune): Likewise.
11536         (thunderx2t99_prefetch_tune): Likewise.
11537         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11538         false.
11539         (aarch64_override_options_internal): Update to set
11540         PARAM_PREFETCH_DYNAMIC_STRIDES.
11541         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11542         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11543         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11544         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11545         prefetch-dynamic-strides setting.
11546
11547 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11548
11549         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11550         <minimum_stride>: New const int field.
11551         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11552         minimum_stride field defaulting to -1.
11553         (exynosm1_prefetch_tune): Likewise.
11554         (thunderxt88_prefetch_tune): Likewise.
11555         (thunderx_prefetch_tune): Likewise.
11556         (thunderx2t99_prefetch_tune): Likewise.
11557         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11558         <default_opt_level>: Set to 3.
11559         (aarch64_override_options_internal): Update to set
11560         PARAM_PREFETCH_MINIMUM_STRIDE.
11561         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11562         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11563         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11564         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11565         stride is constant and is below the minimum stride threshold.
11566
11567 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11568
11569         * config/arm/arm-cpus.in (mode26): Delete.
11570         (armv4): Delete mode26 reference.
11571         * config/arm/arm.c (arm_configure_build_target): Delete use of
11572         isa_bit_mode26.
11573
11574 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11575
11576         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11577         New insn pattern.
11578         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11579         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11580         for non-SSE modes.
11581         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11582         (floatunsdidf2): Ditto.
11583
11584 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11585
11586         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11587         (fixuns_trunc<mode>si2_avx512f): Ditto.
11588         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11589         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11590         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11591
11592 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11593
11594         PR rtl-optimization/79985
11595         * df-scan.c (df_insn_refs_collect): Remove special case for
11596         global registers and asm statements.
11597
11598 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11599
11600         * extend.texi (Global Register Variables): Rewrite the bullet list.
11601         Note that the register is available for allocation. Note that access
11602         via inline asm must use constraints. Add note about async-signal
11603         handlers. Remove paragraph about automagic register selection.
11604
11605 2018-05-23  Richard Biener  <rguenther@suse.de>
11606
11607         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11608         of fixed offset from memset VN.
11609
11610 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11611
11612         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11613         first_interp field.
11614         (alloc_cand_and_find_basis): Initialize first_interp field.
11615         (slsr_process_mul): Modify first_interp field.
11616         (slsr_process_add): Likewise.
11617         (slsr_process_cast): Modify first_interp field for each new
11618         interpretation.
11619         (slsr_process_copy): Likewise.
11620         (dump_candidate): Dump first_interp field.
11621         (replace_mult_candidate): Process all interpretations, not just
11622         subsequent ones.
11623         (replace_rhs_if_not_dup): Likewise.
11624         (replace_one_candidate): Likewise.
11625
11626 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11627
11628         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11629         Add new boolean.
11630         (aarch64_needs_frame_chain): New function.
11631         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11632
11633 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11634
11635         PR target/84882
11636         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11637         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11638         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11639         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11640         as true for strict-align.
11641         (aarch64_can_inline_p): Perform checks even when callee has no
11642         attributes to check for strict alignment.
11643         * doc/extend.texi (AArch64 Function Attributes): Document
11644         no-strict-align.
11645         * doc/invoke.texi: (AArch64 Options): Likewise.
11646
11647 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11648
11649         PR tree-optimization/85853
11650         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11651         the handling of the root of the node to...
11652         (vect_slp_analyze_node_operations_1): ...this new function,
11653         and run the whole thing with the child nodes' def types
11654         set according to their SLP node's def type.
11655
11656 2018-05-23  Richard Biener  <rguenther@suse.de>
11657
11658         PR middle-end/85874
11659         * tree-data-ref.c (create_runtime_alias_checks): Defer
11660         and ignore overflow warnings.
11661
11662 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11663
11664         PR tree-optimization/85822
11665         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11666         constants.
11667
11668 2018-05-23  Richard Biener  <rguenther@suse.de>
11669
11670         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11671         memset constants via native_interpret_expr.
11672
11673 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11674
11675         PR target/85345
11676         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11677         attribute.
11678         (cgraph_node::create_alias): Likewise.
11679         (cgraph_node::get_availability): Check ifunc_resolver instead
11680         of looking up ifunc attribute.
11681         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11682         * varasm.c (do_assemble_alias): Likewise.
11683         (assemble_alias): Likewise.
11684         (default_binds_local_p_3): Likewise.
11685         * cgraph.h (cgraph_node): Add ifunc_resolver.
11686         (cgraph_node::only_called_directly_or_aliased_p): Return false
11687         for IFUNC resolver.
11688         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11689         attribute.
11690         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11691         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11692         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11693         instead of looking up ifunc attribute.
11694
11695 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11696
11697         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11698
11699 2018-05-22  Martin Sebor  <msebor@redhat.com>
11700
11701         PR middle-end/85359
11702         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11703         only when expasion succeeds.
11704         (expand_builtin_strcmp): Same.
11705         (expand_builtin_strncmp): Same.
11706
11707 2018-05-22  Martin Sebor  <msebor@redhat.com>
11708
11709         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11710
11711 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11712             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11713
11714         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11715         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11716         code.
11717         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11718         Add check for legitimate_address.
11719         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11720         (aarch64_swap_ldrstr_operands): New.
11721         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11722         Define prototype.
11723
11724 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11725             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11726
11727         * config/aarch64/aarch64.md: New patterns to generate stp
11728         and ldp.
11729         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11730         single words and double words.
11731         (load_pair_sw, load_pair_dw): Likewise.
11732         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11733         Delete.
11734         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11735         Delete.
11736         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11737         for different mode ldpstp and add peephole for merged zero stores.
11738         Likewise for loads.
11739         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11740         Add size check.
11741         (aarch64_gen_store_pair): Rename calls to match new patterns.
11742         (aarch64_gen_load_pair): Rename calls to match new patterns.
11743         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11744         (load_pair<DREG:mode><DREG2:mode>): ... This.
11745         (store_pair<mode>): Rename to...
11746         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11747         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11748         New mode iterators.
11749         (V_INT_EQUIV): Handle SImode.
11750         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11751         New predicate.
11752
11753 2018-05-22  Martin Sebor  <msebor@redhat.com>
11754
11755         PR c/85623
11756         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11757         or ajust the presumed bound on an operation to avoid unnecessary
11758         warnings.
11759
11760 2018-05-22  Martin Sebor  <msebor@redhat.com>
11761
11762         PR tree-optimization/85826
11763         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11764         assuming that a DECL necesarily has a constant size.
11765
11766 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11767
11768         PR middle-end/85862
11769         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11770
11771 2018-05-22  Richard Biener  <rguenther@suse.de>
11772
11773         PR tree-optimization/85834
11774         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11775         non-constant and non-zero memset arguments.
11776
11777 2018-05-22  Martin Liska  <mliska@suse.cz>
11778
11779         PR ipa/85607
11780         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11781
11782 2018-05-22  Richard Biener  <rguenther@suse.de>
11783
11784         PR tree-optimization/85863
11785         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11786         comparisons when vectype is specified.
11787         (vectorizable_condition): Do not specify vectype for
11788         vect_is_simple_cond when SLP vectorizing.
11789
11790 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11791
11792         PR target/85657
11793         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11794         define __ibm128 as long double.
11795         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11796         as a distinct type when IEEE 128-bit support is enabled.
11797         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11798         128-bit types to use the correct functions.
11799         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11800         convert between 128-bit floating point types that have different
11801         modes but the same representation, instead of using gen_lowpart to
11802         makean alias.
11803         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11804         KFmode.
11805         (IFKF_reg): New attributes to give the register constraints for
11806         IFmode and KFmode.
11807         (extend<mode>tf2_internal): New insns to mark an explicit
11808         conversion between 128-bit floating point types that have a
11809         different mode but share the same representation.
11810
11811 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11812
11813         PR tree-optimization/85814
11814         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11815         a null return from get_strinfo when unsharing the next
11816         strinfo in the chain.
11817
11818 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11819
11820         PR gcc/84923
11821         * varasm.c (weak_finish): Clean up weak_decls.
11822
11823 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11824
11825         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11826         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11827         UNSPEC_UADALP values.
11828         * config/aarch64/iterators.md (ABAL): New int iterator.
11829         (ABDL2): Likewise.
11830         (ADALP): Likewise.
11831         (sur): Add mappings for the above.
11832         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11833         New define_insn.
11834         (aarch64_<sur>abal<mode>_4): Likewise.
11835         (aarch64_<sur>adalp<mode>_3): Likewise.
11836         (<sur>sadv16qi): New define_expand.
11837
11838 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11839
11840         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11841         (*movdf_internal): Ditto.
11842         (*rcpsf2_sse): Ditto.
11843         (*rsqrtsf2_sse): Ditto.
11844         (*sqrt<mode>2_sse): Ditto.
11845
11846 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11847
11848         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11849         eor3q<mode>4.
11850         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11851         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11852         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11853         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11854         vbcaxq_s64): New.
11855         * config/aarch64/arm_neon.h: Likewise.
11856         * config/aarch64/iterators.md (VQ_I): New.
11857
11858 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11859
11860         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11861         arc*-*-linux*.
11862         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11863         MULTILIB_DIRNAMES
11864
11865 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11866
11867         * config/nds32/constraints.md (S): New constraint.
11868         * config/nds32/nds32.md (call_internal): Use constraint S.
11869         (call_value_internal): Likewise.
11870         (sibcall_internal): Likewise.
11871         (sibcall_value_internal): Likewise.
11872
11873 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11874             Chung-Ju Wu  <jasonwucj@gmail.com>
11875
11876         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11877         into consideration.
11878
11879 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11880             Chung-Ju Wu  <jasonwucj@gmail.com>
11881
11882         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11883         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11884         (nds32_rtx_costs_impl): Simplify.
11885         (nds32_address_cost_impl): Simplify.
11886         (nds32_init_rtx_costs): New function.
11887         (nds32_rtx_costs_speed_prefer): Likewise.
11888         (nds32_rtx_costs_size_prefer): Likewise.
11889         (nds32_address_cost_speed_prefer): Likewise.
11890         (nds32_address_cost_speed_fwprop): Likewise.
11891         (nds32_address_cost_size_prefer): Likewise.
11892         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11893         * config/nds32/nds32.c (nds32_option_override): Use
11894         nds32_init_rtx_costs function.
11895
11896 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11897
11898         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11899         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11900         (TARGET_PIPELINE_N8): Likewise.
11901         (TARGET_PIPELINE_N10): Likewise.
11902         (TARGET_PIPELINE_N13): Likewise.
11903         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11904
11905 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11906
11907         * config/nds32/nds32-fpu.md: Update copyright year.
11908
11909 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11910
11911         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11912
11913 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11914
11915         * config/nds32/nds32.c
11916         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11917         * config/nds32/nds32.opt (minline-asm-r15): New option.
11918
11919 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11920
11921         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11922         MASK_HW_ABS.
11923         * config/nds32/nds32.md (abssi2): New pattern.
11924
11925 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11926
11927         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11928         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11929         Merge insn pattern from sse_cvtsi2ss<round_name> and
11930         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11931         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11932         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11933         using SWI48 mode iterator.
11934         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11935         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11936         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11937         pattern from sse_cvttss2si<round_saeonly_name>
11938         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11939         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11940         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11941         using SWI48 mode iterator.
11942         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11943         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11944         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11945         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11946         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11947         using SWI48 mode iterator.
11948         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11949         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11950         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11951         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11952         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11953         SWI48 mode iterator.
11954         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11955         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11956         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11957         pattern from sse_cvttsd2si<round_saeonly_name>
11958         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11959
11960 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11961
11962         * config/nds32/nds32-md-auxiliary.c
11963         (nds32_valid_smw_lwm_base_p): Refine.
11964         (nds32_output_smw_single_word): Refine.
11965         (nds32_output_smw_double_word): New.
11966         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11967
11968 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11969
11970         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11971         (nds32_output_stack_pop): Refine.
11972         (nds32_expand_unaligned_load): Refine.
11973         (nds32_expand_unaligned_store): Refine.
11974
11975 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11976             Chung-Ju Wu  <jasonwucj@gmail.com>
11977
11978         * config/nds32/constants.md: Add TP_REGNUM constant.
11979         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11980         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11981         UNSPEC_ADD32.
11982         * config/nds32/nds32-doubleword.md: Consider flag_pic.
11983         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11984         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11985         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11986         and PIC code generation.
11987         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11988         code generation.
11989         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11990         optimization.
11991         * config/nds32/nds32.md: Support TLS and PIC.
11992         * config/nds32/nds32.c: Support TLS and PIC.
11993         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11994         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11995         predicate.
11996
11997 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11998
11999         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12000         mode with E_ prefix.
12001
12002 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12003             Chung-Ju Wu  <jasonwucj@gmail.com>
12004
12005         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12006         * config/nds32/nds32-md-auxiliary.c
12007         (symbolic_reference_mentioned_p): New.
12008         (nds32_legitimize_ict_address): New.
12009         (nds32_expand_ict_move): New.
12010         (nds32_indirect_call_referenced_p): New.
12011         (nds32_symbol_binds_local_p): Delete.
12012         (nds32_long_call_p): Modify.
12013         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12014         * config/nds32/nds32-protos.h
12015         (symbolic_reference_mentioned_p): Declare.
12016         (nds32_legitimize_ict_address): Declare.
12017         (nds32_expand_ict_move): Declare.
12018         (nds32_indirect_call_referenced_p): Declare.
12019         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12020         (nds32_relax_group): Use nds32_ict_const_p as condition.
12021         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12022         (nds32_asm_file_start): Output ict_model directive in asm code.
12023         (nds32_legitimate_address_p): Consider indirect call.
12024         (nds32_print_operand): Consider indirect call.
12025         (nds32_print_operand_address): Consider indirect call.
12026         (nds32_insert_attributes): Handle "indirect_call" attribute.
12027         (TARGET_LEGITIMATE_ADDRESS_P): Define.
12028         (TARGET_LEGITIMATE_CONSTANT_P): Define.
12029         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12030         (TARGET_DELEGITIMIZE_ADDRESS): Define.
12031         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12032         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12033         (TARGET_ICT_MODEL_SMALL): Define.
12034         (TARGET_ICT_MODEL_LARGE): Define.
12035         * config/nds32/nds32.md (movsi): Consider ict model.
12036         (call, call_value): Consider ict model.
12037         (sibcall, sibcall_value): Consider ict model.
12038         * config/nds32/nds32.opt (mict-model): New option.
12039         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12040         model.
12041
12042 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
12043             Monk Chiang  <sh.chiang04@gmail.com>
12044             Jim Wilson <jimw@sifive.com>
12045
12046         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12047         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
12048         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12049         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12050         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
12051         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12052         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12053         compute save_libcall_adjustment properly.
12054         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12055         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12056         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12057         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12058         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12059         (ABI_SPEC): Handle mabi=ilp32e.
12060         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12061         (RVE): Add RVE mask.
12062         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12063         <-march>: Add rv32e as an example.
12064
12065 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
12066
12067         PR c++/82899
12068         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12069         (intra_create_variable_infos): Handle C++ constructors.
12070
12071 2018-05-18  Martin Liska  <mliska@suse.cz>
12072
12073         * passes.def: Remove a redundant pass.
12074
12075 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
12076
12077         PR bootstrap/85838
12078         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12079
12080 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12081
12082         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12083         (ARMv4): Update.
12084         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12085         (ARMv6m): Update.
12086         (armv2, armv2a, armv3, armv3m): Delete architectures.
12087         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12088         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12089         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12090         Delete cpus.
12091         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12092         (*mulsidi3adddi): Likewise.
12093         (mulsidi3): Likewise.
12094         (*mulsidi3_nov6): Likewise.
12095         (umulsidi3): Likewise.
12096         (umulsidi3_nov6): Likewise.
12097         (umaddsidi4): Likewise.
12098         (*umulsidi3adddi): Likewise.
12099         (smulsi3_highpart): Likewise.
12100         (*smulsi3_highpart_nov6): Likewise.
12101         (umulsi3_highpart): Likewise.
12102         (*umulsi3_highpart_nov6): Likewise.
12103         * config/arm/arm.h (arm_arch3m): Delete.
12104         * config/arm/arm.c (arm_arch3m): Delete.
12105         (arm_option_override_internal): Update armv3-related comment.
12106         (arm_configure_build_target): Delete use of isa_bit_mode32.
12107         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12108         (arm_rtx_costs_internal): Delete check of arm_arch3m.
12109         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12110         (mulsa3): Likewise.
12111         (mulusa3): Likewise.
12112         * config/arm/arm-protos.h (arm_arch3m): Delete.
12113         * config/arm/arm-tables.opt: Regenerate.
12114         * config/arm/arm-tune.md: Likewise.
12115         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12116         deleted architectures.
12117
12118 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12119
12120         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12121         (armv5t, armv5te): New features.
12122         (ARMv5, ARMv5e): Delete fgroups.
12123         (ARMv5t, ARMv5te): Adjust for above changes.
12124         (ARMv6m): Likewise.
12125         (armv5, armv5e): Delete arches.
12126         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12127         arm_arch5.
12128         (*call_reg_arm): Likewise.
12129         (*call_value_reg_armv5): Likewise.
12130         (*call_value_reg_arm): Likewise.
12131         (*call_symbol): Likewise.
12132         (*call_value_symbol): Likewise.
12133         (*sibcall_insn): Likewise.
12134         (*sibcall_value_insn): Likewise.
12135         (clzsi2): Likewise.
12136         (prefetch): Likewise.
12137         (define_split and define_peephole2 dependent on arm_arch5):
12138         Likewise.
12139         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12140         arm_arch5e.
12141         (TARGET_ARM_QBIT): Likewise.
12142         (TARGET_DSP_MULTIPLY): Likewise.
12143         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12144         (arm_arch5, arm_arch5e): Delete.
12145         (arm_arch5t, arm_arch5te): Declare.
12146         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12147         (arm_arch5t): Declare.
12148         (arm_option_reconfigure_globals): Update for the above.
12149         (arm_options_perform_arch_sanity_checks): Update comment, replace
12150         use of arm_arch5 with arm_arch5t.
12151         (use_return_insn): Likewise.
12152         (arm_emit_call_insn): Likewise.
12153         (output_return_instruction): Likewise.
12154         (arm_final_prescan_insn): Likewise.
12155         (arm_coproc_builtin_available): Likewise.
12156         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12157         arm_arch5e with arm_arch5t and arm_arch5te.
12158         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12159         (arm_arch5t, arm_arch5te): Declare.
12160         * config/arm/arm-tables.opt: Regenerate.
12161         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12162         * config/arm/t-multilib: Likewise.
12163         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12164         instead of arm_arch5.
12165         (*call_reg_thumb1): Likewise.
12166         (*call_value_reg_thumb1_v5): Likewise.
12167         (*call_value_reg_thumb1): Likewise.
12168         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12169         unreachable path.
12170         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12171
12172 2018-05-18  Martin Liska  <mliska@suse.cz>
12173
12174         PR gcov-profile/84846
12175         * doc/gcov.texi: Document -t option of gcov tool.
12176
12177 2018-05-18  Martin Liska  <mliska@suse.cz>
12178
12179         PR gcov-profile/84846
12180         * gcov.c (print_usage): Add new -t option.
12181         (process_args): Handle the option.
12182         (generate_results): Use stdout as output when requested by
12183         the option.
12184
12185 2018-05-18  Martin Liska  <mliska@suse.cz>
12186
12187         PR gcov-profile/84846
12188         * coverage.c (coverage_init): Write PWD to .gcno file.
12189         * doc/gcov.texi: Document how working directory is printed.
12190         * gcov-dump.c (dump_gcov_file): Print PWD.
12191         * gcov.c (output_intermediate_file): Likewise.
12192         (read_graph_file): Read PWD string.
12193         (output_lines): Print PWD.
12194
12195 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12196
12197         PR middle-end/85817
12198         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12199         for retval and return false if all args to phi are zero.
12200
12201 2018-05-18  Richard Biener  <rguenther@suse.de>
12202
12203         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12204         method.
12205         (evrp_dom_walker::before_dom_children): Call it.
12206
12207 2018-05-18  Richard Biener  <rguenther@suse.de>
12208
12209         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12210         results when processing array refs with variable index.
12211
12212 2018-05-18  Toon Moene  <toon@moene.org>
12213
12214         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12215         directly after that of -floop-interchange. Indicate that both
12216         options are enabled by default when specifying -O3.
12217
12218 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12219
12220         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12221         iterator.  Delete separate integer-mode vec_set<mode> expander.
12222         (aarch64_simd_vec_setv2di): Delete.
12223         (vec_setv2di): Delete.
12224         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12225         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
12226         the "w, r" alternative.
12227
12228 2018-05-18  Martin Liska  <mliska@suse.cz>
12229
12230         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12231         * tree-pass.h (make_pass_lower_switch_O0): New function.
12232         * tree-switch-conversion.c (node_has_low_bound): Remove.
12233         (node_has_high_bound): Likewise.
12234         (node_is_bounded): Likewise.
12235         (class pass_lower_switch): Make it a template type and create
12236         two instances.
12237         (pass_lower_switch::execute): Add template argument.
12238         (make_pass_lower_switch): New function.
12239         (make_pass_lower_switch_O0): New function.
12240         (do_jump_if_equal): Remove.
12241         (emit_case_nodes): Simplify to just handle all 3 cases and leave
12242         all the hard work to tree optimization passes.
12243
12244 2018-05-18  Martin Liska  <mliska@suse.cz>
12245
12246         * dbgcnt.c (limit_low): Renamed from limit.
12247         (limit_high): New variable.
12248         (dbg_cnt_is_enabled): Check for upper limit.
12249         (dbg_cnt): Adjust dumping.
12250         (dbg_cnt_set_limit_by_index): Add new argument for high
12251         value.
12252         (dbg_cnt_set_limit_by_name): Likewise.
12253         (dbg_cnt_process_single_pair): Parse new format.
12254         (dbg_cnt_process_opt): Use strtok.
12255         (dbg_cnt_list_all_counters): Remove 'value' and add
12256         'limit_high'.
12257         * doc/invoke.texi: Document changes.
12258
12259 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
12260
12261         * doc/sourcebuild.texi (scalar_all_fma): Document.
12262         * tree.def (FMA_EXPR): Delete.
12263         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12264         * internal-fn.c (ternary_direct): New macro.
12265         (expand_ternary_optab_fn): Likewise.
12266         (direct_ternary_optab_supported_p): Likewise.
12267         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12268         * builtins.c (fold_builtin_fma): Delete.
12269         (fold_builtin_3): Don't call it.
12270         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12271         * expr.c (expand_expr_real_2): Likewise.
12272         * fold-const.c (operand_equal_p): Likewise.
12273         (fold_ternary_loc): Likewise.
12274         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12275         * gimple.c (DEFTREECODE): Likewise.
12276         * gimplify.c (gimplify_expr): Likewise.
12277         * optabs-tree.c (optab_for_tree_code): Likewise.
12278         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12279         * tree-eh.c (operation_could_trap_p): Likewise.
12280         (stmt_could_throw_1_p): Likewise.
12281         * tree-inline.c (estimate_operator_cost): Likewise.
12282         * tree-pretty-print.c (dump_generic_node): Likewise.
12283         (op_code_prio): Likewise.
12284         * tree-ssa-loop-im.c (stmt_cost): Likewise.
12285         * tree-ssa-operands.c (get_expr_operands): Likewise.
12286         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12287         * fold-const-call.h (fold_fma): Delete.
12288         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12289         CFN_FNMA and CFN_FNMS.
12290         (fold_fma): Delete.
12291         * genmatch.c (combined_fn): New enum.
12292         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12293         (commutative_op): New function.
12294         (commutate): Use it.  Handle more than 2 operands.
12295         (dt_operand::gen_gimple_expr): Use commutative_op.
12296         (parser::parse_expr): Allow :c to be used with non-binary
12297         operators if the commutative operand is known.
12298         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12299         CFN_FMS, CFN_FNMA and CFN_FNMS.
12300         (backprop::process_assign_use): Remove FMA_EXPR handling.
12301         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12302         (gen_hsa_fma): New function.
12303         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12304         IFN_FNMA and IFN_FNMS.
12305         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12306         * gimple-fold.h (follow_all_ssa_edges): Declare.
12307         * gimple-fold.c (follow_all_ssa_edges): New function.
12308         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12309         gimple_build interface and use follow_all_ssa_edges to fold the result.
12310         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12311         instead of checking for optabs directly.
12312         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12313         rather than FMA_EXPRs.
12314         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12315         call to IFN_FMA instead of an FMA_EXPR.
12316
12317 2018-05-17  Jim Wilson  <jimw@sifive.com>
12318
12319         * expr.c (do_tablejump): When converting index to Pmode, if we have a
12320         sign extended promoted subreg, and the range does not have the sign bit
12321         set, then do a sign extend.
12322
12323         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12324         test, check for sign extended subreg and/or constant operands, and
12325         do a sign extend in that case.
12326
12327 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
12328
12329         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12330         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12331         Add untyped.
12332         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12333         Change logics_shift_reg to logics_shift_imm.
12334         (thunderx2t99_fp_loadpair_basic): Delete.
12335         (thunderx2t99_fp_storepair_basic): Delete.
12336         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12337         (thunderx2t99_asimd_polynomial): Delete.
12338         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12339         and neon_fp_mul_d_scalar_q.
12340         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12341         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12342         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12343         (thunderx2t99_asimd_lut): Add missing tbl types.
12344         (thunderx2t99_asimd_ext): Delete.
12345         (thunderx2t99_asimd_load1_1_mult): Delete.
12346         (thunderx2t99_asimd_load1_2_mult): Delete.
12347         (thunderx2t99_asimd_load1_ldp): New.
12348         (thunderx2t99_asimd_load1): New.
12349         (thunderx2t99_asimd_load2): Add missing *load2* types.
12350         (thunderx2t99_asimd_load3): New.
12351         (thunderx2t99_asimd_load4): New.
12352         (thunderx2t99_asimd_store1_1_mult): Delete.
12353         (thunderx2t99_asimd_store1_2_mult): Delete.
12354         (thunderx2t99_asimd_store2_mult): Delete.
12355         (thunderx2t99_asimd_store2_onelane): Delete.
12356         (thunderx2t99_asimd_store_stp): New.
12357         (thunderx2t99_asimd_store1): New.
12358         (thunderx2t99_asimd_store2): New.
12359         (thunderx2t99_asimd_store3): New.
12360         (thunderx2t99_asimd_store4): New.
12361
12362 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
12363
12364         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12365         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
12366
12367 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
12368             Segher Boessenkool  <segher@kernel.crashing.org>
12369
12370         PR target/85698
12371         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12372         operand.
12373
12374 2018-05-17  Richard Biener  <rguenther@suse.de>
12375
12376         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12377         for pruning loop and prune defs feeding only already visited PHIs.
12378
12379 2018-05-17  Richard Biener  <rguenther@suse.de>
12380
12381         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12382
12383 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
12384             Richard Biener  <rguenther@suse.de>
12385
12386         PR tree-optimization/85793
12387         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12388         for VMAT_ELEMENTWISE.
12389
12390 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12391
12392         * internal-fn.h (lookup_internal_fn): Declare
12393         * internal-fn.c (lookup_internal_fn): New function.
12394         * gimple.c (gimple_build_call_from_tree): Handle calls to
12395         internal functions.
12396         * gimple-pretty-print.c (dump_gimple_call): Print "." before
12397         internal function names.
12398         * tree-pretty-print.c (dump_generic_node): Likewise.
12399         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12400
12401 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12402
12403         * gimple-fold.h (gimple_build): Make the function forms take
12404         combined_fn rather than built_in_function.
12405         (gimple_simplify): Likewise.
12406         * gimple-match-head.c (gimple_simplify): Likewise.
12407         * gimple-fold.c (gimple_build): Likewise.
12408         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12409         rather than gimple_build_call_internal.
12410         (get_initial_defs_for_reduction): Likewise.
12411         (vect_create_epilog_for_reduction): Likewise.
12412         (vectorizable_live_operation): Likewise.
12413
12414 2018-05-17  Martin Liska  <mliska@suse.cz>
12415
12416         * gimple-ssa-sprintf.c (format_directive): Do not use
12417         space in between 'G_' and '('.
12418
12419 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
12420
12421         PR target/85323
12422         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12423         even if the mask is not all ones.
12424
12425         PR target/85323
12426         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12427         vector.
12428         (ix86_gimple_fold_builtin): Likewise.
12429
12430         PR target/85323
12431         * config/i386/i386.c: Include tree-vector-builder.h.
12432         (ix86_vector_shift_count): New function.
12433         (ix86_fold_builtin): Fold shift builtins by scalar count.
12434         (ix86_gimple_fold_builtin): Likewise.
12435
12436         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12437         _mm512_setzero): New intrinsics.
12438
12439 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12440             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12441
12442         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12443         code generation for cases where splatting a value is not useful.
12444         * simplify-rtx.c (simplify_ternary_operation): Simplify
12445         vec_merge across a vec_duplicate and a paradoxical subreg forming
12446         a vector mode to a vec_concat.
12447
12448 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
12449
12450         * config.gcc: Support "goldmont-plus".
12451         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12452         "goldmont-plus".
12453         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12454         PROCESSOR_GOLDMONT_PLUS.
12455         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12456         (processor_target_table): Add "goldmont-plus".
12457         (PTA_GOLDMONT_PLUS): Define.
12458         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12459         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12460         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12461         (fold_builtin_cpu): Add "goldmont-plus".
12462         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12463         (ix86_option_override_internal): Add "goldmont-plus".
12464         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12465         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12466         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12467         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12468
12469 2018-05-17  Richard Biener  <rguenther@suse.de>
12470
12471         PR tree-optimization/85757
12472         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12473         remove defs that only feed that PHI from further processing.
12474
12475 2018-05-16  Jim Wilson  <jimw@sifive.com>
12476
12477         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12478         asterisk to name.
12479         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12480
12481 2018-05-16  Mark Wielaard  <mark@klomp.org>
12482
12483         * dwarf2out.c (count_index_strings): New function.
12484         (output_indirect_strings): Call count_index_strings and generate
12485         header for dwarf_version >= 5.
12486
12487 2018-05-16  Mark Wielaard  <mark@klomp.org>
12488
12489         * dwarf2out.c (dwarf_FORM): New function.
12490         (set_indirect_string): Use dwarf_FORM.
12491         (reset_indirect_string): Likewise.
12492         (size_of_die): Likewise.
12493         (value_format): Likewise.
12494         (output_die): Likewise.
12495         (add_skeleton_AT_string): Likewise.
12496         (output_macinfo_op): Likewise.
12497         (index_string): Likewise.
12498         (output_index_string_offset): Likewise.
12499         (output_index_string): Likewise.
12500         (count_index_strings): Likewise.
12501
12502 2018-05-16  Carl Love  <cel@us.ibm.com>
12503
12504         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12505         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12506
12507 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12508
12509         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12510         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12511
12512 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12513
12514         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12515         (fnma<mode>4): Likewise.
12516         (fms<mode>4): Likewise.
12517         (fnms<mode>4): Likewise.
12518         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12519         (aarch64_fnma<mode>4): Likewise.
12520         (aarch64_fms<mode>4): Likewise.
12521         (aarch64_fnms<mode>4): Likewise.
12522         (aarch64_fnmadd<mode>4): Likewise.
12523
12524 2018-05-16  Jason Merrill  <jason@redhat.com>
12525
12526         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12527
12528 2018-05-16  Richard Biener  <rguenther@suse.de>
12529
12530         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12531         (dump_stmt_cost): Declare.
12532         (add_stmt_cost): Dump cost we add.
12533         (add_stmt_costs): New function.
12534         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12535         No longer exported.
12536         (vect_analyze_stmt): Adjust prototype.
12537         (vectorizable_condition): Likewise.
12538         (vectorizable_live_operation): Likewise.
12539         (vectorizable_reduction): Likewise.
12540         (vectorizable_induction): Likewise.
12541         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12542         cost vector to pass to vectorizable_ and record afterwards.
12543         (vect_model_reduction_cost): Take cost vector argument and adjust.
12544         (vect_model_induction_cost): Likewise.
12545         (vectorizable_reduction): Likewise.
12546         (vectorizable_induction): Likewise.
12547         (vectorizable_live_operation): Likewise.
12548         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12549         SLP_TREE_NUMBER_OF_VEC_STMTS.
12550         (vect_analyze_slp_cost_1): Remove.
12551         (vect_analyze_slp_cost): Likewise.
12552         (vect_slp_analyze_node_operations): Take visited args and
12553         a target cost vector.  Avoid processing already visited stmt sets.
12554         (vect_slp_analyze_operations): Use a local cost vector to gather
12555         costs and register those of non-discarded instances.
12556         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12557         (vect_schedule_slp_instance): Remove copying of
12558         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12559         zero.
12560         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12561         adding cost.  Record cost entry location.
12562         (vect_prologue_cost_for_slp_op): Function to compute cost of
12563         a constant or invariant generated for SLP vect in the prologue,
12564         split out from vect_analyze_slp_cost_1.
12565         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12566         (vect_model_promotion_demotion_cost): Likewise.
12567         (vect_model_store_cost): Likewise, make static.
12568         (vect_model_load_cost): Likewise.
12569         (vectorizable_bswap): Add cost vector arg and adjust.
12570         (vectorizable_call): Likewise.
12571         (vectorizable_simd_clone_call): Likewise.
12572         (vectorizable_conversion): Likewise.
12573         (vectorizable_assignment): Likewise.
12574         (vectorizable_shift): Likewise.
12575         (vectorizable_operation): Likewise.
12576         (vectorizable_store): Likewise.
12577         (vectorizable_load): Likewise.
12578         (vectorizable_condition): Likewise.
12579         (vectorizable_comparison): Likewise.
12580         (can_vectorize_live_stmts): Likewise.
12581         (vect_analyze_stmt): Likewise.
12582         (vect_transform_stmt): Adjust calls to vectorizable_*.
12583         * tree-vectorizer.c: Include gimple-pretty-print.h.
12584         (dump_stmt_cost): New function.
12585
12586 2018-05-16  Richard Biener  <rguenther@suse.de>
12587
12588         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12589         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12590         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12591         (check_name): New callback.
12592         (dse_classify_store): Track cycles via a visited bitmap of PHI
12593         defs and simplify handling of in-loop and across loop dead stores
12594         and properly fail for loop-variant refs.  Handle byte-tracking with
12595         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12596         limiting the walk.
12597
12598 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12599
12600         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12601         (vect_get_mask_type_for_stmt): Likewise.
12602         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12603         split out from...
12604         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12605         to determine the statement's vector type and the vector type that
12606         should be used for calculating nunits.  Deal with cases in which
12607         the type has to be deferred.
12608         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12609         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12610         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12611         (vect_determine_vf_for_stmt): New functions, split out from...
12612         (vect_determine_vectorization_factor): ...here.
12613         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12614         (vect_get_mask_type_for_stmt): New functions, split out from
12615         vect_determine_vectorization_factor.
12616
12617 2018-05-16  Richard Biener  <rguenther@suse.de>
12618
12619         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12620         verify the [VEC_]COND_EXPR embedded comparison.
12621
12622 2018-05-15  Martin Sebor  <msebor@redhat.com>
12623
12624         PR tree-optimization/85753
12625         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12626         RECORD_TYPE in addition to ARRAY_TYPE.
12627
12628 2018-05-15  Martin Sebor  <msebor@redhat.com>
12629
12630         PR middle-end/85643
12631         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12632
12633 2018-05-15  Richard Biener  <rguenther@suse.de>
12634
12635         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12636         add by_clobber_p one.  Change algorithm to collect all defs
12637         representing uses we need to walk and try reducing them to
12638         a single one before failing.
12639         (dse_dom_walker::dse_optimize_stmt): Adjust.
12640
12641 2018-05-13  Mark Wielaard  <mark@klomp.org>
12642
12643         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12644         (size_of_loc_descr): Likewise.
12645         (output_loc_operands): Likewise.
12646         (output_loc_operands_raw): Likewise.
12647         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12648         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12649         (hash_loc_operands): Likewise.
12650         (compare_loc_operands): Likewise.
12651
12652 2018-05-14  Mark Wielaard  <mark@klomp.org>
12653
12654         * dwarf2out.c (count_index_addrs): New function.
12655         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12656
12657 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12658
12659         PR tree-optimization/83648
12660         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12661         return value as malloc candidate.
12662
12663 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12664
12665         PR ipa/85734
12666         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12667         param as true in call to suggest_attribute.
12668
12669 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12670
12671         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12672         -mreadonly-in-sdata.
12673
12674 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12675
12676         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12677         New pattern.
12678         (aarch64_crypto_aesd_fused): Likewise.
12679
12680 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12681
12682         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12683         (movsi_aarch64): Likewise.
12684         (load_pairsi): Likewise.
12685         (load_pairdi): Likewise.
12686         (store_pairsi): Likewise.
12687         (store_pairdi): Likewise.
12688         (load_pairsf): Likewise.
12689         (load_pairdf): Likewise.
12690         (store_pairsf): Likewise.
12691         (store_pairdf): Likewise.
12692         (zero_extend): Likewise.
12693         (trunc): Swap alternatives.
12694         (fcvt_target): Add '?' to prefer w over r.
12695
12696 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12697
12698         PR target/85756
12699         * config/i386/i386.md: Disallow non-commutative arithmetics in
12700         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12701         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12702         in the peephole2 before it.
12703
12704 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12705
12706         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12707         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12708         (ix86_handle_option): Handle -mcldemote.
12709         * config.gcc: New header.
12710         * config/i386/cldemoteintrin.h: New file.
12711         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12712         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12713         -mcldemote.
12714         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12715         OPTION_MASK_ISA_CLDEMOTE.
12716         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12717         (ix86_valid_target_attribute_inner_p): Ditto.
12718         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12719         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12720         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12721         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12722         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12723         (cldemote): New.
12724         * config/i386/i386.opt: Add -mcldemote.
12725         * config/i386/x86intrin.h: New header.
12726         * doc/invoke.texi: Add -mcldemote.
12727
12728 2018-05-14  Richard Biener  <rguenther@suse.de>
12729
12730         * doc/match-and-simplify.texi: Adjust :s documentation.
12731
12732 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12733
12734         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12735         intended memcpy size.
12736         (REORDER_45): Likewise.
12737
12738 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12739
12740         * sort.cc: New file.
12741         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12742         * vec.c (qsort_chk): Use gcc_qsort.
12743         * Makefile.in (OBJS-libcommon): Add sort.o.
12744         (build/sort.o): New target.  Use it...
12745         (BUILD_RTL): ... here, and...
12746         (build/gencfn-macros): ... here, and...
12747         (build/genmatch): ... here.
12748
12749 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12750             Chung-Ju Wu  <jasonwucj@gmail.com>
12751
12752         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12753         * config/nds32/nds32-graywolf.md: New file.
12754         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12755         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12756         pipeline.
12757         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12758         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12759         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12760         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12761         * config/nds32/pipelines.md: Include n15 settings.
12762
12763 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12764             Chung-Ju Wu  <jasonwucj@gmail.com>
12765
12766         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12767         * config/nds32/nds32-n13.md: New file.
12768         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12769         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12770         pipeline.
12771         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12772         * config/nds32/nds32.md (pipeline_model): Add n13.
12773         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12774         * config/nds32/pipelines.md: Include n13 settings.
12775
12776 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12777             Chung-Ju Wu  <jasonwucj@gmail.com>
12778
12779         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12780         * config/nds32/nds32-n10.md: New file.
12781         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12782         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12783         pipeline.
12784         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12785         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12786         * config/nds32/nds32.md (pipeline_model): Add n10.
12787         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12788         * config/nds32/pipelines.md: Include n10 settings.
12789
12790 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12791             Kito Cheng  <kito.cheng@gmail.com>
12792             Chung-Ju Wu  <jasonwucj@gmail.com>
12793
12794         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12795         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12796         Add enum values for DSP extension instructions.
12797         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12798         New constraints.
12799         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12800         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12801         New code iterators.
12802         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12803         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12804         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12805         * config/nds32/nds32-intrinsic.md: Likewise.
12806         * config/nds32/nds32_intrinsic.h: Likewise.
12807         * config/nds32/nds32-md-auxiliary.c: Likewise.
12808         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12809         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12810         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12811         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12812         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12813         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12814         TYPE_DMAC in switch statement.
12815         * config/nds32/nds32.c: New checking and implementation for DSP
12816         extension instructions.
12817         * config/nds32/nds32.h: Likewise.
12818         * config/nds32/nds32.md: Likewise.
12819         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12820         * config/nds32/predicates.md: Implement new predicates for DSP
12821         extension.
12822
12823 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12824
12825         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12826         Reformat alternatives and attributes so it is easier to identify
12827         which constraints/attributes go with which instruction.
12828         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12829         (mov<mode>_softfloat32, FMOVE64): Likewise.
12830         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12831         (mov<mode>_softfloat64, FMOVE64): Likewise.
12832
12833 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12834
12835         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12836         subsection.
12837         (Basic PowerPC Built-in Functions): The new name of the
12838         subsection previously known as "PowerPC Built-in Functions".
12839         (Basic PowerPC Built-in Functions Available on all Configurations):
12840         New subsubsection.
12841         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12842         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12843         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12844         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12845
12846 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12847
12848         PR ipa/85655
12849         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12850         single const.
12851
12852 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12853
12854         PR target/85733
12855         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12856
12857 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12858
12859         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12860         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12861         (ix86_handle_option): Handle -mwaitpkg.
12862         * config.gcc: New header.
12863         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12864         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12865         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12866         function type.
12867         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12868         OPTION_MASK_ISA_WAITPKG.
12869         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12870         (ix86_option_override_internal): Add PTA_WAITPKG.
12871         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12872         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12873         IX86_BUILTIN_TPAUSE.
12874         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12875         __builtin_ia32_umwait and __builtin_ia32_tpause.
12876         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12877         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12878         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12879         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12880         UNSPECV_TPAUSE): New.
12881         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12882         * config/i386/i386.opt: Add -mwaitpkg.
12883         * config/i386/waitpkgintrin.h: New file.
12884         * config/i386/x86intrin.h: New header.
12885         * doc/invoke.texi: Add -mwaitpkg.
12886
12887 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12888
12889         PR target/85606
12890         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12891         equivalent.
12892         (cortex-m0): Use armv6s-m isa.
12893         (cortex-m0plus): Likewise.
12894         (cortex-m1): Likewise.
12895         (cortex-m0.small-multiply): Likewise.
12896         (cortex-m0plus.small-multiply): Likewise.
12897         (cortex-m1.small-multiply): Likewise.
12898
12899 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12900             Jakub Jelinek  <jakub@redhat.com>
12901
12902         PR tree-optimization/85692
12903         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12904         source permute as well.
12905
12906 2018-05-11  Martin Liska  <mliska@suse.cz>
12907
12908         PR sanitizer/85556
12909         * doc/extend.texi: Document LLVM style format for no_sanitize
12910         attribute.
12911
12912 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12913
12914         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12915         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12916         (mode_supports_vsx_dform_quad): Likewise.
12917         (mode_supports_vmx_dform): Move these functions to be next to the
12918         other mode_supports functions.
12919         (mode_supports_dq_form): Likewise.
12920         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12921         mode_supports_dq_form.
12922         (reg_offset_addressing_ok_p): Likewise.
12923         (offsettable_ok_by_alignment): Likewise.
12924         (rs6000_legitimate_offset_address_p): Likewise.
12925         (legitimate_lo_sum_address_p): Likewise.
12926         (rs6000_legitimize_address): Likewise.
12927         (rs6000_legitimize_reload_address): Likewise.
12928         (rs6000_secondary_reload_inner): Likewise.
12929         (rs6000_preferred_reload_class): Likewise.
12930         (rs6000_output_move_128bit): Likewise.
12931
12932 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12933
12934         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12935         Generate SImode target register for null target.
12936         <case IX86_BUILTIN_XGETBV>: Ditto.
12937         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12938         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12939
12940 2018-05-10  Carl Love  <cel@us.ibm.com>
12941
12942         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12943         dcbtt and dcbtstt if operands[2] is 0.
12944
12945 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12946
12947         PR target/85693
12948         * config/i386/sse.md (usadv64qi): New expander.
12949
12950 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
12951
12952         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12953         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12954         -maltivec=be support.
12955         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12956         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12957         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12958         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12959         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12960         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12961         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12962         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12963         altivec_vsumsws): Adjust.
12964         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12965         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12966         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12967         support.
12968         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12969         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12970         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12971         (altivec_lve<VI_char>x): Delete expand.
12972         (*altivec_lve<VI_char>x_internal): Rename to...
12973         (altivec_lve<VI_char>x): ... this.
12974         (altivec_lvxl_<mode>): Delete expand.
12975         (*altivec_lvxl_<mode>_internal): Rename to ...
12976         (altivec_lvxl_<mode>): ... this.
12977         (altivec_stvxl_<mode>): Delete expand.
12978         (*altivec_stvxl_<mode>_internal): Rename to ...
12979         (altivec_stvxl_<mode>): ... this.
12980         (altivec_stve<VI_char>x): Delete expand.
12981         (*altivec_stve<VI_char>x_internal): Rename to ...
12982         (altivec_stve<VI_char>x): ... this.
12983         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12984         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12985         reduc_plus_scal_<mode>): Adjust.
12986         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12987         comment.
12988         (rs6000_cpu_cpp_builtins): Adjust.
12989         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12990         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12991         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12992         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12993         -maltivec=be support.
12994         (rs6000_split_vec_extract_var): Adjust.
12995         (rs6000_split_v4si_init): Adjust.
12996         (swap_selector_for_mode): Delete.
12997         (altivec_expand_lvx_be, altivec_expand_stvx_be,
12998         altivec_expand_stvex_be): Delete.
12999         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13000         -maltivec=be support.
13001         (rs6000_gimple_fold_builtin): Ditto.
13002         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13003         Adjust.
13004         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13005         (TARGET_DIRECT_MOVE_64BIT): Adjust.
13006         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13007         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13008         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13009         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13010         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13011         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13012         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13013         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13014         anonymous split): Adjust.
13015         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13016         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13017
13018 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13019
13020         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13021         when --with-gxx-include-dir is also specified.
13022         * configure: Regenerate.
13023
13024 2018-05-09  Jim Wilson  <jimw@sifive.com>
13025
13026         PR target/84797
13027         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13028         * config/riscv/t-withmultilib: New.
13029         * config/riscv/withmultilib.h: New.
13030         * doc/install.texi: Document RISC-V --with-multilib-list support.
13031
13032 2018-05-09  Richard Biener  <rguenther@suse.de>
13033
13034         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13035         vector.
13036         (vect_bb_vectorization_profitable_p): Adjust.  Compute
13037         actual scalar cost using the cost vector and the add_stmt_cost
13038         machinery.
13039
13040 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13041
13042         PR rtl-optimization/85645
13043         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13044         in the REG_CFA_REGISTER note for LR, don't leave it empty.
13045
13046 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13047
13048         PR rtl-optimization/85645
13049         * shrink-wrap.c (spread_components): Return a boolean saying if
13050         anything was changed.
13051         (try_shrink_wrapping_separate): Iterate spread_components until
13052         nothing changes anymore.
13053
13054 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13055
13056         PR rtl-optimization/85645
13057         * regrename.c (build_def_use): Also kill the chains that include the
13058         destination of a REG_CFA_REGISTER note.
13059
13060 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13061
13062         PR rtl-optimization/85645
13063         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13064         insn that has a REG_CFA_REGISTER note.
13065
13066 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
13067
13068         * cfgexpand.c (expand_clobber): New function.
13069         (expand_gimple_stmt_1): Use it.
13070         * tree-vect-stmts.c (vect_clobber_variable): New function,
13071         split out from...
13072         (vectorizable_simd_clone_call): ...here.
13073         (vectorizable_store): Emit a clobber either side of an
13074         IFN_STORE_LANES sequence.
13075         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13076
13077 2018-05-09  Tom de Vries  <tom@codesourcery.com>
13078
13079         PR target/85626
13080         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13081         (define_insn "trap_if_false"): Add exit after trap.
13082
13083 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
13084
13085         PR rtl-optimization/85638
13086         * bb-reorder.c: Include common/common-target.h.
13087         (create_forwarder_block): New function extracted from...
13088         (fix_up_crossing_landing_pad): ...here.  Rename into...
13089         (dw2_fix_up_crossing_landing_pad): ...this.
13090         (sjlj_fix_up_crossing_landing_pad): New function.
13091         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13092         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13093         from both partitions and exit the loop after one iteration.
13094
13095 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13096
13097         Revert:
13098         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13099         subsection.
13100         (Basic PowerPC Built-in Functions): The new name of the
13101         subsection previously known as "PowerPC Built-in Functions".
13102         (Basic PowerPC Built-in Functions Available on all Configurations):
13103         New subsubsection.
13104         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13105         subsubsection.
13106         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13107         subsubsection.
13108         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13109         subsubsection.
13110         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13111         subsubsection.
13112
13113 2018-05-08  Jim Wilson  <jimw@sifive.com>
13114
13115         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13116         (LD_EMUL_SUFFIX): New.
13117         (LINK_SPEC): Use it.
13118
13119 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13120
13121         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13122         subsection.
13123         (Basic PowerPC Built-in Functions): The new name of the
13124         subsection previously known as "PowerPC Built-in Functions".
13125         (Basic PowerPC Built-in Functions Available on all Configurations):
13126         New subsubsection.
13127         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13128         subsubsection.
13129         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13130         subsubsection.
13131         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13132         subsubsection.
13133         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13134         subsubsection.
13135
13136 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13137
13138         PR target/85683
13139         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13140         after cmpelim optimization.
13141
13142 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
13143
13144         * config.gcc: Support "goldmont".
13145         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13146         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13147         PROCESSOR_GOLDMONT.
13148         * config/i386/i386.c (m_GOLDMONT): Define.
13149         (processor_target_table): Add "goldmont".
13150         (PTA_GOLDMONT): Define.
13151         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13152         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13153         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13154         (fold_builtin_cpu): Add "goldmont".
13155         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13156         (ix86_option_override_internal): Add "goldmont".
13157         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13158         (processor_type): Add PROCESSOR_GOLDMONT.
13159         * config/i386/i386.md: Add CPU "glm".
13160         * config/i386/glm.md: New file.
13161         * config/i386/x86-tune.def: Add m_GOLDMONT.
13162         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13163
13164 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13165
13166         PR target/85572
13167         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13168         E_V4DImode.
13169         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13170         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
13171         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
13172
13173         PR target/85317
13174         * config/i386/i386.c (ix86_fold_builtin): Handle
13175         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13176
13177         PR target/85480
13178         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13179         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13180
13181 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
13182
13183         PR target/85658
13184         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13185         (check_arch): Likewise.
13186         (check_fpu): Return the result rather than printing it.
13187         (end arch): Fix operator precedence.
13188         (end cpu): Likewise.
13189         (END): Print the result from check_fpu.
13190
13191 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13192             Alan Hayward  <alan.hayward@arm.com>
13193             David Sherwood  <david.sherwood@arm.com>
13194
13195         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13196         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13197         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13198         (*fcmuo<mode>_and): New patterns.
13199
13200 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13201
13202         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13203         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13204         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13205         (cmp_op, sve_imm_con): New code attributes.
13206         (SVE_COND_INT_CMP, imm_con): Delete.
13207         (cmp_op): Remove above unspecs from int attribute.
13208         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13209         to...
13210         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
13211         comparison-specific unspecs.
13212         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13213         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13214         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13215         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13216         (*vec_fcm<cmp_op><mode>): Rename to...
13217         (*fcm<cmp_op><mode>): ...this and adjust likewise.
13218         (*vec_fcmuo<mode>): Rename to...
13219         (*fcmuo<mode>): ...this and adjust likewise.
13220         (*pred_fcm<cmp_op><mode>): New pattern.
13221         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13222         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13223         functions.
13224         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13225         and UNORDERED.
13226         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13227         (aarch64_emit_sve_predicated_cond): New function.
13228         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13229         (aarch64_emit_unspec_cond_or): Replace with...
13230         (aarch64_emit_sve_or_conds): ...this new function.  Use
13231         aarch64_emit_sve_ptrue_op for the individual comparisons and
13232         aarch64_emit_binop to OR them together.
13233         (aarch64_emit_inverted_unspec_cond): Replace with...
13234         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
13235         aarch64_emit_sve_ptrue_op for the comparison and
13236         aarch64_emit_unop to invert the result.
13237         (aarch64_expand_sve_vec_cmp_float): Update after the above
13238         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
13239
13240 2018-05-07  Nathan Sidwell  <nathan@acm.org>
13241
13242         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13243         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13244         (Backwards Compatibility): Likewise.
13245
13246 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13247
13248         PR bootstrap/85681
13249         Revert:
13250         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13251
13252         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13253         <prefetch_dynamic_strides>: New const bool field.
13254         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13255         prefetch_dynamic_strides.
13256         (exynosm1_prefetch_tune): Likewise.
13257         (thunderxt88_prefetch_tune): Likewise.
13258         (thunderx_prefetch_tune): Likewise.
13259         (thunderx2t99_prefetch_tune): Likewise.
13260         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13261         to false.
13262         (aarch64_override_options_internal): Update to set
13263         PARAM_PREFETCH_DYNAMIC_STRIDES.
13264         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13265         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13266         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13267         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13268         prefetch-dynamic-strides setting.
13269
13270         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13271
13272         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13273         <minimum_stride>: New const int field.
13274         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13275         minimum_stride field.
13276         (exynosm1_prefetch_tune): Likewise.
13277         (thunderxt88_prefetch_tune): Likewise.
13278         (thunderx_prefetch_tune): Likewise.
13279         (thunderx2t99_prefetch_tune): Likewise.
13280         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13281         (aarch64_override_options_internal): Update to set
13282         PARAM_PREFETCH_MINIMUM_STRIDE.
13283         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13284         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13285         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13286         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13287         stride is constant and is below the minimum stride threshold.
13288
13289 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13290
13291         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13292         to 512.
13293
13294 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13295
13296         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13297         <prefetch_dynamic_strides>: New const bool field.
13298         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13299         prefetch_dynamic_strides.
13300         (exynosm1_prefetch_tune): Likewise.
13301         (thunderxt88_prefetch_tune): Likewise.
13302         (thunderx_prefetch_tune): Likewise.
13303         (thunderx2t99_prefetch_tune): Likewise.
13304         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13305         to false.
13306         (aarch64_override_options_internal): Update to set
13307         PARAM_PREFETCH_DYNAMIC_STRIDES.
13308         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13309         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13310         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13311         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13312         prefetch-dynamic-strides setting.
13313
13314 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13315
13316         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13317         <minimum_stride>: New const int field.
13318         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13319         minimum_stride field.
13320         (exynosm1_prefetch_tune): Likewise.
13321         (thunderxt88_prefetch_tune): Likewise.
13322         (thunderx_prefetch_tune): Likewise.
13323         (thunderx2t99_prefetch_tune): Likewise.
13324         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13325         (aarch64_override_options_internal): Update to set
13326         PARAM_PREFETCH_MINIMUM_STRIDE.
13327         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13328         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13329         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13330         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13331         stride is constant and is below the minimum stride threshold.
13332
13333 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
13334
13335         PR c++/85659
13336         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13337         the type is addressable.  Don't force op into register if it has
13338         BLKmode.
13339
13340 2018-05-05  Roland McGrath  <mcgrathr@google.com>
13341
13342         PR other/77609
13343         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13344         any section for which we don't know a specific type it should have,
13345         regardless of name.  Previously this was done only for the exact
13346         names ".init_array", ".fini_array", and ".preinit_array".
13347         (default_elf_asm_named_section): Add comment about
13348         relationship with default_section_type_flags and SECTION_NOTYPE.
13349         (get_section): Don't consider it a type conflict if one side has
13350         SECTION_NOTYPE and the other doesn't, as long as neither has the
13351         SECTION_BSS et al used in the default_section_type_flags logic.
13352
13353 2018-05-05  Tom de Vries  <tom@codesourcery.com>
13354
13355         PR target/85653
13356         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13357         (workaround_barsyncs): New function.
13358         (nvptx_reorg): Use workaround_barsyncs.
13359         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13360         (define_expand "nvptx_membar_cta"): New define_expand.
13361         (define_insn "*nvptx_membar_cta"): New insn.
13362
13363 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
13364
13365         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13366         To improve optimization opportunities.
13367         * builtin-types.def: The new needed builtin types for the above.
13368
13369 2018-05-04  Richard Biener  <rguenther@suse.de>
13370
13371         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13372         * gimple-ssa-store-merging.c
13373         (imm_store_chain_info::output_merged_store): Remove redundant create,
13374         release split_store vector contents on failure.
13375         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13376         scalar stmt vector on cache hit.
13377
13378 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13379
13380         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13381         Xilinx FP support.
13382         * config.gcc (powerpc-xilinx-eabi*): Remove.
13383         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13384         support.
13385         (fusion_addis_mem_combo_load): Ditto.
13386         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13387         FP support.
13388         (rs6000_cpu_cpp_builtins): Ditto.
13389         * config/rs6000/rs6000-linux.c
13390         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13391         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13392         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13393         support.
13394         (rs6000_setup_reg_addr_masks): Ditto.
13395         (rs6000_init_hard_regno_mode_ok): Ditto.
13396         (rs6000_option_override_internal): Ditto.
13397         (legitimate_lo_sum_address_p): Ditto.
13398         (rs6000_legitimize_address): Ditto.
13399         (rs6000_legitimize_reload_address): Ditto.
13400         (rs6000_legitimate_address_p): Ditto.
13401         (abi_v4_pass_in_fpr): Ditto.
13402         (setup_incoming_varargs): Ditto.
13403         (rs6000_gimplify_va_arg): Ditto.
13404         (rs6000_split_multireg_move): Ditto.
13405         (rs6000_savres_strategy): Ditto.
13406         (rs6000_emit_prologue_components): Ditto.
13407         (rs6000_emit_epilogue_components): Ditto.
13408         (rs6000_emit_prologue): Ditto.
13409         (rs6000_emit_epilogue): Ditto.
13410         (rs6000_elf_file_end): Ditto.
13411         (rs6000_function_value): Ditto.
13412         (rs6000_libcall_value): Ditto.
13413         * config/rs6000/rs6000.h: Ditto.
13414         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13415         (TARGET_MINMAX): ... this.  New.
13416         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13417         * config/rs6000/rs6000.md: Remove Xilinx FP support.
13418         (*movsi_internal1_single): Delete.
13419         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13420         mfpu=, mxilinx-fpu): Delete.
13421         * config/rs6000/singlefp.h: Delete.
13422         * config/rs6000/sysv4.h: Remove Xilinx FP support.
13423         * config/rs6000/t-rs6000: Ditto.
13424         * config/rs6000/t-xilinx: Delete.
13425         * config/rs6000/titan.md: Adjust for fp_type removal.
13426         * config/rs6000/vsx.md: Remove Xilinx FP support.
13427         (VStype_simple): Delete.
13428         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13429         * config/rs6000/xfpu.h: Delete.
13430         * config/rs6000/xfpu.md: Delete.
13431         * config/rs6000/xilinx.h: Delete.
13432         * config/rs6000/xilinx.opt: Delete.
13433         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13434         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13435
13436 2018-05-04  Tom de Vries  <tom@codesourcery.com>
13437
13438         PR libgomp/85639
13439         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13440         if ignore == 0.
13441
13442 2018-05-04  Richard Biener  <rguenther@suse.de>
13443
13444         PR middle-end/85627
13445         * tree-complex.c (update_complex_assignment): We are always in SSA form.
13446         (expand_complex_div_wide): Likewise.
13447         (expand_complex_operations_1): Likewise.
13448         (expand_complex_libcall): Preserve EH info of the original stmt.
13449         (tree_lower_complex): Handle removed blocks.
13450         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13451         on complex multiplication and division libcall builtins.
13452
13453 2018-05-04  Richard Biener  <rguenther@suse.de>
13454
13455         PR middle-end/85574
13456         * fold-const.c (negate_expr_p): Restrict negation of operand
13457         zero of a division to when we know that can happen without
13458         overflow.
13459         (fold_negate_expr_1): Likewise.
13460
13461 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
13462
13463         PR libstdc++/85466
13464         * real.h (real_nextafter): Declare.
13465         * real.c (real_nextafter): New function.
13466         * fold-const-call.c (fold_const_nextafter): New function.
13467         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13468         CASE_CFN_NEXTTOWARD.
13469         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13470         even when arg1_mode is different from arg0_mode.
13471
13472 2018-05-03  Nathan Sidwell  <nathan@acm.org>
13473
13474         * doc/extend.texi (Deprecated Features): Remove
13475         -ffriend-injection.
13476         (Backwards Compatibility): Likewise.
13477         * doc/invoke.texi (C++ Language Options): Likewise.
13478         (C++ Dialect Options): Likewise.
13479
13480 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
13481
13482         PR target/85530
13483         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13484         _mm512_mask_mullox_epi64): New intrinsics.
13485
13486 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13487
13488         PR testsuite/85106
13489         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13490         dump files): Add offload-tree.
13491
13492 2018-05-03  Richard Biener  <rguenther@suse.de>
13493
13494         PR tree-optimization/85615
13495         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13496         to loops not nested in BBs loop father to avoid creating multi-entry
13497         loops.
13498
13499 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13500
13501         PR tree-optimization/70291
13502         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13503         arguments.  Change return type to tree.  Emit libcall as a new
13504         statement rather than replacing existing one when inplace_p is true.
13505         (expand_complex_multiplication_components): New function.
13506         (expand_complex_multiplication): Expand floating-point complex
13507         multiplication using the above.
13508         (expand_complex_division): Rename inner_type parameter to type.
13509         Update expand_complex_libcall call-site.
13510         (expand_complex_operations_1): Update expand_complex_multiplication
13511         and expand_complex_division call-sites.
13512
13513 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13514
13515         PR target/85582
13516         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13517         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13518         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13519         the highest significant bit of the shift count mask is clear.  In
13520         check whether and[sq]i3 is needed verify that all significant bits
13521         of the shift count other than the highest are set.
13522
13523 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13524
13525         PR libgomp/82428
13526         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13527         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13528         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13529         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13530         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13531         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13532         __builtin_goacc_parlevel_size.
13533
13534 2018-05-02  Richard Biener  <rguenther@suse.de>
13535
13536         PR tree-optimization/85597
13537         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13538         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13539         directly.
13540
13541 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13542
13543         PR testsuite/85106
13544         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13545         dump files): Add ltrans-tree.
13546
13547 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13548
13549         PR testsuite/85106
13550         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13551         dump files): Add wpa-ipa.
13552
13553 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13554
13555         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13556         powerpc*-*-linux*paired* target.
13557         * config/rs6000/750cl.h: Delete.
13558         * config/rs6000/paired.h: Delete.
13559         * config/rs6000/paired.md: Delete.
13560         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13561         float support.
13562         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13563         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13564         comment.  Remove paired float support.
13565         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13566         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13567         VECTOR_PAIRED.
13568         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13569         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13570         declarations.
13571         * config/rs6000/rs6000.c: Remove paired float support.
13572         (paired_expand_vector_init, paired_expand_vector_move,
13573         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13574         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13575         paired_expand_builtin, paired_expand_predicate_builtin,
13576         paired_init_builtins): Delete.
13577         * config/rs6000/rs6000.h: Remove paired float support.
13578         * config/rs6000/rs6000.md: Remove paired float support.
13579         (move_from_CR_ov_bit): Delete.
13580         * config/rs6000/rs6000.opt (mpaired): Delete.
13581         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13582         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13583
13584 2018-05-02  Richard Biener  <rguenther@suse.de>
13585
13586         PR middle-end/85567
13587         * gimplify.c (gimplify_save_expr): When in SSA form allow
13588         SAVE_EXPRs to compute to SSA vars.
13589
13590 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13591
13592         PR target/85582
13593         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13594         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13595         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13596         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13597
13598 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13599
13600         PR tree-optimization/85586
13601         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13602         exit early for statements in the same group if the accesses are
13603         not strided.
13604
13605 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13606
13607         PR lto/85451
13608         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13609         error message.
13610
13611 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13612
13613         PR tree-optimization/85143
13614         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13615
13616 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13617
13618         PR lto/85451
13619         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13620         not found" error message.
13621
13622 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13623
13624         PR other/83786
13625         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13626         * vec.c (test_ordered_remove_if): New function.
13627         (vec_c_tests): Call test_ordered_remove_if.
13628         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13629         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13630         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13631         VEC_ORDERED_REMOVE_IF.
13632
13633 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13634
13635         PR tree-optimization/82665
13636         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13637         pointer subtraction where arguments come from a memchr call.
13638
13639 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13640
13641         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13642         --push-state --as-needed and --pop-state instead of --as-needed and
13643         --no-as-needed if ld supports it.
13644         * configure: Regenerated.
13645
13646         PR web/85578
13647         * doc/install.texi2html: Replace _002d with - and _002a with * in
13648         generated html files using sed.
13649
13650 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13651
13652         PR c++/85523
13653         * gcc-rich-location.c (blank_line_before_p): New function.
13654         (use_new_line): New function.
13655         (gcc_rich_location::add_fixit_insert_formatted): New function.
13656         * gcc-rich-location.h
13657         (gcc_rich_location::add_fixit_insert_formatted): New function.
13658
13659 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13660
13661         * selftest.c (assert_streq): Rename "expected" and "actual" to
13662         "val1" and "val2".  Extend NULL-handling to cover both inputs
13663         symmetrically, while still requiring both to be non-NULL for a pass.
13664         * selftest.h (assert_streq): Rename "expected" and "actual" to
13665         "val1" and "val2".
13666         (ASSERT_EQ): Likewise.
13667         (ASSERT_EQ_AT): Likewise.
13668         (ASSERT_KNOWN_EQ): Likewise.
13669         (ASSERT_KNOWN_EQ_AT): Likewise.
13670         (ASSERT_NE): Likewise.
13671         (ASSERT_MAYBE_NE): Likewise.
13672         (ASSERT_MAYBE_NE_AT): Likewise.
13673         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13674         the assertion to pass.
13675         (ASSERT_STREQ_AT): Likewise.
13676
13677 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13678
13679         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13680         interaction with -pie.
13681
13682 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13683
13684         * selftest.h: Fix alphabetization of per-source-file selftest
13685         declarations.
13686
13687 2018-04-30  Jason Merrill  <jason@redhat.com>
13688
13689         PR c++/61982 - dead stores to destroyed objects.
13690         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13691         of clobber.
13692
13693 2018-04-30  Jason Merrill  <jason@redhat.com>
13694
13695         * tree.c (build_clobber): New.
13696         * tree.h: Declare it.
13697         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13698
13699 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13700
13701         * diagnostic-show-locus.c (layout::layout): Update for
13702         location_get_source_line returning a char_span.
13703         (struct char_span): Move to input.h.
13704         (struct correction): Update for fields in char_span becoming
13705         private.
13706         (struct source_line): Update for location_get_source_line
13707         returning a char_span.
13708         (layout::print_line): Likewise.
13709         * edit-context.c (edited_file::print_content): Likewise.
13710         (edited_file::print_diff_hunk): Likewise.
13711         (edited_file::print_run_of_changed_lines): Likewise.
13712         (edited_file::get_num_lines): Likewise.
13713         (edited_line::edited_line): Likewise.
13714         * final.c (asm_show_source): Likewise.
13715         * input.c (location_get_source_line): Convert return type
13716         from const char * to char_span, losing the final "line_len"
13717         param.
13718         (dump_location_info): Update for the above.
13719         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13720         when handling the literal within the line.
13721         (test_reading_source_line): Update for location_get_source_line
13722         returning a char_span.
13723         * input.h (class char_span): Move here from
13724         diagnostic-show-locus.c, converting from a struct to a class.
13725         Make data members private.
13726         (char_span::operator bool): New.
13727         (char_span::length): New.
13728         (char_span::get_buffer): New.
13729         (char_span::operator[]): New.
13730         (char_span::subspan): Make const.
13731         (char_span::xstrdup): New.
13732         (location_get_source_line): Convert return type from const char *
13733         to char_span, losing the final "line_size" param.
13734
13735 2018-04-30  Jan Hubicka  <jh@suse.cz>
13736
13737         * lto-wrapper.c (ltrans_priorities): New static var.
13738         (cmp_priority): New.
13739         (run_gcc): Read priorities and if doing parallel build order
13740         the Makefile by them.
13741
13742 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13743
13744         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13745
13746 2018-04-30  Richard Biener  <rguenther@suse.de>
13747
13748         * tree-cfg.c (verify_address): Remove base argument, add
13749         flag whether to check TREE_ADDRESSABLE and do that.
13750         (verify_expr): Remove.
13751         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13752         (verify_gimple_assign_single): Likewise.
13753         (verify_gimple_switch): Likewise.
13754         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13755         piece from verify_expr.
13756         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13757
13758 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13759
13760         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13761
13762 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13763
13764         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13765         (small_data_pattern): Likewise.
13766         (arc_rewrite_small_data): Likewise.
13767         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13768         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13769         (get_symbol_alignment): New function.
13770         (legitimate_small_data_address_p): Likewise.
13771         (legitimate_scaled_address): Update, call
13772         legitimate_small_data_address_p.
13773         (output_sdata): New static variable.
13774         (arc_print_operand): Update how we handle small data operands.
13775         (arc_print_operand_address): Likewise.
13776         (arc_legitimate_address_p): Update, use
13777         legitimate_small_data_address_p.
13778         (arc_rewrite_small_data_p): Remove.
13779         (arc_rewrite_small_data_1): Likewise.
13780         (arc_rewrite_small_data): Likewise.
13781         (small_data_pattern): Likewise.
13782         (compact_sda_memory_operand): Update to use
13783         legitimate_small_data_address_p and get_symbol_alignment.
13784         (prepare_move_operands): Don't rewite sdata pattern.
13785         (prepare_extend_operands): Remove.
13786         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13787         pattern.
13788         (zero_extendqisi2): Likewise.
13789         (zero_extendhisi2): Likewise.
13790         (extendqihi2): Likewise.
13791         (extendqisi2): Likewise.
13792         (extendhisi2): Likewise.
13793         (addsi3): Likewise.
13794         (subsi3): Likewise.
13795         (andsi3): Likewise.
13796         * config/arc/constraints.md (Usd): Change it to memory constraint.
13797
13798 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13799
13800         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13801         as source of std instructions.
13802         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13803         allow 6-bit constants as source for store instructions.
13804         (movdi_insn): Update instruction pattern to allow 6-bit constants
13805         as source for store instructions.
13806
13807 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13808
13809         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13810
13811 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13812             Sandra Loosemore <sandra@codesourcery.com>
13813
13814         * dumpfile.c (dump_open): Allow '-' for stdout.
13815         * doc/invoke.texi (Developer Options): Document dump filename
13816         determination early.  Document stdin/stdout selection.
13817
13818 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13819
13820         Microblaze Target: PIC data text relative
13821
13822         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13823         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13824         Add declaration.
13825         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13826         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13827         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13828         New addressing mode for data-text relative position indepenedent code.
13829         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13830         'ADDRESS_SYMBOLIC_TXT_REL'.
13831         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13832         (microblaze_legitimate_pic_operand): Exclude function calls from
13833         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13834         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13835         addresses cases.
13836         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13837         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13838         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13839         for 'address + offset'.
13840         (microblaze_expand_prologue): Add new function prologue call for
13841         'r20' assignation.
13842         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13843         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13844         table in case of TARGET_PIC_DATA_TEXT_REL.
13845         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13846         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13847         Add new macros 'UNSPEC_TEXT',
13848         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13849         + exclude function calls from 'UNSPEC_PLT' in case of data text
13850         relative mode.
13851         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13852         new target hook for generating address diff vector tables in case of
13853         flag_pic.
13854         * doc/tm.texi : Regenerate.
13855         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13856         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13857         of addr diff vector generation.
13858         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13859         target hook definition.
13860         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13861         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13862         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13863         option for data text relative.
13864
13865 2018-04-30  Richard Biener  <rguenther@suse.de>
13866
13867         * tree-chrec.h (evolution_function_is_constant_p): Remove
13868         redundant check.
13869         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13870
13871 2018-04-30  Richard Biener  <rguenther@suse.de>
13872
13873         PR bootstrap/85571
13874         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13875
13876 2018-04-30  Richard Biener  <rguenther@suse.de>
13877
13878         PR tree-optimization/28364
13879         PR tree-optimization/85275
13880         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13881         copying first exit test.
13882
13883 2018-04-28  Mark Wielaard  <mark@klomp.org>
13884
13885         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13886         dwarf_version >= 5.
13887         (dwarf_AT): Handle DW_AT_addr_base.
13888         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13889
13890 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13891
13892         PR target/84431
13893         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13894         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13895         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13896         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13897
13898 2018-04-28  Richard Biener  <rguenther@suse.de>
13899
13900         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13901         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13902         to reflect use.  Only add interesting stmts.
13903
13904 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13905
13906         PR ipa/85549
13907         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13908         the jump function allows for passing through aggregate values.
13909
13910 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13911
13912         * input.h (in_system_header_at): Convert from macro to inline
13913         function.
13914         (from_macro_expansion_at): Likewise.
13915         (from_macro_definition_at): Likewise.
13916
13917 2018-04-27  Jeff Law  <law@redhat.com>
13918
13919         * config.gcc: Mark tile* targets as deprecated/obsolete.
13920
13921 2018-04-27  Richard Biener  <rguenther@suse.de>
13922
13923         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13924         fix for ILP32.
13925
13926 2018-04-27  Richard Biener  <rguenther@suse.de>
13927
13928         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13929
13930 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13931
13932         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13933         with Yd constraint. Set "preferred_for_speed" attribute from
13934         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13935         with Yd constraint.
13936         (*movdi_internal): Ditto.
13937         (movti_interunit splitters): Remove
13938         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13939         (movdi_interunit splitters): Ditto.
13940         * config/i386/constraints.md (Ye): Remove.
13941         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13942
13943 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13944
13945         PR target/85512
13946         * config/aarch64/constraints.md (Usg): Limit to 31.
13947         (Usj): Limit to 63.
13948
13949 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
13950
13951         PR tree-optimization/85529
13952         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13953         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13954         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13955         zero extension or masking of the MSB bit.
13956         (optimize_range_tests): Add FIRST_BB argument, pass it through
13957         to optimize_range_tests_var_bound.
13958         (maybe_optimize_range_tests, reassociate_bb): Adjust
13959         optimize_range_tests callers.
13960
13961 2018-04-26  Richard Biener  <rguenther@suse.de>
13962             Jakub Jelinek  <jakub@redhat.com>
13963
13964         * cgraph.h (symbol_table): Just declare debug method here.
13965         * symtab.c (symbol_table::debug): Define.
13966
13967 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
13968
13969         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13970
13971 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
13972
13973         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13974         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13975         (*movdi_internal): Substitute Yi and Yj constraint with x
13976         and Ym and Yn constraint with y constraint.  Update "isa"
13977         attribute and set "preferred_for_speed" attribute from
13978         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13979         (*movsi_internal): Ditto.
13980         (*movdf_internal): Ditto.
13981         (*movsf_internal): Ditto.
13982         (*zero_extendsidi2): Ditto.
13983         * config/i386/sse.md (vec_set<mode>_0): Ditto.
13984         (sse2_loadld): Ditto.
13985         (*vec_extract<ssevecmodelower>_0): Ditto.
13986         (*vec_extractv4si_0_zext_sse4): Ditto.
13987         (vec_concatv2di): Ditto.
13988         (*vec_dup<mode>): Ditto.
13989         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13990         * config/i386/constraints.md (Yi): Remove.
13991         (Yj): Remove.
13992         (Ym): Remove.
13993         (Yn): Remove.
13994
13995 2018-04-26  Nathan Sidwell  <nathan@acm.org>
13996
13997         * dumpfile.c (dump_open): New.
13998         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13999         (dump_finish): Detect stdio/stderr by value not name.
14000
14001 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
14002
14003         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14004
14005 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14006
14007         PR target/84952
14008         * config/nvptx/nvptx.c (verify_neutering_jumps)
14009         (verify_neutering_labels): New function
14010         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14011
14012 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14013
14014         PR target/84025
14015         * config/nvptx/nvptx.c (needs_neutering_p): New function.
14016         (nvptx_single): Use needs_neutering_p to skip over insns that do not
14017         need neutering.
14018
14019 2018-04-26  Richard Biener <rguenther@suse.de>
14020             Tom de Vries  <tom@codesourcery.com>
14021
14022         PR lto/85422
14023         * lto-streamer-out.c (output_function): Fixup loops if required to match
14024         discovery done in the reader.
14025
14026 2018-04-26  Richard Biener  <rguenther@suse.de>
14027
14028         PR tree-optimization/85116
14029         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14030         have a loop exit from the single latch predecessor.  Remove
14031         case of header with just condition.
14032         (ch_base::copy_headers): Exclude infinite loops from any
14033         processing.
14034         (pass_ch::execute): Record exits.
14035
14036 2018-04-26  Richard Biener  <rguenther@suse.de>
14037
14038         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14039         prologue cost vector and pass it to vect_get_load_cost.
14040         (vect_get_peeling_costs_all_drs): Likewise.
14041         (vect_peeling_hash_get_lowest_cost): Likewise.
14042         (vect_enhance_data_refs_alignment): Likewise.
14043
14044 2018-04-26  Richard Biener  <rguenther@suse.de>
14045
14046         PR middle-end/85450
14047         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14048         checking of integer<->pointer conversions.
14049         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14050         sign-/zero-extending pointer types.
14051         (expand_omp_for_static_chunk): Likewise.
14052
14053 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
14054             Jean Lee  <xiaoyur347@gmail.com>
14055
14056         * config/mips/mips.c (mips_asan_shadow_offset): New function.
14057         (TARGET_ASAN_SHADOW_OFFSET): Define.
14058         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14059         true for -fsanitize=address.
14060
14061 2018-04-25  Mark Wielaard  <mark@klomp.org>
14062
14063         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14064         shorter ones.
14065
14066 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14067
14068         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14069         than "alu", remove explicit "memory" and "imm_disp" attributes.
14070         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14071
14072         PR middle-end/85414
14073         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14074         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14075         gen_lowpart_no_emit.
14076
14077 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
14078
14079         PR target/85473
14080         * config/i386/i386.c (ix86_expand_builtin): Change memory
14081         operand to XI, extend p0 to Pmode.
14082         * config/i386/i386.md: Change unspec volatile and operand
14083         1 mode to XI, change operand 0 mode to P.
14084
14085 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14086
14087         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14088         GET_MODE_MASK before any checking.
14089         (nds32_can_use_bset_p): Likewise.
14090         (nds32_can_use_btgl_p): Likewise.
14091
14092 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14093
14094         * config/nds32/nds32-doubleword.md: New define_split pattern for
14095         illegal register number.
14096
14097 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14098
14099         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14100
14101 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14102
14103         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14104
14105 2018-04-25  Richard Biener  <rguenther@suse.de>
14106
14107         * lto-streamer.h (LTO_major_version): Bump to 8.
14108
14109 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14110
14111         * BASE-VER: Set to 9.0.0.
14112
14113 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
14114
14115         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14116         in __abskf2 and __powikf2.
14117
14118 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14119
14120         PR target/85512
14121         * config/aarch64/constraints.md (Usg, Usj): New constraints.
14122         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14123         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14124         Use the above on operand 2.  Reindent.
14125         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14126
14127 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14128
14129         PR target/85485
14130         * common/config/i386/i386-common.c (ix86_handle_option): Don't
14131         handle OPT_mcet.
14132         * config/i386/i386.opt (mcet): Removed.
14133         * doc/install.texi: Remove -mcet documentation.
14134         * doc/invoke.texi: Likewise.
14135
14136 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14137
14138         PR target/85485
14139         * doc/install.texi: Remove -mcet from bootstrap-cet.
14140
14141 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14142
14143         PR target/85511
14144         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14145         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14146         if TARGET_64BIT.
14147
14148         PR target/85503
14149         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14150         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14151         containing a CONST_VECTOR.
14152
14153 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
14154
14155         * doc/install.texi: Update newlib dependency for nvptx.
14156
14157 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14158
14159         PR target/85508
14160         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14161         instead of INTVAL when shifting x left.
14162
14163 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
14164
14165         PR tree-optimization/85478
14166         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14167         vect_grouped_store_supported for single element vectors.
14168
14169 2018-04-24  Richard Biener  <rguenther@suse.de>
14170
14171         PR target/85491
14172         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14173         load cost increase to the case of non-constant step.
14174
14175 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14176
14177         PR target/84828
14178         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14179         destination if any_malformed_asm.
14180
14181 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
14182
14183         PR middle-end/85496
14184         * expr.c (store_field): In the bitfield case, if the value comes from
14185         a function call and is returned in registers by means of a PARALLEL,
14186         do not change the mode of the temporary unless BLKmode and VOIDmode.
14187
14188 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
14189
14190         PR rtl-optimization/85423
14191         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14192         dependencies to debug insns when the previous insn is non-debug.
14193
14194 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14195
14196         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14197         enums into a single definition.
14198         (fls): Fix predicates and printing.
14199         (seti): Likewise.
14200
14201 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14202
14203         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14204         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14205         and short u6 immediate.
14206         (check_if_valid_sleep_operand): Remove.
14207         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14208
14209 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14210
14211         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14212         flag_always_save_lp condition.
14213         * config/nds32/nds32.opt (malways-save-lp): New option.
14214
14215 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14216
14217         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14218         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14219         * config/nds32/nds32.h
14220         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14221         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14222
14223 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14224
14225         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14226         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14227
14228 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14229             Chung-Ju Wu  <jasonwucj@gmail.com>
14230
14231         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14232         Declare.
14233         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14234         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14235
14236 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14237
14238         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14239
14240 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14241
14242         * config/nds32/nds32-protos.h (nds32_data_alignment,
14243         nds32_local_alignment): Declare.
14244         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14245         nds32_local_alignment): New functions.
14246         (TARGET_CONSTANT_ALIGNMENT): Define.
14247         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14248
14249 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14250
14251         * config/nds32/nds32.c
14252         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14253         (TARGET_MODES_TIEABLE_P): Likewise.
14254
14255 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14256
14257         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14258         level Ofast and Og.
14259
14260 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
14261             Chung-Ju Wu  <jasonwucj@gmail.com>
14262
14263         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14264         for unaligned access.
14265         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14266         unaligned access.
14267         * config/nds32/nds32-intrinsic.md: Likewise.
14268         * config/nds32/nds32_intrinsic.h: Likewise.
14269         * config/nds32/nds32.h (nds32_builtins): Likewise.
14270         * config/nds32/nds32.opt (munaligned-access): New option.
14271         * config/nds32/nds32.c (nds32_asm_file_start): Display
14272         flag_unaligned_access status.
14273
14274 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14275
14276         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14277         -mno-relax is present.
14278         * config/riscv/linux.h (LINK_SPEC): Ditto.
14279
14280 2018-04-20  Martin Sebor  <msebor@redhat.com>
14281
14282         PR c/85365
14283         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14284         for null pointers.
14285         (gimple_fold_builtin_stxcpy_chk): Same.
14286         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14287
14288 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
14289
14290         PR target/85456
14291         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14292         __powikf2 when long double is IEEE 128-bit.
14293
14294 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14295
14296         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14297         step to make sure stack always aligned.
14298
14299 2018-04-20  Carl Love  <cel@us.ibm.com>
14300
14301         PR target/83402
14302         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14303         size check for arg0.
14304
14305 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14306             Tom de Vries  <tom@codesourcery.com>
14307
14308         PR target/85445
14309         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14310         Emit insns for calls too.
14311         (nvptx_find_par): Always look for worker-level predecessor insn.
14312         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
14313         calls.
14314         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14315         (nvptx_process_pars): Propagate frames for calls.
14316
14317 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
14318
14319         PR target/85469
14320         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14321         Removed.
14322         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14323         (ix86_handle_option): Don't handle OPT_mibt.
14324         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14325         __SHSTK__.
14326         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14327         has_ibt and ibt.
14328         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14329         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14330         (ix86_target_macros): Define __CET__ with flag_cf_protection
14331         for -fcf-protection.
14332         * config/i386/i386.c (isa2_opts): Remove -mibt.
14333         * config/i386/i386.h (TARGET_IBT): Removed.
14334         (TARGET_IBT_P): Likewise.
14335         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14336         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14337         * config/i386/i386.opt (mcet): Update help message.
14338         (mshstk): Likewise.
14339         (mibt): Removed.
14340         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
14341         -mcet as an alias for -mshstk.
14342
14343 2018-04-20  Richard Biener <rguenther@suse.de>
14344
14345         PR middle-end/85475
14346         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14347         complexity by forcing a single use of the multiply operand.
14348
14349 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14350
14351         ipa/85449
14352         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14353         recursion dependency to only apply to non-clones.
14354
14355 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14356
14357         ipa/85447
14358         * ipa-cp.c (create_specialized_node): Check that clones of
14359         self-recursive edges exist during IPA-CP.
14360
14361 2018-04-19  Toon Moene  <toon@moene.org>
14362
14363         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14364         by -O3.
14365
14366 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14367
14368         PR tree-optimization/85467
14369         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14370         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
14371         VECTOR_CST element to type.
14372
14373 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14374
14375         PR target/85397
14376         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14377         * config/i386/i386.md (builtin_setjmp_setup): Removed.
14378         (builtin_longjmp): Likewise.
14379         (save_stack_nonlocal): New pattern.
14380         (restore_stack_nonlocal): Likewise.
14381
14382 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14383
14384         PR target/85404
14385         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14386         Replace ASM_OUTPUT_LABEL with fprintf.
14387
14388 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14389
14390         PR target/85417
14391         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14392         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14393         * config/i386/i386-c.c (ix86_target_macros_internal): Also
14394         define __IBT__ and __SHSTK__ for -fcf-protection.
14395         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14396         TARGET_IBT.
14397         (ix86_trampoline_init): Likewise.
14398         (x86_output_mi_thunk): Likewise.
14399         (ix86_notrack_prefixed_insn_p): Likewise.
14400         (ix86_option_override_internal): Don't disallow -fcf-protection.
14401         * config/i386/i386.md (rdssp<mode>): Also enable for
14402         -fcf-protection.
14403         (incssp<mode>): Likewise.
14404         (nop_endbr): Likewise.
14405         * config/i386/i386.opt (mcet): Change help message to built-in
14406         functions only.
14407         (mibt): Likewise.
14408         (mshstk): Likewise.
14409         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14410         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
14411         enable CET built-in functions.
14412
14413 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
14414
14415         * common/config/i386/i386-common.c
14416         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14417         OPTION_MASK_ISA_MOVDIRI_UNSET,
14418         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14419         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14420         * config.gcc (movdirintrin.h): New header.
14421         * config/i386/cpuid.h (bit_MOVDIRI,
14422         bit_MOVDIR64B): New bits.
14423         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14424         and -mmvodir64b.
14425         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14426         (VOID, PVOID, PCVOID)): New function types.
14427         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14428         __builtin_ia32_directstoreu_u64,
14429         __builtin_ia32_movdir64b): New builtins.
14430         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14431         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14432         and -mmovdiri.
14433         (ix86_valid_target_attribute_inner_p): Ditto.
14434         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14435         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14436         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14437         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14438         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14439         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14440         (movdiri<mode>, movdir64b_<mode>): New.
14441         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14442         * config/i386/immintrin.h: Include movdirintrin.h.
14443         * config/i386/movdirintrin.h: New file.
14444         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14445
14446 2018-04-19  Richard Biener  <rguenther@suse.de>
14447
14448         PR middle-end/85455
14449         * cfg.c (clear_bb_flags): When loop state says we have
14450         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14451
14452 2018-04-19  Richard Biener  <rguenther@suse.de>
14453
14454         PR tree-optimization/84737
14455         * tree-vect-data-refs.c (vect_copy_ref_info): New function
14456         copying restrict info.
14457         (vect_setup_realignment): Use it.
14458         * tree-vectorizer.h (vect_copy_ref_info): Declare.
14459         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14460         the first DR to all generated stores.
14461         (vectorizable_load): Likewise for loads.
14462
14463 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14464
14465         PR tree-optimization/85446
14466         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14467         the integral and pointer types to have the same precision.
14468
14469         * doc/install.texi: Document --disable-cet being the default and
14470         --enable-cet=auto.
14471
14472 2018-04-18  Martin Liska  <mliska@suse.cz>
14473
14474         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14475         style.
14476
14477 2018-04-18  Martin Liska  <mliska@suse.cz>
14478
14479         Revert
14480         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14481
14482         PR ipa/83983
14483         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14484         arguments if they are comparable.
14485
14486 2018-04-18  Martin Liska  <mliska@suse.cz>
14487
14488         Revert
14489         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14490
14491         PR lto/84805
14492         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14493         incomplete types.
14494
14495 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14496
14497         PR target/85388
14498         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14499         ENDBR after calling __morestack.
14500
14501 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14502
14503         PR jit/85384
14504         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14505         by using gcc_base_ver to generate a gcc_driver_version, and use
14506         it when generating GCC_DRIVER_NAME.
14507         * configure: Regenerate.
14508
14509 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14510
14511         PR target/81084
14512         * config.gcc: Obsolete powerpc*-*-*spe*.
14513
14514 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14515
14516         PR debug/84637
14517         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14518         (stabstr_D): Change type of unum from unsigned int to
14519         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14520         type.
14521
14522 2018-04-17  Jim Wilson  <jimw@sifive.com>
14523
14524         PR 84856
14525         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14526         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14527         Set arg_pointer_offset after using pretend_args_size.
14528
14529 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14530
14531         PR rtl-optimization/85431
14532         * dse.c (record_store): Ignore zero width stores.
14533
14534         PR sanitizer/85230
14535         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14536         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14537         __builtin_stack_restore rather than after it.
14538         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14539         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14540         argument instead of virtual_dynamic_stack_rtx.
14541
14542 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14543
14544         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14545         New prototype.
14546         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14547         Add note to error message to explain internal mapping of overloaded
14548         built-in function name to non-overloaded built-in function name.
14549         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14550         function.
14551
14552 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14553
14554         PR target/85424
14555         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14556         where the inputs overlap with the output.
14557
14558 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14559
14560         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14561         (=v, v) alternative and explicit "memory" attribute.
14562         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14563         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14564         attributes.
14565         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14566         "sselog1" type instead of "sselog".
14567         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14568         "sselog".  Remove explicit "memory" attribute.
14569         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14570         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14571         attributes.
14572         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14573         "sselog1" type instead of "sselog".  Remove explicit "memory"
14574         attribute.
14575         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14576         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14577         attribute.
14578         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14579         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14580         attributes.
14581         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14582         "sselog1" type instead of "sselog".  Remove explicit "memory"
14583         attribute.
14584         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14585         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14586         attribute.
14587
14588         PR target/85430
14589         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14590
14591         PR middle-end/85414
14592         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14593         on a SUBREG.
14594
14595 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14596
14597         PR ipa/85421
14598         * ipa-cp.c (create_specialized_node): Call
14599         expand_all_artificial_thunks if necessary.
14600
14601 2018-04-17  Martin Liska  <mliska@suse.cz>
14602
14603         PR lto/85405
14604         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14605         in message, remote space in between '_G' and '('.
14606
14607 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14608
14609         PR target/85281
14610         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14611         avx512f_vmcmp<mode>3<round_saeonly_name>,
14612         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14613         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14614         avx512f_rndscale<mode><round_saeonly_name>,
14615         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14616         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14617         Use %<iptr>2 instead of %2 for -masm=intel.
14618         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14619         avx512f_vcvttss2usi<round_saeonly_name>,
14620         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14621         -masm=intel.
14622         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14623         avx512f_vcvttsd2usi<round_saeonly_name>,
14624         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14625         Use %q1 instead of %1 for -masm=intel.
14626         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14627         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14628         of %3 for -masm=intel.
14629         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14630         -masm=intel.
14631         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14632         -masm=intel.
14633         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14634         -masm=intel.
14635         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14636         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14637         %g1.
14638         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14639         -masm=intel.
14640         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14641         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14642         %g1 and one with %0 and %1.
14643         (avx512er_vmrcp28<mode><round_saeonly_name>,
14644         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14645         %1 for -masm=intel.
14646         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14647         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14648         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14649         of %0 and %{%4%} for -masm=intel.
14650         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14651         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14652         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14653         order of %0 and %{%5%}%{z%} for -masm=intel.
14654
14655 2018-04-17  Jan Hubicka  <jh@suse.cz>
14656
14657         PR lto/85405
14658         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14659
14660 2018-04-17  Martin Liska  <mliska@suse.cz>
14661
14662         PR ipa/85329
14663         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14664         for target_clone error message.  Make default implementation
14665         clone to be a local declaration.
14666         (separate_attrs): Add new argument and check for an empty
14667         string.
14668         (expand_target_clones): Handle it.
14669         (ipa_target_clone): Make redirection just for target_clones
14670         functions.
14671
14672 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14673             Tom de Vries  <tom@codesourcery.com>
14674
14675         PR middle-end/84955
14676         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14677         tiled basic blocks without omp continue statements.
14678
14679 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14680
14681         PR target/83660
14682         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14683         vec_extract expression as having side effects to make sure it gets
14684         a cleanup point.
14685
14686 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14687
14688         PR target/85403
14689         * config/i386/i386.c (get_builtin_code_for_version): Check
14690         error_mark_node.
14691
14692 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14693
14694         PR target/84331
14695         * config.gcc: Support "skylake".
14696         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14697         PROCESSOR_SKYLAKE.
14698         * config/i386/i386.c (m_SKYLAKE): Define.
14699         (processor_target_table): Add "skylake".
14700         (ix86_option_override_internal): Add "skylake".
14701         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14702         PROCESSOR_CANNONLAKE.
14703         (get_builtin_code_for_version): Fix priority for
14704         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14705         PROCESSOR_SKYLAKE-AVX512.
14706         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14707         (processor_type): Add PROCESSOR_SKYLAKE.
14708
14709 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14710             Jason Merrill  <jason@redhat.com>
14711
14712         PR c++/85112
14713         * convert.c (convert_to_integer_1): Use direct recursion for
14714         enumeral types and types with a precision less than the number
14715         of bits in their mode.
14716
14717 2018-04-16  Julia Koval  <julia.koval@intel.com>
14718
14719         PR target/84413
14720         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14721         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14722
14723 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14724
14725         PR target/85293
14726         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14727         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14728         and -mno-direct-move.
14729
14730 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14731
14732         PR target/83402
14733         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14734         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14735         Ensure negative shifts result in {0}.
14736
14737 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14738
14739         PR rtl-optimization/79916
14740         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14741         regs (if any) to define how to gnerate SD moves when LRA is in
14742         progress.
14743
14744 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14745
14746         PR rtl-optimization/85393
14747         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14748         * except.c (expand_dw2_landing_pad_for_region): Make static.
14749         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14750         a label and unconditional jump to old_bb, rather than
14751         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14752         basic block.
14753
14754         PR rtl-optimization/85376
14755         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14756         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14757         instead of a specific value.
14758
14759 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14760             Bin Cheng  <bin.cheng@arm.com>
14761
14762         PR tree-optimization/82965
14763         PR tree-optimization/83991
14764         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14765         by_profile_only parameter.
14766         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14767         information if the loop was predicted to iterate too many times.
14768         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14769
14770 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14771
14772         PR lto/71991
14773         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14774         always inline.
14775
14776 2018-04-13  Martin Liska  <mliska@suse.cz>
14777             Jakub Jelinek  <jakub@redhat.com>
14778
14779         PR middle-end/81657
14780         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14781         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14782         * builtins.c (expand_builtin_memory_copy_args): Use
14783         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14784         handle dest_addr == pc_rtx.
14785
14786 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14787
14788         PR target/85291
14789         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14790         asked to not generate direct moves.
14791         (fix_trunc<mode>si2_stfiwx): Similar.
14792         (fix_trunc<mode>si2_internal): Similar.
14793
14794 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14795
14796         PR debug/83157
14797         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14798         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14799         lookup if dest in some wider mode is known to be const0_rtx and
14800         if so, record permanent equivalence for it to be ZERO_EXTEND of
14801         the narrower mode destination.
14802
14803 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14804
14805         * lto-streamer-out.c (output_function): Revert 259346.
14806         * omp-expand.c (expand_oacc_for): Likewise.
14807
14808 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14809
14810         PR rtl-optimization/85354
14811         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14812         * sel-sched.c (sel_global_init): ... here.
14813
14814 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14815
14816         PR target/85238
14817         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14818         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14819         mode for PE-COFF targets.
14820         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14821         (i386_pe_asm_lto_end): Likewise.
14822         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14823         (TARGET_ASM_LTO_END): Likewise.
14824         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14825         (i386_pe_asm_lto_start): New function.
14826         (i386_pe_asm_lto_end): Likewise.
14827
14828 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14829             Richard Biener  <rguenther@suse.de>
14830
14831         PR middle-end/84955
14832         * lto-streamer-out.c (output_function): Fix CFG loop state before
14833         streaming out.
14834         * omp-expand.c (expand_oacc_for): Handle calls to internal
14835         functions like regular functions.
14836
14837 2018-04-12  Richard Biener  <rguenther@suse.de>
14838
14839         PR lto/85371
14840         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14841         for the early LTO debug to properly generate references to it
14842         during DIE emission.  Do not re-use that for the skeleton for
14843         split-dwarf.
14844         (dwarf2out_early_finish): Likewise.
14845
14846 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14847
14848         PR target/85328
14849         * config/i386/sse.md
14850         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14851         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14852         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14853         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14854         and output is a reg, avoid creating invalid lowpart subreg, but
14855         instead split into a 512-bit move.  Don't split if not AVX512VL,
14856         input is xmm16+ reg and output is a mem.
14857         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14858         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14859         xmm16+ reg and output is a mem.
14860
14861 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14862
14863         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14864         also for flag_dwarf2_cfi_asm.
14865
14866 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14867
14868         PR rtl-optimization/85342
14869         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14870         a bool scalar var inside of the loop instead.  Don't try to update
14871         recog_data.operand after failed apply_change_group.
14872
14873 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14874
14875         PR target/85296
14876         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14877         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14878         array with flexible array member as array without given dimension.
14879         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14880         argument for undefined param to true.
14881
14882 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14883
14884         PR target/85321
14885         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14886         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14887         from PowerPC section.
14888         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14889         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14890         help text that is too long.
14891         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14892         help text that is too long.
14893         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14894         help text that is too long.
14895
14896 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14897
14898         * config/alpha/alpha.md (stack_probe_internal): Rename
14899         from "probe_stack".  Update all callers.
14900
14901 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14902
14903         PR rtl-optimization/84566
14904         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14905         sched_macro_fuse_insns.
14906
14907 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14908
14909         PR target/84301
14910         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14911         (compute_block_dependences): ... from here.
14912
14913 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14914
14915         PR tree-optimization/85331
14916         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14917         from int to HOST_WIDE_INT.
14918
14919 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14920
14921         PR ipa/84149
14922         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14923         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14924         not the same as the source val.
14925         (cgraph_edge_brings_value_p): New parameter.
14926         (gather_edges_for_value): Pass destination value to
14927         cgraph_edge_brings_value_p.
14928         (perhaps_add_new_callers): Likewise.
14929         (get_info_about_necessary_edges): Likewise and exclude values brought
14930         only by self-recursive edges.
14931         (create_specialized_node): Redirect only clones of self-calling edges.
14932         (+self_recursive_pass_through_p): New function.
14933         (find_more_scalar_values_for_callers_subset): Use it.
14934         (find_aggregate_values_for_callers_subset): Likewise.
14935         (known_aggs_to_agg_replacement_list): Removed.
14936         (decide_whether_version_node): Re-calculate known constants for all
14937         remaining context clones.
14938
14939 2018-04-11  Richard Biener  <rguenther@suse.de>
14940
14941         PR lto/85339
14942         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14943         from early DWARF output.
14944         (dwarf2out_early_finish): Output line info unconditionally into
14945         early DWARF and add reference to it.
14946
14947 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14948
14949         PR target/85281
14950         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14951         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14952         other than V2DFmode using iptr mode attribute.
14953         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14954
14955 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14956
14957         PR rtl-optimization/84659
14958         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14959
14960 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14961
14962         PR debug/85302
14963         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14964         SIZEP is NULL.
14965         (output_loc_list): Pass address of a dummy size variable even in the
14966         locview handling loop.
14967         (index_location_lists): Add comment on why skip_loc_list_entry can't
14968         call size_of_locs.
14969
14970 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14971
14972         PR target/85261
14973         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14974         into register.
14975
14976 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
14977
14978         PR target/85321
14979         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14980         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14981         and -mstring-compare-inline-limit.
14982
14983 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14984
14985         PR target/85287
14986         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14987         for stack clash protection in a register whenever we need it to be in
14988         a register.
14989
14990 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14991
14992         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14993         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14994
14995 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14996
14997         PR target/85321
14998         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14999         the help text.
15000         (mlong-double-): Ditto.
15001         * config/rs6000/sysv4.opt (msdata=): Ditto.
15002         (mtls-size=): Ditto.
15003
15004 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15005
15006         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15007         erroneous entries for
15008         "vector int vec_ldl (int, long int *)", and
15009         "vector unsigned int vec_ldl (int, unsigned long int *)".
15010         Add comments and entries for
15011         "vector bool char vec_ldl (int, bool char *)",
15012         "vector bool short vec_ldl (int, bool short *)",
15013         "vector bool int vec_ldl (int, bool int *)",
15014         "vector bool long long vec_ldl (int, bool long long *)",
15015         "vector pixel vec_ldl (int, pixel *)",
15016         "vector long long vec_ldl (int, long long *)",
15017         "vector unsigned long long vec_ldl (int, unsigned long long *)".
15018         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15019         type tree bool_long_long_type_node and correct definition of
15020         bool_V2DI_type_node to make reference to this new type tree.
15021         (rs6000_mangle_type): Replace erroneous reference to
15022         bool_long_type_node with bool_long_long_type_node.
15023         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15024         comments to emphasize sign distinctions for char and int types and
15025         replace RS6000_BTI_bool_long constant with
15026         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
15027         use of RS6000_BTI_pixel.
15028         (bool_long_type_node): Remove this macro definition.
15029         (bool_long_long_type_node): New macro definition
15030
15031 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15032
15033         PR rtl-optimization/85300
15034         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15035         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15036         simplify_unary_operation fails.
15037
15038 2018-04-10  Martin Liska  <mliska@suse.cz>
15039
15040         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15041         cgraph_edge and ipa_ref.
15042
15043 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15044
15045         PR target/85177
15046         PR target/85255
15047         * config/i386/sse.md
15048         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15049         computation of the VEC_MERGE selector from mask.
15050         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15051         Fix decoding of the VEC_MERGE selector into mask.
15052
15053 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15054
15055         PR tree-optimization/85286
15056         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15057
15058 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15059
15060         * final.c (final_1): Set insn_last_address as well as
15061         insn_current_address.
15062
15063 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15064
15065         PR target/85173
15066         * explow.c (emit_stack_probe): Call validize_mem on memory location
15067         before passing it to gen_probe_stack.  Create address operand and
15068         legitimize it for the probe_stack_address case.
15069
15070 2018-04-09  Jan Hubicka  <jh@suse.cz>
15071
15072         PR lto/85078
15073         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15074         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15075         * tree.c (free_lang_data_in_type): Fix handling of binfos;
15076         walk basetypes.
15077         (free_lang_data): Rebuild type inheritance graph.
15078
15079 2018-04-09  Martin Sebor  <msebor@redhat.com>
15080
15081         * invoke.texi (-finline-small-functions): Mention other optimization
15082         options.
15083         (-findirect-inlining, -fpartial-inlining): Same.
15084         (-finline-functions-called-once): Same.
15085         (-freorder-blocks-and-partition): Same.
15086
15087 2018-04-09  Jan Hubicka  <jh@suse.cz>
15088
15089         PR rtl/84058
15090         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15091         jumps; choose last target that matches the criteria (i.e.
15092         no partition changes for non-crossing jumps).
15093         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15094         support for redirecting crossing jumps to non-crossing.
15095
15096 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
15097
15098         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15099         also for naked functions.
15100
15101 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
15102
15103         * config/arc/arc.md (add_shift): New pattern.
15104         (add_shift2): Likewise.
15105         (sub_shift): Likewise.
15106         (sub_shift_cmp0_noout): Likewise.
15107         (compare_si_ashiftsi): Likewise.
15108         (xbfu_cmp0_noout): New combine pattern.
15109         (xbfu_cmp0"): Likewise.
15110         (movsi_set_cc_insn): Place the predicable variant first.
15111         (commutative_binary_cmp0_noout): Remove clobber.
15112         (commutative_binary_cmp0): New pattern.
15113         (noncommutative_binary_cmp0): Likewise.
15114         (noncommutative_binary_cmp0_noout): Likewise.
15115         (noncommutative_binary_comparison_result_used): Removed.
15116         (rsub_cmp0): New pattern.
15117         (rsub_cmp0_noout): Likewise.
15118         (extzvsi): Changed, keep only meaningful variants.
15119         (SQH, SEZ): New iterators.
15120         (SQH_postfix): New mode attribute.
15121         (SEZ_prefix): New code attribute.
15122         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15123         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15124         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15125         of numerical value.
15126         (noncommutative_operator): Check the availability of barrel
15127         shifter option.
15128
15129 2018-04-09  Richard Biener  <rguenther@suse.de>
15130
15131         PR tree-optimization/85284
15132         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15133         Only use the niter constraining form of simple_iv when the exit
15134         is always executed.
15135
15136 2018-04-09  Tom de Vries  <tom@codesourcery.com>
15137
15138         PR target/84041
15139         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15140         (define_expand "*memory_barrier"): New define_expand.
15141         (define_insn "memory_barrier"): New insn.
15142
15143 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15144
15145         PR rtl-optimization/80463
15146         PR rtl-optimization/83972
15147         PR rtl-optimization/83480
15148
15149         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15150         correct producer for the insn.
15151         (tidy_control_flow): Fixup seqnos in case of debug insns.
15152
15153 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15154
15155         PR rtl-optimization/83913
15156
15157         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15158         different sched-times when merging exprs.
15159
15160 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15161
15162         PR rtl-optimization/83962
15163
15164         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15165         tidy_fallthru_edge and tidy_control_flow.
15166
15167 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15168
15169         PR rtl-optimization/83530
15170
15171         * sel-sched.c (force_next_insn): New global variable.
15172         (remove_insn_for_debug): When force_next_insn is true, also leave only
15173         next insn in the ready list.
15174         (sel_sched_region): When the region wasn't scheduled, make another pass
15175         over it with force_next_insn set to 1.
15176
15177 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15178
15179         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15180         into tm_file.
15181         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15182         for interrupt control.
15183         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15184         functions for interrupt control.
15185         * config/nds32/nds32-intrinsic.md: Likewise.
15186         * config/nds32/nds32_intrinsic.h: Likewise.
15187         * config/nds32/nds32.h (nds32_builtins): Likewise.
15188
15189 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15190
15191         * config/nds32/nds32.c (nds32_init_machine_status,
15192         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15193         strict_aligned_p field.
15194         (nds32_expand_to_rtl_hook): New function.
15195         (TARGET_EXPAND_TO_RTL_HOOK): Define.
15196         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15197
15198 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15199             Chung-Ju Wu  <jasonwucj@gmail.com>
15200
15201         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15202         * config/nds32/nds32-n7.md: New file.
15203         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15204         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15205         pipeline.
15206         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15207         * config/nds32/nds32.md (pipeline_model): Add n7.
15208         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15209         * config/nds32/pipelines.md: Include n7 settings.
15210
15211 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15212             Chung-Ju Wu  <jasonwucj@gmail.com>
15213
15214         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15215         * config/nds32/nds32-e8.md: New file.
15216         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15217         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15218         pipeline.
15219         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15220         * config/nds32/nds32.md (pipeline_model): Add e8.
15221         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15222         * config/nds32/pipelines.md: Include e8 settings.
15223
15224 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15225             Chung-Ju Wu  <jasonwucj@gmail.com>
15226
15227         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15228         * config/nds32/nds32-n8.md: New file.
15229         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15230         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15231         pipeline.
15232         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15233         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15234         * config/nds32/nds32.md (pipeline_model): Add n8.
15235         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15236         * config/nds32/pipelines.md: Include n8 settings.
15237
15238 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15239             Chung-Ju Wu  <jasonwucj@gmail.com>
15240
15241         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15242         * config/nds32/nds32-n9-2r1w.md: New file.
15243         * config/nds32/nds32-n9-3r2w.md: New file.
15244         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15245         nds32_register_ports): New or modify for cpu n9.
15246         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15247         pipeline.
15248         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15249         * config/nds32/nds32-utils.c: New file.
15250         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15251         TARGET_MUL_SLOW): Define.
15252         * config/nds32/nds32.md (pipeline_model): New attribute.
15253         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15254         New options that support cpu n9.
15255         * config/nds32/pipelines.md: Include n9 settings.
15256         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15257
15258 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15259
15260         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15261         information if necessary.
15262         (output_cond_branch_compare_zero): Likewise.
15263         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15264         (nds32_target_alignment): Refine for alignment.
15265         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15266         (FUNCTION_BOUNDARY): Modify.
15267         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15268         align case.
15269         * config/nds32/nds32.opt (malways-align, malign-functions): New.
15270
15271 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15272
15273         * config/nds32/constants.md (unspec_volatile_element): Add values for
15274         TLB operation and data prefetch.
15275         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15276         functions for TLB operation and data prefetch.
15277         * config/nds32/nds32-intrinsic.md: Likewise.
15278         * config/nds32/nds32_intrinsic.h: Likewise.
15279         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15280         (nds32_print_operand): Likewise.
15281         * config/nds32/nds32.h (nds32_builtins): Likewise.
15282
15283 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15284         Andrew Pinski <pinsika@gcc.gnu.org>
15285
15286         PR middle-end/82976
15287         * match.pd: Use constant_boolean_node of correct type instead of
15288         boolean_true_node or boolean_false_node for simplifying
15289         pointer comparisons to zero.
15290
15291 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15292
15293         PR tree-optimization/80021
15294         * tree.c (verify_type_variant): Make error call in verify_variant_match
15295         translatable and remove final full stop.
15296
15297 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15298
15299         * config/nds32/constants.md (unspec_volatile_element): Add
15300         UNSPEC_VOLATILE_EH_RETURN.
15301         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15302         nds32_output_stack_pop): Support dwarf exception handling process.
15303         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15304         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15305         exception handling process.
15306         (nds32_compute_stack_frame): Likewise.
15307         (nds32_return_addr_rtx): Likewise.
15308         (nds32_initial_elimination_offset): Likewise.
15309         (nds32_expand_prologue): Likewise.
15310         (nds32_expand_epilogue): Likewise.
15311         (nds32_dynamic_chain_address): New function.
15312         * config/nds32/nds32.h (machine_function): Add fields for dwarf
15313         exception handling.
15314         (DYNAMIC_CHAIN_ADDRESS): Define.
15315         (EH_RETURN_DATA_REGNO): Define.
15316         (EH_RETURN_STACKADJ_RTX): Define.
15317         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15318         patterns for dwarf exception handling.
15319
15320 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15321
15322         * config/nds32/nds32.h: Clean up obsolete macros.
15323
15324 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15325
15326         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15327         Add enum values for particular instructions.
15328         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15329         particular intrinsic functions.
15330         * config/nds32/nds32-intrinsic.md: Likewise.
15331         * config/nds32/nds32_intrinsic.h: Likewise.
15332         * config/nds32/nds32.h (nds32_builtins): Likewise.
15333         * config/nds32/nds32.md (type): Add pbsad and pbsada.
15334         (btst, ave): New patterns for particular instructions.
15335
15336 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15337
15338         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15339         Add enum values for atomic load/store and memory sync.
15340         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15341         and memory sync.
15342         * config/nds32/nds32-intrinsic.md: Likewise.
15343         * config/nds32/nds32_intrinsic.h: Likewise.
15344         * config/nds32/nds32.h (nds32_builtins): Likewise.
15345
15346 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15347
15348         PR tree-optimization/85257
15349         * fold-const.c (native_encode_vector): If not all elts could fit
15350         and off is -1, return 0 rather than offset.
15351         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15352         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15353         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
15354         adjust buffer in native_interpret_expr call.
15355
15356 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15357
15358         * config/nds32/constants.md (unspec_volatile_element): Add cache
15359         control enum values.
15360         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15361         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15362         * config/nds32/nds32.c (nds32_cctl_names): New.
15363         (nds32_print_operand): Handle cache control register names.
15364         * config/nds32/nds32.h (nds32_builtins): New enum values.
15365         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15366         macros.
15367         * config/nds32/nds32.md (type): Add mmu.
15368         * config/nds32/pipelines.md (simple_insn): Add mmu.
15369
15370 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15371
15372         * config/nds32/nds32.md (type): Remove call.
15373         * config/nds32/pipelines.md (simple_insn): Likewise.
15374
15375 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15376
15377         * config/nds32/constants.md (unspec_volatile_element): Add
15378         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15379         UNSPEC_VOLATILE_FMFCFG.
15380         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15381         description for fmfcfg and fmfcsr.
15382         (bdesc_1arg): Add fmtcsr.
15383         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15384         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15385         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15386         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15387         unspec_fmfcfg): New patterns.
15388         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15389         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15390         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15391         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15392         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15393         __nds32__fmfcfg): Define.
15394
15395 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15396
15397         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15398         intrinsic register names.
15399         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15400         intrinsic register enum values and macros.
15401
15402 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15403
15404         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15405         for load/store addressing form.
15406         (nds32_print_operand_address): Likewise.
15407
15408 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
15409
15410         PR target/85196
15411         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15412         based on LABEL_REF.  Remove useless assertion.
15413         (pic_address_needs_scratch): Fix formatting.
15414         (sparc_legitimize_pic_address): Minor tweaks.
15415         (sparc_delegitimize_address): Adjust assertion accordingly.
15416         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15417         into symbolic_operand.
15418         (movsi_high_pic_label_ref): Likewise.
15419         (movsi_lo_sum_pic_label_ref): Likewise.
15420         (movdi_pic_label_ref): Likewise.
15421         (movdi_high_pic_label_ref): Likewise.
15422         (movdi_lo_sum_pic_label_ref): Likewise.
15423
15424 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
15425
15426         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15427         custom LIB_SPEC setup.
15428
15429 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
15430             Kito Cheng  <kito.cheng@gmail.com>
15431
15432         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15433         * config/riscv/freebsd.h: New.
15434
15435 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15436
15437         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15438         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15439         file.
15440
15441 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15442             Kito Cheng  <kito.cheng@gmail.com>
15443
15444         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15445         nds32_output_call, nds32_symbol_binds_local_p): New functions.
15446         * config/nds32/nds32-protos.h (nds32_output_call,
15447         nds32_output_return): Declare.
15448         * config/nds32/nds32.md: Refine all the call and return patterns.
15449
15450 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15451
15452         PR debug/85252
15453         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15454         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15455
15456         PR rtl-optimization/84872
15457         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15458         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15459         EDGE_CROSSING edge.
15460
15461 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
15462
15463         * expr.c (copy_blkmode_to_reg): Revert 254862.
15464         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15465
15466 2018-04-06  Richard Biener  <rguenther@suse.de>
15467
15468         PR middle-end/85244
15469         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15470         after seeing a component reference with an adjacent field.  Treat
15471         refs to arrays at struct end of external decls similar to
15472         refs to unconstrained commons.
15473
15474 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15475
15476         PR sanitizer/85213
15477         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15478         look through SAVE_EXPRs with non-side-effects argument.  Adjust
15479         recursive calls.
15480         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15481         save_p here.
15482
15483 2018-04-06  Richard Biener  <rguenther@suse.de>
15484
15485         PR middle-end/85180
15486         * alias.c (find_base_term): New wrapper around find_base_term
15487         unwinding CSELIB_VAL_PTR changes.
15488         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15489         recursion.
15490
15491 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15492
15493         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15494         instructions.
15495         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15496         constant definitions.
15497         ("nop"): lr 0,0 -> nopr r0
15498         ("nop_lr0", "nop_lr1"): New insn definitions.
15499
15500 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15501
15502         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15503         NDS32_V3PUSH_AVAILABLE_P macro.
15504
15505 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15506             Chung-Ju Wu  <jasonwucj@gmail.com>
15507
15508         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15509         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15510         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15511         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15512         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15513         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15514         * config/nds32/constraints.md: New constraints and checking for hard
15515         float configuration.
15516         * config/nds32/iterators.md: New mode iterator and attribute for hard
15517         float configuration.
15518         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15519         patterns.
15520         * config/nds32/nds32-fpu.md: New file.
15521         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15522         deal with hard float code generation.
15523         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15524         ARCH_V3S.
15525         (abi_type, float_reg_number): New enum type.
15526         * config/nds32/nds32-predicates.c: New predicates for hard float.
15527         * config/nds32/nds32-protos.h: Declare functions for hard float.
15528         * config/nds32/nds32.c: Implementation for hard float configuration.
15529         * config/nds32/nds32.h: Definitions for hard float configuration.
15530         * config/nds32/nds32.md: Include hard float machine description and
15531         modify patterns for hard float configuration.
15532         * config/nds32/nds32.opt: New options for hard float configuration.
15533         * config/nds32/predicates.md: New predicates for hard float
15534         configuration.
15535
15536 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15537
15538         * common/config/nds32/nds32-common.c
15539         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15540
15541 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15542
15543         PR middle-end/85195
15544         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15545         CONSTRUCTOR_ELT (ctor, ...)->value.
15546
15547 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15548
15549         PR target/85193
15550         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15551
15552 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15553
15554         PR target/85204
15555         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15556         cond jump.
15557
15558 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15559             Kito Cheng  <kito.cheng@gmail.com>
15560
15561         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15562         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15563         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15564         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15565
15566 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15567             Kito Cheng  <kito.cheng@gmail.com>
15568
15569         * config/nds32/constraints.md (Ufe): New memory constraint.
15570         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15571         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15572         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15573         operands.
15574         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15575         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15576
15577 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15578
15579         * config/nds32/nds32.md: Use optimize_size in the condition for
15580         alu-shift instructions.
15581
15582 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15583
15584         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15585
15586 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15587
15588         * config/nds32/nds32.md (negsi2): Refine pattern.
15589
15590 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15591             Chung-Ju Wu  <jasonwucj@gmail.com>
15592
15593         * config/nds32/iterators.md (shift_rotate): New code iterator.
15594         (shift): New code attribute.
15595         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15596         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15597         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15598         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15599         bit-wise operations.
15600         (andsi3, *andsi3): Ditto.
15601         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15602         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15603         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15604         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15605         nds32_ior_operand, nds32_xor_operand): New predicates.
15606
15607 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15608
15609         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15610         (addsi3, subsi3): ... this.
15611
15612 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15613
15614         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15615
15616 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15617
15618         * config/nds32/nds32.md: Adjust indention.
15619
15620 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15621
15622         * config/nds32/nds32.md (feature): New attribute.
15623
15624 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15625
15626         * config/nds32/nds32.md (subtype): New attribute.
15627
15628 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15629
15630         PR target/85203
15631         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15632         expansion to perform a bitwise AND of the argument followed by a
15633         boolean negation of the result.
15634
15635 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15636
15637         PR rtl-optimization/84878
15638         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15639         the basic block.  Assert the use reference is not artificial and that
15640         it has an associated insn.
15641
15642 2018-04-04  Michael Matz  <matz@suse.de>
15643
15644         * builtins.c (compute_objsize): Pass correct operand
15645         to array_at_struct_end_p.
15646
15647 2018-04-04  Richard Biener  <rguenther@suse.de>
15648
15649         PR lto/85176
15650         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15651         from contexts for DINFO_LEVEL_TERSE and below.
15652
15653 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15654
15655         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15656         resiter_operand condition.
15657         * config/nds32/nds32.md (*move<mode>): Ditto.
15658
15659 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15660             Monk Chiang  <sh.chiang04@gmail.com>
15661
15662         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15663
15664 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15665
15666         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15667
15668 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15669             Kito Cheng  <kito.cheng@gmail.com>
15670
15671         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15672         nds32_cond_code_str, output_cond_branch,
15673         output_cond_branch_compare_zero, nds32_expand_cbranch,
15674         nds32_expand_cstore, nds32_expand_movcc,
15675         nds32_output_cbranchsi4_equality_zero,
15676         nds32_output_cbranchsi4_equality_reg,
15677         nds32_output_cbranchsi4_equality_reg_or_const_int,
15678         nds32_output_cbranchsi4_greater_less_zero: New functions.
15679         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15680         nds32_expand_cstore, nds32_expand_movcc,
15681         nds32_output_cbranchsi4_equality_zero,
15682         nds32_output_cbranchsi4_equality_reg,
15683         nds32_output_cbranchsi4_equality_reg_or_const_int,
15684         nds32_output_cbranchsi4_greater_less_zero): Declare.
15685         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15686         nds32_rimm11s_operand): New predicates.
15687         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15688         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15689         patterns.
15690
15691 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15692
15693         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15694         * config/nds32/nds32.md: Ditto.
15695         * config/nds32/pipelines.md: Ditto.
15696
15697 2018-04-04  Richard Biener  <rguenther@suse.de>
15698
15699         PR tree-optimization/85168
15700         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15701         propagating abnormals.
15702
15703 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15704
15705         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15706
15707 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15708             Kito Cheng  <kito.cheng@gmail.com>
15709
15710         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15711         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15712         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15713         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15714         * config/nds32/nds32.md (sibcall_internal): New.
15715         (sibcall_register): Remove.
15716         (sibcall_immediate): Remove.
15717         (sibcall_value_internal): New.
15718         (sibcall_value_register): Remove.
15719         (sibcall_value_immediate): Remove.
15720         * config/nds32/predicates.md (nds32_general_register_operand): New.
15721         (nds32_call_address_operand): New.
15722
15723 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15724
15725         PR rtl-optimization/85167
15726         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15727         bb_defs if *split_p, instead preinitialize it to NULL.
15728
15729         PR tree-optimization/85156
15730         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15731         evaluating the argument multiple times.
15732
15733 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15734
15735         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15736         than vector.
15737         (_mm_cvtpd_ps): Likewise.
15738         (_mm_cvttpd_epi32): Likewise.
15739         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15740         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15741         vector, pixel, and bool following altivec.h include.
15742
15743 2018-04-03  Martin Sebor  <msebor@redhat.com>
15744
15745         * doc/extend.texi (Common Function Attributes): Clarify.
15746         (const attribute): Likewise.
15747         (pure attribute): Likewise.
15748
15749 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15750
15751         PR target/85169
15752         * config/i386/i386.c (ix86_expand_vector_set): Use
15753         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15754
15755 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15756
15757         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15758         instructions when changing rounding bits to preserve precision bits
15759         in the x87 control word.
15760
15761 2018-04-03  Martin Liska  <mliska@suse.cz>
15762
15763         PR tree-optimization/82491
15764         * rtl.h (strip_offset_and_add): Replace += suboffset with
15765         poly_uint64 () + suboffset.
15766
15767 2018-03-29  Martin Liska  <mliska@suse.cz>
15768             Martin Jambor  <mjambor@suse.cz>
15769
15770         PR ipa/84947
15771         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15772         param_type is not an integral or pointer type.
15773
15774 2018-04-03  Richard Biener  <rguenther@suse.de>
15775
15776         * sese.h (recompute_all_dominators): Remove.
15777
15778 2018-04-02  Martin Sebor  <msebor@redhat.com>
15779
15780         * doc/invoke.texi (-Wrestrict): Fix typos.
15781
15782 2018-04-02  Jim Wilson  <jimw@sifive.com>
15783
15784         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15785         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15786         (<optab>di3, <optab>si3_extend): Likewise.
15787         (<optab>si3_mask, <optab>si3_mask_1): New.
15788         (<optab>di3_mask, <optab>di3_mask_1): New.
15789         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15790         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15791         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15792
15793 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15794
15795         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15796         example.
15797
15798 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15799
15800         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15801         (nds32_canonicalize_comparison): New function.
15802
15803 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15804             Kito Cheng  <kito.cheng@gmail.com>
15805             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15806
15807         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15808         * config/nds32/constants.md (unspec_volatile_element): Add
15809         UNSPEC_VOLATILE_RELAX_GROUP.
15810         * config/nds32/nds32-relax-opt.c: New file.
15811         * config/nds32/nds32-predicates.c
15812         (nds32_symbol_load_store_p): New function.
15813         * config/nds32/nds32-protos.h
15814         (nds32_symbol_load_store_p): Declare function.
15815         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15816         * config/nds32/nds32.c
15817         (nds32_register_pass): New function to register pass.
15818         (nds32_register_passes): New function to register passes.
15819         * config/nds32/nds32.md (relax_group): New pattern.
15820         * config/nds32/nds32.opt (mrelax-hint): New option.
15821         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15822
15823 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15824
15825         * config/nds32/t-nds32: Modify files dependency.
15826
15827 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15828
15829         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15830         (PROFILE_HOOK): Define its implementation.
15831
15832 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15833
15834         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15835         type and 32-bit size.
15836
15837 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15838
15839         PR middle-end/85090
15840         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15841         (V_128_256): New mode iterator.
15842         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15843         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15844         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15845         of V.
15846         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15847         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15848
15849 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15850
15851         PR target/83315
15852         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15853         NaN inputs correctly.
15854
15855 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15856
15857         PR target/80546
15858         * config/rs6000/vsx.md (??r): New mode attribute.
15859         (*vsx_mov<mode>_64bit): Use it.
15860         (*vsx_mov<mode>_32bit): Likewise.
15861
15862 2018-03-30  Martin Sebor  <msebor@redhat.com>
15863
15864         PR tree-optimization/84818
15865         * builtins.c (check_access): Use warning_n.
15866
15867 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15868
15869         PR target/83822
15870         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15871         condition.
15872         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15873         condition.
15874
15875 2018-03-30  Julia Koval  <julia.koval@intel.com>
15876
15877         PR target/84413
15878         * x86-tune.def (movx, partial_reg_dependency): Enable for
15879         m_SKYLAKE_AVX512.
15880
15881 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15882
15883         PR inline-asm/84985
15884         * lra-constraints.c (process_alt_operands): Move setting
15885         this_alternative_matches below.
15886
15887 2018-03-29  Martin Liska  <mliska@suse.cz>
15888
15889         PR lto/84995.
15890         * doc/invoke.texi: Document how LTO works with debug info.
15891         Describe auto-load support of binutils.  Mention 'x86-64'
15892         as valid option value of -march option.
15893
15894 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15895
15896         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15897
15898         PR c/85094
15899         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15900         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15901         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15902         checking.
15903
15904 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15905
15906         PR target/84912
15907         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15908         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15909         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15910         for RS6000_BTM_POWERPC64.
15911         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15912         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15913         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15914         definition.
15915         (DIVDE): Use it.
15916         (DIVDEU): Likewise.
15917
15918 2018-03-28  Carl Love  <cel@us.ibm.com>
15919
15920         Revert
15921         2017-09-27  Carl Love  <cel@us.ibm.com>
15922
15923         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15924         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15925         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15926         fctiw instruction.
15927
15928 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15929
15930         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15931         instead of __vector bool.
15932         (_mm_max_pu8): Likewise.
15933         (_mm_min_pi16): Likewise.
15934
15935 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15936
15937         PR target/84912
15938         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15939         (DIVWEUO): Likewise.
15940         (DIVDEO): Likewise.
15941         (DIVDEUO): Likewise.
15942         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15943         DIVWEUO and DIVDEUO.
15944         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15945         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15946         (div_extend): Likewise.
15947         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15948         builtin function.
15949         (__builtin_divweuo): Likewise.
15950         (__builtin_divdeo): Likewise.
15951         (__builtin_divdeuo): Likewise.
15952
15953 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15954
15955         PR target/85095
15956         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15957         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15958
15959         PR tree-optimization/82004
15960         * gimple-match-head.c (optimize_pow_to_exp): New function.
15961         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15962         Don't fold to exp if optimize_pow_to_exp is false.
15963
15964 2018-03-28  Martin Liska  <mliska@suse.cz>
15965
15966         PR other/84819
15967         * calls.c (initialize_argument_information): Fix trailing space.
15968         * common.opt: Fix typo and provide better explanation for
15969         -fsanitize-coverage option.
15970         * config/i386/i386.opt: Fix typo.
15971
15972 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15973             Martin Liska  <mliska@suse.cz>
15974
15975         PR sanitizer/85081
15976         * gimplify.c (asan_poison_variable): Don't do the check for
15977         gimplify_omp_ctxp here.
15978         (gimplify_decl_expr): Do it here.
15979         (gimplify_target_expr): Likewise.
15980
15981 2018-03-28  Martin Liska  <mliska@suse.cz>
15982
15983         PR target/84988
15984         * config/i386/i386.c (ix86_function_arg_advance): Do not call
15985         chkp_type_bounds_count if MPX is not enabled.
15986
15987 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15988
15989         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15990
15991 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
15992
15993         PR target/84914
15994         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15995         function to create the function decl for complex long double
15996         multiply and divide for -mabi=ieeelongdouble.
15997         (init_float128_ieee): Call it.
15998
15999 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
16000
16001         PR target/85044
16002         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16003         -fcf-protection=branch -mibt.
16004         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16005
16006 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16007
16008         PR target/81863
16009         * config/arm/arm.c (arm_valid_symbolic_address): Handle
16010         arm_word_relocations.
16011
16012 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
16013
16014         PR target/85056
16015         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16016         extern array declarations.
16017
16018 2018-03-27  Richard Biener  <rguenther@suse.de>
16019
16020         PR middle-end/84067
16021         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16022         explicit single_use checks.
16023
16024 2018-03-27  Richard Biener  <rguenther@suse.de>
16025
16026         PR tree-optimization/85082
16027         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16028         Valueize the VUSE.
16029
16030 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16031
16032         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16033         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16034         Turn on fasynchronous-unwind-tables and funwind-tables.
16035
16036 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
16037
16038         PR target/85073
16039         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16040         (*bmi_blsr_<mode>_ccz): Ditto.
16041
16042 2018-03-26  Tom de Vries  <tom@codesourcery.com>
16043
16044         PR tree-optimization/85063
16045         * omp-general.c (offloading_function_p): New function.  Factor out
16046         of ...
16047         * omp-offload.c (pass_omp_target_link::gate): ... here.
16048         * omp-general.h (offloading_function_p): Declare.
16049         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16050         with attribute omp declare target for offloading functions.
16051
16052 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
16053
16054         PR tree-optimization/84005
16055         * tree-data-ref.h (get_base_for_alignment): Declare.
16056         * tree-data-ref.c (get_base_for_alignment_1): New function.
16057         (get_base_for_alignment): Likewise.
16058         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16059         get_base_for_alignment to find a suitable base object, instead
16060         of always using drb->base_address.
16061
16062 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16063
16064         PR inline-asm/85022
16065         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16066         known size by default.
16067
16068 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
16069
16070         PR inline-asm/85030
16071         * lra-constraints.c (process_alt_operands): Don't match BLKmode
16072         and non BLKmode operands.
16073
16074 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16075
16076         PR target/85026
16077         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16078         Clean up attributes.
16079
16080 2018-03-23  Richard Biener  <rguenther@suse.de>
16081
16082         PR debug/85020
16083         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16084         we are going to emit early debug for LTO.
16085
16086 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16087
16088         PR inline-asm/85034
16089         * function.c (match_asm_constraints_1): Don't optimize if input
16090         doesn't satisfy general_operand predicate for output's mode.
16091
16092         PR inline-asm/85022
16093         * alias.c (write_dependence_p): Don't require for x_canonicalized
16094         non-VOIDmode if x has VOIDmode.
16095
16096         PR sanitizer/85029
16097         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16098         just don't try to optimize it rather than assert it never happens.
16099
16100 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16101
16102         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16103         macro expansions for definition of ST_INTERNAL_<mode> and
16104         LD_INTERNAL_<mode> builtins.
16105         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16106         Remove prototype.
16107         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16108         function.
16109         (altivec_expand_st_builtin): Likewise.
16110         (altivec_expand_builtin): Remove calls to deleted functions.
16111         (rs6000_address_for_altivec): Delete this function.
16112         * config/rs6000/vector.md: Remove expands for
16113         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16114
16115 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
16116
16117         PR target/84826
16118         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16119         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16120         re-computing once computed.
16121         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16122         (arm_init_machine_status): Initialize
16123         machine->static_chain_stack_bytes.
16124
16125 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16126
16127         PR target/84760
16128         * doc/extend.texi: Add four new prototypes for vec_ld.
16129         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16130         definitions for more logical presentation.
16131         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16132         entries for V1TI variants of __builtin_altivec_ld builtin.
16133         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16134         handling of V1TI variant of LVX icode pattern.
16135         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16136         (rs6000_gimple_fold_builtin): Likewise.
16137         (altivec_init_builtins): Add code to define
16138         __builtin_altivec_lvx_v1ti function.
16139
16140 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16141
16142         PR inline-asm/84941
16143         * function.c (match_asm_constraints_1): Don't do the optimization
16144         if input isn't a REG, SUBREG, MEM or constant.
16145
16146 2018-03-22  Tom de Vries  <tom@codesourcery.com>
16147
16148         PR tree-optimization/84956
16149         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16150         bb_has_abnormal_pred.
16151
16152 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16153
16154         PR sanitizer/85018
16155         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16156         DECL_INITIAL (decl) to decl at the end.
16157         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16158         adjust the comment.
16159
16160 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
16161
16162         * doc/extend.texi (__builtin_tgmath): Document when complex
16163         integer types are treated as _Complex _Float64.
16164
16165 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16166
16167         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16168
16169 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16170
16171         PR tree-optimization/84960
16172         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16173         if it is ENTRY block, move them into single succ of ENTRY in that case.
16174
16175 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
16176
16177         PR tree-optimization/84811
16178         * poly-int.h (poly_span_traits): Remove the T3 parameter and
16179         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16180         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16181         (known_subrange_p): Update accordingly.  Cast each value involved
16182         in the size comparison, rather than casting the result of the
16183         subtraction.
16184
16185 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16186
16187         PR tree-optimization/84982
16188         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16189         by flipping the least significant bit rather than all bits from
16190         bitpos to bitpos + bitsize - 1.
16191
16192 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16193
16194         * doc/extend.texi (Deprecated Features): Remove mention of
16195         long-deleted deprecations.
16196
16197 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16198
16199         PR jit/84288
16200         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16201         * configure: Regenerate.
16202
16203 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16204
16205         PR tree-optimization/83126
16206         * tree-parloops.c (num_phis): New function.
16207         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16208
16209 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16210
16211         * doc/extend.texi (Deprecated Features): Update deprecated flags,
16212         mention anon-struct/union members and trailing attributes.
16213
16214 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
16215
16216         PR tree-optimization/84969
16217         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16218         builtin memset partitions if they set different rhs values.
16219
16220 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16221
16222         PR rtl-optimization/84989
16223         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16224         VEC_DUPLICATE with scalar result mode.
16225
16226 2018-03-21  Martin Liska  <mliska@suse.cz>
16227
16228         PR ipa/84963
16229         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16230         not intended return statement.
16231
16232 2018-03-21  Martin Liska  <mliska@suse.cz>
16233
16234         PR target/84988
16235         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16236         (chkp_find_bound_slots_1): Limit number of iterations.
16237
16238 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
16239
16240         PR target/84838
16241         * Minor grammar fixes for x86 options.
16242
16243 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16244
16245         PR debug/84875
16246         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16247         holding REG_CFA_RESTORE notes, instead turn them into a USE.
16248
16249 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
16250
16251         PR target/83789
16252         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16253         (altivec_lvx_<mode>_1op): Likewise.
16254         (altivec_stvx_<mode>_2op): Likewise.
16255         (altivec_stvx_<mode>_1op): Likewise.
16256         (altivec_lvx_<VM2:mode>): New define_expand.
16257         (altivec_stvx_<VM2:mode>): Likewise.
16258         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16259         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16260         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16261         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16262         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16263         (rs6000_gen_lvx): Likewise.
16264         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16265         (altivec_expand_stv_builtin): Likewise.
16266         (altivec_expand_builtin): Likewise.
16267         * config/rs6000/vector.md: Likewise.
16268
16269 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16270
16271         PR target/82518
16272         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16273         BYTES_BIG_ENDIAN.
16274
16275 2018-03-20  Richard Biener  <rguenther@suse.de>
16276
16277         PR target/84986
16278         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16279         sign-conversions as zero, fall back to standard scalar_stmt
16280         cost for the rest.
16281
16282 2018-03-20  Martin Liska  <mliska@suse.cz>
16283
16284         PR ipa/84825
16285         * predict.c (rebuild_frequencies): Handle case when we have
16286         PROFILE_ABSENT, but flag_guess_branch_prob is false.
16287
16288 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16289
16290         PR target/84990
16291         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16292         flag_section_anchors.
16293         * varasm.c (use_blocks_for_decl_p): Remove hack for
16294         dw2_force_const_mem.
16295
16296         PR target/84845
16297         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16298         to ...
16299         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
16300         be created, use lowpart_subreg of operands[0] rather than operands[0]
16301         itself.
16302         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16303         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16304         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16305         and n constraint instead of aarch64_shift_imm_di and Usd.
16306         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16307         (*aarch64_<optab>_reg_minus<mode>3): ... this.
16308
16309 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
16310
16311         PR target/82989
16312         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16313         to favor GPR over NEON registers.
16314         (<shift>di3_neon): Likewise.
16315
16316 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16317
16318         PR target/84952
16319         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16320         (nvptx_process_pars): Emit bar.sync asap and alap.
16321
16322 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16323
16324         PR target/84954
16325         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16326         seen_label if seen_label is already set.
16327
16328 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16329
16330         PR target/84945
16331         * config/i386/i386.c (fold_builtin_cpu): For features above 31
16332         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16333         Use 1U instead of 1.  Formatting fixes.
16334
16335         PR c/84953
16336         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16337         instead of TREE_TYPE (s1) for the return value.
16338
16339 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
16340
16341         PR tree-optimization/84946
16342         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16343         bitsize + bitsize in poly_uint64 rather than poly_int64.
16344
16345         PR sanitizer/78651
16346         * dwarf2asm.c: Include fold-const.c.
16347         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16348         of decl rather than decl itself.
16349
16350         PR rtl-optimization/84643
16351         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16352
16353 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
16354
16355         PR sanitizer/78651
16356         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16357         calling assemble_variable.
16358
16359 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
16360
16361         PR target/81647
16362         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16363         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16364
16365 2018-03-19  Jim Wilson  <jimw@sifive.com>
16366
16367         PR bootstrap/84856
16368         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16369         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16370         (riscv_first_stack_step): Likewise.
16371         (riscv_option_override): Use STACK_BOUNDARY instead of
16372         MIN_STACK_BOUNDARY.
16373         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16374         MIN_STACK_BOUNDARY.
16375         (BIGGEST_ALIGNMENT): Set to 128.
16376         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16377         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16378         STACK_BOUNDARY.
16379
16380 2018-03-19  Richard Biener  <rguenther@suse.de>
16381
16382         PR tree-optimization/84933
16383         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16384         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16385
16386 2018-03-19  Richard Biener  <rguenther@suse.de>
16387
16388         PR tree-optimization/84859
16389         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16390         (cond_if_else_store_replacement): Perform sinking operation on
16391         single-store BBs regardless of MAX_STORES_TO_SINK setting.
16392         Generalize what a BB with a single eligible store is.
16393
16394 2018-03-19  Richard Biener  <rguenther@suse.de>
16395
16396         PR tree-optimization/84929
16397         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16398         chrec_is_positive against non-chrec arg.
16399
16400 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
16401
16402         PR target/84711
16403         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16404
16405 2018-03-18  Martin Liska  <mliska@suse.cz>
16406
16407         PR rtl-optimization/84635
16408         * regrename.c (build_def_use): Use matches_mode only when
16409         matches >= 0.
16410
16411 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
16412
16413         PR tree-optimization/84913
16414         * tree-vect-loop.c (vectorizable_reduction): Don't try to
16415         vectorize chains of COND_EXPRs.
16416
16417 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16418
16419         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16420
16421 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16422
16423         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16424
16425 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16426
16427         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16428
16429 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16430             Kito Cheng  <kito.cheng@gmail.com>
16431
16432         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16433         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16434         (nds32_adjust_reg_alloc_order): New function.
16435         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16436
16437 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
16438
16439         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16440         nds32_print_operand, nds32_print_operand_address): Use
16441         HOST_WIDE_INT_PRINT_DEC instead.
16442
16443 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16444
16445         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16446
16447 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
16448
16449         PR target/84902
16450         * config/i386/i386.c (initial_ix86_tune_features,
16451         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16452         unsigned long long.
16453         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16454         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16455         rather than 1u << ix86_tune.  Formatting fix.
16456         (ix86_option_override_internal): Change ix86_arch_mask from
16457         unsigned int to unsigned HOST_WIDE_INT, initialize to
16458         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16459         (ix86_function_specific_restore): Likewise.
16460
16461 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16462
16463         PR target/84899
16464         * postreload.c (reload_combine_recognize_pattern): Perform
16465         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16466         truncate_int_for_mode the result for the destination's mode.
16467
16468         PR c/84909
16469         * hsa-gen.c (mem_type_for_type): Fix comment typo.
16470         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16471         Likewise.
16472         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16473         Likewise.
16474
16475 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
16476
16477         PR target/84876
16478         * lra-assigns.c (lra_split_hard_reg_for): Don't use
16479         regno_allocno_class_array and sorted_pseudos.
16480         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16481         insns where regno is used.
16482
16483 2018-03-16  Martin Liska  <mliska@suse.cz>
16484
16485         PR ipa/84833
16486         * multiple_target.c (create_dispatcher_calls): Redirect
16487         reference in the symbol table.
16488
16489 2018-03-16  Martin Liska  <mliska@suse.cz>
16490
16491         PR ipa/84722
16492         * multiple_target.c (create_dispatcher_calls): Redirect also
16493         an alias.
16494
16495 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16496
16497         PR c++/79937
16498         PR c++/82410
16499         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16500         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16501         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16502
16503 2018-03-16  Julia Koval  <julia.koval@intel.com>
16504
16505         * doc/invoke.texi (Skylake Server): Add CLWB.
16506         Cannonlake): Remove CLWB.
16507
16508 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16509
16510         PR tree-optimization/84841
16511         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16512         1 << 3.
16513         (FLOAT_ONE_CONST_TYPE): Define.
16514         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16515         (sort_by_operand_rank): Put entries with higher constant_type last
16516         rather than first to match comments.
16517
16518 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16519
16520         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16521         split predicate.
16522
16523 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16524
16525         PR c++/79085
16526         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16527         check and use address of target always.
16528
16529 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16530
16531         PR target/84574
16532         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16533         (indirect_thunk_bnd_needed): Likewise.
16534         (indirect_thunks_used): Likewise.
16535         (indirect_thunks_bnd_used): Likewise.
16536         (indirect_return_needed): New.
16537         (indirect_return_bnd_needed): Likewise.
16538         (output_indirect_thunk_function): Add a bool argument for
16539         function return.
16540         (output_indirect_thunk_function): Don't generate alias for
16541         function return thunk.
16542         (ix86_code_end): Call output_indirect_thunk_function to generate
16543         function return thunks.
16544         (ix86_output_function_return): Set indirect_return_bnd_needed
16545         and indirect_return_needed instead of indirect_thunk_bnd_needed
16546         and indirect_thunk_needed.
16547
16548 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16549
16550         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16551         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16552         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16553
16554 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16555             Paul Hua <paul.hua.gm@gmail.com>
16556
16557         PR c/84852
16558         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16559
16560 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16561
16562         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16563         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16564         resp. SFmode cases.
16565
16566 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16567
16568         PR target/84711
16569         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16570         instead of GET_MODE_SIZE when comparing Units.
16571
16572 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16573
16574         PR target/68256
16575         * varasm.c (hash_section): Return an unchangeble hash value
16576         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16577         Return !aarch64_can_use_per_function_literal_pools_p ().
16578
16579 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16580
16581         PR target/84860
16582         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16583         rather than address of cmode as last argument to prepare_cmp_insn.
16584
16585 2018-03-15  Julia Koval  <julia.koval@intel.com>
16586
16587         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16588         F_AVX512VNNI, F_AVX512BITALG): New.
16589
16590 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16591
16592         PR target/83451
16593         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16594         insn for floating-point loads and stores.
16595
16596 2018-03-14  Carl Love  <cel@us.ibm.com>
16597
16598         * config/rs6000/rs6000-c.c: Add macro definitions for
16599         ALTIVEC_BUILTIN_VEC_PERMXOR.
16600         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16601         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16602         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16603         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16604         UNSPEC_VPERMXOR.
16605         * config/doc/extend.texi: Add prototypes for vec_permxor.
16606
16607 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16608
16609         PR c/84852
16610         * diagnostic-show-locus.c (class layout_point): Convert m_line
16611         from int to linenum_type.
16612         (line_span::comparator): Use linenum "compare" function when
16613         comparing line numbers.
16614         (test_line_span): New function.
16615         (layout_range::contains_point): Convert param "row" from int to
16616         linenum_type.
16617         (layout_range::intersects_line_p): Likewise.
16618         (layout::will_show_line_p): Likewise.
16619         (layout::print_source_line): Likewise.
16620         (layout::should_print_annotation_line_p): Likewise.
16621         (layout::print_annotation_line): Likewise.
16622         (layout::print_leading_fixits): Likewise.
16623         (layout::annotation_line_showed_range_p): Likewise.
16624         (struct line_corrections): Likewise for field m_row.
16625         (line_corrections::line_corrections): Likewise for param "row".
16626         (layout::print_trailing_fixits): Likewise.
16627         (layout::get_state_at_point): Likewise.
16628         (layout::get_x_bound_for_row): Likewise.
16629         (layout::print_line): Likewise.
16630         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16631         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16632         * input.c (selftest::test_linenum_comparisons): New function.
16633         (selftest::input_c_tests): Call it.
16634         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16635         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16636         * selftest.h (ASSERT_GT): New macro.
16637         (ASSERT_GT_AT): New macro.
16638         (ASSERT_LT): New macro.
16639         (ASSERT_LT_AT): New macro.
16640
16641 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16642
16643         PR rtl-optimization/84780
16644         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16645
16646 2018-03-14  Martin Liska  <mliska@suse.cz>
16647
16648         * tree.c (record_node_allocation_statistics): Use
16649         get_stats_node_kind.
16650         (get_stats_node_kind): New function extracted from
16651         record_node_allocation_statistics.
16652         (free_node): Use get_stats_node_kind.
16653
16654 2018-03-14  Richard Biener  <rguenther@suse.de>
16655
16656         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16657         that the value-set of ANTIC_IN doesn't grow.
16658
16659         Revert
16660         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16661         member.
16662         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16663         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16664
16665 2018-03-14  Julia Koval  <julia.koval@intel.com>
16666
16667         * config.gcc (icelake-client, icelake-server): New.
16668         (icelake): Remove.
16669         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16670         (initial_ix86_arch_features): Ditto.
16671         (PTA_SKYLAKE): Add SGX.
16672         (PTA_ICELAKE): Remove.
16673         (PTA_ICELAKE_CLIENT): New.
16674         (PTA_ICELAKE_SERVER): New.
16675         (ix86_option_override_internal): Split up icelake on icelake client and
16676         icelake server.
16677         (get_builtin_code_for_version): Ditto.
16678         (fold_builtin_cpu): Ditto.
16679         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16680         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16681         * config/i386/i386.h (processor_type): Ditto.
16682         * doc/invoke.texi: Ditto.
16683
16684 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16685
16686         PR sanitizer/83392
16687         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16688         INTEGER_CST offset, add it together with bitpos / 8 and
16689         sign extend based on POINTER_SIZE.
16690
16691         PR target/84844
16692         Revert
16693         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16694
16695         PR target/78090
16696         * config/i386/constraints.md (Yc): New register constraint.
16697         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16698         Use Yc constraint for alternative 2 of operand 0.  Remove
16699         preferred_for_speed attribute.
16700
16701 2018-03-14  Richard Biener  <rguenther@suse.de>
16702
16703         PR tree-optimization/84830
16704         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16705         with the old one to avoid oscillations.
16706
16707 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16708
16709         PR target/83712
16710         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16711         pseudos.
16712         (assign_by_spills): Return a flag of reload assignment failure.
16713         Do not process the reload assignment failures.  Do not spill other
16714         reload pseudos if they has the same reg class.  Update n if
16715         necessary.
16716         (lra_assign): Add a return arg.  Set up from the result of
16717         assign_by_spills call.
16718         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16719         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16720         usage_insns if it is not NULL.
16721         (spill_hard_reg_in_range): New function.
16722         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16723         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16724         function prototypes.
16725         (lra_assign): Change prototype.
16726         * lra.c (lra): Add code to deal with fails by splitting hard reg
16727         live ranges.
16728
16729 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16730
16731         * config/riscv/riscv.opt (mrelax): New option.
16732         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16733         "norelax" when riscv_mrelax is disabled.
16734         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16735
16736 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16737
16738         PR target/84743
16739         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16740         reassociation for int modes.
16741
16742 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16743
16744         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16745         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16746         for big-endian.
16747         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16748         * config/aarch64/aarch64-sve.md
16749         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16750         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16751         (*extend<mode><Vwide>2): Rename to...
16752         (aarch64_sve_extend<mode><Vwide>2): ...this.
16753         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16754         renaming the old pattern to...
16755         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16756         unsigned packs.
16757         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16758         define_expand, renaming the old pattern to...
16759         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16760         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16761         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16762         account when deciding which SVE instruction the optab should use.
16763         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16764
16765 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16766
16767         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16768         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16769         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16770         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16771         (tlsdesc_small_<mode>): Turn a define_expand and use
16772         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16773         (tlsdesc_small_advsimd_<mode>): ...this.
16774         (tlsdesc_small_sve_<mode>): New pattern.
16775
16776 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16777
16778         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16779         (UNSPEC_UMUL_HIGHPART): New constants.
16780         (MUL_HIGHPART): New int iteraor.
16781         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16782         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16783         define_expand.
16784         (*<su>mul<mode>3_highpart): New define_insn.
16785
16786 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16787
16788         PR lto/84805
16789         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16790         incomplete types.
16791
16792 2018-03-13  Martin Liska  <mliska@suse.cz>
16793
16794         PR ipa/84658.
16795         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16796         vector.
16797         (sem_item_optimizer::~sem_item_optimizer): Release it.
16798         (sem_item_optimizer::merge_classes): Register variable aliases.
16799         (sem_item_optimizer::fixup_pt_set): New function.
16800         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16801         * ipa-icf.h: Declare new variables and functions.
16802
16803 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16804
16805         PR middle-end/84834
16806         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16807         integer_pow2p@2 and test integer_pow2p in condition.
16808         (A < 0 ? C : 0): Similarly for @1.
16809
16810         PR middle-end/84831
16811         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16812         characters starting at p contain '\0' character, don't look beyond
16813         that.
16814
16815         PR target/84827
16816         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16817         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16818
16819         PR target/84828
16820         * reg-stack.c (change_stack): Change update_end var from int to
16821         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16822         also call set_block_for_insn on the newly added insns and rescan.
16823
16824         PR target/84786
16825         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16826         on the last operand.
16827
16828         PR c++/84704
16829         * tree.c (stabilize_reference_1): Return save_expr (e) for
16830         STATEMENT_LIST even if it doesn't have side-effects.
16831
16832 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16833
16834         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16835
16836 2018-03-12  Renlin Li  <renlin.li@arm.com>
16837
16838         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16839         aarch64_output_scalar_simd_mov_immediate.
16840
16841 2018-03-12  Martin Sebor  <msebor@redhat.com>
16842
16843         PR tree-optimization/83456
16844         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16845         for perfectly overlapping calls to memcpy.
16846         (gimple_fold_builtin_memory_chk): Same.
16847         (gimple_fold_builtin_strcpy): Handle no-warning.
16848         (gimple_fold_builtin_stxcpy_chk): Same.
16849         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16850
16851 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16852
16853         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16854         parameter.  Use it for SFmode.
16855         (rs6000_function_arg_advance_1): Adjust.
16856         (rs6000_function_arg): Adjust.
16857         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16858
16859 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16860
16861         PR rtl-optimization/84169
16862         PR rtl-optimization/84780
16863         * combine.c (can_combine_p): Check for a 2-insn combination whether
16864         the destination register is used between the two insns, too.
16865
16866 2018-03-12  Richard Biener  <rguenther@suse.de>
16867
16868         PR tree-optimization/84803
16869         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16870         for refs DR analysis didn't process.
16871
16872 2018-03-12  Richard Biener  <rguenther@suse.de>
16873
16874         PR tree-optimization/84777
16875         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16876         force-vectorize loops ignore whether we are optimizing for size.
16877
16878 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16879
16880         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16881         (TARGET_MD_ASM_ADJUST): Define.
16882
16883 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16884             Kito Cheng  <kito.cheng@gmail.com>
16885             Chung-Ju Wu  <jasonwucj@gmail.com>
16886
16887         * config/nds32/nds32.c (nds32_compute_stack_frame,
16888         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16889         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16890         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16891         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16892         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16893         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16894         * config/nds32/nds32.md (prologue, epilogue): Use macro
16895         NDS32_V3PUSH_AVAILABLE_P to do checking.
16896
16897 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16898
16899         PR debug/58150
16900         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16901         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16902         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16903         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16904         addition of most attributes on !orig_type_die or the attribute not
16905         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16906
16907 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16908             Chung-Ju Wu  <jasonwucj@gmail.com>
16909
16910         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16911         __NDS32_VH__ macro.
16912         * config/nds32/nds32.opt (mvh): New option.
16913
16914 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16915             Chung-Ju Wu  <jasonwucj@gmail.com>
16916
16917         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16918         function.
16919         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16920         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16921         definition.
16922
16923 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16924             Chung-Ju Wu  <jasonwucj@gmail.com>
16925
16926         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16927         function.
16928         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16929         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16930
16931 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16932             Kito Cheng  <kito.cheng@gmail.com>
16933             Chung-Ju Wu  <jasonwucj@gmail.com>
16934
16935         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16936         UNSPEC_FFMISM and UNSPEC_FLMISM.
16937         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16938         for ffb, ffmism and flmism.
16939         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16940         (unspec_ffmism): Ditto.
16941         (unspec_flmism): Ditto.
16942         (nds32_expand_builtin_impl): Check if string extension is available.
16943         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16944         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16945
16946 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
16947
16948         Reverting patch:
16949         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16950
16951         PR target/83712
16952         * lra-assigns.c (assign_by_spills): Return a flag of reload
16953         assignment failure.  Do not process the reload assignment
16954         failures.  Do not spill other reload pseudos if they has the same
16955         reg class.
16956         (lra_assign): Add a return arg.  Set up from the result of
16957         assign_by_spills call.
16958         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16959         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16960         usage_insns if it is not NULL.
16961         (spill_hard_reg_in_range): New function.
16962         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16963         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16964         function prototypes.
16965         (lra_assign): Change prototype.
16966         * lra.c (lra): Add code to deal with fails by splitting hard reg
16967         live ranges.
16968
16969 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
16970
16971         PR target/84807
16972         * config/i386/i386.opt: Replace Enforcment with Enforcement.
16973
16974 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
16975
16976         PR debug/84620
16977         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16978         (dw_val_node): Add val_symbolic_view.
16979         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16980         (symview_upper_bound): New.
16981         (new_line_info_table): Initialize symviews_since_reset.
16982         (dwarf2out_source_line): Count symviews_since_reset and set
16983         symview_upper_bound.
16984         (dw_val_equal_p): Handle symview.
16985         (add_AT_symview): New.
16986         (print_dw_val): Handle symview.
16987         (attr_checksum, attr_checksum_ordered): Likewise.
16988         (same_dw_val_p, size_of_die): Likewise.
16989         (value_format, output_die): Likewise.
16990         (add_high_low_attributes): Use add_AT_symview for entry_view.
16991         (dwarf2out_finish): Reset symview_upper_bound, clear
16992         zero_view_p.
16993
16994 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
16995
16996         PR target/83969
16997         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16998         Add strict argument and use it.
16999         (rs6000_split_multireg_move): Update for new strict argument.
17000         (mem_operand_gpr): Disallow all non-offsettable addresses.
17001         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17002
17003 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
17004
17005         PR target/84772
17006         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17007         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17008         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17009
17010         PR c++/84767
17011         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17012         decl, use remap_type if we want to use the type.
17013
17014 2018-03-09  Martin Sebor  <msebor@redhat.com>
17015
17016         PR tree-optimization/84526
17017         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17018         Remove dead code.
17019         (builtin_access::generic_overlap): Be prepared to handle non-array
17020         base objects.
17021
17022 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
17023
17024         PR rtl-optimization/84682
17025         * lra-constraints.c (process_address_1): Check is_address flag
17026         for address constraints.
17027         (process_alt_operands): Likewise.
17028         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17029         preprocess_constraints.
17030         * recog.h (preprocess_constraints): Add oploc parameter.
17031         Adjust callers.
17032         * recog.c (preprocess_constraints): Test address_operand for
17033         CT_ADDRESS constraints.
17034
17035 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17036
17037         PR target/83712
17038         * lra-assigns.c (assign_by_spills): Return a flag of reload
17039         assignment failure.  Do not process the reload assignment
17040         failures.  Do not spill other reload pseudos if they has the same
17041         reg class.
17042         (lra_assign): Add a return arg.  Set up from the result of
17043         assign_by_spills call.
17044         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17045         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17046         usage_insns if it is not NULL.
17047         (spill_hard_reg_in_range): New function.
17048         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17049         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17050         function prototypes.
17051         (lra_assign): Change prototype.
17052         * lra.c (lra): Add code to deal with fails by splitting hard reg
17053         live ranges.
17054
17055 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17056
17057         PR target/83193
17058         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17059         Accept complain bool parameter.  Only emit errors if it is true.
17060         (arm_parse_cpu_option_name): Likewise.
17061         (arm_target_thumb_only): Adjust callers of the above.
17062         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17063         prototype to take a default true bool parameter.
17064         (arm_parse_arch_option_name): Likewise.
17065
17066 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
17067             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
17068
17069         PR jit/64089
17070         PR jit/84288
17071         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17072         * configure: Regenerate.
17073         * configure.ac ("linker --version-script option"): New.
17074         ("linker soname option"): New.
17075
17076 2018-03-09  Richard Biener  <rguenther@suse.de>
17077
17078         PR tree-optimization/84775
17079         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17080         immediate uses of predicate stmts and mark them modified.
17081
17082         Revert
17083         PR tree-optimization/84178
17084         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17085         to caller.
17086         (version_loop_for_if_conversion): Delay update_ssa call.
17087         (tree_if_conversion): Delay update_ssa until after predicate
17088         insertion.
17089
17090 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17091
17092         PR target/84763
17093         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17094         when the function accesses prior frames.
17095
17096 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17097
17098         PR debug/84456
17099         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17100         gen_llsym, otherwise call maybe_gen_llsym.
17101
17102         PR inline-asm/84742
17103         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17104         has ',' character inside of it.
17105
17106 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17107
17108         PR target/84748
17109         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17110         as clobbering CC_REGNUM.
17111
17112 2018-03-08  Richard Biener  <rguenther@suse.de>
17113
17114         PR middle-end/84552
17115         * tree-scalar-evolution.c: Include tree-into-ssa.h.
17116         (follow_copies_to_constant): Do not follow SSA names registered
17117         for update.
17118
17119 2018-03-08  Richard Biener  <rguenther@suse.de>
17120
17121         PR tree-optimization/84178
17122         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17123         to caller.
17124         (version_loop_for_if_conversion): Delay update_ssa call.
17125         (tree_if_conversion): Delay update_ssa until after predicate
17126         insertion.
17127
17128 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
17129
17130         PR tree-optimization/84178
17131         * tree-if-conv.c (release_bb_predicate): Remove the
17132         the assertion that the stmts have NULL use_ops.
17133         Discard the statements, asserting that they haven't
17134         yet been added to a BB.
17135
17136 2018-03-08  Richard Biener  <rguenther@suse.de>
17137
17138         PR tree-optimization/84746
17139         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17140         (phi_translate): Pass in destination ANTIC_OUT set.
17141         (phi_translate_1): Likewise.  For a simplified result lookup
17142         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17143         (phi_translate_set): Adjust.
17144         (do_pre_regular_insertion): Likewise.
17145         (do_pre_partial_partial_insertion): Likewise.
17146
17147 2018-03-08  Martin Liska  <mliska@suse.cz>
17148
17149         PR gcov-profile/84735
17150         * doc/gcov.texi: Document usage of profile files.
17151         * gcov-io.h: Document changes in the format.
17152
17153 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
17154
17155         PR debug/84404
17156         PR debug/84408
17157         * dwarf2out.c (struct dw_line_info_table): Update comments for
17158         view == -1.
17159         (FORCE_RESET_NEXT_VIEW): New.
17160         (FORCE_RESETTING_VIEW_P): New.
17161         (RESETTING_VIEW_P): Check for -1 too.
17162         (ZERO_VIEW_P): Likewise.
17163         (new_line_info_table): Force-reset next view.
17164         (dwarf2out_begin_function): Likewise.
17165         (dwarf2out_source_line): Simplify zero_view_p initialization.
17166         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17167         view directly.  Omit view when omitting .loc at line 0.
17168
17169 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17170
17171         PR tree-optimization/84740
17172         * tree-switch-conversion.c (process_switch): Call build_constructors
17173         only if info.phi_count is non-zero.
17174
17175         PR tree-optimization/84739
17176         * tree-tailcall.c (find_tail_calls): Check call arguments against
17177         DECL_ARGUMENTS (current_function_decl) rather than
17178         DECL_ARGUMENTS (func) when checking for tail recursion.
17179
17180 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17181
17182         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17183         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17184         Volker Reichelt's entry and add entries for people that perform
17185         GCC fuzzy testing and report numerous bugs.
17186
17187 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
17188
17189         PR target/82411
17190         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17191         readonly data in sdata, if that is disabled.
17192         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17193         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17194         -mreadonly-in-sdata option.
17195
17196 2018-03-07  Martin Sebor  <msebor@redhat.com>
17197
17198         PR tree-optimization/84468
17199         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17200         basic block when looking for nul assignment.
17201
17202 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
17203
17204         PR target/84277
17205         * except.h (output_function_exception_table): Adjust prototype.
17206         * except.c (output_function_exception_table): Remove FNNAME parameter
17207         and add SECTION parameter.  Ouput one part of the table at a time.
17208         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17209         the first part of the exception table and emit unwind directives.
17210         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17211         (i386_pe_seh_cold_init): Likewise.
17212         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17213         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17214         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17215         (ix86_output_call_insn): Emit a nop in one more case for SEH.
17216         * config/i386/winnt.c: Include except.h.
17217         (struct seh_frame_state): Add reg_offset, after_prologue and
17218         in_cold_section fields.
17219         (i386_pe_seh_end_prologue): Set seh->after_prologue.
17220         (i386_pe_seh_cold_init): New function.
17221         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17222         to seh->in_cold_section.
17223         (seh_emit_push): Record the offset of the push.
17224         (seh_emit_save): Record the offet of the save.
17225         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17226         Test seh->after_prologue to disregard the epilogue.
17227         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17228         (i386_pe_end_cold_function): New function.
17229
17230 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17231
17232         PR fortran/84565
17233         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17234         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17235
17236         PR c++/84704
17237         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17238         on tmp_var.
17239         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17240         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17241
17242         PR middle-end/84723
17243         * multiple_target.c: Include tree-inline.h and intl.h.
17244         (expand_target_clones): Diagnose and fail if node->definition and
17245         !tree_versionable_function_p (node->decl).
17246
17247 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
17248
17249         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17250         sprint_ul.
17251         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17252         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17253         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17254
17255 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17256
17257         PR target/84710
17258         * combine.c (try_combine): Use reg_or_subregno instead of handling
17259         just paradoxical SUBREGs and REGs.
17260
17261 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
17262
17263         * config/arc/arc.c (arc_finalize_pic): Remove function.
17264         (arc_must_save_register): We use single base PIC register, remove
17265         checks to save/restore the PIC register.
17266         (arc_expand_prologue): Likewise.
17267         * config/arc/arc-protos.h (arc_set_default_type_attributes):
17268         Remove.
17269         (arc_verify_short): Likewise.
17270         (arc_attr_type): Likewise.
17271         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17272         (walk_stores): Likewise.
17273         (arc_address_cost): Make it static.
17274         (arc_verify_short): Likewise.
17275         (branch_dest): Likewise.
17276         (arc_attr_type): Likewise.
17277         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17278         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17279         (arc_final_prescan_insn): Remove inserting the nops due to
17280         hardware hazards.  It is done in reorg step.
17281         (insn_length_variant_t): Remove.
17282         (insn_length_parameters_t): Likewise.
17283         (arc_insn_length_parameters): Likewise.
17284         (arc_get_insn_variants): Likewise.
17285         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17286
17287 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17288
17289         PR inline-asm/84683
17290         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17291         assertion failure.
17292
17293         PR tree-optimization/84687
17294         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17295         on new_node->decl.
17296         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17297
17298 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17299
17300         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17301         Rename to ppc_speculation_barrier.
17302         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17303         __builtin_ppc_speculation_barrier.
17304
17305 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17306
17307         PR target/84700
17308         * combine.c (combine_simplify_rtx): Don't try to simplify if
17309         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17310         are equal to x.
17311
17312 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
17313
17314         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17315         to 32 bytes when compiling for POWER9.
17316
17317 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17318
17319         PR target/84564
17320         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17321         regparm >= 3 with no arg reg available also for calls with
17322         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
17323
17324         PR target/84524
17325         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17326         orig,vex.
17327         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
17328
17329 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
17330
17331         PR target/84264
17332         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17333
17334 2018-03-05  Richard Biener  <rguenther@suse.de>
17335
17336         PR tree-optimization/84486
17337         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17338         When inserting a __builtin_assume_aligned call set the LHS
17339         SSA name alignment info accordingly.
17340
17341 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
17342
17343         PR tree-optimization/84114
17344         * config/aarch64/aarch64.c (aarch64_reassociation_width)
17345         Avoid reassociation of FLOAT_MODE addition.
17346
17347 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
17348
17349         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17350         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17351         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17352         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17353         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17354         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17355         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17356         and -mwbnoinvd.
17357         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17358         __builtin_ia32_wbinvd): New builtins.
17359         (SPECIAL_ARGS2): New.
17360         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17361         (SPECIAL_ARGS2): New.
17362         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17363         (ix86_valid_target_attribute_inner_p): Ditto.
17364         (ix86_init_mmx_sse_builtins): Add special_args2.
17365         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17366         TARGET_WBNOINVD_P): New.
17367         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17368         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17369         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17370         * config/i386/immintrin.h (_wbinvd): New intrinsic.
17371         * config/i386/pconfigintrin.h: New file.
17372         * config/i386/wbnoinvdintrin.h: Ditto.
17373         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17374         wbnoinvdintrin.h.
17375         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17376
17377 2018-03-05  Richard Biener  <rguenther@suse.de>
17378
17379         PR tree-optimization/84670
17380         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17381         member.
17382         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17383         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17384         (compute_antic_aux): Only assert the number of values in ANTIC_IN
17385         doesn't grow if all successors (recursively) were visited at least
17386         once.
17387
17388 2018-03-05  Richard Biener  <rguenther@suse.de>
17389
17390         PR tree-optimization/84650
17391         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17392         if executed in the loop pipeline.
17393
17394 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
17395
17396         * doc/configfiles.texi (Configuration Files): Move info about
17397         conditionalizing $target-protos.h to...
17398         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
17399         differs from $target-protos.h.
17400
17401 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
17402             Chung-Ju Wu  <jasonwucj@gmail.com>
17403
17404         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17405         * config/nds32/nds32-multiple.md (setmemsi): Define.
17406         * config/nds32/nds32-memory-manipulation.c
17407         (nds32_gen_dup_4_byte_to_word_value): New.
17408         (emit_setmem_word_loop): New.
17409         (emit_setmem_byte_loop): New.
17410         (nds32_expand_setmem_loop): New.
17411         (nds32_expand_setmem_loop_v3m): New.
17412         (nds32_expand_setmem_unroll): New.
17413         (nds32_expand_setmem): New.
17414
17415 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17416             Chung-Ju Wu  <jasonwucj@gmail.com>
17417
17418         * config/nds32/nds32-memory-manipulation.c
17419         (nds32_emit_load_store): New.
17420         (nds32_emit_post_inc_load_store): New.
17421         (nds32_emit_mem_move): New.
17422         (nds32_emit_mem_move_block): New.
17423         (nds32_expand_movmemsi_loop_unknown_size): New.
17424         (nds32_expand_movmemsi_loop_known_size): New.
17425         (nds32_expand_movmemsi_loop): New.
17426         (nds32_expand_movmemsi_unroll): New.
17427         (nds32_expand_movmemqi): Rename ...
17428         (nds32_expand_movmemsi): ... to this.
17429         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17430         (movmemsi): ... to this.
17431         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17432         (nds32_expand_movmemsi): ... to this.
17433
17434 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17435             Monk Chiang  <sh.chiang04@gmail.com>
17436             Chung-Ju Wu  <jasonwucj@gmail.com>
17437
17438         * config/nds32/nds32-protos.h
17439         (nds32_expand_load_multiple): New arguments.
17440         (nds32_expand_store_multiple): Ditto.
17441         (nds32_valid_multiple_load_store): Rename ...
17442         (nds32_valid_multiple_load_store_p): ... to this.
17443         * config/nds32/nds32-memory-manipulation.c
17444         (nds32_expand_load_multiple): Refine implementation.
17445         (nds32_expand_store_multiple): Ditto.
17446         * config/nds32/nds32-multiple.md
17447         (load_multiple): Update nds32_expand_load_multiple interface.
17448         (store_multiple): Update nds32_expand_store_multiple interface.
17449         * config/nds32/nds32-predicates.c
17450         (nds32_valid_multiple_load_store): Rename ...
17451         (nds32_valid_multiple_load_store_p): ... to this and refine
17452         implementation.
17453         * config/nds32/predicates.md
17454         (nds32_load_multiple_and_update_address_operation): New predicate.
17455         (nds32_store_multiple_and_update_address_operation): New predicate.
17456
17457 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17458             Chung-Ju Wu  <jasonwucj@gmail.com>
17459
17460         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17461         (combo): New attribute.
17462         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17463
17464 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17465
17466         * config/nds32/nds32.opt: Change -mcmodel= default value.
17467
17468 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
17469             Monk Chiang  <sh.chiang04@gmail.com>
17470             Chung-Ju Wu  <jasonwucj@gmail.com>
17471
17472         * config/nds32/constants.md (unspec_element): New enum.
17473         * config/nds32/constraints.md (Umw): New constraint.
17474         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17475         * config/nds32/nds32-intrinsic.md: Likewise.
17476         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17477         (nds32_valid_smw_lwm_base_p): New.
17478         (nds32_output_smw_single_word): New.
17479         (nds32_output_lmw_single_word): New.
17480         (nds32_expand_unaligned_load): New.
17481         (nds32_expand_unaligned_store): New.
17482         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17483         (nds32_output_smw_single_word): Declare.
17484         (nds32_output_lmw_single_word): Declare.
17485         (nds32_expand_unaligned_load): Declare.
17486         (nds32_expand_unaligned_store): Declare.
17487         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17488         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17489         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17490         NDS32_BUILTIN_UASTORE_DW.
17491         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17492         predicate.
17493
17494 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17495             Kito Cheng  <kito.cheng@gmail.com>
17496             Chung-Ju Wu  <jasonwucj@gmail.com>
17497
17498         * config/nds32/nds32-intrinsic.c
17499         (nds32_expand_builtin_null_ftype_reg): Delete.
17500         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17501         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17502         (nds32_read_argument): New.
17503         (nds32_legitimize_target): Ditto.
17504         (nds32_legitimize_argument): Ditto.
17505         (nds32_check_constant_argument): Ditto.
17506         (nds32_expand_unop_builtin): Ditto.
17507         (nds32_expand_unopimm_builtin): Ditto.
17508         (nds32_expand_binop_builtin): Ditto.
17509         (nds32_builtin_decl_impl): Ditto.
17510         (builtin_description): Ditto.
17511         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17512         (nds32_init_builtins_impl): Ditto.
17513         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17514         (nds32_builtin_decl): New.
17515         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17516         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17517
17518 2018-03-02  Jeff Law  <law@redhat.com>
17519
17520         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17521         (redundant_insn, fill_simple_delay_slots): Likewise.
17522         (fill_slots_from_thread): Likewise.
17523         * resource.c (mark_referenced_resources): Likewise.
17524         (mark_set_resources, find_dead_or_set_registers): Likewise.
17525
17526 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17527
17528         * substring-locations.h (format_warning_va): Formatting fix for
17529         ATTRIBUTE_GCC_DIAG.
17530         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17531         argument.
17532         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17533         * substring-locations.c: Include intl.h.
17534         (format_warning_va): Turned into small wrapper around
17535         format_warning_n_va, renamed to ...
17536         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17537         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17538         use ngettext.
17539         (format_warning_at_substring_n): New function.
17540         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17541         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17542         format_warning_at_substring with just a shorter name instead of
17543         const function pointer.
17544         (fmtwarn_n): New function.
17545         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17546         appropriate, get rid of all the fmtstr temporaries, move conditionals
17547         with G_() wrapped string literals directly into fmtwarn arguments,
17548         cast dir.len to (int), formatting fixes.
17549
17550 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17551
17552         * doc/invoke.texi: Remove "Cilk Plus" references.
17553
17554 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17555             Richard Biener  <rguenther@suse.de>
17556
17557         PR ipa/84628
17558         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17559         for error or warning attributes if CALL_FROM_THUNK_P is set.
17560         Formatting fixes.
17561
17562 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17563
17564         PR target/56540
17565         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17566         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17567
17568         PR target/56540
17569         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17570         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17571
17572         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17573         instead of -1U in last predictors element's probability member.
17574
17575 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17576
17577         PR ipa/83983
17578         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17579         arguments if they are comparable.
17580
17581 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17582
17583         PR tree-optimization/84634
17584         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17585         masks and masked_loop_p with a single loop_masks, making sure it's
17586         null for bb vectorization.
17587
17588 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17589
17590         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17591         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17592         loop->force_vectorize to check whether there is no alias.
17593
17594 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17595
17596         PR target/84614
17597         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17598         prototypes.
17599         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17600         comments.
17601         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17602         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17603         instead of a loop around prev_real_insn.
17604         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17605         prev_real_insn.
17606
17607         PR inline-asm/84625
17608         * config/i386/i386.c (ix86_print_operand): Use conditional
17609         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17610         zero vector.
17611
17612 2018-03-02  Richard Biener  <rguenther@suse.de>
17613
17614         PR tree-optimization/84427
17615         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17616         (bitmap_set_subtract_values): Rewrite to handle multiple
17617         exprs per value.
17618         (clean): Likewise.
17619         (prune_clobbered_mems): Likewise.
17620         (phi_translate): Take edge instead of pred/phiblock.
17621         (phi_translate_1): Likewise.
17622         (phi_translate_set): Likewise.  Insert all translated
17623         exprs for a value into the set, keeping possibly multiple
17624         expressions per value.
17625         (compute_antic_aux): Adjust for phi_translate changes.
17626         When intersecting union the expressions and prune those
17627         not in the final value set, keeping possibly multiple
17628         expressions per value.  Do not use value-insertion
17629         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17630         all expressions.  Add verification that the value-sets
17631         only shrink during iteration.
17632         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17633         (do_pre_regular_insertion): Likewise.
17634         (do_pre_partial_partial_insertion): Likewise.
17635
17636 2018-03-02  Richard Biener  <rguenther@suse.de>
17637
17638         PR target/82005
17639         * config/darwin.c (saved_debug_info_level): New static global.
17640         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17641         (darwin_asm_lto_end): Restore debug info generation settings.
17642
17643 2018-03-01  Martin Liska  <mliska@suse.cz>
17644
17645         PR sanitizer/82484
17646         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17647         volatile arguments.
17648
17649 2018-03-01  Richard Biener  <rguenther@suse.de>
17650
17651         PR debug/84645
17652         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17653         type annotation with LTO when debug was disabled at compile-time.
17654
17655 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17656
17657         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17658         XINT with INTVAL.
17659         (mips_final_postscan_insn): Likewise.
17660
17661 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17662
17663         PR rtl-optimization/84528
17664         * alias.c (init_alias_target): Add commentary.
17665         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17666         a unique base value if the frame pointer is not eliminated
17667         to the stack pointer.
17668
17669 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17670
17671         PR rtl-optimization/83327
17672         * lra-int.h (hard_regs_spilled_into): Declare.
17673         * lra.c (hard_regs_spilled_into): Define.
17674         (init_reg_info): Init hard_regs_spilled_into.
17675         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17676         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17677         (process_bb_lives): Handle hard_regs_spilled_into.
17678         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17679         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17680
17681 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17682
17683         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17684         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17685         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17686         * config/rs6000/aix72.h: New file.
17687
17688 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17689
17690         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17691         instead of warning_at with conditional singular and plural messages
17692         where possible.
17693
17694         PR target/52991
17695         * stor-layout.c (update_alignment_for_field): For
17696         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17697         && !DECL_PACKED (field), do the alignment update, just use
17698         only desired_align instead of MAX (type_align, desired_align)
17699         as the alignment.
17700         (place_field): Don't do known_align < desired_align handling
17701         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17702         is non-NULL, instead do it after rli->prev_field handling and
17703         only if not within a bitfield word.  For DECL_PACKED (field)
17704         use type_align of BITS_PER_UNIT.
17705
17706 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17707
17708         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17709         superfluous parentheses and trailing spaces.
17710
17711 2018-02-28  Richard Biener  <rguenther@suse.de>
17712
17713         PR tree-optimization/84584
17714         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17715         SCoPs with fake exit edge.
17716
17717 2018-02-28  Martin Liska  <mliska@suse.cz>
17718
17719         PR testsuite/84597
17720         * timevar.c (timer::print): Fix format to properly print 100%
17721         values.
17722
17723 2018-02-28  Richard Biener  <rguenther@suse.de>
17724
17725         PR middle-end/84607
17726         * genmatch.c (capture_info::walk_match): Do not mark
17727         captured expressions without operands as expr_p given
17728         they act more like predicates and should be subject to
17729         "lost tail" side-effect preserving.
17730
17731 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17732
17733         PR rtl-optimization/81611
17734         * auto-inc-dec.c (attempt_change): Move dead note from
17735         mem_insn if it's the next use of regno
17736         (find_address): Take address use of reg holding
17737         non-incremented value.  Add parm to limit search to the named
17738         reg only.
17739         (merge_in_block): Attempt to use a mem insn that is the next
17740         use of the original regno.
17741
17742 2018-02-27  Martin Sebor  <msebor@redhat.com>
17743
17744         PR c++/83871
17745         * doc/invoke.texi (-Wmissing-attributes): New option.
17746         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17747
17748 2018-02-27  Martin Sebor  <msebor@redhat.com>
17749
17750         PR translation/84207
17751         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17752         n argument to unsigned HOST_WIDE_INT.
17753         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17754         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17755         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17756         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17757
17758 2018-02-27  Richard Biener  <rguenther@suse.de>
17759
17760         PR tree-optimization/84512
17761         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17762         Do not use the estimate returned from record_stmt_cost for
17763         the scalar iteration cost but sum properly using add_stmt_cost.
17764
17765 2018-02-27  Richard Biener  <rguenther@suse.de>
17766
17767         PR tree-optimization/84466
17768         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17769         Adjust last change to less strictly validate use operands.
17770
17771 2018-02-27  Martin Liska  <mliska@suse.cz>
17772
17773         PR gcov-profile/84548
17774         * gcov.c (process_file): Allow partial overlap and consider it
17775         also as group functions.
17776         (output_lines): Properly calculate range of lines for a group.
17777
17778 2018-02-27  Martin Liska  <mliska@suse.cz>
17779
17780         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17781         'ggc' suffixes.  Change first column width.
17782         (timer::print): Fix formatting of the column.
17783
17784 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17785
17786         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17787         preserve inline entry blocks for the sake of debug inline
17788         entry point markers alone.
17789         (remove_unused_locals): Suggest in comments a better place to
17790         force the preservation of inline entry blocks that are
17791         otherwise unused, but do not preserve them.
17792
17793 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17794
17795         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17796
17797 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17798
17799         PR target/84039
17800         * config/i386/constraints.md (Bs): Replace
17801         ix86_indirect_branch_register with
17802         TARGET_INDIRECT_BRANCH_REGISTER.
17803         (Bw): Likewise.
17804         * config/i386/i386.md (indirect_jump): Likewise.
17805         (tablejump): Likewise.
17806         (*sibcall_memory): Likewise.
17807         (*sibcall_value_memory): Likewise.
17808         Peepholes of indirect call and jump via memory: Likewise.
17809         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17810         (*sibcall_value_GOT_32): Likewise.
17811         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17812         (GOT_memory_operand): Likewise.
17813         (call_insn_operand): Likewise.
17814         (sibcall_insn_operand): Likewise.
17815         (GOT32_symbol_operand): Likewise.
17816         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17817
17818 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17819
17820         PR rtl-optimization/83496
17821         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17822         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17823         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17824         redundant insn, if any.
17825         (relax_delay_slots): Likewise.
17826         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17827
17828 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17829
17830         PR tree-optimization/83965
17831         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17832         that grouped statements are part of a reduction chain.  Return
17833         true if the statement is not marked as a reduction itself but
17834         is part of a group.
17835         (vect_recog_dot_prod_pattern): Don't check whether the statement
17836         is part of a group here.
17837         (vect_recog_sad_pattern): Likewise.
17838         (vect_recog_widen_sum_pattern): Likewise.
17839
17840 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17841
17842         PR debug/84545
17843         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17844
17845 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17846
17847         PR target/84530
17848         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17849         the bool argument.
17850         (ix86_output_indirect_function_return): New prototype.
17851         (ix86_split_simple_return_pop_internal): Likewise.
17852         * config/i386/i386.c (indirect_return_via_cx): New.
17853         (indirect_return_via_cx_bnd): Likewise.
17854         (indirect_thunk_name): Handle return va CX_REG.
17855         (output_indirect_thunk_function): Create alias for
17856         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17857         (ix86_output_indirect_jmp): Remove the bool argument.
17858         (ix86_output_indirect_function_return): New function.
17859         (ix86_split_simple_return_pop_internal): Likewise.
17860         * config/i386/i386.md (*indirect_jump): Don't pass false
17861         to ix86_output_indirect_jmp.
17862         (*tablejump_1): Likewise.
17863         (simple_return_pop_internal): Change it to define_insn_and_split.
17864         Call ix86_split_simple_return_pop_internal to split it for
17865         -mfunction-return=.
17866         (simple_return_indirect_internal): Call
17867         ix86_output_indirect_function_return instead of
17868         ix86_output_indirect_jmp.
17869
17870 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17871
17872         PR bootstrap/84405
17873         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17874         memset and value initialization afterwards.
17875
17876 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17877
17878         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17879
17880 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17881
17882         PR target/84521
17883         * common/config/aarch64/aarch64-common.c
17884         (aarch_option_optimization_table[]): Switch
17885         off fomit-frame-pointer
17886
17887 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17888             Chung-Ju Wu  <jasonwucj@gmail.com>
17889
17890         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17891         volatile memory.
17892         (store_multiple): Ditto.
17893
17894 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17895
17896         * config.gcc: Add --with-cpu support for nds32 target.
17897         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17898         * config/nds32/nds32.opt: Add -mcpu= option.
17899
17900 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17901
17902         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17903         isel=yes): Warn for these deprecated options.
17904
17905 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17906
17907         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17908         ISA_2_5_MASKS_EMBEDDED.
17909
17910 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17911
17912         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17913         p->max as pointers rather than using iterative_hash_expr.
17914
17915 2018-02-23  Carl Love  <cel@us.ibm.com>
17916
17917         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17918         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17919         BU_P8V_OVERLOAD_2.
17920         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17921         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17922         P8V_BUILTIN_VEC_VUNSIGNED2.
17923
17924 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17925
17926         PR target/81572
17927         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17928         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17929         LRA_UNKNOWN_ALT.
17930         * lra-constraints.c (curr_insn_transform): Set up
17931         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17932         LRA_UNKNOWN_ALT.
17933         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17934         * lra-eliminations.c (spill_pseudos): Ditto.
17935         (process_insn_for_elimination): Ditto.
17936         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17937         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17938         LRA_NON_CLOBBERED_ALT.
17939
17940 2018-02-22  Martin Sebor  <msebor@redhat.com>
17941
17942         PR tree-optimization/84480
17943         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17944         to maybe_diag_stxncpy_trunc.  Call it.
17945         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17946         from gimple_fold_builtin_strcpy.  Print inlining stack.
17947         (handle_builtin_stxncpy): Print inlining stack.
17948         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17949
17950 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
17951
17952         PR target/84176
17953         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17954         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17955         and -fcheck-pointer-bounds are used together.
17956         (indirect_thunk_prefix): New enum.
17957         (indirect_thunk_need_prefix): New function.
17958         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
17959         "_nt" instead of "_bnd" for NOTRACK prefix.
17960         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17961         (output_indirect_thunk_function): Likewise.
17962         (): Likewise.
17963         (ix86_code_end): Update output_indirect_thunk_function calls.
17964         (ix86_output_indirect_branch_via_reg): Replace
17965         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17966         (ix86_output_indirect_branch_via_push): Likewise.
17967         (ix86_output_function_return): Likewise.
17968         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17969         incompatible with -fcf-protection=branch and
17970         -fcheck-pointer-bounds.
17971
17972 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17973
17974         PR target/83335
17975         * config/aarch64/aarch64.c (aarch64_print_address_internal):
17976         Change gcc_assert call to output_operand_lossage.
17977
17978 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17979
17980         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17981
17982 2018-02-22  DJ Delorie  <dj@redhat.com>
17983             Sebastian Perta  <sebastian.perta@renesas.com>
17984             Oleg Endo  <olegendo@gcc.gnu.org>
17985
17986         * config/rx/rx.c (rx_rtx_costs): New function.
17987         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17988
17989 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17990
17991         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17992
17993 2018-02-22  Martin Liska  <mliska@suse.cz>
17994
17995         PR driver/83193
17996         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17997         Add "native" as a possible value.
17998
17999 2018-02-22  Martin Liska  <mliska@suse.cz>
18000
18001         PR driver/83193
18002         * config/i386/i386.c (ix86_option_override_internal):
18003         Add "native" as a possible value for -march and -mtune.
18004
18005 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
18006
18007         PR target/84502
18008         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18009         to all type variants.
18010
18011         PR tree-optimization/84503
18012         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18013         width as info->bitpos + info->bitsize - start.
18014         (merged_store_group::merge_overlapping): Simplify width computation.
18015         (check_no_overlap): New function.
18016         (imm_store_chain_info::try_coalesce_bswap): Compute expected
18017         start + width and last_order of the group, fail if check_no_overlap
18018         fails.
18019         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18020         to group if check_no_overlap fails.
18021
18022 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18023
18024         * config/rs6000/altivec.md: Delete contraint arguments to
18025         define_expand, define_split, and define_peephole2, and in
18026         define_insn_and_split if always unused.
18027         * config/rs6000/darwin.md: Ditto.
18028         * config/rs6000/dfp.md: Ditto.
18029         * config/rs6000/rs6000.md: Ditto.
18030         * config/rs6000/sync.md: Ditto.
18031         * config/rs6000/vector.md: Ditto.
18032         * config/rs6000/vsx.md: Ditto.
18033
18034 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18035
18036         * config/rs6000/altivec.md: Write output control strings as braced
18037         blocks instead of double-quoted strings.
18038         * config/rs6000/darwin.md: Ditto.
18039         * config/rs6000/rs6000.md: Ditto.
18040         * config/rs6000/vector.md: Ditto.
18041         * config/rs6000/vsx.md: Ditto.
18042
18043 2018-02-21  Jason Merrill  <jason@redhat.com>
18044
18045         PR c++/84314 - ICE with templates and fastcall attribute.
18046         * attribs.c (build_type_attribute_qual_variant): Remove assert.
18047
18048 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18049
18050         * ipa-cp.c (determine_versionability): Fix comment typos.
18051
18052 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18053
18054         PR c/84229
18055         * ipa-cp.c (determine_versionability): Do not version functions caling
18056         va_arg_pack.
18057
18058 2018-02-21  Martin Liska  <mliska@suse.cz>
18059
18060         PR driver/83193
18061         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18062         Add "native" as a possible value.
18063         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
18064         the macro when native cpu detection is available.
18065
18066 2018-02-21  Martin Liska  <mliska@suse.cz>
18067
18068         PR driver/83193
18069         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18070         Add "native" as a possible value.
18071         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18072         when native cpu detection is available.
18073
18074 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
18075             Martin Sebor  <msebor@redhat.com>
18076
18077         PR tree-optimization/84478
18078         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18079         false.
18080         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18081         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18082         support which is conservatively correct, for 2 only stay conservative
18083         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
18084         argument to the 2 argument get_range_strlen, adjust 6 arg
18085         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18086         false.
18087         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18088         (gimple_fold_builtin_strlen): Pass true as last argument to
18089         get_range_strlen.
18090
18091 2018-02-20  Martin Sebor  <msebor@redhat.com>
18092
18093         PR middle-end/84095
18094         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18095         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
18096         (builtin_memref::builtin_memref): Factor out parts into
18097         set_base_and_offset and call it.
18098
18099 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18100
18101         PR middle-end/84406
18102         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18103         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18104         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
18105         search at the associated MODE_INT.
18106
18107 2018-02-20  Jeff Law  <law@redhat.com>
18108
18109         PR middle-end/82123
18110         PR tree-optimization/81592
18111         PR middle-end/79257
18112         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18113         for range data rather than using global data.
18114         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18115         range data rather than using global data.
18116         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18117         pass it to children as needed.
18118         (struct directive::fmtresult): Similarly.
18119         (struct directive::set_width): Similarly.
18120         (struct directive::set_precision): Similarly.
18121         (format_integer, format_directive, parse_directive): Similarly.
18122         (format_none): Accept unnamed vr_values parameter.
18123         (format_percent, format_floating, format_character): Similarly.
18124         (format_string, format_plain): Similarly.
18125         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18126         the EVRP range analyzer for range data rather than using global data.
18127         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18128         gimple-ssa-evrp-analyze.h
18129         (class sprintf_dom_walker): Add after_dom_children member function.
18130         Add evrp_range_analyzer member.
18131         (sprintf_dom_walker::before_dom_children): Call into the EVRP
18132         range analyzer as needed.
18133         (sprintf_dom_walker::after_dom_children): New member function.
18134         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18135         if not optimizing.
18136         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18137         (evrp_range_analyzer::pop_to_marker): Likewise.
18138
18139 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18140
18141         PR tree-optimization/84419
18142         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18143         with the required type if its current type is compatible but
18144         different.
18145
18146 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
18147
18148         PR middle-end/82004
18149         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18150         after vectorization.
18151
18152 2018-02-20  Martin Liska  <mliska@suse.cz>
18153
18154         PR driver/83193
18155         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18156         possible values if we don't have a hint.
18157
18158 2018-02-20  Martin Liska  <mliska@suse.cz>
18159
18160         PR c/84310
18161         PR target/79747
18162         * final.c (shorten_branches): Build align_tab array with one
18163         more element.
18164         * opts.c (finish_options): Add alignment option limit check.
18165         (MAX_CODE_ALIGN): Likewise.
18166         (MAX_CODE_ALIGN_VALUE): Likewise.
18167         * doc/invoke.texi: Document maximum allowed option value for
18168         all -falign-* options.
18169
18170 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
18171
18172         PR target/84146
18173         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18174         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18175         * var-tracking.c (emit_note_insn_var_location): Remove all references
18176         to NOTE_INSN_CALL_ARG_LOCATION.
18177         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18178         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18179         Use copy_rtx_if_shared.
18180         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18181         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18182         (dwarf2out_var_location): Remove handling of
18183         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18184         on call_insn.
18185         * final.c (final_scan_insn): Remove all references to
18186         NOTE_INSN_CALL_ARG_LOCATION.
18187         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
18188         before dumping final insns.
18189         * except.c (emit_note_eh_region_end): Remove all references to
18190         NOTE_INSN_CALL_ARG_LOCATION.
18191         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18192         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18193         * config/arc/arc.c (hwloop_optimize): Likewise.
18194         * config/arm/arm.c (create_fix_barrier): Likewise.
18195         * config/s390/s390.c (s390_chunkify_start): Likewise.
18196         * config/sh/sh.c (find_barrier): Likewise.
18197         * config/i386/i386.c (rest_of_insert_endbranch,
18198         ix86_seh_fixup_eh_fallthru): Likewise.
18199         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18200         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18201         * config/frv/frv.c (frv_function_prologue): Likewise.
18202         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
18203         reg note.
18204         (note_outside_basic_block_p): Remove all references to
18205         NOTE_INSN_CALL_ARG_LOCATION.
18206         * gengtype.c (adjust_field_rtx_def): Likewise.
18207         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18208         Likewise.
18209         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18210         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18211
18212         PR c++/84444
18213         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18214         is ADDR_EXPR.
18215
18216         PR tree-optimization/84452
18217         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18218         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18219         is NULL.
18220
18221 2018-02-19  Martin Liska  <mliska@suse.cz>
18222
18223         PR sanitizer/82183
18224         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18225
18226 2018-02-19  Martin Liska  <mliska@suse.cz>
18227             Richard Sandiford  <richard.sandiford@linaro.org>
18228
18229         PR tree-optimization/82491
18230         * gimple-fold.c (get_base_constructor): Make earlier bail out
18231         to prevent ubsan.
18232
18233 2018-02-19  Carl Love  <cel@us.ibm.com>
18234
18235         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18236         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18237         BU_P8V_OVERLOAD_1.
18238         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18239         P8V_BUILTIN_VEC_NEG.
18240
18241 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
18242
18243         * config/rl78/rl78.md (movdf): New define expand.
18244
18245 2018-02-19  Martin Liska  <mliska@suse.cz>
18246
18247         PR other/80589
18248         * doc/invoke.texi: Fix typo.
18249         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18250
18251 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
18252
18253         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18254         handle rs6000_single_float and rs6000_double_float specially for
18255         e500 family CPUs.
18256
18257 2018-02-16  Jeff Law  <law@redhat.com>
18258
18259         * config/rx/rx.c (add_pop_cfi_notes): New function.;
18260         (pop_regs): Use it.
18261
18262 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18263
18264         PR ipa/84425
18265         * ipa-inline.c (inline_small_functions): Fix a typo.
18266
18267 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18268
18269         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18270
18271 2018-02-16  Carl Love  <cel@us.ibm.com>
18272
18273         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18274         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18275         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18276         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18277         expansion to P8V_BUILTIN_VEC_FLOAT2.
18278
18279 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
18280
18281         PR rtl-optimization/70023
18282         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18283         src_regno into account.
18284
18285 2018-02-16  Carl Love  <cel@us.ibm.com>
18286
18287         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18288         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18289         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18290         * config/rs6000/rs6000.c: Remove case statements for
18291         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18292         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18293         and P9V_BUILTIN_VEC_VINSERT4B.
18294         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18295         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18296         * config/rs6000/vsx.md:
18297         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18298         vec_insert4b.
18299
18300 2018-02-16  Carl Love  <cel@us.ibm.com>
18301
18302         * config/rs6000/altivec.h: Add builtin names vec_extract4b
18303         vec_insert4b.
18304         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18305         definitions.
18306         * config/rs6000/rs6000-c.c: Add the definitions for
18307         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18308         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18309         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18310         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
18311         definition for insert4b and define insn *insert3b_internal.
18312         * doc/extend.texi: Add documentation for vec_extract4b.
18313
18314 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18315
18316         * doc/extend.texi (Backwards Compatibility): Mention friend
18317         injection.  Note for-scope is deprecated.
18318         * doc/invoke.texi (-ffriend-injection): Deprecate.
18319
18320 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
18321
18322         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18323         that moved to I2, also allow destinations that are a paradoxical
18324         subreg (instead of a normal reg).
18325
18326 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
18327
18328         PR target/83831
18329         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18330         to QImode.
18331
18332 2018-02-16  Richard Biener  <rguenther@suse.de>
18333
18334         PR tree-optimization/84037
18335         PR tree-optimization/84016
18336         PR target/82862
18337         * config/i386/i386.c (ix86_builtin_vectorization_cost):
18338         Adjust vec_construct for the fact we need additional higher latency
18339         128bit inserts for AVX256 and AVX512 vector builds.
18340         (ix86_add_stmt_cost): Scale vector construction cost for
18341         elementwise loads.
18342
18343 2018-02-16  Richard Biener  <rguenther@suse.de>
18344
18345         PR tree-optimization/84417
18346         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18347         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18348         (non_rewritable_lvalue_p): Likewise, use poly-ints.
18349
18350 2018-02-16  Martin Liska  <mliska@suse.cz>
18351
18352         PR sanitizer/84307
18353         * internal-fn.def (ASAN_CHECK): Set proper flags.
18354         (ASAN_MARK): Likewise.
18355
18356 2018-02-16  Julia Koval  <julia.koval@intel.com>
18357
18358         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18359         from PTA_CANNONLAKE.
18360
18361 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18362
18363         PR target/84272
18364         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18365         Use ++iter rather than iter++ for std::list iterators.
18366         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
18367         defer deleting them until all nodes in the forest are processed.  Do
18368         free even leaf nodes.  Change to_process into auto_vec.
18369
18370         PR bootstrap/84405
18371         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18372         * vec.h (vec_default_construct): Use memset instead of placement new
18373         if BROKEN_VALUE_INITIALIZATION is defined.
18374         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18375         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18376         is defined.
18377
18378         PR rtl-optimization/83723
18379         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18380         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
18381         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
18382         recursive calls.
18383         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18384         callers.
18385         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18386
18387 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
18388
18389         PR rtl-optimization/81443
18390         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18391         from inner REGs to paradoxical SUBREGs.
18392
18393 2018-02-16  Richard Biener  <rguenther@suse.de>
18394
18395         PR tree-optimization/84399
18396         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18397         For operands we can analyze at their definition make sure we can
18398         analyze them at each use as well.
18399
18400 2018-02-16  Richard Biener  <rguenther@suse.de>
18401
18402         PR tree-optimization/84190
18403         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18404         volatile accesses if the decl isn't volatile.
18405
18406 2018-02-15  Jason Merrill  <jason@redhat.com>
18407
18408         PR c++/84314 - ICE with templates and fastcall attribute.
18409         * attribs.c (build_type_attribute_qual_variant): Don't clobber
18410         TYPE_CANONICAL on an existing type.
18411
18412 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
18413
18414         PR tree-optimization/84383
18415         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18416         dstoff nor call operand_equal_p if dstbase is NULL.
18417
18418         PR tree-optimization/84334
18419         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18420         also a CONSTANT_CLASS_P, punt.
18421
18422 2018-02-14  Jim Wilson  <jimw@sifive.com>
18423
18424         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18425         first SMALL_OPERAND check.  New local min_second_step.  Move assert
18426         to where locals are set.  Add TARGET_RVC support.
18427         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18428
18429 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
18430
18431         * doc/invoke.texi: Correct -Wformat-overflow code sample.
18432
18433 2018-02-14  Martin Sebor  <msebor@redhat.com>
18434
18435         PR tree-optimization/83698
18436         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18437         arrays constrain the offset range to their bounds.
18438         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18439         (builtin_access::overlap): Avoid setting the size of overlap if it's
18440         already been set.
18441         (maybe_diag_overlap): Also consider arrays when deciding what values
18442         of offsets to include in diagnostics.
18443
18444 2018-02-14  Martin Sebor  <msebor@redhat.com>
18445
18446         PR c/84108
18447         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18448         that correspond to the kind of a declaration.
18449
18450 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
18451
18452         PR target/83984
18453         * config/pa/pa.md: Load address of PIC label using the linkage table
18454         if the label is nonlocal.
18455
18456 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18457
18458         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18459         warning message if user requests -maltivec=be.
18460         * doc/invoke.texi: Document deprecation of -maltivec=be.
18461
18462 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
18463
18464         PR target/84220
18465         * config/rs6000/rs6000-c.c: Update definitions for
18466         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18467         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18468
18469 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18470
18471         PR target/84239
18472         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18473         add _get_ssp intrinsics. Remove argument from
18474         __builtin_ia32_rdssp[d|q].
18475         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18476         * config/i386/i386-builtin.def: Remove argument from
18477         __builtin_ia32_rdssp[d|q].
18478         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18479         ix86_expand_special_args_builtin for _rdssp[d|q].
18480         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18481         Clear register before usage.
18482         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18483         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18484
18485 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18486
18487         PR tree-optimization/84357
18488         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18489         operand 1 of an ARRAY_REF too.
18490
18491 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18492
18493         PR target/83831
18494         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18495         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18496         declarations.
18497         (set_of_reg): New struct.
18498         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18499         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18500         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18501         functions.
18502         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18503         Split into bitclr, bitset, bitinvert patterns if appropriate.
18504         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18505         use rx_fuse_in_memory_bitop.
18506         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18507         to named insn, correct maximum insn length.
18508
18509 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18510
18511         PR target/79242
18512         * machmode.def: Define a complex mode for PARTIAL_INT.
18513         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18514         MODE_PARTIAL_INT.
18515         * doc/rtl.texi: Document CSPImode.
18516         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18517         handling.
18518         (msp430_hard_regno_nregs_with_padding): Likewise.
18519
18520 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18521
18522         PR target/84279
18523         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18524
18525 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18526
18527         PR rtl-optimization/84169
18528         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18529         we generated a parallel as new i3 and we split that to new i2 and i3
18530         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18531         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18532         those to i2, not i1.  Partially rewrite this scan code.
18533
18534 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18535
18536         PR c/82210
18537         * stor-layout.c (place_field): For variable length fields, adjust
18538         offset_align afterwards not just based on the field's alignment,
18539         but also on the size.
18540
18541         PR middle-end/84309
18542         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18543         of exps and logs in the use_exp2 case.
18544
18545 2018-02-13  Jeff Law  <law@redhat.com>
18546
18547         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18548         entry for "vector".
18549
18550         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18551         ARGS as unused.
18552
18553 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18554
18555         PR debug/84342
18556         PR debug/84319
18557         * common.opt (gas-loc-support, gas-locview-support): New.
18558         (ginline-points, ginternal-reset-location-views): New.
18559         * doc/invoke.texi: Document them.  Use @itemx where intended.
18560         (gvariable-location-views): Adjust.
18561         * target.def (reset_location_view): New.
18562         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18563         (TARGET_RESET_LOCATION_VIEW): New.
18564         * doc/tm.texi: Rebuilt.
18565         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18566         (dwarf2out_default_as_locview_support): New.
18567         (output_asm_line_debug_info): Use option variables.
18568         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18569         (output_loc_list): Likewise.
18570         (add_high_low_attributes): Check option variables.
18571         Don't output entry view attribute in strict mode.
18572         (gen_inlined_subroutine_die): Check option variables.
18573         (dwarf2out_inline_entry): Likewise.
18574         (init_sections_and_labels): Likewise.
18575         (dwarf2out_early_finish): Likewise.
18576         (maybe_reset_location_view): New, from...
18577         (dwarf2out_var_location): ... here.  Call it.
18578         * debug.h (dwarf2out_default_as_loc_support): Declare.
18579         (dwarf2out_default_as_locview_support): Declare.
18580         * hooks.c (hook_int_rtx_insn_0): New.
18581         * hooks.h (hook_int_rtx_insn_0): Declare.
18582         * toplev.c (process_options): Take -gas-loc-support and
18583         -gas-locview-support from dwarf2out.  Enable
18584         -gvariable-location-views by default only with locview
18585         assembler support.  Enable -ginternal-reset-location-views by
18586         default only if the target defines the corresponding hook.
18587         Enable -ginline-points by default if location views are
18588         enabled; force it disabled if statement frontiers are
18589         disabled.
18590         * tree-inline.c (expand_call_inline): Check option variables.
18591         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18592
18593 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18594
18595         PR tree-optimization/84321
18596         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18597         handling.  Also check whether the anti-range contains any values
18598         that satisfy the mask; switch to a VR_RANGE if not.
18599
18600 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18601
18602         PR sanitizer/84340
18603         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18604
18605 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18606
18607         PR c++/83990
18608         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18609         of call statements, also set location of a load to a temporary.
18610
18611 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18612
18613         * config/rl78/rl78.c (add_vector_labels): New function.
18614         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18615         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18616         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18617         which checks that no arguments are passed.
18618         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18619         * doc/extend.texi: Documentation for the new attribute.
18620
18621 2018-02-13  Andreas Schwab  <schwab@suse.de>
18622
18623         * config/riscv/linux.h (CPP_SPEC): Define.
18624
18625 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18626
18627         PR target/84335
18628         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18629         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18630         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18631         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18632         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18633         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18634         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18635         temporarily for AES and PCLMUL builtins.
18636
18637         PR tree-optimization/84339
18638         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18639         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18640         Formatting fixes.
18641
18642         PR middle-end/84309
18643         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18644         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18645         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18646         inline function.
18647         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18648         inline function.
18649         * omp-simd-clone.h: New file.
18650         * omp-simd-clone.c: Include omp-simd-clone.h.
18651         (expand_simd_clones): No longer static.
18652         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18653         cgraph.h and omp-simd-clone.h.
18654         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18655         (vect_recog_widen_shift_pattern): Formatting fix.
18656         (vect_pattern_recog_1): Don't check optab for calls.
18657
18658         PR target/84336
18659         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18660         operands[2] into a REG before using gen_lowpart on it.
18661
18662 2018-02-12  Jeff Law  <law@redhat.com>
18663
18664         PR target/83760
18665         * config/sh/sh.c (find_barrier): Consider a sibling call
18666         a barrier as well.
18667
18668         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18669         successfully back substituting a reg.
18670
18671 2018-02-12  Richard Biener  <rguenther@suse.de>
18672
18673         PR tree-optimization/84037
18674         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18675         parameter, move visited init to caller.
18676         (vect_slp_analyze_operations): Separate cost from validity
18677         check, initialize visited once for all instances.
18678         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18679         for all instances.
18680         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18681         out an assert.
18682         (vect_model_promotion_demotion_cost): Likewise.
18683         (vectorizable_bswap): Guard cost modeling with !slp_node
18684         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18685         SLP stmts.
18686         (vectorizable_call): Likewise.
18687         (vectorizable_conversion): Likewise.
18688         (vectorizable_assignment): Likewise.
18689         (vectorizable_shift): Likewise.
18690         (vectorizable_operation): Likewise.
18691         (vectorizable_store): Likewise.
18692         (vectorizable_load): Likewise.
18693         (vectorizable_condition): Likewise.
18694         (vectorizable_comparison): Likewise.
18695
18696 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18697
18698         PR sanitizer/84307
18699         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18700         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18701         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18702
18703 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18704
18705         PR middle-end/83665
18706         * params.def (inline-min-speedup): Increase from 8 to 15.
18707         (max-inline-insns-auto): Decrease from 40 to 30.
18708         * ipa-split.c (consider_split): Add some buffer for function to
18709         be considered inlining candidate.
18710         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18711         default values.
18712
18713 2018-02-12  Richard Biener  <rguenther@suse.de>
18714
18715         PR tree-optimization/84037
18716         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18717         matched stmts if we cannot swap the non-matched ones.
18718
18719 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18720
18721         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18722         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18723         _mm_maskz_scalef_round_ss): New intrinsics.
18724         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18725         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18726         __builtin_ia32_scalefss_round): Remove.
18727         (__builtin_ia32_scalefsd_mask_round,
18728         __builtin_ia32_scalefss_mask_round): New intrinsics.
18729         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18730         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18731         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18732         "<round_constraint>")): Changed to ...
18733         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18734         "<round_scalar_constraint>")): ... this.
18735         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18736         %0, %1, %2<round_op3>}"): Changed to ...
18737         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18738         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18739         %2<round_scalar_mask_op3>}"): ... this.
18740         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18741
18742 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18743
18744         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18745         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18746         (_mm_maskz_sqrt_round_ss): New intrinsics.
18747         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18748         (__builtin_ia32_sqrtsd_mask_round)
18749         (__builtin_ia32_sqrtss_mask_round): New builtins.
18750         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18751         (__builtin_ia32_sqrtss_round): Remove.
18752         (__builtin_ia32_sqrtsd_mask_round)
18753         (__builtin_ia32_sqrtss_mask_round): New builtins.
18754         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18755         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18756         ((match_operand:VF_128 1 "vector_operand"
18757         "xBm,<round_constraint>")): Changed to ...
18758         ((match_operand:VF_128 1 "vector_operand"
18759         "xBm,<round_scalar_constraint>")): ... this.
18760         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18761         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18762         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18763         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18764         %<iptr>1<round_scalar_mask_op3>}): ... this.
18765         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18766         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18767
18768 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18769
18770         PR target/84266
18771         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18772         Cast vec_cmpeq result to correct type.
18773         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18774         Cast vec_cmpgt result to correct type.
18775
18776 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18777
18778         * final.c (final_scan_insn_1): Renamed from...
18779         (final_scan_insn): ... this.  New wrapper, to recover
18780         seen from the outermost call in recursive ones.
18781         * config/sparc/sparc.c (output_return): Drop seen from call.
18782         (output_sibcall): Likewise.
18783         * config/visium/visium.c (output_branch): Likewise.
18784
18785 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18786
18787         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18788         function label.
18789
18790 2018-02-10  Alan Modra  <amodra@gmail.com>
18791
18792         PR target/84300
18793         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18794         Specify LR as an input.
18795
18796 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18797
18798         PR sanitizer/83987
18799         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18800         remove_member_access_dummy_vars): New functions.
18801         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18802         lower_omp_1, execute_lower_omp): Use them.
18803
18804         PR rtl-optimization/84308
18805         * shrink-wrap.c (spread_components): Release todo vector.
18806
18807 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18808
18809         PR rtl-optimization/57193
18810         * ira-color.c (struct allocno_color_data): Add member
18811         conflict_allocno_hard_prefs.
18812         (update_conflict_allocno_hard_prefs): New.
18813         (bucket_allocno_compare_func): Add a preference based on
18814         conflict_allocno_hard_prefs.
18815         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18816         (color_allocnos): Remove a dead code.  Initiate
18817         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18818
18819 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18820
18821         PR target/84226
18822         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18823         constraint from =wa to wa.  Avoid a subreg on the output operand,
18824         instead use a pseudo and subreg it in a move.
18825         (p9_xxbrd_<mode>): Changed to ...
18826         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18827         (p9_xxbrd_v2df): New expander.
18828         (p9_xxbrw_<mode>): Changed to ...
18829         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18830         (p9_xxbrw_v4sf): New expander.
18831
18832 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18833
18834         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18835
18836 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18837
18838         PR target/83926
18839         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18840         multiply in 32-bit mode.
18841         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18842         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18843         mode.
18844
18845 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18846
18847         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18848         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18849         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18850         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18851
18852 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18853
18854         PR lto/84213
18855         * dwarf2out.c (is_trivial_indirect_ref): New function.
18856         (dwarf2out_late_global_decl): Do not generate a location
18857         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18858         and that are not defined in the current unit.
18859
18860 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18861
18862         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18863         instead of a libcall for UNORDERED.
18864
18865 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18866
18867         PR target/82641
18868         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18869         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18870
18871 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18872
18873         PR target/PR84295
18874         * config/s390/s390.c (s390_set_current_function): Invoke
18875         s390_indirect_branch_settings also if fndecl didn't change.
18876
18877 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18878
18879         * config/rs6000/rs6000.md (blockage): Set length to zero.
18880
18881 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18882
18883         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18884
18885 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18886
18887         PR sanitizer/84285
18888         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18889         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18890         -static-lib*san.
18891
18892         PR debug/84252
18893         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18894         PARALLEL incoming that failed vt_get_decl_and_offset check.
18895
18896         PR middle-end/84237
18897         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18898         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18899         TREE_READONLY bit.
18900         (get_variable_section): For decls in named .bss* sections pass true as
18901         second argument to bss_initializer_p.
18902
18903 2018-02-09  Marek Polacek  <polacek@redhat.com>
18904             Jakub Jelinek  <jakub@redhat.com>
18905
18906         PR c++/83659
18907         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18908         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18909         Sync some changes from cxx_fold_indirect_ref.
18910
18911 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18912
18913         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18914         markers.
18915         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18916         (BLOCK_INLINE_ENTRY_LABEL): New.
18917         (dwarf2out_var_location): Disregard inline entry markers.
18918         (inline_entry_data): New struct.
18919         (inline_entry_data_hasher): New hashtable type.
18920         (inline_entry_data_hasher::hash): New.
18921         (inline_entry_data_hasher::equal): New.
18922         (inline_entry_data_table): New variable.
18923         (add_high_low_attributes): Add DW_AT_entry_pc and
18924         DW_AT_GNU_entry_view attributes if a pending entry is found
18925         in inline_entry_data_table.  Add old entry_pc attribute only
18926         if debug nonbinding markers are disabled.
18927         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18928         markers are enabled.
18929         (block_within_block_p, dwarf2out_inline_entry): New.
18930         (dwarf2out_finish): Check that no entries remained in
18931         inline_entry_data_table.
18932         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18933         (final_scan_insn, notice_source_line): Likewise.
18934         (rest_of_clean_state): Skip inline entry markers.
18935         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18936         markers.
18937         * gimple.c (gimple_build_debug_inline_entry): New.
18938         * gimple.h (enum gimple_debug_subcode): Add
18939         GIMPLE_DEBUG_INLINE_ENTRY.
18940         (gimple_build_debug_inline_entry): Declare.
18941         (gimple_debug_inline_entry_p): New.
18942         (gimple_debug_nonbind_marker_p): Adjust.
18943         * insn-notes.def (INLINE_ENTRY): New.
18944         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18945         inline entry marker notes.
18946         (print_insn): Likewise.
18947         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18948         (INSN_DEBUG_MARKER_KIND): Likewise.
18949         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18950         * tree-inline.c (expand_call_inline): Build and insert
18951         debug_inline_entry stmt.
18952         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18953         inline entry blocks early, if nonbind markers are enabled.
18954         (dump_scope_block): Dump fragment info.
18955         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18956         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18957         (gimple_build_debug_inline_entry): New.
18958         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18959         Enable/disable inline entry points too.
18960         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18961         (DEBUG_INSN): Describe inline entry markers.
18962
18963         * common.opt (gvariable-location-views): New.
18964         (gvariable-location-views=incompat5): New.
18965         * config.in: Rebuilt.
18966         * configure: Rebuilt.
18967         * configure.ac: Test assembler for view support.
18968         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18969         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18970         * dwarf2out.c (var_loc_view): New typedef.
18971         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18972         (dwarf2out_locviews_in_attribute): New.
18973         (dwarf2out_locviews_in_loclist): New.
18974         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18975         (enum dw_line_info_opcode): Add LI_adv_address.
18976         (struct dw_line_info_table): Add view.
18977         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18978         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18979         (zero_view_p): New variable.
18980         (ZERO_VIEW_P): New macro.
18981         (output_asm_line_debug_info): New.
18982         (struct var_loc_node): Add view.
18983         (add_AT_view_list, AT_loc_list): New.
18984         (add_var_loc_to_decl): Add view param.  Test it against last.
18985         (new_loc_list): Add view params.  Record them.
18986         (AT_loc_list_ptr): Handle loc and view lists.
18987         (view_list_to_loc_list_val_node): New.
18988         (print_dw_val): Handle dw_val_class_view_list.
18989         (size_of_die): Likewise.
18990         (value_format): Likewise.
18991         (loc_list_has_views): New.
18992         (gen_llsym): Set vl_symbol too.
18993         (maybe_gen_llsym, skip_loc_list_entry): New.
18994         (dwarf2out_maybe_output_loclist_view_pair): New.
18995         (output_loc_list): Output view list or entries too.
18996         (output_view_list_offset): New.
18997         (output_die): Handle dw_val_class_view_list.
18998         (output_dwarf_version): New.
18999         (output_compilation_unit_header): Use it.
19000         (output_skeleton_debug_sections): Likewise.
19001         (output_rnglists, output_line_info): Likewise.
19002         (output_pubnames, output_aranges): Update version comments.
19003         (output_one_line_info_table): Output view numbers in asm comments.
19004         (dw_loc_list): Determine current endview, pass it to new_loc_list.
19005         Call maybe_gen_llsym.
19006         (loc_list_from_tree_1): Adjust.
19007         (add_AT_location_description): Create view list attribute if
19008         needed, check it's absent otherwise.
19009         (convert_cfa_to_fb_loc_list): Adjust.
19010         (maybe_emit_file): Call output_asm_line_debug_info for test.
19011         (dwarf2out_var_location): Reset views as needed.  Precompute
19012         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
19013         attribute.  Set view.
19014         (new_line_info_table): Reset next view.
19015         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19016         (dwarf2out_source_line): Likewise.  Output view resets and labels to
19017         the assembler, or select appropriate line info opcodes.
19018         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19019         (optimize_string_length): Catch it.  Adjust.
19020         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
19021         dw_val_class_view_list, and remove it if no longer needed.
19022         (hash_loc_list): Hash view numbers.
19023         (loc_list_hasher::equal): Compare them.
19024         (optimize_location_lists): Check whether a view list symbol is
19025         needed, and whether the locview attribute is present, and
19026         whether they match.  Remove the locview attribute if no longer
19027         needed.
19028         (index_location_lists): Call skip_loc_list_entry for test.
19029         (dwarf2out_finish): Call output_asm_line_debug_info for test.
19030         Use output_dwarf_version.
19031         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19032         (struct dw_val_node): Add val_view_list.
19033         * final.c (SEEN_NEXT_VIEW): New.
19034         (set_next_view_needed): New.
19035         (clear_next_view_needed): New.
19036         (maybe_output_next_view): New.
19037         (final_start_function): Rename to...
19038         (final_start_function_1): ... this.  Take pointer to FIRST,
19039         add SEEN parameter.  Emit param bindings in the initial view.
19040         (final_start_function): Reintroduce SEEN-less interface.
19041         (final): Rename to...
19042         (final_1): ... this.  Take SEEN parameter.  Output final pending
19043         next view at the end.
19044         (final): Reintroduce seen-less interface.
19045         (final_scan_insn): Output pending next view before switching
19046         sections or ending a block.  Mark the next view as needed when
19047         outputting variable locations.  Notify debug backend of section
19048         changes, and of location view changes.
19049         (rest_of_handle_final): Adjust.
19050         * toplev.c (process_options): Autodetect value for debug variable
19051         location views option.  Warn on incompat5 without -gdwarf-5.
19052         * doc/invoke.texi (gvariable-location-views): New.
19053         (gvariable-location-views=incompat5): New.
19054         (gno-variable-location-views): New.
19055
19056 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
19057
19058         PR tree-optimization/84136
19059         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19060         that the result of find_edge is non-NULL.
19061
19062 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19063
19064         PR target/83008
19065         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19066         storing integer register in SImode.  Fix cost of 256 and 512
19067         byte aligned SSE register store.
19068
19069 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19070
19071         * config/i386/i386.c (ix86_multiplication_cost): Fix
19072         multiplication cost for TARGET_AVX512DQ.
19073
19074 2018-02-08  Marek Polacek  <polacek@redhat.com>
19075
19076         PR tree-optimization/84238
19077         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19078         get_range_strlen.
19079
19080 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19081
19082         PR tree-optimization/84265
19083         * tree-vect-stmts.c (vectorizable_store): Don't treat
19084         VMAT_CONTIGUOUS accesses as grouped.
19085         (vectorizable_load): Likewise.
19086
19087 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19088
19089         PR tree-optimization/81635
19090         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19091         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19092         (test_round_for_mask): New functions.
19093         (wide_int_cc_tests): Call test_round_for_mask.
19094         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19095         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19096         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19097         range returned by get_range_info.
19098
19099 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19100
19101         PR ipa/81360
19102         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19103         * symtab.c: Include builtins.h
19104         (symtab_node::output_to_lto_symbol_table_p): Move here
19105         from lto-streamer-out.c:output_symbol_p.
19106         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19107         (output_symbol_p): Move all logic to symtab.c
19108         (produce_symtab): Update.
19109
19110 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19111
19112         * config/s390/s390-opts.h (enum indirect_branch): Define.
19113         * config/s390/s390-protos.h (s390_return_addr_from_memory)
19114         (s390_indirect_branch_via_thunk)
19115         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19116         (enum s390_indirect_branch_type): Define.
19117         * config/s390/s390.c (struct s390_frame_layout, struct
19118         machine_function): Remove.
19119         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19120         (indirect_branch_table_label_no, indirect_branch_table_name):
19121         Define variables.
19122         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19123         (enum s390_indirect_branch_option): Define.
19124         (s390_return_addr_from_memory): New function.
19125         (s390_handle_string_attribute): New function.
19126         (s390_attribute_table): Add new attribute handler.
19127         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19128         (s390_indirect_branch_via_thunk): New function.
19129         (s390_indirect_branch_via_inline_thunk): New function.
19130         (s390_function_ok_for_sibcall): When jumping via thunk disallow
19131         sibling call optimization for non z10 compiles.
19132         (s390_emit_call): Force indirect branch target to be a single
19133         register.  Add r1 clobber for non-z10 compiles.
19134         (s390_emit_epilogue): Emit return jump via return_use expander.
19135         (s390_reorg): Handle JUMP_INSNs as execute targets.
19136         (s390_option_override_internal): Perform validity checks for the
19137         new command line options.
19138         (s390_indirect_branch_attrvalue): New function.
19139         (s390_indirect_branch_settings): New function.
19140         (s390_set_current_function): Invoke s390_indirect_branch_settings.
19141         (s390_output_indirect_thunk_function):  New function.
19142         (s390_code_end): Implement target hook.
19143         (s390_case_values_threshold): Implement target hook.
19144         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19145         macros.
19146         * config/s390/s390.h (struct s390_frame_layout)
19147         (struct machine_function): Move here from s390.c.
19148         (TARGET_INDIRECT_BRANCH_NOBP_RET)
19149         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19150         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19151         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19152         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19153         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19154         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19155         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19156         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19157         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19158         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19159         (mnemonic attribute): Add values which aren't recognized
19160         automatically.
19161         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19162         pattern for branch conversion.  Fix mnemonic attribute.
19163         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19164         indirect branch via thunk if requested.
19165         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19166         ("*indirect_jump"): Disable for branch conversion using out of
19167         line thunks.
19168         ("indirect_jump_via_thunk<mode>_z10")
19169         ("indirect_jump_via_thunk<mode>")
19170         ("indirect_jump_via_inlinethunk<mode>_z10")
19171         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19172         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19173         ("casesi_jump_via_inlinethunk<mode>_z10")
19174         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19175         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19176         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19177         ("*indirect2_jump"): Disable for branch conversion.
19178         ("casesi_jump"): Turn into expander and expand patterns for branch
19179         conversion.
19180         ("return_use"): New expander.
19181         ("*return"): Emit return via thunk and rename it to ...
19182         ("*return<mode>"): ... this one.
19183         * config/s390/s390.opt: Add new options and and enum for the
19184         option values.
19185
19186 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19187
19188         * lra-constraints.c (match_reload): Unconditionally use
19189         gen_lowpart_SUBREG, rather than selecting between that
19190         and equivalent gen_rtx_SUBREG code.
19191
19192 2018-02-08  Richard Biener  <rguenther@suse.de>
19193
19194         PR tree-optimization/84233
19195         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19196         changed flag instead of boguously re-using phi_inserted.
19197
19198 2018-02-08  Martin Jambor  <mjambor@suse.cz>
19199
19200         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19201         static local variables.
19202
19203 2018-02-08  Richard Biener  <rguenther@suse.de>
19204
19205         PR tree-optimization/84278
19206         * tree-vect-stmts.c (vectorizable_store): When looking for
19207         smaller vector types to perform grouped strided loads/stores
19208         make sure the mode is supported by the target.
19209         (vectorizable_load): Likewise.
19210
19211 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19212
19213         * config/aarch64/aarch64.c (aarch64_components_for_bb):
19214         Increase LDP/STP opportunities by adding adjacent callee-saves.
19215
19216 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19217
19218         PR rtl-optimization/84068
19219         PR rtl-optimization/83459
19220         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19221
19222 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
19223
19224         PR tree-optimization/84224
19225         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19226         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19227         non-zero arguments.
19228
19229 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
19230
19231         PR target/84113
19232         * config/rs6000/altivec.md (*restore_world): Remove LR use.
19233         * config/rs6000/predicates.md (restore_world_operation): Adjust op
19234         count, remove one USE.
19235
19236 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19237
19238         * doc/install.texi (Configuration): Document the
19239         --with-long-double-format={ibm,ieee} PowerPC configuration
19240         options.
19241
19242         PR target/84154
19243         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19244         Convert from define_expand to be define_insn_and_split.  Rework
19245         float/double/_Float128 conversions to QI/HI/SImode to work with
19246         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
19247         conversions to QI/HImode types did a store and then a load to
19248         truncate the value.  For conversions to VSX registers, don't split
19249         the insn, instead emit the code directly.  Use the code iterator
19250         any_fix to combine signed and unsigned conversions.
19251         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19252         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19253         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19254         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19255         (fix_<mode>di2_hw): Likewise.
19256         (fixuns_<mode>di2_hw): Likewise.
19257         (fix_<mode>si2_hw): Likewise.
19258         (fixuns_<mode>si2_hw): Likewise.
19259         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19260         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19261         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19262         fix<uns>_trunc<SFDF:mode>si2_p8.
19263         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19264         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19265         (fix<uns>_<mode>_mem): Likewise.
19266         (fctiw<u>z_<mode>_mem): Likewise.
19267         (fix<uns>_<mode>_mem): Likewise.
19268         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19269         the register allocator from doing a direct move to the GPRs to do
19270         a store, and instead use the ISA 3.0 store byte/half-word from
19271         vector register instruction.  For IEEE 128-bit floating point,
19272         also optimize stores of 32-bit ints.
19273         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19274
19275 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
19276
19277         * genextract.c (push_pathstr_operand): New function to support
19278         [a-zA-Z].
19279         (walk_rtx): Call push_pathstr_operand.
19280         (print_path): Support [a-zA-Z].
19281
19282 2018-02-07  Richard Biener  <rguenther@suse.de>
19283
19284         PR tree-optimization/84037
19285         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19286         (cse_and_gimplify_to_preheader): Declare.
19287         (vect_get_place_in_interleaving_chain): Likewise.
19288         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19289         ivexpr_map.
19290         (_loop_vec_info::~_loop_vec_info): Delete it.
19291         (cse_and_gimplify_to_preheader): New function.
19292         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19293         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19294         (vectorizable_load): Likewise.  For grouped stores always base
19295         the IV on the first element.
19296         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19297         condition before gimplifying.
19298
19299 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19300
19301         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19302         *DIV_EXPR and *MOD_EXPR.
19303
19304 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
19305
19306         PR target/84248
19307         * config/i386/i386.c (ix86_option_override_internal): Mask out
19308         the CF_SET bit when checking -fcf-protection.
19309
19310 2018-02-07  Tom de Vries  <tom@codesourcery.com>
19311
19312         PR libgomp/84217
19313         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19314         enough.
19315
19316 2018-02-07  Richard Biener  <rguenther@suse.de>
19317
19318         PR tree-optimization/84204
19319         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19320         this place.
19321
19322         PR tree-optimization/84205
19323         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19324         special-case isl_ast_op_zdiv_r.
19325
19326         PR tree-optimization/84223
19327         * graphite-scop-detection.c (gather_bbs::before_dom_children):
19328         Only add conditions from within the region.
19329         (gather_bbs::after_dom_children): Adjust.
19330
19331 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
19332
19333         PR target/84209
19334         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19335         * config/avr/avr.md: Only post-reload split REG-REG moves if
19336         either register is GENERAL_REG_P.
19337
19338 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19339
19340         PR tree-optimization/84235
19341         * tree-ssa-scopedtables.c
19342         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19343         if the subtraction is performed in floating point type where NaNs are
19344         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19345         build 1.  Formatting fix.
19346
19347 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
19348
19349         PR target/84146
19350         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19351         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19352         and skip it regardless of bb boundaries.  Use CALL_P macro,
19353         don't test INSN_P (insn) together with CALL_P or JUMP_P check
19354         unnecessarily, formatting fix.
19355
19356 2018-02-06  Michael Collison  <michael.collison@arm.com>
19357
19358         * config/arm/thumb2.md:
19359         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19360         (*thumb_mov_notscc): Ditto.
19361
19362 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
19363
19364         PR target/84154
19365         * config/rs6000/rs6000.md (su code attribute): Use "u" for
19366         unsigned_fix, not "s".
19367
19368 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19369
19370         * configure.ac (gcc_fn_eh_frame_ro): New function.
19371         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19372         correct .eh_frame permissions.
19373         * configure: Regenerate.
19374
19375 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
19376
19377         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19378         irrelevant options.
19379
19380 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19381
19382         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19383         Display warning message for -mno-speculate-indirect-jumps.
19384
19385 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
19386
19387         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19388         Undocumented.
19389         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19390
19391 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
19392
19393         PR tree-optimization/84225
19394         * tree-eh.c (find_trapping_overflow): Only call
19395         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19396
19397 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19398
19399         PR target/84145
19400         * config/i386/i386.c: Reimplement the check of possible options
19401         -mibt/-mshstk conbination. Change error messages.
19402         * doc/invoke.texi: Fix a typo: remove extra '='.
19403
19404 2018-02-06  Marek Polacek  <polacek@redhat.com>
19405
19406         PR tree-optimization/84228
19407         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19408
19409 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
19410
19411         PR target/82641
19412         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19413         emitted arch directives.
19414         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19415         __ARM_FEATURE_COPROC before changing architectures.
19416
19417 2018-02-06  Richard Biener  <rguenther@suse.de>
19418
19419         * config/i386/i386.c (print_reg): Fix typo.
19420         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19421
19422 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
19423
19424         * configure: Regenerate.
19425
19426 2018-02-05  Martin Sebor  <msebor@redhat.com>
19427
19428         PR tree-optimization/83369
19429         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19430         inlining context.
19431
19432 2018-02-05  Martin Liska  <mliska@suse.cz>
19433
19434         * doc/invoke.texi: Cherry-pick upstream r323995.
19435
19436 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
19437
19438         * ira.c (ira_init_register_move_cost): Adjust comment.
19439
19440 2018-02-05  Martin Liska  <mliska@suse.cz>
19441
19442         PR gcov-profile/84137
19443         * doc/gcov.texi: Fix typo in documentation.
19444
19445 2018-02-05  Martin Liska  <mliska@suse.cz>
19446
19447         PR gcov-profile/83879
19448         * doc/gcov.texi: Document necessity of --dynamic-list-data when
19449         using dlopen functionality.
19450
19451 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
19452
19453         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19454         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19455         _mm_maskz_range_ss, _mm_mask_range_round_ss,
19456         _mm_maskz_range_round_ss): New intrinsics.
19457         (__builtin_ia32_rangesd128_round)
19458         (__builtin_ia32_rangess128_round): Remove.
19459         (__builtin_ia32_rangesd128_mask_round,
19460         __builtin_ia32_rangess128_mask_round): New builtins.
19461         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19462         __builtin_ia32_rangess128_round): Remove.
19463         (__builtin_ia32_rangesd128_mask_round,
19464         __builtin_ia32_rangess128_mask_round): New builtins.
19465         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19466         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19467         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19468         "<round_saeonly_constraint>")): Changed to ...
19469         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19470         "<round_saeonly_scalar_constraint>")): ... this.
19471         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19472         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19473         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19474         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19475         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19476
19477 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
19478
19479         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19480         options.
19481         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19482         Remove all values except native, 8540 and 8548.
19483
19484 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19485
19486         * config/i386/i386.c (ix86_output_function_return): Pass
19487         INVALID_REGNUM, instead of -1, as invalid register number to
19488         indirect_thunk_name and output_indirect_thunk.
19489
19490 2018-02-02  Julia Koval  <julia.koval@intel.com>
19491
19492         * config.gcc: Add -march=icelake.
19493         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19494         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19495         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19496         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19497         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19498         (processor_target_table): Add icelake.
19499         (ix86_option_override_internal): Handle new PTAs.
19500         (get_builtin_code_for_version): Handle icelake.
19501         (M_INTEL_COREI7_ICELAKE): New.
19502         (fold_builtin_cpu): Handle icelake.
19503         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19504         * doc/invoke.texi: Add -march=icelake.
19505
19506 2018-02-02  Julia Koval  <julia.koval@intel.com>
19507
19508         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19509         to wide_int_bitmask.
19510         * wide-int-bitmask.h: New.
19511
19512 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19513
19514         PR target/84066
19515         * config/i386/i386.md: Replace Pmode with word_mode in
19516         builtin_setjmp_setup and builtin_longjmp to support x32.
19517
19518 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19519
19520         PR target/56010
19521         PR target/83743
19522         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19523         #include "opts.h".
19524         (rs6000_supported_cpu_names): New static variable.
19525         (linux_cpu_translation_table): Likewise.
19526         (elf_platform) <cpu>: Define new static variable and use it.
19527         Translate kernel AT_PLATFORM name to canonical name if needed.
19528         Error if platform name is unknown.
19529
19530 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19531
19532         PR target/84089
19533         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19534
19535 2018-02-01  Jeff Law  <law@redhat.com>
19536
19537         PR target/84128
19538         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19539         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19540         the scratch if RELEASE_VIA_POP is false.
19541         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19542         If we have to save a temporary register, decrement SIZE appropriately.
19543         Pass new arguments to release_scratch_register_on_entry.
19544         (ix86_adjust_stack_and_probe): Likewise.
19545         (ix86_emit_probe_stack_range): Pass new arguments to
19546         release_scratch_register_on_entry.
19547
19548 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19549
19550         PR rtl-optimization/84157
19551         * combine.c (change_zero_ext): Use REG_P predicate in
19552         front of HARD_REGISTER_P predicate.
19553
19554 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19555
19556         * config/avr/avr.c (avr_option_override): Move disabling of
19557         -fdelete-null-pointer-checks to...
19558         * common/config/avr/avr-common.c (avr_option_optimization_table):
19559         ...here.
19560
19561 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19562
19563         PR tree-optimization/81635
19564         * tree-data-ref.c (split_constant_offset_1): For types that
19565         wrap on overflow, try to use range info to prove that wrapping
19566         cannot occur.
19567
19568 2018-02-01  Renlin Li  <renlin.li@arm.com>
19569
19570         PR target/83370
19571         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19572         TAILCALL_ADDR_REGS.
19573         (aarch64_register_move_cost): Likewise.
19574         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19575         TAILCALL_ADDR_REGS.
19576         (REG_CLASS_NAMES): Likewise.
19577         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19578         TAILCALL_ADDR_REGS. Remove IP registers.
19579         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19580
19581 2018-02-01  Richard Biener  <rguenther@suse.de>
19582
19583         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19584         for specifying RPO order and allow NULL for that.
19585         * domwalk.c (dom_walker::dom_walker): Likewise.
19586         (dom_walker::walk): Handle NULL RPO order.
19587         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19588         in RPO order.
19589         (rewrite_update_dom_walker): Likewise.
19590         (mark_def_dom_walker): Likewise.
19591
19592 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19593
19594         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19595         (aarch64_maybe_expand_sve_subreg_move): Declare.
19596         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19597         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19598         predicate.
19599         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19600         that are semantically a reverse operation.
19601         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19602         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19603         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19604         functions.
19605         (aarch64_can_change_mode_class): For big-endian, forbid changes
19606         between two SVE modes if they have different element sizes.
19607
19608 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19609
19610         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19611         the TImode handling for big-endian targets.
19612
19613 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19614
19615         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19616         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19617         not just bytes.
19618         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19619         Remove BSWAP handing for big-endian targets and use the form of
19620         LD1RQ appropariate for the mode.
19621
19622 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19623
19624         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19625         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19626         duplicated element.
19627
19628 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19629
19630         PR tearget/83845
19631         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19632         check for operands that need to go through aarch64_sve_reload_be.
19633
19634 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19635
19636         PR tree-optimization/81661
19637         PR tree-optimization/84117
19638         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19639         * tree-eh.c: Include gimplify.h.
19640         (find_trapping_overflow, replace_trapping_overflow,
19641         rewrite_to_non_trapping_overflow): New functions.
19642         * tree-vect-loop.c: Include tree-eh.h.
19643         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19644         * tree-data-ref.c: Include tree-eh.h.
19645         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19646
19647 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19648
19649         PR rtl-optimization/84123
19650         * combine.c (change_zero_ext): Check if hard register satisfies
19651         can_change_dest_mode before calling gen_lowpart_SUBREG.
19652
19653 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19654
19655         PR target/82444
19656         * ira.c (ira_init_register_move_cost): Remove assert.
19657
19658 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19659
19660         PR rtl-optimization/84071
19661         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19662         * doc/tm.texi: Regenerate.
19663
19664 2018-01-31  Richard Biener  <rguenther@suse.de>
19665
19666         PR tree-optimization/84132
19667         * tree-data-ref.c (analyze_miv_subscript): Properly
19668         check whether evolution_function_is_affine_multivariate_p
19669         before calling gcd_of_steps_may_divide_p.
19670
19671 2018-01-31  Julia Koval  <julia.koval@intel.com>
19672
19673         PR target/83618
19674         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19675         * config/i386/i386.md (rdpid_rex64) New.
19676         (rdpid): Make 32bit only.
19677
19678 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19679
19680         PR lto/84105
19681         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19682         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19683
19684 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19685
19686         Revert
19687         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19688
19689         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19690
19691 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19692
19693         PR rtl-optimization/84071
19694         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19695         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19696
19697 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19698
19699         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19700         (arc_attribute_table): Add 'aux' attribute.
19701         (arc_in_small_data_p): Consider aux like variables.
19702         (arc_is_aux_reg_p): New function.
19703         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19704         (arc_get_aux_arg): New function.
19705         (prepare_move_operands): Handle aux-register access.
19706         (arc_handle_aux_attribute): New function.
19707         * doc/extend.texi (ARC Variable attributes): Add subsection.
19708
19709 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19710
19711         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19712         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19713         (arc_attribute_table): Add 'uncached' attribute.
19714         (arc_print_operand): Print '.di' flag for uncached memory
19715         accesses.
19716         (arc_in_small_data_p): Do not consider for small data the uncached
19717         types.
19718         (arc_is_uncached_mem_p): New function.
19719         * config/arc/predicates.md (compact_store_memory_operand): Check
19720         for uncached memory accesses.
19721         (nonvol_nonimm_operand): Likewise.
19722         * doc/extend.texi (ARC Type Attribute): New subsection.
19723
19724 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19725
19726         PR c/84100
19727         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19728         falign-loops=): Add Optimization flag.
19729
19730 2018-01-30  Jeff Law  <law@redhat.com>
19731
19732         PR target/84064
19733         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19734         INT_REGISTERS_SAVED.  Check it prior to calling
19735         get_scratch_register_on_entry.
19736         (ix86_adjust_stack_and_probe): Similarly.
19737         (ix86_emit_probe_stack_range): Similarly.
19738         (ix86_expand_prologue): Corresponding changes.
19739
19740 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19741
19742         PR target/40411
19743         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19744         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19745
19746 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19747
19748         PR target/84112
19749         * lra-constraints.c (curr_insn_transform): Process AND in the
19750         address.
19751
19752 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19753
19754         PR rtl-optimization/83986
19755         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19756         dependence against last_pending_memory_flush in addition to
19757         pending_jump_insns.
19758
19759 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19760
19761         PR tree-optimization/81611
19762         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19763         copies.
19764
19765 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19766
19767         PR target/83758
19768         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19769         a reg rtx.
19770
19771 2018-01-30  Richard Biener  <rguenther@suse.de>
19772             Jakub Jelinek  <jakub@redhat.com>
19773
19774         PR tree-optimization/84111
19775         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19776         inner loops added during recursion, as they don't have up-to-date
19777         SSA form.
19778
19779 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19780
19781         PR ipa/81360
19782         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19783         (can_inline_edge_by_limits_p): ... here.
19784         (can_early_inline_edge_p, check_callers,
19785         update_caller_keys, update_callee_keys, recursive_inlining,
19786         add_new_edges_to_heap, speculation_useful_p,
19787         inline_small_functions,
19788         inline_small_functions, flatten_function,
19789         inline_to_all_callers_1): Update.
19790
19791 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19792
19793         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19794         zeros correctly.
19795
19796 2018-01-30  Richard Biener  <rguenther@suse.de>
19797
19798         PR tree-optimization/83008
19799         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19800         invariant and constant vector uses in stmts when they need
19801         more than one stmt.
19802
19803 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19804
19805         PR bootstrap/84017
19806         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19807         * configure: Regenerate.
19808
19809 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19810
19811         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19812         pattern.
19813         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19814         Use gen_rtx_REG rather than gen_lowpart.
19815
19816 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19817
19818         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19819         rather than 0 when creating partial subregs.
19820
19821 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19822
19823         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19824         of usage.
19825
19826 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19827
19828         PR target/81550
19829         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19830         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19831         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19832         flags.  This restores the settings used before the 2017-07-24.
19833         Turning off pre increment/decrement/modify allows IVOPTS to
19834         optimize DF/SF loops where the index is an int.
19835
19836 2018-01-29  Richard Biener  <rguenther@suse.de>
19837             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19838
19839         PR bootstrap/80867
19840         * tree-vect-stmts.c (vectorizable_call): Don't call
19841         targetm.vectorize_builtin_md_vectorized_function if callee is
19842         NULL.
19843
19844 2018-01-22  Carl Love  <cel@us.ibm.com>
19845
19846         * doc/extend.tex: Fix typo in second arg in
19847         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19848
19849 2018-01-29  Richard Biener  <rguenther@suse.de>
19850
19851         PR tree-optimization/84086
19852         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19853         (flush_ssaname_freelist): When SSA names were released reset
19854         the SCEV hash table.
19855
19856 2018-01-29  Richard Biener  <rguenther@suse.de>
19857
19858         PR tree-optimization/84057
19859         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19860         removed paths when removing edges.
19861
19862 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19863
19864         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19865         -mfunction-return=@var{choice}.
19866
19867 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19868
19869         PR diagnostic/84034
19870         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19871         Handle CR like TAB.
19872         (layout::print_source_line): Likewise.
19873         (test_get_line_width_without_trailing_whitespace): Add test cases.
19874
19875 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19876
19877         PR middle-end/84040
19878         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19879         debug insns.
19880
19881 2018-01-26  Jim Wilson  <jimw@sifive.com>
19882
19883         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19884
19885         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19886         specified.
19887
19888 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19889
19890         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19891         and CMP + SUB-immediate -> SUBS.
19892
19893 2018-01-26  Martin Sebor  <msebor@redhat.com>
19894
19895         PR tree-optimization/83896
19896         * tree-ssa-strlen.c (get_string_len): Rename...
19897         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19898         Avoid assuming length is constant.
19899         (handle_char_store): Use HOST_WIDE_INT for string length.
19900
19901 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19902
19903         PR target/81763
19904         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19905         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19906
19907 2018-01-26  Richard Biener  <rguenther@suse.de>
19908
19909         PR rtl-optimization/84003
19910         * dse.c (record_store): Only record redundant stores when
19911         the earlier store aliases at least all accesses the later one does.
19912
19913 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19914
19915         PR rtl-optimization/83985
19916         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19917         REG_CFA_RESTORE insns.
19918         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19919         REG_CFA_RESTORE insns here.
19920
19921         PR c/83989
19922         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19923         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19924
19925 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19926
19927         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19928         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19929         (arc_init): Likewise.
19930         (arc_override_options): Likewise.
19931         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19932         value.
19933         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19934         support.
19935         * config/arc/arc.h (TARGET_DBNZ): Define.
19936         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19937         properly set the tune attribute.
19938         (dbnz): Use TARGET_DBNZ guard.
19939         * config/arc/arc.opt (mtune): Add core3 option.
19940
19941 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19942
19943         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19944         recognize new pic like addresses.
19945         (arc_delegitimize_address): Clean up.
19946
19947 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19948
19949         * config/arc/arc-arches.def: Option mrf16 valid for all
19950         architectures.
19951         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19952         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19953         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19954         * config/arc/arc-tables.opt: Regenerate.
19955         * config/arc/arc.c (arc_conditional_register_usage): Handle
19956         reduced register file case.
19957         (arc_file_start): Set must have build attributes.
19958         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19959         mrf16 option value.
19960         * config/arc/arc.opt (mrf16): Add new option.
19961         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19962         * config/arc/genmultilib.awk: Handle new mrf16 option.
19963         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19964         * config/arc/t-multilib: Regenerate.
19965         * doc/invoke.texi (ARC Options): Document mrf16 option.
19966
19967 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19968
19969         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19970         * config/arc/arc.c (arc_handle_secure_attribute): New function.
19971         (arc_attribute_table): Add 'secure_call' attribute.
19972         (arc_print_operand): Print secure call operand.
19973         (arc_function_ok_for_sibcall): Don't optimize tail calls when
19974         secure.
19975         (arc_is_secure_call_p): New function.  * config/arc/arc.md
19976         (call_i): Add support for sjli instruction.
19977         (call_value_i): Likewise.
19978         * config/arc/constraints.md (Csc): New constraint.
19979
19980 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19981             John Eric Martin  <John.Martin@emmicro-us.com>
19982
19983         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19984         * config/arc/arc.c (_arc_jli_section): New struct.
19985         (arc_jli_section): New type.
19986         (rc_jli_sections): New static variable.
19987         (arc_handle_jli_attribute): New function.
19988         (arc_attribute_table): Add jli_always and jli_fixed attribute.
19989         (arc_file_end): New function.
19990         (TARGET_ASM_FILE_END): Define.
19991         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19992         (arc_add_jli_section): New function.
19993         (jli_call_scan): Likewise.
19994         (arc_reorg): Call jli_call_scan.
19995         (arc_output_addsi): Remove 'S' from printing asm operand.
19996         (arc_is_jli_call_p): New function.
19997         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19998         operand.
19999         (movhi_insn): Likewise.
20000         (movsi_insn): Likewise.
20001         (movsi_set_cc_insn): Likewise.
20002         (loadqi_update): Likewise.
20003         (load_zeroextendqisi_update): Likewise.
20004         (load_signextendqisi_update): Likewise.
20005         (loadhi_update): Likewise.
20006         (load_zeroextendhisi_update): Likewise.
20007         (load_signextendhisi_update): Likewise.
20008         (loadsi_update): Likewise.
20009         (loadsf_update): Likewise.
20010         (movsicc_insn): Likewise.
20011         (bset_insn): Likewise.
20012         (bxor_insn): Likewise.
20013         (bclr_insn): Likewise.
20014         (bmsk_insn): Likewise.
20015         (bicsi3_insn): Likewise.
20016         (cmpsi_cc_c_insn): Likewise.
20017         (movsi_ne): Likewise.
20018         (movsi_cond_exec): Likewise.
20019         (clrsbsi2): Likewise.
20020         (norm_f): Likewise.
20021         (normw): Likewise.
20022         (swap): Likewise.
20023         (divaw): Likewise.
20024         (flag): Likewise.
20025         (sr): Likewise.
20026         (kflag): Likewise.
20027         (ffs): Likewise.
20028         (ffs_f): Likewise.
20029         (fls): Likewise.
20030         (call_i): Remove 'S' asm letter, add jli instruction.
20031         (call_value_i): Likewise.
20032         * config/arc/arc.op (mjli-always): New option.
20033         * config/arc/constraints.md (Cji): New constraint.
20034         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20035         operand.
20036         (subsf3_fpx): Likewise.
20037         (mulsf3_fpx): Likewise.
20038         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20039         asm operand.
20040         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20041         function attrbutes.
20042         * doc/invoke.texi (ARC): Document mjli-always option.
20043
20044 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
20045
20046         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20047         avoid addition with 0 and use incw and decw where possible.
20048
20049 2018-01-26  Richard Biener  <rguenther@suse.de>
20050
20051         PR tree-optimization/81082
20052         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20053         association if it requires casting to unsigned.
20054         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20055         from fold_plusminus_mult_expr to catch important cases late when
20056         range info is available.
20057
20058 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20059
20060         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20061         * configure.ac (hidden_linkonce): New test.
20062         * configure: Regenerate.
20063         * config.in: Regenerate.
20064
20065 2018-01-26  Julia Koval  <julia.koval@intel.com>
20066
20067         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20068         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20069         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20070         _mm_mask_bitshuffle_epi64_mask): Fix type.
20071         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20072         USI_FTYPE_V4DI_V4DI_USI): Remove.
20073         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20074         __builtin_ia32_vpshufbitqmb256_mask,
20075         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20076         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20077         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20078
20079 2018-01-26  Alan Modra  <amodra@gmail.com>
20080
20081         PR target/84033
20082         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20083         UNSPEC_VBPERMQ.  Sort other unspecs.
20084
20085 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
20086
20087         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20088
20089 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
20090
20091         PR middle-end/83055
20092         * predict.c (drop_profile): Do not push/pop cfun; update also
20093         node->count.
20094         (handle_missing_profiles): Fix logic looking for zero profiles.
20095
20096 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
20097
20098         PR middle-end/83977
20099         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20100         on functions with #pragma omp declare simd or functions with simd
20101         attribute.
20102         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20103         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20104         Remove trailing \n from warning_at calls.
20105
20106 2018-01-25  Tom de Vries  <tom@codesourcery.com>
20107
20108         PR target/84028
20109         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20110         for neutered workers.
20111
20112 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
20113
20114         PR target/68467
20115         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20116         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20117
20118 2018-01-24  Jeff Law  <law@redhat.com>
20119
20120         PR target/83994
20121         * i386.c (get_probe_interval): Move to earlier point.
20122         (ix86_compute_frame_layout): If -fstack-clash-protection and
20123         the frame is larger than the probe interval, then use pushes
20124         to save registers rather than reg->mem moves.
20125         (ix86_expand_prologue): Remove conditional for int_registers_saved
20126         assertion.
20127
20128 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
20129
20130         PR target/84014
20131         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20132         min/max for never referenced object.
20133
20134 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
20135
20136         PR middle-end/83977
20137         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20138         here.
20139         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20140         attributes from DECL_ATTRIBUTES (decl) without affecting
20141         DECL_ATTRIBUTES (current_function_decl).
20142         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20143         functions with non-NULL DECL_ABSTRACT_ORIGIN.
20144
20145 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
20146
20147         PR tree-optimization/83979
20148         * fold-const.c (fold_comparison): Use constant_boolean_node
20149         instead of boolean_{true,false}_node.
20150
20151 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
20152
20153         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20154         with zero counts.
20155
20156 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20157
20158         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20159         Simplify the clause that sets the length attribute.
20160         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20161         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20162         clause that sets the length attribute.
20163         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20164
20165 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20166
20167         PR target/83589
20168         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20169         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20170         Add strict parameter.
20171         (prevent_branch_around_nothing): Insert dummy insn between branch to
20172         label and label with no ptx insn inbetween.
20173         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20174
20175 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20176
20177         PR target/81352
20178         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20179         for neutered threads in warp.
20180         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20181
20182 2018-01-24  Richard Biener  <rguenther@suse.de>
20183
20184         PR tree-optimization/83176
20185         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20186         operands.
20187
20188 2018-01-24  Richard Biener  <rguenther@suse.de>
20189
20190         PR tree-optimization/82819
20191         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20192         code generating pluses that are no-ops in the target precision.
20193
20194 2018-01-24  Richard Biener  <rguenther@suse.de>
20195
20196         PR middle-end/84000
20197         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20198
20199 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20200
20201         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20202         to merge probabilities.
20203         * predict.c (probably_never_executed): Also mark as cold functions
20204         with global 0 profile and guessed local profile.
20205         * profile-count.c (profile_probability::combine_with_count): New
20206         member function.
20207         * profile-count.h (profile_probability::operator*,
20208         profile_probability::operator*=, profile_probability::operator/,
20209         profile_probability::operator/=): Reduce precision to adjusted
20210         and set value to guessed on contradictory divisions.
20211         (profile_probability::combine_with_freq): Remove.
20212         (profile_probability::combine_wiht_count): Declare.
20213         (profile_count::force_nonzero):: Set to adjusted.
20214         (profile_count::probability_in):: Set quality to adjusted.
20215         * tree-ssa-tail-merge.c (replace_block_by): Use
20216         combine_with_count.
20217
20218 2018-01-23  Andrew Waterman  <andrew@sifive.com>
20219             Jim Wilson  <jimw@sifive.com>
20220
20221         * config/riscv/riscv.c (riscv_stack_boundary): New.
20222         (riscv_option_override): Set riscv_stack_boundary.  Handle
20223         riscv_preferred_stack_boundary_arg.
20224         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20225         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20226         (STACK_BOUNDARY): Set to riscv_stack_boundary.
20227         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20228         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20229         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20230
20231 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
20232
20233         PR target/83905
20234         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20235         of struct ix86_frame.
20236         (ix86_expand_epilogue): Likewise.  Add a local variable for
20237         the reg_save_offset field in struct ix86_frame.
20238
20239 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
20240
20241         PR tree-optimization/82604
20242         * tree-loop-distribution.c (enum partition_kind): New enum item
20243         PKIND_PARTIAL_MEMSET.
20244         (partition_builtin_p): Support above new enum item.
20245         (generate_code_for_partition): Ditto.
20246         (compute_access_range): Differentiate cases that equality can be
20247         proven at all loops, the innermost loops or no loops.
20248         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20249         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
20250         (finalize_partitions, distribute_loop): Don't fuse partition of
20251         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20252         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20253         parloop is enabled.
20254
20255 2018-01-23  Martin Liska  <mliska@suse.cz>
20256
20257         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20258         order to ignore the predictor.
20259         (PRED_POLYMORPHIC_CALL): Likewise.
20260         (PRED_RECURSIVE_CALL): Likewise.
20261
20262 2018-01-23  Martin Liska  <mliska@suse.cz>
20263
20264         * tree-profile.c (tree_profiling): Print function header to
20265         aware reader which function we are working on.
20266         * value-prof.c (gimple_find_values_to_profile): Do not print
20267         not interesting value histograms.
20268
20269 2018-01-23  Martin Liska  <mliska@suse.cz>
20270
20271         * profile-count.h (enum profile_quality): Add
20272         profile_uninitialized as the first value. Do not number values
20273         as they are zero based.
20274         (profile_count::verify): Update sanity check.
20275         (profile_probability::verify): Likewise.
20276
20277 2018-01-23  Nathan Sidwell  <nathan@acm.org>
20278
20279         * doc/invoke.texi (ffor-scope): Deprecate.
20280
20281 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20282
20283         PR tree-optimization/83510
20284         * domwalk.c (set_all_edges_as_executable): New function.
20285         (dom_walker::dom_walker): Convert bool param
20286         "skip_unreachable_blocks" to enum reachability.  Move setup of
20287         edge flags to set_all_edges_as_executable and only do it when
20288         reachability is REACHABLE_BLOCKS.
20289         * domwalk.h (enum dom_walker::reachability): New enum.
20290         (dom_walker::dom_walker): Convert bool param
20291         "skip_unreachable_blocks" to enum reachability.
20292         (set_all_edges_as_executable): New decl.
20293         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
20294         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20295         "reachability".
20296         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20297         but converting true to REACHABLE_BLOCKS.
20298         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20299         * tree-vrp.c
20300         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20301         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20302         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20303         REACHABLE_BLOCKS.
20304         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20305         if check_all_array_refs will be called.
20306
20307 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20308
20309         * tree.c (selftest::test_location_wrappers): Add more test
20310         coverage.
20311
20312 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20313
20314         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20315         (selftest::test_bit_in_range): Likewise.
20316
20317 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20318
20319         PR testsuite/83888
20320         * doc/sourcebuild.texi (vect_float): Say that the selector
20321         only describes the situation when -funsafe-math-optimizations is on.
20322         (vect_float_strict): Document.
20323
20324 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20325
20326         PR tree-optimization/83965
20327         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20328         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20329         instead of checking only for a reduction.
20330         (vect_recog_widen_sum_pattern): Likewise.
20331
20332 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20333
20334         * predict.c (probably_never_executed): Only use precise profile info.
20335         (compute_function_frequency): Skip after inlining hack since we now
20336         have quality checking.
20337
20338 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20339
20340         * profile-count.h (profile_probability::very_unlikely,
20341         profile_probability::unlikely, profile_probability::even): Set
20342         precision to guessed.
20343
20344 2018-01-23  Richard Biener  <rguenther@suse.de>
20345
20346         PR tree-optimization/83963
20347         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20348         Properly terminate dominator walk when crossing the exit edge not
20349         when visiting its source block.
20350
20351 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
20352
20353         PR c++/83918
20354         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20355         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20356
20357 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
20358
20359         PR tree-optimization/83957
20360         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
20361         semicolon after for body surrounded by braces.
20362
20363         PR tree-optimization/83081
20364         * profile-count.h (profile_probability::split): New method.
20365         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20366         Use profile_probability::split.
20367         (do_compare_rtx_and_jump): Fix adjustment of probabilities
20368         when splitting a single conditional jump into 2.
20369
20370 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
20371
20372         PR tree-optimization/69452
20373         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20374         decl.
20375
20376 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20377
20378         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20379         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20380         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20381
20382 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20383
20384         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20385         declaration.
20386         * config/rl78/rl78.md (movdi): New define_expand.
20387         * config/rl78/rl78.c (rl78_split_movdi): New function.
20388
20389 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20390
20391         PR target/83862
20392         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20393         no longer used.
20394         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20395         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20396         128-bit to produce an UNSPEC move to get the double word with the
20397         signbit and then a shift directly to do signbit.
20398         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20399         implementation with a new version that just does either a direct
20400         move or a regular move.  Move memory interface to separate insns.
20401         Move insns so they are next to the expander.
20402         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20403         with signbit move.  Split big and little endian case.
20404         (signbit<mode>2_dm_mem_le): Likewise.
20405         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20406         (signbit<mode>2_dm2): Likewise.
20407
20408 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20409
20410         * config/rl78/rl78.md (anddi3): New define_expand.
20411
20412 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20413
20414         * config/rl78/rl78.md (umindi3): New define_expand.
20415
20416 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20417
20418         * config/rl78/rl78.md (smindi3): New define_expand.
20419
20420 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20421
20422         * config/rl78/rl78.md (smaxdi3): New define_expand.
20423
20424 2018-01-22  Carl Love  <cel@us.ibm.com>
20425
20426         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20427         LVX_V1TI): Add macro expansion.
20428         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20429         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20430         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20431         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20432         Change check to determine if the instruction is a byte reversing
20433         entry.  Fix typo in comment.
20434         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20435         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20436         Add def_builtin calls for new builtins.
20437         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20438         Add define_insn expansion.
20439
20440 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20441
20442         * config/rl78/rl78.md (umaxdi3): New define_expand.
20443
20444 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20445
20446         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20447         for non-QImode registers.
20448
20449 2018-01-22  Richard Biener  <rguenther@suse.de>
20450
20451         PR tree-optimization/83963
20452         * graphite-scop-detection.c (scop_detection::get_sese): Delay
20453         including the loop exit block.
20454         (scop_detection::merge_sese): Likewise.
20455         (scop_detection::add_scop): Do it here instead.
20456
20457 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20458
20459         * doc/sourcebuild.texi (arm_softfloat): Document.
20460
20461 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
20462
20463         PR gcc/77734
20464         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20465         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20466         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20467
20468 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20469             David Edelsohn  <dje.gcc@gmail.com>
20470
20471         PR target/83946
20472         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20473         Change "crset eq" to "crset 2".
20474         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20475         (*call_indirect_aix<mode>_nospec): Likewise.
20476         (*call_value_indirect_aix<mode>_nospec): Likewise.
20477         (*call_indirect_elfv2<mode>_nospec): Likewise.
20478         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20479         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20480         change assembly output from . to $.
20481         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20482         (indirect_jump<mode>_nospec): Change assembly output from . to $.
20483         (*tablejump<mode>_internal1_nospec): Likewise.
20484
20485 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20486
20487         PR target/80870
20488         * config/sh/sh_optimize_sett_clrt.cc:
20489         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20490
20491 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20492
20493         PR tree-optimization/83940
20494         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20495         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20496         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20497         use it to pass back the definition type.
20498         (vect_check_store_rhs): Likewise rhs_dt_out.
20499         (vect_build_gather_load_calls): Add a mask_dt argument and use
20500         it instead of a call to vect_is_simple_use.
20501         (vectorizable_store): Update calls to vect_check_load_store_mask
20502         and vect_check_store_rhs.  Use the dt returned by the latter instead
20503         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20504         instead of calls to vect_is_simple_use.  Pass the scalar rather
20505         than the vector operand to vect_is_simple_use when handling
20506         second and subsequent copies of an rhs value.
20507         (vectorizable_load): Update calls to vect_check_load_store_mask
20508         and vect_build_gather_load_calls.  Use the cached mask_dt and
20509         gs_info.offset_dt instead of calls to vect_is_simple_use.
20510
20511 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20512
20513         PR middle-end/83945
20514         * tree-emutls.c: Include gimplify.h.
20515         (lower_emutls_2): New function.
20516         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20517         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20518         it before further processing.
20519
20520         PR target/83930
20521         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20522         UINTVAL (trueop1) instead of INTVAL (op1).
20523
20524 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20525
20526         PR debug/81570
20527         PR debug/83728
20528         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20529         INCOMING_FRAME_SP_OFFSET if not defined.
20530         (scan_trace): Add ENTRY argument.  If true and
20531         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20532         emit a note to adjust the CFA offset.
20533         (create_cfi_notes): Adjust scan_trace callers.
20534         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20535         INCOMING_FRAME_SP_OFFSET in the CIE.
20536         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20537         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20538         Likewise.
20539         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20540         * doc/tm.texi: Regenerated.
20541
20542 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20543
20544         PR rtl-optimization/83147
20545         * lra-constraints.c (remove_inheritance_pseudos): Use
20546         lra_substitute_pseudo_within_insn.
20547
20548 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20549             Cesar Philippidis  <cesar@codesourcery.com>
20550
20551         PR target/83920
20552         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20553
20554 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20555
20556         PR target/83790
20557         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20558         spaces for function labels.
20559
20560 2018-01-19  Martin Liska  <mliska@suse.cz>
20561
20562         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20563         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20564         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20565         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20566         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20567         (PRED_CONST_RETURN): Change from 69 to 65.
20568         (PRED_NULL_RETURN): Change from 91 to 71.
20569         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20570         (PRED_LOOP_GUARD): Change from 66 to 73.
20571
20572 2018-01-19  Martin Liska  <mliska@suse.cz>
20573
20574         * predict.c (predict_insn_def): Add new assert.
20575         (struct branch_predictor): Change type to signed integer.
20576         (test_prediction_value_range): Amend test to cover
20577         PROB_UNINITIALIZED.
20578         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20579         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20580         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20581         (PRED_LOOP_IV_COMPARE): Likewise.
20582         * predict.h (PROB_UNINITIALIZED): Define new constant.
20583
20584 2018-01-19  Martin Liska  <mliska@suse.cz>
20585
20586         * predict.c (dump_prediction): Add new format for
20587         analyze_brprob.py script which is enabled with -details
20588         suboption.
20589         * profile-count.h (precise_p): New function.
20590
20591 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20592
20593         PR tree-optimization/83922
20594         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20595         there are no statements that need masking.
20596         (vect_active_double_reduction_p): New function.
20597         (vect_analyze_loop_operations): Use it when handling phis that
20598         are not in the loop header.
20599
20600 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20601
20602         PR tree-optimization/83914
20603         * tree-vect-loop.c (vectorizable_induction): Don't convert
20604         init_expr or apply the peeling adjustment for inductions
20605         that are nested within the vectorized loop.
20606
20607 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20608
20609         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20610         instead of NEG.
20611
20612 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20613
20614         PR sanitizer/81715
20615         PR testsuite/83882
20616         * function.h (gimplify_parameters): Add gimple_seq * argument.
20617         * function.c: Include gimple.h and options.h.
20618         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20619         for the added local temporaries if needed.
20620         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20621         if there are any parameter cleanups, wrap whole body into a
20622         try/finally with the cleanups.
20623
20624 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20625
20626         PR target/82964
20627         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20628         Use GET_MODE_CLASS for scalar floating point.
20629
20630 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20631
20632         PR ipa/82256
20633         patch by PaX Team
20634         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20635         Fix call of call_cgraph_insertion_hooks.
20636
20637 2018-01-18  Martin Sebor  <msebor@redhat.com>
20638
20639         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20640
20641 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20642
20643         PR ipa/83619
20644         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20645         frequencies.
20646
20647 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20648
20649         PR other/70268
20650         * common.opt: (-ffile-prefix-map): New option.
20651         * opts.c (common_handle_option): Defer it.
20652         * opts-global.c (handle_common_deferred_options): Handle it.
20653         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20654         * file-prefix-map.h: New file.
20655         (remap_debug_filename, add_debug_prefix_map): ...here.
20656         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20657         * final.c (debug_prefix_map, add_debug_prefix_map
20658         remap_debug_filename): Move to...
20659         * file-prefix-map.c: New file.
20660         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20661         generalize, get rid of alloca(), use strrchr() instead of strchr().
20662         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20663         Implement in terms of add_prefix_map().
20664         (remap_macro_filename, remap_debug_filename): Implement in term of
20665         remap_filename().
20666         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20667         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20668         * dbxout.c: Include file-prefix-map.h.
20669         * varasm.c: Likewise.
20670         * vmsdbgout.c: Likewise.
20671         * xcoffout.c: Likewise.
20672         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20673         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20674         * doc/invoke.texi (-ffile-prefix-map): Document.
20675         (-fdebug-prefix-map): Update description.
20676
20677 2018-01-18  Martin Liska  <mliska@suse.cz>
20678
20679         * config/i386/i386.c (indirect_thunk_name): Document that also
20680         lfence is emitted.
20681         (output_indirect_thunk): Document why both instructions
20682         (pause and lfence) are generated.
20683
20684 2018-01-18  Richard Biener  <rguenther@suse.de>
20685
20686         PR tree-optimization/83887
20687         * graphite-scop-detection.c
20688         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20689         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20690         (scop_detection::merge_sese): Re-implement with a flood-fill
20691         algorithm that properly finds a SESE region if it exists.
20692
20693 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20694
20695         PR c/61240
20696         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20697         pointer_diff optimizations use view_convert instead of convert.
20698
20699 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20700
20701         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20702         Generate different code for -mno-speculate-indirect-jumps.
20703         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20704         (*call_indirect_aix<mode>): Disable for
20705         -mno-speculate-indirect-jumps.
20706         (*call_indirect_aix<mode>_nospec): New define_insn.
20707         (*call_value_indirect_aix<mode>): Disable for
20708         -mno-speculate-indirect-jumps.
20709         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20710         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20711         -mno-speculate-indirect-jumps.
20712         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20713
20714 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20715
20716         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20717         long double type, set the flags for noting the default long double
20718         type, even if we don't pass or return a long double type.
20719
20720 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20721
20722         PR ipa/83051
20723         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20724         failure.
20725
20726 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20727
20728         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20729         support for merge[hl].
20730         (fold_mergehl_helper): New helper function.
20731         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20732         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20733         (altivec_vmrglw_direct): Add xxmrglw insn.
20734
20735 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20736
20737         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20738         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20739
20740 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20741
20742         PR lto/83121
20743         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20744         call the lto_location_cache before reading the
20745         DECL_SOURCE_LOCATION of the types.
20746
20747 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20748             Richard Sandiford  <richard.sandiford@linaro.org>
20749
20750         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20751         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20752         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20753         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20754         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20755         Add declaration.
20756         * config/aarch64/constraints.md (aarch64_movti_operand):
20757         Limit immediates.
20758         * config/aarch64/predicates.md (Uti): Add new constraint.
20759
20760 2018-01-17  Carl Love  <cel@us.ibm.com>
20761
20762         * config/rs6000/vsx.md (define_expand xl_len_r,
20763         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20764         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20765         lxvll.
20766         (define_expand, define_insn): Move the shift left from  the
20767         define_insn to the define_expand for lxvl and stxvl instructions.
20768         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20769         and XL_LEN_R definitions to PURE.
20770
20771 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20772
20773         * config/i386/i386.c (indirect_thunk_name): Declare regno
20774         as unsigned int.  Compare regno with INVALID_REGNUM.
20775         (output_indirect_thunk): Ditto.
20776         (output_indirect_thunk_function): Ditto.
20777         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20778         in the call to output_indirect_thunk_function.
20779
20780 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20781
20782         PR middle-end/83884
20783         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20784         rather than the size of inner_type to determine the stack slot size
20785         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20786
20787 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20788
20789         PR target/83546
20790         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20791         to PTA_SILVERMONT.
20792
20793 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20794
20795         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20796         endian Linux systems to optionally enable multilibs for selecting
20797         the long double type if the user configured an explicit type.
20798         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20799         have no long double multilibs if not defined.
20800         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20801         warn if the user used -mabi={ieee,ibm}longdouble and we built
20802         multilibs for long double.
20803         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20804         appropriate multilib option.
20805         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20806         multilib options.
20807         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20808         for building long double multilibs.
20809         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20810
20811 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20812
20813         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20814         copies.
20815
20816         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20817         64 bits.
20818         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20819         128 bits.
20820
20821         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20822         variables.
20823
20824         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20825         return value.
20826
20827 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20828
20829         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20830         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20831
20832 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20833
20834         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20835         different rtl trees depending on TARGET_64BIT.
20836         (rs6000_gen_lvx): Likewise.
20837
20838 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20839
20840         * config/visium/visium.md (nop): Tweak comment.
20841         (hazard_nop): Likewise.
20842
20843 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20844
20845         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20846         -mspeculate-indirect-jumps.
20847         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20848         for -mno-speculate-indirect-jumps.
20849         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20850         (*call_value_indirect_elfv2<mode>): Disable for
20851         -mno-speculate-indirect-jumps.
20852         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20853         (indirect_jump): Emit different RTL for
20854         -mno-speculate-indirect-jumps.
20855         (*indirect_jump<mode>): Disable for
20856         -mno-speculate-indirect-jumps.
20857         (*indirect_jump<mode>_nospec): New define_insn.
20858         (tablejump): Emit different RTL for
20859         -mno-speculate-indirect-jumps.
20860         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20861         (tablejumpsi_nospec): New define_expand.
20862         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20863         (tablejumpdi_nospec): New define_expand.
20864         (*tablejump<mode>_internal1): Disable for
20865         -mno-speculate-indirect-jumps.
20866         (*tablejump<mode>_internal1_nospec): New define_insn.
20867         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20868         option.
20869
20870 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20871
20872         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20873         callers updated.
20874
20875 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20876             Richard Biener  <rguenth@suse.de>
20877
20878         PR libgomp/83590
20879         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20880         return early, inline manually is_gimple_sizepos.  Make sure if we
20881         call gimplify_expr we don't end up with a gimple constant.
20882         * tree.c (variably_modified_type_p): Don't return true for
20883         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20884         * gimplify.h (is_gimple_sizepos): Remove.
20885
20886 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20887
20888         PR tree-optimization/83857
20889         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20890         vectorizable_live_operation for pure SLP statements.
20891         (vectorizable_live_operation): Handle PHIs.
20892
20893 2018-01-16  Richard Biener  <rguenther@suse.de>
20894
20895         PR tree-optimization/83867
20896         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20897         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20898
20899 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20900
20901         PR c/83844
20902         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20903         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20904         If off is not INTEGER_CST, issue a may not be aligned warning
20905         rather than isn't aligned.  Use isn%'t rather than isn't.
20906         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20907         into MULT_EXPR.
20908         <case MULT_EXPR>: Improve the case when bottom and one of the
20909         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20910         operand, in that case check if the other operand is multiple of
20911         bottom divided by the INTEGER_CST operand.
20912
20913 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20914
20915         PR target/83858
20916         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20917         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20918         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20919         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20920         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20921         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20922         (pa_function_arg_size): New function.
20923
20924 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20925
20926         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20927         in a separate statement.
20928
20929 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20930
20931         PR tree-optimization/83847
20932         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20933         group gathers and scatters.
20934
20935 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20936
20937         PR rtl-optimization/86620
20938         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20939
20940         PR rtl-optimization/83213
20941         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20942         to last if both are JUMP_INSNs.
20943
20944         PR tree-optimization/83843
20945         * gimple-ssa-store-merging.c
20946         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20947         store_immediate_info for bswap/nop orig_stores.
20948
20949 2018-01-15  Andrew Waterman  <andrew@sifive.com>
20950
20951         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20952         !TARGET_MUL.
20953         <UDIV>: Increase cost if !TARGET_DIV.
20954
20955 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
20956
20957         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20958         (define_attr "cr_logical_3op"): New.
20959         (cceq_ior_compare): Adjust.
20960         (cceq_ior_compare_complement): Adjust.
20961         (*cceq_rev_compare): Adjust.
20962         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20963         (is_cracked_insn): Adjust.
20964         (insn_must_be_first_in_group): Adjust.
20965         * config/rs6000/40x.md: Adjust.
20966         * config/rs6000/440.md: Adjust.
20967         * config/rs6000/476.md: Adjust.
20968         * config/rs6000/601.md: Adjust.
20969         * config/rs6000/603.md: Adjust.
20970         * config/rs6000/6xx.md: Adjust.
20971         * config/rs6000/7450.md: Adjust.
20972         * config/rs6000/7xx.md: Adjust.
20973         * config/rs6000/8540.md: Adjust.
20974         * config/rs6000/cell.md: Adjust.
20975         * config/rs6000/e300c2c3.md: Adjust.
20976         * config/rs6000/e500mc.md: Adjust.
20977         * config/rs6000/e500mc64.md: Adjust.
20978         * config/rs6000/e5500.md: Adjust.
20979         * config/rs6000/e6500.md: Adjust.
20980         * config/rs6000/mpc.md: Adjust.
20981         * config/rs6000/power4.md: Adjust.
20982         * config/rs6000/power5.md: Adjust.
20983         * config/rs6000/power6.md: Adjust.
20984         * config/rs6000/power7.md: Adjust.
20985         * config/rs6000/power8.md: Adjust.
20986         * config/rs6000/power9.md: Adjust.
20987         * config/rs6000/rs64.md: Adjust.
20988         * config/rs6000/titan.md: Adjust.
20989
20990 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20991
20992         * config/i386/predicates.md (indirect_branch_operand): Rewrite
20993         ix86_indirect_branch_register logic.
20994
20995 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20996
20997         * config/i386/constraints.md (Bs): Update
20998         ix86_indirect_branch_register check.  Don't check
20999         ix86_indirect_branch_register with GOT_memory_operand.
21000         (Bw): Likewise.
21001         * config/i386/predicates.md (GOT_memory_operand): Don't check
21002         ix86_indirect_branch_register here.
21003         (GOT32_symbol_operand): Likewise.
21004
21005 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21006
21007         * config/i386/predicates.md (constant_call_address_operand):
21008         Rewrite ix86_indirect_branch_register logic.
21009         (sibcall_insn_operand): Likewise.
21010
21011 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21012
21013         * config/i386/constraints.md (Bs): Replace
21014         ix86_indirect_branch_thunk_register with
21015         ix86_indirect_branch_register.
21016         (Bw): Likewise.
21017         * config/i386/i386.md (indirect_jump): Likewise.
21018         (tablejump): Likewise.
21019         (*sibcall_memory): Likewise.
21020         (*sibcall_value_memory): Likewise.
21021         Peepholes of indirect call and jump via memory: Likewise.
21022         * config/i386/i386.opt: Likewise.
21023         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21024         (GOT_memory_operand): Likewise.
21025         (call_insn_operand): Likewise.
21026         (sibcall_insn_operand): Likewise.
21027         (GOT32_symbol_operand): Likewise.
21028
21029 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21030
21031         PR middle-end/83837
21032         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21033         type rather than type addr's type points to.
21034         (expand_omp_atomic_mutex): Likewise.
21035         (expand_omp_atomic): Likewise.
21036
21037 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21038
21039         PR target/83839
21040         * config/i386/i386.c (output_indirect_thunk_function): Use
21041         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21042         for  __x86_return_thunk.
21043
21044 2018-01-15  Richard Biener  <rguenther@suse.de>
21045
21046         PR middle-end/83850
21047         * expmed.c (extract_bit_field_1): Fix typo.
21048
21049 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21050
21051         PR target/83687
21052         * config/arm/iterators.md (VF): New mode iterator.
21053         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21054         Remove integer-related logic from pattern.
21055         (neon_vabd<mode>_3): Likewise.
21056
21057 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21058
21059         PR middle-end/82694
21060         * common.opt (fstrict-overflow): No longer an alias.
21061         (fwrapv-pointer): New option.
21062         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21063         also for pointer types based on flag_wrapv_pointer.
21064         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21065         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21066         opts->x_flag_wrapv got set.
21067         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21068         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21069         POINTER_TYPE_OVERFLOW_UNDEFINED.
21070         * match.pd: Likewise in address comparison pattern.
21071         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21072
21073 2018-01-15  Richard Biener  <rguenther@suse.de>
21074
21075         PR lto/83804
21076         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21077         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
21078         Reset type names to their identifier if their TYPE_DECL doesn't
21079         have linkage (and thus is used for ODR and devirt).
21080         (save_debug_info_for_decl): Remove.
21081         (save_debug_info_for_type): Likewise.
21082         (add_tree_to_fld_list): Adjust.
21083         * tree-pretty-print.c (dump_generic_node): Make dumping of
21084         type names more robust.
21085
21086 2018-01-15  Richard Biener  <rguenther@suse.de>
21087
21088         * BASE-VER: Bump to 8.0.1.
21089
21090 2018-01-14  Martin Sebor  <msebor@redhat.com>
21091
21092         PR other/83508
21093         * builtins.c (check_access): Avoid warning when the no-warning bit
21094         is set.
21095
21096 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
21097
21098         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21099         * ira-color (allocno_hard_regs_compare): Likewise.
21100
21101 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
21102
21103         PR target/83013
21104         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21105         Use .pushsection/.popsection.
21106
21107 2018-01-14  Martin Sebor  <msebor@redhat.com>
21108
21109         PR c++/81327
21110         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21111
21112 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
21113
21114         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21115         entry from extra_headers.
21116         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21117         extra_headers, make the list bitwise identical to the i?86-*-* one.
21118
21119 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21120
21121         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21122         -mcmodel=large with -mindirect-branch=thunk,
21123         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21124         -mfunction-return=thunk-extern.
21125         * doc/invoke.texi: Document -mcmodel=large is incompatible with
21126         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21127         -mfunction-return=thunk and -mfunction-return=thunk-extern.
21128
21129 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21130
21131         * config/i386/i386.c (print_reg): Print the name of the full
21132         integer register without '%'.
21133         (ix86_print_operand): Handle 'V'.
21134         * doc/extend.texi: Document 'V' modifier.
21135
21136 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21137
21138         * config/i386/constraints.md (Bs): Disallow memory operand for
21139         -mindirect-branch-register.
21140         (Bw): Likewise.
21141         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21142         (GOT_memory_operand): Likewise.
21143         (call_insn_operand): Likewise.
21144         (sibcall_insn_operand): Likewise.
21145         (GOT32_symbol_operand): Likewise.
21146         * config/i386/i386.md (indirect_jump): Call convert_memory_address
21147         for -mindirect-branch-register.
21148         (tablejump): Likewise.
21149         (*sibcall_memory): Likewise.
21150         (*sibcall_value_memory): Likewise.
21151         Disallow peepholes of indirect call and jump via memory for
21152         -mindirect-branch-register.
21153         (*call_pop): Replace m with Bw.
21154         (*call_value_pop): Likewise.
21155         (*sibcall_pop_memory): Replace m with Bs.
21156         * config/i386/i386.opt (mindirect-branch-register): New option.
21157         * doc/invoke.texi: Document -mindirect-branch-register option.
21158
21159 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21160
21161         * config/i386/i386-protos.h (ix86_output_function_return): New.
21162         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21163         set function_return_type.
21164         (indirect_thunk_name): Add ret_p to indicate thunk for function
21165         return.
21166         (output_indirect_thunk_function): Pass false to
21167         indirect_thunk_name.
21168         (ix86_output_indirect_branch_via_reg): Likewise.
21169         (ix86_output_indirect_branch_via_push): Likewise.
21170         (output_indirect_thunk_function): Create alias for function
21171         return thunk if regno < 0.
21172         (ix86_output_function_return): New function.
21173         (ix86_handle_fndecl_attribute): Handle function_return.
21174         (ix86_attribute_table): Add function_return.
21175         * config/i386/i386.h (machine_function): Add
21176         function_return_type.
21177         * config/i386/i386.md (simple_return_internal): Use
21178         ix86_output_function_return.
21179         (simple_return_internal_long): Likewise.
21180         * config/i386/i386.opt (mfunction-return=): New option.
21181         (indirect_branch): Mention -mfunction-return=.
21182         * doc/extend.texi: Document function_return function attribute.
21183         * doc/invoke.texi: Document -mfunction-return= option.
21184
21185 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21186
21187         * config/i386/i386-opts.h (indirect_branch): New.
21188         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21189         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21190         with local indirect jump when converting indirect call and jump.
21191         (ix86_set_indirect_branch_type): New.
21192         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21193         (indirectlabelno): New.
21194         (indirect_thunk_needed): Likewise.
21195         (indirect_thunk_bnd_needed): Likewise.
21196         (indirect_thunks_used): Likewise.
21197         (indirect_thunks_bnd_used): Likewise.
21198         (INDIRECT_LABEL): Likewise.
21199         (indirect_thunk_name): Likewise.
21200         (output_indirect_thunk): Likewise.
21201         (output_indirect_thunk_function): Likewise.
21202         (ix86_output_indirect_branch_via_reg): Likewise.
21203         (ix86_output_indirect_branch_via_push): Likewise.
21204         (ix86_output_indirect_branch): Likewise.
21205         (ix86_output_indirect_jmp): Likewise.
21206         (ix86_code_end): Call output_indirect_thunk_function if needed.
21207         (ix86_output_call_insn): Call ix86_output_indirect_branch if
21208         needed.
21209         (ix86_handle_fndecl_attribute): Handle indirect_branch.
21210         (ix86_attribute_table): Add indirect_branch.
21211         * config/i386/i386.h (machine_function): Add indirect_branch_type
21212         and has_local_indirect_jump.
21213         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21214         to true.
21215         (tablejump): Likewise.
21216         (*indirect_jump): Use ix86_output_indirect_jmp.
21217         (*tablejump_1): Likewise.
21218         (simple_return_indirect_internal): Likewise.
21219         * config/i386/i386.opt (mindirect-branch=): New option.
21220         (indirect_branch): New.
21221         (keep): Likewise.
21222         (thunk): Likewise.
21223         (thunk-inline): Likewise.
21224         (thunk-extern): Likewise.
21225         * doc/extend.texi: Document indirect_branch function attribute.
21226         * doc/invoke.texi: Document -mindirect-branch= option.
21227
21228 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
21229
21230         PR ipa/83051
21231         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21232
21233 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
21234
21235         * ipa-inline.c (want_inline_small_function_p): Return false if
21236         inlining has already failed with CIF_FINAL_ERROR.
21237         (update_caller_keys): Call want_inline_small_function_p before
21238         can_inline_edge_p.
21239         (update_callee_keys): Likewise.
21240
21241 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21242
21243         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21244         New function.
21245         (rs6000_quadword_masked_address_p): Likewise.
21246         (quad_aligned_load_p): Likewise.
21247         (quad_aligned_store_p): Likewise.
21248         (const_load_sequence_p): Add comment to describe the outer-most loop.
21249         (mimic_memory_attributes_and_flags): New function.
21250         (rs6000_gen_stvx): Likewise.
21251         (replace_swapped_aligned_store): Likewise.
21252         (rs6000_gen_lvx): Likewise.
21253         (replace_swapped_aligned_load): Likewise.
21254         (replace_swapped_load_constant): Capitalize argument name in
21255         comment describing this function.
21256         (rs6000_analyze_swaps): Add a third pass to search for vector loads
21257         and stores that access quad-word aligned addresses and replace
21258         with stvx or lvx instructions when appropriate.
21259         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21260         New function prototype.
21261         (rs6000_quadword_masked_address_p): Likewise.
21262         (rs6000_gen_lvx): Likewise.
21263         (rs6000_gen_stvx): Likewise.
21264         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21265         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21266         when memory address is aligned.
21267         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21268         this split to select lvx instruction when memory address is aligned.
21269         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21270         instruction when memory address is aligned.
21271         (*vsx_le_perm_load_v16qi): Likewise.
21272         (four unnamed splitters): Modify to select the stvx instruction
21273         when memory is aligned.
21274
21275 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
21276
21277         * predict.c (determine_unlikely_bbs): Handle correctly BBs
21278         which appears in the queue multiple times.
21279
21280 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21281             Alan Hayward  <alan.hayward@arm.com>
21282             David Sherwood  <david.sherwood@arm.com>
21283
21284         * tree-vectorizer.h (vec_lower_bound): New structure.
21285         (_loop_vec_info): Add check_nonzero and lower_bounds.
21286         (LOOP_VINFO_CHECK_NONZERO): New macro.
21287         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21288         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21289         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21290         fields.  Make seg_len the distance travelled, not including the
21291         access size.
21292         (dr_direction_indicator): Declare.
21293         (dr_zero_step_indicator): Likewise.
21294         (dr_known_forward_stride_p): Likewise.
21295         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21296         tree-ssanames.h.
21297         (runtime_alias_check_p): Allow runtime alias checks with
21298         variable strides.
21299         (operator ==): Compare access_size and align.
21300         (prune_runtime_alias_test_list): Rework for new distinction between
21301         the access_size and seg_len.
21302         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
21303         segment lengths.
21304         (get_segment_min_max): New function.
21305         (create_intersect_range_checks): Use it.
21306         (dr_step_indicator): New function.
21307         (dr_direction_indicator): Likewise.
21308         (dr_zero_step_indicator): Likewise.
21309         (dr_known_forward_stride_p): Likewise.
21310         * tree-loop-distribution.c (data_ref_segment_size): Return
21311         DR_STEP * (niters - 1).
21312         (compute_alias_check_pairs): Update call to the dr_with_seg_len
21313         constructor.
21314         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21315         (vect_preserves_scalar_order_p): New function, split out from...
21316         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
21317         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21318         (vect_vfa_access_size): New function.
21319         (vect_vfa_align): Likewise.
21320         (vect_compile_time_alias): Take access_size_a and access_b arguments.
21321         (dump_lower_bound): New function.
21322         (vect_check_lower_bound): Likewise.
21323         (vect_small_gap_p): Likewise.
21324         (vectorizable_with_step_bound_p): Likewise.
21325         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21326         depencies if the vectorization factor is 1.  Convert the checks
21327         for nonzero steps into checks on the bounds of DR_STEP.  Try using
21328         a bunds check for variable steps if the minimum required step is
21329         relatively small. Update calls to the dr_with_seg_len
21330         constructor and to vect_compile_time_alias.
21331         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21332         function.
21333         (vect_loop_versioning): Call it.
21334         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21335         when retrying.
21336         (vect_estimate_min_profitable_iters): Account for any bounds checks.
21337
21338 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21339             Alan Hayward  <alan.hayward@arm.com>
21340             David Sherwood  <david.sherwood@arm.com>
21341
21342         * doc/sourcebuild.texi (vect_scatter_store): Document.
21343         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21344         optabs.
21345         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21346         Document.
21347         * genopinit.c (main): Add supports_vec_scatter_store and
21348         supports_vec_scatter_store_cached to target_optabs.
21349         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21350         IFN_MASK_SCATTER_STORE.
21351         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21352         functions.
21353         * internal-fn.h (internal_store_fn_p): Declare.
21354         (internal_fn_stored_value_index): Likewise.
21355         * internal-fn.c (scatter_store_direct): New macro.
21356         (expand_scatter_store_optab_fn): New function.
21357         (direct_scatter_store_optab_supported_p): New macro.
21358         (internal_store_fn_p): New function.
21359         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21360         IFN_MASK_SCATTER_STORE.
21361         (internal_fn_mask_index): Likewise.
21362         (internal_fn_stored_value_index): New function.
21363         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21364         for scatter stores.
21365         * optabs-query.h (supports_vec_scatter_store_p): Declare.
21366         * optabs-query.c (supports_vec_scatter_store_p): New function.
21367         * tree-vectorizer.h (vect_get_store_rhs): Declare.
21368         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21369         true for scatter stores.
21370         (vect_gather_scatter_fn_p): Handle scatter stores too.
21371         (vect_check_gather_scatter): Consider using scatter stores if
21372         supports_vec_scatter_store_p.
21373         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21374         scatter stores too.
21375         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21376         internal_fn_stored_value_index.
21377         (check_load_store_masking): Handle scatter stores too.
21378         (vect_get_store_rhs): Make public.
21379         (vectorizable_call): Use internal_store_fn_p.
21380         (vectorizable_store): Handle scatter store internal functions.
21381         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21382         when deciding whether the end of the group has been reached.
21383         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21384         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21385         (mask_scatter_store<mode>): New insns.
21386
21387 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21388             Alan Hayward  <alan.hayward@arm.com>
21389             David Sherwood  <david.sherwood@arm.com>
21390
21391         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21392         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21393         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21394         function.
21395         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21396         Use vect_truncate_gather_scatter_offset if we can't treat the
21397         operation as a normal gather load or scatter store.
21398         (get_group_load_store_type): Take the gather_scatter_info
21399         as argument.  Try using a gather load or scatter store for
21400         single-element groups.
21401         (get_load_store_type): Update calls to get_group_load_store_type
21402         and vect_use_strided_gather_scatters_p.
21403
21404 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21405             Alan Hayward  <alan.hayward@arm.com>
21406             David Sherwood  <david.sherwood@arm.com>
21407
21408         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21409         optional tree argument.
21410         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21411         null target hooks.
21412         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21413         but continue to use the current value as a fallback.
21414         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21415         to compare the updates.
21416         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21417         (get_load_store_type): Use it when handling a strided access.
21418         (vect_get_strided_load_store_ops): New function.
21419         (vect_get_data_ptr_increment): Likewise.
21420         (vectorizable_load): Handle strided gather loads.  Always pass
21421         a step to vect_create_data_ref_ptr and bump_vector_ptr.
21422
21423 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21424             Alan Hayward  <alan.hayward@arm.com>
21425             David Sherwood  <david.sherwood@arm.com>
21426
21427         * doc/md.texi (gather_load@var{m}): Document.
21428         (mask_gather_load@var{m}): Likewise.
21429         * genopinit.c (main): Add supports_vec_gather_load and
21430         supports_vec_gather_load_cached to target_optabs.
21431         * optabs-tree.c (init_tree_optimization_optabs): Use
21432         ggc_cleared_alloc to allocate target_optabs.
21433         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21434         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21435         functions.
21436         * internal-fn.h (internal_load_fn_p): Declare.
21437         (internal_gather_scatter_fn_p): Likewise.
21438         (internal_fn_mask_index): Likewise.
21439         (internal_gather_scatter_fn_supported_p): Likewise.
21440         * internal-fn.c (gather_load_direct): New macro.
21441         (expand_gather_load_optab_fn): New function.
21442         (direct_gather_load_optab_supported_p): New macro.
21443         (direct_internal_fn_optab): New function.
21444         (internal_load_fn_p): Likewise.
21445         (internal_gather_scatter_fn_p): Likewise.
21446         (internal_fn_mask_index): Likewise.
21447         (internal_gather_scatter_fn_supported_p): Likewise.
21448         * optabs-query.c (supports_at_least_one_mode_p): New function.
21449         (supports_vec_gather_load_p): Likewise.
21450         * optabs-query.h (supports_vec_gather_load_p): Declare.
21451         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21452         and memory_type field.
21453         (NUM_PATTERNS): Bump to 15.
21454         * tree-vect-data-refs.c: Include internal-fn.h.
21455         (vect_gather_scatter_fn_p): New function.
21456         (vect_describe_gather_scatter_call): Likewise.
21457         (vect_check_gather_scatter): Try using internal functions for
21458         gather loads.  Recognize existing calls to a gather load function.
21459         (vect_analyze_data_refs): Consider using gather loads if
21460         supports_vec_gather_load_p.
21461         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21462         (vect_get_gather_scatter_offset_type): Likewise.
21463         (vect_convert_mask_for_vectype): Likewise.
21464         (vect_add_conversion_to_patterm): Likewise.
21465         (vect_try_gather_scatter_pattern): Likewise.
21466         (vect_recog_gather_scatter_pattern): New pattern recognizer.
21467         (vect_vect_recog_func_ptrs): Add it.
21468         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21469         internal_fn_mask_index and internal_gather_scatter_fn_p.
21470         (check_load_store_masking): Take the gather_scatter_info as an
21471         argument and handle gather loads.
21472         (vect_get_gather_scatter_ops): New function.
21473         (vectorizable_call): Check internal_load_fn_p.
21474         (vectorizable_load): Likewise.  Handle gather load internal
21475         functions.
21476         (vectorizable_store): Update call to check_load_store_masking.
21477         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21478         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21479         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21480         (aarch64_gather_scale_operand_d): New predicates.
21481         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21482         (mask_gather_load<mode>): New insns.
21483
21484 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21485             Alan Hayward  <alan.hayward@arm.com>
21486             David Sherwood  <david.sherwood@arm.com>
21487
21488         * optabs.def (fold_left_plus_optab): New optab.
21489         * doc/md.texi (fold_left_plus_@var{m}): Document.
21490         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21491         * internal-fn.c (fold_left_direct): Define.
21492         (expand_fold_left_optab_fn): Likewise.
21493         (direct_fold_left_optab_supported_p): Likewise.
21494         * fold-const-call.c (fold_const_fold_left): New function.
21495         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21496         * tree-parloops.c (valid_reduction_p): New function.
21497         (gather_scalar_reductions): Use it.
21498         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21499         (vect_finish_replace_stmt): Declare.
21500         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21501         (needs_fold_left_reduction_p): New function, split out from...
21502         (vect_is_simple_reduction): ...here.  Accept reductions that
21503         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21504         (vect_force_simple_reduction): Also store the reduction type in
21505         the assignment's STMT_VINFO_REDUC_TYPE.
21506         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21507         (merge_with_identity): New function.
21508         (vect_expand_fold_left): Likewise.
21509         (vectorize_fold_left_reduction): Likewise.
21510         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21511         scalar phi in place for it.  Check for target support and reject
21512         cases that would reassociate the operation.  Defer the transform
21513         phase to vectorize_fold_left_reduction.
21514         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21515         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21516         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21517
21518 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21519
21520         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21521         call to ifc_temp_var.
21522
21523 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21524             Alan Hayward  <alan.hayward@arm.com>
21525             David Sherwood  <david.sherwood@arm.com>
21526
21527         * target.def (legitimize_address_displacement): Take the original
21528         offset as a poly_int.
21529         * targhooks.h (default_legitimize_address_displacement): Update
21530         accordingly.
21531         * targhooks.c (default_legitimize_address_displacement): Likewise.
21532         * doc/tm.texi: Regenerate.
21533         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21534         as an argument, moving assert of ad->disp == ad->disp_term to...
21535         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21536         Try calling targetm.legitimize_address_displacement before expanding
21537         the address rather than afterwards, and adjust for the new interface.
21538         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21539         Match the new hook interface.  Handle SVE addresses.
21540         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21541         new hook interface.
21542
21543 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21544
21545         * Makefile.in (OBJS): Add early-remat.o.
21546         * target.def (select_early_remat_modes): New hook.
21547         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21548         * doc/tm.texi: Regenerate.
21549         * targhooks.h (default_select_early_remat_modes): Declare.
21550         * targhooks.c (default_select_early_remat_modes): New function.
21551         * timevar.def (TV_EARLY_REMAT): New timevar.
21552         * passes.def (pass_early_remat): New pass.
21553         * tree-pass.h (make_pass_early_remat): Declare.
21554         * early-remat.c: New file.
21555         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21556         function.
21557         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21558
21559 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21560             Alan Hayward  <alan.hayward@arm.com>
21561             David Sherwood  <david.sherwood@arm.com>
21562
21563         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21564         vfm1 with a bound_epilog parameter.
21565         (vect_do_peeling): Update calls accordingly, and move the prologue
21566         call earlier in the function.  Treat the base bound_epilog as 0 for
21567         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21568         this base when peeling for gaps.
21569         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21570         with fully-masked loops.
21571         (vect_estimate_min_profitable_iters): Handle the single peeled
21572         iteration in that case.
21573
21574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21575             Alan Hayward  <alan.hayward@arm.com>
21576             David Sherwood  <david.sherwood@arm.com>
21577
21578         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21579         single-element interleaving even if the size is not a power of 2.
21580         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21581         accesses for single-element interleaving if the group size is
21582         not a power of 2.
21583
21584 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21585             Alan Hayward  <alan.hayward@arm.com>
21586             David Sherwood  <david.sherwood@arm.com>
21587
21588         * doc/md.texi (fold_extract_last_@var{m}): Document.
21589         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21590         * optabs.def (fold_extract_last_optab): New optab.
21591         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21592         * internal-fn.c (fold_extract_direct): New macro.
21593         (expand_fold_extract_optab_fn): Likewise.
21594         (direct_fold_extract_optab_supported_p): Likewise.
21595         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21596         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21597         EXTRACT_LAST_REDUCTION.
21598         (get_initial_def_for_reduction): Do not create an initial vector
21599         for EXTRACT_LAST_REDUCTION reductions.
21600         (vectorizable_reduction): Leave the scalar phi in place for
21601         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21602         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21603         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21604         transform phase to vectorizable_condition.
21605         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21606         split out from...
21607         (vect_finish_stmt_generation): ...here.
21608         (vect_finish_replace_stmt): New function.
21609         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21610         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21611         pattern.
21612         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21613
21614 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21615             Alan Hayward  <alan.hayward@arm.com>
21616             David Sherwood  <david.sherwood@arm.com>
21617
21618         * doc/md.texi (extract_last_@var{m}): Document.
21619         * optabs.def (extract_last_optab): New optab.
21620         * internal-fn.def (EXTRACT_LAST): New internal function.
21621         * internal-fn.c (cond_unary_direct): New macro.
21622         (expand_cond_unary_optab_fn): Likewise.
21623         (direct_cond_unary_optab_supported_p): Likewise.
21624         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21625         loops using EXTRACT_LAST.
21626         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21627         (extract_last_<mode>): ...this optab.
21628         (vec_extract<mode><Vel>): Update accordingly.
21629
21630 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21631             Alan Hayward  <alan.hayward@arm.com>
21632             David Sherwood  <david.sherwood@arm.com>
21633
21634         * target.def (empty_mask_is_expensive): New hook.
21635         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21636         * doc/tm.texi: Regenerate.
21637         * targhooks.h (default_empty_mask_is_expensive): Declare.
21638         * targhooks.c (default_empty_mask_is_expensive): New function.
21639         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21640         if the target says that empty masks are expensive.
21641         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21642         New function.
21643         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21644
21645 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21646             Alan Hayward  <alan.hayward@arm.com>
21647             David Sherwood  <david.sherwood@arm.com>
21648
21649         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21650         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21651         (vect_use_loop_mask_for_alignment_p): New function.
21652         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21653         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21654         niters_skip argument.  Make sure that the first niters_skip elements
21655         of the first iteration are inactive.
21656         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21657         Update call to vect_set_loop_masks_directly.
21658         (get_misalign_in_elems): New function, split out from...
21659         (vect_gen_prolog_loop_niters): ...here.
21660         (vect_update_init_of_dr): Take a code argument that specifies whether
21661         the adjustment should be added or subtracted.
21662         (vect_update_init_of_drs): Likewise.
21663         (vect_prepare_for_masked_peels): New function.
21664         (vect_do_peeling): Skip prologue peeling if we're using a mask
21665         instead.  Update call to vect_update_inits_of_drs.
21666         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21667         mask_skip_niters.
21668         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21669         alignment.  Do not include the number of peeled iterations in
21670         the minimum threshold in that case.
21671         (vectorizable_induction): Adjust the start value down by
21672         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21673         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21674         Take the number of skipped iterations into account when calculating
21675         the loop bounds.
21676         * tree-vect-stmts.c (vect_gen_while_not): New function.
21677
21678 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21679             Alan Hayward  <alan.hayward@arm.com>
21680             David Sherwood  <david.sherwood@arm.com>
21681
21682         * doc/sourcebuild.texi (vect_fully_masked): Document.
21683         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21684         default value to 0.
21685         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21686         split out from...
21687         (vect_analyze_loop_2): ...here. Don't check the vectorization
21688         factor against the number of loop iterations if the loop is
21689         fully-masked.
21690
21691 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21692             Alan Hayward  <alan.hayward@arm.com>
21693             David Sherwood  <david.sherwood@arm.com>
21694
21695         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21696         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21697         (dump_groups): Update accordingly.
21698         (iv_use::mem_type): New member variable.
21699         (address_p): New function.
21700         (record_use): Add a mem_type argument and initialize the new
21701         mem_type field.
21702         (record_group_use): Add a mem_type argument.  Use address_p.
21703         Remove obsolete null checks of base_object.  Update call to record_use.
21704         (find_interesting_uses_op): Update call to record_group_use.
21705         (find_interesting_uses_cond): Likewise.
21706         (find_interesting_uses_address): Likewise.
21707         (get_mem_type_for_internal_fn): New function.
21708         (find_address_like_use): Likewise.
21709         (find_interesting_uses_stmt): Try find_address_like_use before
21710         calling find_interesting_uses_op.
21711         (addr_offset_valid_p): Use the iv mem_type field as the type
21712         of the addressed memory.
21713         (add_autoinc_candidates): Likewise.
21714         (get_address_cost): Likewise.
21715         (split_small_address_groups_p): Use address_p.
21716         (split_address_groups): Likewise.
21717         (add_iv_candidate_for_use): Likewise.
21718         (autoinc_possible_for_pair): Likewise.
21719         (rewrite_groups): Likewise.
21720         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21721         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21722         (get_alias_ptr_type_for_ptr_address): New function.
21723         (rewrite_use_address): Rewrite address uses in calls that were
21724         identified by find_address_like_use.
21725
21726 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21727             Alan Hayward  <alan.hayward@arm.com>
21728             David Sherwood  <david.sherwood@arm.com>
21729
21730         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21731         TARGET_MEM_REFs.
21732         * gimple-expr.h (is_gimple_addressable: Likewise.
21733         * gimple-expr.c (is_gimple_address): Likewise.
21734         * internal-fn.c (expand_call_mem_ref): New function.
21735         (expand_mask_load_optab_fn): Use it.
21736         (expand_mask_store_optab_fn): Likewise.
21737
21738 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21739             Alan Hayward  <alan.hayward@arm.com>
21740             David Sherwood  <david.sherwood@arm.com>
21741
21742         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21743         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21744         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21745         (cond_umax@var{mode}): Document.
21746         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21747         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21748         (cond_umin_optab, cond_umax_optab): New optabs.
21749         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21750         (COND_IOR, COND_XOR): New internal functions.
21751         * internal-fn.h (get_conditional_internal_fn): Declare.
21752         * internal-fn.c (cond_binary_direct): New macro.
21753         (expand_cond_binary_optab_fn): Likewise.
21754         (direct_cond_binary_optab_supported_p): Likewise.
21755         (get_conditional_internal_fn): New function.
21756         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21757         Cope with reduction statements that are vectorized as calls rather
21758         than assignments.
21759         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21760         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21761         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21762         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21763         (UNSPEC_COND_EOR): New unspecs.
21764         (optab): Add mappings for them.
21765         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21766         (sve_int_op, sve_fp_op): New int attributes.
21767
21768 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21769             Alan Hayward  <alan.hayward@arm.com>
21770             David Sherwood  <david.sherwood@arm.com>
21771
21772         * optabs.def (while_ult_optab): New optab.
21773         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21774         * internal-fn.def (WHILE_ULT): New internal function.
21775         * internal-fn.h (direct_internal_fn_supported_p): New override
21776         that takes two types as argument.
21777         * internal-fn.c (while_direct): New macro.
21778         (expand_while_optab_fn): New function.
21779         (convert_optab_supported_p): Likewise.
21780         (direct_while_optab_supported_p): New macro.
21781         * wide-int.h (wi::udiv_ceil): New function.
21782         * tree-vectorizer.h (rgroup_masks): New structure.
21783         (vec_loop_masks): New typedef.
21784         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21785         and fully_masked_p.
21786         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21787         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21788         (vect_max_vf): New function.
21789         (slpeel_make_loop_iterate_ntimes): Delete.
21790         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21791         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21792         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21793         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21794         internal-fn.h, stor-layout.h and optabs-query.h.
21795         (vect_set_loop_mask): New function.
21796         (add_preheader_seq): Likewise.
21797         (add_header_seq): Likewise.
21798         (interleave_supported_p): Likewise.
21799         (vect_maybe_permute_loop_masks): Likewise.
21800         (vect_set_loop_masks_directly): Likewise.
21801         (vect_set_loop_condition_masked): Likewise.
21802         (vect_set_loop_condition_unmasked): New function, split out from
21803         slpeel_make_loop_iterate_ntimes.
21804         (slpeel_make_loop_iterate_ntimes): Rename to..
21805         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21806         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21807         (vect_do_peeling): Update call accordingly.
21808         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21809         loops.
21810         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21811         mask_compare_type, can_fully_mask_p and fully_masked_p.
21812         (release_vec_loop_masks): New function.
21813         (_loop_vec_info): Use it to free the loop masks.
21814         (can_produce_all_loop_masks_p): New function.
21815         (vect_get_max_nscalars_per_iter): Likewise.
21816         (vect_verify_full_masking): Likewise.
21817         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21818         retries, and free the mask rgroups before retrying.  Check loop-wide
21819         reasons for disallowing fully-masked loops.  Make the final decision
21820         about whether use a fully-masked loop or not.
21821         (vect_estimate_min_profitable_iters): Do not assume that peeling
21822         for the number of iterations will be needed for fully-masked loops.
21823         (vectorizable_reduction): Disable fully-masked loops.
21824         (vectorizable_live_operation): Likewise.
21825         (vect_halve_mask_nunits): New function.
21826         (vect_double_mask_nunits): Likewise.
21827         (vect_record_loop_mask): Likewise.
21828         (vect_get_loop_mask): Likewise.
21829         (vect_transform_loop): Handle the case in which the final loop
21830         iteration might handle a partial vector.  Call vect_set_loop_condition
21831         instead of slpeel_make_loop_iterate_ntimes.
21832         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21833         (check_load_store_masking): New function.
21834         (prepare_load_store_mask): Likewise.
21835         (vectorizable_store): Handle fully-masked loops.
21836         (vectorizable_load): Likewise.
21837         (supportable_widening_operation): Use vect_halve_mask_nunits for
21838         booleans.
21839         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21840         (vect_gen_while): New function.
21841         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21842         (aarch64_uqdec<mode>): New insn.
21843
21844 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21845             Alan Hayward  <alan.hayward@arm.com>
21846             David Sherwood  <david.sherwood@arm.com>
21847
21848         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21849         (reduc_xor_scal_optab): New optabs.
21850         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21851         (reduc_xor_scal_@var{m}): Document.
21852         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21853         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21854         internal functions.
21855         * fold-const-call.c (fold_const_call): Handle them.
21856         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21857         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21858         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21859         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21860         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21861         (UNSPEC_XORV): New unspecs.
21862         (optab): Add entries for them.
21863         (BITWISEV): New int iterator.
21864         (bit_reduc_op): New int attributes.
21865
21866 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21867             Alan Hayward  <alan.hayward@arm.com>
21868             David Sherwood  <david.sherwood@arm.com>
21869
21870         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21871         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21872         * optabs.def (vec_shl_insert_optab): New optab.
21873         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21874         (duplicate_and_interleave): Likewise.
21875         * tree-vect-loop.c: Include internal-fn.h.
21876         (neutral_op_for_slp_reduction): New function, split out from
21877         get_initial_defs_for_reduction.
21878         (get_initial_def_for_reduction): Handle option 2 for variable-length
21879         vectors by loading the neutral value into a vector and then shifting
21880         the initial value into element 0.
21881         (get_initial_defs_for_reduction): Replace the code argument with
21882         the neutral value calculated by neutral_op_for_slp_reduction.
21883         Use gimple_build_vector for constant-length vectors.
21884         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21885         but the first group_size elements have a neutral value.
21886         Use duplicate_and_interleave otherwise.
21887         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21888         Update call to get_initial_defs_for_reduction.  Handle SLP
21889         reductions for variable-length vectors by creating one vector
21890         result for each scalar result, with the elements associated
21891         with other scalar results stubbed out with the neutral value.
21892         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21893         Require IFN_VEC_SHL_INSERT for double reductions on
21894         variable-length vectors, or SLP reductions that have
21895         a neutral value.  Require can_duplicate_and_interleave_p
21896         support for variable-length unchained SLP reductions if there
21897         is no neutral value, such as for MIN/MAX reductions.  Also require
21898         the number of vector elements to be a multiple of the number of
21899         SLP statements when doing variable-length unchained SLP reductions.
21900         Update call to vect_create_epilog_for_reduction.
21901         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21902         and remove initial values.
21903         (duplicate_and_interleave): Make public.
21904         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21905         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21906
21907 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21908             Alan Hayward  <alan.hayward@arm.com>
21909             David Sherwood  <david.sherwood@arm.com>
21910
21911         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21912         (can_duplicate_and_interleave_p): New function.
21913         (vect_get_and_check_slp_defs): Take the vector of statements
21914         rather than just the current one.  Remove excess parentheses.
21915         Restriction rejectinon of vect_constant_def and vect_external_def
21916         for variable-length vectors to boolean types, or types for which
21917         can_duplicate_and_interleave_p is false.
21918         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21919         (duplicate_and_interleave): New function.
21920         (vect_get_constant_vectors): Use gimple_build_vector for
21921         constant-length vectors and suitable variable-length constant
21922         vectors.  Use duplicate_and_interleave for other variable-length
21923         vectors.  Don't defer the update when inserting new statements.
21924
21925 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21926             Alan Hayward  <alan.hayward@arm.com>
21927             David Sherwood  <david.sherwood@arm.com>
21928
21929         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21930         min_profitable_iters doesn't go negative.
21931
21932 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21933             Alan Hayward  <alan.hayward@arm.com>
21934             David Sherwood  <david.sherwood@arm.com>
21935
21936         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21937         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21938         * optabs.def (vec_mask_load_lanes_optab): New optab.
21939         (vec_mask_store_lanes_optab): Likewise.
21940         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21941         (MASK_STORE_LANES): Likewise.
21942         * internal-fn.c (mask_load_lanes_direct): New macro.
21943         (mask_store_lanes_direct): Likewise.
21944         (expand_mask_load_optab_fn): Handle masked operations.
21945         (expand_mask_load_lanes_optab_fn): New macro.
21946         (expand_mask_store_optab_fn): Handle masked operations.
21947         (expand_mask_store_lanes_optab_fn): New macro.
21948         (direct_mask_load_lanes_optab_supported_p): Likewise.
21949         (direct_mask_store_lanes_optab_supported_p): Likewise.
21950         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21951         parameter.
21952         (vect_load_lanes_supported): Likewise.
21953         * tree-vect-data-refs.c (strip_conversion): New function.
21954         (can_group_stmts_p): Likewise.
21955         (vect_analyze_data_ref_accesses): Use it instead of checking
21956         for a pair of assignments.
21957         (vect_store_lanes_supported): Take a masked_p parameter.
21958         (vect_load_lanes_supported): Likewise.
21959         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21960         vect_store_lanes_supported and vect_load_lanes_supported.
21961         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21962         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21963         parameter.  Don't allow gaps for masked accesses.
21964         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
21965         and vect_load_lanes_supported.
21966         (get_load_store_type): Take a masked_p parameter and update
21967         call to get_group_load_store_type.
21968         (vectorizable_store): Update call to get_load_store_type.
21969         Handle IFN_MASK_STORE_LANES.
21970         (vectorizable_load): Update call to get_load_store_type.
21971         Handle IFN_MASK_LOAD_LANES.
21972
21973 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21974             Alan Hayward  <alan.hayward@arm.com>
21975             David Sherwood  <david.sherwood@arm.com>
21976
21977         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21978         modes for SVE.
21979         * config/aarch64/aarch64-protos.h
21980         (aarch64_sve_struct_memory_operand_p): Declare.
21981         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21982         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21983         (VPRED, vpred): Handle SVE structure modes.
21984         * config/aarch64/constraints.md (Utx): New constraint.
21985         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21986         (aarch64_sve_struct_nonimmediate_operand): New predicates.
21987         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21988         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21989         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21990         structure modes.  Split into pieces after RA.
21991         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21992         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21993         New patterns.
21994         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21995         SVE structure modes.
21996         (aarch64_classify_address): Likewise.
21997         (sizetochar): Move earlier in file.
21998         (aarch64_print_operand): Handle SVE register lists.
21999         (aarch64_array_mode): New function.
22000         (aarch64_sve_struct_memory_operand_p): Likewise.
22001         (TARGET_ARRAY_MODE): Redefine.
22002
22003 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22004             Alan Hayward  <alan.hayward@arm.com>
22005             David Sherwood  <david.sherwood@arm.com>
22006
22007         * target.def (array_mode): New target hook.
22008         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22009         * doc/tm.texi: Regenerate.
22010         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22011         * hooks.c (hook_optmode_mode_uhwi_none): New function.
22012         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22013         targetm.array_mode.
22014         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
22015         type sizes.
22016
22017 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22018             Alan Hayward  <alan.hayward@arm.com>
22019             David Sherwood  <david.sherwood@arm.com>
22020
22021         * fold-const.c (fold_binary_loc): Check the argument types
22022         rather than the result type when testing for a vector operation.
22023
22024 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22025
22026         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22027         * doc/tm.texi: Regenerate.
22028
22029 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22030             Alan Hayward  <alan.hayward@arm.com>
22031             David Sherwood  <david.sherwood@arm.com>
22032
22033         * doc/invoke.texi (-msve-vector-bits=): Document new option.
22034         (sve): Document new AArch64 extension.
22035         * doc/md.texi (w): Extend the description of the AArch64
22036         constraint to include SVE vectors.
22037         (Upl, Upa): Document new AArch64 predicate constraints.
22038         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22039         enum.
22040         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22041         (msve-vector-bits=): New option.
22042         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22043         SVE when these are disabled.
22044         (sve): New extension.
22045         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22046         modes.  Adjust their number of units based on aarch64_sve_vg.
22047         (MAX_BITSIZE_MODE_ANY_MODE): Define.
22048         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22049         aarch64_addr_query_type.
22050         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22051         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22052         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22053         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22054         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22055         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22056         (aarch64_simd_imm_zero_p): Delete.
22057         (aarch64_check_zero_based_sve_index_immediate): Declare.
22058         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22059         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22060         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22061         (aarch64_sve_float_mul_immediate_p): Likewise.
22062         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22063         rather than an rtx.
22064         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22065         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22066         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22067         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22068         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22069         (aarch64_regmode_natural_size): Likewise.
22070         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22071         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22072         left one place.
22073         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22074         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22075         for VG and the SVE predicate registers.
22076         (V_ALIASES): Add a "z"-prefixed alias.
22077         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22078         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22079         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22080         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22081         (REG_CLASS_NAMES): Add entries for them.
22082         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
22083         and the predicate registers.
22084         (aarch64_sve_vg): Declare.
22085         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22086         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22087         (REGMODE_NATURAL_SIZE): Define.
22088         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22089         SVE macros.
22090         * config/aarch64/aarch64.c: Include cfgrtl.h.
22091         (simd_immediate_info): Add a constructor for series vectors,
22092         and an associated step field.
22093         (aarch64_sve_vg): New variable.
22094         (aarch64_dbx_register_number): Handle VG and the predicate registers.
22095         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22096         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22097         (VEC_ANY_DATA, VEC_STRUCT): New constants.
22098         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22099         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22100         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22101         (aarch64_get_mask_mode): New functions.
22102         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22103         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22104         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
22105         predicate modes and predicate registers.  Explicitly restrict
22106         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
22107         to store a vector mode if it is recognized by
22108         aarch64_classify_vector_mode.
22109         (aarch64_regmode_natural_size): New function.
22110         (aarch64_hard_regno_caller_save_mode): Return the original mode
22111         for predicates.
22112         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22113         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22114         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22115         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22116         functions.
22117         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
22118         does not overlap dest if the function is frame-related.  Handle
22119         SVE constants.
22120         (aarch64_split_add_offset): New function.
22121         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22122         them aarch64_add_offset.
22123         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22124         and update call to aarch64_sub_sp.
22125         (aarch64_add_cfa_expression): New function.
22126         (aarch64_expand_prologue): Pass extra temporary registers to the
22127         functions above.  Handle the case in which we need to emit new
22128         DW_CFA_expressions for registers that were originally saved
22129         relative to the stack pointer, but now have to be expressed
22130         relative to the frame pointer.
22131         (aarch64_output_mi_thunk): Pass extra temporary registers to the
22132         functions above.
22133         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
22134         IP0 and IP1 values for SVE frames.
22135         (aarch64_expand_vec_series): New function.
22136         (aarch64_expand_sve_widened_duplicate): Likewise.
22137         (aarch64_expand_sve_const_vector): Likewise.
22138         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22139         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
22140         into the register, rather than emitting a SET directly.
22141         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22142         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22143         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22144         (offset_9bit_signed_scaled_p): New functions.
22145         (aarch64_replicate_bitmask_imm): New function.
22146         (aarch64_bitmask_imm): Use it.
22147         (aarch64_cannot_force_const_mem): Reject expressions involving
22148         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
22149         (aarch64_classify_index): Handle SVE indices, by requiring
22150         a plain register index with a scale that matches the element size.
22151         (aarch64_classify_address): Handle SVE addresses.  Assert that
22152         the mode of the address is VOIDmode or an integer mode.
22153         Update call to aarch64_classify_symbol.
22154         (aarch64_classify_symbolic_expression): Update call to
22155         aarch64_classify_symbol.
22156         (aarch64_const_vec_all_in_range_p): New function.
22157         (aarch64_print_vector_float_operand): Likewise.
22158         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
22159         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
22160         and the FP immediates 1.0 and 0.5.
22161         (aarch64_print_address_internal): Handle SVE addresses.
22162         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22163         (aarch64_regno_regclass): Handle predicate registers.
22164         (aarch64_secondary_reload): Handle big-endian reloads of SVE
22165         data modes.
22166         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22167         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22168         (aarch64_convert_sve_vector_bits): New function.
22169         (aarch64_override_options): Use it to handle -msve-vector-bits=.
22170         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22171         rather than an rtx.
22172         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22173         Handle SVE vector and predicate modes.  Accept VL-based constants
22174         that need only one temporary register, and VL offsets that require
22175         no temporary registers.
22176         (aarch64_conditional_register_usage): Mark the predicate registers
22177         as fixed if SVE isn't available.
22178         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22179         Return true for SVE vector and predicate modes.
22180         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22181         rather than an unsigned int.  Handle SVE modes.
22182         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
22183         SVE modes.
22184         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22185         if SVE is enabled.
22186         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22187         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22188         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22189         (aarch64_sve_float_mul_immediate_p): New functions.
22190         (aarch64_sve_valid_immediate): New function.
22191         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22192         Explicitly reject structure modes.  Check for INDEX constants.
22193         Handle PTRUE and PFALSE constants.
22194         (aarch64_check_zero_based_sve_index_immediate): New function.
22195         (aarch64_simd_imm_zero_p): Delete.
22196         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22197         vector modes.  Accept constants in the range of CNT[BHWD].
22198         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22199         ask for an Advanced SIMD mode.
22200         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22201         (aarch64_simd_vector_alignment): Handle SVE predicates.
22202         (aarch64_vectorize_preferred_vector_alignment): New function.
22203         (aarch64_simd_vector_alignment_reachable): Use it instead of
22204         the vector size.
22205         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22206         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22207         functions.
22208         (MAX_VECT_LEN): Delete.
22209         (expand_vec_perm_d): Add a vec_flags field.
22210         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22211         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22212         (aarch64_evpc_ext): Don't apply a big-endian lane correction
22213         for SVE modes.
22214         (aarch64_evpc_rev): Rename to...
22215         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
22216         (aarch64_evpc_rev_global): New function.
22217         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22218         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22219         MAX_VECT_LEN.
22220         (aarch64_evpc_sve_tbl): New function.
22221         (aarch64_expand_vec_perm_const_1): Update after rename of
22222         aarch64_evpc_rev.  Handle SVE permutes too, trying
22223         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22224         than aarch64_evpc_tbl.
22225         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22226         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22227         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22228         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22229         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22230         (aarch64_expand_sve_vcond): New functions.
22231         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22232         of aarch64_vector_mode_p.
22233         (aarch64_dwarf_poly_indeterminate_value): New function.
22234         (aarch64_compute_pressure_classes): Likewise.
22235         (aarch64_can_change_mode_class): Likewise.
22236         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22237         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22238         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22239         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22240         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22241         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22242         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22243         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22244         constraints.
22245         (Dn, Dl, Dr): Accept const as well as const_vector.
22246         (Dz): Likewise.  Compare against CONST0_RTX.
22247         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22248         of "vector" where appropriate.
22249         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22250         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22251         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22252         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22253         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22254         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22255         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22256         (v_int_equiv): Extend to SVE modes.
22257         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22258         mode attributes.
22259         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22260         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22261         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22262         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22263         (SVE_COND_FP_CMP): New int iterators.
22264         (perm_hilo): Handle the new unpack unspecs.
22265         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22266         attributes.
22267         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22268         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22269         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22270         (aarch64_equality_operator, aarch64_constant_vector_operand)
22271         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22272         (aarch64_sve_nonimmediate_operand): Likewise.
22273         (aarch64_sve_general_operand): Likewise.
22274         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22275         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22276         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22277         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22278         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22279         (aarch64_sve_float_arith_immediate): Likewise.
22280         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22281         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22282         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22283         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22284         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22285         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22286         (aarch64_sve_float_arith_operand): Likewise.
22287         (aarch64_sve_float_arith_with_sub_operand): Likewise.
22288         (aarch64_sve_float_mul_operand): Likewise.
22289         (aarch64_sve_vec_perm_operand): Likewise.
22290         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22291         (aarch64_mov_operand): Accept const_poly_int and const_vector.
22292         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22293         as well as const_vector.
22294         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22295         in file.  Use CONST0_RTX and CONSTM1_RTX.
22296         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
22297         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22298         Use aarch64_simd_imm_zero.
22299         * config/aarch64/aarch64-sve.md: New file.
22300         * config/aarch64/aarch64.md: Include it.
22301         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22302         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22303         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22304         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22305         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22306         (sve): New attribute.
22307         (enabled): Disable instructions with the sve attribute unless
22308         TARGET_SVE.
22309         (movqi, movhi): Pass CONST_POLY_INT operaneds through
22310         aarch64_expand_mov_immediate.
22311         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22312         CNT[BHSD] immediates.
22313         (movti): Split CONST_POLY_INT moves into two halves.
22314         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22315         Split additions that need a temporary here if the destination
22316         is the stack pointer.
22317         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22318         (*add<mode>3_poly_1): New instruction.
22319         (set_clobber_cc): New expander.
22320
22321 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22322
22323         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22324         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
22325         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22326         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22327         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
22328         Change innermode from fixed_mode_size to machine_mode.
22329         (simplify_subreg): Update call accordingly.  Handle a constant-sized
22330         subreg of a variable-length CONST_VECTOR.
22331
22332 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22333             Alan Hayward  <alan.hayward@arm.com>
22334             David Sherwood  <david.sherwood@arm.com>
22335
22336         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22337         (add_offset_to_base): New function, split out from...
22338         (create_mem_ref): ...here.  When handling a scale other than 1,
22339         check first whether the address is valid without the offset.
22340         Add it into the base if so, leaving the index and scale as-is.
22341
22342 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22343
22344         PR c++/83778
22345         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22346         fold_for_warn before checking if arg2 is INTEGER_CST.
22347
22348 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
22349
22350         * config/rs6000/predicates.md (load_multiple_operation): Delete.
22351         (store_multiple_operation): Delete.
22352         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22353         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22354         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22355         guarded by TARGET_STRING.
22356         (rs6000_output_load_multiple): Delete.
22357         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22358         OPTION_MASK_STRING / TARGET_STRING handling.
22359         (print_operand) <'N', 'O'>: Add comment that these are unused now.
22360         (const rs6000_opt_masks) <"string">: Change mask to 0.
22361         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22362         (MASK_STRING): Delete.
22363         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22364         parts.  Simplify.
22365         (load_multiple): Delete.
22366         (*ldmsi8): Delete.
22367         (*ldmsi7): Delete.
22368         (*ldmsi6): Delete.
22369         (*ldmsi5): Delete.
22370         (*ldmsi4): Delete.
22371         (*ldmsi3): Delete.
22372         (store_multiple): Delete.
22373         (*stmsi8): Delete.
22374         (*stmsi7): Delete.
22375         (*stmsi6): Delete.
22376         (*stmsi5): Delete.
22377         (*stmsi4): Delete.
22378         (*stmsi3): Delete.
22379         (movmemsi_8reg): Delete.
22380         (corresponding unnamed define_insn): Delete.
22381         (movmemsi_6reg): Delete.
22382         (corresponding unnamed define_insn): Delete.
22383         (movmemsi_4reg): Delete.
22384         (corresponding unnamed define_insn): Delete.
22385         (movmemsi_2reg): Delete.
22386         (corresponding unnamed define_insn): Delete.
22387         (movmemsi_1reg): Delete.
22388         (corresponding unnamed define_insn): Delete.
22389         * config/rs6000/rs6000.opt (mno-string): New.
22390         (mstring): Replace by deprecation warning stub.
22391         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22392
22393 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22394
22395         * regrename.c (regrename_do_replace): If replacing the same
22396         reg multiple times, try to reuse last created gen_raw_REG.
22397
22398         PR debug/81155
22399         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22400         main to workaround a bug in GDB.
22401
22402 2018-01-12  Tom de Vries  <tom@codesourcery.com>
22403
22404         PR target/83737
22405         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22406
22407 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
22408
22409         PR rtl-optimization/80481
22410         * ira-color.c (get_cap_member): New function.
22411         (allocnos_conflict_by_live_ranges_p): Use it.
22412         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22413         (setup_slot_coalesced_allocno_live_ranges): Ditto.
22414
22415 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
22416
22417         PR target/83628
22418         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22419         (*saddl_se_1): Ditto.
22420         (*ssubsi_1): Ditto.
22421         (*ssubl_se_1): Ditto.
22422
22423 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22424
22425         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22426         rather than wi::to_widest for DR_INITs.
22427         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22428         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22429         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22430         INTEGER_CSTs.
22431         (vect_analyze_group_access_1): Note that here.
22432
22433 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22434
22435         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22436         polynomial type sizes.
22437
22438 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22439
22440         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22441         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22442         (gimple_add_tmp_var): Likewise.
22443
22444 2018-01-12  Martin Liska  <mliska@suse.cz>
22445
22446         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22447         (gimple_alloc_sizes): Likewise.
22448         (dump_gimple_statistics): Use PRIu64 in printf format.
22449         * gimple.h: Change uint64_t to int.
22450
22451 2018-01-12  Martin Liska  <mliska@suse.cz>
22452
22453         * tree-core.h: Use uint64_t instead of int.
22454         * tree.c (tree_node_counts): Likewise.
22455         (tree_node_sizes): Likewise.
22456         (dump_tree_statistics): Use PRIu64 in printf format.
22457
22458 2018-01-12  Martin Liska  <mliska@suse.cz>
22459
22460         * Makefile.in: As qsort_chk is implemented in vec.c, add
22461         vec.o to linkage of gencfn-macros.
22462         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22463         passing the info to record_node_allocation_statistics.
22464         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22465         and pass the info.
22466         * ggc-common.c (struct ggc_usage): Add operator== and use
22467         it in operator< and compare function.
22468         * mem-stats.h (struct mem_usage): Likewise.
22469         * vec.c (struct vec_usage): Remove operator< and compare
22470         function. Can be simply inherited.
22471
22472 2018-01-12  Martin Jambor  <mjambor@suse.cz>
22473
22474         PR target/81616
22475         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22476         * tree-ssa-math-opts.c: Include domwalk.h.
22477         (convert_mult_to_fma_1): New function.
22478         (fma_transformation_info): New type.
22479         (fma_deferring_state): Likewise.
22480         (cancel_fma_deferring): New function.
22481         (result_of_phi): Likewise.
22482         (last_fma_candidate_feeds_initial_phi): Likewise.
22483         (convert_mult_to_fma): Added deferring logic, split actual
22484         transformation to convert_mult_to_fma_1.
22485         (math_opts_dom_walker): New type.
22486         (math_opts_dom_walker::after_dom_children): New method, body moved
22487         here from pass_optimize_widening_mul::execute, added deferring logic
22488         bits.
22489         (pass_optimize_widening_mul::execute): Moved most of code to
22490         math_opts_dom_walker::after_dom_children.
22491         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22492         * config/i386/i386.c (ix86_option_override_internal): Added
22493         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22494
22495 2018-01-12  Richard Biener  <rguenther@suse.de>
22496
22497         PR debug/83157
22498         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22499         inline instance vars.
22500
22501 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22502
22503         PR target/81819
22504         * config/rx/rx.c (rx_is_restricted_memory_address):
22505         Handle SUBREG case.
22506
22507 2018-01-12  Richard Biener  <rguenther@suse.de>
22508
22509         PR tree-optimization/80846
22510         * target.def (split_reduction): New target hook.
22511         * targhooks.c (default_split_reduction): New function.
22512         * targhooks.h (default_split_reduction): Declare.
22513         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22514         target requests first reduce vectors by combining low and high
22515         parts.
22516         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22517         (get_vectype_for_scalar_type_and_size): Export.
22518         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22519         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22520         * doc/tm.texi: Regenerate.
22521         * config/i386/i386.c (ix86_split_reduction): Implement
22522         TARGET_VECTORIZE_SPLIT_REDUCTION.
22523
22524 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22525
22526         PR target/83368
22527         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22528         in PIC mode except for TARGET_VXWORKS_RTP.
22529         * config/sparc/sparc.c: Include cfgrtl.h.
22530         (TARGET_INIT_PIC_REG): Define.
22531         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22532         (sparc_pic_register_p): New predicate.
22533         (sparc_legitimate_address_p): Use it.
22534         (sparc_legitimize_pic_address): Likewise.
22535         (sparc_delegitimize_address): Likewise.
22536         (sparc_mode_dependent_address_p): Likewise.
22537         (gen_load_pcrel_sym): Remove 4th parameter.
22538         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22539         (sparc_expand_prologue): Do not call load_got_register here.
22540         (sparc_flat_expand_prologue): Likewise.
22541         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22542         (sparc_use_pseudo_pic_reg): New function.
22543         (sparc_init_pic_reg): Likewise.
22544         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22545         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22546
22547 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22548
22549         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22550         Add item for branch_cost.
22551
22552 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22553
22554         PR rtl-optimization/83565
22555         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22556         not extend the result to a larger mode for rotate operations.
22557         (num_sign_bit_copies1): Likewise.
22558
22559 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22560
22561         PR target/40411
22562         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22563         -symbolic.
22564         Use values-Xc.o for -pedantic.
22565         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22566
22567 2018-01-12  Martin Liska  <mliska@suse.cz>
22568
22569         PR ipa/83054
22570         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22571         New function.
22572         (possible_polymorphic_call_targets): Use it.
22573         (ipa_devirt): Likewise.
22574
22575 2018-01-12  Martin Liska  <mliska@suse.cz>
22576
22577         * profile-count.h (enum profile_quality): Use 0 as invalid
22578         enum value of profile_quality.
22579
22580 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22581
22582         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22583         -mext-string options.
22584
22585 2018-01-12  Richard Biener  <rguenther@suse.de>
22586
22587         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22588         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22589         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22590         Likewise.
22591         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22592
22593 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22594
22595         * configure.ac (--with-long-double-format): Add support for the
22596         configuration option to change the default long double format on
22597         PowerPC systems.
22598         * config.gcc (powerpc*-linux*-*): Likewise.
22599         * configure: Regenerate.
22600         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22601         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22602         used without modification.
22603
22604 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22605
22606         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22607         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22608         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22609         MISC_BUILTIN_SPEC_BARRIER.
22610         (rs6000_init_builtins): Likewise.
22611         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22612         enum value.
22613         (speculation_barrier): New define_insn.
22614         * doc/extend.texi: Document __builtin_speculation_barrier.
22615
22616 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22617
22618         PR target/83203
22619         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22620         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22621         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22622         iterators.
22623         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22624         integral modes instead of "ss" and "sd".
22625         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22626         vectors with 32-bit and 64-bit elements.
22627         (vecdupssescalarmodesuffix): New mode attribute.
22628         (vec_dup<mode>): Use it.
22629
22630 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22631
22632         PR target/83330
22633         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22634         frame if argument is passed on stack.
22635
22636 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22637
22638         PR target/82682
22639         * ree.c (combine_reaching_defs): Optimize also
22640         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22641         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22642
22643 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22644
22645         PR middle-end/83189
22646         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22647
22648 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22649
22650         PR middle-end/83718
22651         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22652         after they are computed.
22653
22654 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22655
22656         PR tree-optimization/83695
22657         * gimple-loop-linterchange.cc
22658         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22659         reset cached scev information after interchange.
22660         (pass_linterchange::execute): Remove call to scev_reset_htab.
22661
22662 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22663
22664         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22665         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22666         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22667         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22668         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22669         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22670         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22671         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22672         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22673         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22674         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22675         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22676         (V_lane_reg): Likewise.
22677         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22678         New define_expand.
22679         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22680         (vfmal_lane_low<mode>_intrinsic,
22681         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22682         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22683         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22684         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22685         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22686         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22687
22688 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22689
22690         * config/arm/arm-cpus.in (fp16fml): New feature.
22691         (ALL_SIMD): Add fp16fml.
22692         (armv8.2-a): Add fp16fml as an option.
22693         (armv8.3-a): Likewise.
22694         (armv8.4-a): Add fp16fml as part of fp16.
22695         * config/arm/arm.h (TARGET_FP16FML): Define.
22696         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22697         when appropriate.
22698         * config/arm/arm-modes.def (V2HF): Define.
22699         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22700         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22701         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22702         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22703         vfmsl_low, vfmsl_high): New set of builtins.
22704         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22705         (vfml_op): New code attribute.
22706         (VFMLHALVES): New int iterator.
22707         (VFML, VFMLSEL): New mode attributes.
22708         (V_reg): Define mapping for V2HF.
22709         (V_hi, V_lo): New mode attributes.
22710         (VF_constraint): Likewise.
22711         (vfml_half, vfml_half_selector): New int attributes.
22712         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22713         define_expand.
22714         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22715         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22716         New define_insn.
22717         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22718         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22719         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22720         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22721         documentation.
22722         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22723         Document new effective target and option set.
22724
22725 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22726
22727         * config/arm/arm-cpus.in (armv8_4): New feature.
22728         (ARMv8_4a): New fgroup.
22729         (armv8.4-a): New arch.
22730         * config/arm/arm-tables.opt: Regenerate.
22731         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22732         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22733         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22734         Add matching rules for -march=armv8.4-a and extensions.
22735         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22736
22737 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22738
22739         PR target/81821
22740         * config/rx/rx.md (BW): New mode attribute.
22741         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22742
22743 2018-01-11  Richard Biener  <rguenther@suse.de>
22744
22745         PR tree-optimization/83435
22746         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22747         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22748         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22749
22750 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22751             Alan Hayward  <alan.hayward@arm.com>
22752             David Sherwood  <david.sherwood@arm.com>
22753
22754         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22755         field.
22756         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22757         (aarch64_print_address_internal): Use it to check for a zero offset.
22758
22759 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22760             Alan Hayward  <alan.hayward@arm.com>
22761             David Sherwood  <david.sherwood@arm.com>
22762
22763         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22764         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22765         Return a poly_int64 rather than a HOST_WIDE_INT.
22766         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22767         rather than a HOST_WIDE_INT.
22768         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22769         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22770         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22771         final_offset from HOST_WIDE_INT to poly_int64.
22772         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22773         to_constant when getting the number of units in an Advanced SIMD
22774         mode.
22775         (aarch64_builtin_vectorized_function): Check for a constant number
22776         of units.
22777         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22778         GET_MODE_SIZE.
22779         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22780         attribute instead of GET_MODE_NUNITS.
22781         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22782         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22783         GET_MODE_SIZE for fixed-size registers.
22784         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22785         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22786         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22787         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22788         (aarch64_print_operand, aarch64_print_address_internal)
22789         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22790         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22791         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22792         Handle polynomial GET_MODE_SIZE.
22793         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22794         wider than SImode without modification.
22795         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22796         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22797         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22798         passing and returning SVE modes.
22799         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22800         rather than GEN_INT.
22801         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22802         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22803         (aarch64_allocate_and_probe_stack_space): Likewise.
22804         (aarch64_layout_frame): Cope with polynomial offsets.
22805         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22806         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22807         polynomial offsets.
22808         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22809         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22810         poly_int64 rather than a HOST_WIDE_INT.
22811         (aarch64_get_separate_components, aarch64_process_components)
22812         (aarch64_expand_prologue, aarch64_expand_epilogue)
22813         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22814         (aarch64_anchor_offset): New function, split out from...
22815         (aarch64_legitimize_address): ...here.
22816         (aarch64_builtin_vectorization_cost): Handle polynomial
22817         TYPE_VECTOR_SUBPARTS.
22818         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22819         GET_MODE_NUNITS.
22820         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22821         number of elements from the PARALLEL rather than the mode.
22822         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22823         rather than GET_MODE_BITSIZE.
22824         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22825         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22826         (aarch64_expand_vec_perm_const_1): Handle polynomial
22827         d->perm.length () and d->perm elements.
22828         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22829         Apply to_constant to d->perm elements.
22830         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22831         polynomial CONST_VECTOR_NUNITS.
22832         (aarch64_move_pointer): Take amount as a poly_int64 rather
22833         than an int.
22834         (aarch64_progress_pointer): Avoid temporary variable.
22835         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22836         the mode attribute instead of GET_MODE.
22837
22838 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22839             Alan Hayward  <alan.hayward@arm.com>
22840             David Sherwood  <david.sherwood@arm.com>
22841
22842         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22843         x exists before using it.
22844         (aarch64_add_constant_internal): Rename to...
22845         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22846         src and dest rtxes.  Handle the case in which they're different,
22847         including when the offset is zero.  Replace scratchreg with an rtx.
22848         Use 2 additions if there is no spare register into which we can
22849         move a 16-bit constant.
22850         (aarch64_add_constant): Delete.
22851         (aarch64_add_offset): Replace reg with separate src and dest
22852         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22853         Use aarch64_add_offset_1.
22854         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22855         an rtx rather than an int.  Take the delta as a poly_int64
22856         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22857         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22858         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22859         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22860         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22861         and aarch64_add_sp.
22862         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22863         aarch64_add_constant.
22864
22865 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22866
22867         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22868         Use scalar_float_mode.
22869
22870 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22871
22872         * config/aarch64/aarch64-simd.md
22873         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22874         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22875         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22876         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22877         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22878         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22879         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22880         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22881         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22882         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22883
22884 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22885
22886         PR target/83514
22887         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22888         targ_options->x_arm_arch_string is non NULL.
22889
22890 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22891
22892         * config/aarch64/aarch64.h
22893         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22894
22895 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22896
22897         PR target/82096
22898         * expmed.c (emit_store_flag_force): Swap if const op0
22899         and change VOIDmode to mode of op0.
22900
22901 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22902
22903         PR rtl-optimization/83761
22904         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22905         than bytes to mode_for_size.
22906
22907 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22908
22909         PR middle-end/83189
22910         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22911         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22912         profile.
22913
22914 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22915
22916         PR middle-end/83575
22917         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22918         when in layout mode.
22919         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22920         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22921         partition fixup.
22922
22923 2018-01-10  Michael Collison  <michael.collison@arm.com>
22924
22925         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22926         * config/aarch64/aarch64-option-extension.def: Add
22927         AARCH64_OPT_EXTENSION of 'fp16fml'.
22928         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22929         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22930         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22931         * config/aarch64/constraints.md (Ui7): New constraint.
22932         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22933         (VFMLA_SEL_W): Ditto.
22934         (f16quad): Ditto.
22935         (f16mac1): Ditto.
22936         (VFMLA16_LOW): New int iterator.
22937         (VFMLA16_HIGH): Ditto.
22938         (UNSPEC_FMLAL): New unspec.
22939         (UNSPEC_FMLSL): Ditto.
22940         (UNSPEC_FMLAL2): Ditto.
22941         (UNSPEC_FMLSL2): Ditto.
22942         (f16mac): New code attribute.
22943         * config/aarch64/aarch64-simd-builtins.def
22944         (aarch64_fmlal_lowv2sf): Ditto.
22945         (aarch64_fmlsl_lowv2sf): Ditto.
22946         (aarch64_fmlalq_lowv4sf): Ditto.
22947         (aarch64_fmlslq_lowv4sf): Ditto.
22948         (aarch64_fmlal_highv2sf): Ditto.
22949         (aarch64_fmlsl_highv2sf): Ditto.
22950         (aarch64_fmlalq_highv4sf): Ditto.
22951         (aarch64_fmlslq_highv4sf): Ditto.
22952         (aarch64_fmlal_lane_lowv2sf): Ditto.
22953         (aarch64_fmlsl_lane_lowv2sf): Ditto.
22954         (aarch64_fmlal_laneq_lowv2sf): Ditto.
22955         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22956         (aarch64_fmlalq_lane_lowv4sf): Ditto.
22957         (aarch64_fmlsl_lane_lowv4sf): Ditto.
22958         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22959         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22960         (aarch64_fmlal_lane_highv2sf): Ditto.
22961         (aarch64_fmlsl_lane_highv2sf): Ditto.
22962         (aarch64_fmlal_laneq_highv2sf): Ditto.
22963         (aarch64_fmlsl_laneq_highv2sf): Ditto.
22964         (aarch64_fmlalq_lane_highv4sf): Ditto.
22965         (aarch64_fmlsl_lane_highv4sf): Ditto.
22966         (aarch64_fmlalq_laneq_highv4sf): Ditto.
22967         (aarch64_fmlsl_laneq_highv4sf): Ditto.
22968         * config/aarch64/aarch64-simd.md:
22969         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22970         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22971         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22972         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22973         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22974         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22975         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22976         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22977         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22978         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22979         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22980         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22981         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22982         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22983         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22984         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22985         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22986         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22987         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22988         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22989         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22990         (vfmlsl_low_u32): Ditto.
22991         (vfmlalq_low_u32): Ditto.
22992         (vfmlslq_low_u32): Ditto.
22993         (vfmlal_high_u32): Ditto.
22994         (vfmlsl_high_u32): Ditto.
22995         (vfmlalq_high_u32): Ditto.
22996         (vfmlslq_high_u32): Ditto.
22997         (vfmlal_lane_low_u32): Ditto.
22998         (vfmlsl_lane_low_u32): Ditto.
22999         (vfmlal_laneq_low_u32): Ditto.
23000         (vfmlsl_laneq_low_u32): Ditto.
23001         (vfmlalq_lane_low_u32): Ditto.
23002         (vfmlslq_lane_low_u32): Ditto.
23003         (vfmlalq_laneq_low_u32): Ditto.
23004         (vfmlslq_laneq_low_u32): Ditto.
23005         (vfmlal_lane_high_u32): Ditto.
23006         (vfmlsl_lane_high_u32): Ditto.
23007         (vfmlal_laneq_high_u32): Ditto.
23008         (vfmlsl_laneq_high_u32): Ditto.
23009         (vfmlalq_lane_high_u32): Ditto.
23010         (vfmlslq_lane_high_u32): Ditto.
23011         (vfmlalq_laneq_high_u32): Ditto.
23012         (vfmlslq_laneq_high_u32): Ditto.
23013         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23014         (AARCH64_FL_FOR_ARCH8_4): New.
23015         (AARCH64_ISA_F16FML): New ISA flag.
23016         (TARGET_F16FML): New feature flag for fp16fml.
23017         (doc/invoke.texi): Document new fp16fml option.
23018
23019 2018-01-10  Michael Collison  <michael.collison@arm.com>
23020
23021         * config/aarch64/aarch64-builtins.c:
23022         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23023         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23024         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23025         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23026         (AARCH64_ISA_SHA3): New ISA flag.
23027         (TARGET_SHA3): New feature flag for sha3.
23028         * config/aarch64/iterators.md (sha512_op): New int attribute.
23029         (CRYPTO_SHA512): New int iterator.
23030         (UNSPEC_SHA512H): New unspec.
23031         (UNSPEC_SHA512H2): Ditto.
23032         (UNSPEC_SHA512SU0): Ditto.
23033         (UNSPEC_SHA512SU1): Ditto.
23034         * config/aarch64/aarch64-simd-builtins.def
23035         (aarch64_crypto_sha512hqv2di): New builtin.
23036         (aarch64_crypto_sha512h2qv2di): Ditto.
23037         (aarch64_crypto_sha512su0qv2di): Ditto.
23038         (aarch64_crypto_sha512su1qv2di): Ditto.
23039         (aarch64_eor3qv8hi): Ditto.
23040         (aarch64_rax1qv2di): Ditto.
23041         (aarch64_xarqv2di): Ditto.
23042         (aarch64_bcaxqv8hi): Ditto.
23043         * config/aarch64/aarch64-simd.md:
23044         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23045         (aarch64_crypto_sha512su0qv2di): Ditto.
23046         (aarch64_crypto_sha512su1qv2di): Ditto.
23047         (aarch64_eor3qv8hi): Ditto.
23048         (aarch64_rax1qv2di): Ditto.
23049         (aarch64_xarqv2di): Ditto.
23050         (aarch64_bcaxqv8hi): Ditto.
23051         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23052         (vsha512h2q_u64): Ditto.
23053         (vsha512su0q_u64): Ditto.
23054         (vsha512su1q_u64): Ditto.
23055         (veor3q_u16): Ditto.
23056         (vrax1q_u64): Ditto.
23057         (vxarq_u64): Ditto.
23058         (vbcaxq_u16): Ditto.
23059         * config/arm/types.md (crypto_sha512): New type attribute.
23060         (crypto_sha3): Ditto.
23061         (doc/invoke.texi): Document new sha3 option.
23062
23063 2018-01-10  Michael Collison  <michael.collison@arm.com>
23064
23065         * config/aarch64/aarch64-builtins.c:
23066         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23067         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23068         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23069         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23070         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23071         (AARCH64_ISA_SM4): New ISA flag.
23072         (TARGET_SM4): New feature flag for sm4.
23073         * config/aarch64/aarch64-simd-builtins.def
23074         (aarch64_sm3ss1qv4si): Ditto.
23075         (aarch64_sm3tt1aq4si): Ditto.
23076         (aarch64_sm3tt1bq4si): Ditto.
23077         (aarch64_sm3tt2aq4si): Ditto.
23078         (aarch64_sm3tt2bq4si): Ditto.
23079         (aarch64_sm3partw1qv4si): Ditto.
23080         (aarch64_sm3partw2qv4si): Ditto.
23081         (aarch64_sm4eqv4si): Ditto.
23082         (aarch64_sm4ekeyqv4si): Ditto.
23083         * config/aarch64/aarch64-simd.md:
23084         (aarch64_sm3ss1qv4si): Ditto.
23085         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23086         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23087         (aarch64_sm4eqv4si): Ditto.
23088         (aarch64_sm4ekeyqv4si): Ditto.
23089         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23090         (sm3part_op): Ditto.
23091         (CRYPTO_SM3TT): Ditto.
23092         (CRYPTO_SM3PART): Ditto.
23093         (UNSPEC_SM3SS1): New unspec.
23094         (UNSPEC_SM3TT1A): Ditto.
23095         (UNSPEC_SM3TT1B): Ditto.
23096         (UNSPEC_SM3TT2A): Ditto.
23097         (UNSPEC_SM3TT2B): Ditto.
23098         (UNSPEC_SM3PARTW1): Ditto.
23099         (UNSPEC_SM3PARTW2): Ditto.
23100         (UNSPEC_SM4E): Ditto.
23101         (UNSPEC_SM4EKEY): Ditto.
23102         * config/aarch64/constraints.md (Ui2): New constraint.
23103         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23104         * config/arm/types.md (crypto_sm3): New type attribute.
23105         (crypto_sm4): Ditto.
23106         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23107         (vsm3tt1aq_u32): Ditto.
23108         (vsm3tt1bq_u32): Ditto.
23109         (vsm3tt2aq_u32): Ditto.
23110         (vsm3tt2bq_u32): Ditto.
23111         (vsm3partw1q_u32): Ditto.
23112         (vsm3partw2q_u32): Ditto.
23113         (vsm4eq_u32): Ditto.
23114         (vsm4ekeyq_u32): Ditto.
23115         (doc/invoke.texi): Document new sm4 option.
23116
23117 2018-01-10  Michael Collison  <michael.collison@arm.com>
23118
23119         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23120         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23121         (AARCH64_FL_FOR_ARCH8_4): New.
23122         (AARCH64_FL_V8_4): New flag.
23123         (doc/invoke.texi): Document new armv8.4-a option.
23124
23125 2018-01-10  Michael Collison  <michael.collison@arm.com>
23126
23127         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23128         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23129         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23130         * config/aarch64/aarch64-option-extension.def: Add
23131         AARCH64_OPT_EXTENSION of 'sha2'.
23132         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23133         (crypto): Disable sha2 and aes if crypto disabled.
23134         (crypto): Enable aes and sha2 if enabled.
23135         (simd): Disable sha2 and aes if simd disabled.
23136         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23137         New flags.
23138         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23139         (TARGET_SHA2): New feature flag for sha2.
23140         (TARGET_AES): New feature flag for aes.
23141         * config/aarch64/aarch64-simd.md:
23142         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23143         conditional on TARGET_AES.
23144         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23145         (aarch64_crypto_sha1hsi): Make pattern conditional
23146         on TARGET_SHA2.
23147         (aarch64_crypto_sha1hv4si): Ditto.
23148         (aarch64_be_crypto_sha1hv4si): Ditto.
23149         (aarch64_crypto_sha1su1v4si): Ditto.
23150         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23151         (aarch64_crypto_sha1su0v4si): Ditto.
23152         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23153         (aarch64_crypto_sha256su0v4si): Ditto.
23154         (aarch64_crypto_sha256su1v4si): Ditto.
23155         (doc/invoke.texi): Document new aes and sha2 options.
23156
23157 2018-01-10  Martin Sebor  <msebor@redhat.com>
23158
23159         PR tree-optimization/83781
23160         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23161         as string arrays.
23162
23163 2018-01-11  Martin Sebor  <msebor@gmail.com>
23164             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23165
23166         PR tree-optimization/83501
23167         PR tree-optimization/81703
23168
23169         * tree-ssa-strlen.c (get_string_cst): Rename...
23170         (get_string_len): ...to this.  Handle global constants.
23171         (handle_char_store): Adjust.
23172
23173 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
23174             Jim Wilson  <jimw@sifive.com>
23175
23176         * config/riscv/riscv-protos.h (riscv_output_return): New.
23177         * config/riscv/riscv.c (struct machine_function): New naked_p field.
23178         (riscv_attribute_table, riscv_output_return),
23179         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23180         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23181         (riscv_compute_frame_info): Only compute frame->mask if not a naked
23182         function.
23183         (riscv_expand_prologue): Add early return for naked function.
23184         (riscv_expand_epilogue): Likewise.
23185         (riscv_function_ok_for_sibcall): Return false for naked function.
23186         (riscv_set_current_function): New.
23187         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23188         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23189         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23190         * doc/extend.texi (RISC-V Function Attributes): New.
23191
23192 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
23193
23194         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23195         check for 128-bit long double before checking TCmode.
23196         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23197         128-bit long doubles before checking TFmode or TCmode.
23198         (FLOAT128_IBM_P): Likewise.
23199
23200 2018-01-10  Martin Sebor  <msebor@redhat.com>
23201
23202         PR tree-optimization/83671
23203         * builtins.c (c_strlen): Unconditionally return zero for the empty
23204         string.
23205         Use -Warray-bounds for warnings.
23206         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23207         for non-constant array indices with COMPONENT_REF, arrays of
23208         arrays, and pointers to arrays.
23209         (gimple_fold_builtin_strlen): Determine and set length range for
23210         non-constant character arrays.
23211
23212 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
23213
23214         PR middle-end/81897
23215         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23216         empty blocks.
23217
23218 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
23219
23220         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23221
23222 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23223
23224         PR target/83399
23225         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23226         VECTOR_MEM_ALTIVEC_OR_VSX_P.
23227         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23228         indexed_or_indirect_operand predicate.
23229         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23230         (*vsx_le_perm_load_v8hi): Likewise.
23231         (*vsx_le_perm_load_v16qi): Likewise.
23232         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23233         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23234         (*vsx_le_perm_store_v8hi): Likewise.
23235         (*vsx_le_perm_store_v16qi): Likewise.
23236         (eight unnamed splitters): Likewise.
23237
23238 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23239
23240         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23241         * config/rs6000/emmintrin.h: Likewise.
23242         * config/rs6000/mmintrin.h: Likewise.
23243         * config/rs6000/xmmintrin.h: Likewise.
23244
23245 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
23246
23247         PR c++/43486
23248         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23249         "public_flag".
23250         * tree.c (tree_nop_conversion): Return true for location wrapper
23251         nodes.
23252         (maybe_wrap_with_location): New function.
23253         (selftest::check_strip_nops): New function.
23254         (selftest::test_location_wrappers): New function.
23255         (selftest::tree_c_tests): Call it.
23256         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23257         (maybe_wrap_with_location): New decl.
23258         (EXPR_LOCATION_WRAPPER_P): New macro.
23259         (location_wrapper_p): New inline function.
23260         (tree_strip_any_location_wrapper): New inline function.
23261
23262 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
23263
23264         PR target/83735
23265         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23266         stack_realign_offset for the largest alignment of stack slot
23267         actually used.
23268         (ix86_find_max_used_stack_alignment): New function.
23269         (ix86_finalize_stack_frame_flags): Use it.  Set
23270         max_used_stack_alignment if we don't realign stack.
23271         * config/i386/i386.h (machine_function): Add
23272         max_used_stack_alignment.
23273
23274 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
23275
23276         * config/arm/arm.opt (-mbranch-cost): New option.
23277         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23278         account.
23279
23280 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
23281
23282         PR target/83629
23283         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23284         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23285
23286 2018-01-10  Richard Biener  <rguenther@suse.de>
23287
23288         PR debug/83765
23289         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23290         early out so it also covers the case where we have a non-NULL
23291         origin.
23292
23293 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23294
23295         PR tree-optimization/83753
23296         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23297         for non-strided grouped accesses if the number of elements is 1.
23298
23299 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23300
23301         PR target/81616
23302         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23303         * i386.h (TARGET_USE_GATHER): Define.
23304         * x86-tune.def (X86_TUNE_USE_GATHER): New.
23305
23306 2018-01-10  Martin Liska  <mliska@suse.cz>
23307
23308         PR bootstrap/82831
23309         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23310         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23311         partitioning.
23312         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23313         CLEANUP_NO_PARTITIONING is not set.
23314
23315 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23316
23317         * doc/rtl.texi: Remove documentation of (const ...) wrappers
23318         for vectors, as a partial revert of r254296.
23319         * rtl.h (const_vec_p): Delete.
23320         (const_vec_duplicate_p): Don't test for vector CONSTs.
23321         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23322         * expmed.c (make_tree): Likewise.
23323
23324         Revert:
23325         * common.md (E, F): Use CONSTANT_P instead of checking for
23326         CONST_VECTOR.
23327         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23328         checking for CONST_VECTOR.
23329
23330 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23331
23332         PR middle-end/83575
23333         * predict.c (force_edge_cold): Handle in more sane way edges
23334         with no prediction.
23335
23336 2018-01-09  Carl Love  <cel@us.ibm.com>
23337
23338         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23339         V4SI, V4SF types.
23340         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23341         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23342         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23343         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
23344         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23345         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
23346         * config/rs6000/rs6000-protos.h: Add extern defition for
23347         rs6000_generate_float2_double_code.
23348         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23349         function.
23350         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23351         (float2_v2df): Add define_expand.
23352
23353 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
23354
23355         PR target/83628
23356         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23357         op_mode in the force_to_mode call.
23358
23359 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23360
23361         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23362         instead of checking each element individually.
23363         (aarch64_evpc_uzp): Likewise.
23364         (aarch64_evpc_zip): Likewise.
23365         (aarch64_evpc_ext): Likewise.
23366         (aarch64_evpc_rev): Likewise.
23367         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23368         instead of checking each element individually.  Return true without
23369         generating rtl if
23370         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23371         whether all selected elements come from the same input, instead of
23372         checking each element individually.  Remove calls to gen_rtx_REG,
23373         start_sequence and end_sequence and instead assert that no rtl is
23374         generated.
23375
23376 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23377
23378         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23379         order of HIGH and CONST checks.
23380
23381 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23382
23383         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23384         if the destination isn't an SSA_NAME.
23385
23386 2018-01-09  Richard Biener  <rguenther@suse.de>
23387
23388         PR tree-optimization/83668
23389         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23390         move prologue...
23391         (canonicalize_loop_form): ... here, renamed from ...
23392         (canonicalize_loop_closed_ssa_form): ... this and amended to
23393         swap successor edges for loop exit blocks to make us use
23394         the RPO order we need for initial schedule generation.
23395
23396 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
23397
23398         PR tree-optimization/64811
23399         * match.pd: When optimizing comparisons with Inf, avoid
23400         introducing or losing exceptions from comparisons with NaN.
23401
23402 2018-01-09  Martin Liska  <mliska@suse.cz>
23403
23404         PR sanitizer/82517
23405         * asan.c (shadow_mem_size): Add gcc_assert.
23406
23407 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
23408
23409         Don't save registers in main().
23410
23411         PR target/83738
23412         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23413         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23414         * config/avr/avr.c (avr_set_current_function): Don't error if
23415         naked, OS_task or OS_main are specified at the same time.
23416         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23417         OS_main.
23418         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23419         attribute.
23420         * common/config/avr/avr-common.c (avr_option_optimization_table):
23421         Switch on -mmain-is-OS_task for optimizing compilations.
23422
23423 2018-01-09  Richard Biener  <rguenther@suse.de>
23424
23425         PR tree-optimization/83572
23426         * graphite.c: Include cfganal.h.
23427         (graphite_transform_loops): Connect infinite loops to exit
23428         and remove fake edges at the end.
23429
23430 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23431
23432         * ipa-inline.c (edge_badness): Revert accidental checkin.
23433
23434 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23435
23436         PR ipa/80763
23437         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23438         symbols; not inline clones.
23439
23440 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
23441
23442         PR target/83507
23443         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23444         hard registers.  Formatting fixes.
23445
23446         PR preprocessor/83722
23447         * gcc.c (try_generate_repro): Pass
23448         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23449         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23450         do_report_bug.
23451
23452 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
23453             Kito Cheng  <kito.cheng@gmail.com>
23454
23455         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23456         (riscv_leaf_function_p): Delete.
23457         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23458
23459 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23460
23461         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23462         function.
23463         (do_ifelse): New function.
23464         (do_isel): New function.
23465         (do_sub3): New function.
23466         (do_add3): New function.
23467         (do_load_mask_compare): New function.
23468         (do_overlap_load_compare): New function.
23469         (expand_compare_loop): New function.
23470         (expand_block_compare): Call expand_compare_loop() when appropriate.
23471         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23472         option description.
23473         (-mblock-compare-inline-loop-limit): New option.
23474
23475 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23476
23477         PR target/83677
23478         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23479         Reverse order of second and third operands in first alternative.
23480         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23481         of first and second elements in UNSPEC_VPERMR vector.
23482         (altivec_expand_vec_perm_le): Likewise.
23483
23484 2018-01-08  Jeff Law  <law@redhat.com>
23485
23486         PR rtl-optimizatin/81308
23487         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23488         (process_switch): If group_case_labels makes a change, then set
23489         cfg_altered.
23490         (pass_convert_switch::execute): If a switch is converted, then
23491         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23492
23493         PR rtl-optimization/81308
23494         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23495         splitting insns.
23496
23497 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23498
23499         PR target/83663 - Revert r255946
23500         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23501         generation for cases where splatting a value is not useful.
23502         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23503         across a vec_duplicate and a paradoxical subreg forming a vector
23504         mode to a vec_concat.
23505
23506 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23507
23508         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23509         -march=armv8.3-a variants.
23510         * config/arm/t-multilib: Likewise.
23511         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23512
23513 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23514
23515         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23516         to generate rtl.
23517         (cceq_ior_compare_complement): Give it a name so I can use it, and
23518         change boolean_or_operator predicate to boolean_operator so it can
23519         be used to generate a crand.
23520         (eqne): New code iterator.
23521         (bd/bd_neg): New code_attrs.
23522         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23523         a single define_insn.
23524         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23525         decrement (bdnzt/bdnzf/bdzt/bdzf).
23526         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23527         with the new names of the branch decrement patterns, and added the
23528         names of the branch decrement conditional patterns.
23529
23530 2018-01-08  Richard Biener  <rguenther@suse.de>
23531
23532         PR tree-optimization/83563
23533         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23534         cache.
23535
23536 2018-01-08  Richard Biener  <rguenther@suse.de>
23537
23538         PR middle-end/83713
23539         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23540
23541 2018-01-08  Richard Biener  <rguenther@suse.de>
23542
23543         PR tree-optimization/83685
23544         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23545         references to abnormals.
23546
23547 2018-01-08  Richard Biener  <rguenther@suse.de>
23548
23549         PR lto/83719
23550         * dwarf2out.c (output_indirect_strings): Handle empty
23551         skeleton_debug_str_hash.
23552         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23553
23554 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23555
23556         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23557         (emit_store_direct): Likewise.
23558         (arc_trampoline_adjust_address): Likewise.
23559         (arc_asm_trampoline_template): New function.
23560         (arc_initialize_trampoline): Use asm_trampoline_template.
23561         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23562         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23563         * config/arc/arc.md (flush_icache): Delete pattern.
23564
23565 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23566
23567         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23568         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23569         munaligned-access.
23570
23571 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23572
23573         PR target/83681
23574         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23575         by not USED_FOR_TARGET.
23576         (make_pass_resolve_sw_modes): Likewise.
23577
23578 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23579
23580         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23581         USED_FOR_TARGET.
23582
23583 2018-01-08  Richard Biener  <rguenther@suse.de>
23584
23585         PR middle-end/83580
23586         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23587
23588 2018-01-08  Richard Biener  <rguenther@suse.de>
23589
23590         PR middle-end/83517
23591         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23592
23593 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23594
23595         PR middle-end/81897
23596         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23597         basic blocks with a small number of successors.
23598         (convert_control_dep_chain_into_preds): Improve handling of
23599         forwarder blocks.
23600         (dump_predicates): Split apart into...
23601         (dump_pred_chain): ...here...
23602         (dump_pred_info): ...and here.
23603         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23604         (can_chain_union_be_invalidated_p): Improve check for invalidation
23605         of paths.
23606         (uninit_uses_cannot_happen): Avoid unnecessary if
23607         convert_control_dep_chain_into_preds yielded nothing.
23608
23609 2018-01-06  Martin Sebor  <msebor@redhat.com>
23610
23611         PR tree-optimization/83640
23612         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23613         subtracting negative offset from size.
23614         (builtin_access::overlap): Adjust offset bounds of the access to fall
23615         within the size of the object if possible.
23616
23617 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23618
23619         PR rtl-optimization/83699
23620         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23621         extract_bit_field_as_subreg to cases in which the extracted
23622         value is also a vector.
23623
23624         * lra-constraints.c (process_alt_operands): Test for the equivalence
23625         substitutions when detecting a possible reload cycle.
23626
23627 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23628
23629         PR debug/83480
23630         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23631         by default if flag_selective_schedling{,2}.  Formatting fixes.
23632
23633         PR rtl-optimization/83682
23634         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23635         if it has non-VECTOR_MODE element mode.
23636         (vec_duplicate_p): Likewise.
23637
23638         PR middle-end/83694
23639         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23640         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23641
23642 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23643
23644         PR target/83604
23645         * config/i386/i386-builtin.def
23646         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23647         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23648         Require also OPTION_MASK_ISA_AVX512F in addition to
23649         OPTION_MASK_ISA_GFNI.
23650         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23651         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23652         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23653         to OPTION_MASK_ISA_GFNI.
23654         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23655         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23656         OPTION_MASK_ISA_AVX512BW.
23657         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23658         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23659         addition to OPTION_MASK_ISA_GFNI.
23660         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23661         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23662         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23663         to OPTION_MASK_ISA_GFNI.
23664         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23665         a requirement for all ISAs rather than any of them with a few
23666         exceptions.
23667         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23668         processing.
23669         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23670         bitmasks to be enabled with 3 exceptions, instead of requiring any
23671         enabled ISA with lots of exceptions.
23672         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23673         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23674         Change avx512bw in isa attribute to avx512f.
23675         * config/i386/sgxintrin.h: Add license boilerplate.
23676         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23677         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23678         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23679         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23680         defined.
23681         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23682         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23683         temporarily sse2 rather than sse if not enabled already.
23684
23685         PR target/83604
23686         * config/i386/sse.md (VI248_VLBW): Rename to ...
23687         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23688         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23689         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23690         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23691         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23692         mode iterator instead of VI248_VLBW.
23693
23694 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23695
23696         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23697         (record_modified): Skip clobbers; add debug output.
23698         (param_change_prob): Use sreal frequencies.
23699
23700 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23701
23702         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23703         punt for user-aligned variables.
23704
23705 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23706
23707         * tree-chrec.c (chrec_contains_symbols): Return true for
23708         POLY_INT_CST.
23709
23710 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23711
23712         PR target/82439
23713         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23714         of (x|y) == x for BICS pattern.
23715
23716 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23717
23718         PR tree-optimization/83605
23719         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23720         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23721         can throw.
23722
23723 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23724
23725         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23726         * config/epiphany/rtems.h: New file.
23727
23728 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23729             Uros Bizjak  <ubizjak@gmail.com>
23730
23731         PR target/83554
23732         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23733         QIreg_operand instead of register_operand predicate.
23734         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23735         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23736         comments instead of -fmitigate[-_]rop.
23737
23738 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23739
23740         PR bootstrap/81926
23741         * cgraphunit.c (symbol_table::compile): Switch to text_section
23742         before calling assembly_start debug hook.
23743         * run-rtl-passes.c (run_rtl_passes): Likewise.
23744         Include output.h.
23745
23746 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23747
23748         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23749         range_int_cst_p rather than !symbolic_range_p before calling
23750         extract_range_from_multiplicative_op_1.
23751
23752 2018-01-04  Jeff Law  <law@redhat.com>
23753
23754         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23755         redundant test in assertion.
23756
23757 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23758
23759         * doc/rtl.texi: Document machine_mode wrapper classes.
23760
23761 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23762
23763         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23764         using tree_to_uhwi.
23765
23766 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23767
23768         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23769         the VEC_PERM_EXPR fold to fail.
23770
23771 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23772
23773         PR debug/83585
23774         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23775         to switched_sections.
23776
23777 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23778
23779         PR target/83680
23780         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23781         test for d.testing.
23782
23783 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23784
23785         PR target/83387
23786         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23787         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23788
23789 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23790
23791         PR debug/83666
23792         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23793         is BLKmode and bitpos not zero or mode change is needed.
23794
23795 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23796
23797         PR target/83675
23798         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23799         TARGET_VIS2.
23800
23801 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23802
23803         PR target/83628
23804         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23805         instead of MULT rtx.  Update all corresponding splitters.
23806         (*saddl_se): Ditto.
23807         (*ssub<modesuffix>): Ditto.
23808         (*ssubl_se): Ditto.
23809         (*cmp_sadd_di): Update split patterns.
23810         (*cmp_sadd_si): Ditto.
23811         (*cmp_sadd_sidi): Ditto.
23812         (*cmp_ssub_di): Ditto.
23813         (*cmp_ssub_si): Ditto.
23814         (*cmp_ssub_sidi): Ditto.
23815         * config/alpha/predicates.md (const23_operand): New predicate.
23816         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23817         Look for ASHIFT, not MULT inner operand.
23818         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23819
23820 2018-01-04  Martin Liska  <mliska@suse.cz>
23821
23822         PR gcov-profile/83669
23823         * gcov.c (output_intermediate_file): Add version to intermediate
23824         gcov file.
23825         * doc/gcov.texi: Document new field 'version' in intermediate
23826         file format. Fix location of '-k' option of gcov command.
23827
23828 2018-01-04  Martin Liska  <mliska@suse.cz>
23829
23830         PR ipa/82352
23831         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23832
23833 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23834
23835         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23836
23837 2018-01-03  Martin Sebor  <msebor@redhat.com>
23838
23839         PR tree-optimization/83655
23840         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23841         checking calls with invalid arguments.
23842
23843 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23844
23845         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23846         (vectorizable_mask_load_store): Delete.
23847         (vectorizable_call): Return false for masked loads and stores.
23848         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23849         instead of gimple_assign_rhs1.
23850         (vectorizable_load): Handle IFN_MASK_LOAD.
23851         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23852
23853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23854
23855         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23856         split out from..,
23857         (vectorizable_mask_load_store): ...here.
23858         (vectorizable_load): ...and here.
23859
23860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23861
23862         * tree-vect-stmts.c (vect_build_all_ones_mask)
23863         (vect_build_zero_merge_argument): New functions, split out from...
23864         (vectorizable_load): ...here.
23865
23866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23867
23868         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23869         split out from...
23870         (vectorizable_mask_load_store): ...here.
23871         (vectorizable_store): ...and here.
23872
23873 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23874
23875         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23876         split out from...
23877         (vectorizable_mask_load_store): ...here.
23878
23879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23880
23881         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23882         (vect_model_store_cost): Take a vec_load_store_type instead of a
23883         vect_def_type.
23884         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23885         (vect_model_store_cost): Take a vec_load_store_type instead of a
23886         vect_def_type.
23887         (vectorizable_mask_load_store): Update accordingly.
23888         (vectorizable_store): Likewise.
23889         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23890
23891 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23892
23893         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23894         IFN_MASK_LOAD calls here rather than...
23895         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23896
23897 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23898             Alan Hayward  <alan.hayward@arm.com>
23899             David Sherwood  <david.sherwood@arm.com>
23900
23901         * expmed.c (extract_bit_field_1): For vector extracts,
23902         fall back to extract_bit_field_as_subreg if vec_extract
23903         isn't available.
23904
23905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23906             Alan Hayward  <alan.hayward@arm.com>
23907             David Sherwood  <david.sherwood@arm.com>
23908
23909         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23910         they are variable or constant sized.
23911         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23912         slots for constant-sized data.
23913
23914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23915             Alan Hayward  <alan.hayward@arm.com>
23916             David Sherwood  <david.sherwood@arm.com>
23917
23918         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23919         handling COND_EXPRs with boolean comparisons, try to find a better
23920         basis for the mask type than the boolean itself.
23921
23922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23923
23924         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23925         is calculated and how it can be overridden.
23926         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23927         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23928         if defined.
23929         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23930         if nonzero.
23931
23932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23933             Alan Hayward  <alan.hayward@arm.com>
23934             David Sherwood  <david.sherwood@arm.com>
23935
23936         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23937         Remove the mode argument.
23938         (aarch64_simd_valid_immediate): Remove the mode and inverse
23939         arguments.
23940         * config/aarch64/iterators.md (bitsize): New iterator.
23941         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23942         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23943         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23944         aarch64_simd_valid_immediate.
23945         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23946         (aarch64_reg_or_bic_imm): Likewise.
23947         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23948         with an insn_type enum and msl with a modifier_type enum.
23949         Replace element_width with a scalar_mode.  Change the shift
23950         to unsigned int.  Add constructors for scalar_float_mode and
23951         scalar_int_mode elements.
23952         (aarch64_vect_float_const_representable_p): Delete.
23953         (aarch64_can_const_movi_rtx_p)
23954         (aarch64_simd_scalar_immediate_valid_for_move)
23955         (aarch64_simd_make_constant): Update call to
23956         aarch64_simd_valid_immediate.
23957         (aarch64_advsimd_valid_immediate_hs): New function.
23958         (aarch64_advsimd_valid_immediate): Likewise.
23959         (aarch64_simd_valid_immediate): Remove mode and inverse
23960         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
23961         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23962         and aarch64_float_const_representable_p on the result.
23963         (aarch64_output_simd_mov_immediate): Remove mode argument.
23964         Update call to aarch64_simd_valid_immediate and use of
23965         simd_immediate_info.
23966         (aarch64_output_scalar_simd_mov_immediate): Update call
23967         accordingly.
23968
23969 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23970             Alan Hayward  <alan.hayward@arm.com>
23971             David Sherwood  <david.sherwood@arm.com>
23972
23973         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23974         (mode_nunits): Likewise CONST_MODE_NUNITS.
23975         * machmode.def (ADJUST_NUNITS): Document.
23976         * genmodes.c (mode_data::need_nunits_adj): New field.
23977         (blank_mode): Update accordingly.
23978         (adj_nunits): New variable.
23979         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23980         parameter.
23981         (emit_mode_size_inline): Set need_bytesize_adj for all modes
23982         listed in adj_nunits.
23983         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23984         listed in adj_nunits.  Don't emit case statements for such modes.
23985         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23986         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
23987         nothing if adj_nunits is nonnull.
23988         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23989         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23990         (emit_mode_fbit): Update use of print_maybe_const_decl.
23991         (emit_move_size): Likewise.  Treat the array as non-const
23992         if adj_nunits.
23993         (emit_mode_adjustments): Handle adj_nunits.
23994
23995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23996
23997         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23998         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23999         (VECTOR_MODES): Use it.
24000         (make_vector_modes): Take the prefix as an argument.
24001
24002 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24003             Alan Hayward  <alan.hayward@arm.com>
24004             David Sherwood  <david.sherwood@arm.com>
24005
24006         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24007         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24008         for MODE_VECTOR_BOOL.
24009         * machmode.def (VECTOR_BOOL_MODE): Document.
24010         * genmodes.c (VECTOR_BOOL_MODE): New macro.
24011         (make_vector_bool_mode): New function.
24012         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24013         MODE_VECTOR_BOOL.
24014         * lto-streamer-in.c (lto_input_mode_table): Likewise.
24015         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24016         Likewise.
24017         * stor-layout.c (int_mode_for_mode): Likewise.
24018         * tree.c (build_vector_type_for_mode): Likewise.
24019         * varasm.c (output_constant_pool_2): Likewise.
24020         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24021         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
24022         for MODE_VECTOR_BOOL.
24023         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24024         of mode class checks.
24025         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24026         instead of a list of mode class checks.
24027         (expand_vector_scalar_condition): Likewise.
24028         (type_for_widest_vector_mode): Handle BImode as an inner mode.
24029
24030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24031             Alan Hayward  <alan.hayward@arm.com>
24032             David Sherwood  <david.sherwood@arm.com>
24033
24034         * machmode.h (mode_size): Change from unsigned short to
24035         poly_uint16_pod.
24036         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24037         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24038         or if measurement_type is not polynomial.
24039         (fixed_size_mode::includes_p): Check for constant-sized modes.
24040         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24041         return a poly_uint16 rather than an unsigned short.
24042         (emit_mode_size): Change the type of mode_size from unsigned short
24043         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
24044         (emit_mode_adjustments): Cope with polynomial vector sizes.
24045         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24046         for GET_MODE_SIZE.
24047         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24048         for GET_MODE_SIZE.
24049         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24050         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24051         * caller-save.c (setup_save_areas): Likewise.
24052         (replace_reg_with_saved_mem): Likewise.
24053         * calls.c (emit_library_call_value_1): Likewise.
24054         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24055         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24056         (gen_lowpart_for_combine): Likewise.
24057         * convert.c (convert_to_integer_1): Likewise.
24058         * cse.c (equiv_constant, cse_insn): Likewise.
24059         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24060         (cselib_subst_to_values): Likewise.
24061         * dce.c (word_dce_process_block): Likewise.
24062         * df-problems.c (df_word_lr_mark_ref): Likewise.
24063         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24064         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24065         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24066         (rtl_for_decl_location): Likewise.
24067         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24068         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24069         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24070         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24071         (expand_expr_real_1): Likewise.
24072         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24073         (pad_below): Likewise.
24074         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24075         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24076         * ira.c (get_subreg_tracking_sizes): Likewise.
24077         * ira-build.c (ira_create_allocno_objects): Likewise.
24078         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24079         (ira_sort_regnos_for_alter_reg): Likewise.
24080         * ira-costs.c (record_operand_costs): Likewise.
24081         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24082         (resolve_simple_move): Likewise.
24083         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24084         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24085         (lra_constraints): Likewise.
24086         (CONST_POOL_OK_P): Reject variable-sized modes.
24087         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24088         (add_pseudo_to_slot, lra_spill): Likewise.
24089         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24090         * optabs-query.c (get_best_extraction_insn): Likewise.
24091         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24092         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24093         (expand_mult_highpart, valid_multiword_target_p): Likewise.
24094         * recog.c (offsettable_address_addr_space_p): Likewise.
24095         * regcprop.c (maybe_mode_change): Likewise.
24096         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24097         * regrename.c (build_def_use): Likewise.
24098         * regstat.c (dump_reg_info): Likewise.
24099         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24100         (find_reloads, find_reloads_subreg_address): Likewise.
24101         * reload1.c (eliminate_regs_1): Likewise.
24102         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24103         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24104         (simplify_binary_operation_1, simplify_subreg): Likewise.
24105         * targhooks.c (default_function_arg_padding): Likewise.
24106         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24107         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24108         (verify_gimple_assign_ternary): Likewise.
24109         * tree-inline.c (estimate_move_cost): Likewise.
24110         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24111         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24112         (get_address_cost_ainc): Likewise.
24113         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24114         (vect_supportable_dr_alignment): Likewise.
24115         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24116         (vectorizable_reduction): Likewise.
24117         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24118         (vectorizable_operation, vectorizable_load): Likewise.
24119         * tree.c (build_same_sized_truth_vector_type): Likewise.
24120         * valtrack.c (cleanup_auto_inc_dec): Likewise.
24121         * var-tracking.c (emit_note_insn_var_location): Likewise.
24122         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24123         (ADDR_VEC_ALIGN): Likewise.
24124
24125 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24126             Alan Hayward  <alan.hayward@arm.com>
24127             David Sherwood  <david.sherwood@arm.com>
24128
24129         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24130         unsigned short.
24131         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24132         or if measurement_type is polynomial.
24133         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24134         * combine.c (make_extraction): Likewise.
24135         * dse.c (find_shift_sequence): Likewise.
24136         * dwarf2out.c (mem_loc_descriptor): Likewise.
24137         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24138         (extract_bit_field, extract_low_bits): Likewise.
24139         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24140         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24141         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24142         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24143         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24144         * reload.c (find_reloads): Likewise.
24145         * reload1.c (alter_reg): Likewise.
24146         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24147         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24148         * tree-if-conv.c (predicate_mem_writes): Likewise.
24149         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24150         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24151         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24152         * valtrack.c (dead_debug_insert_temp): Likewise.
24153         * varasm.c (mergeable_constant_section): Likewise.
24154         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24155
24156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24157             Alan Hayward  <alan.hayward@arm.com>
24158             David Sherwood  <david.sherwood@arm.com>
24159
24160         * expr.c (expand_assignment): Cope with polynomial mode sizes
24161         when assigning to a CONCAT.
24162
24163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24164             Alan Hayward  <alan.hayward@arm.com>
24165             David Sherwood  <david.sherwood@arm.com>
24166
24167         * machmode.h (mode_precision): Change from unsigned short to
24168         poly_uint16_pod.
24169         (mode_to_precision): Return a poly_uint16 rather than an unsigned
24170         short.
24171         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24172         or if measurement_type is not polynomial.
24173         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
24174         in which the mode is already known to be a scalar_int_mode.
24175         * genmodes.c (emit_mode_precision): Change the type of mode_precision
24176         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
24177         initializer.
24178         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24179         for GET_MODE_PRECISION.
24180         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24181         for GET_MODE_PRECISION.
24182         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24183         as polynomial.
24184         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24185         (expand_field_assignment, make_extraction): Likewise.
24186         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24187         (get_last_value): Likewise.
24188         * convert.c (convert_to_integer_1): Likewise.
24189         * cse.c (cse_insn): Likewise.
24190         * expr.c (expand_expr_real_1): Likewise.
24191         * lra-constraints.c (simplify_operand_subreg): Likewise.
24192         * optabs-query.c (can_atomic_load_p): Likewise.
24193         * optabs.c (expand_atomic_load): Likewise.
24194         (expand_atomic_store): Likewise.
24195         * ree.c (combine_reaching_defs): Likewise.
24196         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24197         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24198         * tree.h (type_has_mode_precision_p): Likewise.
24199         * ubsan.c (instrument_si_overflow): Likewise.
24200
24201 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24202             Alan Hayward  <alan.hayward@arm.com>
24203             David Sherwood  <david.sherwood@arm.com>
24204
24205         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24206         polynomial numbers of units.
24207         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24208         (valid_vector_subparts_p): New function.
24209         (build_vector_type): Remove temporary shim and take the number
24210         of units as a poly_uint64 rather than an int.
24211         (build_opaque_vector_type): Take the number of units as a
24212         poly_uint64 rather than an int.
24213         * tree.c (build_vector_from_ctor): Handle polynomial
24214         TYPE_VECTOR_SUBPARTS.
24215         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24216         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24217         (build_vector_from_val): If the number of units is variable,
24218         use build_vec_duplicate_cst for constant operands and
24219         VEC_DUPLICATE_EXPR otherwise.
24220         (make_vector_type): Remove temporary is_constant ().
24221         (build_vector_type, build_opaque_vector_type): Take the number of
24222         units as a poly_uint64 rather than an int.
24223         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24224         VECTOR_CST_NELTS.
24225         * cfgexpand.c (expand_debug_expr): Likewise.
24226         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24227         (store_constructor, expand_expr_real_1): Likewise.
24228         (const_scalar_mask_from_tree): Likewise.
24229         * fold-const-call.c (fold_const_reduction): Likewise.
24230         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24231         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24232         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24233         (fold_relational_const): Likewise.
24234         (native_interpret_vector): Likewise.  Change the size from an
24235         int to an unsigned int.
24236         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24237         TYPE_VECTOR_SUBPARTS.
24238         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24239         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24240         duplicating a non-constant operand into a variable-length vector.
24241         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24242         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24243         * ipa-icf.c (sem_variable::equals): Likewise.
24244         * match.pd: Likewise.
24245         * omp-simd-clone.c (simd_clone_subparts): Likewise.
24246         * print-tree.c (print_node): Likewise.
24247         * stor-layout.c (layout_type): Likewise.
24248         * targhooks.c (default_builtin_vectorization_cost): Likewise.
24249         * tree-cfg.c (verify_gimple_comparison): Likewise.
24250         (verify_gimple_assign_binary): Likewise.
24251         (verify_gimple_assign_ternary): Likewise.
24252         (verify_gimple_assign_single): Likewise.
24253         * tree-pretty-print.c (dump_generic_node): Likewise.
24254         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24255         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24256         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24257         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24258         (vect_shift_permute_load_chain): Likewise.
24259         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24260         (expand_vector_condition, optimize_vector_constructor): Likewise.
24261         (lower_vec_perm, get_compute_type): Likewise.
24262         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24263         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24264         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24265         (vect_recog_mask_conversion_pattern): Likewise.
24266         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24267         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24268         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24269         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24270         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24271         (vectorizable_shift, vectorizable_operation, vectorizable_store)
24272         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24273         (supportable_widening_operation): Likewise.
24274         (supportable_narrowing_operation): Likewise.
24275         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24276         Likewise.
24277         * varasm.c (output_constant): Likewise.
24278
24279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24280             Alan Hayward  <alan.hayward@arm.com>
24281             David Sherwood  <david.sherwood@arm.com>
24282
24283         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24284         so that both the length == 3 and length != 3 cases set up their
24285         own permute vectors.  Add comments explaining why we know the
24286         number of elements is constant.
24287         (vect_permute_load_chain): Likewise.
24288
24289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24290             Alan Hayward  <alan.hayward@arm.com>
24291             David Sherwood  <david.sherwood@arm.com>
24292
24293         * machmode.h (mode_nunits): Change from unsigned char to
24294         poly_uint16_pod.
24295         (ONLY_FIXED_SIZE_MODES): New macro.
24296         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24297         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24298         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24299         New typedefs.
24300         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24301         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24302         or if measurement_type is not polynomial.
24303         * genmodes.c (ZERO_COEFFS): New macro.
24304         (emit_mode_nunits_inline): Make mode_nunits_inline return a
24305         poly_uint16.
24306         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24307         Use ZERO_COEFFS when emitting initializers.
24308         * data-streamer.h (bp_pack_poly_value): New function.
24309         (bp_unpack_poly_value): Likewise.
24310         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24311         for GET_MODE_NUNITS.
24312         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24313         for GET_MODE_NUNITS.
24314         * tree.c (make_vector_type): Remove temporary shim and make
24315         the real function take the number of units as a poly_uint64
24316         rather than an int.
24317         (build_vector_type_for_mode): Handle polynomial nunits.
24318         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24319         * emit-rtl.c (const_vec_series_p_1): Likewise.
24320         (gen_rtx_CONST_VECTOR): Likewise.
24321         * fold-const.c (test_vec_duplicate_folding): Likewise.
24322         * genrecog.c (validate_pattern): Likewise.
24323         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24324         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24325         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24326         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24327         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24328         * rtlanal.c (subreg_get_info): Likewise.
24329         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24330         (vect_grouped_load_supported): Likewise.
24331         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24332         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24333         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24334         (simplify_const_unary_operation, simplify_binary_operation_1)
24335         (simplify_const_binary_operation, simplify_ternary_operation)
24336         (test_vector_ops_duplicate, test_vector_ops): Likewise.
24337         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24338         instead of CONST_VECTOR_NUNITS.
24339         * varasm.c (output_constant_pool_2): Likewise.
24340         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24341         explicit-encoded elements in the XVEC for variable-length vectors.
24342
24343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24344
24345         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24346
24347 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24348             Alan Hayward  <alan.hayward@arm.com>
24349             David Sherwood  <david.sherwood@arm.com>
24350
24351         * coretypes.h (fixed_size_mode): Declare.
24352         (fixed_size_mode_pod): New typedef.
24353         * builtins.h (target_builtins::x_apply_args_mode)
24354         (target_builtins::x_apply_result_mode): Change type to
24355         fixed_size_mode_pod.
24356         * builtins.c (apply_args_size, apply_result_size, result_vector)
24357         (expand_builtin_apply_args_1, expand_builtin_apply)
24358         (expand_builtin_return): Update accordingly.
24359
24360 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24361
24362         * cse.c (hash_rtx_cb): Hash only the encoded elements.
24363         * cselib.c (cselib_hash_rtx): Likewise.
24364         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24365         CONST_VECTOR encoding.
24366
24367 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24368             Jeff Law  <law@redhat.com>
24369
24370         PR target/83641
24371         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24372         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24373         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24374         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24375
24376         PR target/83641
24377         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24378         explicitly probe *sp in a noreturn function if there were any callee
24379         register saves or frame pointer is needed.
24380
24381 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24382
24383         PR debug/83621
24384         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24385         BLKmode for ternary, binary or unary expressions.
24386
24387         PR debug/83645
24388         * var-tracking.c (delete_vta_debug_insn): New inline function.
24389         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24390         insns from get_insns () to NULL instead of each bb separately.
24391         Use delete_vta_debug_insn.  No longer static.
24392         (vt_debug_insns_local, variable_tracking_main_1): Adjust
24393         delete_vta_debug_insns callers.
24394         * rtl.h (delete_vta_debug_insns): Declare.
24395         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24396         instead of variable_tracking_main.
24397
24398 2018-01-03  Martin Sebor  <msebor@redhat.com>
24399
24400         PR tree-optimization/83603
24401         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24402         arguments past the endof the argument list in functions declared
24403         without a prototype.
24404         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24405         Avoid checking when arguments are null.
24406
24407 2018-01-03  Martin Sebor  <msebor@redhat.com>
24408
24409         PR c/83559
24410         * doc/extend.texi (attribute const): Fix a typo.
24411         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24412         issuing -Wsuggest-attribute for void functions.
24413
24414 2018-01-03  Martin Sebor  <msebor@redhat.com>
24415
24416         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24417         offset_int::from instead of wide_int::to_shwi.
24418         (maybe_diag_overlap): Remove assertion.
24419         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24420         * gimple-ssa-sprintf.c (format_directive): Same.
24421         (parse_directive): Same.
24422         (sprintf_dom_walker::compute_format_length): Same.
24423         (try_substitute_return_value): Same.
24424
24425 2018-01-03  Jeff Law  <law@redhat.com>
24426
24427         PR middle-end/83654
24428         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24429         non-constant residual for zero at runtime and avoid probing in
24430         that case.  Reorganize code for trailing problem to mirror handling
24431         of the residual.
24432
24433 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24434
24435         PR tree-optimization/83501
24436         * tree-ssa-strlen.c (get_string_cst): New.
24437         (handle_char_store): Call get_string_cst.
24438
24439 2018-01-03  Martin Liska  <mliska@suse.cz>
24440
24441         PR tree-optimization/83593
24442         * tree-ssa-strlen.c: Include tree-cfg.h.
24443         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24444         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24445         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24446         to false.
24447         (strlen_dom_walker::before_dom_children): Call
24448         gimple_purge_dead_eh_edges. Dump tranformation with details
24449         dump flags.
24450         (strlen_dom_walker::before_dom_children): Update call by adding
24451         new argument cleanup_eh.
24452         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24453
24454 2018-01-03  Martin Liska  <mliska@suse.cz>
24455
24456         PR ipa/83549
24457         * cif-code.def (VARIADIC_THUNK): New enum value.
24458         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24459         thunks.
24460
24461 2018-01-03  Jan Beulich  <jbeulich@suse.com>
24462
24463         * sse.md (mov<mode>_internal): Tighten condition for when to use
24464         vmovdqu<ssescalarsize> for TI and OI modes.
24465
24466 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24467
24468         Update copyright years.
24469
24470 2018-01-03  Martin Liska  <mliska@suse.cz>
24471
24472         PR ipa/83594
24473         * ipa-visibility.c (function_and_variable_visibility): Skip
24474         functions with noipa attribure.
24475
24476 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24477
24478         * gcc.c (process_command): Update copyright notice dates.
24479         * gcov-dump.c (print_version): Ditto.
24480         * gcov.c (print_version): Ditto.
24481         * gcov-tool.c (print_version): Ditto.
24482         * gengtype.c (create_file): Ditto.
24483         * doc/cpp.texi: Bump @copying's copyright year.
24484         * doc/cppinternals.texi: Ditto.
24485         * doc/gcc.texi: Ditto.
24486         * doc/gccint.texi: Ditto.
24487         * doc/gcov.texi: Ditto.
24488         * doc/install.texi: Ditto.
24489         * doc/invoke.texi: Ditto.
24490
24491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24492
24493         * vector-builder.h (vector_builder::m_full_nelts): Change from
24494         unsigned int to poly_uint64.
24495         (vector_builder::full_nelts): Update prototype accordingly.
24496         (vector_builder::new_vector): Likewise.
24497         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24498         (vector_builder::operator ==): Likewise.
24499         (vector_builder::finalize): Likewise.
24500         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24501         Take the number of elements as a poly_uint64 rather than an
24502         unsigned int.
24503         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24504         from unsigned int to poly_uint64.
24505         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24506         (vec_perm_indices::new_vector): Likewise.
24507         (vec_perm_indices::length): Likewise.
24508         (vec_perm_indices::nelts_per_input): Likewise.
24509         (vec_perm_indices::input_nelts): Likewise.
24510         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24511         number of elements per input as a poly_uint64 rather than an
24512         unsigned int.  Use the original encoding for variable-length
24513         vectors, rather than clamping each individual element.
24514         For the second and subsequent elements in each pattern,
24515         clamp the step and base before clamping their sum.
24516         (vec_perm_indices::series_p): Handle polynomial element counts.
24517         (vec_perm_indices::all_in_range_p): Likewise.
24518         (vec_perm_indices_to_tree): Likewise.
24519         (vec_perm_indices_to_rtx): Likewise.
24520         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24521         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24522         (tree_vector_builder::new_binary_operation): Handle polynomial
24523         element counts.  Return false if we need to know the number
24524         of elements at compile time.
24525         * fold-const.c (fold_vec_perm): Punt if the number of elements
24526         isn't known at compile time.
24527
24528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24529
24530         * vec-perm-indices.h (vec_perm_builder): Change element type
24531         from HOST_WIDE_INT to poly_int64.
24532         (vec_perm_indices::element_type): Update accordingly.
24533         (vec_perm_indices::clamp): Handle polynomial element_types.
24534         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24535         (vec_perm_indices::all_in_range_p): Likewise.
24536         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24537         than shwi trees.
24538         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24539         polynomial vec_perm_indices element types.
24540         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24541         * fold-const.c (fold_vec_perm): Likewise.
24542         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24543         * tree-vect-generic.c (lower_vec_perm): Likewise.
24544         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24545         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24546         element type to HOST_WIDE_INT.
24547
24548 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24549             Alan Hayward  <alan.hayward@arm.com>
24550             David Sherwood  <david.sherwood@arm.com>
24551
24552         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24553         rather than an int.  Use plus_constant.
24554         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24555         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24556
24557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24558             Alan Hayward  <alan.hayward@arm.com>
24559             David Sherwood  <david.sherwood@arm.com>
24560
24561         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24562         a HOST_WIDE_INT to a poly_int64.
24563
24564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24565             Alan Hayward  <alan.hayward@arm.com>
24566             David Sherwood  <david.sherwood@arm.com>
24567
24568         * calls.c (load_register_parameters): Cope with polynomial
24569         mode sizes.  Require a constant size for BLKmode parameters
24570         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24571         forces a parameter to be padded at the lsb end in order to
24572         fill a complete number of words, require the parameter size
24573         to be ordered wrt UNITS_PER_WORD.
24574
24575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24576             Alan Hayward  <alan.hayward@arm.com>
24577             David Sherwood  <david.sherwood@arm.com>
24578
24579         * reload1.c (spill_stack_slot_width): Change element type
24580         from unsigned int to poly_uint64_pod.
24581         (alter_reg): Treat mode sizes as polynomial.
24582
24583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24584             Alan Hayward  <alan.hayward@arm.com>
24585             David Sherwood  <david.sherwood@arm.com>
24586
24587         * reload.c (complex_word_subreg_p): New function.
24588         (reload_inner_reg_of_subreg, push_reload): Use it.
24589
24590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24591             Alan Hayward  <alan.hayward@arm.com>
24592             David Sherwood  <david.sherwood@arm.com>
24593
24594         * lra-constraints.c (process_alt_operands): Reject matched
24595         operands whose sizes aren't ordered.
24596         (match_reload): Refer to this check here.
24597
24598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24599             Alan Hayward  <alan.hayward@arm.com>
24600             David Sherwood  <david.sherwood@arm.com>
24601
24602         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24603         that the mode size is in the set {1, 2, 4, 8, 16}.
24604
24605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24606             Alan Hayward  <alan.hayward@arm.com>
24607             David Sherwood  <david.sherwood@arm.com>
24608
24609         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24610         Use plus_constant instead of gen_rtx_PLUS.
24611
24612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24613             Alan Hayward  <alan.hayward@arm.com>
24614             David Sherwood  <david.sherwood@arm.com>
24615
24616         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24617         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24618         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24619         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24620         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24621         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24622         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24623         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24624         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24625         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24626         a poly_int64.
24627         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24628         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24629         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24630         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24631         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24632         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24633         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24634         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24635         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24636         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24637         function.
24638         * expr.c (emit_move_resolve_push): Treat the input and result
24639         of PUSH_ROUNDING as a poly_int64.
24640         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24641         (emit_push_insn): Likewise.
24642         * lra-eliminations.c (mark_not_eliminable): Likewise.
24643         * recog.c (push_operand): Likewise.
24644         * reload1.c (elimination_effects): Likewise.
24645         * rtlanal.c (nonzero_bits1): Likewise.
24646         * calls.c (store_one_arg): Likewise.  Require the padding to be
24647         known at compile time.
24648
24649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24650             Alan Hayward  <alan.hayward@arm.com>
24651             David Sherwood  <david.sherwood@arm.com>
24652
24653         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24654         Use plus_constant instead of gen_rtx_PLUS.
24655
24656 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24657             Alan Hayward  <alan.hayward@arm.com>
24658             David Sherwood  <david.sherwood@arm.com>
24659
24660         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24661         rather than an int.
24662
24663 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24664             Alan Hayward  <alan.hayward@arm.com>
24665             David Sherwood  <david.sherwood@arm.com>
24666
24667         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24668         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24669         via stack temporaries.  Treat the mode size as polynomial too.
24670
24671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24672             Alan Hayward  <alan.hayward@arm.com>
24673             David Sherwood  <david.sherwood@arm.com>
24674
24675         * expr.c (expand_expr_real_2): When handling conversions involving
24676         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24677         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24678         as a poly_uint64 too.
24679
24680 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24681             Alan Hayward  <alan.hayward@arm.com>
24682             David Sherwood  <david.sherwood@arm.com>
24683
24684         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24685
24686 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24687             Alan Hayward  <alan.hayward@arm.com>
24688             David Sherwood  <david.sherwood@arm.com>
24689
24690         * combine.c (can_change_dest_mode): Handle polynomial
24691         REGMODE_NATURAL_SIZE.
24692         * expmed.c (store_bit_field_1): Likewise.
24693         * expr.c (store_constructor): Likewise.
24694         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24695         and polynomial REGMODE_NATURAL_SIZE.
24696         (gen_lowpart_common): Likewise.
24697         * reginfo.c (record_subregs_of_mode): Likewise.
24698         * rtlanal.c (read_modify_subreg_p): Likewise.
24699
24700 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24701             Alan Hayward  <alan.hayward@arm.com>
24702             David Sherwood  <david.sherwood@arm.com>
24703
24704         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24705         numbers of elements.
24706
24707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24708             Alan Hayward  <alan.hayward@arm.com>
24709             David Sherwood  <david.sherwood@arm.com>
24710
24711         * match.pd: Cope with polynomial numbers of vector elements.
24712
24713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24714             Alan Hayward  <alan.hayward@arm.com>
24715             David Sherwood  <david.sherwood@arm.com>
24716
24717         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24718         in a POINTER_PLUS_EXPR.
24719
24720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24721             Alan Hayward  <alan.hayward@arm.com>
24722             David Sherwood  <david.sherwood@arm.com>
24723
24724         * omp-simd-clone.c (simd_clone_subparts): New function.
24725         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24726         (ipa_simd_modify_function_body): Likewise.
24727
24728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24729             Alan Hayward  <alan.hayward@arm.com>
24730             David Sherwood  <david.sherwood@arm.com>
24731
24732         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24733         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24734         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24735         (expand_vector_condition, vector_element): Likewise.
24736         (subparts_gt): New function.
24737         (get_compute_type): Use subparts_gt.
24738         (count_type_subparts): Delete.
24739         (expand_vector_operations_1): Use subparts_gt instead of
24740         count_type_subparts.
24741
24742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24743             Alan Hayward  <alan.hayward@arm.com>
24744             David Sherwood  <david.sherwood@arm.com>
24745
24746         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24747         (vect_compile_time_alias): ...this new function.  Do the calculation
24748         on poly_ints rather than trees.
24749         (vect_prune_runtime_alias_test_list): Update call accordingly.
24750
24751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24752             Alan Hayward  <alan.hayward@arm.com>
24753             David Sherwood  <david.sherwood@arm.com>
24754
24755         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24756         numbers of units.
24757         (vect_schedule_slp_instance): Likewise.
24758
24759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24760             Alan Hayward  <alan.hayward@arm.com>
24761             David Sherwood  <david.sherwood@arm.com>
24762
24763         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24764         constant and extern definitions for variable-length vectors.
24765         (vect_get_constant_vectors): Note that the number of units
24766         is known to be constant.
24767
24768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24769             Alan Hayward  <alan.hayward@arm.com>
24770             David Sherwood  <david.sherwood@arm.com>
24771
24772         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24773         of units as polynomial.  Choose between WIDE and NARROW based
24774         on multiple_p.
24775
24776 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24777             Alan Hayward  <alan.hayward@arm.com>
24778             David Sherwood  <david.sherwood@arm.com>
24779
24780         * tree-vect-stmts.c (simd_clone_subparts): New function.
24781         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24782
24783 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24784             Alan Hayward  <alan.hayward@arm.com>
24785             David Sherwood  <david.sherwood@arm.com>
24786
24787         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24788         vectors as polynomial.  Use build_index_vector for
24789         IFN_GOMP_SIMD_LANE.
24790
24791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24792             Alan Hayward  <alan.hayward@arm.com>
24793             David Sherwood  <david.sherwood@arm.com>
24794
24795         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24796         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24797         for variable-length vectors.
24798         (vectorizable_mask_load_store): Treat the number of units as
24799         polynomial, asserting that it is constant if the condition has
24800         already been enforced.
24801         (vectorizable_store, vectorizable_load): Likewise.
24802
24803 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24804             Alan Hayward  <alan.hayward@arm.com>
24805             David Sherwood  <david.sherwood@arm.com>
24806
24807         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24808         of units as polynomial.  Punt if we can't tell at compile time
24809         which vector contains the final result.
24810
24811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24812             Alan Hayward  <alan.hayward@arm.com>
24813             David Sherwood  <david.sherwood@arm.com>
24814
24815         * tree-vect-loop.c (vectorizable_induction): Treat the number
24816         of units as polynomial.  Punt on SLP inductions.  Use an integer
24817         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24818         cast of such a series for variable-length floating-point
24819         reductions.
24820
24821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24822             Alan Hayward  <alan.hayward@arm.com>
24823             David Sherwood  <david.sherwood@arm.com>
24824
24825         * tree.h (build_index_vector): Declare.
24826         * tree.c (build_index_vector): New function.
24827         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24828         of units as polynomial, forcibly converting it to a constant if
24829         vectorizable_reduction has already enforced the condition.
24830         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24831         to create a {1,2,3,...} vector.
24832         (vectorizable_reduction): Treat the number of units as polynomial.
24833         Choose vectype_in based on the largest scalar element size rather
24834         than the smallest number of units.  Enforce the restrictions
24835         relied on above.
24836
24837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24838             Alan Hayward  <alan.hayward@arm.com>
24839             David Sherwood  <david.sherwood@arm.com>
24840
24841         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24842         number of units as polynomial.
24843
24844 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24845             Alan Hayward  <alan.hayward@arm.com>
24846             David Sherwood  <david.sherwood@arm.com>
24847
24848         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24849         * target.def (autovectorize_vector_sizes): Return the vector sizes
24850         by pointer, using vector_sizes rather than a bitmask.
24851         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24852         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24853         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24854         Likewise.
24855         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24856         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24857         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24858         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24859         * omp-general.c (omp_max_vf): Likewise.
24860         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24861         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24862         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24863         * tree-vect-slp.c (vect_slp_bb): Likewise.
24864         * doc/tm.texi: Regenerate.
24865         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24866         to a poly_uint64.
24867         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24868         the vector size as a poly_uint64 rather than an unsigned int.
24869         (current_vector_size): Change from an unsigned int to a poly_uint64.
24870         (get_vectype_for_scalar_type): Update accordingly.
24871         * tree.h (build_truth_vector_type): Take the size and number of
24872         units as a poly_uint64 rather than an unsigned int.
24873         (build_vector_type): Add a temporary overload that takes
24874         the number of units as a poly_uint64 rather than an unsigned int.
24875         * tree.c (make_vector_type): Likewise.
24876         (build_truth_vector_type): Take the number of units as a poly_uint64
24877         rather than an unsigned int.
24878
24879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24880             Alan Hayward  <alan.hayward@arm.com>
24881             David Sherwood  <david.sherwood@arm.com>
24882
24883         * target.def (get_mask_mode): Take the number of units and length
24884         as poly_uint64s rather than unsigned ints.
24885         * targhooks.h (default_get_mask_mode): Update accordingly.
24886         * targhooks.c (default_get_mask_mode): Likewise.
24887         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24888         * doc/tm.texi: Regenerate.
24889
24890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24891             Alan Hayward  <alan.hayward@arm.com>
24892             David Sherwood  <david.sherwood@arm.com>
24893
24894         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24895         * omp-general.c (omp_max_vf): Likewise.
24896         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24897         (expand_omp_simd): Handle polynomial safelen.
24898         * omp-low.c (omplow_simd_context): Add a default constructor.
24899         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24900         (lower_rec_simd_input_clauses): Update accordingly.
24901         (lower_rec_input_clauses): Likewise.
24902
24903 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24904             Alan Hayward  <alan.hayward@arm.com>
24905             David Sherwood  <david.sherwood@arm.com>
24906
24907         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24908         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24909         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24910         (vect_analyze_slp_cost): Likewise.
24911         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24912         (vect_model_load_cost): Likewise.
24913
24914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24915             Alan Hayward  <alan.hayward@arm.com>
24916             David Sherwood  <david.sherwood@arm.com>
24917
24918         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24919         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24920         from an unsigned int * to a poly_uint64_pod *.
24921         (calculate_unrolling_factor): New function.
24922         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24923
24924 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24925             Alan Hayward  <alan.hayward@arm.com>
24926             David Sherwood  <david.sherwood@arm.com>
24927
24928         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24929         from an unsigned int to a poly_uint64.
24930         (_loop_vec_info::slp_unrolling_factor): Likewise.
24931         (_loop_vec_info::vectorization_factor): Change from an int
24932         to a poly_uint64.
24933         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24934         (vect_get_num_vectors): New function.
24935         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24936         (vect_get_num_copies): Use vect_get_num_vectors.
24937         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24938         to an unsigned int *.
24939         (vect_analyze_data_refs): Change min_vf from an int * to a
24940         poly_uint64 *.
24941         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24942         than an unsigned HOST_WIDE_INT.
24943         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24944         (vect_analyze_data_ref_dependence): Change max_vf from an int *
24945         to an unsigned int *.
24946         (vect_analyze_data_ref_dependences): Likewise.
24947         (vect_compute_data_ref_alignment): Handle polynomial vf.
24948         (vect_enhance_data_refs_alignment): Likewise.
24949         (vect_prune_runtime_alias_test_list): Likewise.
24950         (vect_shift_permute_load_chain): Likewise.
24951         (vect_supportable_dr_alignment): Likewise.
24952         (dependence_distance_ge_vf): Take the vectorization factor as a
24953         poly_uint64 rather than an unsigned HOST_WIDE_INT.
24954         (vect_analyze_data_refs): Change min_vf from an int * to a
24955         poly_uint64 *.
24956         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24957         vfm1 as a poly_uint64 rather than an int.  Make the same change
24958         for the returned bound_scalar.
24959         (vect_gen_vector_loop_niters): Handle polynomial vf.
24960         (vect_do_peeling): Likewise.  Update call to
24961         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24962         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24963         be constant.
24964         * tree-vect-loop.c (vect_determine_vectorization_factor)
24965         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24966         (vect_get_known_peeling_cost): Likewise.
24967         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24968         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24969         (vect_transform_loop): Likewise.  Use the lowest possible VF when
24970         updating the upper bounds of the loop.
24971         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
24972         rather than an int.
24973         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24974         polynomial unroll factors.
24975         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24976         (vect_make_slp_decision): Likewise.
24977         (vect_supported_load_permutation_p): Likewise, and polynomial
24978         vf too.
24979         (vect_analyze_slp_cost): Handle polynomial vf.
24980         (vect_slp_analyze_node_operations): Likewise.
24981         (vect_slp_analyze_bb_1): Likewise.
24982         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24983         than an unsigned HOST_WIDE_INT.
24984         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24985         (vectorizable_load): Handle polynomial vf.
24986         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24987         a poly_uint64.
24988         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24989
24990 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24991             Alan Hayward  <alan.hayward@arm.com>
24992             David Sherwood  <david.sherwood@arm.com>
24993
24994         * match.pd: Handle bit operations involving three constants
24995         and try to fold one pair.
24996
24997 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24998
24999         * tree-vect-loop-manip.c: Include gimple-fold.h.
25000         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25001         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
25002         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25003         Add a path that uses a step of VF instead of 1, but disable it
25004         for now.
25005         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25006         and niters_no_overflow parameters.  Update calls to
25007         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25008         Create a new SSA name if the latter choses to use a ste other
25009         than zero, and return it via niters_vector_mult_vf_var.
25010         * tree-vect-loop.c (vect_transform_loop): Update calls to
25011         vect_do_peeling, vect_gen_vector_loop_niters and
25012         slpeel_make_loop_iterate_ntimes.
25013         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25014         (vect_gen_vector_loop_niters): Update declarations after above changes.
25015
25016 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
25017
25018         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25019         128-bit round to integer instructions.
25020         (ceil<mode>2): Likewise.
25021         (btrunc<mode>2): Likewise.
25022         (round<mode>2): Likewise.
25023
25024 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25025
25026         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25027         unaligned VSX load/store on P8/P9.
25028         (expand_block_clear): Allow the use of unaligned VSX
25029         load/store on P8/P9.
25030
25031 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25032
25033         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25034         New function.
25035         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25036         swap associated with both a load and a store.
25037
25038 2018-01-02  Andrew Waterman  <andrew@sifive.com>
25039
25040         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25041         * config/riscv/riscv.md (clear_cache): Use it.
25042
25043 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
25044
25045         * web.c: Remove out-of-date comment.
25046
25047 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25048
25049         * expr.c (fixup_args_size_notes): Check that any existing
25050         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25051         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25052         (emit_single_push_insn): ...here.
25053
25054 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25055
25056         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25057         (const_vector_encoded_nelts): New function.
25058         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25059         (const_vector_int_elt, const_vector_elt): Declare.
25060         * emit-rtl.c (const_vector_int_elt_1): New function.
25061         (const_vector_elt): Likewise.
25062         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25063         of CONST_VECTOR_ELT.
25064
25065 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25066
25067         * expr.c: Include rtx-vector-builder.h.
25068         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25069         directly on the tree encoding.
25070         (const_vector_from_tree): Likewise.
25071         * optabs.c: Include rtx-vector-builder.h.
25072         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25073         sequence of "u" values.
25074         * vec-perm-indices.c: Include rtx-vector-builder.h.
25075         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25076         directly on the vec_perm_indices encoding.
25077
25078 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25079
25080         * doc/rtl.texi (const_vector): Describe new encoding scheme.
25081         * Makefile.in (OBJS): Add rtx-vector-builder.o.
25082         * rtx-vector-builder.h: New file.
25083         * rtx-vector-builder.c: Likewise.
25084         * rtl.h (rtx_def::u2): Add a const_vector field.
25085         (CONST_VECTOR_NPATTERNS): New macro.
25086         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25087         (CONST_VECTOR_DUPLICATE_P): Likewise.
25088         (CONST_VECTOR_STEPPED_P): Likewise.
25089         (CONST_VECTOR_ENCODED_ELT): Likewise.
25090         (const_vec_duplicate_p): Check for a duplicated vector encoding.
25091         (unwrap_const_vec_duplicate): Likewise.
25092         (const_vec_series_p): Check for a non-duplicated vector encoding.
25093         Say that the function only returns true for integer vectors.
25094         * emit-rtl.c: Include rtx-vector-builder.h.
25095         (gen_const_vec_duplicate_1): Delete.
25096         (gen_const_vector): Call gen_const_vec_duplicate instead of
25097         gen_const_vec_duplicate_1.
25098         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25099         (gen_const_vec_duplicate): Use rtx_vector_builder.
25100         (gen_const_vec_series): Likewise.
25101         (gen_rtx_CONST_VECTOR): Likewise.
25102         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25103         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25104         Build a new vector rather than modifying a CONST_VECTOR in-place.
25105         (handle_special_swappables): Update call accordingly.
25106         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25107         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25108         Build a new vector rather than modifying a CONST_VECTOR in-place.
25109         (handle_special_swappables): Update call accordingly.
25110
25111 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25112
25113         * simplify-rtx.c (simplify_const_binary_operation): Use
25114         CONST_VECTOR_ELT instead of XVECEXP.
25115
25116 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25117
25118         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25119         the selector elements to be different from the data elements
25120         if the selector is a VECTOR_CST.
25121         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25122         ssizetype for the selector.
25123
25124 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25125
25126         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25127         before testing each element individually.
25128         * tree-vect-generic.c (lower_vec_perm): Likewise.
25129
25130 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25131
25132         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25133         * selftest-run-tests.c (selftest::run_tests): Call it.
25134         * vector-builder.h (vector_builder::operator ==): New function.
25135         (vector_builder::operator !=): Likewise.
25136         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25137         (vec_perm_indices::all_from_input_p): New function.
25138         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25139         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25140         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25141         instead of reading the VECTOR_CST directly.  Detect whether both
25142         vector inputs are the same before constructing the vec_perm_indices,
25143         and update the number of inputs argument accordingly.  Use the
25144         utility functions added above.  Only construct sel2 if we need to.
25145
25146 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25147
25148         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25149         the broadcast of the low byte.
25150         (expand_mult_highpart): Use an explicit encoding for the permutes.
25151         * optabs-query.c (can_mult_highpart_p): Likewise.
25152         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25153         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25154         (vectorizable_bswap): Likewise.
25155         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25156         explicit encoding for the power-of-2 permutes.
25157         (vect_permute_store_chain): Likewise.
25158         (vect_grouped_load_supported): Likewise.
25159         (vect_permute_load_chain): Likewise.
25160
25161 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25162
25163         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25164         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25165         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25166         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25167         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25168         (vect_gen_perm_mask_any): Likewise.
25169
25170 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25171
25172         * int-vector-builder.h: New file.
25173         * vec-perm-indices.h: Include int-vector-builder.h.
25174         (vec_perm_indices): Redefine as an int_vector_builder.
25175         (auto_vec_perm_indices): Delete.
25176         (vec_perm_builder): Redefine as a stand-alone class.
25177         (vec_perm_indices::vec_perm_indices): New function.
25178         (vec_perm_indices::clamp): Likewise.
25179         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25180         (vec_perm_indices::new_vector): New function.
25181         (vec_perm_indices::new_expanded_vector): Update for new
25182         vec_perm_indices class.
25183         (vec_perm_indices::rotate_inputs): New function.
25184         (vec_perm_indices::all_in_range_p): Operate directly on the
25185         encoded form, without computing elided elements.
25186         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25187         encoding.  Update for new vec_perm_indices class.
25188         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25189         the given vec_perm_builder.
25190         (expand_vec_perm_var): Update vec_perm_builder constructor.
25191         (expand_mult_highpart): Use vec_perm_builder instead of
25192         auto_vec_perm_indices.
25193         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25194         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
25195         or double series encoding as appropriate.
25196         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25197         vec_perm_indices instead of auto_vec_perm_indices.
25198         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25199         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25200         (vect_permute_store_chain): Likewise.
25201         (vect_grouped_load_supported): Likewise.
25202         (vect_permute_load_chain): Likewise.
25203         (vect_shift_permute_load_chain): Likewise.
25204         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25205         (vect_transform_slp_perm_load): Likewise.
25206         (vect_schedule_slp_instance): Likewise.
25207         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25208         (vectorizable_mask_load_store): Likewise.
25209         (vectorizable_bswap): Likewise.
25210         (vectorizable_store): Likewise.
25211         (vectorizable_load): Likewise.
25212         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25213         vec_perm_indices instead of auto_vec_perm_indices.  Use
25214         tree_to_vec_perm_builder to read the vector from a tree.
25215         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25216         vec_perm_builder instead of a vec_perm_indices.
25217         (have_whole_vector_shift): Use vec_perm_builder and
25218         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
25219         truncation to calc_vec_perm_mask_for_shift.
25220         (vect_create_epilog_for_reduction): Likewise.
25221         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25222         from auto_vec_perm_indices to vec_perm_indices.
25223         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25224         instead of changing individual elements.
25225         (aarch64_vectorize_vec_perm_const): Use new_vector to install
25226         the vector in d.perm.
25227         * config/arm/arm.c (expand_vec_perm_d::perm): Change
25228         from auto_vec_perm_indices to vec_perm_indices.
25229         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25230         instead of changing individual elements.
25231         (arm_vectorize_vec_perm_const): Use new_vector to install
25232         the vector in d.perm.
25233         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25234         Update vec_perm_builder constructor.
25235         (rs6000_expand_interleave): Likewise.
25236         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25237         (rs6000_expand_interleave): Likewise.
25238
25239 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25240
25241         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25242         to qimode could truncate the indices.
25243         * optabs.c (expand_vec_perm_var): Likewise.
25244
25245 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25246
25247         * Makefile.in (OBJS): Add vec-perm-indices.o.
25248         * vec-perm-indices.h: New file.
25249         * vec-perm-indices.c: Likewise.
25250         * target.h (vec_perm_indices): Replace with a forward class
25251         declaration.
25252         (auto_vec_perm_indices): Move to vec-perm-indices.h.
25253         * optabs.h: Include vec-perm-indices.h.
25254         (expand_vec_perm): Delete.
25255         (selector_fits_mode_p, expand_vec_perm_var): Declare.
25256         (expand_vec_perm_const): Declare.
25257         * target.def (vec_perm_const_ok): Replace with...
25258         (vec_perm_const): ...this new hook.
25259         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25260         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25261         * doc/tm.texi: Regenerate.
25262         * optabs.def (vec_perm_const): Delete.
25263         * doc/md.texi (vec_perm_const): Likewise.
25264         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25265         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25266         expand_vec_perm for constant permutation vectors.  Assert that
25267         the mode of variable permutation vectors is the integer equivalent
25268         of the mode that is being permuted.
25269         * optabs-query.h (selector_fits_mode_p): Declare.
25270         * optabs-query.c: Include vec-perm-indices.h.
25271         (selector_fits_mode_p): New function.
25272         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25273         is defined, instead of checking whether the vec_perm_const_optab
25274         exists.  Use targetm.vectorize.vec_perm_const instead of
25275         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
25276         fit in the vector mode before using a variable permute.
25277         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25278         vec_perm_indices instead of an rtx.
25279         (expand_vec_perm): Replace with...
25280         (expand_vec_perm_const): ...this new function.  Take the selector
25281         as a vec_perm_indices rather than an rtx.  Also take the mode of
25282         the selector.  Update call to shift_amt_for_vec_perm_mask.
25283         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25284         Use vec_perm_indices::new_expanded_vector to expand the original
25285         selector into bytes.  Check whether the indices fit in the vector
25286         mode before using a variable permute.
25287         (expand_vec_perm_var): Make global.
25288         (expand_mult_highpart): Use expand_vec_perm_const.
25289         * fold-const.c: Includes vec-perm-indices.h.
25290         * tree-ssa-forwprop.c: Likewise.
25291         * tree-vect-data-refs.c: Likewise.
25292         * tree-vect-generic.c: Likewise.
25293         * tree-vect-loop.c: Likewise.
25294         * tree-vect-slp.c: Likewise.
25295         * tree-vect-stmts.c: Likewise.
25296         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25297         Delete.
25298         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25299         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25300         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25301         (aarch64_vectorize_vec_perm_const): ...this new function.
25302         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25303         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25304         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25305         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25306         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25307         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25308         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25309         into...
25310         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
25311         check for NEON modes.
25312         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25313         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25314         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25315         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25316         into...
25317         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
25318         the old VEC_PERM_CONST conditions.
25319         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25320         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25321         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25322         (ia64_vectorize_vec_perm_const_ok): Merge into...
25323         (ia64_vectorize_vec_perm_const): ...this new function.
25324         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25325         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25326         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25327         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25328         * config/mips/mips.c (mips_expand_vec_perm_const)
25329         (mips_vectorize_vec_perm_const_ok): Merge into...
25330         (mips_vectorize_vec_perm_const): ...this new function.
25331         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25332         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25333         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25334         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25335         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25336         (rs6000_expand_vec_perm_const): Delete.
25337         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25338         Delete.
25339         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25340         (altivec_expand_vec_perm_const_le): Take each operand individually.
25341         Operate on constant selectors rather than rtxes.
25342         (altivec_expand_vec_perm_const): Likewise.  Update call to
25343         altivec_expand_vec_perm_const_le.
25344         (rs6000_expand_vec_perm_const): Delete.
25345         (rs6000_vectorize_vec_perm_const_ok): Delete.
25346         (rs6000_vectorize_vec_perm_const): New function.
25347         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25348         an element count and rtx array.
25349         (rs6000_expand_extract_even): Update call accordingly.
25350         (rs6000_expand_interleave): Likewise.
25351         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25352         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25353         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25354         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25355         (rs6000_expand_vec_perm_const): Delete.
25356         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25357         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25358         (altivec_expand_vec_perm_const_le): Take each operand individually.
25359         Operate on constant selectors rather than rtxes.
25360         (altivec_expand_vec_perm_const): Likewise.  Update call to
25361         altivec_expand_vec_perm_const_le.
25362         (rs6000_expand_vec_perm_const): Delete.
25363         (rs6000_vectorize_vec_perm_const_ok): Delete.
25364         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
25365         reference to the SPE evmerge intructions.
25366         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25367         an element count and rtx array.
25368         (rs6000_expand_extract_even): Update call accordingly.
25369         (rs6000_expand_interleave): Likewise.
25370         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25371         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25372         new function.
25373         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25374
25375 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25376
25377         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25378         vector mode and that that mode matches the mode of the data
25379         being permuted.
25380         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25381         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
25382         directly using expand_vec_perm_1 when forcing selectors into
25383         registers.
25384         (expand_vec_perm_var): New function, split out from expand_vec_perm.
25385
25386 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25387
25388         * optabs-query.h (can_vec_perm_p): Delete.
25389         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25390         * optabs-query.c (can_vec_perm_p): Split into...
25391         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25392         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25393         particular selector is valid.
25394         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25395         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25396         (vect_grouped_load_supported): Likewise.
25397         (vect_shift_permute_load_chain): Likewise.
25398         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25399         (vect_transform_slp_perm_load): Likewise.
25400         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25401         (vectorizable_bswap): Likewise.
25402         (vect_gen_perm_mask_checked): Likewise.
25403         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
25404         implementations of variable permutation vectors into account
25405         when deciding which selector to use.
25406         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25407         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25408         with a false third argument.
25409         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25410         to test whether the constant selector is valid and can_vec_perm_var_p
25411         to test whether a variable selector is valid.
25412
25413 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25414
25415         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25416         * optabs-query.c (can_vec_perm_p): Likewise.
25417         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25418         instead of vec_perm_indices.
25419         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25420         (vect_gen_perm_mask_checked): Likewise,
25421         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25422         (vect_gen_perm_mask_checked): Likewise,
25423
25424 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25425
25426         * optabs-query.h (qimode_for_vec_perm): Declare.
25427         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25428         (qimode_for_vec_perm): ...this new function.
25429         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25430
25431 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25432
25433         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25434         does not have a conditional at the top.
25435
25436 2018-01-02  Richard Biener  <rguenther@suse.de>
25437
25438         * ipa-inline.c (big_speedup_p): Fix expression.
25439
25440 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25441
25442         PR target/81616
25443         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25444         for generic 4->6.
25445
25446 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25447
25448         PR target/81616
25449         Generic tuning.
25450         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25451         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25452         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25453         cond_taken_branch_cost 3->4.
25454
25455 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
25456
25457         PR tree-optimization/83581
25458         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25459         TODO_cleanup_cfg if any changes have been made.
25460
25461         PR middle-end/83608
25462         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25463         convert_modes if target mode has the right side, but different mode
25464         class.
25465
25466         PR middle-end/83609
25467         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25468         last argument when extracting from CONCAT.  If either from_real or
25469         from_imag is NULL, use expansion through memory.  If result is not
25470         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25471         the parts directly to inner mode, if even that fails, use expansion
25472         through memory.
25473
25474         PR middle-end/83623
25475         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25476         check for bswap in mode rather than HImode and use that in expand_unop
25477         too.
25478 \f
25479 Copyright (C) 2018 Free Software Foundation, Inc.
25480
25481 Copying and distribution of this file, with or without modification,
25482 are permitted in any medium without royalty provided the copyright
25483 notice and this notice are preserved.